@ckeditor/ckeditor5-ai 47.3.0-alpha.1 → 47.3.0-alpha.3

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 (298) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index-editor.css +18 -15
  3. package/dist/index.css +19 -15
  4. package/dist/index.js +5 -5
  5. package/dist/translations/af.js +1 -1
  6. package/dist/translations/af.umd.js +1 -1
  7. package/dist/translations/ar.js +1 -1
  8. package/dist/translations/ar.umd.js +1 -1
  9. package/dist/translations/ast.js +1 -1
  10. package/dist/translations/ast.umd.js +1 -1
  11. package/dist/translations/az.js +1 -1
  12. package/dist/translations/az.umd.js +1 -1
  13. package/dist/translations/be.js +1 -1
  14. package/dist/translations/be.umd.js +1 -1
  15. package/dist/translations/bg.js +1 -1
  16. package/dist/translations/bg.umd.js +1 -1
  17. package/dist/translations/bn.js +1 -1
  18. package/dist/translations/bn.umd.js +1 -1
  19. package/dist/translations/bs.js +1 -1
  20. package/dist/translations/bs.umd.js +1 -1
  21. package/dist/translations/ca.js +1 -1
  22. package/dist/translations/ca.umd.js +1 -1
  23. package/dist/translations/cs.js +1 -1
  24. package/dist/translations/cs.umd.js +1 -1
  25. package/dist/translations/da.js +1 -1
  26. package/dist/translations/da.umd.js +1 -1
  27. package/dist/translations/de-ch.js +1 -1
  28. package/dist/translations/de-ch.umd.js +1 -1
  29. package/dist/translations/de.js +1 -1
  30. package/dist/translations/de.umd.js +1 -1
  31. package/dist/translations/el.js +1 -1
  32. package/dist/translations/el.umd.js +1 -1
  33. package/dist/translations/en-au.js +1 -1
  34. package/dist/translations/en-au.umd.js +1 -1
  35. package/dist/translations/en-gb.js +1 -1
  36. package/dist/translations/en-gb.umd.js +1 -1
  37. package/dist/translations/en.js +1 -1
  38. package/dist/translations/en.umd.js +1 -1
  39. package/dist/translations/eo.js +1 -1
  40. package/dist/translations/eo.umd.js +1 -1
  41. package/dist/translations/es-co.js +1 -1
  42. package/dist/translations/es-co.umd.js +1 -1
  43. package/dist/translations/es.js +1 -1
  44. package/dist/translations/es.umd.js +1 -1
  45. package/dist/translations/et.js +1 -1
  46. package/dist/translations/et.umd.js +1 -1
  47. package/dist/translations/eu.js +1 -1
  48. package/dist/translations/eu.umd.js +1 -1
  49. package/dist/translations/fa.js +1 -1
  50. package/dist/translations/fa.umd.js +1 -1
  51. package/dist/translations/fi.js +1 -1
  52. package/dist/translations/fi.umd.js +1 -1
  53. package/dist/translations/fr.js +1 -1
  54. package/dist/translations/fr.umd.js +1 -1
  55. package/dist/translations/gl.js +1 -1
  56. package/dist/translations/gl.umd.js +1 -1
  57. package/dist/translations/gu.js +1 -1
  58. package/dist/translations/gu.umd.js +1 -1
  59. package/dist/translations/he.js +1 -1
  60. package/dist/translations/he.umd.js +1 -1
  61. package/dist/translations/hi.js +1 -1
  62. package/dist/translations/hi.umd.js +1 -1
  63. package/dist/translations/hr.js +1 -1
  64. package/dist/translations/hr.umd.js +1 -1
  65. package/dist/translations/hu.js +1 -1
  66. package/dist/translations/hu.umd.js +1 -1
  67. package/dist/translations/hy.js +1 -1
  68. package/dist/translations/hy.umd.js +1 -1
  69. package/dist/translations/id.js +1 -1
  70. package/dist/translations/id.umd.js +1 -1
  71. package/dist/translations/it.js +1 -1
  72. package/dist/translations/it.umd.js +1 -1
  73. package/dist/translations/ja.js +1 -1
  74. package/dist/translations/ja.umd.js +1 -1
  75. package/dist/translations/jv.js +1 -1
  76. package/dist/translations/jv.umd.js +1 -1
  77. package/dist/translations/kk.js +1 -1
  78. package/dist/translations/kk.umd.js +1 -1
  79. package/dist/translations/km.js +1 -1
  80. package/dist/translations/km.umd.js +1 -1
  81. package/dist/translations/kn.js +1 -1
  82. package/dist/translations/kn.umd.js +1 -1
  83. package/dist/translations/ko.js +1 -1
  84. package/dist/translations/ko.umd.js +1 -1
  85. package/dist/translations/ku.js +1 -1
  86. package/dist/translations/ku.umd.js +1 -1
  87. package/dist/translations/lt.js +1 -1
  88. package/dist/translations/lt.umd.js +1 -1
  89. package/dist/translations/lv.js +1 -1
  90. package/dist/translations/lv.umd.js +1 -1
  91. package/dist/translations/ms.js +1 -1
  92. package/dist/translations/ms.umd.js +1 -1
  93. package/dist/translations/nb.js +1 -1
  94. package/dist/translations/nb.umd.js +1 -1
  95. package/dist/translations/ne.js +1 -1
  96. package/dist/translations/ne.umd.js +1 -1
  97. package/dist/translations/nl.js +1 -1
  98. package/dist/translations/nl.umd.js +1 -1
  99. package/dist/translations/no.js +1 -1
  100. package/dist/translations/no.umd.js +1 -1
  101. package/dist/translations/oc.js +1 -1
  102. package/dist/translations/oc.umd.js +1 -1
  103. package/dist/translations/pl.js +1 -1
  104. package/dist/translations/pl.umd.js +1 -1
  105. package/dist/translations/pt-br.js +1 -1
  106. package/dist/translations/pt-br.umd.js +1 -1
  107. package/dist/translations/pt.js +1 -1
  108. package/dist/translations/pt.umd.js +1 -1
  109. package/dist/translations/ro.js +1 -1
  110. package/dist/translations/ro.umd.js +1 -1
  111. package/dist/translations/ru.js +1 -1
  112. package/dist/translations/ru.umd.js +1 -1
  113. package/dist/translations/si.js +1 -1
  114. package/dist/translations/si.umd.js +1 -1
  115. package/dist/translations/sk.js +1 -1
  116. package/dist/translations/sk.umd.js +1 -1
  117. package/dist/translations/sl.js +1 -1
  118. package/dist/translations/sl.umd.js +1 -1
  119. package/dist/translations/sq.js +1 -1
  120. package/dist/translations/sq.umd.js +1 -1
  121. package/dist/translations/sr-latn.js +1 -1
  122. package/dist/translations/sr-latn.umd.js +1 -1
  123. package/dist/translations/sr.js +1 -1
  124. package/dist/translations/sr.umd.js +1 -1
  125. package/dist/translations/sv.js +1 -1
  126. package/dist/translations/sv.umd.js +1 -1
  127. package/dist/translations/th.js +1 -1
  128. package/dist/translations/th.umd.js +1 -1
  129. package/dist/translations/ti.js +1 -1
  130. package/dist/translations/ti.umd.js +1 -1
  131. package/dist/translations/tk.js +1 -1
  132. package/dist/translations/tk.umd.js +1 -1
  133. package/dist/translations/tr.js +1 -1
  134. package/dist/translations/tr.umd.js +1 -1
  135. package/dist/translations/tt.js +1 -1
  136. package/dist/translations/tt.umd.js +1 -1
  137. package/dist/translations/ug.js +1 -1
  138. package/dist/translations/ug.umd.js +1 -1
  139. package/dist/translations/uk.js +1 -1
  140. package/dist/translations/uk.umd.js +1 -1
  141. package/dist/translations/ur.js +1 -1
  142. package/dist/translations/ur.umd.js +1 -1
  143. package/dist/translations/uz.js +1 -1
  144. package/dist/translations/uz.umd.js +1 -1
  145. package/dist/translations/vi.js +1 -1
  146. package/dist/translations/vi.umd.js +1 -1
  147. package/dist/translations/zh-cn.js +1 -1
  148. package/dist/translations/zh-cn.umd.js +1 -1
  149. package/dist/translations/zh.js +1 -1
  150. package/dist/translations/zh.umd.js +1 -1
  151. package/package.json +15 -15
  152. package/src/aiactions/aiactions.js +1 -1
  153. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  154. package/src/aiactions/model/aiactionsreply.js +1 -1
  155. package/src/aiassistant/adapters/aiadapter.js +1 -1
  156. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  157. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  158. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  159. package/src/aiassistant/aiassistant.js +1 -1
  160. package/src/aiassistant/aiassistantediting.js +1 -1
  161. package/src/aiassistant/aiassistantui.js +1 -1
  162. package/src/aiassistant/legacyerrors.js +1 -1
  163. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  164. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  165. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  166. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  167. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  168. package/src/aiassistant/ui/form/aiformview.js +1 -1
  169. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  170. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  171. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  172. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  173. package/src/aiassistant/utils/common-translations.js +1 -1
  174. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  175. package/src/aiballoon/aiballoon.js +1 -1
  176. package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
  177. package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
  178. package/src/aiballoon/ui/aiballoonview.js +1 -1
  179. package/src/aichat/aichat.js +1 -1
  180. package/src/aichat/aichatcontroller.js +1 -1
  181. package/src/aichat/aichatui.js +1 -1
  182. package/src/aichat/model/aichatcontext.js +1 -1
  183. package/src/aichat/model/aichatconversation.js +1 -1
  184. package/src/aichat/model/aichatinteraction.js +1 -1
  185. package/src/aichat/model/aichatmodels.js +1 -1
  186. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  187. package/src/aichat/ui/aichatfeedview.js +1 -1
  188. package/src/aichat/ui/aichatheaderview.js +1 -1
  189. package/src/aichat/ui/aichatview.js +1 -1
  190. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  191. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  192. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  193. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  194. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  195. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  196. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  197. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  198. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  201. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  202. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  203. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  209. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  210. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  211. package/src/aichat/utils/eventnames.js +1 -1
  212. package/src/aichat/utils/promisequeue.js +1 -1
  213. package/src/aichathistory/aichathistory.js +1 -1
  214. package/src/aichathistory/aichathistorycontroller.js +1 -1
  215. package/src/aichathistory/aichathistoryui.js +1 -1
  216. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  217. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  218. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  219. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  220. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  221. package/src/aichathistory/ui/aichathistoryview.d.ts +1 -0
  222. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  223. package/src/aicore/aiconnector.js +1 -1
  224. package/src/aicore/aiediting.js +1 -1
  225. package/src/aicore/model/aicapabilities.js +1 -1
  226. package/src/aicore/model/aicontext.js +1 -1
  227. package/src/aicore/model/aiinteraction.js +1 -1
  228. package/src/aicore/model/aimodels.js +1 -1
  229. package/src/aicore/model/aireply.js +1 -1
  230. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  231. package/src/aicore/pipeline/airesponseparser.js +2 -2
  232. package/src/aicore/ui/aidisclaimerview.js +1 -1
  233. package/src/aicore/ui/aiskeleton.js +1 -1
  234. package/src/aicore/ui/aispinner.js +1 -1
  235. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  236. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  237. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  238. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  239. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  240. package/src/aicore/utils/common-translations.js +1 -1
  241. package/src/aicore/utils/createresizebutton.js +1 -1
  242. package/src/aicore/utils/documentposition.js +1 -1
  243. package/src/aicore/utils/documentrange.js +1 -1
  244. package/src/aicore/utils/eventnames.js +1 -1
  245. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  246. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  247. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  248. package/src/aicore/utils/htmlparser.js +1 -1
  249. package/src/aicore/utils/htmlstreamer.js +1 -1
  250. package/src/aicore/utils/scrollmanager.js +1 -1
  251. package/src/aieditorintegration/aieditorintegration.js +1 -1
  252. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  253. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  254. package/src/aiquickactions/aiquickactions.js +1 -1
  255. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  256. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  257. package/src/aiquickactions/aiquickactionsui.js +1 -1
  258. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  259. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  260. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  261. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  262. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  263. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  264. package/src/aireviewmode/aireviewmode.js +1 -1
  265. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  266. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  267. package/src/aireviewmode/aireviewmodeui.js +1 -1
  268. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  269. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  270. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  271. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  272. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  273. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  274. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  275. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  276. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  277. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  278. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  279. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  280. package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
  281. package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +1 -1
  282. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  283. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  284. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  285. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  286. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  287. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  288. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  289. package/src/aitabs/aitabs.js +1 -1
  290. package/src/aitabs/aitabsmainview.js +1 -1
  291. package/src/aitabs/tabs/aitabsview.js +1 -1
  292. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  293. package/src/aitabs/tabs/tabpanelview.js +1 -1
  294. package/src/errors.js +1 -1
  295. package/src/errorsmap.js +1 -1
  296. package/src/index.js +1 -1
  297. package/theme/aiballoon/aiballoon.css +2 -1
  298. package/theme/aiquickactions/aiquickactions.css +17 -14
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x356a(){const _0x292d02=['getGroupId','_aiChatUi','removeSelectionFromContext','isOpen','add','setLoadingMessage','config','split','close','ai-no-track-changes','removeSelectionFromChatContext','map','_startConversationSafely','resource','mouseLeaveSuggestion','ai-chat-conversation-not-found','setSelectedModel','uiId','showFakeVisualSelection','ai-chat-invalid-request','_removeAISelectionMarkers','handleRemovedConversation','collaboration.channelId','_logError','AI_CHAT_UNTITLED_CONVERSATION','uid','_updateRatings','viewRangeToDom','TrackChanges','addCurrentDocumentToContext','marker','undo','modelSelected','replies','interactionStarted','addFeedItemAISuggestion','7622490NPnGuA','resourceId','setChangeGroupState','198rCjXfh','content','sourcePosition','query','ai-chat-context-file-too-large','contextItem','AI_CHAT_CONTEXT_INVALID_DATA','addFeedItemAIReply','fetchConversation','getDocumentContext','_toggleReasoning','ai-chat-conversation-init-failed','showPrevious','contextSent','_flushLastInteractionUI','activeConversation','options','removeContextItem','source','updateResourceState','node','push','findIndex','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','getChild','unshift','removeFeedInteraction','root','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','ai-chat-context-file-too-many-pages','init','_updateReplyContent','howMany','updateCapabilities','slice','addResourceToContext','like','isPremiumPlugin','_aiEditing','updateFeedItemAIReplySources','showDiff','getTransformedByOperation','AI_CHAT_UNABLE_TO_START_CONVERSATION','setFeedItemRenderingStrategy','capabilitiesUpdated','range','AI_CHAT_INVALID_REQUEST','_showConversationHistory','chat','_scrollToSuggestionRange','children','toString','28XhPYSl','ai.chat.context','dialogClosed','_batchToChanges','sendMessage','type','afterInit','stop','isCurrentDocumentInContext','toggleSuggestionDisplayMode','184FzFJAh','_aiChatModels','addFeedInteractionHeader','getSelectionText','AI_CHAT_RESOURCE_LOAD_FAILED','getAttribute','closeSourceResourceBalloon','ai-chat-controller-mouse-over','setContextItemLoading','interactionCreated','stopInteraction','scrollFeedToSuggestion','_previewedChangeGroup','createPositionFromPath','mapper','indexes','3440jDBslH','sendUserMessage','isCurrentDocumentInConversation','addFeedItemUserMessage','_createFromRanges','version','log','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','state','addSelectionToChatContext','updateFeedItemAIReplySuggestionContent','pending','interactionDestroyed','index','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','accepted','markers','412093AeougK','cloneNode','editing','_handleStartConversation','resources','open','isOfficialPlugin','1437828PHWXdb','_removeFromContext','isDisabled','_getDocumentRangeForReplyChanges','replyChangeGroupStateUpdated','pluginName','resizedTabs','partIndex','text-delta','clearPendingContextUI','updateConversationTitle','updateCurrentDocumentInContext','isDocumentOperation','AIEditing','uploadProgressChanged','start','getReply','anchorId','addDocumentToContext','ai-chat-conversation-start-failed','ai-chat-context-unsupported-type','sources','domConverter','current-document','createConversation','DocumentCompare','addOperation','ai-chat-context-unsupported-file-type','ai-chat-controller-no-active-conversation','view','rejected','streaming','getOperations','AI_CHAT_CONTEXT_FILE_TOO_LARGE','getRoot','commands','_applyOperationsAsSuggestions','history','ai-chat-file-upload-failed','setIsMaximized','setModel','startInteraction','baseVersion','revert','contextItemLoadingEnded','set','TrackChangesEditing','toViewRange','contextItems','activateTab','new','updateContent','rejectSuggestion','path','find','remove','removeFromContext','ai-chat-url-upload-failed','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','_applySuggestion','getPath','documentContextContent','modification-delta','startConversation','getConversation','ready','conversationInitialized','main','forEach','ai-chat-context-form-data-size-limits-exceeded','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','showNext','resizeTabs','interactionId','144856kNltsS','model','hasChanges','document','hideFakeVisualSelection','replyId','context','getRanges','loadSourceResources','getContentParts','handleUserInteraction','selectModel','has','reasoningFinished','Liked\x20response','full','AI_CHAT_GENERIC_ERROR','alignToTop','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','redo','disableControls','filter','resetConversationTitle','changes','AITabs','contextItemRemoved','clearConversationContextUI','489422lWBvmg','updateFeedItemAIReplyContent','toggleWebSearch','interactionFinished','isInContext','error','Showing\x20conversation\x20history...','length','startAutoScroll','editors','ai-conversation-','ai.chat.models.defaultModelId','2YfjJsa','getFirstRange','addFeedItemStaticMessage','parse','ai-chat-resource-load-failed','_handleUIUserMessage','messageId','static','abortPromptStream','467886OacNSr','data','contextItemAdded','indexOf','nextSibling','from','setIsUploadInProgress','locale','resetMessageInput','_aiConnector','108gqkwDB','updateFeedItemAIReplySuggestionPartState','addContextOptionsChanged','getChildren','change','showChangeInText','data-id','toggleReasoning','toggleLoadingSkeleton','startsWith','ai-chat-missing-channel-id','stopListening','removed','ai-chat-context-invalid-data','focusPromptInput','sourceId','webSearchFinished','sourceResourcesLoaded','removeMarker','outdated','AI_BALLOON_HEADER_TITLE','ai.chat.models.displayedModels','ai-request-aborted','getDocumentData','getMarkersGroup','addFileToContext','_integrateEditor','_insertSuggestion','upsertAIChatRating','setAddContextOptions','_setIsMaximized','_balloonShowDiff','get','resize','rootName','selection','dislike','addContextItem','addFeedItemError','mouseOverSuggestion','message','finishInteraction','resourceStateChanged','loadConversation','Disliked\x20response','changeGroups','maxOffset','insertSuggestion','plugins','getChildAtOffset','applyOperation','_toggleWebSearch','AIConnector','addUrlToContext','isLoading','replyContentUpdated','selectedModel','AI_CHAT_ABORTED_MESSAGE','applySuggestion','ai.availableReplyActions','batch','addSelectionToContext','reasoningStarted','isUploadInProgress','setConversationContext','lastInteraction','webSearchStarted','setConversationTitle','$graveyard','createRange','AIChatUI','ai-chat-source-resources-load-failed','isModelAvailable','getInteractionAndReplyById','listenTo','getInteraction','populateSourceResourceBalloon','addFilesToContext','requires','getDiff','createPositionAt','_stopLastInteraction','enableControls','_openBalloonFor','AIChatController','end','delete','Undo','replyCreated','isStarted','load','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL'];_0x356a=function(){return _0x292d02;};return _0x356a();}const _0x1c0dea=_0x23a1;(function(_0x1350f8,_0x3c7929){const _0x15a389=_0x23a1,_0x425829=_0x1350f8();while(!![]){try{const _0x433b0e=parseInt(_0x15a389(0x258))/0x1*(-parseInt(_0x15a389(0x264))/0x2)+parseInt(_0x15a389(0x1f3))/0x3+-parseInt(_0x15a389(0x1cb))/0x4*(-parseInt(_0x15a389(0x1db))/0x5)+-parseInt(_0x15a389(0x26d))/0x6*(parseInt(_0x15a389(0x1c1))/0x7)+-parseInt(_0x15a389(0x23d))/0x8*(parseInt(_0x15a389(0x18c))/0x9)+parseInt(_0x15a389(0x189))/0xa+parseInt(_0x15a389(0x1ec))/0xb*(parseInt(_0x15a389(0x277))/0xc);if(_0x433b0e===_0x3c7929)break;else _0x425829['push'](_0x425829['shift']());}catch(_0xef9b7b){_0x425829['push'](_0x425829['shift']());}}}(_0x356a,0x64410));import{ContextPlugin as _0x3e87f6,Editor as _0x150232}from'ckeditor5/src/core.js';import{CKEditorError as _0xde8b51,logError as _0x30dde1,scrollViewportToShowTarget as _0x195785,uid as _0x449e24}from'ckeditor5/src/utils.js';import{AIConnector as _0x2e5232}from'../aicore/aiconnector.js';import{AITabs as _0x31b171}from'../aitabs/aitabs.js';import{AIChatConversation as _0x104747}from'./model/aichatconversation.js';import{getTranslation as _0xe4444a}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x49b4f9}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x5cac65}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x4be469}from'./model/aichatmodels.js';import{getEditorFromContext as _0x630f5f}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x19255f,DATA_ID_MODEL_ATTRIBUTE as _0x58cf59}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x2cc6bc,getOperationsFromReply as _0x37b396}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x135333,getMinimalSelection as _0x2becb9}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x23a1(_0x32d790,_0x2763c6){const _0x356a09=_0x356a();return _0x23a1=function(_0x23a1a1,_0x5c99bb){_0x23a1a1=_0x23a1a1-0x144;let _0x58524d=_0x356a09[_0x23a1a1];return _0x58524d;},_0x23a1(_0x32d790,_0x2763c6);}import{ModelRange as _0x36cd98,_DetachOperation as _0xb1e712}from'ckeditor5/src/engine.js';import{findOne as _0xbce80a,getAttribute as _0x3f796b,serialize as _0x339428,Document as _0x429fd2,findByAttribute as _0x2805af}from'../aicore/utils/htmlparser.js';import{IconAI as _0x3c6a93}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x33e40a}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x3cc98e}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x3e87f6{[_0x1c0dea(0x1b3)];[_0x1c0dea(0x276)];[_0x1c0dea(0x166)];[_0x1c0dea(0x1cc)];[_0x1c0dea(0x1c4)]=new Map();[_0x1c0dea(0x1d7)]=null;[_0x1c0dea(0x296)]=!0x1;static get[_0x1c0dea(0x157)](){return[_0x2e5232,_0x3cc98e,_0x19255f];}static get[_0x1c0dea(0x1f8)](){const _0x1eec80=_0x1c0dea;return _0x1eec80(0x15d);}static get[_0x1c0dea(0x1f2)](){return!0x0;}static get[_0x1c0dea(0x1b2)](){return!0x0;}[_0x1c0dea(0x1ab)](){const _0x1e4fb3=_0x1c0dea;this[_0x1e4fb3(0x276)]=this[_0x1e4fb3(0x243)][_0x1e4fb3(0x2a7)][_0x1e4fb3(0x297)](_0x1e4fb3(0x2ab)),this[_0x1e4fb3(0x166)]=this[_0x1e4fb3(0x243)][_0x1e4fb3(0x2a7)][_0x1e4fb3(0x297)](_0x1e4fb3(0x14f)),this[_0x1e4fb3(0x1b3)]=this[_0x1e4fb3(0x243)][_0x1e4fb3(0x2a7)][_0x1e4fb3(0x297)](_0x1e4fb3(0x200)),this[_0x1e4fb3(0x1cc)]=new _0x4be469({'connector':this[_0x1e4fb3(0x276)],'availableModels':this[_0x1e4fb3(0x243)][_0x1e4fb3(0x16b)][_0x1e4fb3(0x297)](_0x1e4fb3(0x28c)),'defaultModelId':this[_0x1e4fb3(0x243)][_0x1e4fb3(0x16b)][_0x1e4fb3(0x297)](_0x1e4fb3(0x263))});const _0x57b26e=this[_0x1e4fb3(0x243)][_0x1e4fb3(0x2a7)][_0x1e4fb3(0x297)](_0x1e4fb3(0x255));this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x232),()=>{const _0x6f4ffb=_0x1e4fb3;this[_0x6f4ffb(0x171)]();}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x1dc),(_0x276226,_0x2d42d3)=>{const _0x103211=_0x1e4fb3;this[_0x103211(0x269)]({'userMessage':_0x2d42d3});}),this[_0x1e4fb3(0x153)](_0x57b26e,_0x1e4fb3(0x1f9),(_0x28f411,_0x10f7da)=>{const _0x2b5838=_0x1e4fb3;this[_0x2b5838(0x295)](_0x10f7da);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x23b),()=>{const _0x55b61a=_0x1e4fb3;_0x57b26e[_0x55b61a(0x298)]();}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x26c),async()=>{const _0x330e98=_0x1e4fb3;await this[_0x330e98(0x15a)](),await this[_0x330e98(0x19a)](),this[_0x330e98(0x16f)]();}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x205),()=>{const _0x34c680=_0x1e4fb3;this[_0x34c680(0x19b)]?.[_0x34c680(0x182)](_0xe4444a(this[_0x34c680(0x243)][_0x34c680(0x274)],_0x34c680(0x22d)));}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x290),(_0x3a0207,_0x44dff8)=>{const _0xd91dfa=_0x1e4fb3;this[_0xd91dfa(0x19b)]?.[_0xd91dfa(0x156)](Array[_0xd91dfa(0x272)](_0x44dff8));}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x2ac),(_0x147102,_0x5c0cda)=>{const _0x1d9c6c=_0x1e4fb3;this[_0x1d9c6c(0x19b)]?.[_0x1d9c6c(0x2ac)](_0x5c0cda);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x1b0),(_0x199487,_0x5835b9)=>{const _0x153546=_0x1e4fb3;this[_0x153546(0x19b)]?.[_0x153546(0x1b0)](_0x5835b9[_0x153546(0x19e)],_0x5835b9[_0x153546(0x172)]);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x19d),(_0xe8ef5c,_0x252503)=>{const _0x2ff56d=_0x1e4fb3;this[_0x2ff56d(0x1f4)](_0x252503);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x245),(_0x1da2fe,_0x1022ff)=>{const _0x5e5a0a=_0x1e4fb3;this[_0x5e5a0a(0x19b)]?.[_0x5e5a0a(0x245)](_0x1022ff[_0x5e5a0a(0x286)],_0x1022ff[_0x5e5a0a(0x18f)],_0x1022ff[_0x5e5a0a(0x17e)]);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x25a),()=>{const _0x1a5da2=_0x1e4fb3;this[_0x1a5da2(0x2aa)]();}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x27e),()=>{const _0x3e6ee8=_0x1e4fb3;this[_0x3e6ee8(0x196)]();}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x248),(_0x1ad8a9,_0x1952be)=>{const _0x209e4b=_0x1e4fb3;this[_0x209e4b(0x19b)]?.[_0x209e4b(0x21b)](_0x1952be);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x1b1),(_0x147e52,{replyId:_0x4c1f16})=>{const _0x4ddb22=_0x1e4fb3;console[_0x4ddb22(0x1e1)](_0x4ddb22(0x24b),_0x4c1f16);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x29b),(_0x39947f,{replyId:_0x1cce5e})=>{const _0x4d5450=_0x1e4fb3;console[_0x4d5450(0x1e1)](_0x4d5450(0x2a3),_0x1cce5e);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x2a6),(_0x22cf15,_0x5d5a4d)=>{const _0x55cf4a=_0x1e4fb3;this[_0x55cf4a(0x243)][_0x55cf4a(0x2a7)][_0x55cf4a(0x297)](_0x3cc98e)[_0x55cf4a(0x16d)](),this[_0x55cf4a(0x292)](_0x5d5a4d);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x27c),(_0x1eb6ba,{replyId:_0x2e4e37,partIndex:_0x1afd93})=>{const _0x4c795c=_0x1e4fb3;this[_0x4c795c(0x296)]=this[_0x4c795c(0x166)][_0x4c795c(0x1b5)],this[_0x4c795c(0x15c)](_0x2e4e37,_0x1afd93);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x29e),(_0x2d0e8b,{replyId:_0x186f81,partIndex:_0x738561})=>{const _0x5cfb04=_0x1e4fb3,_0x2d6356=this[_0x5cfb04(0x1f6)](_0x186f81,_0x738561);_0x2d6356&&_0x5cfb04(0x14d)!=_0x2d6356[_0x5cfb04(0x1ba)][_0x5cfb04(0x1a7)][_0x5cfb04(0x299)]&&this[_0x5cfb04(0x1b3)][_0x5cfb04(0x177)]([_0x2d6356[_0x5cfb04(0x1ba)]],_0x5cfb04(0x1d2));}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x173),()=>{const _0xe75a3b=_0x1e4fb3;this[_0xe75a3b(0x1b3)][_0xe75a3b(0x241)](_0xe75a3b(0x1d2));}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x2b1),(_0x1572c1,_0x576a88)=>{const _0x4ada5d=_0x1e4fb3;this[_0x4ada5d(0x243)][_0x4ada5d(0x2a7)][_0x4ada5d(0x297)](_0x3cc98e)[_0x4ada5d(0x16d)](),this[_0x4ada5d(0x22e)](_0x576a88);}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x1ca),async(_0x5a3286,{replyId:_0x29392e,showDiff:_0x45a523})=>{const _0x271cc2=_0x1e4fb3,{reply:_0x351946}=this[_0x271cc2(0x152)](_0x29392e),_0x5838bf=_0x351946[_0x271cc2(0x246)]({'showDiff':_0x45a523});await this[_0x271cc2(0x166)][_0x271cc2(0x1e5)]({'id':_0x351946['id'],'parts':_0x5838bf,'renderingStrategy':_0x271cc2(0x26b)});}),this[_0x1e4fb3(0x153)](this[_0x1e4fb3(0x166)],_0x1e4fb3(0x227),(_0x1e882f,{replyId:_0x3816df,partIndex:_0x275d42})=>{const _0x2ea22e=_0x1e4fb3;this[_0x2ea22e(0x1d7)]?.[_0x2ea22e(0x242)]==_0x3816df&&this[_0x2ea22e(0x1d7)]?.[_0x2ea22e(0x1fa)]==_0x275d42&&this[_0x2ea22e(0x243)][_0x2ea22e(0x2a7)][_0x2ea22e(0x297)](_0x3cc98e)[_0x2ea22e(0x16d)]();const {reply:_0x3bce64}=this[_0x2ea22e(0x152)](_0x3816df);_0x3bce64[_0x2ea22e(0x18b)](_0x275d42,_0x2ea22e(0x211)),this[_0x2ea22e(0x1b3)][_0x2ea22e(0x241)](_0x2ea22e(0x1d2));});}async[_0x1c0dea(0x1c7)](){const _0x5e2c74=_0x1c0dea;this[_0x5e2c74(0x243)]instanceof _0x150232?this[_0x5e2c74(0x291)](this[_0x5e2c74(0x243)]):this[_0x5e2c74(0x153)](this[_0x5e2c74(0x243)][_0x5e2c74(0x261)],_0x5e2c74(0x169),(_0x367a2b,_0x4c7b3d)=>{const _0x4dabcd=_0x5e2c74;_0x4c7b3d['on'](_0x4dabcd(0x234),()=>{const _0x36a4c5=_0x4dabcd;this[_0x36a4c5(0x291)](_0x4c7b3d);});}),await this[_0x5e2c74(0x171)]();}[_0x1c0dea(0x292)](_0x9b418c){const _0x4d1d7c=_0x1c0dea,_0x1d6942=_0x630f5f(this[_0x4d1d7c(0x243)]);if(!_0x1d6942[_0x4d1d7c(0x2a7)][_0x4d1d7c(0x249)](_0x4d1d7c(0x181)))throw new _0xde8b51(_0x4d1d7c(0x16e),null);const _0x4a7a85=this[_0x4d1d7c(0x243)][_0x4d1d7c(0x2a7)][_0x4d1d7c(0x297)](_0x4d1d7c(0x20c)),{reply:_0x32c314,interaction:_0x309934}=this[_0x4d1d7c(0x152)](_0x9b418c[_0x4d1d7c(0x242)]),_0x7cedeb=this[_0x4d1d7c(0x1f6)](_0x9b418c[_0x4d1d7c(0x242)],_0x9b418c[_0x4d1d7c(0x1fa)]),_0x146433=void 0x0!==_0x9b418c[_0x4d1d7c(0x1fa)]?[_0x32c314[_0x4d1d7c(0x2a4)][_0x9b418c[_0x4d1d7c(0x1fa)]]]:_0x32c314[_0x4d1d7c(0x2a4)][_0x4d1d7c(0x252)](_0x45cfd6=>_0x4d1d7c(0x1e6)==_0x45cfd6[_0x4d1d7c(0x1e3)]),_0x325bf4=_0x146433[_0x4d1d7c(0x170)](_0x541829=>_0x32c314[_0x4d1d7c(0x2a4)][_0x4d1d7c(0x270)](_0x541829));if(!_0x7cedeb||_0x4d1d7c(0x14d)==_0x7cedeb[_0x4d1d7c(0x1ba)][_0x4d1d7c(0x1a7)][_0x4d1d7c(0x299)])return void _0x325bf4[_0x4d1d7c(0x237)](_0x438b8d=>_0x32c314[_0x4d1d7c(0x18b)](_0x438b8d,_0x4d1d7c(0x28a)));_0x325bf4[_0x4d1d7c(0x237)](_0x1976e9=>_0x32c314[_0x4d1d7c(0x18b)](_0x1976e9,_0x4d1d7c(0x1ea)));const _0x4003fa=_0x37b396({'editor':_0x1d6942,'reply':_0x32c314,'interaction':_0x309934,'groups':_0x146433,'transform':!0x0,'documentCompare':_0x4a7a85,'documentCompareOptions':{'anchor':_0x4d1d7c(0x236),'markDeletions':!0x0}});let _0x35d0a2;_0x7cedeb&&this[_0x4d1d7c(0x1be)](_0x7cedeb[_0x4d1d7c(0x1ba)]),_0x1d6942[_0x4d1d7c(0x23e)][_0x4d1d7c(0x27b)](_0x204878=>{const _0x5489ef=_0x4d1d7c;_0x35d0a2=_0x204878[_0x5489ef(0x145)],_0x1d6942[_0x5489ef(0x2a7)][_0x5489ef(0x297)](_0x5489ef(0x221))[_0x5489ef(0x217)](_0x4003fa),this[_0x5489ef(0x1b3)][_0x5489ef(0x241)](_0x5489ef(0x1d2));}),this[_0x4d1d7c(0x1c4)][_0x4d1d7c(0x220)](_0x35d0a2,{'interactionId':_0x309934['id'],'replyId':_0x32c314['id'],'indexes':_0x325bf4[_0x4d1d7c(0x1af)]()}),this[_0x4d1d7c(0x17f)](_0x32c314);}[_0x1c0dea(0x22e)](_0x569f69){const _0x36283c=_0x1c0dea,_0x1d3be8=_0x630f5f(this[_0x36283c(0x243)]),_0x4a1712=this[_0x36283c(0x243)][_0x36283c(0x2a7)][_0x36283c(0x297)](_0x19255f),{reply:_0x4a58f5,interaction:_0x43c42e}=this[_0x36283c(0x152)](_0x569f69[_0x36283c(0x242)]),_0x326494=this[_0x36283c(0x1f6)](_0x569f69[_0x36283c(0x242)],_0x569f69[_0x36283c(0x1fa)]),_0x37ba4e=void 0x0!==_0x569f69[_0x36283c(0x1fa)]?[_0x4a58f5[_0x36283c(0x2a4)][_0x569f69[_0x36283c(0x1fa)]]]:_0x4a58f5[_0x36283c(0x2a4)][_0x36283c(0x252)](_0x22e344=>_0x36283c(0x1e6)==_0x22e344[_0x36283c(0x1e3)]),_0x4a564b=_0x37ba4e[_0x36283c(0x170)](_0x427c34=>_0x4a58f5[_0x36283c(0x2a4)][_0x36283c(0x270)](_0x427c34));if(!_0x326494||_0x36283c(0x14d)==_0x326494[_0x36283c(0x1ba)][_0x36283c(0x1a7)][_0x36283c(0x299)])return void _0x4a564b[_0x36283c(0x237)](_0x50e6d7=>_0x4a58f5[_0x36283c(0x18b)](_0x50e6d7,_0x36283c(0x28a)));_0x4a564b[_0x36283c(0x237)](_0x2b7614=>_0x4a58f5[_0x36283c(0x18b)](_0x2b7614,_0x36283c(0x1ea)));const _0x326b5d=_0x37b396({'editor':_0x1d3be8,'reply':_0x4a58f5,'interaction':_0x43c42e,'groups':_0x37ba4e,'transform':!0x0,'documentCompare':_0x4a1712,'documentCompareOptions':{'anchor':_0x36283c(0x236),'markDeletions':!0x1}});let _0xcd870b;_0x326494&&this[_0x36283c(0x1be)](_0x326494[_0x36283c(0x1ba)]),_0x1d3be8[_0x36283c(0x23e)][_0x36283c(0x27b)](_0xca6ec0=>{const _0x39030d=_0x36283c;_0xcd870b=_0xca6ec0[_0x39030d(0x145)];for(const _0x16dfff of _0x326b5d)_0x16dfff[_0x39030d(0x21d)]=_0x1d3be8[_0x39030d(0x23e)][_0x39030d(0x240)][_0x39030d(0x1e0)],_0x2cc6bc(_0x1d3be8,_0x16dfff),_0xca6ec0[_0x39030d(0x145)][_0x39030d(0x20d)](_0x16dfff),_0x1d3be8[_0x39030d(0x23e)][_0x39030d(0x2a9)](_0x16dfff);}),this[_0x36283c(0x1c4)][_0x36283c(0x220)](_0xcd870b,{'interactionId':_0x43c42e['id'],'replyId':_0x4a58f5['id'],'indexes':_0x4a564b[_0x36283c(0x1af)]()}),this[_0x36283c(0x17f)](_0x4a58f5);}[_0x1c0dea(0x15c)](_0x586108,_0x146cb7){const _0x53e154=_0x1c0dea,_0x9b2f8d=_0x630f5f(this[_0x53e154(0x243)]),_0x284de4=this[_0x53e154(0x1f6)](_0x586108,_0x146cb7),_0x35eede=this[_0x53e154(0x243)][_0x53e154(0x2a7)][_0x53e154(0x297)](_0x3cc98e);if(!_0x284de4)return void _0x35eede[_0x53e154(0x16d)]();const {range:_0x2d6f03,currentIndex:_0x4f8bbf}=_0x284de4;if(_0x53e154(0x14d)==_0x2d6f03[_0x53e154(0x1a7)][_0x53e154(0x299)]){const {reply:_0x2ecba2}=this[_0x53e154(0x152)](_0x586108);return _0x2ecba2[_0x53e154(0x18b)](_0x4f8bbf,_0x53e154(0x28a)),void _0x35eede[_0x53e154(0x16d)]();}if(this[_0x53e154(0x1d7)]?.[_0x53e154(0x242)]==_0x586108&&this[_0x53e154(0x1d7)]?.[_0x53e154(0x1fa)]==_0x4f8bbf)return;this[_0x53e154(0x282)](_0x35eede),this[_0x53e154(0x1d7)]={'replyId':_0x586108,'partIndex':_0x4f8bbf};let _0x184bb2=_0x9b2f8d[_0x53e154(0x16b)][_0x53e154(0x297)](_0x53e154(0x144))||[..._0x5cac65];_0x9b2f8d[_0x53e154(0x2a7)][_0x53e154(0x249)](_0x53e154(0x181))||(_0x184bb2=_0x184bb2[_0x53e154(0x252)](_0x1d33e4=>_0x53e154(0x2a6)!=_0x1d33e4));const _0x3d1ff6=new _0x33e40a(_0x9b2f8d[_0x53e154(0x274)],{'showDiff':this[_0x53e154(0x296)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x53e154(0x24c)},'hideHeader':!0x0,'availableActions':_0x184bb2});this[_0x53e154(0x282)](_0x3d1ff6);const {reply:_0x4b8439}=this[_0x53e154(0x152)](_0x586108),_0x3588d7=_0x4b8439[_0x53e154(0x246)]({'showDiff':this[_0x53e154(0x296)]})[_0x53e154(0x252)](_0x13a9fc=>_0x13a9fc[_0x53e154(0x23f)]),_0x8f720b=_0x3588d7[_0x53e154(0x1a2)](_0x3e5ed7=>_0x3e5ed7[_0x53e154(0x1e8)]==_0x4f8bbf);if(-0x1==_0x8f720b)return;const _0xc103c6=_0x3588d7[_0x8f720b],_0x3cf9ed=_0x3588d7['at']((_0x8f720b-0x1)%_0x3588d7[_0x53e154(0x25f)])?.[_0x53e154(0x1e8)],_0x328b7d=_0x3588d7['at']((_0x8f720b+0x1)%_0x3588d7[_0x53e154(0x25f)])?.[_0x53e154(0x1e8)];_0x3d1ff6[_0x53e154(0x226)]({'parts':[_0xc103c6],'renderingStrategy':_0x53e154(0x26b)});const _0x1ece30=_0x4f8bbf!==_0x3cf9ed;this[_0x53e154(0x1be)](_0x2d6f03,!0x0),_0x35eede[_0x53e154(0x1f1)]({'index':_0x4f8bbf,'title':_0xe4444a(this[_0x53e154(0x243)][_0x53e154(0x274)],_0x53e154(0x28b),(_0x8f720b+0x1)[_0x53e154(0x1c0)]()),'icon':_0x3c6a93,'mainView':_0x3d1ff6,'showRotator':_0x1ece30,'showApplyButton':!0x0,'showSuggestButton':_0x9b2f8d[_0x53e154(0x2a7)][_0x53e154(0x249)](_0x53e154(0x181)),'ranges':[_0x2d6f03]}),this[_0x53e154(0x166)][_0x53e154(0x1d6)](_0x586108,_0x4f8bbf),this[_0x53e154(0x153)](_0x3d1ff6,_0x53e154(0x1ca),(_0x554788,{showDiff:_0x551b9e})=>{const _0x4a49a3=_0x53e154;this[_0x4a49a3(0x296)]=_0x551b9e;const {reply:_0x1138d7}=this[_0x4a49a3(0x152)](_0x586108),_0x3e6f5d=_0x1138d7[_0x4a49a3(0x246)]({'showDiff':_0x551b9e,'groupIndex':_0x4f8bbf});_0x3d1ff6[_0x4a49a3(0x226)]({'parts':_0x3e6f5d,'renderingStrategy':_0x4a49a3(0x26b)});}),this[_0x53e154(0x153)](_0x35eede,_0x53e154(0x2b1),()=>{const _0x305460=_0x53e154;this[_0x305460(0x22e)]({'replyId':_0x586108,'partIndex':_0x4f8bbf}),_0x1ece30?this[_0x305460(0x15c)](_0x586108,_0x328b7d):_0x35eede[_0x305460(0x16d)]();}),this[_0x53e154(0x153)](_0x35eede,_0x53e154(0x2a6),()=>{const _0x1a7585=_0x53e154;this[_0x1a7585(0x292)]({'replyId':_0x586108,'partIndex':_0x4f8bbf}),_0x1ece30?this[_0x1a7585(0x15c)](_0x586108,_0x328b7d):_0x35eede[_0x1a7585(0x16d)]();}),_0x1ece30&&(this[_0x53e154(0x153)](_0x35eede,_0x53e154(0x23a),()=>{const _0x3cd660=_0x53e154;this[_0x3cd660(0x15c)](_0x586108,_0x328b7d);}),this[_0x53e154(0x153)](_0x35eede,_0x53e154(0x198),()=>{const _0x272a27=_0x53e154;this[_0x272a27(0x15c)](_0x586108,_0x3cf9ed);})),this[_0x53e154(0x153)](_0x35eede,_0x53e154(0x1c3),()=>{const _0x5a254c=_0x53e154;this[_0x5a254c(0x282)](_0x35eede),this[_0x5a254c(0x282)](_0x3d1ff6),this[_0x5a254c(0x1d7)]=null;});}[_0x1c0dea(0x1f6)](_0x11c1f4,_0x207ce7){const _0x1dcb54=_0x1c0dea,_0x5d8b7=_0x630f5f(this[_0x1dcb54(0x243)]),{reply:_0x5b3fd8,interaction:_0x12a2ef}=this[_0x1dcb54(0x152)](_0x11c1f4),_0x15e587=_0x5b3fd8[_0x1dcb54(0x2a4)][_0x1dcb54(0x252)](_0x5b2a14=>_0x1dcb54(0x1e6)==_0x5b2a14[_0x1dcb54(0x1e3)]),_0x294180=_0x15e587[_0x1dcb54(0x170)](_0x2d30fe=>_0x5b3fd8[_0x1dcb54(0x2a4)][_0x1dcb54(0x270)](_0x2d30fe));void 0x0===_0x207ce7&&(_0x207ce7=_0x294180[0x0]);const _0x2852f4=_0x294180[_0x1dcb54(0x270)](_0x207ce7);if(-0x1==_0x2852f4)return null;const _0x4452d9=_0x15e587[_0x2852f4],_0x49b4c6=new _0x429fd2([]),_0x224a6c=new _0x429fd2([]);for(const _0x39b9d1 of _0x4452d9[_0x1dcb54(0x254)])if(_0x1dcb54(0x283)!=_0x39b9d1[_0x1dcb54(0x1c6)]&&_0x224a6c[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0x39b9d1[_0x1dcb54(0x1a0)][_0x1dcb54(0x1ed)](!0x0)),_0x1dcb54(0x225)!=_0x39b9d1[_0x1dcb54(0x1c6)]){const _0xdeaedf=_0xbce80a(_0x50a3eb=>_0x3f796b(_0x50a3eb,_0x1dcb54(0x27d))==_0x39b9d1['id'],_0x5b3fd8[_0x1dcb54(0x230)],!0x0);_0x49b4c6[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0xdeaedf[_0x1dcb54(0x1ed)](!0x0));}if(0x0==_0x49b4c6[_0x1dcb54(0x1bf)][_0x1dcb54(0x25f)]){if(_0x4452d9[_0x1dcb54(0x254)][0x0][_0x1dcb54(0x204)]){const _0x52249f=_0x2805af(_0x1dcb54(0x27d),_0x4452d9[_0x1dcb54(0x254)][0x0][_0x1dcb54(0x204)],_0x5b3fd8[_0x1dcb54(0x230)]);_0x49b4c6[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a5)](_0x52249f[_0x1dcb54(0x1ed)](!0x0)),_0x224a6c[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a5)](_0x52249f[_0x1dcb54(0x1ed)](!0x0)),_0x52249f[_0x1dcb54(0x271)]&&(_0x49b4c6[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0x52249f[_0x1dcb54(0x271)][_0x1dcb54(0x1ed)](!0x0)),_0x224a6c[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0x52249f[_0x1dcb54(0x271)][_0x1dcb54(0x1ed)](!0x0)));}else{const _0x16f464=_0x5b3fd8[_0x1dcb54(0x230)][_0x1dcb54(0x1bf)][0x0];if(!_0x16f464)return null;_0x49b4c6[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0x16f464[_0x1dcb54(0x1ed)](!0x0)),_0x224a6c[_0x1dcb54(0x1bf)][_0x1dcb54(0x1a1)](_0x16f464[_0x1dcb54(0x1ed)](!0x0));}}const _0x2576ac=_0x12a2ef[_0x1dcb54(0x195)](),_0x3079c9=_0x5d8b7[_0x1dcb54(0x26e)][_0x1dcb54(0x267)](_0x2576ac[_0x1dcb54(0x18d)]),_0x56cd95=_0x339428(_0x49b4c6),_0x14dfe3=_0x5d8b7[_0x1dcb54(0x26e)][_0x1dcb54(0x267)](_0x56cd95),_0x2698c1=_0x5d8b7[_0x1dcb54(0x26e)][_0x1dcb54(0x267)](_0x56cd95),_0x384cc7=_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x159)](_0x14dfe3,0x0),_0x35f6b7=_0x339428(_0x224a6c),_0x495f87={'anchor':_0x384cc7,'markDeletions':!0x1},_0x594f1b=_0x5d8b7[_0x1dcb54(0x2a7)][_0x1dcb54(0x297)](_0x19255f)[_0x1dcb54(0x158)](_0x56cd95,_0x35f6b7,_0x495f87)[_0x1dcb54(0x213)]();if(!_0x594f1b[_0x1dcb54(0x25f)])return null;_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x27b)](_0x49fcb0=>{const _0x240dc7=_0x1dcb54;for(const _0x44451d of _0x594f1b)if(_0x240dc7(0x22a)==_0x44451d[_0x240dc7(0x1c6)]){const _0x56be69=_0x44451d[_0x240dc7(0x18e)],_0x55af39=_0x44451d[_0x240dc7(0x1ad)],_0x3a84f8=new _0xb1e712(_0x56be69,_0x55af39);_0x49fcb0[_0x240dc7(0x145)][_0x240dc7(0x20d)](_0x3a84f8),_0x5d8b7[_0x240dc7(0x23e)][_0x240dc7(0x2a9)](_0x3a84f8);}else _0x240dc7(0x183)!==_0x44451d[_0x240dc7(0x1c6)]&&(_0x44451d[_0x240dc7(0x21d)]=null,_0x44451d[_0x240dc7(0x1ff)]=!0x1,_0x49fcb0[_0x240dc7(0x145)][_0x240dc7(0x20d)](_0x44451d),_0x5d8b7[_0x240dc7(0x23e)][_0x240dc7(0x2a9)](_0x44451d));});const _0x496563=_0x2becb9(_0x5d8b7,_0x594f1b,_0x14dfe3);_0x135333(_0x5d8b7[_0x1dcb54(0x23e)],_0x496563);const _0x50b4b1=_0x496563[_0x1dcb54(0x265)]()[_0x1dcb54(0x202)][_0x1dcb54(0x228)][_0x1dcb54(0x1af)](),_0x50741d=_0x496563[_0x1dcb54(0x265)]()[_0x1dcb54(0x15e)][_0x1dcb54(0x228)][_0x1dcb54(0x1af)](),_0x2a891f=[];let _0x371d95=_0x14dfe3,_0x9f74e1=_0x2698c1;for(let _0x5c0b0e=0x0;_0x5c0b0e<_0x50741d[_0x1dcb54(0x25f)];_0x5c0b0e++){const _0x493d28=_0x371d95[_0x1dcb54(0x2a5)]-_0x50741d[_0x5c0b0e];_0x2a891f[_0x5c0b0e]=_0x9f74e1[_0x1dcb54(0x2a5)]-_0x493d28,_0x371d95=_0x371d95[_0x1dcb54(0x2a8)](_0x50741d[_0x5c0b0e]),_0x9f74e1=_0x9f74e1[_0x1dcb54(0x2a8)](_0x2a891f[_0x5c0b0e]);}const _0x55cd10=_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x14e)](_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x1d8)](_0x2698c1,_0x50b4b1),_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x1d8)](_0x2698c1,_0x2a891f)),_0x4b01b1=_0x2698c1[_0x1dcb54(0x1a4)](0x0)[_0x1dcb54(0x1d0)](_0x58cf59),_0x1e0470=Array[_0x1dcb54(0x272)](_0x3079c9[_0x1dcb54(0x27a)]())[_0x1dcb54(0x229)](_0x2cf97f=>_0x2cf97f[_0x1dcb54(0x1d0)](_0x58cf59)==_0x4b01b1)[_0x1dcb54(0x22f)](),_0x3298da=_0x55cd10[_0x1dcb54(0x202)][_0x1dcb54(0x228)][_0x1dcb54(0x1af)](),_0x1e9a78=_0x55cd10[_0x1dcb54(0x15e)][_0x1dcb54(0x228)][_0x1dcb54(0x1af)]();_0x3298da[0x0]=_0x1e0470[0x0]+_0x3298da[0x0],_0x1e9a78[0x0]=_0x1e0470[0x0]+_0x1e9a78[0x0];let _0x8f465d=_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x14e)](_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x1d8)](_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x240)][_0x1dcb54(0x215)](),_0x3298da),_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x1d8)](_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x240)][_0x1dcb54(0x215)](),_0x1e9a78));const _0x12a310=_0x5d8b7[_0x1dcb54(0x23e)][_0x1dcb54(0x240)][_0x1dcb54(0x218)][_0x1dcb54(0x213)](_0x2576ac[_0x1dcb54(0x1e0)]);for(const _0x3bd789 of _0x12a310)_0x8f465d=_0x36cd98[_0x1dcb54(0x1df)](_0x8f465d[_0x1dcb54(0x1b6)](_0x3bd789));return{'range':_0x8f465d,'currentIndex':_0x207ce7};}[_0x1c0dea(0x291)](_0x797ea5){const _0x2d1727=_0x1c0dea;if(!_0x797ea5[_0x2d1727(0x2a7)][_0x2d1727(0x249)](_0x2d1727(0x160)))return;const _0x357dfc=_0x797ea5[_0x2d1727(0x216)][_0x2d1727(0x297)](_0x2d1727(0x184)),_0x1bb580=_0x797ea5[_0x2d1727(0x216)][_0x2d1727(0x297)](_0x2d1727(0x250));this[_0x2d1727(0x153)](_0x357dfc,_0x2d1727(0x21e),(_0x46fe00,_0x471949,_0x27da0f)=>{const _0x12ae45=_0x2d1727,_0x14ede2=this[_0x12ae45(0x1c4)][_0x12ae45(0x297)](_0x471949);if(!_0x14ede2)return;const _0x328958=this[_0x12ae45(0x19b)][_0x12ae45(0x154)](_0x14ede2[_0x12ae45(0x23c)])[_0x12ae45(0x203)](_0x14ede2[_0x12ae45(0x242)]);_0x14ede2[_0x12ae45(0x1da)][_0x12ae45(0x237)](_0x560658=>_0x328958[_0x12ae45(0x18b)](_0x560658,_0x12ae45(0x1e6))),this[_0x12ae45(0x1c4)][_0x12ae45(0x15f)](_0x471949),this[_0x12ae45(0x1c4)][_0x12ae45(0x220)](_0x27da0f,_0x14ede2);}),this[_0x2d1727(0x153)](_0x1bb580,_0x2d1727(0x21e),(_0x48bea1,_0x5d2ed2,_0x417f64)=>{const _0x4fe5fa=_0x2d1727,_0x20e140=this[_0x4fe5fa(0x1c4)][_0x4fe5fa(0x297)](_0x5d2ed2);if(!_0x20e140)return;const _0x2b67cf=this[_0x4fe5fa(0x19b)][_0x4fe5fa(0x154)](_0x20e140[_0x4fe5fa(0x23c)])[_0x4fe5fa(0x203)](_0x20e140[_0x4fe5fa(0x242)]);_0x20e140[_0x4fe5fa(0x1da)][_0x4fe5fa(0x237)](_0x2e0249=>_0x2b67cf[_0x4fe5fa(0x18b)](_0x2e0249,_0x4fe5fa(0x1ea))),this[_0x4fe5fa(0x1c4)][_0x4fe5fa(0x15f)](_0x5d2ed2),this[_0x4fe5fa(0x1c4)][_0x4fe5fa(0x220)](_0x417f64,_0x20e140);});}async[_0x1c0dea(0x2a2)](_0x213b0a){const _0x3cab02=_0x1c0dea;this[_0x3cab02(0x243)][_0x3cab02(0x2a7)][_0x3cab02(0x297)](_0x3cc98e)[_0x3cab02(0x16d)](),this[_0x3cab02(0x166)][_0x3cab02(0x1b8)](_0x3cab02(0x26b)),this[_0x3cab02(0x166)][_0x3cab02(0x27f)](!0x0),await this[_0x3cab02(0x15a)]();try{await this[_0x3cab02(0x276)][_0x3cab02(0x194)](_0x213b0a)[_0x3cab02(0x233)](),await this[_0x3cab02(0x171)](_0x213b0a),this[_0x3cab02(0x1fd)]('\x20');const {sessionId:_0x2fe4bf}=this[_0x3cab02(0x1b3)][_0x3cab02(0x28e)]();await this[_0x3cab02(0x19b)][_0x3cab02(0x163)](_0x213b0a,_0x2fe4bf),this[_0x3cab02(0x19b)][_0x3cab02(0x1dd)]()&&this[_0x3cab02(0x19b)][_0x3cab02(0x182)](_0xe4444a(this[_0x3cab02(0x243)][_0x3cab02(0x274)],_0x3cab02(0x22d)));}catch(_0x2ca17f){this[_0x3cab02(0x166)][_0x3cab02(0x29d)]({'errorMessage':_0xe4444a(this[_0x3cab02(0x243)][_0x3cab02(0x274)],_0x3cab02(0x1e2)),'id':_0x213b0a}),this[_0x3cab02(0x17c)](new _0xde8b51(_0x3cab02(0x174),this,{'error':_0x2ca17f}));}finally{this[_0x3cab02(0x243)][_0x3cab02(0x2a7)][_0x3cab02(0x297)](_0x31b171)[_0x3cab02(0x210)][_0x3cab02(0x224)](_0x3cab02(0x1bd)),this[_0x3cab02(0x166)][_0x3cab02(0x260)](),this[_0x3cab02(0x166)][_0x3cab02(0x1b8)](_0x3cab02(0x212)),this[_0x3cab02(0x166)][_0x3cab02(0x27f)](!0x1);}}[_0x1c0dea(0x17a)](_0x8cd76d){const _0x4c4959=_0x1c0dea;this[_0x4c4959(0x19b)]['id']===_0x8cd76d&&this[_0x4c4959(0x171)]();}async[_0x1c0dea(0x1e4)](){const _0x37ccfd=_0x1c0dea,_0x324d11=this[_0x37ccfd(0x1b3)][_0x37ccfd(0x1ce)]();this[_0x37ccfd(0x19b)]?.[_0x37ccfd(0x146)](_0x324d11),this[_0x37ccfd(0x19b)]?.[_0x37ccfd(0x182)](_0xe4444a(this[_0x37ccfd(0x243)][_0x37ccfd(0x274)],_0x37ccfd(0x22d)));}[_0x1c0dea(0x16f)](){const _0x1daae2=_0x1c0dea;this[_0x1daae2(0x19b)]?.[_0x1daae2(0x167)]();}[_0x1c0dea(0x285)](){const _0xd14d68=_0x1c0dea;this[_0xd14d68(0x166)][_0xd14d68(0x285)]();}async[_0x1c0dea(0x232)](){const _0x6b7cde=_0x1c0dea;await this[_0x6b7cde(0x171)]();}async[_0x1c0dea(0x1c5)]({message:_0x387394,quickActionData:_0x14aeac}){const _0x490cd7=_0x1c0dea;await this[_0x490cd7(0x269)]({'userMessage':_0x387394,'quickActionData':_0x14aeac});}[_0x1c0dea(0x165)](){const _0x1e74af=_0x1c0dea,_0x47f271=this[_0x1e74af(0x243)][_0x1e74af(0x16b)][_0x1e74af(0x297)](_0x1e74af(0x17b));if(!_0x47f271)throw new _0xde8b51(_0x1e74af(0x281),this);return _0x47f271;}async[_0x1c0dea(0x171)](_0xaac946){const _0x2f713=_0x1c0dea;try{this[_0x2f713(0x166)][_0x2f713(0x15b)](),await this[_0x2f713(0x1ef)](_0xaac946);}catch(_0x431171){_0x30dde1(_0x2f713(0x206),_0x431171),this[_0x2f713(0x19b)]=void 0x0,this[_0x2f713(0x166)][_0x2f713(0x251)]();}}async[_0x1c0dea(0x1ef)](_0x6eb69e){const _0x2f7be9=_0x1c0dea,_0x488da7=this[_0x2f7be9(0x243)][_0x2f7be9(0x2a7)][_0x2f7be9(0x297)](_0x3cc98e);let _0x4520c4;_0x488da7[_0x2f7be9(0x168)]&&_0x488da7[_0x2f7be9(0x16d)](),_0x6eb69e||!this[_0x2f7be9(0x19b)]?_0x4520c4=this[_0x2f7be9(0x243)][_0x2f7be9(0x16b)][_0x2f7be9(0x297)](_0x2f7be9(0x263)):this[_0x2f7be9(0x166)][_0x2f7be9(0x151)]&&(_0x4520c4=this[_0x2f7be9(0x19b)][_0x2f7be9(0x2af)]['id']),await this[_0x2f7be9(0x15a)]();const _0x1be92a=this[_0x2f7be9(0x165)](),_0x2bd169=_0x6eb69e||_0x449e24();this[_0x2f7be9(0x19b)]=new _0x104747({'connector':this[_0x2f7be9(0x276)],'chatModels':this[_0x2f7be9(0x1cc)],'selectedModelId':_0x4520c4,'conversationId':_0x2bd169,'group':_0x1be92a,'getEditor':()=>_0x630f5f(this[_0x2f7be9(0x243)])}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x235),(_0x133c01,_0x226755)=>{const _0x12de3b=_0x2f7be9;this[_0x12de3b(0x166)][_0x12de3b(0x20b)](_0x226755),this[_0x12de3b(0x166)][_0x12de3b(0x275)](),this[_0x12de3b(0x166)][_0x12de3b(0x1fc)](),this[_0x12de3b(0x166)][_0x12de3b(0x257)](),_0x6eb69e||(this[_0x12de3b(0x166)][_0x12de3b(0x253)](),this[_0x12de3b(0x19b)]?.[_0x12de3b(0x182)](_0xe4444a(this[_0x12de3b(0x243)][_0x12de3b(0x274)],_0x12de3b(0x22d))));}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x201),(_0x152dbf,_0x55ccdf)=>{const _0x16a52d=_0x2f7be9;this[_0x16a52d(0x166)][_0x16a52d(0x273)](_0x55ccdf[_0x16a52d(0x148)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x1d4),(_0x5d3147,_0x3ff7d5)=>{const _0x49c38f=_0x2f7be9;this[_0x49c38f(0x166)][_0x49c38f(0x1de)](_0x3ff7d5);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x14b),()=>{const _0x53be67=_0x2f7be9;this[_0x53be67(0x166)][_0x53be67(0x16a)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x147),()=>{const _0x1aa01d=_0x2f7be9;this[_0x1aa01d(0x166)][_0x1aa01d(0x16a)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x287),(_0x935ee5,_0x57ec94)=>{const _0x41b6a9=_0x2f7be9;this[_0x41b6a9(0x166)][_0x41b6a9(0x1cd)](_0x57ec94,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x24a),(_0x5d011f,_0xe15c96)=>{const _0x483361=_0x2f7be9;this[_0x483361(0x166)][_0x483361(0x1cd)](_0xe15c96,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x187),()=>{const _0x4d655c=_0x2f7be9;this[_0x4d655c(0x166)][_0x4d655c(0x21c)]();}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x25b),async()=>{const _0x485e6a=_0x2f7be9;await this[_0x485e6a(0x166)][_0x485e6a(0x2a0)]();}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x1e7),(_0x3b7a77,_0xa186f6)=>{const _0x34982e=_0x2f7be9;this[_0x34982e(0x166)][_0x34982e(0x1a6)](_0xa186f6['id']);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x14c),(_0x320ffe,_0x50ac59,_0x3e8901)=>{const _0x20fa22=_0x2f7be9;this[_0x20fa22(0x1fd)](_0x50ac59,_0x3e8901);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x161),(_0xb840ce,_0x10bd1f)=>{const _0x2c8de3=_0x2f7be9;_0x2c8de3(0x1fb)===_0x10bd1f[_0x2c8de3(0x1c6)]?this[_0x2c8de3(0x166)][_0x2c8de3(0x193)](_0x10bd1f):this[_0x2c8de3(0x166)][_0x2c8de3(0x188)](_0x10bd1f);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x2ae),async(_0x25fa0d,_0x540c31)=>{const _0x425a93=_0x2f7be9;await this[_0x425a93(0x1ac)]({'reply':_0x540c31});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x1f7),(_0x47de61,{reply:_0x2d38cd,index:_0x132358,state:_0x1a4ac4})=>{const _0x3debf9=_0x2f7be9;this[_0x3debf9(0x166)][_0x3debf9(0x278)]({'id':_0x2d38cd['id'],'index':_0x132358,'state':_0x1a4ac4});}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x26f),(_0x481223,_0x48e54c)=>{const _0x25acbd=_0x2f7be9;if(this[_0x25acbd(0x166)][_0x25acbd(0x29c)](_0x48e54c[_0x25acbd(0x191)],_0x48e54c[_0x25acbd(0x2ad)]),_0x25acbd(0x29a)===_0x48e54c[_0x25acbd(0x191)][_0x25acbd(0x1c6)]){const _0x40da1b=[..._0x630f5f(this[_0x25acbd(0x243)])[_0x25acbd(0x23e)][_0x25acbd(0x240)][_0x25acbd(0x29a)][_0x25acbd(0x244)]()];this[_0x25acbd(0x1b3)][_0x25acbd(0x177)](_0x40da1b,_0x25acbd(0x262)+this[_0x25acbd(0x19b)]?.['id']);}}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x256),(_0x4f415b,_0x22b519)=>{const _0x5e397e=_0x2f7be9;this[_0x5e397e(0x166)][_0x5e397e(0x19d)](_0x22b519[_0x5e397e(0x176)]),_0x5e397e(0x20a)==_0x22b519[_0x5e397e(0x176)]&&this[_0x5e397e(0x16f)](),_0x5e397e(0x29a)===_0x22b519[_0x5e397e(0x1c6)]&&this[_0x5e397e(0x1b3)][_0x5e397e(0x241)](_0x5e397e(0x262)+this[_0x5e397e(0x19b)]?.['id']);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x21f),(_0x3e9d0a,_0x550cb8)=>{const _0x53a457=_0x2f7be9;this[_0x53a457(0x166)][_0x53a457(0x1d3)](_0x550cb8[_0x53a457(0x191)][_0x53a457(0x176)],_0x550cb8[_0x53a457(0x2ad)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x199),(_0xcda1c9,_0x1c03eb)=>{const _0x436501=_0x2f7be9;this[_0x436501(0x166)][_0x436501(0x149)](_0x1c03eb[_0x436501(0x223)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x279),(_0x1e213d,_0x4f916c)=>{const _0x1930cb=_0x2f7be9;this[_0x1930cb(0x166)][_0x1930cb(0x294)](_0x4f916c[_0x1930cb(0x19c)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x288),(_0x5a62cc,_0x3cd9f8)=>{const _0x363df3=_0x2f7be9;this[_0x363df3(0x166)][_0x363df3(0x155)](_0x3cd9f8[_0x363df3(0x286)],_0x3cd9f8[_0x363df3(0x19e)],_0x3cd9f8[_0x363df3(0x1f0)],_0x3cd9f8[_0x363df3(0x17e)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x2a1),(_0x5d4e95,_0x2d7b61)=>{const _0xd3fe24=_0x2f7be9;this[_0xd3fe24(0x166)][_0xd3fe24(0x19f)](_0x2d7b61[_0xd3fe24(0x286)],_0x2d7b61[_0xd3fe24(0x18a)],_0x2d7b61[_0xd3fe24(0x25c)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x1b9),(_0x57e82d,_0x3cd582)=>{const _0x3eec08=_0x2f7be9;this[_0x3eec08(0x166)][_0x3eec08(0x1ae)](_0x3cd582);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x185),(_0xa2128d,_0x55e311)=>{const _0xf7b66=_0x2f7be9;this[_0xf7b66(0x166)][_0xf7b66(0x175)](_0x55e311[_0xf7b66(0x2af)],_0x55e311[_0xf7b66(0x1f5)]);}),this[_0x2f7be9(0x19b)]['on'](_0x2f7be9(0x25d),(_0x54598a,{error:_0x46280f,interactionId:_0x3f4ce2,fileName:_0x114f8f,url:_0x4b234d,sourceId:_0x4b33cd,sourceLabel:_0x508bf8})=>{const _0x57d8cd=_0x2f7be9,_0x370041=_0x3f4ce2?_0x3f4ce2+':'+_0x449e24():_0x449e24();_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x28d))?this[_0x57d8cd(0x166)][_0x57d8cd(0x266)]({'staticMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x2b0)),'id':_0x370041}):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x197))||_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x206))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1b7)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x219))?this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x24f),_0x114f8f),'id':_0x370041}):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x22c))?this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x164),_0x4b234d),'id':_0x370041}):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x284))?this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x192)),'id':_0x370041}):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x207))?this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x239)),'id':_0x370041}):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x150))?(_0x4b33cd&&this[_0x57d8cd(0x166)][_0x57d8cd(0x1d1)](_0x4b33cd),this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1a9),_0x508bf8||_0x57d8cd(0x19e)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x268))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1cf)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x178))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1bb)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x20e))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1e9)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x190))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x214)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x1aa))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1a8)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):_0x46280f[_0x57d8cd(0x29f)][_0x57d8cd(0x280)](_0x57d8cd(0x238))?(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x1a3)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f)):(this[_0x57d8cd(0x166)][_0x57d8cd(0x29d)]({'errorMessage':_0xe4444a(this[_0x57d8cd(0x243)][_0x57d8cd(0x274)],_0x57d8cd(0x24d)),'id':_0x370041}),this[_0x57d8cd(0x17c)](_0x46280f));}),await this[_0x2f7be9(0x19b)][_0x2f7be9(0x1ab)](this[_0x2f7be9(0x243)][_0x2f7be9(0x16b)][_0x2f7be9(0x297)](_0x2f7be9(0x1c2))),_0x6eb69e||await this[_0x2f7be9(0x19b)][_0x2f7be9(0x202)]();}async[_0x1c0dea(0x269)]({userMessage:_0x571a01,quickActionData:_0x17bc18}){const _0x5e3414=_0x1c0dea;if(!this[_0x5e3414(0x19b)])throw new _0xde8b51(_0x5e3414(0x20f));this[_0x5e3414(0x19b)][_0x5e3414(0x1c9)]()&&await this[_0x5e3414(0x19b)][_0x5e3414(0x1fe)](this[_0x5e3414(0x1b3)][_0x5e3414(0x28e)]()),this[_0x5e3414(0x19b)]['id']&&this[_0x5e3414(0x19b)][_0x5e3414(0x162)]&&await this[_0x5e3414(0x19b)][_0x5e3414(0x247)]({'userMessage':_0x571a01,'quickActionData':_0x17bc18}),this[_0x5e3414(0x179)]();}[_0x1c0dea(0x179)](){const _0x4a6f6f=_0x1c0dea,_0x99991b=_0x630f5f(this[_0x4a6f6f(0x243)])[_0x4a6f6f(0x23e)],_0x3c031e=Array[_0x4a6f6f(0x272)](_0x99991b[_0x4a6f6f(0x1eb)][_0x4a6f6f(0x28f)](_0x49b4f9));_0x99991b[_0x4a6f6f(0x27b)](_0x27125e=>{const _0x47146e=_0x4a6f6f;_0x3c031e[_0x47146e(0x237)](_0x3881cd=>_0x27125e[_0x47146e(0x289)](_0x3881cd));});}[_0x1c0dea(0x1bc)](){const _0x207e4d=_0x1c0dea;console[_0x207e4d(0x1e1)](_0x207e4d(0x25e));}[_0x1c0dea(0x295)](_0xc659d8){const _0x1021f6=_0x1c0dea;this[_0x1021f6(0x166)][_0x1021f6(0x21a)](_0xc659d8);}[_0x1c0dea(0x17c)](_0xf6f25){const _0x4e5894=_0x1c0dea;_0x30dde1(_0xf6f25[_0x4e5894(0x29f)]);}[_0x1c0dea(0x1f4)](_0x1fa83d){const _0x29a8cf=_0x1c0dea;this[_0x29a8cf(0x19b)]?.[_0x29a8cf(0x22b)](_0x1fa83d);}[_0x1c0dea(0x2aa)](){const _0x14d23d=_0x1c0dea;this[_0x14d23d(0x19b)]?.[_0x14d23d(0x25a)]();}[_0x1c0dea(0x196)](){const _0x391502=_0x1c0dea;this[_0x391502(0x19b)]?.[_0x391502(0x27e)]();}[_0x1c0dea(0x152)](_0xf9ab32){const _0x194009=_0x1c0dea,[_0x5ce954,_0x52419a]=_0xf9ab32[_0x194009(0x16c)](':'),_0x297a47=this[_0x194009(0x19b)][_0x194009(0x154)](_0x5ce954),_0x3b368d=_0x297a47[_0x194009(0x203)](_0x52419a);return{'interaction':_0x297a47,'reply':_0x3b368d};}[_0x1c0dea(0x1be)](_0x561acf,_0x4f5ea5=!0x1){const _0x539912=_0x1c0dea,_0x2f804d=_0x630f5f(this[_0x539912(0x243)]),_0x17185f={'target':_0x2f804d[_0x539912(0x1ee)][_0x539912(0x210)][_0x539912(0x209)][_0x539912(0x180)](_0x2f804d[_0x539912(0x1ee)][_0x539912(0x1d9)][_0x539912(0x222)](_0x561acf)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4f5ea5};_0x4f5ea5&&(_0x17185f[_0x539912(0x24e)]=!0x0),_0x195785(_0x17185f);}[_0x1c0dea(0x1fd)](_0x150e04,_0x5b7162=!0x1){const _0x36242e=_0x1c0dea;this[_0x36242e(0x166)][_0x36242e(0x14c)](_0x150e04||_0xe4444a(this[_0x36242e(0x243)][_0x36242e(0x274)],_0x36242e(0x17d)),_0x5b7162);}async[_0x1c0dea(0x1ac)]({reply:_0xb2322d,renderingStrategy:_0x27f597}){const _0x5ada58=_0x1c0dea,{id:_0x519f9d,isDone:_0x5242c3,type:_0x140c92,parsedContent:_0x451563}=_0xb2322d;if(_0x5ada58(0x231)===_0x140c92){const _0x558b64=_0xb2322d[_0x5ada58(0x246)]({'showDiff':this[_0x5ada58(0x166)][_0x5ada58(0x1b5)]});await this[_0x5ada58(0x166)][_0x5ada58(0x1e5)]({'id':_0x519f9d,'parts':_0x558b64,'renderingStrategy':_0x27f597,'isDone':_0x5242c3});}else _0x5ada58(0x1fb)===_0x140c92&&await this[_0x5ada58(0x166)][_0x5ada58(0x259)]({'id':_0x519f9d,'parsedContent':_0x451563,'renderingStrategy':_0x27f597,'isDone':_0x5242c3});_0x5242c3&&_0xb2322d[_0x5ada58(0x208)][_0x5ada58(0x25f)]>0x0&&this[_0x5ada58(0x166)][_0x5ada58(0x1b4)](_0x519f9d,_0xb2322d[_0x5ada58(0x208)]);}async[_0x1c0dea(0x15a)](){const _0x407ce2=_0x1c0dea,_0x7e1bb3=this[_0x407ce2(0x19b)]?.[_0x407ce2(0x14a)];_0x7e1bb3&&(_0x7e1bb3[_0x407ce2(0x1c8)](),this[_0x407ce2(0x166)][_0x407ce2(0x1d5)](_0x7e1bb3));}async[_0x1c0dea(0x19a)](){const _0x997306=_0x1c0dea,_0x112e9e=this[_0x997306(0x19b)]?.[_0x997306(0x14a)];if(_0x112e9e){for await(const _0x14b8d6 of _0x112e9e[_0x997306(0x186)])await this[_0x997306(0x1ac)]({'reply':_0x14b8d6,'renderingStrategy':_0x997306(0x26b)});}}[_0x1c0dea(0x17f)](_0x268826){const _0x8eaccf=_0x1c0dea,_0x40440d={'positiveCount':_0x268826[_0x8eaccf(0x2a4)][_0x8eaccf(0x252)](_0x20d8f5=>_0x8eaccf(0x1ea)===_0x20d8f5[_0x8eaccf(0x1e3)])[_0x8eaccf(0x25f)],'totalCount':_0x268826[_0x8eaccf(0x2a4)][_0x8eaccf(0x25f)],'modificationId':_0x268826['id']},_0x523ad6=this[_0x8eaccf(0x19b)][_0x8eaccf(0x154)](_0x268826[_0x8eaccf(0x23c)])[_0x8eaccf(0x26a)];this[_0x8eaccf(0x276)][_0x8eaccf(0x293)](this[_0x8eaccf(0x19b)]['id'],_0x523ad6,_0x40440d);}}
23
+ function _0x1908(){const _0x427e6f=['AI_CHAT_CONTEXT_FILE_TOO_LARGE','getInteractionAndReplyById','_balloonShowDiff','like','filter','remove','uid','getTransformedByOperation','mouseOverSuggestion','setConversationContext','resource','updateResourceState','setIsMaximized','updateCurrentDocumentInContext','toViewRange','requires','insertSuggestion','toString','ai-chat-invalid-request','resizedTabs','getRanges','slice','activeConversation','showChangeInText','getOperations','sendUserMessage','_stopLastInteraction','contextItemRemoved','ai-chat-controller-mouse-over','ai-chat-controller-no-active-conversation','editors','_getDocumentRangeForReplyChanges','updateContent','setContextItemLoading','contextItem','getDocumentContext','getConversation','ai-chat-conversation-init-failed','uiId','interactionStarted','addFeedItemStaticMessage','modelSelected','mapper','sources','source','howMany','setFeedItemRenderingStrategy','TrackChangesEditing','has','rootName','addFeedItemUserMessage','chat','populateSourceResourceBalloon','isPremiumPlugin','1491992NmcCMA','isLoading','getRoot','setLoadingMessage','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','clearPendingContextUI','_integrateEditor','set','addOperation','_handleStartConversation','_batchToChanges','getInteraction','error','ai-chat-missing-channel-id','mouseLeaveSuggestion','fetchConversation','modification-delta','static','domConverter','delete','collaboration.channelId','showFakeVisualSelection','ai.chat.context','isInContext','viewRangeToDom','getChildren','range','_openBalloonFor','_removeAISelectionMarkers','toggleLoadingSkeleton','state','reasoningFinished','_setIsMaximized','_startConversationSafely','isDocumentOperation','interactionDestroyed','batch','hasChanges','setAddContextOptions','conversationInitialized','selectedModel','$graveyard','_toggleReasoning','full','indexOf','ai-chat-context-unsupported-file-type','replyChangeGroupStateUpdated','getContentParts','removed','changeGroups','get','_aiChatUi','model','changes','stopInteraction','getDocumentData','_aiConnector','_updateRatings','createConversation','path','isOpen','isCurrentDocumentInContext','addFeedItemAISuggestion','unshift','getChild','AI_BALLOON_HEADER_TITLE','selectModel','resources','nextSibling','activateTab','toggleReasoning','toggleWebSearch','lastInteraction','AI_CHAT_CONTEXT_INVALID_DATA','ai-chat-context-file-too-many-pages','map','7yNBZCT','applyOperation','uploadProgressChanged','message','messageId','startConversation','from','baseVersion','config','setModel','createRange','309830eZdOkj','interactionFinished','disableControls','setSelectedModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','listenTo','addFeedInteractionHeader','closeSourceResourceBalloon','_createFromRanges','index','ai-chat-context-unsupported-type','addDocumentToContext','stop','contextSent','applySuggestion','new','startAutoScroll','isOfficialPlugin','isStarted','end','234Bxmqrx','contextItems','sourceId','getMarkersGroup','pluginName','AITabs','sourcePosition','length','split','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','addSelectionToChatContext','query','abortPromptStream','AI_CHAT_GENERIC_ERROR','showNext','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','reasoningStarted','clearConversationContextUI','upsertAIChatRating','AI_CHAT_UNABLE_TO_START_CONVERSATION','_flushLastInteractionUI','_insertSuggestion','ai-chat-context-file-too-large','locale','AIConnector','replyCreated','_handleUIUserMessage','startsWith','add','toggleSuggestionDisplayMode','maxOffset','node','removeSelectionFromContext','selection','AIChatUI','getSelectionText','getPath','focusPromptInput','loadSourceResources','3624996EiGtmL','ai-chat-source-resources-load-failed','Liked\x20response','init','getDiff','ai-chat-context-form-data-size-limits-exceeded','AI_CHAT_ABORTED_MESSAGE','text-delta','removeContextItem','alignToTop','indexes','AIChatController','isUploadInProgress','marker','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','rejected','ai-chat-context-invalid-data','parse','updateFeedItemAIReplySuggestionContent','replyId','enableControls','setConversationTitle','_applyOperationsAsSuggestions','replies','ai-chat-file-upload-failed','updateFeedItemAIReplySuggestionPartState','resourceStateChanged','load','webSearchStarted','ai-chat-conversation-start-failed','undo','updateConversationTitle','close','ai-no-track-changes','getFirstRange','cloneNode','addUrlToContext','addSelectionToContext','webSearchFinished','stopListening','_toggleWebSearch','anchorId','createPositionFromPath','documentContextContent','Undo','open','resourceId','showDiff','data-id','_applySuggestion','updateCapabilities','showPrevious','resizeTabs','resetMessageInput','removeFromContext','handleUserInteraction','ai-conversation-','945750NfZYRm','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','addContextOptionsChanged','push','_aiChatModels','loadConversation','getGroupId','children','_removeFromContext','TrackChanges','resetConversationTitle','contextItemLoadingEnded','sendMessage','ai.availableReplyActions','createPositionAt','dialogClosed','startInteraction','find','commands','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','sourceResourcesLoaded','AI_CHAT_INVALID_REQUEST','afterInit','ai-chat-resource-load-failed','revert','_scrollToSuggestionRange','accepted','Disliked\x20response','ai-chat-conversation-not-found','content','getReply','log','handleRemovedConversation','contextItemAdded','capabilitiesUpdated','view','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','addFilesToContext','updateFeedItemAIReplyContent','findIndex','current-document','setIsUploadInProgress','streaming','getAttribute','removeSelectionFromChatContext','resize','ai.chat.models.displayedModels','history','updateFeedItemAIReplySources','385992pjeWEO','isModelAvailable','replyContentUpdated','interactionId','ready','ai.chat.models.defaultModelId','AI_CHAT_RESOURCE_LOAD_FAILED','addFeedItemAIReply','AI_CHAT_UNTITLED_CONVERSATION','finishInteraction','_showConversationHistory','redo','document','_aiEditing','removeFeedInteraction','interactionCreated','ai-chat-url-upload-failed','root','data','outdated','addResourceToContext','addFileToContext','change','_previewedChangeGroup','markers','type','Showing\x20conversation\x20history...','getChildAtOffset','ai-request-aborted','addCurrentDocumentToContext','scrollFeedToSuggestion','context','hideFakeVisualSelection','_updateReplyContent','removeMarker','version','addContextItem','DocumentCompare','_logError','plugins','main','rejectSuggestion','isCurrentDocumentInConversation','start','options','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','setChangeGroupState','pending','642672MPOqBH','addFeedItemError','editing','dislike','partIndex','10TEABbM','forEach','7643208qFuTRU','AIEditing','isDisabled'];_0x1908=function(){return _0x427e6f;};return _0x1908();}const _0x5f5dc3=_0x3a43;(function(_0x2c2bf1,_0x41fb56){const _0x2d229d=_0x3a43,_0x5a1e97=_0x2c2bf1();while(!![]){try{const _0x9c583=-parseInt(_0x2d229d(0x1b7))/0x1+-parseInt(_0x2d229d(0x1e8))/0x2+-parseInt(_0x2d229d(0x218))/0x3+parseInt(_0x2d229d(0x258))/0x4*(parseInt(_0x2d229d(0x21d))/0x5)+-parseInt(_0x2d229d(0x17e))/0x6+parseInt(_0x2d229d(0x138))/0x7*(parseInt(_0x2d229d(0x21f))/0x8)+-parseInt(_0x2d229d(0x157))/0x9*(-parseInt(_0x2d229d(0x143))/0xa);if(_0x9c583===_0x41fb56)break;else _0x5a1e97['push'](_0x5a1e97['shift']());}catch(_0x242c0f){_0x5a1e97['push'](_0x5a1e97['shift']());}}}(_0x1908,0x863bb));import{ContextPlugin as _0x1a3210,Editor as _0x23b274}from'ckeditor5/src/core.js';import{CKEditorError as _0x5cc404,logError as _0x2cf3bc,scrollViewportToShowTarget as _0x5dae96,uid as _0x1582f1}from'ckeditor5/src/utils.js';import{AIConnector as _0x4bdd2d}from'../aicore/aiconnector.js';function _0x3a43(_0x50c20a,_0x4a2ed0){const _0x1908cd=_0x1908();return _0x3a43=function(_0x3a43e3,_0x58b995){_0x3a43e3=_0x3a43e3-0x123;let _0x4624df=_0x1908cd[_0x3a43e3];return _0x4624df;},_0x3a43(_0x50c20a,_0x4a2ed0);}import{AITabs as _0x33adb1}from'../aitabs/aitabs.js';import{AIChatConversation as _0x47f28f}from'./model/aichatconversation.js';import{getTranslation as _0x28fa95}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0xedcbfe}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x555b82}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3a135d}from'./model/aichatmodels.js';import{getEditorFromContext as _0x518d08}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x11862a,DATA_ID_MODEL_ATTRIBUTE as _0x3d2679}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0xbff3df,getOperationsFromReply as _0x2a6de2}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x18a23d,getMinimalSelection as _0x349bed}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x33df60,_DetachOperation as _0x414068}from'ckeditor5/src/engine.js';import{findOne as _0x3aab3c,getAttribute as _0x1abf36,serialize as _0x3e6850,Document as _0x533c8a,findByAttribute as _0x3c99c5}from'../aicore/utils/htmlparser.js';import{IconAI as _0x97a899}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x307d7c}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x864511}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x1a3210{[_0x5f5dc3(0x1f5)];[_0x5f5dc3(0x124)];[_0x5f5dc3(0x28b)];[_0x5f5dc3(0x1bb)];[_0x5f5dc3(0x262)]=new Map();[_0x5f5dc3(0x1ff)]=null;[_0x5f5dc3(0x224)]=!0x1;static get[_0x5f5dc3(0x231)](){return[_0x4bdd2d,_0x864511,_0x11862a];}static get[_0x5f5dc3(0x15b)](){const _0xdadb60=_0x5f5dc3;return _0xdadb60(0x189);}static get[_0x5f5dc3(0x154)](){return!0x0;}static get[_0x5f5dc3(0x257)](){return!0x0;}[_0x5f5dc3(0x181)](){const _0xeccc70=_0x5f5dc3;this[_0xeccc70(0x124)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x16f)),this[_0xeccc70(0x28b)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x179)),this[_0xeccc70(0x1f5)]=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x220)),this[_0xeccc70(0x1bb)]=new _0x3a135d({'connector':this[_0xeccc70(0x124)],'availableModels':this[_0xeccc70(0x207)][_0xeccc70(0x140)][_0xeccc70(0x28a)](_0xeccc70(0x1e5)),'defaultModelId':this[_0xeccc70(0x207)][_0xeccc70(0x140)][_0xeccc70(0x28a)](_0xeccc70(0x1ed))});const _0x3cd514=this[_0xeccc70(0x207)][_0xeccc70(0x20f)][_0xeccc70(0x28a)](_0xeccc70(0x15c));this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x13d),()=>{const _0x4f49b9=_0xeccc70;this[_0x4f49b9(0x279)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x23b),(_0x467adc,_0x18f9bc)=>{const _0x95bc83=_0xeccc70;this[_0x95bc83(0x171)]({'userMessage':_0x18f9bc});}),this[_0xeccc70(0x148)](_0x3cd514,_0xeccc70(0x235),(_0x2e1ec0,_0x55b743)=>{const _0x110a09=_0xeccc70;this[_0x110a09(0x278)](_0x55b743);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1b2),()=>{const _0x42f17e=_0xeccc70;_0x3cd514[_0x42f17e(0x1e4)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x163),async()=>{const _0xe88b60=_0xeccc70;await this[_0xe88b60(0x23c)](),await this[_0xe88b60(0x16b)](),this[_0xe88b60(0x1e3)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x14e),()=>{const _0x3dafff=_0xeccc70;this[_0x3dafff(0x238)]?.[_0x3dafff(0x205)](_0x28fa95(this[_0x3dafff(0x207)][_0x3dafff(0x16e)],_0x3dafff(0x18c)));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1fd),(_0x2be2d4,_0x4aab71)=>{const _0x5d7d1c=_0xeccc70;this[_0x5d7d1c(0x238)]?.[_0x5d7d1c(0x1dc)](Array[_0x5d7d1c(0x13e)](_0x4aab71));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1a2),(_0x1741a7,_0x5482e1)=>{const _0x11fbf3=_0xeccc70;this[_0x11fbf3(0x238)]?.[_0x11fbf3(0x1a2)](_0x5482e1);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x1fc),(_0x27212c,_0x34428b)=>{const _0x2d565d=_0xeccc70;this[_0x2d565d(0x238)]?.[_0x2d565d(0x1fc)](_0x34428b[_0x2d565d(0x24e)],_0x34428b[_0x2d565d(0x22c)]);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x186),(_0x878422,_0x118515)=>{const _0x5c079c=_0xeccc70;this[_0x5c079c(0x1bf)](_0x118515);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x17d),(_0x33e7ef,_0x43e743)=>{const _0x244466=_0xeccc70;this[_0x244466(0x238)]?.[_0x244466(0x17d)](_0x43e743[_0x244466(0x159)],_0x43e743[_0x244466(0x162)],_0x43e743[_0x244466(0x228)]);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x133),()=>{const _0x4602f6=_0xeccc70;this[_0x4602f6(0x1a6)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x132),()=>{const _0x497d59=_0xeccc70;this[_0x497d59(0x282)]();}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x12e),(_0x2a2106,_0x2dd130)=>{const _0x2ba8ec=_0xeccc70;this[_0x2ba8ec(0x238)]?.[_0x2ba8ec(0x141)](_0x2dd130);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x225),(_0x5e5384,{replyId:_0xfdee5f})=>{const _0x308384=_0xeccc70;console[_0x308384(0x1d6)](_0x308384(0x180),_0xfdee5f);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x21b),(_0xa5e570,{replyId:_0x17b647})=>{const _0x4dfaf5=_0xeccc70;console[_0x4dfaf5(0x1d6)](_0x4dfaf5(0x1d2),_0x17b647);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x232),(_0x31803f,_0x4d1d1a)=>{const _0x1093c4=_0xeccc70;this[_0x1093c4(0x207)][_0x1093c4(0x20f)][_0x1093c4(0x28a)](_0x864511)[_0x1093c4(0x19e)](),this[_0x1093c4(0x16c)](_0x4d1d1a);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x239),(_0x504f7c,{replyId:_0x2f6cfd,partIndex:_0x2dc5ae})=>{const _0x19597e=_0xeccc70;this[_0x19597e(0x224)]=this[_0x19597e(0x28b)][_0x19597e(0x1ad)],this[_0x19597e(0x273)](_0x2f6cfd,_0x2dc5ae);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x22a),(_0x57ba59,{replyId:_0x14b156,partIndex:_0x50a00f})=>{const _0x96f021=_0xeccc70,_0x449c8b=this[_0x96f021(0x241)](_0x14b156,_0x50a00f);_0x449c8b&&_0x96f021(0x281)!=_0x449c8b[_0x96f021(0x272)][_0x96f021(0x1f9)][_0x96f021(0x253)]&&this[_0x96f021(0x1f5)][_0x96f021(0x26d)]([_0x449c8b[_0x96f021(0x272)]],_0x96f021(0x23e));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x266),()=>{const _0x13bec6=_0xeccc70;this[_0x13bec6(0x1f5)][_0x13bec6(0x208)](_0x13bec6(0x23e));}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x151),(_0x45b2e5,_0x3e8857)=>{const _0x57f43d=_0xeccc70;this[_0x57f43d(0x207)][_0x57f43d(0x20f)][_0x57f43d(0x28a)](_0x864511)[_0x57f43d(0x19e)](),this[_0x57f43d(0x1af)](_0x3e8857);}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x174),async(_0x320b27,{replyId:_0x4a0638,showDiff:_0x72755c})=>{const _0x576b60=_0xeccc70,{reply:_0x2221d7}=this[_0x576b60(0x223)](_0x4a0638),_0xc9d9b4=_0x2221d7[_0x576b60(0x287)]({'showDiff':_0x72755c});await this[_0x576b60(0x28b)][_0x576b60(0x190)]({'id':_0x2221d7['id'],'parts':_0xc9d9b4,'renderingStrategy':_0x576b60(0x269)});}),this[_0xeccc70(0x148)](this[_0xeccc70(0x28b)],_0xeccc70(0x211),(_0x311f2f,{replyId:_0x30b04d,partIndex:_0x196ee8})=>{const _0x1deb5b=_0xeccc70;this[_0x1deb5b(0x1ff)]?.[_0x1deb5b(0x191)]==_0x30b04d&&this[_0x1deb5b(0x1ff)]?.[_0x1deb5b(0x21c)]==_0x196ee8&&this[_0x1deb5b(0x207)][_0x1deb5b(0x20f)][_0x1deb5b(0x28a)](_0x864511)[_0x1deb5b(0x19e)]();const {reply:_0x5900ee}=this[_0x1deb5b(0x223)](_0x30b04d);_0x5900ee[_0x1deb5b(0x216)](_0x196ee8,_0x1deb5b(0x18d)),this[_0x1deb5b(0x1f5)][_0x1deb5b(0x208)](_0x1deb5b(0x23e));});}async[_0x5f5dc3(0x1cd)](){const _0x1e2452=_0x5f5dc3;this[_0x1e2452(0x207)]instanceof _0x23b274?this[_0x1e2452(0x25e)](this[_0x1e2452(0x207)]):this[_0x1e2452(0x148)](this[_0x1e2452(0x207)][_0x1e2452(0x240)],_0x1e2452(0x173),(_0xbafef9,_0x3f8c51)=>{const _0x5b8096=_0x1e2452;_0x3f8c51['on'](_0x5b8096(0x1ec),()=>{const _0x4c2a48=_0x5b8096;this[_0x4c2a48(0x25e)](_0x3f8c51);});}),await this[_0x1e2452(0x279)]();}[_0x5f5dc3(0x16c)](_0x30a0eb){const _0x326426=_0x5f5dc3,_0xc7554c=_0x518d08(this[_0x326426(0x207)]);if(!_0xc7554c[_0x326426(0x20f)][_0x326426(0x252)](_0x326426(0x1c0)))throw new _0x5cc404(_0x326426(0x19f),null);const _0x2d21c6=this[_0x326426(0x207)][_0x326426(0x20f)][_0x326426(0x28a)](_0x326426(0x20d)),{reply:_0x37a585,interaction:_0x56fb7e}=this[_0x326426(0x223)](_0x30a0eb[_0x326426(0x191)]),_0x2875f1=this[_0x326426(0x241)](_0x30a0eb[_0x326426(0x191)],_0x30a0eb[_0x326426(0x21c)]),_0xc1787a=void 0x0!==_0x30a0eb[_0x326426(0x21c)]?[_0x37a585[_0x326426(0x289)][_0x30a0eb[_0x326426(0x21c)]]]:_0x37a585[_0x326426(0x289)][_0x326426(0x226)](_0x41f7c6=>_0x326426(0x217)==_0x41f7c6[_0x326426(0x276)]),_0x4b22b6=_0xc1787a[_0x326426(0x137)](_0xc42df3=>_0x37a585[_0x326426(0x289)][_0x326426(0x284)](_0xc42df3));if(!_0x2875f1||_0x326426(0x281)==_0x2875f1[_0x326426(0x272)][_0x326426(0x1f9)][_0x326426(0x253)])return void _0x4b22b6[_0x326426(0x21e)](_0x3bec23=>_0x37a585[_0x326426(0x216)](_0x3bec23,_0x326426(0x1fb)));_0x4b22b6[_0x326426(0x21e)](_0x296bd1=>_0x37a585[_0x326426(0x216)](_0x296bd1,_0x326426(0x1d1)));const _0x32f6b2=_0x2a6de2({'editor':_0xc7554c,'reply':_0x37a585,'interaction':_0x56fb7e,'groups':_0xc1787a,'transform':!0x0,'documentCompare':_0x2d21c6,'documentCompareOptions':{'anchor':_0x326426(0x210),'markDeletions':!0x0}});let _0x5e9924;_0x2875f1&&this[_0x326426(0x1d0)](_0x2875f1[_0x326426(0x272)]),_0xc7554c[_0x326426(0x28c)][_0x326426(0x1fe)](_0x4acf07=>{const _0xd9c60=_0x326426;_0x5e9924=_0x4acf07[_0xd9c60(0x27c)],_0xc7554c[_0xd9c60(0x20f)][_0xd9c60(0x28a)](_0xd9c60(0x251))[_0xd9c60(0x194)](_0x32f6b2),this[_0xd9c60(0x1f5)][_0xd9c60(0x208)](_0xd9c60(0x23e));}),this[_0x326426(0x262)][_0x326426(0x25f)](_0x5e9924,{'interactionId':_0x56fb7e['id'],'replyId':_0x37a585['id'],'indexes':_0x4b22b6[_0x326426(0x237)]()}),this[_0x326426(0x125)](_0x37a585);}[_0x5f5dc3(0x1af)](_0x23029a){const _0x9f4120=_0x5f5dc3,_0x201bfd=_0x518d08(this[_0x9f4120(0x207)]),_0x3e750f=this[_0x9f4120(0x207)][_0x9f4120(0x20f)][_0x9f4120(0x28a)](_0x11862a),{reply:_0x5f5e8d,interaction:_0x4e0577}=this[_0x9f4120(0x223)](_0x23029a[_0x9f4120(0x191)]),_0x2b260d=this[_0x9f4120(0x241)](_0x23029a[_0x9f4120(0x191)],_0x23029a[_0x9f4120(0x21c)]),_0x229225=void 0x0!==_0x23029a[_0x9f4120(0x21c)]?[_0x5f5e8d[_0x9f4120(0x289)][_0x23029a[_0x9f4120(0x21c)]]]:_0x5f5e8d[_0x9f4120(0x289)][_0x9f4120(0x226)](_0x5e90bf=>_0x9f4120(0x217)==_0x5e90bf[_0x9f4120(0x276)]),_0x32d5a5=_0x229225[_0x9f4120(0x137)](_0x15b419=>_0x5f5e8d[_0x9f4120(0x289)][_0x9f4120(0x284)](_0x15b419));if(!_0x2b260d||_0x9f4120(0x281)==_0x2b260d[_0x9f4120(0x272)][_0x9f4120(0x1f9)][_0x9f4120(0x253)])return void _0x32d5a5[_0x9f4120(0x21e)](_0x1a330d=>_0x5f5e8d[_0x9f4120(0x216)](_0x1a330d,_0x9f4120(0x1fb)));_0x32d5a5[_0x9f4120(0x21e)](_0x4d434c=>_0x5f5e8d[_0x9f4120(0x216)](_0x4d434c,_0x9f4120(0x1d1)));const _0x40a36f=_0x2a6de2({'editor':_0x201bfd,'reply':_0x5f5e8d,'interaction':_0x4e0577,'groups':_0x229225,'transform':!0x0,'documentCompare':_0x3e750f,'documentCompareOptions':{'anchor':_0x9f4120(0x210),'markDeletions':!0x1}});let _0xf1e8b3;_0x2b260d&&this[_0x9f4120(0x1d0)](_0x2b260d[_0x9f4120(0x272)]),_0x201bfd[_0x9f4120(0x28c)][_0x9f4120(0x1fe)](_0xbf8d08=>{const _0x1ed228=_0x9f4120;_0xf1e8b3=_0xbf8d08[_0x1ed228(0x27c)];for(const _0xcf412a of _0x40a36f)_0xcf412a[_0x1ed228(0x13f)]=_0x201bfd[_0x1ed228(0x28c)][_0x1ed228(0x1f4)][_0x1ed228(0x20b)],_0xbff3df(_0x201bfd,_0xcf412a),_0xbf8d08[_0x1ed228(0x27c)][_0x1ed228(0x260)](_0xcf412a),_0x201bfd[_0x1ed228(0x28c)][_0x1ed228(0x139)](_0xcf412a);}),this[_0x9f4120(0x262)][_0x9f4120(0x25f)](_0xf1e8b3,{'interactionId':_0x4e0577['id'],'replyId':_0x5f5e8d['id'],'indexes':_0x32d5a5[_0x9f4120(0x237)]()}),this[_0x9f4120(0x125)](_0x5f5e8d);}[_0x5f5dc3(0x273)](_0x35c524,_0x1e9c8a){const _0x35f1d3=_0x5f5dc3,_0x1dd813=_0x518d08(this[_0x35f1d3(0x207)]),_0x1d2fbc=this[_0x35f1d3(0x241)](_0x35c524,_0x1e9c8a),_0x506934=this[_0x35f1d3(0x207)][_0x35f1d3(0x20f)][_0x35f1d3(0x28a)](_0x864511);if(!_0x1d2fbc)return void _0x506934[_0x35f1d3(0x19e)]();const {range:_0x464a71,currentIndex:_0x22206e}=_0x1d2fbc;if(_0x35f1d3(0x281)==_0x464a71[_0x35f1d3(0x1f9)][_0x35f1d3(0x253)]){const {reply:_0x2623ca}=this[_0x35f1d3(0x223)](_0x35c524);return _0x2623ca[_0x35f1d3(0x216)](_0x22206e,_0x35f1d3(0x1fb)),void _0x506934[_0x35f1d3(0x19e)]();}if(this[_0x35f1d3(0x1ff)]?.[_0x35f1d3(0x191)]==_0x35c524&&this[_0x35f1d3(0x1ff)]?.[_0x35f1d3(0x21c)]==_0x22206e)return;this[_0x35f1d3(0x1a5)](_0x506934),this[_0x35f1d3(0x1ff)]={'replyId':_0x35c524,'partIndex':_0x22206e};let _0x342c2f=_0x1dd813[_0x35f1d3(0x140)][_0x35f1d3(0x28a)](_0x35f1d3(0x1c4))||[..._0x555b82];_0x1dd813[_0x35f1d3(0x20f)][_0x35f1d3(0x252)](_0x35f1d3(0x1c0))||(_0x342c2f=_0x342c2f[_0x35f1d3(0x226)](_0x342440=>_0x35f1d3(0x232)!=_0x342440));const _0x54c5c1=new _0x307d7c(_0x1dd813[_0x35f1d3(0x16e)],{'showDiff':this[_0x35f1d3(0x224)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x35f1d3(0x283)},'hideHeader':!0x0,'availableActions':_0x342c2f});this[_0x35f1d3(0x1a5)](_0x54c5c1);const {reply:_0x2e77c0}=this[_0x35f1d3(0x223)](_0x35c524),_0x3d4eda=_0x2e77c0[_0x35f1d3(0x287)]({'showDiff':this[_0x35f1d3(0x224)]})[_0x35f1d3(0x226)](_0x5040ec=>_0x5040ec[_0x35f1d3(0x27d)]),_0xde1add=_0x3d4eda[_0x35f1d3(0x1de)](_0x50ed56=>_0x50ed56[_0x35f1d3(0x14c)]==_0x22206e);if(-0x1==_0xde1add)return;const _0x685e72=_0x3d4eda[_0xde1add],_0x2b4d4a=_0x3d4eda['at']((_0xde1add-0x1)%_0x3d4eda[_0x35f1d3(0x15e)])?.[_0x35f1d3(0x14c)],_0x1f4ee9=_0x3d4eda['at']((_0xde1add+0x1)%_0x3d4eda[_0x35f1d3(0x15e)])?.[_0x35f1d3(0x14c)];_0x54c5c1[_0x35f1d3(0x242)]({'parts':[_0x685e72],'renderingStrategy':_0x35f1d3(0x269)});const _0x455e52=_0x22206e!==_0x2b4d4a;this[_0x35f1d3(0x1d0)](_0x464a71,!0x0),_0x506934[_0x35f1d3(0x1ab)]({'index':_0x22206e,'title':_0x28fa95(this[_0x35f1d3(0x207)][_0x35f1d3(0x16e)],_0x35f1d3(0x12d),(_0xde1add+0x1)[_0x35f1d3(0x233)]()),'icon':_0x97a899,'mainView':_0x54c5c1,'showRotator':_0x455e52,'showApplyButton':!0x0,'showSuggestButton':_0x1dd813[_0x35f1d3(0x20f)][_0x35f1d3(0x252)](_0x35f1d3(0x1c0)),'ranges':[_0x464a71]}),this[_0x35f1d3(0x28b)][_0x35f1d3(0x206)](_0x35c524,_0x22206e),this[_0x35f1d3(0x148)](_0x54c5c1,_0x35f1d3(0x174),(_0x4c69a2,{showDiff:_0x27da96})=>{const _0x7ed794=_0x35f1d3;this[_0x7ed794(0x224)]=_0x27da96;const {reply:_0x4332b4}=this[_0x7ed794(0x223)](_0x35c524),_0x5ad99c=_0x4332b4[_0x7ed794(0x287)]({'showDiff':_0x27da96,'groupIndex':_0x22206e});_0x54c5c1[_0x7ed794(0x242)]({'parts':_0x5ad99c,'renderingStrategy':_0x7ed794(0x269)});}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x151),()=>{const _0x1138d8=_0x35f1d3;this[_0x1138d8(0x1af)]({'replyId':_0x35c524,'partIndex':_0x22206e}),_0x455e52?this[_0x1138d8(0x273)](_0x35c524,_0x1f4ee9):_0x506934[_0x1138d8(0x19e)]();}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x232),()=>{const _0xed8ae3=_0x35f1d3;this[_0xed8ae3(0x16c)]({'replyId':_0x35c524,'partIndex':_0x22206e}),_0x455e52?this[_0xed8ae3(0x273)](_0x35c524,_0x1f4ee9):_0x506934[_0xed8ae3(0x19e)]();}),_0x455e52&&(this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x165),()=>{const _0x374cd2=_0x35f1d3;this[_0x374cd2(0x273)](_0x35c524,_0x1f4ee9);}),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x1b1),()=>{const _0x33c673=_0x35f1d3;this[_0x33c673(0x273)](_0x35c524,_0x2b4d4a);})),this[_0x35f1d3(0x148)](_0x506934,_0x35f1d3(0x1c6),()=>{const _0x3a9da3=_0x35f1d3;this[_0x3a9da3(0x1a5)](_0x506934),this[_0x3a9da3(0x1a5)](_0x54c5c1),this[_0x3a9da3(0x1ff)]=null;});}[_0x5f5dc3(0x241)](_0x5479f1,_0xed0c20){const _0x5927d4=_0x5f5dc3,_0x156008=_0x518d08(this[_0x5927d4(0x207)]),{reply:_0x4109b4,interaction:_0x4e914a}=this[_0x5927d4(0x223)](_0x5479f1),_0x57a8a5=_0x4109b4[_0x5927d4(0x289)][_0x5927d4(0x226)](_0x4d3ff9=>_0x5927d4(0x217)==_0x4d3ff9[_0x5927d4(0x276)]),_0x311890=_0x57a8a5[_0x5927d4(0x137)](_0x63d5dc=>_0x4109b4[_0x5927d4(0x289)][_0x5927d4(0x284)](_0x63d5dc));void 0x0===_0xed0c20&&(_0xed0c20=_0x311890[0x0]);const _0x18423c=_0x311890[_0x5927d4(0x284)](_0xed0c20);if(-0x1==_0x18423c)return null;const _0x9250fb=_0x57a8a5[_0x18423c],_0x655395=new _0x533c8a([]),_0x3d19f5=new _0x533c8a([]);for(const _0x107863 of _0x9250fb[_0x5927d4(0x28d)])if(_0x5927d4(0x288)!=_0x107863[_0x5927d4(0x201)]&&_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x107863[_0x5927d4(0x176)][_0x5927d4(0x1a1)](!0x0)),_0x5927d4(0x152)!=_0x107863[_0x5927d4(0x201)]){const _0x2ed3f0=_0x3aab3c(_0x446206=>_0x1abf36(_0x446206,_0x5927d4(0x1ae))==_0x107863['id'],_0x4109b4[_0x5927d4(0x1a9)],!0x0);_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2ed3f0[_0x5927d4(0x1a1)](!0x0));}if(0x0==_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x15e)]){if(_0x9250fb[_0x5927d4(0x28d)][0x0][_0x5927d4(0x1a7)]){const _0x2b75d9=_0x3c99c5(_0x5927d4(0x1ae),_0x9250fb[_0x5927d4(0x28d)][0x0][_0x5927d4(0x1a7)],_0x4109b4[_0x5927d4(0x1a9)]);_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x12b)](_0x2b75d9[_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x12b)](_0x2b75d9[_0x5927d4(0x1a1)](!0x0)),_0x2b75d9[_0x5927d4(0x130)]&&(_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2b75d9[_0x5927d4(0x130)][_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x2b75d9[_0x5927d4(0x130)][_0x5927d4(0x1a1)](!0x0)));}else{const _0x22bf8f=_0x4109b4[_0x5927d4(0x1a9)][_0x5927d4(0x1be)][0x0];if(!_0x22bf8f)return null;_0x655395[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x22bf8f[_0x5927d4(0x1a1)](!0x0)),_0x3d19f5[_0x5927d4(0x1be)][_0x5927d4(0x1ba)](_0x22bf8f[_0x5927d4(0x1a1)](!0x0));}}const _0x2c4a7c=_0x4e914a[_0x5927d4(0x245)](),_0x58d48b=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x2c4a7c[_0x5927d4(0x1d4)]),_0x1f725d=_0x3e6850(_0x655395),_0x2aa9e1=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x1f725d),_0x22a2cb=_0x156008[_0x5927d4(0x1fa)][_0x5927d4(0x18f)](_0x1f725d),_0xbc0f6=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1c5)](_0x2aa9e1,0x0),_0x39be8a=_0x3e6850(_0x3d19f5),_0x5985f0={'anchor':_0xbc0f6,'markDeletions':!0x1},_0x1260ce=_0x156008[_0x5927d4(0x20f)][_0x5927d4(0x28a)](_0x11862a)[_0x5927d4(0x182)](_0x1f725d,_0x39be8a,_0x5985f0)[_0x5927d4(0x23a)]();if(!_0x1260ce[_0x5927d4(0x15e)])return null;_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1fe)](_0x35470e=>{const _0x2a1adc=_0x5927d4;for(const _0x13b649 of _0x1260ce)if(_0x2a1adc(0x227)==_0x13b649[_0x2a1adc(0x201)]){const _0x4b582d=_0x13b649[_0x2a1adc(0x15d)],_0x50722a=_0x13b649[_0x2a1adc(0x24f)],_0x4130e9=new _0x414068(_0x4b582d,_0x50722a);_0x35470e[_0x2a1adc(0x27c)][_0x2a1adc(0x260)](_0x4130e9),_0x156008[_0x2a1adc(0x28c)][_0x2a1adc(0x139)](_0x4130e9);}else _0x2a1adc(0x18b)!==_0x13b649[_0x2a1adc(0x201)]&&(_0x13b649[_0x2a1adc(0x13f)]=null,_0x13b649[_0x2a1adc(0x27a)]=!0x1,_0x35470e[_0x2a1adc(0x27c)][_0x2a1adc(0x260)](_0x13b649),_0x156008[_0x2a1adc(0x28c)][_0x2a1adc(0x139)](_0x13b649));});const _0x1888b8=_0x349bed(_0x156008,_0x1260ce,_0x2aa9e1);_0x18a23d(_0x156008[_0x5927d4(0x28c)],_0x1888b8);const _0x19586d=_0x1888b8[_0x5927d4(0x1a0)]()[_0x5927d4(0x213)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0xe4fbf5=_0x1888b8[_0x5927d4(0x1a0)]()[_0x5927d4(0x156)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0x5eebba=[];let _0x1b5a1c=_0x2aa9e1,_0x40cc12=_0x22a2cb;for(let _0x1215a0=0x0;_0x1215a0<_0xe4fbf5[_0x5927d4(0x15e)];_0x1215a0++){const _0x34c875=_0x1b5a1c[_0x5927d4(0x175)]-_0xe4fbf5[_0x1215a0];_0x5eebba[_0x1215a0]=_0x40cc12[_0x5927d4(0x175)]-_0x34c875,_0x1b5a1c=_0x1b5a1c[_0x5927d4(0x203)](_0xe4fbf5[_0x1215a0]),_0x40cc12=_0x40cc12[_0x5927d4(0x203)](_0x5eebba[_0x1215a0]);}const _0x5c0639=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x142)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x22a2cb,_0x19586d),_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x22a2cb,_0x5eebba)),_0x3cc179=_0x22a2cb[_0x5927d4(0x12c)](0x0)[_0x5927d4(0x1e2)](_0x3d2679),_0x433edc=Array[_0x5927d4(0x13e)](_0x58d48b[_0x5927d4(0x271)]())[_0x5927d4(0x1c8)](_0x275fbf=>_0x275fbf[_0x5927d4(0x1e2)](_0x3d2679)==_0x3cc179)[_0x5927d4(0x17b)](),_0x4c78c5=_0x5c0639[_0x5927d4(0x213)][_0x5927d4(0x127)][_0x5927d4(0x237)](),_0x3feb0c=_0x5c0639[_0x5927d4(0x156)][_0x5927d4(0x127)][_0x5927d4(0x237)]();_0x4c78c5[0x0]=_0x433edc[0x0]+_0x4c78c5[0x0],_0x3feb0c[0x0]=_0x433edc[0x0]+_0x3feb0c[0x0];let _0x560b16=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x142)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x25a)](),_0x4c78c5),_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1a8)](_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x25a)](),_0x3feb0c));const _0x2c4899=_0x156008[_0x5927d4(0x28c)][_0x5927d4(0x1f4)][_0x5927d4(0x1e6)][_0x5927d4(0x23a)](_0x2c4a7c[_0x5927d4(0x20b)]);for(const _0x11a38f of _0x2c4899)_0x560b16=_0x33df60[_0x5927d4(0x14b)](_0x560b16[_0x5927d4(0x229)](_0x11a38f));return{'range':_0x560b16,'currentIndex':_0xed0c20};}[_0x5f5dc3(0x25e)](_0x88a4cc){const _0x49222d=_0x5f5dc3;if(!_0x88a4cc[_0x49222d(0x20f)][_0x49222d(0x252)](_0x49222d(0x1aa)))return;const _0x4064e5=_0x88a4cc[_0x49222d(0x1c9)][_0x49222d(0x28a)](_0x49222d(0x19c)),_0x4ea497=_0x88a4cc[_0x49222d(0x1c9)][_0x49222d(0x28a)](_0x49222d(0x1f3));this[_0x49222d(0x148)](_0x4064e5,_0x49222d(0x1cf),(_0x502a61,_0x195732,_0x19cc31)=>{const _0x343d8c=_0x49222d,_0xb6e53d=this[_0x343d8c(0x262)][_0x343d8c(0x28a)](_0x195732);if(!_0xb6e53d)return;const _0x470ce5=this[_0x343d8c(0x238)][_0x343d8c(0x263)](_0xb6e53d[_0x343d8c(0x1eb)])[_0x343d8c(0x1d5)](_0xb6e53d[_0x343d8c(0x191)]);_0xb6e53d[_0x343d8c(0x188)][_0x343d8c(0x21e)](_0x5c5a7e=>_0x470ce5[_0x343d8c(0x216)](_0x5c5a7e,_0x343d8c(0x217))),this[_0x343d8c(0x262)][_0x343d8c(0x26b)](_0x195732),this[_0x343d8c(0x262)][_0x343d8c(0x25f)](_0x19cc31,_0xb6e53d);}),this[_0x49222d(0x148)](_0x4ea497,_0x49222d(0x1cf),(_0x31e405,_0x4abfd5,_0x2e396b)=>{const _0x407d1c=_0x49222d,_0x4b21bc=this[_0x407d1c(0x262)][_0x407d1c(0x28a)](_0x4abfd5);if(!_0x4b21bc)return;const _0x5c0437=this[_0x407d1c(0x238)][_0x407d1c(0x263)](_0x4b21bc[_0x407d1c(0x1eb)])[_0x407d1c(0x1d5)](_0x4b21bc[_0x407d1c(0x191)]);_0x4b21bc[_0x407d1c(0x188)][_0x407d1c(0x21e)](_0xdb6df1=>_0x5c0437[_0x407d1c(0x216)](_0xdb6df1,_0x407d1c(0x1d1))),this[_0x407d1c(0x262)][_0x407d1c(0x26b)](_0x4abfd5),this[_0x407d1c(0x262)][_0x407d1c(0x25f)](_0x2e396b,_0x4b21bc);});}async[_0x5f5dc3(0x1bc)](_0x42ea83){const _0x4b1144=_0x5f5dc3;this[_0x4b1144(0x207)][_0x4b1144(0x20f)][_0x4b1144(0x28a)](_0x864511)[_0x4b1144(0x19e)](),this[_0x4b1144(0x28b)][_0x4b1144(0x250)](_0x4b1144(0x269)),this[_0x4b1144(0x28b)][_0x4b1144(0x275)](!0x0),await this[_0x4b1144(0x23c)]();try{await this[_0x4b1144(0x124)][_0x4b1144(0x267)](_0x42ea83)[_0x4b1144(0x246)](),await this[_0x4b1144(0x279)](_0x42ea83),this[_0x4b1144(0x19d)]('\x20');const {sessionId:_0x4a097b}=this[_0x4b1144(0x1f5)][_0x4b1144(0x123)]();await this[_0x4b1144(0x238)][_0x4b1144(0x199)](_0x42ea83,_0x4a097b),this[_0x4b1144(0x238)][_0x4b1144(0x212)]()&&this[_0x4b1144(0x238)][_0x4b1144(0x205)](_0x28fa95(this[_0x4b1144(0x207)][_0x4b1144(0x16e)],_0x4b1144(0x18c)));}catch(_0x36839c){this[_0x4b1144(0x28b)][_0x4b1144(0x219)]({'errorMessage':_0x28fa95(this[_0x4b1144(0x207)][_0x4b1144(0x16e)],_0x4b1144(0x215)),'id':_0x42ea83}),this[_0x4b1144(0x20e)](new _0x5cc404(_0x4b1144(0x1d3),this,{'error':_0x36839c}));}finally{this[_0x4b1144(0x207)][_0x4b1144(0x20f)][_0x4b1144(0x28a)](_0x33adb1)[_0x4b1144(0x1da)][_0x4b1144(0x131)](_0x4b1144(0x255)),this[_0x4b1144(0x28b)][_0x4b1144(0x153)](),this[_0x4b1144(0x28b)][_0x4b1144(0x250)](_0x4b1144(0x1e1)),this[_0x4b1144(0x28b)][_0x4b1144(0x275)](!0x1);}}[_0x5f5dc3(0x1d7)](_0x10db5a){const _0x5d0d8a=_0x5f5dc3;this[_0x5d0d8a(0x238)]['id']===_0x10db5a&&this[_0x5d0d8a(0x279)]();}async[_0x5f5dc3(0x161)](){const _0x48162a=_0x5f5dc3,_0x2a34e9=this[_0x48162a(0x1f5)][_0x48162a(0x17a)]();this[_0x48162a(0x238)]?.[_0x48162a(0x1a3)](_0x2a34e9),this[_0x48162a(0x238)]?.[_0x48162a(0x205)](_0x28fa95(this[_0x48162a(0x207)][_0x48162a(0x16e)],_0x48162a(0x18c)));}[_0x5f5dc3(0x1e3)](){const _0x28f2b1=_0x5f5dc3;this[_0x28f2b1(0x238)]?.[_0x28f2b1(0x177)]();}[_0x5f5dc3(0x17c)](){const _0x2340df=_0x5f5dc3;this[_0x2340df(0x28b)][_0x2340df(0x17c)]();}async[_0x5f5dc3(0x13d)](){const _0x51f97d=_0x5f5dc3;await this[_0x51f97d(0x279)]();}async[_0x5f5dc3(0x1c3)]({message:_0x19017a,quickActionData:_0x4dd3e6}){const _0x4a6644=_0x5f5dc3;await this[_0x4a6644(0x171)]({'userMessage':_0x19017a,'quickActionData':_0x4dd3e6});}[_0x5f5dc3(0x1bd)](){const _0x58ecea=_0x5f5dc3,_0x39f6c9=this[_0x58ecea(0x207)][_0x58ecea(0x140)][_0x58ecea(0x28a)](_0x58ecea(0x26c));if(!_0x39f6c9)throw new _0x5cc404(_0x58ecea(0x265),this);return _0x39f6c9;}async[_0x5f5dc3(0x279)](_0x515afb){const _0x25f59d=_0x5f5dc3;try{this[_0x25f59d(0x28b)][_0x25f59d(0x192)](),await this[_0x25f59d(0x261)](_0x515afb);}catch(_0x13e8e6){this[_0x25f59d(0x28b)][_0x25f59d(0x219)]({'errorMessage':_0x28fa95(this[_0x25f59d(0x207)][_0x25f59d(0x16e)],_0x25f59d(0x16a)),'id':_0x515afb||_0x1582f1()}),console[_0x25f59d(0x264)](_0x13e8e6),this[_0x25f59d(0x238)]=void 0x0,this[_0x25f59d(0x28b)][_0x25f59d(0x145)]();}}async[_0x5f5dc3(0x261)](_0x1a9fda){const _0x56e441=_0x5f5dc3,_0x1dca9a=this[_0x56e441(0x207)][_0x56e441(0x20f)][_0x56e441(0x28a)](_0x864511);let _0x1e3e71;_0x1dca9a[_0x56e441(0x128)]&&_0x1dca9a[_0x56e441(0x19e)](),_0x1a9fda||!this[_0x56e441(0x238)]?_0x1e3e71=this[_0x56e441(0x207)][_0x56e441(0x140)][_0x56e441(0x28a)](_0x56e441(0x1ed)):this[_0x56e441(0x28b)][_0x56e441(0x1e9)]&&(_0x1e3e71=this[_0x56e441(0x238)][_0x56e441(0x280)]['id']),await this[_0x56e441(0x23c)]();const _0x57ead3=this[_0x56e441(0x1bd)](),_0x269667=_0x1a9fda||_0x1582f1();this[_0x56e441(0x238)]=new _0x47f28f({'connector':this[_0x56e441(0x124)],'chatModels':this[_0x56e441(0x1bb)],'selectedModelId':_0x1e3e71,'conversationId':_0x269667,'group':_0x57ead3,'getEditor':()=>_0x518d08(this[_0x56e441(0x207)])}),this[_0x56e441(0x238)]['on'](_0x56e441(0x27f),(_0x2664eb,_0x1b37e5)=>{const _0x28cefc=_0x56e441;this[_0x28cefc(0x28b)][_0x28cefc(0x126)](_0x1b37e5),this[_0x28cefc(0x28b)][_0x28cefc(0x1b3)](),this[_0x28cefc(0x28b)][_0x28cefc(0x25d)](),this[_0x28cefc(0x28b)][_0x28cefc(0x168)](),_0x1a9fda||(this[_0x28cefc(0x28b)][_0x28cefc(0x1c1)](),this[_0x28cefc(0x238)]?.[_0x28cefc(0x205)](_0x28fa95(this[_0x28cefc(0x207)][_0x28cefc(0x16e)],_0x28cefc(0x18c))));}),this[_0x56e441(0x238)]['on'](_0x56e441(0x13a),(_0x3b0255,_0x34790b)=>{const _0x38d76d=_0x56e441;this[_0x38d76d(0x28b)][_0x38d76d(0x1e0)](_0x34790b[_0x38d76d(0x18a)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1f7),(_0x37bf91,_0x8e7ceb)=>{const _0x448f7d=_0x56e441;this[_0x448f7d(0x28b)][_0x448f7d(0x254)](_0x8e7ceb);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x19a),()=>{const _0x557aa0=_0x56e441;this[_0x557aa0(0x28b)][_0x557aa0(0x25b)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x167),()=>{const _0x5b0764=_0x56e441;this[_0x5b0764(0x28b)][_0x5b0764(0x25b)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1a4),(_0x239ed2,_0x4a7850)=>{const _0x901069=_0x56e441;this[_0x901069(0x28b)][_0x901069(0x149)](_0x4a7850,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x277),(_0x22701a,_0x4c3add)=>{const _0x3f4f08=_0x56e441;this[_0x3f4f08(0x28b)][_0x3f4f08(0x149)](_0x4c3add,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x249),()=>{const _0x4e2d61=_0x56e441;this[_0x4e2d61(0x28b)][_0x4e2d61(0x1c7)]();}),this[_0x56e441(0x238)]['on'](_0x56e441(0x144),async()=>{const _0x538ef4=_0x56e441;await this[_0x538ef4(0x28b)][_0x538ef4(0x1f1)]();}),this[_0x56e441(0x238)]['on'](_0x56e441(0x27b),(_0x538f7c,_0x25116f)=>{const _0x277258=_0x56e441;this[_0x277258(0x28b)][_0x277258(0x1f6)](_0x25116f['id']);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x193),(_0x2b9c3b,_0x37fc97,_0x4e0f85)=>{const _0x3c64d5=_0x56e441;this[_0x3c64d5(0x19d)](_0x37fc97,_0x4e0f85);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x170),(_0x2e2975,_0x853569)=>{const _0x31266a=_0x56e441;_0x31266a(0x185)===_0x853569[_0x31266a(0x201)]?this[_0x31266a(0x28b)][_0x31266a(0x1ef)](_0x853569):this[_0x31266a(0x28b)][_0x31266a(0x12a)](_0x853569);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1ea),async(_0x477adf,_0x583571)=>{const _0x4d0c02=_0x56e441;await this[_0x4d0c02(0x209)]({'reply':_0x583571});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x286),(_0x1939ee,{reply:_0x27acf6,index:_0x4f5803,state:_0x1913e2})=>{const _0x52980e=_0x56e441;this[_0x52980e(0x28b)][_0x52980e(0x197)]({'id':_0x27acf6['id'],'index':_0x4f5803,'state':_0x1913e2});}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1d8),(_0x3a269f,_0x4d5295)=>{const _0x3c0b68=_0x56e441;if(this[_0x3c0b68(0x28b)][_0x3c0b68(0x20c)](_0x4d5295[_0x3c0b68(0x244)],_0x4d5295[_0x3c0b68(0x259)]),_0x3c0b68(0x178)===_0x4d5295[_0x3c0b68(0x244)][_0x3c0b68(0x201)]){const _0x4af833=[..._0x518d08(this[_0x3c0b68(0x207)])[_0x3c0b68(0x28c)][_0x3c0b68(0x1f4)][_0x3c0b68(0x178)][_0x3c0b68(0x236)]()];this[_0x3c0b68(0x1f5)][_0x3c0b68(0x26d)](_0x4af833,_0x3c0b68(0x1b6)+this[_0x3c0b68(0x238)]?.['id']);}}),this[_0x56e441(0x238)]['on'](_0x56e441(0x23d),(_0x8e20e0,_0x288892)=>{const _0x2c85a7=_0x56e441;this[_0x2c85a7(0x28b)][_0x2c85a7(0x186)](_0x288892[_0x2c85a7(0x248)]),_0x2c85a7(0x1df)==_0x288892[_0x2c85a7(0x248)]&&this[_0x2c85a7(0x1e3)](),_0x2c85a7(0x178)===_0x288892[_0x2c85a7(0x201)]&&this[_0x2c85a7(0x1f5)][_0x2c85a7(0x208)](_0x2c85a7(0x1b6)+this[_0x2c85a7(0x238)]?.['id']);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1c2),(_0x24e15d,_0x2ed11b)=>{const _0x1b097f=_0x56e441;this[_0x1b097f(0x28b)][_0x1b097f(0x243)](_0x2ed11b[_0x1b097f(0x244)][_0x1b097f(0x248)],_0x2ed11b[_0x1b097f(0x259)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x150),(_0x35963e,_0x439e91)=>{const _0x106a4e=_0x56e441;this[_0x106a4e(0x28b)][_0x106a4e(0x22b)](_0x439e91[_0x106a4e(0x158)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1b9),(_0x2879ba,_0x11ab69)=>{const _0x1b7c7b=_0x56e441;this[_0x1b7c7b(0x28b)][_0x1b7c7b(0x27e)](_0x11ab69[_0x1b7c7b(0x214)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1cb),(_0x1485e6,_0x17d2c2)=>{const _0x2f1f1a=_0x56e441;this[_0x2f1f1a(0x28b)][_0x2f1f1a(0x256)](_0x17d2c2[_0x2f1f1a(0x159)],_0x17d2c2[_0x2f1f1a(0x24e)],_0x17d2c2[_0x2f1f1a(0x12f)],_0x17d2c2[_0x2f1f1a(0x228)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x198),(_0x408234,_0x459d0a)=>{const _0x2a1f33=_0x56e441;this[_0x2a1f33(0x28b)][_0x2a1f33(0x22d)](_0x459d0a[_0x2a1f33(0x159)],_0x459d0a[_0x2a1f33(0x1ac)],_0x459d0a[_0x2a1f33(0x26f)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x1d9),(_0x421cf0,_0x58b59c)=>{const _0x30bfa6=_0x56e441;this[_0x30bfa6(0x28b)][_0x30bfa6(0x1b0)](_0x58b59c);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x24b),(_0x373162,_0x1919c1)=>{const _0x1ac0af=_0x56e441;this[_0x1ac0af(0x28b)][_0x1ac0af(0x146)](_0x1919c1[_0x1ac0af(0x280)],_0x1919c1[_0x1ac0af(0x221)]);}),this[_0x56e441(0x238)]['on'](_0x56e441(0x264),(_0x3df867,{error:_0x786ff4,interactionId:_0x514022,fileName:_0x54a74a,url:_0x3fc5f0,sourceId:_0xdd3d97,sourceLabel:_0x8cfd4d})=>{const _0x5b0181=_0x56e441,_0x4141a0=_0x514022?_0x514022+':'+_0x1582f1():_0x1582f1();_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x204))?this[_0x5b0181(0x28b)][_0x5b0181(0x24a)]({'staticMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x184)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x247))||_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x19b))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x16a)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x196))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x147),_0x54a74a),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x1f8))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x160),_0x3fc5f0),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x18e))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x135)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x14d))?this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1b8)),'id':_0x4141a0}):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x17f))?(_0xdd3d97&&this[_0x5b0181(0x28b)][_0x5b0181(0x14a)](_0xdd3d97),this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1ca),_0x8cfd4d||_0x5b0181(0x24e)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x1ce))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1ee)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x234))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1cc)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x285))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x166)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x16d))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x222)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x136))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x25c)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):_0x786ff4[_0x5b0181(0x13b)][_0x5b0181(0x172)](_0x5b0181(0x183))?(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x1db)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4)):(this[_0x5b0181(0x28b)][_0x5b0181(0x219)]({'errorMessage':_0x28fa95(this[_0x5b0181(0x207)][_0x5b0181(0x16e)],_0x5b0181(0x164)),'id':_0x4141a0}),this[_0x5b0181(0x20e)](_0x786ff4));}),await this[_0x56e441(0x238)][_0x56e441(0x181)](this[_0x56e441(0x207)][_0x56e441(0x140)][_0x56e441(0x28a)](_0x56e441(0x26e))),_0x1a9fda||await this[_0x56e441(0x238)][_0x56e441(0x213)]();}async[_0x5f5dc3(0x171)]({userMessage:_0x10d91f,quickActionData:_0x1d0580}){const _0x254dde=_0x5f5dc3;if(!this[_0x254dde(0x238)])throw new _0x5cc404(_0x254dde(0x23f));this[_0x254dde(0x238)][_0x254dde(0x129)]()&&await this[_0x254dde(0x238)][_0x254dde(0x22f)](this[_0x254dde(0x1f5)][_0x254dde(0x123)]()),this[_0x254dde(0x238)]['id']&&this[_0x254dde(0x238)][_0x254dde(0x155)]&&await this[_0x254dde(0x238)][_0x254dde(0x1b5)]({'userMessage':_0x10d91f,'quickActionData':_0x1d0580}),this[_0x254dde(0x274)]();}[_0x5f5dc3(0x274)](){const _0x34db0c=_0x5f5dc3,_0x19cb51=_0x518d08(this[_0x34db0c(0x207)])[_0x34db0c(0x28c)],_0xb0f49=Array[_0x34db0c(0x13e)](_0x19cb51[_0x34db0c(0x200)][_0x34db0c(0x15a)](_0xedcbfe));_0x19cb51[_0x34db0c(0x1fe)](_0x1da632=>{const _0x2d04f5=_0x34db0c;_0xb0f49[_0x2d04f5(0x21e)](_0x3089c5=>_0x1da632[_0x2d04f5(0x20a)](_0x3089c5));});}[_0x5f5dc3(0x1f2)](){const _0x5856dc=_0x5f5dc3;console[_0x5856dc(0x1d6)](_0x5856dc(0x202));}[_0x5f5dc3(0x278)](_0x20a4c0){const _0x50102a=_0x5f5dc3;this[_0x50102a(0x28b)][_0x50102a(0x22e)](_0x20a4c0);}[_0x5f5dc3(0x20e)](_0x328852){const _0x25c97b=_0x5f5dc3;_0x2cf3bc(_0x328852[_0x25c97b(0x13b)]);}[_0x5f5dc3(0x1bf)](_0x5077b8){const _0x3b5589=_0x5f5dc3;this[_0x3b5589(0x238)]?.[_0x3b5589(0x1b4)](_0x5077b8);}[_0x5f5dc3(0x1a6)](){const _0x1468a9=_0x5f5dc3;this[_0x1468a9(0x238)]?.[_0x1468a9(0x133)]();}[_0x5f5dc3(0x282)](){const _0x3ad51b=_0x5f5dc3;this[_0x3ad51b(0x238)]?.[_0x3ad51b(0x132)]();}[_0x5f5dc3(0x223)](_0x3bb4bb){const _0x5d33e1=_0x5f5dc3,[_0x523c1f,_0x329568]=_0x3bb4bb[_0x5d33e1(0x15f)](':'),_0x117d67=this[_0x5d33e1(0x238)][_0x5d33e1(0x263)](_0x523c1f),_0x23d603=_0x117d67[_0x5d33e1(0x1d5)](_0x329568);return{'interaction':_0x117d67,'reply':_0x23d603};}[_0x5f5dc3(0x1d0)](_0x45250c,_0x54750a=!0x1){const _0x588e5d=_0x5f5dc3,_0x23f127=_0x518d08(this[_0x588e5d(0x207)]),_0xfdda5c={'target':_0x23f127[_0x588e5d(0x21a)][_0x588e5d(0x1da)][_0x588e5d(0x26a)][_0x588e5d(0x270)](_0x23f127[_0x588e5d(0x21a)][_0x588e5d(0x24c)][_0x588e5d(0x230)](_0x45250c)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x54750a};_0x54750a&&(_0xfdda5c[_0x588e5d(0x187)]=!0x0),_0x5dae96(_0xfdda5c);}[_0x5f5dc3(0x19d)](_0xfb1de8,_0x1d4cac=!0x1){const _0x27fe5e=_0x5f5dc3;this[_0x27fe5e(0x28b)][_0x27fe5e(0x193)](_0xfb1de8||_0x28fa95(this[_0x27fe5e(0x207)][_0x27fe5e(0x16e)],_0x27fe5e(0x1f0)),_0x1d4cac);}async[_0x5f5dc3(0x209)]({reply:_0x564250,renderingStrategy:_0x339655}){const _0x382e17=_0x5f5dc3,{id:_0x21c1cc,isDone:_0xdae6ea,type:_0x17e8ea,parsedContent:_0x201dd8}=_0x564250;if(_0x382e17(0x268)===_0x17e8ea){const _0x1fd552=_0x564250[_0x382e17(0x287)]({'showDiff':this[_0x382e17(0x28b)][_0x382e17(0x1ad)]});await this[_0x382e17(0x28b)][_0x382e17(0x190)]({'id':_0x21c1cc,'parts':_0x1fd552,'renderingStrategy':_0x339655,'isDone':_0xdae6ea});}else _0x382e17(0x185)===_0x17e8ea&&await this[_0x382e17(0x28b)][_0x382e17(0x1dd)]({'id':_0x21c1cc,'parsedContent':_0x201dd8,'renderingStrategy':_0x339655,'isDone':_0xdae6ea});_0xdae6ea&&_0x564250[_0x382e17(0x24d)][_0x382e17(0x15e)]>0x0&&this[_0x382e17(0x28b)][_0x382e17(0x1e7)](_0x21c1cc,_0x564250[_0x382e17(0x24d)]);}async[_0x5f5dc3(0x23c)](){const _0x3987b8=_0x5f5dc3,_0x1bf50d=this[_0x3987b8(0x238)]?.[_0x3987b8(0x134)];_0x1bf50d&&(_0x1bf50d[_0x3987b8(0x14f)](),this[_0x3987b8(0x28b)][_0x3987b8(0x28e)](_0x1bf50d));}async[_0x5f5dc3(0x16b)](){const _0x593805=_0x5f5dc3,_0x3170b7=this[_0x593805(0x238)]?.[_0x593805(0x134)];if(_0x3170b7){for await(const _0x214d34 of _0x3170b7[_0x593805(0x195)])await this[_0x593805(0x209)]({'reply':_0x214d34,'renderingStrategy':_0x593805(0x269)});}}[_0x5f5dc3(0x125)](_0x43c5f9){const _0x472717=_0x5f5dc3,_0xc1bfe7={'positiveCount':_0x43c5f9[_0x472717(0x289)][_0x472717(0x226)](_0x52776e=>_0x472717(0x1d1)===_0x52776e[_0x472717(0x276)])[_0x472717(0x15e)],'totalCount':_0x43c5f9[_0x472717(0x289)][_0x472717(0x15e)],'modificationId':_0x43c5f9['id']},_0x431929=this[_0x472717(0x238)][_0x472717(0x263)](_0x43c5f9[_0x472717(0x1eb)])[_0x472717(0x13c)];this[_0x472717(0x124)][_0x472717(0x169)](this[_0x472717(0x238)]['id'],_0x431929,_0xc1bfe7);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x331da1=_0x363b;(function(_0x1a9e56,_0x4aecb3){const _0x199098=_0x363b,_0x2b425b=_0x1a9e56();while(!![]){try{const _0x87b6f5=parseInt(_0x199098(0x11c))/0x1*(-parseInt(_0x199098(0x11d))/0x2)+-parseInt(_0x199098(0xa0))/0x3*(parseInt(_0x199098(0xe0))/0x4)+parseInt(_0x199098(0xeb))/0x5*(parseInt(_0x199098(0xff))/0x6)+-parseInt(_0x199098(0x101))/0x7*(-parseInt(_0x199098(0x109))/0x8)+parseInt(_0x199098(0x10f))/0x9+-parseInt(_0x199098(0xd0))/0xa+-parseInt(_0x199098(0xd1))/0xb;if(_0x87b6f5===_0x4aecb3)break;else _0x2b425b['push'](_0x2b425b['shift']());}catch(_0x23fced){_0x2b425b['push'](_0x2b425b['shift']());}}}(_0xe230,0x3a938));import{ContextPlugin as _0x5b4a69}from'ckeditor5/src/core.js';import{_isMotionReduced as _0xf36c22}from'ckeditor5/src/utils.js';import{AIChatView as _0x88a969}from'./ui/aichatview.js';import{AITabs as _0x50e4e9}from'../aitabs/aitabs.js';import{getTranslation as _0x2b4081}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x44f840}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x53b28e}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x10d33a}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x2031a8}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x1f097f}from'../aicore/utils/geteditorfromcontext.js';function _0x363b(_0x4c8c8b,_0xa08fa3){const _0xe230a2=_0xe230();return _0x363b=function(_0x363bf3,_0x3c7017){_0x363bf3=_0x363bf3-0x7f;let _0x290270=_0xe230a2[_0x363bf3];return _0x290270;},_0x363b(_0x4c8c8b,_0xa08fa3);}import{AI_REPLY_ACTIONS as _0x290b9f}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x5b4a69{static get[_0x331da1(0x94)](){return[_0x50e4e9];}[_0x331da1(0x82)];static get[_0x331da1(0xc7)](){const _0x5a94aa=_0x331da1;return _0x5a94aa(0x10e);}static get[_0x331da1(0xef)](){return!0x0;}static get[_0x331da1(0x10b)](){return!0x0;}[_0x331da1(0xc1)]=_0x331da1(0xa1);[_0x331da1(0x8f)]=!0x0;[_0x331da1(0xac)];[_0x331da1(0xf8)];[_0x331da1(0x117)]=void 0x0;[_0x331da1(0xd7)]=!0x1;constructor(_0x4027c1){const _0x28c27d=_0x331da1;super(_0x4027c1);const _0xe23e41=this[_0x28c27d(0x102)][_0x28c27d(0xdb)][_0x28c27d(0xa7)](_0x28c27d(0xfe));this[_0x28c27d(0x11f)](_0x28c27d(0x92),!0x1),this[_0x28c27d(0xac)]=new _0x10d33a(),this[_0x28c27d(0x82)]=new _0x88a969(this[_0x28c27d(0x102)][_0x28c27d(0x116)],{'showResizeButton':_0xe23e41[_0x28c27d(0x9e)],'contextResourcesSearchInputVisibleFrom':this[_0x28c27d(0x102)][_0x28c27d(0x99)][_0x28c27d(0xa7)](_0x28c27d(0x91))}),this[_0x28c27d(0x82)][_0x28c27d(0x118)](..._0x2031a8)['to'](this),this[_0x28c27d(0x82)]['on'](_0x28c27d(0xb7),(_0x319d19,{showDiff:_0x5977b2})=>{const _0x65f06=_0x28c27d;this[_0x65f06(0x8f)]=_0x5977b2;}),_0xe23e41[_0x28c27d(0xa5)][_0x28c27d(0x81)]({'id':_0x28c27d(0xf7),'buttonLabel':_0x2b4081(this[_0x28c27d(0x102)][_0x28c27d(0x116)],_0x28c27d(0x8e)),'buttonIcon':_0x44f840,'order':0x0,'content':this[_0x28c27d(0x82)]}),this[_0x28c27d(0x82)][_0x28c27d(0xb6)][_0x28c27d(0xe5)](_0x28c27d(0xb9))['to'](this,_0x28c27d(0x92),_0x530fd5=>_0x530fd5),this[_0x28c27d(0x82)][_0x28c27d(0xfb)][_0x28c27d(0xe5)](_0x28c27d(0xb5))['to'](this,_0x28c27d(0x92),_0x27bed8=>_0x27bed8),this[_0x28c27d(0x82)][_0x28c27d(0xb6)][_0x28c27d(0x9f)](this[_0x28c27d(0x122)]()),this[_0x28c27d(0xe5)](_0x28c27d(0x98))['to'](this[_0x28c27d(0x82)][_0x28c27d(0xb6)],_0x28c27d(0x98));}[_0x331da1(0x83)](){const _0x15e8d7=_0x331da1;super[_0x15e8d7(0x83)](),this[_0x15e8d7(0x117)]&&clearInterval(this[_0x15e8d7(0x117)]);}[_0x331da1(0xd5)](_0xf1f907){const _0x1f538d=_0x331da1;this[_0x1f538d(0x82)][_0x1f538d(0xfb)][_0x1f538d(0xb8)](),this[_0x1f538d(0x82)][_0x1f538d(0xb6)][_0x1f538d(0x84)](),this[_0x1f538d(0x82)][_0x1f538d(0xb6)][_0x1f538d(0xc6)](_0xf1f907[_0x1f538d(0x8a)],!this[_0x1f538d(0x102)][_0x1f538d(0x99)][_0x1f538d(0xa7)](_0x1f538d(0xa4))),this[_0x1f538d(0xba)]({'id':_0x1f538d(0x113),'staticMessage':_0x2b4081(this[_0x1f538d(0x102)][_0x1f538d(0x116)],_0x1f538d(0x11a))});}[_0x331da1(0xba)]({id:_0x144169,staticMessage:_0x12787a}){const _0x42c1bc=_0x331da1;this[_0x42c1bc(0x82)][_0x42c1bc(0xfb)][_0x42c1bc(0x96)](_0x42c1bc(0xc0),{'id':_0x144169,'initialContent':_0x42c1bc(0xc4)+_0x12787a+_0x42c1bc(0xbb)});}[_0x331da1(0xe4)](_0x48c072){const _0x45983e=_0x331da1,_0x3f0498=_0x48c072[_0x45983e(0x11b)]?.[_0x45983e(0x103)]||_0x48c072[_0x45983e(0x87)];this[_0x45983e(0x82)][_0x45983e(0xfb)][_0x45983e(0x96)](_0x45983e(0x9d),{'contextItems':Array[_0x45983e(0x7f)](_0x48c072[_0x45983e(0xaf)][_0x45983e(0x86)]()),'initialContent':_0x45983e(0xc4)+_0x3f0498+_0x45983e(0xbb),'id':_0x48c072['id']});}[_0x331da1(0xcd)]({errorMessage:_0xa3f011,id:_0x3ca8ea}){const _0x4e2d58=_0x331da1;this[_0x4e2d58(0x82)][_0x4e2d58(0xfb)][_0x4e2d58(0x96)](_0x4e2d58(0xb4),{'initialContent':_0x4e2d58(0xc4)+_0xa3f011+_0x4e2d58(0xbb),'id':_0x3ca8ea});}[_0x331da1(0x9c)](_0x3e855b){const _0x15e9c9=_0x331da1;return this[_0x15e9c9(0xac)][_0x15e9c9(0x10c)](async()=>{const _0x5b1f62=_0x15e9c9;this[_0x5b1f62(0x82)][_0x5b1f62(0xfb)][_0x5b1f62(0x96)](_0x5b1f62(0xc0),{'id':_0x3e855b[_0x5b1f62(0x10a)]+':'+_0x3e855b['id']}),this[_0x5b1f62(0x107)](null);});}async[_0x331da1(0xaa)](_0x27c70d){const _0xc5e107=_0x331da1,_0x4b53e8=_0x1f097f(this[_0xc5e107(0x102)]);let _0x2afc47=_0x4b53e8[_0xc5e107(0x99)][_0xc5e107(0xa7)](_0xc5e107(0x124))||[..._0x290b9f];if(_0x4b53e8[_0xc5e107(0xdb)][_0xc5e107(0xdc)](_0xc5e107(0xda))){if(!this[_0xc5e107(0xd7)]){this[_0xc5e107(0xd7)]=!0x0;const _0x5e6f58=_0x4b53e8[_0xc5e107(0x11e)][_0xc5e107(0xa7)](_0xc5e107(0xf6));this[_0xc5e107(0x82)][_0xc5e107(0xfb)][_0xc5e107(0xe5)](_0xc5e107(0x115))['to'](_0x5e6f58,_0xc5e107(0xfa));}}else _0x2afc47=_0x2afc47[_0xc5e107(0x8b)](_0x4171a5=>_0xc5e107(0xd3)!=_0x4171a5);return this[_0xc5e107(0xac)][_0xc5e107(0x10c)](async()=>{const _0x90d0c8=_0xc5e107;this[_0x90d0c8(0x82)][_0x90d0c8(0xfb)][_0x90d0c8(0x96)](_0x90d0c8(0x126),{'id':_0x27c70d[_0x90d0c8(0x10a)]+':'+_0x27c70d['id'],'areActionsDisabled':_0x27c70d[_0x90d0c8(0xf1)],'showDiff':this[_0x90d0c8(0x8f)],'availableActions':_0x2afc47}),this[_0x90d0c8(0x107)](null);});}[_0x331da1(0xe2)](_0xbea4d,_0x31363e){const _0x295471=_0x331da1,_0xbf90ab=this[_0x295471(0x82)][_0x295471(0xfb)][_0x295471(0x111)][_0x295471(0xdf)];if(_0xbf90ab instanceof _0x53b28e)return this[_0x295471(0x82)][_0x295471(0xfb)][_0x295471(0x111)][_0x295471(0xcc)](_0xbf90ab),void this[_0x295471(0x82)][_0x295471(0xfb)][_0x295471(0x96)](_0x295471(0xe8),{'id':_0xbea4d['id'],'capabilities':{'isWebSearchEnabled':_0xbf90ab[_0x295471(0xed)][_0x295471(0xa8)]||_0x31363e[_0x295471(0xa8)],'isReasoningEnabled':_0xbf90ab[_0x295471(0xed)][_0x295471(0x8c)]||_0x31363e[_0x295471(0x8c)]}});this[_0x295471(0x82)][_0x295471(0xfb)][_0x295471(0x96)](_0x295471(0xe8),{'id':_0xbea4d['id'],'capabilities':_0x31363e});}[_0x331da1(0x110)](_0x250d4f){const _0x15f3c9=_0x331da1,_0xfa1578=this[_0x15f3c9(0x82)][_0x15f3c9(0xfb)][_0x15f3c9(0x111)][_0x15f3c9(0x121)](_0x1b70bc=>_0x1b70bc[_0x15f3c9(0xde)]['id']==_0x250d4f['id']&&_0x1b70bc instanceof _0x53b28e);_0xfa1578&&_0xfa1578[_0x15f3c9(0x11f)](_0x15f3c9(0x9a),_0x250d4f[_0x15f3c9(0x9a)]);}async[_0x331da1(0xf0)](_0x550ad8){const _0x205f92=_0x331da1,_0x2fa2f8=_0x550ad8[_0x205f92(0xd4)]||this[_0x205f92(0xc1)];return this[_0x205f92(0xac)][_0x205f92(0x10c)](async _0x4dd045=>{const _0x266191=_0x205f92;await this[_0x266191(0x82)][_0x266191(0xfb)][_0x266191(0x89)]({..._0x550ad8,'abortSignal':_0x4dd045,'renderingStrategy':_0x2fa2f8}),_0x550ad8[_0x266191(0x88)]&&this[_0x266191(0xc9)](_0x550ad8['id']);});}[_0x331da1(0x97)](_0x351703,_0x42a135){const _0x1e6ece=_0x331da1;this[_0x1e6ece(0x82)][_0x1e6ece(0xfb)][_0x1e6ece(0xc8)](_0x351703,_0x42a135);}async[_0x331da1(0x9b)](_0x2845c6){const _0x45e5cc=_0x331da1,_0x137836=_0x2845c6[_0x45e5cc(0xd4)]||this[_0x45e5cc(0xc1)];return this[_0x45e5cc(0xac)][_0x45e5cc(0x10c)](async _0x42dbe9=>{const _0x4485a2=_0x45e5cc;await this[_0x4485a2(0x82)][_0x4485a2(0xfb)][_0x4485a2(0xbe)]({..._0x2845c6,'abortSignal':_0x42dbe9,'renderingStrategy':_0x137836}),_0x2845c6[_0x4485a2(0x88)]&&this[_0x4485a2(0xc9)](_0x2845c6['id']);});}[_0x331da1(0x123)](_0x12cc35){const _0x3ddbdb=_0x331da1;this[_0x3ddbdb(0x82)][_0x3ddbdb(0xfb)][_0x3ddbdb(0x106)](_0x12cc35);}[_0x331da1(0xc9)](_0x23c6e9){const _0x140935=_0x331da1;this[_0x140935(0x82)][_0x140935(0xfb)][_0x140935(0xfd)](_0x23c6e9);}[_0x331da1(0xe7)](_0x1a8705){const _0x27ae17=_0x331da1;this[_0x27ae17(0x82)][_0x27ae17(0xfb)][_0x27ae17(0xc5)]()[_0x27ae17(0x8b)](_0x16367a=>_0x16367a[_0x27ae17(0xf5)](_0x1a8705))[_0x27ae17(0xc3)](_0x5566ef=>this[_0x27ae17(0x82)][_0x27ae17(0xfb)][_0x27ae17(0x105)](_0x5566ef));}[_0x331da1(0x108)](){const _0x36ce31=_0x331da1;this[_0x36ce31(0x107)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x36ce31(0x82)][_0x36ce31(0xb6)][_0x36ce31(0xfc)](!this[_0x36ce31(0x102)][_0x36ce31(0x99)][_0x36ce31(0xa7)](_0x36ce31(0xa4))),this[_0x36ce31(0x92)]=!0x0,this[_0x36ce31(0x82)][_0x36ce31(0xfb)][_0x36ce31(0xea)]();}[_0x331da1(0x120)](_0x3bc757){const _0x42e262=_0x331da1;this[_0x42e262(0xac)][_0x42e262(0x119)](),this[_0x42e262(0x82)][_0x42e262(0xfb)][_0x42e262(0xc5)]()[_0x42e262(0x8b)](_0x43a629=>_0x43a629[_0x42e262(0xf5)](_0x3bc757['id']))[_0x42e262(0xc3)](_0x19b227=>this[_0x42e262(0xc9)](_0x19b227)),this[_0x42e262(0x92)]=!0x1,this[_0x42e262(0x82)][_0x42e262(0xfb)][_0x42e262(0x114)]();}async[_0x331da1(0x100)](){const _0x47efcb=_0x331da1;return this[_0x47efcb(0xac)][_0x47efcb(0xae)][_0x47efcb(0xe1)](()=>{const _0x2c01f3=_0x47efcb;this[_0x2c01f3(0x92)]=!0x1,this[_0x2c01f3(0x82)][_0x2c01f3(0xfb)][_0x2c01f3(0x114)]();});}[_0x331da1(0xbc)](_0x23246a,_0xa930a2){const _0x37df21=_0x331da1;this[_0x37df21(0x82)][_0x37df21(0xb6)][_0x37df21(0xbc)](_0x23246a,_0xa930a2);}[_0x331da1(0xd8)](_0x1ef5de){const _0x1c6182=_0x331da1;this[_0x1c6182(0x82)][_0x1c6182(0xb6)][_0x1c6182(0xd8)](_0x1ef5de);}[_0x331da1(0xd9)](_0x1a768b,_0x372c00){const _0xc661a4=_0x331da1;this[_0xc661a4(0x82)][_0xc661a4(0xb6)][_0xc661a4(0xd9)](_0x1a768b,_0x372c00);}[_0x331da1(0x85)](_0x200907){const _0x2ef318=_0x331da1;this[_0x2ef318(0x82)][_0x2ef318(0xb6)][_0x2ef318(0x85)](_0x200907);}[_0x331da1(0xcb)](_0x1a4df7){const _0x406102=_0x331da1;this[_0x406102(0x82)][_0x406102(0xb6)][_0x406102(0xcb)](_0x1a4df7);}[_0x331da1(0xec)](){const _0xe2829=_0x331da1;this[_0xe2829(0x82)][_0xe2829(0xb6)][_0xe2829(0xec)]();}[_0x331da1(0xbf)](){const _0x379b90=_0x331da1;this[_0x379b90(0x82)][_0x379b90(0xb6)][_0x379b90(0xbf)]();}[_0x331da1(0xa3)](_0x227336,_0x3b7603,_0x121f4f){const _0x204a2e=_0x331da1;this[_0x204a2e(0x82)][_0x204a2e(0xb6)][_0x204a2e(0xa3)](_0x227336,_0x3b7603,_0x121f4f);}[_0x331da1(0xb0)](){const _0xa3f9f0=_0x331da1;this[_0xa3f9f0(0x82)][_0xa3f9f0(0xb6)][_0xa3f9f0(0xb0)](),this[_0xa3f9f0(0x82)][_0xa3f9f0(0xb6)][_0xa3f9f0(0x9f)](this[_0xa3f9f0(0x122)]());}[_0x331da1(0xe3)](_0x1cba6b){const _0x27add5=_0x331da1;this[_0x27add5(0x82)][_0x27add5(0xb6)][_0x27add5(0xe3)](_0x1cba6b);}[_0x331da1(0xd6)](_0x5a4646){const _0x2991bc=_0x331da1;this[_0x2991bc(0x82)][_0x2991bc(0xb6)][_0x2991bc(0xab)](_0x5a4646[_0x2991bc(0xa8)]),this[_0x2991bc(0x82)][_0x2991bc(0xb6)][_0x2991bc(0x104)](_0x5a4646[_0x2991bc(0x8c)]),this[_0x2991bc(0x82)][_0x2991bc(0xb6)][_0x2991bc(0x9f)](this[_0x2991bc(0x122)](_0x5a4646));}[_0x331da1(0xf3)](_0x4d18ab,_0x16b4f0){const _0x596140=_0x331da1;this[_0x596140(0x82)][_0x596140(0xb6)][_0x596140(0xee)](_0x4d18ab),_0x16b4f0&&this[_0x596140(0x82)][_0x596140(0xb6)][_0x596140(0xfc)](!0x1);}[_0x331da1(0x95)](_0x5acd2a){const _0x1c0497=_0x331da1;this[_0x1c0497(0xc1)]=_0x5acd2a;}[_0x331da1(0xa6)](_0xf4f356){const _0x57362b=_0x331da1;this[_0x57362b(0x82)][_0x57362b(0xfb)][_0x57362b(0xa6)](_0xf4f356);}[_0x331da1(0x8d)](){const _0x2e1d81=_0x331da1;this[_0x2e1d81(0xf2)](_0x2b4081(this[_0x2e1d81(0x102)][_0x2e1d81(0x116)],_0x2e1d81(0x8e)));}[_0x331da1(0xf2)](_0x1eb35a,_0x9fc9e8=!0x1){const _0x52ccbc=_0x331da1;if(_0x9fc9e8&&!_0xf36c22()&&_0x1eb35a[_0x52ccbc(0xcf)])return this[_0x52ccbc(0x82)][_0x52ccbc(0xad)][_0x52ccbc(0xd2)]='',void this[_0x52ccbc(0xf4)](_0x1eb35a);this[_0x52ccbc(0x82)][_0x52ccbc(0xad)][_0x52ccbc(0xd2)]=_0x1eb35a;}[_0x331da1(0x107)](_0x1c8cc4){const _0x3ea3b6=_0x331da1,_0x516464=this[_0x3ea3b6(0xdd)](_0x1c8cc4);this[_0x3ea3b6(0x82)][_0x3ea3b6(0xfb)][_0x3ea3b6(0x107)](_0x516464);}[_0x331da1(0xf4)](_0x21c002){const _0x21a1ef=_0x331da1;let _0x1467dd=0x0;clearInterval(this[_0x21a1ef(0x117)]),this[_0x21a1ef(0x117)]=setInterval(()=>{const _0x2da4f3=_0x21a1ef;this[_0x2da4f3(0x82)][_0x2da4f3(0xad)][_0x2da4f3(0xd2)]=this[_0x2da4f3(0x82)][_0x2da4f3(0xad)][_0x2da4f3(0xd2)]+_0x21c002[_0x1467dd],_0x1467dd++,_0x1467dd===_0x21c002[_0x2da4f3(0xcf)]&&clearInterval(this[_0x2da4f3(0x117)]);},0x1e);}[_0x331da1(0xe6)](_0x25c090){const _0x512dcd=_0x331da1;this[_0x512dcd(0x82)][_0x512dcd(0xad)][_0x512dcd(0x125)]=_0x25c090;}[_0x331da1(0xdd)](_0x51294a){const _0x49a047=_0x331da1;return _0x51294a?_0x51294a[_0x49a047(0xa8)]&&_0x51294a[_0x49a047(0x8c)]?_0x2b4081(this[_0x49a047(0x102)][_0x49a047(0x116)],_0x49a047(0xb1)):_0x51294a[_0x49a047(0xa8)]?_0x2b4081(this[_0x49a047(0x102)][_0x49a047(0x116)],_0x49a047(0xce)):_0x51294a[_0x49a047(0x8c)]?_0x2b4081(this[_0x49a047(0x102)][_0x49a047(0x116)],_0x49a047(0x90)):_0x2b4081(this[_0x49a047(0x102)][_0x49a047(0x116)],_0x49a047(0xb2)):'';}[_0x331da1(0x122)](_0x724e13){const _0x10aff5=_0x331da1;return _0x724e13?_0x724e13[_0x10aff5(0xa8)]&&_0x724e13[_0x10aff5(0x8c)]?_0x2b4081(this[_0x10aff5(0x102)][_0x10aff5(0x116)],_0x10aff5(0xf9)):_0x724e13[_0x10aff5(0xa8)]?_0x2b4081(this[_0x10aff5(0x102)][_0x10aff5(0x116)],_0x10aff5(0xc2)):_0x724e13[_0x10aff5(0x8c)]?_0x2b4081(this[_0x10aff5(0x102)][_0x10aff5(0x116)],_0x10aff5(0xa9)):_0x2b4081(this[_0x10aff5(0x102)][_0x10aff5(0x116)],_0x10aff5(0xe9)):_0x2b4081(this[_0x10aff5(0x102)][_0x10aff5(0x116)],_0x10aff5(0xe9));}[_0x331da1(0xa2)](_0x2c842c,_0xa7eae3,_0x146c4e,_0x54006f){const _0x1832d9=_0x331da1;this[_0x1832d9(0x82)][_0x1832d9(0xa2)](_0x2c842c,_0xa7eae3,_0x146c4e,_0x54006f);}[_0x331da1(0x10d)](_0x191ce9){const _0x113118=_0x331da1;this[_0x113118(0x82)][_0x113118(0x10d)](_0x191ce9);}[_0x331da1(0x93)](){const _0x105a21=_0x331da1;this[_0x105a21(0x82)][_0x105a21(0xb6)][_0x105a21(0x93)]();}[_0x331da1(0xb3)](_0x54e9ee,_0x2cb79f){const _0x4b2c56=_0x331da1;this[_0x4b2c56(0x82)][_0x4b2c56(0xfb)][_0x4b2c56(0xbd)](_0x54e9ee,_0x2cb79f);}[_0x331da1(0xea)](){const _0xcf07a2=_0x331da1;this[_0xcf07a2(0x82)][_0xcf07a2(0xfb)][_0xcf07a2(0xea)]();}[_0x331da1(0x80)](){const _0x254318=_0x331da1;this[_0x254318(0x82)][_0x254318(0xb6)][_0x254318(0xca)]=!0x0;}[_0x331da1(0x112)](){const _0x422acd=_0x331da1;this[_0x422acd(0x82)][_0x422acd(0xb6)][_0x422acd(0xca)]=!0x1;}}function _0xe230(){const _0x3f4b64=['ai-reply','feedItemRenderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','forEach','<p>','getItemIds','setModelList','pluginName','updateWebSources','markFeedItemAsDone','isDisabled','setConversationContext','remove','addFeedItemError','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','length','856530SBFXnc','5416620RPoZpD','label','insertSuggestion','renderingStrategy','createConversation','updateCapabilities','_isTrackChangesCommandValueBound','removeContextItem','setContextItemLoading','TrackChanges','plugins','has','_getLoadingMessage','options','last','665032NdkCfh','then','addFeedInteractionHeader','setAddContextOptions','addFeedItemUserMessage','bind','setIsMaximized','removeFeedInteraction','interaction-header','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','startAutoScroll','50KUwXqw','clearPendingContextUI','capabilities','setModel','isOfficialPlugin','updateFeedItemAIReplyContent','areActionsDisabled','setConversationTitle','setSelectedModel','_animateConversationTitle','startsWith','trackChanges','chat','_interactionPromiseResolver','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','value','chatFeed','disableModelSelector','markItemAsDone','AITabs','233886SeUGNn','finishInteraction','96775wyUKEf','context','displayedPrompt','setReasoning','removeItem','updateSuggestionPartState','setLoadingMessage','startInteraction','208lfDJJP','interactionId','isPremiumPlugin','enqueue','closeSourceResourceBalloon','AIChatUI','3528009QnwCqK','updateFeedInteractionHeader','children','enableControls','conversation-start','stopAutoScroll','isTrackChangesOn','locale','_titleAnimationInterval','delegate','abort','AI_CHAT_WELCOME_MESSAGE','quickActionData','26167pZjKYu','12QThpPk','commands','set','stopInteraction','find','_getInputPlaceholder','updateFeedItemAIReplySuggestionPartState','ai.availableReplyActions','isMaximized','ai-suggestion-reply','from','disableControls','addTab','_view','destroy','enableModelSelector','setIsUploadInProgress','values','userMessage','isDone','updateReplyItem','availableModels','filter','isReasoningEnabled','resetConversationTitle','AI_CHAT_HEADING','showDiff','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','ai.chat.context.searchInputVisibleFrom','isBusy','focusPromptInput','requires','setFeedItemRenderingStrategy','addItem','updateFeedItemAIReplySources','isModelAvailable','config','isVisible','updateFeedItemAIReplySuggestionContent','addFeedItemAIReply','user-message','showResizeButton','setInputPlaceholder','3MJOims','streaming','populateSourceResourceBalloon','updateResourceState','ai.chat.models.modelSelectorAlwaysVisible','view','toggleLoadingSkeleton','get','isWebSearchEnabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','addFeedItemAISuggestion','setWebSearch','_promiseQueue','chatHeader','queueEmptyPromise','contextItems','resetMessageInput','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','scrollFeedToSuggestion','error-message','isPending','chatControls','toggleSuggestionDisplayMode','clear','isLoading','addFeedItemStaticMessage','</p>','addContextItem','scrollToSuggestion','updateSuggestionItem','clearConversationContextUI'];_0xe230=function(){return _0x3f4b64;};return _0xe230();}
23
+ const _0x131c27=_0x2307;(function(_0x3979a0,_0x2f4aef){const _0x546889=_0x2307,_0x27ec12=_0x3979a0();while(!![]){try{const _0x2a3b6f=-parseInt(_0x546889(0x1d3))/0x1+parseInt(_0x546889(0x1cf))/0x2+parseInt(_0x546889(0x1d2))/0x3*(parseInt(_0x546889(0x221))/0x4)+parseInt(_0x546889(0x1b4))/0x5+parseInt(_0x546889(0x1b1))/0x6+-parseInt(_0x546889(0x1b8))/0x7*(parseInt(_0x546889(0x222))/0x8)+-parseInt(_0x546889(0x1f2))/0x9;if(_0x2a3b6f===_0x2f4aef)break;else _0x27ec12['push'](_0x27ec12['shift']());}catch(_0x231ca0){_0x27ec12['push'](_0x27ec12['shift']());}}}(_0x2df1,0x44aa9));import{ContextPlugin as _0x420470}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x43525b}from'ckeditor5/src/utils.js';function _0x2307(_0x4d3e97,_0x5d8ac1){const _0x2df1ee=_0x2df1();return _0x2307=function(_0x2307ed,_0x3e5a83){_0x2307ed=_0x2307ed-0x185;let _0x4294bd=_0x2df1ee[_0x2307ed];return _0x4294bd;},_0x2307(_0x4d3e97,_0x5d8ac1);}import{AIChatView as _0x4d4700}from'./ui/aichatview.js';import{AITabs as _0x460375}from'../aitabs/aitabs.js';import{getTranslation as _0x1ba9bd}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x22b432}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5598d7}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x300ef5}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3f2091}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x2df1(){const _0x1572ca=['startsWith','value','quickActionData','</p>','setWebSearch','enableModelSelector','resetMessageInput','_isTrackChangesCommandValueBound','toggleSuggestionDisplayMode','ai.chat.context.searchInputVisibleFrom','contextItems','queueEmptyPromise','plugins','_animateConversationTitle','ai.chat.models.modelSelectorAlwaysVisible','bind','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','availableModels','ai-suggestion-reply','isPending','addFeedItemAISuggestion','commands','setSelectedModel','_view','updateWebSources','closeSourceResourceBalloon','addFeedItemUserMessage','scrollFeedToSuggestion','addItem','setInputPlaceholder','children','3340326XwBSNo','chatHeader','createConversation','1466900Eiohun','isTrackChangesOn','removeContextItem','filter','376194RvcBVY','AIChatUI','stopInteraction','set','chat','startAutoScroll','setLoadingMessage','toggleLoadingSkeleton','addFeedItemAIReply','updateResourceState','isMaximized','isOfficialPlugin','clearPendingContextUI','ai.availableReplyActions','streaming','removeFeedInteraction','areActionsDisabled','isWebSearchEnabled','remove','setAddContextOptions','context','updateCapabilities','resetConversationTitle','844882lCLHRf','clearConversationContextUI','requires','27lUzlUA','229202YKuawQ','setModelList','addFeedInteractionHeader','_getLoadingMessage','displayedPrompt','delegate','length','chatFeed','renderingStrategy','setModel','updateFeedInteractionHeader','insertSuggestion','removeItem','showDiff','has','markItemAsDone','AITabs','_promiseQueue','setConversationTitle','updateFeedItemAIReplySources','get','error-message','updateFeedItemAIReplySuggestionPartState','updateReplyItem','pluginName','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','setFeedItemRenderingStrategy','isPremiumPlugin','markFeedItemAsDone','ai-reply','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','2128968gqLgSx','startInteraction','user-message','addTab','interaction-header','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','TrackChanges','isLoading','populateSourceResourceBalloon','updateFeedItemAIReplySuggestionContent','userMessage','disableModelSelector','isVisible','isDone','conversation-start','chatControls','AI_CHAT_WELCOME_MESSAGE','values','isBusy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','updateSuggestionPartState','getItemIds','finishInteraction','addFeedItemStaticMessage','scrollToSuggestion','label','isDisabled','trackChanges','showResizeButton','view','destroy','last','setContextItemLoading','AI_CHAT_HEADING','clear','stopAutoScroll','options','addContextItem','isReasoningEnabled','capabilities','from','_getInputPlaceholder','disableControls','enqueue','find','_interactionPromiseResolver','updateSuggestionItem','5284NEsmaA','80NCbWmO','addFeedItemError','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','abort','_titleAnimationInterval','feedItemRenderingStrategy','interactionId','locale','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setConversationContext','focusPromptInput','then','isModelAvailable','forEach','updateFeedItemAIReplyContent','setIsUploadInProgress','setIsMaximized','setReasoning','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','<p>','config','enableControls'];_0x2df1=function(){return _0x1572ca;};return _0x2df1();}import{getEditorFromContext as _0x3566ff}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x424639}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x420470{static get[_0x131c27(0x1d1)](){return[_0x460375];}[_0x131c27(0x1a9)];static get[_0x131c27(0x1eb)](){const _0x9aef64=_0x131c27;return _0x9aef64(0x1b9);}static get[_0x131c27(0x1c3)](){return!0x0;}static get[_0x131c27(0x1ee)](){return!0x0;}[_0x131c27(0x227)]=_0x131c27(0x1c6);[_0x131c27(0x1e0)]=!0x0;[_0x131c27(0x1e4)];[_0x131c27(0x21f)];[_0x131c27(0x226)]=void 0x0;[_0x131c27(0x199)]=!0x1;constructor(_0x25ac81){const _0x83618b=_0x131c27;super(_0x25ac81);const _0x2b937b=this[_0x83618b(0x1cc)][_0x83618b(0x19e)][_0x83618b(0x1e7)](_0x83618b(0x1e3));this[_0x83618b(0x1bb)](_0x83618b(0x204),!0x1),this[_0x83618b(0x1e4)]=new _0x300ef5(),this[_0x83618b(0x1a9)]=new _0x4d4700(this[_0x83618b(0x1cc)][_0x83618b(0x229)],{'showResizeButton':_0x2b937b[_0x83618b(0x20e)],'contextResourcesSearchInputVisibleFrom':this[_0x83618b(0x1cc)][_0x83618b(0x190)][_0x83618b(0x1e7)](_0x83618b(0x19b))}),this[_0x83618b(0x1a9)][_0x83618b(0x1d8)](..._0x3f2091)['to'](this),this[_0x83618b(0x1a9)]['on'](_0x83618b(0x19a),(_0x394d21,{showDiff:_0x33b253})=>{const _0x4418d6=_0x83618b;this[_0x4418d6(0x1e0)]=_0x33b253;}),_0x2b937b[_0x83618b(0x20f)][_0x83618b(0x1f5)]({'id':_0x83618b(0x1bc),'buttonLabel':_0x1ba9bd(this[_0x83618b(0x1cc)][_0x83618b(0x229)],_0x83618b(0x213)),'buttonIcon':_0x22b432,'order':0x0,'content':this[_0x83618b(0x1a9)]}),this[_0x83618b(0x1a9)][_0x83618b(0x201)][_0x83618b(0x1a1)](_0x83618b(0x1f9))['to'](this,_0x83618b(0x204),_0x453c62=>_0x453c62),this[_0x83618b(0x1a9)][_0x83618b(0x1da)][_0x83618b(0x1a1)](_0x83618b(0x1a5))['to'](this,_0x83618b(0x204),_0x130d6c=>_0x130d6c),this[_0x83618b(0x1a9)][_0x83618b(0x201)][_0x83618b(0x1af)](this[_0x83618b(0x21b)]()),this[_0x83618b(0x1a1)](_0x83618b(0x188))['to'](this[_0x83618b(0x1a9)][_0x83618b(0x201)],_0x83618b(0x188));}[_0x131c27(0x210)](){const _0x3aae57=_0x131c27;super[_0x3aae57(0x210)](),this[_0x3aae57(0x226)]&&clearInterval(this[_0x3aae57(0x226)]);}[_0x131c27(0x1b3)](_0x2a62d7){const _0x55b233=_0x131c27;this[_0x55b233(0x1a9)][_0x55b233(0x1da)][_0x55b233(0x214)](),this[_0x55b233(0x1a9)][_0x55b233(0x201)][_0x55b233(0x197)](),this[_0x55b233(0x1a9)][_0x55b233(0x201)][_0x55b233(0x1d4)](_0x2a62d7[_0x55b233(0x1a3)],!this[_0x55b233(0x1cc)][_0x55b233(0x190)][_0x55b233(0x1e7)](_0x55b233(0x1a0))),this[_0x55b233(0x209)]({'id':_0x55b233(0x200),'staticMessage':_0x1ba9bd(this[_0x55b233(0x1cc)][_0x55b233(0x229)],_0x55b233(0x202))});}[_0x131c27(0x209)]({id:_0x4ab7ac,staticMessage:_0x27eb77}){const _0x26a769=_0x131c27;this[_0x26a769(0x1a9)][_0x26a769(0x1da)][_0x26a769(0x1ae)](_0x26a769(0x1f0),{'id':_0x4ab7ac,'initialContent':_0x26a769(0x18f)+_0x27eb77+_0x26a769(0x195)});}[_0x131c27(0x1ac)](_0x3b5c1c){const _0x5f4418=_0x131c27,_0x497ecf=_0x3b5c1c[_0x5f4418(0x194)]?.[_0x5f4418(0x1d7)]||_0x3b5c1c[_0x5f4418(0x1fc)];this[_0x5f4418(0x1a9)][_0x5f4418(0x1da)][_0x5f4418(0x1ae)](_0x5f4418(0x1f4),{'contextItems':Array[_0x5f4418(0x21a)](_0x3b5c1c[_0x5f4418(0x19c)][_0x5f4418(0x203)]()),'initialContent':_0x5f4418(0x18f)+_0x497ecf+_0x5f4418(0x195),'id':_0x3b5c1c['id']});}[_0x131c27(0x223)]({errorMessage:_0x2bae81,id:_0x25f984}){const _0x154c62=_0x131c27;this[_0x154c62(0x1a9)][_0x154c62(0x1da)][_0x154c62(0x1ae)](_0x154c62(0x1e8),{'initialContent':_0x154c62(0x18f)+_0x2bae81+_0x154c62(0x195),'id':_0x25f984});}[_0x131c27(0x1c0)](_0x5cb3b7){const _0xca6ef9=_0x131c27;return this[_0xca6ef9(0x1e4)][_0xca6ef9(0x21d)](async()=>{const _0x5ef6c4=_0xca6ef9;this[_0x5ef6c4(0x1a9)][_0x5ef6c4(0x1da)][_0x5ef6c4(0x1ae)](_0x5ef6c4(0x1f0),{'id':_0x5cb3b7[_0x5ef6c4(0x228)]+':'+_0x5cb3b7['id']}),this[_0x5ef6c4(0x1be)](null);});}async[_0x131c27(0x1a6)](_0x263806){const _0x41517e=_0x131c27,_0x2b0553=_0x3566ff(this[_0x41517e(0x1cc)]);let _0x94e7e=_0x2b0553[_0x41517e(0x190)][_0x41517e(0x1e7)](_0x41517e(0x1c5))||[..._0x424639];if(_0x2b0553[_0x41517e(0x19e)][_0x41517e(0x1e1)](_0x41517e(0x1f8))){if(!this[_0x41517e(0x199)]){this[_0x41517e(0x199)]=!0x0;const _0x248f5c=_0x2b0553[_0x41517e(0x1a7)][_0x41517e(0x1e7)](_0x41517e(0x20d));this[_0x41517e(0x1a9)][_0x41517e(0x1da)][_0x41517e(0x1a1)](_0x41517e(0x1b5))['to'](_0x248f5c,_0x41517e(0x193));}}else _0x94e7e=_0x94e7e[_0x41517e(0x1b7)](_0x49c870=>_0x41517e(0x1de)!=_0x49c870);return this[_0x41517e(0x1e4)][_0x41517e(0x21d)](async()=>{const _0x51765b=_0x41517e;this[_0x51765b(0x1a9)][_0x51765b(0x1da)][_0x51765b(0x1ae)](_0x51765b(0x1a4),{'id':_0x263806[_0x51765b(0x228)]+':'+_0x263806['id'],'areActionsDisabled':_0x263806[_0x51765b(0x1c8)],'showDiff':this[_0x51765b(0x1e0)],'availableActions':_0x94e7e}),this[_0x51765b(0x1be)](null);});}[_0x131c27(0x1d5)](_0x8050c3,_0x3bc9c7){const _0x29dc05=_0x131c27,_0x1e03af=this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1b0)][_0x29dc05(0x211)];if(_0x1e03af instanceof _0x5598d7)return this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1b0)][_0x29dc05(0x1ca)](_0x1e03af),void this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1ae)](_0x29dc05(0x1f6),{'id':_0x8050c3['id'],'capabilities':{'isWebSearchEnabled':_0x1e03af[_0x29dc05(0x219)][_0x29dc05(0x1c9)]||_0x3bc9c7[_0x29dc05(0x1c9)],'isReasoningEnabled':_0x1e03af[_0x29dc05(0x219)][_0x29dc05(0x218)]||_0x3bc9c7[_0x29dc05(0x218)]}});this[_0x29dc05(0x1a9)][_0x29dc05(0x1da)][_0x29dc05(0x1ae)](_0x29dc05(0x1f6),{'id':_0x8050c3['id'],'capabilities':_0x3bc9c7});}[_0x131c27(0x1dd)](_0x3af63e){const _0x1c33c6=_0x131c27,_0x23ba73=this[_0x1c33c6(0x1a9)][_0x1c33c6(0x1da)][_0x1c33c6(0x1b0)][_0x1c33c6(0x21e)](_0x50a274=>_0x50a274[_0x1c33c6(0x216)]['id']==_0x3af63e['id']&&_0x50a274 instanceof _0x5598d7);_0x23ba73&&_0x23ba73[_0x1c33c6(0x1bb)](_0x1c33c6(0x1fe),_0x3af63e[_0x1c33c6(0x1fe)]);}async[_0x131c27(0x18a)](_0x51e4b0){const _0xb5c64f=_0x131c27,_0x510054=_0x51e4b0[_0xb5c64f(0x1db)]||this[_0xb5c64f(0x227)];return this[_0xb5c64f(0x1e4)][_0xb5c64f(0x21d)](async _0x24ffe6=>{const _0x5a8d2e=_0xb5c64f;await this[_0x5a8d2e(0x1a9)][_0x5a8d2e(0x1da)][_0x5a8d2e(0x1ea)]({..._0x51e4b0,'abortSignal':_0x24ffe6,'renderingStrategy':_0x510054}),_0x51e4b0[_0x5a8d2e(0x1ff)]&&this[_0x5a8d2e(0x1ef)](_0x51e4b0['id']);});}[_0x131c27(0x1e6)](_0x28042f,_0xc71af6){const _0x481889=_0x131c27;this[_0x481889(0x1a9)][_0x481889(0x1da)][_0x481889(0x1aa)](_0x28042f,_0xc71af6);}async[_0x131c27(0x1fb)](_0x2730a4){const _0x517d91=_0x131c27,_0x1bda93=_0x2730a4[_0x517d91(0x1db)]||this[_0x517d91(0x227)];return this[_0x517d91(0x1e4)][_0x517d91(0x21d)](async _0x25011d=>{const _0x50c4b5=_0x517d91;await this[_0x50c4b5(0x1a9)][_0x50c4b5(0x1da)][_0x50c4b5(0x220)]({..._0x2730a4,'abortSignal':_0x25011d,'renderingStrategy':_0x1bda93}),_0x2730a4[_0x50c4b5(0x1ff)]&&this[_0x50c4b5(0x1ef)](_0x2730a4['id']);});}[_0x131c27(0x1e9)](_0x4c814b){const _0x81b2d3=_0x131c27;this[_0x81b2d3(0x1a9)][_0x81b2d3(0x1da)][_0x81b2d3(0x206)](_0x4c814b);}[_0x131c27(0x1ef)](_0x56111e){const _0x5eb86b=_0x131c27;this[_0x5eb86b(0x1a9)][_0x5eb86b(0x1da)][_0x5eb86b(0x1e2)](_0x56111e);}[_0x131c27(0x1c7)](_0x38152b){const _0x49a19b=_0x131c27;this[_0x49a19b(0x1a9)][_0x49a19b(0x1da)][_0x49a19b(0x207)]()[_0x49a19b(0x1b7)](_0x44ca78=>_0x44ca78[_0x49a19b(0x192)](_0x38152b))[_0x49a19b(0x189)](_0x48ceda=>this[_0x49a19b(0x1a9)][_0x49a19b(0x1da)][_0x49a19b(0x1df)](_0x48ceda));}[_0x131c27(0x1f3)](){const _0x502fb8=_0x131c27;this[_0x502fb8(0x1be)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x502fb8(0x1a9)][_0x502fb8(0x201)][_0x502fb8(0x1fd)](!this[_0x502fb8(0x1cc)][_0x502fb8(0x190)][_0x502fb8(0x1e7)](_0x502fb8(0x1a0))),this[_0x502fb8(0x204)]=!0x0,this[_0x502fb8(0x1a9)][_0x502fb8(0x1da)][_0x502fb8(0x1bd)]();}[_0x131c27(0x1ba)](_0x551000){const _0x2cd798=_0x131c27;this[_0x2cd798(0x1e4)][_0x2cd798(0x225)](),this[_0x2cd798(0x1a9)][_0x2cd798(0x1da)][_0x2cd798(0x207)]()[_0x2cd798(0x1b7)](_0x276e7c=>_0x276e7c[_0x2cd798(0x192)](_0x551000['id']))[_0x2cd798(0x189)](_0x2f51d2=>this[_0x2cd798(0x1ef)](_0x2f51d2)),this[_0x2cd798(0x204)]=!0x1,this[_0x2cd798(0x1a9)][_0x2cd798(0x1da)][_0x2cd798(0x215)]();}async[_0x131c27(0x208)](){const _0x99643=_0x131c27;return this[_0x99643(0x1e4)][_0x99643(0x19d)][_0x99643(0x187)](()=>{const _0x1c5048=_0x99643;this[_0x1c5048(0x204)]=!0x1,this[_0x1c5048(0x1a9)][_0x1c5048(0x1da)][_0x1c5048(0x215)]();});}[_0x131c27(0x217)](_0x18f134,_0x2aa1b6){const _0x15e8c7=_0x131c27;this[_0x15e8c7(0x1a9)][_0x15e8c7(0x201)][_0x15e8c7(0x217)](_0x18f134,_0x2aa1b6);}[_0x131c27(0x1b6)](_0x1d5f7c){const _0x30b525=_0x131c27;this[_0x30b525(0x1a9)][_0x30b525(0x201)][_0x30b525(0x1b6)](_0x1d5f7c);}[_0x131c27(0x212)](_0x428805,_0xccc7d1){const _0x481523=_0x131c27;this[_0x481523(0x1a9)][_0x481523(0x201)][_0x481523(0x212)](_0x428805,_0xccc7d1);}[_0x131c27(0x18b)](_0x52c72d){const _0x5ee84d=_0x131c27;this[_0x5ee84d(0x1a9)][_0x5ee84d(0x201)][_0x5ee84d(0x18b)](_0x52c72d);}[_0x131c27(0x185)](_0x128b63){const _0x358ec9=_0x131c27;this[_0x358ec9(0x1a9)][_0x358ec9(0x201)][_0x358ec9(0x185)](_0x128b63);}[_0x131c27(0x1c4)](){const _0xd25b4a=_0x131c27;this[_0xd25b4a(0x1a9)][_0xd25b4a(0x201)][_0xd25b4a(0x1c4)]();}[_0x131c27(0x1d0)](){const _0x24edc2=_0x131c27;this[_0x24edc2(0x1a9)][_0x24edc2(0x201)][_0x24edc2(0x1d0)]();}[_0x131c27(0x1c1)](_0x2fe131,_0x69e66,_0x5ed7b8){const _0x1419ee=_0x131c27;this[_0x1419ee(0x1a9)][_0x1419ee(0x201)][_0x1419ee(0x1c1)](_0x2fe131,_0x69e66,_0x5ed7b8);}[_0x131c27(0x198)](){const _0x18e8f8=_0x131c27;this[_0x18e8f8(0x1a9)][_0x18e8f8(0x201)][_0x18e8f8(0x198)](),this[_0x18e8f8(0x1a9)][_0x18e8f8(0x201)][_0x18e8f8(0x1af)](this[_0x18e8f8(0x21b)]());}[_0x131c27(0x1cb)](_0x16572f){const _0x3000a6=_0x131c27;this[_0x3000a6(0x1a9)][_0x3000a6(0x201)][_0x3000a6(0x1cb)](_0x16572f);}[_0x131c27(0x1cd)](_0x3bf8aa){const _0x45df41=_0x131c27;this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x196)](_0x3bf8aa[_0x45df41(0x1c9)]),this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x18d)](_0x3bf8aa[_0x45df41(0x218)]),this[_0x45df41(0x1a9)][_0x45df41(0x201)][_0x45df41(0x1af)](this[_0x45df41(0x21b)](_0x3bf8aa));}[_0x131c27(0x1a8)](_0x51edc2,_0x20d325){const _0x2cc6c8=_0x131c27;this[_0x2cc6c8(0x1a9)][_0x2cc6c8(0x201)][_0x2cc6c8(0x1dc)](_0x51edc2),_0x20d325&&this[_0x2cc6c8(0x1a9)][_0x2cc6c8(0x201)][_0x2cc6c8(0x1fd)](!0x1);}[_0x131c27(0x1ed)](_0x4c7da8){const _0x56db4d=_0x131c27;this[_0x56db4d(0x227)]=_0x4c7da8;}[_0x131c27(0x1bf)](_0x28ceb8){const _0x3d6da9=_0x131c27;this[_0x3d6da9(0x1a9)][_0x3d6da9(0x1da)][_0x3d6da9(0x1bf)](_0x28ceb8);}[_0x131c27(0x1ce)](){const _0x2d4019=_0x131c27;this[_0x2d4019(0x1e5)](_0x1ba9bd(this[_0x2d4019(0x1cc)][_0x2d4019(0x229)],_0x2d4019(0x213)));}[_0x131c27(0x1e5)](_0x5f4287,_0x1a8409=!0x1){const _0x86e99e=_0x131c27;if(_0x1a8409&&!_0x43525b()&&_0x5f4287[_0x86e99e(0x1d9)])return this[_0x86e99e(0x1a9)][_0x86e99e(0x1b2)][_0x86e99e(0x20b)]='',void this[_0x86e99e(0x19f)](_0x5f4287);this[_0x86e99e(0x1a9)][_0x86e99e(0x1b2)][_0x86e99e(0x20b)]=_0x5f4287;}[_0x131c27(0x1be)](_0x17db17){const _0x4b4c23=_0x131c27,_0x170227=this[_0x4b4c23(0x1d6)](_0x17db17);this[_0x4b4c23(0x1a9)][_0x4b4c23(0x1da)][_0x4b4c23(0x1be)](_0x170227);}[_0x131c27(0x19f)](_0x37dd62){const _0x380261=_0x131c27;let _0x4f7ba1=0x0;clearInterval(this[_0x380261(0x226)]),this[_0x380261(0x226)]=setInterval(()=>{const _0x43e390=_0x380261;this[_0x43e390(0x1a9)][_0x43e390(0x1b2)][_0x43e390(0x20b)]=this[_0x43e390(0x1a9)][_0x43e390(0x1b2)][_0x43e390(0x20b)]+_0x37dd62[_0x4f7ba1],_0x4f7ba1++,_0x4f7ba1===_0x37dd62[_0x43e390(0x1d9)]&&clearInterval(this[_0x43e390(0x226)]);},0x1e);}[_0x131c27(0x18c)](_0x53ee99){const _0x59d1b7=_0x131c27;this[_0x59d1b7(0x1a9)][_0x59d1b7(0x1b2)][_0x59d1b7(0x1c2)]=_0x53ee99;}[_0x131c27(0x1d6)](_0x499f24){const _0x36768b=_0x131c27;return _0x499f24?_0x499f24[_0x36768b(0x1c9)]&&_0x499f24[_0x36768b(0x218)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x224)):_0x499f24[_0x36768b(0x1c9)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x1f1)):_0x499f24[_0x36768b(0x218)]?_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x18e)):_0x1ba9bd(this[_0x36768b(0x1cc)][_0x36768b(0x229)],_0x36768b(0x1a2)):'';}[_0x131c27(0x21b)](_0x502229){const _0x2c2b2e=_0x131c27;return _0x502229?_0x502229[_0x2c2b2e(0x1c9)]&&_0x502229[_0x2c2b2e(0x218)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x22a)):_0x502229[_0x2c2b2e(0x1c9)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x1ec)):_0x502229[_0x2c2b2e(0x218)]?_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x1f7)):_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x205)):_0x1ba9bd(this[_0x2c2b2e(0x1cc)][_0x2c2b2e(0x229)],_0x2c2b2e(0x205));}[_0x131c27(0x1fa)](_0x22bf25,_0x2245ee,_0x5c1dde,_0x537ae7){const _0x5e8afd=_0x131c27;this[_0x5e8afd(0x1a9)][_0x5e8afd(0x1fa)](_0x22bf25,_0x2245ee,_0x5c1dde,_0x537ae7);}[_0x131c27(0x1ab)](_0x3ee1ae){const _0x178ccb=_0x131c27;this[_0x178ccb(0x1a9)][_0x178ccb(0x1ab)](_0x3ee1ae);}[_0x131c27(0x186)](){const _0xcfdd69=_0x131c27;this[_0xcfdd69(0x1a9)][_0xcfdd69(0x201)][_0xcfdd69(0x186)]();}[_0x131c27(0x1ad)](_0x16d975,_0x34e731){const _0x7385f1=_0x131c27;this[_0x7385f1(0x1a9)][_0x7385f1(0x1da)][_0x7385f1(0x20a)](_0x16d975,_0x34e731);}[_0x131c27(0x1bd)](){const _0x5b3709=_0x131c27;this[_0x5b3709(0x1a9)][_0x5b3709(0x1da)][_0x5b3709(0x1bd)]();}[_0x131c27(0x21c)](){const _0x29e909=_0x131c27;this[_0x29e909(0x1a9)][_0x29e909(0x201)][_0x29e909(0x20c)]=!0x0;}[_0x131c27(0x191)](){const _0x2f7dc2=_0x131c27;this[_0x2f7dc2(0x1a9)][_0x2f7dc2(0x201)][_0x2f7dc2(0x20c)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5ce0f0=_0x45a4;(function(_0x3a93d8,_0x55c02a){const _0x2278da=_0x45a4,_0x3663d4=_0x3a93d8();while(!![]){try{const _0x54275e=-parseInt(_0x2278da(0xd5))/0x1*(-parseInt(_0x2278da(0xb5))/0x2)+-parseInt(_0x2278da(0x73))/0x3*(parseInt(_0x2278da(0x75))/0x4)+parseInt(_0x2278da(0xb0))/0x5*(-parseInt(_0x2278da(0xcf))/0x6)+-parseInt(_0x2278da(0x9e))/0x7+-parseInt(_0x2278da(0xd9))/0x8*(-parseInt(_0x2278da(0xc8))/0x9)+-parseInt(_0x2278da(0xb6))/0xa*(parseInt(_0x2278da(0x92))/0xb)+parseInt(_0x2278da(0xc6))/0xc;if(_0x54275e===_0x55c02a)break;else _0x3663d4['push'](_0x3663d4['shift']());}catch(_0x44829c){_0x3663d4['push'](_0x3663d4['shift']());}}}(_0x59b8,0x52d8a));import{CKEditorError as _0x5e1efc,ObservableMixin as _0x3c1da4,uid as _0x17380f}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x32bff9,AIContextTextResourceType as _0x293d37}from'../../aicore/model/aicontext.js';import{escape as _0x18f612}from'es-toolkit/compat';import{errorsMap as _0xe1bb0}from'../../errorsmap.js';function _0x45a4(_0x590ce9,_0x1bf571){const _0x59b8d7=_0x59b8();return _0x45a4=function(_0x45a44a,_0x560bf0){_0x45a44a=_0x45a44a-0x6a;let _0x57a681=_0x59b8d7[_0x45a44a];return _0x57a681;},_0x45a4(_0x590ce9,_0x1bf571);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x5ce0f0(0x99),_0x5ce0f0(0xca),_0x5ce0f0(0xa1),_0x5ce0f0(0xf2),_0x5ce0f0(0xcb),_0x5ce0f0(0xd8),_0x5ce0f0(0xea),_0x5ce0f0(0xde),_0x5ce0f0(0x90)];export class AIChatContext extends _0x3c1da4(){[_0x5ce0f0(0xeb)];[_0x5ce0f0(0xf0)];[_0x5ce0f0(0x6e)];constructor({connector:_0x290833,config:_0x45997b,ownerId:_0x32f2bd}){const _0x34ead0=_0x5ce0f0;super(),this[_0x34ead0(0xeb)]=_0x290833,this[_0x34ead0(0xf0)]=_0x45997b,this[_0x34ead0(0x6e)]=_0x32f2bd;}[_0x5ce0f0(0xb1)](){const _0x1d4065=_0x5ce0f0;this[_0x1d4065(0x8b)]=new Map(),this[_0x1d4065(0xa2)]=new Map(),this[_0x1d4065(0xaf)]=new Map(),this[_0x1d4065(0xd2)]=new Map(),this[_0x1d4065(0xbc)]();}[_0x5ce0f0(0xce)](){const _0x3c58fb=_0x5ce0f0;return this[_0x3c58fb(0x8b)];}async[_0x5ce0f0(0xe8)](_0x12e0b3){const _0x25eed9=_0x5ce0f0,_0x2086bc=await this[_0x25eed9(0x79)](_0x12e0b3);return this[_0x25eed9(0xe9)](_0x2086bc),_0x25eed9(0xc7)===_0x2086bc[_0x25eed9(0xe5)]&&this[_0x25eed9(0xb4)](),_0x2086bc;}async[_0x5ce0f0(0x79)](_0x516a92){const _0x3bd660=_0x5ce0f0;if(_0x516a92[_0x3bd660(0xd6)]===_0x32bff9[_0x3bd660(0xee)]){const _0x421076=await this[_0x3bd660(0xeb)][_0x3bd660(0xd7)](this[_0x3bd660(0x6e)],_0x516a92['id'])[_0x3bd660(0x94)]();return{'id':_0x3bd660(0xc7),'uiId':_0x3bd660(0xc7),'label':_0x3bd660(0x6b),'type':_0x516a92[_0x3bd660(0xd6)],'content':_0x421076[_0x3bd660(0x86)],'hidden':this[_0x3bd660(0xa2)][_0x3bd660(0x83)](_0x3bd660(0xc7)),'version':_0x421076[_0x3bd660(0x7c)]?.[_0x3bd660(0x9c)],'sessionId':_0x421076[_0x3bd660(0x7c)]?.[_0x3bd660(0x7f)]};}return{'id':_0x516a92['id'],'uiId':_0x516a92['id'],'label':_0x516a92[_0x3bd660(0x7c)]?.[_0x3bd660(0x88)]||_0x516a92[_0x3bd660(0x9a)]||_0x516a92[_0x3bd660(0xab)]||_0x516a92['id'],'type':_0x516a92[_0x3bd660(0xd6)],..._0x516a92?.[_0x3bd660(0x7c)]?.[_0x3bd660(0xf6)]?{'resourceId':_0x516a92[_0x3bd660(0x7c)]?.[_0x3bd660(0xf6)]}:{}};}[_0x5ce0f0(0xa8)](){const _0x2ed147=_0x5ce0f0;return new Map(this[_0x2ed147(0xa2)]);}[_0x5ce0f0(0xa6)](_0x211f22){const _0x1a6f53=_0x5ce0f0,_0x1eb927=this[_0x1a6f53(0x8b)][_0x1a6f53(0x77)](_0x211f22);_0x1eb927?.[_0x1a6f53(0x8e)]||this[_0x1a6f53(0x8d)](_0x211f22);}[_0x5ce0f0(0xdb)](){const _0x5427bc=_0x5ce0f0;if(0x0===this[_0x5427bc(0x8b)][_0x5427bc(0x78)])return;for(const _0x4aa6c4 of this[_0x5427bc(0x8b)][_0x5427bc(0x91)]())this[_0x5427bc(0x8d)](_0x4aa6c4[_0x5427bc(0xe5)]);const _0x30c07d=this[_0x5427bc(0xa2)][_0x5427bc(0x77)](_0x5427bc(0xc7))||this[_0x5427bc(0x8b)][_0x5427bc(0x77)](_0x5427bc(0xc7));_0x30c07d&&this[_0x5427bc(0xe1)]({..._0x30c07d,'isReadOnly':!0x0,'hidden':!0x0});}[_0x5ce0f0(0xef)](_0x178788){const _0x5481c8=_0x5ce0f0;for(const _0x5a62e5 of _0x178788[_0x5481c8(0x91)]())this[_0x5481c8(0xe9)](_0x5a62e5);this[_0x5481c8(0xdb)](),this[_0x5481c8(0x85)](_0x5481c8(0xf2),{'contextItems':Array[_0x5481c8(0x9b)](this[_0x5481c8(0xa8)]()[_0x5481c8(0x91)]())});}[_0x5ce0f0(0xe3)](){const _0x50aa6a=_0x5ce0f0;return this[_0x50aa6a(0x8b)][_0x50aa6a(0x83)](_0x50aa6a(0xc7));}[_0x5ce0f0(0xe6)](){const _0x27a4cf=_0x5ce0f0;return this[_0x27a4cf(0x8b)][_0x27a4cf(0x83)](_0x27a4cf(0xe7));}[_0x5ce0f0(0x93)](){const _0xa2a01=_0x5ce0f0;return this[_0xa2a01(0xa2)][_0xa2a01(0x83)](_0xa2a01(0xc7));}static[_0x5ce0f0(0xe2)](_0x435acb){const _0x1473df=_0x5ce0f0;return Array[_0x1473df(0x9b)](_0x435acb[_0x1473df(0x91)]())[_0x1473df(0xf8)](_0x9803d0=>this[_0x1473df(0xf5)](_0x9803d0))[_0x1473df(0xbf)](_0x56d212=>null!==_0x56d212);}async[_0x5ce0f0(0x8f)](_0x234e7f,_0x116ccc,_0x13aa9f=_0x32bff9[_0x5ce0f0(0xae)]){const _0x36b668=_0x5ce0f0,_0x119316=_0x36b668(0x96)+_0x17380f();this[_0x36b668(0x9f)](_0x119316);try{await Promise[_0x36b668(0xa5)](_0x234e7f[_0x36b668(0xf8)](async _0x5df6b8=>{const _0x3d98fc=_0x36b668,_0x50e96e=_0x3d98fc(0x70)+_0x17380f(),_0x122c7a=_0x18f612(_0x5df6b8[_0x3d98fc(0x9a)]);try{this[_0x3d98fc(0xe1)]({'type':_0x13aa9f,'label':_0x116ccc?.[_0x3d98fc(0x88)]||_0x122c7a,'uiId':_0x50e96e,'resourceId':_0x116ccc?.[_0x3d98fc(0xf6)]},!0x0);const _0x4173dc=this[_0x3d98fc(0xeb)][_0x3d98fc(0x81)](this[_0x3d98fc(0x6e)],_0x5df6b8,_0x116ccc);this[_0x3d98fc(0xaf)][_0x3d98fc(0x74)](_0x50e96e,_0x4173dc[_0x3d98fc(0xc2)]);const {id:_0x1f8dae}=await _0x4173dc[_0x3d98fc(0xc4)]();this[_0x3d98fc(0xaf)][_0x3d98fc(0xa4)](_0x50e96e),this[_0x3d98fc(0xe0)]({'type':_0x13aa9f,'id':_0x1f8dae,'label':_0x116ccc?.[_0x3d98fc(0x88)]||_0x122c7a,'uiId':_0x50e96e,'resourceId':_0x116ccc?.[_0x3d98fc(0xf6)]},!0x1);}catch(_0x13591a){this[_0x3d98fc(0xaf)][_0x3d98fc(0xa4)](_0x50e96e);if(!(_0x13591a instanceof _0x5e1efc&&_0x13591a[_0x3d98fc(0xec)][_0x3d98fc(0xd1)](_0x3d98fc(0xba)))){const _0x72a024=_0xe1bb0[_0x3d98fc(0x77)](_0x13591a[_0x3d98fc(0x7d)])||_0x3d98fc(0xa3),_0x301e29=new _0x5e1efc(_0x72a024,null,{'fileName':_0x122c7a,..._0x13591a});_0x301e29[_0x3d98fc(0x72)]=_0x13591a[_0x3d98fc(0x72)],this[_0x3d98fc(0x85)](_0x3d98fc(0xcb),{'error':_0x301e29});}this[_0x3d98fc(0x8d)](_0x50e96e);}}));}finally{this[_0x36b668(0xdc)](_0x119316);}}[_0x5ce0f0(0xc1)](_0x1f3a6f){const _0x418401=_0x5ce0f0;if(this[_0x418401(0xe3)]())return;const _0x2f62b3={'type':_0x32bff9[_0x418401(0xee)],'uiId':_0x418401(0xc7),'label':_0x1f3a6f,'isReadOnly':this[_0x418401(0xa2)][_0x418401(0x83)](_0x418401(0xc7)),'hidden':this[_0x418401(0xa2)][_0x418401(0x83)](_0x418401(0xc7))};this[_0x418401(0xe1)](_0x2f62b3);}async[_0x5ce0f0(0x80)](_0x273bf9,_0x538aae,_0x5210fa,_0x227d51){const _0x24daed=_0x5ce0f0,_0x38ff2c=this[_0x24daed(0x8b)][_0x24daed(0x77)](_0x24daed(0xc7));if(_0x38ff2c&&_0x273bf9){_0x38ff2c[_0x24daed(0xe7)]=_0x227d51?_0x227d51[_0x24daed(0xf8)](_0x26a352=>({'start':_0x26a352[_0x24daed(0xd3)],'end':_0x26a352[_0x24daed(0xc9)]})):[];try{if(_0x38ff2c[_0x24daed(0x9c)]===_0x538aae)return;const {id:_0x5ed7a7}=await this[_0x24daed(0xeb)][_0x24daed(0x7e)](this[_0x24daed(0x6e)],_0x273bf9,{'version':_0x538aae,'sessionId':_0x5210fa})[_0x24daed(0xc4)]();_0x38ff2c['id']=_0x5ed7a7,_0x38ff2c[_0x24daed(0x86)]=_0x273bf9,_0x38ff2c[_0x24daed(0x9c)]=_0x538aae,_0x38ff2c[_0x24daed(0x7f)]=_0x5210fa;}catch(_0x380cca){const _0x30dd13=new _0x5e1efc(_0x24daed(0xbe),null);_0x30dd13[_0x24daed(0x72)]=_0x380cca[_0x24daed(0x72)],this[_0x24daed(0x85)](_0x24daed(0xcb),{'error':_0x30dd13});}}}[_0x5ce0f0(0xa9)](_0x2c4ece){const _0x2a84e4=_0x5ce0f0;this[_0x2a84e4(0xe1)]({'type':_0x32bff9[_0x2a84e4(0xac)],'label':_0x2c4ece,'uiId':_0x2a84e4(0xe7),'content':_0x2c4ece});}[_0x5ce0f0(0x95)](){const _0x1f4c1a=_0x5ce0f0;this[_0x1f4c1a(0x8d)](_0x1f4c1a(0xe7));}async[_0x5ce0f0(0xfa)](_0x365655,_0xb33c2){const _0x173c8c=_0x5ce0f0,_0x291077=_0x173c8c(0xb9)+_0x17380f();this[_0x173c8c(0x9f)](_0x291077);const _0x56a663=_0x173c8c(0xb9)+_0x17380f();try{this[_0x173c8c(0xe1)]({'type':_0x32bff9[_0x173c8c(0xb7)],'label':_0xb33c2?.[_0x173c8c(0x88)]||_0x365655,'uiId':_0x56a663,'resourceId':_0xb33c2?.[_0x173c8c(0xf6)]},!0x0);const _0x469abc=this[_0x173c8c(0xeb)][_0x173c8c(0x87)](this[_0x173c8c(0x6e)],_0x365655,_0xb33c2);this[_0x173c8c(0xaf)][_0x173c8c(0x74)](_0x56a663,_0x469abc[_0x173c8c(0xc2)]);const {id:_0x3eec96}=await _0x469abc[_0x173c8c(0xc4)]();this[_0x173c8c(0xaf)][_0x173c8c(0xa4)](_0x56a663),this[_0x173c8c(0xe0)]({'type':_0x32bff9[_0x173c8c(0xb7)],'id':_0x3eec96,'label':_0xb33c2?.[_0x173c8c(0x88)]||_0x365655,'uiId':_0x56a663,'resourceId':_0xb33c2?.[_0x173c8c(0xf6)]},!0x1);}catch(_0x11ca3a){this[_0x173c8c(0xaf)][_0x173c8c(0xa4)](_0x56a663),(_0x11ca3a[_0x173c8c(0xec)][_0x173c8c(0xd1)](_0x173c8c(0xba))||this[_0x173c8c(0x85)](_0x173c8c(0xcb),{'error':new _0x5e1efc(_0x173c8c(0x97),this,{'url':_0x365655,'originalError':_0x11ca3a}),'url':_0x365655}),this[_0x173c8c(0x8d)](_0x56a663));}finally{this[_0x173c8c(0xdc)](_0x291077);}}async[_0x5ce0f0(0xf4)](_0x5a12c1,_0x20a3dc,_0x461cd4){const _0x1ae0de=_0x5ce0f0,_0x3a2d11=this[_0x1ae0de(0xc0)][_0x1ae0de(0xed)][_0x1ae0de(0xb3)](_0x3c663c=>_0x3c663c['id']===_0x5a12c1);if(!_0x3a2d11)return this[_0x1ae0de(0x85)](_0x1ae0de(0xcb),{'error':new _0x5e1efc(_0x1ae0de(0xf1),this,{'sourceId':_0x5a12c1}),'sourceId':_0x5a12c1}),[];try{const _0x441a84=(await _0x3a2d11[_0x1ae0de(0xb2)](_0x20a3dc))[_0x1ae0de(0xf8)](_0x24704a=>{const _0x29842e=_0x1ae0de,_0x40ae4e=this[_0x29842e(0xcd)](_0x24704a['id']);return{..._0x24704a,'isInContext':_0x40ae4e};});return _0x3a2d11[_0x1ae0de(0xe4)]=_0x441a84,this[_0x1ae0de(0x85)](_0x1ae0de(0xea),{'sourceId':_0x5a12c1,'source':_0x3a2d11,'resources':_0x441a84,'uid':_0x461cd4}),_0x441a84;}catch(_0xec4b17){return this[_0x1ae0de(0x85)](_0x1ae0de(0xcb),{'error':new _0x5e1efc(_0x1ae0de(0x6c),this,{'sourceId':_0x5a12c1,'originalError':_0xec4b17}),'sourceId':_0x5a12c1,'sourceLabel':_0x3a2d11[_0x1ae0de(0x88)]}),[];}}async[_0x5ce0f0(0xf7)](_0x3b382c,_0x204bb6){const _0x3c73da=_0x5ce0f0;if(this[_0x3c73da(0xcd)](_0x204bb6['id']))return;let _0x1f3fdf=_0x204bb6[_0x3c73da(0xbb)];if(!_0x1f3fdf&&_0x3b382c[_0x3c73da(0xc3)])try{_0x1f3fdf=await _0x3b382c[_0x3c73da(0xc3)](_0x204bb6['id']);}catch(_0xbe0f41){return void this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0x84),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id'],'originalError':_0xbe0f41}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});}if(_0x1f3fdf)switch(_0x204bb6[_0x3c73da(0xd6)]){case _0x32bff9[_0x3c73da(0xb7)]:if(_0x3c73da(0xb8)!=typeof _0x1f3fdf)return void this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0xd0),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id'],'expectedType':_0x3c73da(0xb8),'actualType':typeof _0x1f3fdf}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});await this[_0x3c73da(0xfa)](_0x1f3fdf,{'label':_0x204bb6[_0x3c73da(0x88)],'resourceId':_0x204bb6['id']});break;case _0x32bff9[_0x3c73da(0xae)]:if(!(_0x1f3fdf instanceof File))return void this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0xd0),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id'],'expectedType':_0x3c73da(0x7b),'actualType':typeof _0x1f3fdf}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});await this[_0x3c73da(0x8f)]([_0x1f3fdf],{'label':_0x204bb6[_0x3c73da(0x88)],'resourceId':_0x204bb6['id']});break;case _0x32bff9[_0x3c73da(0x6a)]:if(_0x3c73da(0xad)!=typeof _0x1f3fdf||!(_0x3c73da(0x86)in _0x1f3fdf)||!(_0x3c73da(0xd6)in _0x1f3fdf))return void this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0xd0),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id'],'expectedType':_0x3c73da(0xbd),'actualType':typeof _0x1f3fdf}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});_0x1f3fdf=AIChatContext[_0x3c73da(0x76)](_0x1f3fdf,_0x204bb6[_0x3c73da(0x88)]),await this[_0x3c73da(0x8f)]([_0x1f3fdf],{'label':_0x204bb6[_0x3c73da(0x88)],'resourceId':_0x204bb6['id']},_0x32bff9[_0x3c73da(0x6a)]);break;default:this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0xaa),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id'],'resourceType':_0x204bb6[_0x3c73da(0xd6)]}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});}else this[_0x3c73da(0x85)](_0x3c73da(0xcb),{'error':new _0x5e1efc(_0x3c73da(0xa7),this,{'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']}),'resourceId':_0x204bb6['id'],'sourceId':_0x3b382c['id']});}static[_0x5ce0f0(0x76)](_0x2ede53,_0x54972b){const _0x53cdc9=_0x5ce0f0;switch(_0x2ede53[_0x53cdc9(0xd6)]){case _0x293d37[_0x53cdc9(0xcc)]:return new File([_0x2ede53[_0x53cdc9(0x86)]],_0x54972b,{'type':_0x53cdc9(0x6d)});case _0x293d37[_0x53cdc9(0x8c)]:return new File([_0x2ede53[_0x53cdc9(0x86)]],_0x54972b,{'type':_0x53cdc9(0x6f)});default:return new File([_0x2ede53[_0x53cdc9(0x86)]],_0x54972b,{'type':_0x53cdc9(0x89)});}}static[_0x5ce0f0(0xf5)](_0x11523c){const _0x36d79e=_0x5ce0f0;switch(_0x11523c[_0x36d79e(0xd6)]){case _0x32bff9[_0x36d79e(0xae)]:return{'type':_0x32bff9[_0x36d79e(0xae)],'id':_0x11523c['id']};case _0x32bff9[_0x36d79e(0xb7)]:return{'type':_0x32bff9[_0x36d79e(0xb7)],'id':_0x11523c['id']};case _0x32bff9[_0x36d79e(0xee)]:return{'type':_0x32bff9[_0x36d79e(0xee)],'id':_0x11523c['id'],..._0x11523c[_0x36d79e(0xe7)]?.[_0x36d79e(0x9d)]&&{'selection':_0x11523c[_0x36d79e(0xe7)]}};case _0x32bff9[_0x36d79e(0x6a)]:return{'type':_0x32bff9[_0x36d79e(0xae)],'id':_0x11523c['id']};default:return null;}}[_0x5ce0f0(0xe1)](_0x411e2d,_0xbdd385=!0x1){const _0x2a2b9c=_0x5ce0f0;if(this[_0x2a2b9c(0x8b)][_0x2a2b9c(0x74)](_0x411e2d[_0x2a2b9c(0xe5)],_0x411e2d),_0x411e2d[_0x2a2b9c(0x98)]||this[_0x2a2b9c(0x85)](_0x2a2b9c(0x99),{'contextItem':_0x411e2d,'isLoading':_0xbdd385}),_0x2a2b9c(0xc7)===_0x411e2d[_0x2a2b9c(0xe5)]&&this[_0x2a2b9c(0xb4)](),_0x411e2d[_0x2a2b9c(0xf6)]){const _0x12ac38=this[_0x2a2b9c(0xd4)](_0x411e2d[_0x2a2b9c(0xf6)]);_0x12ac38&&_0x12ac38[_0x2a2b9c(0xda)](_0x58c110=>{const _0x5817ac=_0x2a2b9c;this[_0x5817ac(0xdd)](_0x58c110,_0x411e2d[_0x5817ac(0xf6)],!0x0);});}}[_0x5ce0f0(0x8d)](_0x3172be){const _0x3cac1a=_0x5ce0f0,_0xc941cd=this[_0x3cac1a(0x8b)][_0x3cac1a(0x77)](_0x3172be),_0x7f079=this[_0x3cac1a(0xaf)][_0x3cac1a(0x77)](_0x3172be);if(_0x7f079&&(_0x7f079[_0x3cac1a(0x71)](),this[_0x3cac1a(0xaf)][_0x3cac1a(0xa4)](_0x3172be)),_0xc941cd?.[_0x3cac1a(0xf6)]){const _0x29ac75=this[_0x3cac1a(0xd4)](_0xc941cd[_0x3cac1a(0xf6)]);_0x29ac75&&_0x29ac75[_0x3cac1a(0xda)](_0x5d2b3b=>{const _0x419f3e=_0x3cac1a;this[_0x419f3e(0xdd)](_0x5d2b3b,_0xc941cd[_0x419f3e(0xf6)],!0x1);});}this[_0x3cac1a(0x8b)][_0x3cac1a(0xa4)](_0x3172be),this[_0x3cac1a(0x85)](_0x3cac1a(0xca),{'uiId':_0x3172be,'type':_0xc941cd?.[_0x3cac1a(0xd6)]}),_0x3cac1a(0xc7)===_0x3172be&&this[_0x3cac1a(0xb4)]();}[_0x5ce0f0(0xe0)](_0x41b308,_0x1607af){const _0x454435=_0x5ce0f0;if(this[_0x454435(0x8b)][_0x454435(0x83)](_0x41b308[_0x454435(0xe5)])&&(this[_0x454435(0x8b)][_0x454435(0x74)](_0x41b308[_0x454435(0xe5)],_0x41b308),this[_0x454435(0x85)](_0x454435(0xa1),{'contextItem':_0x41b308,'isLoading':_0x1607af}),_0x41b308[_0x454435(0xf6)])){const _0x5dc04a=this[_0x454435(0xd4)](_0x41b308[_0x454435(0xf6)]);_0x5dc04a&&_0x5dc04a[_0x454435(0xda)](_0x5920c2=>{const _0x109a7b=_0x454435;this[_0x109a7b(0xdd)](_0x5920c2,_0x41b308[_0x109a7b(0xf6)],!0x0);});}}[_0x5ce0f0(0xe9)](_0x5809fe){const _0x2218c3=_0x5ce0f0;this[_0x2218c3(0xa2)][_0x2218c3(0x74)](_0x5809fe[_0x2218c3(0xe5)],_0x5809fe);}[_0x5ce0f0(0xbc)](){const _0x29be3d=_0x5ce0f0;this[_0x29be3d(0xc0)]={'document':{'enabled':!0x1!==this[_0x29be3d(0xf0)]?.[_0x29be3d(0x82)]?.[_0x29be3d(0x8a)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x29be3d(0xf0)]?.[_0x29be3d(0xdf)]?.[_0x29be3d(0x8a)]},'files':{'enabled':!0x1!==this[_0x29be3d(0xf0)]?.[_0x29be3d(0xa0)]?.[_0x29be3d(0x8a)]},'sources':this[_0x29be3d(0xf3)]()},this[_0x29be3d(0x85)](_0x29be3d(0xd8),{'options':this[_0x29be3d(0xc0)]});}[_0x5ce0f0(0xf3)](){const _0x31278f=_0x5ce0f0;return this[_0x31278f(0xf0)]?.[_0x31278f(0xed)]?.[_0x31278f(0xf8)](_0x26465c=>({..._0x26465c,'resources':[]}))??[];}[_0x5ce0f0(0xb4)](){const _0x3f293e=_0x5ce0f0,_0x43b2fb=this[_0x3f293e(0xe3)]()||this[_0x3f293e(0x93)]();this[_0x3f293e(0xc0)][_0x3f293e(0x82)][_0x3f293e(0xf9)]=_0x43b2fb,this[_0x3f293e(0x85)](_0x3f293e(0xd8),{'options':this[_0x3f293e(0xc0)]});}[_0x5ce0f0(0xcd)](_0x542750){const _0x56ba63=_0x5ce0f0;for(const _0x506cbc of this[_0x56ba63(0x8b)][_0x56ba63(0x91)]())if(_0x506cbc[_0x56ba63(0xf6)]===_0x542750)return!0x0;for(const _0x4e3b83 of this[_0x56ba63(0xa2)][_0x56ba63(0x91)]())if(_0x4e3b83[_0x56ba63(0xf6)]===_0x542750)return!0x0;return!0x1;}[_0x5ce0f0(0xd4)](_0x59bd9f){const _0xafb8c8=_0x5ce0f0,_0x39bb09=[];for(const _0x22a7e0 of this[_0xafb8c8(0xc0)][_0xafb8c8(0xed)]){_0x22a7e0[_0xafb8c8(0xe4)][_0xafb8c8(0xb3)](_0x14158d=>_0x14158d['id']===_0x59bd9f)&&_0x39bb09[_0xafb8c8(0xc5)](_0x22a7e0['id']);}return 0x0===_0x39bb09[_0xafb8c8(0x9d)]?null:_0x39bb09;}[_0x5ce0f0(0xdd)](_0x15c3bf,_0xcde8ca,_0x2bed1f){const _0x564b11=_0x5ce0f0,_0x17508b=this[_0x564b11(0xc0)][_0x564b11(0xed)][_0x564b11(0xb3)](_0x1253bd=>_0x1253bd['id']===_0x15c3bf);if(!_0x17508b)return;const _0x2dbec6=_0x17508b[_0x564b11(0xe4)][_0x564b11(0xb3)](_0x2a1520=>_0x2a1520['id']===_0xcde8ca);_0x2dbec6&&(_0x2dbec6[_0x564b11(0x7a)]=_0x2bed1f,this[_0x564b11(0x85)](_0x564b11(0xde),{'sourceId':_0x15c3bf,'resourceId':_0xcde8ca,'isInContext':_0x2bed1f}));}[_0x5ce0f0(0x9f)](_0x122a39){const _0x318972=_0x5ce0f0;this[_0x318972(0xd2)][_0x318972(0x74)](_0x122a39,!0x0),this[_0x318972(0xd2)][_0x318972(0x78)]&&this[_0x318972(0x85)](_0x318972(0x90),{'isUploadInProgress':!0x0});}[_0x5ce0f0(0xdc)](_0x3ae59c){const _0x18d0ef=_0x5ce0f0;this[_0x18d0ef(0xd2)][_0x18d0ef(0xa4)](_0x3ae59c),0x0===this[_0x18d0ef(0xd2)][_0x18d0ef(0x78)]&&this[_0x18d0ef(0x85)](_0x18d0ef(0x90),{'isUploadInProgress':!0x1});}}function _0x59b8(){const _0x3e32ca=['ai-chat-context-invalid-data','startsWith','_ongoingUploadOperations','start','_findSourceIdsByResourceId','26XPvPJs','type','fetchDocument','addContextOptionsChanged','15568hUCDsc','forEach','clearPendingContextItems','_finishUploadOperation','_updateResourceInContextState','resourceStateChanged','urls','_finishContextItemLoading','_addContextItem','mapContextItemsToRequestData','isCurrentDocumentInContext','resources','uiId','isSelectionInContext','selection','populateFromMessage','_addToConversationContextItem','sourceResourcesLoaded','_connector','message','sources','DOCUMENT','addToConversationContext','_config','ai-chat-source-not-found','contextSent','_getCustomSourcesInitialState','loadSourceResources','_mapContextItemToRequestData','resourceId','addResourceToContext','map','isHidden','addUrlToContext','TEXT','Current\x20document','ai-chat-source-resources-load-failed','text/markdown','_ownerId','text/html','file-','abort','stack','2631ycLpsV','set','2432oDUreN','_convertTextResourceToFile','get','size','_createContextItemFromContent','isInContext','File','attributes','code','uploadDocument','sessionId','updateCurrentDocument','uploadFile','document','has','ai-chat-resource-load-failed','fire','content','uploadUrl','label','text/plain','enabled','_pendingContextItems','HTML','_removeContextItem','isReadOnly','addFilesToContext','uploadProgressChanged','values','143vWbfID','isCurrentDocumentInConversation','getDocument','removeSelectionFromContext','files-','ai-chat-url-upload-failed','hidden','contextItemAdded','name','from','version','length','2419291wsTwFF','_startUploadOperation','files','contextItemLoadingEnded','_conversationContextItems','ai-chat-file-upload-failed','delete','all','removeFromContext','ai-chat-resource-no-data','getSentContextItems','addSelectionToContext','ai-chat-context-unsupported-type','url','SELECTION','object','FILE','_ongoingUploads','417580rNtUeg','init','getResources','find','_toggleAddCurrentDocumentOptionVisibility','15034tJaERk','277870JZexHb','URL','string','url-','ai-request-aborted','data','_setAddContextOptionsDefaultState','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-document-upload-failed','filter','_addContextOptionsState','addCurrentDocumentToContext','abortController','getData','getId','push','20380776XHXNXy','current-document','477ukQwKn','end','contextItemRemoved','error','MARKDOWN','_isResourceInContext','getPendingContextItems','30WSHTkm'];_0x59b8=function(){return _0x3e32ca;};return _0x59b8();}
23
+ const _0x112097=_0xd856;(function(_0x543351,_0x16b8c7){const _0xe522cd=_0xd856,_0x4e1b38=_0x543351();while(!![]){try{const _0x178e5f=-parseInt(_0xe522cd(0x24a))/0x1+-parseInt(_0xe522cd(0x23c))/0x2+parseInt(_0xe522cd(0x255))/0x3*(-parseInt(_0xe522cd(0x1e5))/0x4)+-parseInt(_0xe522cd(0x1e7))/0x5+-parseInt(_0xe522cd(0x259))/0x6*(-parseInt(_0xe522cd(0x211))/0x7)+-parseInt(_0xe522cd(0x25d))/0x8+-parseInt(_0xe522cd(0x1f0))/0x9*(-parseInt(_0xe522cd(0x220))/0xa);if(_0x178e5f===_0x16b8c7)break;else _0x4e1b38['push'](_0x4e1b38['shift']());}catch(_0x28bb13){_0x4e1b38['push'](_0x4e1b38['shift']());}}}(_0x227f,0x2a054));function _0x227f(){const _0x5c6946=['isInContext','filter','size','enabled','getResources','end','text/markdown','addCurrentDocumentToContext','_mapContextItemToRequestData','type','_ownerId','data','6737930ydbfPG','addUrlToContext','files-','object','_finishUploadOperation','HTML','text/plain','sourceResourcesLoaded','clearPendingContextItems','document','_setAddContextOptionsDefaultState','contextItemLoadingEnded','addFilesToContext','selection','resources','string','map','ai-request-aborted','ai-chat-source-resources-load-failed','isCurrentDocumentInConversation','SELECTION','_ongoingUploads','getDocument','ai-chat-url-upload-failed','mapContextItemsToRequestData','ai-chat-context-unsupported-type','ai-chat-document-upload-failed','_conversationContextItems','236602LyqnvJ','name','sources','isReadOnly','sessionId','current-document','find','file-','label','contextItemAdded','MARKDOWN','forEach','length','contextSent','337972qmGqYe','fetchDocument','_addContextItem','code','getId','loadSourceResources','uiId','message','start','contextItemRemoved','has','6osSLvF','push','removeSelectionFromContext','_pendingContextItems','6wVnjUo','_updateResourceInContextState','_ongoingUploadOperations','url','480208rwJBcL','getPendingContextItems','ai-chat-resource-no-data','set','from','addResourceToContext','updateCurrentDocument','removeFromContext','DOCUMENT','content','ai-chat-file-upload-failed','abort','ai-chat-source-not-found','urls','_toggleAddCurrentDocumentOptionVisibility','_convertTextResourceToFile','getData','_connector','fire','resourceId','error','ai-chat-context-invalid-data','_getCustomSourcesInitialState','462732SftFqZ','addSelectionToContext','343925zrDelx','values','resourceStateChanged','getSentContextItems','_findSourceIdsByResourceId','delete','Current\x20document','all','_removeContextItem','9OOTDRh','addToConversationContext','attributes','get','uploadUrl','populateFromMessage','isSelectionInContext','isCurrentDocumentInContext','uploadProgressChanged','url-','_startUploadOperation','TEXT','files','startsWith','URL','init','uploadDocument','stack','_addToConversationContextItem','hidden','File','_addContextOptionsState','FILE','isHidden','_finishContextItemLoading','_isResourceInContext','_createContextItemFromContent','_config','text/html','version','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-resource-load-failed','uploadFile','2203411gOBRjy','addContextOptionsChanged','abortController'];_0x227f=function(){return _0x5c6946;};return _0x227f();}import{CKEditorError as _0x3c7f74,ObservableMixin as _0x5a1d5f,uid as _0xe5ba27}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x4c0062,AIContextTextResourceType as _0x26dfe0}from'../../aicore/model/aicontext.js';function _0xd856(_0x424023,_0x12cdb4){const _0x227f50=_0x227f();return _0xd856=function(_0xd8567b,_0x35a040){_0xd8567b=_0xd8567b-0x1e3;let _0x81fc60=_0x227f50[_0xd8567b];return _0x81fc60;},_0xd856(_0x424023,_0x12cdb4);}import{escape as _0x142173}from'es-toolkit/compat';import{errorsMap as _0x27310e}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x112097(0x245),_0x112097(0x253),_0x112097(0x22b),_0x112097(0x249),_0x112097(0x271),_0x112097(0x212),_0x112097(0x227),_0x112097(0x1e9),_0x112097(0x1f8)];export class AIChatContext extends _0x5a1d5f(){[_0x112097(0x26e)];[_0x112097(0x20b)];[_0x112097(0x21e)];constructor({connector:_0x168d90,config:_0x3dfad3,ownerId:_0x21a7fd}){const _0x183707=_0x112097;super(),this[_0x183707(0x26e)]=_0x168d90,this[_0x183707(0x20b)]=_0x3dfad3,this[_0x183707(0x21e)]=_0x21a7fd;}[_0x112097(0x1ff)](){const _0x2d1184=_0x112097;this[_0x2d1184(0x258)]=new Map(),this[_0x2d1184(0x23b)]=new Map(),this[_0x2d1184(0x235)]=new Map(),this[_0x2d1184(0x25b)]=new Map(),this[_0x2d1184(0x22a)]();}[_0x112097(0x25e)](){const _0x387097=_0x112097;return this[_0x387097(0x258)];}async[_0x112097(0x1f5)](_0x3b5777){const _0x40b39f=_0x112097,_0x4dfbde=await this[_0x40b39f(0x20a)](_0x3b5777);return this[_0x40b39f(0x202)](_0x4dfbde),_0x40b39f(0x241)===_0x4dfbde[_0x40b39f(0x250)]&&this[_0x40b39f(0x26b)](),_0x4dfbde;}async[_0x112097(0x20a)](_0x382c14){const _0x122ecb=_0x112097;if(_0x382c14[_0x122ecb(0x21d)]===_0x4c0062[_0x122ecb(0x265)]){const _0x401d54=await this[_0x122ecb(0x26e)][_0x122ecb(0x24b)](this[_0x122ecb(0x21e)],_0x382c14['id'])[_0x122ecb(0x236)]();return{'id':_0x122ecb(0x241),'uiId':_0x122ecb(0x241),'label':_0x122ecb(0x1ed),'type':_0x382c14[_0x122ecb(0x21d)],'content':_0x401d54[_0x122ecb(0x266)],'hidden':this[_0x122ecb(0x23b)][_0x122ecb(0x254)](_0x122ecb(0x241)),'version':_0x401d54[_0x122ecb(0x1f2)]?.[_0x122ecb(0x20d)],'sessionId':_0x401d54[_0x122ecb(0x1f2)]?.[_0x122ecb(0x240)]};}return{'id':_0x382c14['id'],'uiId':_0x382c14['id'],'label':_0x382c14[_0x122ecb(0x1f2)]?.[_0x122ecb(0x244)]||_0x382c14[_0x122ecb(0x23d)]||_0x382c14[_0x122ecb(0x25c)]||_0x382c14['id'],'type':_0x382c14[_0x122ecb(0x21d)],..._0x382c14?.[_0x122ecb(0x1f2)]?.[_0x122ecb(0x270)]?{'resourceId':_0x382c14[_0x122ecb(0x1f2)]?.[_0x122ecb(0x270)]}:{}};}[_0x112097(0x1ea)](){const _0xf0a629=_0x112097;return new Map(this[_0xf0a629(0x23b)]);}[_0x112097(0x264)](_0x27af91){const _0x4ebe88=_0x112097,_0x559c69=this[_0x4ebe88(0x258)][_0x4ebe88(0x1f3)](_0x27af91);_0x559c69?.[_0x4ebe88(0x23f)]||this[_0x4ebe88(0x1ef)](_0x27af91);}[_0x112097(0x228)](){const _0x1746aa=_0x112097;if(0x0===this[_0x1746aa(0x258)][_0x1746aa(0x216)])return;for(const _0x5c32db of this[_0x1746aa(0x258)][_0x1746aa(0x1e8)]())this[_0x1746aa(0x1ef)](_0x5c32db[_0x1746aa(0x250)]);const _0xeac5d6=this[_0x1746aa(0x23b)][_0x1746aa(0x1f3)](_0x1746aa(0x241))||this[_0x1746aa(0x258)][_0x1746aa(0x1f3)](_0x1746aa(0x241));_0xeac5d6&&this[_0x1746aa(0x24c)]({..._0xeac5d6,'isReadOnly':!0x0,'hidden':!0x0});}[_0x112097(0x1f1)](_0x1bd276){const _0x1768dd=_0x112097;for(const _0x4b94fa of _0x1bd276[_0x1768dd(0x1e8)]())this[_0x1768dd(0x202)](_0x4b94fa);this[_0x1768dd(0x228)](),this[_0x1768dd(0x26f)](_0x1768dd(0x249),{'contextItems':Array[_0x1768dd(0x261)](this[_0x1768dd(0x1ea)]()[_0x1768dd(0x1e8)]())});}[_0x112097(0x1f7)](){const _0x4525=_0x112097;return this[_0x4525(0x258)][_0x4525(0x254)](_0x4525(0x241));}[_0x112097(0x1f6)](){const _0x5cb7d1=_0x112097;return this[_0x5cb7d1(0x258)][_0x5cb7d1(0x254)](_0x5cb7d1(0x22d));}[_0x112097(0x233)](){const _0x5f41a6=_0x112097;return this[_0x5f41a6(0x23b)][_0x5f41a6(0x254)](_0x5f41a6(0x241));}static[_0x112097(0x238)](_0x13cf1e){const _0x1afe64=_0x112097;return Array[_0x1afe64(0x261)](_0x13cf1e[_0x1afe64(0x1e8)]())[_0x1afe64(0x230)](_0x3c5dab=>this[_0x1afe64(0x21c)](_0x3c5dab))[_0x1afe64(0x215)](_0x5e6264=>null!==_0x5e6264);}async[_0x112097(0x22c)](_0x24fe98,_0xd0e758,_0x38ef35=_0x4c0062[_0x112097(0x206)]){const _0x32a137=_0x112097,_0x545404=_0x32a137(0x222)+_0xe5ba27();this[_0x32a137(0x1fa)](_0x545404);try{await Promise[_0x32a137(0x1ee)](_0x24fe98[_0x32a137(0x230)](async _0x3b9f32=>{const _0x50b229=_0x32a137,_0x8f5615=_0x50b229(0x243)+_0xe5ba27(),_0x1e1288=_0x142173(_0x3b9f32[_0x50b229(0x23d)]);try{this[_0x50b229(0x24c)]({'type':_0x38ef35,'label':_0xd0e758?.[_0x50b229(0x244)]||_0x1e1288,'uiId':_0x8f5615,'resourceId':_0xd0e758?.[_0x50b229(0x270)]},!0x0);const _0x3e6404=this[_0x50b229(0x26e)][_0x50b229(0x210)](this[_0x50b229(0x21e)],_0x3b9f32,_0xd0e758);this[_0x50b229(0x235)][_0x50b229(0x260)](_0x8f5615,_0x3e6404[_0x50b229(0x213)]);const {id:_0x120dab}=await _0x3e6404[_0x50b229(0x24e)]();this[_0x50b229(0x235)][_0x50b229(0x1ec)](_0x8f5615),this[_0x50b229(0x208)]({'type':_0x38ef35,'id':_0x120dab,'label':_0xd0e758?.[_0x50b229(0x244)]||_0x1e1288,'uiId':_0x8f5615,'resourceId':_0xd0e758?.[_0x50b229(0x270)]},!0x1);}catch(_0x8d22a4){this[_0x50b229(0x235)][_0x50b229(0x1ec)](_0x8f5615);if(!(_0x8d22a4 instanceof _0x3c7f74&&_0x8d22a4[_0x50b229(0x251)][_0x50b229(0x1fd)](_0x50b229(0x231)))){const _0x53c5c3=_0x27310e[_0x50b229(0x1f3)](_0x8d22a4[_0x50b229(0x24d)])||_0x50b229(0x267),_0x24158d=new _0x3c7f74(_0x53c5c3,null,{'fileName':_0x1e1288,..._0x8d22a4});_0x24158d[_0x50b229(0x201)]=_0x8d22a4[_0x50b229(0x201)],this[_0x50b229(0x26f)](_0x50b229(0x271),{'error':_0x24158d});}this[_0x50b229(0x1ef)](_0x8f5615);}}));}finally{this[_0x32a137(0x224)](_0x545404);}}[_0x112097(0x21b)](_0x2bbec5){const _0x5baaef=_0x112097;if(this[_0x5baaef(0x1f7)]())return;const _0x11a226={'type':_0x4c0062[_0x5baaef(0x265)],'uiId':_0x5baaef(0x241),'label':_0x2bbec5,'isReadOnly':this[_0x5baaef(0x23b)][_0x5baaef(0x254)](_0x5baaef(0x241)),'hidden':this[_0x5baaef(0x23b)][_0x5baaef(0x254)](_0x5baaef(0x241))};this[_0x5baaef(0x24c)](_0x11a226);}async[_0x112097(0x263)](_0x460c95,_0x1cc3f0,_0x104dad,_0x36267c){const _0x2e9659=_0x112097,_0x517637=this[_0x2e9659(0x258)][_0x2e9659(0x1f3)](_0x2e9659(0x241));if(_0x517637&&_0x460c95){_0x517637[_0x2e9659(0x22d)]=_0x36267c?_0x36267c[_0x2e9659(0x230)](_0x3e929b=>({'start':_0x3e929b[_0x2e9659(0x252)],'end':_0x3e929b[_0x2e9659(0x219)]})):[];try{if(_0x517637[_0x2e9659(0x20d)]===_0x1cc3f0)return;const {id:_0x653a6e}=await this[_0x2e9659(0x26e)][_0x2e9659(0x200)](this[_0x2e9659(0x21e)],_0x460c95,{'version':_0x1cc3f0,'sessionId':_0x104dad})[_0x2e9659(0x24e)]();_0x517637['id']=_0x653a6e,_0x517637[_0x2e9659(0x266)]=_0x460c95,_0x517637[_0x2e9659(0x20d)]=_0x1cc3f0,_0x517637[_0x2e9659(0x240)]=_0x104dad;}catch(_0x1ff481){const _0x2098a3=new _0x3c7f74(_0x2e9659(0x23a),null);_0x2098a3[_0x2e9659(0x201)]=_0x1ff481[_0x2e9659(0x201)],this[_0x2e9659(0x26f)](_0x2e9659(0x271),{'error':_0x2098a3});}}}[_0x112097(0x1e6)](_0x4636b0){const _0x117175=_0x112097;this[_0x117175(0x24c)]({'type':_0x4c0062[_0x117175(0x234)],'label':_0x4636b0,'uiId':_0x117175(0x22d),'content':_0x4636b0});}[_0x112097(0x257)](){const _0x18f6be=_0x112097;this[_0x18f6be(0x1ef)](_0x18f6be(0x22d));}async[_0x112097(0x221)](_0x30ab5c,_0x809454){const _0x2f80b2=_0x112097,_0x1055e0=_0x2f80b2(0x1f9)+_0xe5ba27();this[_0x2f80b2(0x1fa)](_0x1055e0);const _0x2386e5=_0x2f80b2(0x1f9)+_0xe5ba27();try{this[_0x2f80b2(0x24c)]({'type':_0x4c0062[_0x2f80b2(0x1fe)],'label':_0x809454?.[_0x2f80b2(0x244)]||_0x30ab5c,'uiId':_0x2386e5,'resourceId':_0x809454?.[_0x2f80b2(0x270)]},!0x0);const _0xcecb82=this[_0x2f80b2(0x26e)][_0x2f80b2(0x1f4)](this[_0x2f80b2(0x21e)],_0x30ab5c,_0x809454);this[_0x2f80b2(0x235)][_0x2f80b2(0x260)](_0x2386e5,_0xcecb82[_0x2f80b2(0x213)]);const {id:_0x1037c7}=await _0xcecb82[_0x2f80b2(0x24e)]();this[_0x2f80b2(0x235)][_0x2f80b2(0x1ec)](_0x2386e5),this[_0x2f80b2(0x208)]({'type':_0x4c0062[_0x2f80b2(0x1fe)],'id':_0x1037c7,'label':_0x809454?.[_0x2f80b2(0x244)]||_0x30ab5c,'uiId':_0x2386e5,'resourceId':_0x809454?.[_0x2f80b2(0x270)]},!0x1);}catch(_0x2799dc){this[_0x2f80b2(0x235)][_0x2f80b2(0x1ec)](_0x2386e5),(_0x2799dc[_0x2f80b2(0x251)][_0x2f80b2(0x1fd)](_0x2f80b2(0x231))||this[_0x2f80b2(0x26f)](_0x2f80b2(0x271),{'error':new _0x3c7f74(_0x2f80b2(0x237),this,{'url':_0x30ab5c,'originalError':_0x2799dc}),'url':_0x30ab5c}),this[_0x2f80b2(0x1ef)](_0x2386e5));}finally{this[_0x2f80b2(0x224)](_0x1055e0);}}async[_0x112097(0x24f)](_0x13f825,_0x2934a1,_0x4eab0d){const _0x4be432=_0x112097,_0x458fb8=this[_0x4be432(0x205)][_0x4be432(0x23e)][_0x4be432(0x242)](_0x3ce996=>_0x3ce996['id']===_0x13f825);if(!_0x458fb8)return this[_0x4be432(0x26f)](_0x4be432(0x271),{'error':new _0x3c7f74(_0x4be432(0x269),this,{'sourceId':_0x13f825}),'sourceId':_0x13f825}),[];try{const _0x45469a=(await _0x458fb8[_0x4be432(0x218)](_0x2934a1))[_0x4be432(0x230)](_0x5689fa=>{const _0x5ce90f=_0x4be432,_0x3adbda=this[_0x5ce90f(0x209)](_0x5689fa['id']);return{..._0x5689fa,'isInContext':_0x3adbda};});return _0x458fb8[_0x4be432(0x22e)]=_0x45469a,this[_0x4be432(0x26f)](_0x4be432(0x227),{'sourceId':_0x13f825,'source':_0x458fb8,'resources':_0x45469a,'uid':_0x4eab0d}),_0x45469a;}catch(_0x49310d){return this[_0x4be432(0x26f)](_0x4be432(0x271),{'error':new _0x3c7f74(_0x4be432(0x232),this,{'sourceId':_0x13f825,'originalError':_0x49310d}),'sourceId':_0x13f825,'sourceLabel':_0x458fb8[_0x4be432(0x244)]}),[];}}async[_0x112097(0x262)](_0x1176fd,_0x4c77fa){const _0xe05189=_0x112097;if(this[_0xe05189(0x209)](_0x4c77fa['id']))return;let _0x41f896=_0x4c77fa[_0xe05189(0x21f)];if(!_0x41f896&&_0x1176fd[_0xe05189(0x26d)])try{_0x41f896=await _0x1176fd[_0xe05189(0x26d)](_0x4c77fa['id']);}catch(_0x13b766){return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x20f),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'originalError':_0x13b766}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}if(_0x41f896)switch(_0x4c77fa[_0xe05189(0x21d)]){case _0x4c0062[_0xe05189(0x1fe)]:if(_0xe05189(0x22f)!=typeof _0x41f896)return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x22f),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});await this[_0xe05189(0x221)](_0x41f896,{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']});break;case _0x4c0062[_0xe05189(0x206)]:if(!(_0x41f896 instanceof File))return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x204),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});await this[_0xe05189(0x22c)]([_0x41f896],{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']});break;case _0x4c0062[_0xe05189(0x1fb)]:if(_0xe05189(0x223)!=typeof _0x41f896||!(_0xe05189(0x266)in _0x41f896)||!(_0xe05189(0x21d)in _0x41f896))return void this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x1e3),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'expectedType':_0xe05189(0x20e),'actualType':typeof _0x41f896}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});_0x41f896=AIChatContext[_0xe05189(0x26c)](_0x41f896,_0x4c77fa[_0xe05189(0x244)]),await this[_0xe05189(0x22c)]([_0x41f896],{'label':_0x4c77fa[_0xe05189(0x244)],'resourceId':_0x4c77fa['id']},_0x4c0062[_0xe05189(0x1fb)]);break;default:this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x239),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id'],'resourceType':_0x4c77fa[_0xe05189(0x21d)]}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}else this[_0xe05189(0x26f)](_0xe05189(0x271),{'error':new _0x3c7f74(_0xe05189(0x25f),this,{'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']}),'resourceId':_0x4c77fa['id'],'sourceId':_0x1176fd['id']});}static[_0x112097(0x26c)](_0xb7a7d4,_0x4221c4){const _0x4510c9=_0x112097;switch(_0xb7a7d4[_0x4510c9(0x21d)]){case _0x26dfe0[_0x4510c9(0x246)]:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x21a)});case _0x26dfe0[_0x4510c9(0x225)]:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x20c)});default:return new File([_0xb7a7d4[_0x4510c9(0x266)]],_0x4221c4,{'type':_0x4510c9(0x226)});}}static[_0x112097(0x21c)](_0x48cf5d){const _0x4afb58=_0x112097;switch(_0x48cf5d[_0x4afb58(0x21d)]){case _0x4c0062[_0x4afb58(0x206)]:return{'type':_0x4c0062[_0x4afb58(0x206)],'id':_0x48cf5d['id']};case _0x4c0062[_0x4afb58(0x1fe)]:return{'type':_0x4c0062[_0x4afb58(0x1fe)],'id':_0x48cf5d['id']};case _0x4c0062[_0x4afb58(0x265)]:return{'type':_0x4c0062[_0x4afb58(0x265)],'id':_0x48cf5d['id'],..._0x48cf5d[_0x4afb58(0x22d)]?.[_0x4afb58(0x248)]&&{'selection':_0x48cf5d[_0x4afb58(0x22d)]}};case _0x4c0062[_0x4afb58(0x1fb)]:return{'type':_0x4c0062[_0x4afb58(0x206)],'id':_0x48cf5d['id']};default:return null;}}[_0x112097(0x24c)](_0x478270,_0x23d35d=!0x1){const _0xe946b6=_0x112097;if(this[_0xe946b6(0x258)][_0xe946b6(0x260)](_0x478270[_0xe946b6(0x250)],_0x478270),_0x478270[_0xe946b6(0x203)]||this[_0xe946b6(0x26f)](_0xe946b6(0x245),{'contextItem':_0x478270,'isLoading':_0x23d35d}),_0xe946b6(0x241)===_0x478270[_0xe946b6(0x250)]&&this[_0xe946b6(0x26b)](),_0x478270[_0xe946b6(0x270)]){const _0xdc7b19=this[_0xe946b6(0x1eb)](_0x478270[_0xe946b6(0x270)]);_0xdc7b19&&_0xdc7b19[_0xe946b6(0x247)](_0x3a5176=>{const _0x4208bb=_0xe946b6;this[_0x4208bb(0x25a)](_0x3a5176,_0x478270[_0x4208bb(0x270)],!0x0);});}}[_0x112097(0x1ef)](_0x38cdd6){const _0x3d2f9c=_0x112097,_0x278409=this[_0x3d2f9c(0x258)][_0x3d2f9c(0x1f3)](_0x38cdd6),_0x2434b4=this[_0x3d2f9c(0x235)][_0x3d2f9c(0x1f3)](_0x38cdd6);if(_0x2434b4&&(_0x2434b4[_0x3d2f9c(0x268)](),this[_0x3d2f9c(0x235)][_0x3d2f9c(0x1ec)](_0x38cdd6)),_0x278409?.[_0x3d2f9c(0x270)]){const _0x57c8e5=this[_0x3d2f9c(0x1eb)](_0x278409[_0x3d2f9c(0x270)]);_0x57c8e5&&_0x57c8e5[_0x3d2f9c(0x247)](_0x6aba1d=>{const _0x3bcdbe=_0x3d2f9c;this[_0x3bcdbe(0x25a)](_0x6aba1d,_0x278409[_0x3bcdbe(0x270)],!0x1);});}this[_0x3d2f9c(0x258)][_0x3d2f9c(0x1ec)](_0x38cdd6),this[_0x3d2f9c(0x26f)](_0x3d2f9c(0x253),{'uiId':_0x38cdd6,'type':_0x278409?.[_0x3d2f9c(0x21d)]}),_0x3d2f9c(0x241)===_0x38cdd6&&this[_0x3d2f9c(0x26b)]();}[_0x112097(0x208)](_0x4dcc3f,_0x401905){const _0x43084e=_0x112097;if(this[_0x43084e(0x258)][_0x43084e(0x254)](_0x4dcc3f[_0x43084e(0x250)])&&(this[_0x43084e(0x258)][_0x43084e(0x260)](_0x4dcc3f[_0x43084e(0x250)],_0x4dcc3f),this[_0x43084e(0x26f)](_0x43084e(0x22b),{'contextItem':_0x4dcc3f,'isLoading':_0x401905}),_0x4dcc3f[_0x43084e(0x270)])){const _0x1578e6=this[_0x43084e(0x1eb)](_0x4dcc3f[_0x43084e(0x270)]);_0x1578e6&&_0x1578e6[_0x43084e(0x247)](_0x48030c=>{const _0x36ec4f=_0x43084e;this[_0x36ec4f(0x25a)](_0x48030c,_0x4dcc3f[_0x36ec4f(0x270)],!0x0);});}}[_0x112097(0x202)](_0x567c9a){const _0x10e592=_0x112097;this[_0x10e592(0x23b)][_0x10e592(0x260)](_0x567c9a[_0x10e592(0x250)],_0x567c9a);}[_0x112097(0x22a)](){const _0x50e5d6=_0x112097;this[_0x50e5d6(0x205)]={'document':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x229)]?.[_0x50e5d6(0x217)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x26a)]?.[_0x50e5d6(0x217)]},'files':{'enabled':!0x1!==this[_0x50e5d6(0x20b)]?.[_0x50e5d6(0x1fc)]?.[_0x50e5d6(0x217)]},'sources':this[_0x50e5d6(0x1e4)]()},this[_0x50e5d6(0x26f)](_0x50e5d6(0x212),{'options':this[_0x50e5d6(0x205)]});}[_0x112097(0x1e4)](){const _0x343f1b=_0x112097;return this[_0x343f1b(0x20b)]?.[_0x343f1b(0x23e)]?.[_0x343f1b(0x230)](_0x5707ba=>({..._0x5707ba,'resources':[]}))??[];}[_0x112097(0x26b)](){const _0x5c1c8f=_0x112097,_0x551d22=this[_0x5c1c8f(0x1f7)]()||this[_0x5c1c8f(0x233)]();this[_0x5c1c8f(0x205)][_0x5c1c8f(0x229)][_0x5c1c8f(0x207)]=_0x551d22,this[_0x5c1c8f(0x26f)](_0x5c1c8f(0x212),{'options':this[_0x5c1c8f(0x205)]});}[_0x112097(0x209)](_0x330cb0){const _0x1b057f=_0x112097;for(const _0x14a1ed of this[_0x1b057f(0x258)][_0x1b057f(0x1e8)]())if(_0x14a1ed[_0x1b057f(0x270)]===_0x330cb0)return!0x0;for(const _0x20222d of this[_0x1b057f(0x23b)][_0x1b057f(0x1e8)]())if(_0x20222d[_0x1b057f(0x270)]===_0x330cb0)return!0x0;return!0x1;}[_0x112097(0x1eb)](_0x41432){const _0x523d23=_0x112097,_0x25f2ff=[];for(const _0x5d7a41 of this[_0x523d23(0x205)][_0x523d23(0x23e)]){_0x5d7a41[_0x523d23(0x22e)][_0x523d23(0x242)](_0x18a676=>_0x18a676['id']===_0x41432)&&_0x25f2ff[_0x523d23(0x256)](_0x5d7a41['id']);}return 0x0===_0x25f2ff[_0x523d23(0x248)]?null:_0x25f2ff;}[_0x112097(0x25a)](_0x136b3d,_0x2c1f9d,_0x4bcdc9){const _0x37220c=_0x112097,_0x8399f1=this[_0x37220c(0x205)][_0x37220c(0x23e)][_0x37220c(0x242)](_0x1c1e45=>_0x1c1e45['id']===_0x136b3d);if(!_0x8399f1)return;const _0x4f2e0f=_0x8399f1[_0x37220c(0x22e)][_0x37220c(0x242)](_0x1cd4be=>_0x1cd4be['id']===_0x2c1f9d);_0x4f2e0f&&(_0x4f2e0f[_0x37220c(0x214)]=_0x4bcdc9,this[_0x37220c(0x26f)](_0x37220c(0x1e9),{'sourceId':_0x136b3d,'resourceId':_0x2c1f9d,'isInContext':_0x4bcdc9}));}[_0x112097(0x1fa)](_0x1086d2){const _0xd58040=_0x112097;this[_0xd58040(0x25b)][_0xd58040(0x260)](_0x1086d2,!0x0),this[_0xd58040(0x25b)][_0xd58040(0x216)]&&this[_0xd58040(0x26f)](_0xd58040(0x1f8),{'isUploadInProgress':!0x0});}[_0x112097(0x224)](_0x1ac065){const _0x1cc133=_0x112097;this[_0x1cc133(0x25b)][_0x1cc133(0x1ec)](_0x1ac065),0x0===this[_0x1cc133(0x25b)][_0x1cc133(0x216)]&&this[_0x1cc133(0x26f)](_0x1cc133(0x1f8),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x300448=_0x2a1a;(function(_0x2f810b,_0x26dc24){const _0x19fc33=_0x2a1a,_0x4cae77=_0x2f810b();while(!![]){try{const _0x23fc62=parseInt(_0x19fc33(0x16f))/0x1*(-parseInt(_0x19fc33(0x18c))/0x2)+parseInt(_0x19fc33(0x195))/0x3+parseInt(_0x19fc33(0x159))/0x4*(-parseInt(_0x19fc33(0x1b0))/0x5)+-parseInt(_0x19fc33(0x17b))/0x6*(parseInt(_0x19fc33(0x188))/0x7)+parseInt(_0x19fc33(0x183))/0x8*(parseInt(_0x19fc33(0x151))/0x9)+parseInt(_0x19fc33(0x15f))/0xa+parseInt(_0x19fc33(0x158))/0xb;if(_0x23fc62===_0x26dc24)break;else _0x4cae77['push'](_0x4cae77['shift']());}catch(_0x325ec4){_0x4cae77['push'](_0x4cae77['shift']());}}}(_0x648d,0x63458));import{CKEditorError as _0x20794c,EmitterMixin as _0x42e186,logWarning as _0x1be831}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x4c8bba}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1250c8,AI_CONTEXT_MODEL_EVENT_NAMES as _0x19287a}from'./aichatcontext.js';import{AICapabilities as _0x109a37,CAPABILITIES_MODEL_EVENT_NAMES as _0x2accd0}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x571219}from'./aichatinteraction.js';import{errorsMap as _0x2a96f5}from'../../errorsmap.js';function _0x648d(){const _0x142c38=['prompt','interactions','handleUserInteraction','selectedModel','text','init','interactionCreated','removeInteraction','startConversation','text-delta','removeSelectionFromContext','webSearch','_processMessagesToInteractions','destroy','getConversation','updateCurrentDocumentInContext','isCurrentDocumentInConversation','ai-chat-conversation-init-from-id-failed','currentInteraction','addSelectionToContext','createInteraction','chatModels','conversationId','getCapabilitiesConfig','ai-chat-conversation-start-no-model-selected','addCurrentDocumentToContext','5ULKtTh','setModel','contextItems','title','start','getPendingContextItems','reasoning','addResourceToContext','error','getAvailableModels','hasOwn','options','updateCurrentDocument','modelSelected','ai-chat-handle-user-interaction-already-in-progress','chatCapabilities','removeFromContext','splice','getMessages','setConversationTitle','addUrlToContext','role','fetchConversationMessages','populateFromMessage','117mGSkRg','appendContent','ai-chat-conversation-set-model-not-available','fire','type','stop','addFilesToContext','3122361wqWTke','1481544fdzhgn','user','find','getDocumentContext','ai-chat-conversation-already-started','chatContext','3401590DjgMBx','model','indexOf','ai-chat-conversation-set-model-null','get','toggleReasoning','isAvailable','capabilities','fetchConversation','conversationInitialized','getModel','getInteraction','load','addToConversationContext','set','createReply','54myhcXb','ai-chat-handle-user-conversation-not-initialized','getEditor','attributes','currentReply','ai-chat-handle-user-interaction-start-failed','code','push','modification-delta','length','group','getAll','132SqEoOk','selectedModelId','getCurrentDocumentContext','message','content','lastInteraction','isSelectionInContext','isStarted','44072SUFOhc','assistant','loadSourceResources','ai-chat-conversation-init-failed','quickActionData','145831FKtcVN','delegate','toLowerCase','conversationStarted','6818hGvpwR','_extractContextItems','stack','toggleWebSearch','connector','ai-chat-conversation-start-failed','sessionId','reset','isCurrentDocumentInContext','2171361apskSB'];_0x648d=function(){return _0x142c38;};return _0x648d();}function _0x2a1a(_0x1551f7,_0x125c6b){const _0x648d98=_0x648d();return _0x2a1a=function(_0x2a1a58,_0xd36036){_0x2a1a58=_0x2a1a58-0x13c;let _0x448984=_0x648d98[_0x2a1a58];return _0x448984;},_0x2a1a(_0x1551f7,_0x125c6b);}export class AIChatConversation extends _0x42e186(){['id'];[_0x300448(0x182)]=!0x1;[_0x300448(0x197)]=[];[_0x300448(0x1a8)];[_0x300448(0x199)];[_0x300448(0x190)];[_0x300448(0x144)];constructor(_0x4a84d8){const _0x5b1596=_0x300448;super(),this[_0x5b1596(0x144)]=_0x4a84d8,this[_0x5b1596(0x190)]=_0x4a84d8[_0x5b1596(0x190)],this[_0x5b1596(0x1ab)]=_0x4a84d8[_0x5b1596(0x1ab)],this['id']=_0x4a84d8[_0x5b1596(0x1ac)];}async[_0x300448(0x19b)](_0x22dbc6){const _0x4b591a=_0x300448;try{this[_0x4b591a(0x15e)]=new _0x1250c8({'connector':this[_0x4b591a(0x190)],'config':_0x22dbc6,'ownerId':this['id']}),this[_0x4b591a(0x15e)][_0x4b591a(0x189)](..._0x19287a)['to'](this),this[_0x4b591a(0x15e)][_0x4b591a(0x19b)](),this[_0x4b591a(0x148)]=new _0x109a37(),this[_0x4b591a(0x148)][_0x4b591a(0x189)](..._0x2accd0)['to'](this),this[_0x4b591a(0x148)][_0x4b591a(0x19b)]();const _0x5b37b0=await this[_0x4b591a(0x1ab)][_0x4b591a(0x142)]();this[_0x4b591a(0x154)](_0x4b591a(0x168),{'availableModels':_0x5b37b0});const _0x57b841=await this[_0x4b591a(0x1ab)][_0x4b591a(0x169)](this[_0x4b591a(0x144)][_0x4b591a(0x17c)]);_0x57b841&&await this[_0x4b591a(0x1b1)](_0x57b841);}catch(_0x722074){const _0x5a05a2=new _0x20794c(_0x4b591a(0x186),null,{'message':_0x722074[_0x4b591a(0x17e)]||_0x722074});_0x5a05a2[_0x4b591a(0x18e)]=_0x722074[_0x4b591a(0x18e)],this[_0x4b591a(0x154)](_0x4b591a(0x141),{'error':_0x5a05a2});}}async[_0x300448(0x13d)](){const _0x13b2cc=_0x300448;if(this[_0x13b2cc(0x182)])throw new _0x20794c(_0x13b2cc(0x15d),null,{'conversation':this});if(!this[_0x13b2cc(0x199)])throw new _0x20794c(_0x13b2cc(0x1ae),null,{'conversation':this});try{const {id:_0x238a66}=await this[_0x13b2cc(0x190)][_0x13b2cc(0x19e)](this['id'],this[_0x13b2cc(0x144)][_0x13b2cc(0x179)])[_0x13b2cc(0x1a4)]();this['id']=_0x238a66,this[_0x13b2cc(0x182)]=!0x0,this[_0x13b2cc(0x154)](_0x13b2cc(0x18b),{'conversationId':this['id'],'selectedModel':this[_0x13b2cc(0x199)]});}catch(_0x296e46){const _0x1e06ec=new _0x20794c(_0x13b2cc(0x191),null,{'message':_0x296e46[_0x13b2cc(0x17e)],'conversationId':this['id']});throw _0x1e06ec[_0x13b2cc(0x18e)]=_0x296e46[_0x13b2cc(0x18e)],this[_0x13b2cc(0x154)](_0x13b2cc(0x141),{'error':_0x1e06ec}),_0x1e06ec;}}async[_0x300448(0x16b)](_0x5d1f59,_0x2ce869){const _0x588562=_0x300448;try{const _0x14e1f4=await this[_0x588562(0x190)][_0x588562(0x167)](_0x5d1f59)[_0x588562(0x1a4)](),_0x5c6893=await this[_0x588562(0x190)][_0x588562(0x14f)](_0x5d1f59)[_0x588562(0x14b)](),_0x1815c5=_0x5c6893[0x0][_0x588562(0x160)];this[_0x588562(0x182)]=!0x0,this['id']=_0x14e1f4['id'],_0x588562(0x13c)in _0x14e1f4?this[_0x588562(0x154)](_0x588562(0x14c),_0x14e1f4[_0x588562(0x13c)],!0x0):this[_0x588562(0x154)](_0x588562(0x14c),'',!0x0);const _0x25e721=(await this[_0x588562(0x1ab)][_0x588562(0x17a)]())[_0x588562(0x15b)](_0x55a2b5=>_0x55a2b5['id'][_0x588562(0x18a)]()===_0x1815c5[_0x588562(0x18a)]());return this[_0x588562(0x199)]=_0x25e721,this[_0x588562(0x154)](_0x588562(0x146),{'selectedModel':_0x25e721,'isDisabled':!0x0}),await this[_0x588562(0x1a2)](_0x5c6893,_0x2ce869,_0x1815c5),this[_0x588562(0x1a8)]=void 0x0,this;}catch(_0x5f3447){const _0x184b1e=new _0x20794c(_0x588562(0x1a7),null,{'message':_0x5f3447[_0x588562(0x17e)],'conversationId':_0x5d1f59});throw _0x184b1e[_0x588562(0x18e)]=_0x5f3447[_0x588562(0x18e)],this[_0x588562(0x154)](_0x588562(0x141),{'error':_0x184b1e}),_0x184b1e;}}async[_0x300448(0x1a2)](_0x2b9104,_0x4f04cf,_0x3763e4){const _0xc380e1=_0x300448;let _0x40ac90;for(const _0x55e17e of _0x2b9104)if(_0xc380e1(0x15a)===_0x55e17e[_0xc380e1(0x14e)]){const _0x362aaa=await this[_0xc380e1(0x18d)](_0x55e17e),_0x531a9c={'isReasoningEnabled':Object[_0xc380e1(0x143)](_0x55e17e[_0xc380e1(0x166)],_0xc380e1(0x13f)),'isWebSearchEnabled':Object[_0xc380e1(0x143)](_0x55e17e[_0xc380e1(0x166)],_0xc380e1(0x1a1))};_0x40ac90=this[_0xc380e1(0x1aa)]({'userMessage':_0x55e17e[_0xc380e1(0x196)],'contextItems':_0x362aaa,'capabilities':_0x531a9c,'modelId':_0x3763e4,'quickActionData':_0x55e17e[_0xc380e1(0x172)]?.[_0xc380e1(0x187)]}),this[_0xc380e1(0x1a8)]=_0x40ac90,this[_0xc380e1(0x15e)][_0xc380e1(0x16c)](this[_0xc380e1(0x1a8)][_0xc380e1(0x1b2)]);}else{if(_0xc380e1(0x184)===_0x55e17e[_0xc380e1(0x14e)]&&_0x40ac90)for(const _0x2084bb of _0x55e17e[_0xc380e1(0x17f)]){const _0x2cafa0=_0xc380e1(0x19a)===_0x2084bb[_0xc380e1(0x155)]?_0xc380e1(0x19f):_0xc380e1(0x177),_0x28941d=_0x40ac90[_0xc380e1(0x15c)]()?.[_0xc380e1(0x192)]!==_0x4f04cf;_0x40ac90[_0xc380e1(0x173)]=_0x40ac90[_0xc380e1(0x16e)]({'type':_0x2cafa0,'isDone':!0x0,'interactionId':_0x40ac90['id'],'areActionsDisabled':_0x28941d}),_0x40ac90[_0xc380e1(0x173)][_0xc380e1(0x152)](_0x2084bb[_0xc380e1(0x17f)]);}}}async[_0x300448(0x18d)](_0x12868c){const _0x58b10e=_0x300448,_0x10256a=new Map();if(!_0x12868c[_0x58b10e(0x17f)])return _0x10256a;for(const _0x49ebb6 of _0x12868c[_0x58b10e(0x17f)]){const _0x110a32=await this[_0x58b10e(0x15e)][_0x58b10e(0x150)](_0x49ebb6);_0x110a32&&_0x10256a[_0x58b10e(0x16d)](_0x110a32['id'],_0x110a32);}return _0x10256a;}async[_0x300448(0x198)]({userMessage:_0x1c225e,quickActionData:_0x405446}){const _0x2d725e=_0x300448;if(!this[_0x2d725e(0x182)])throw new _0x20794c(_0x2d725e(0x170),null,{'conversation':this});if(this[_0x2d725e(0x1a8)])throw new _0x20794c(_0x2d725e(0x147),null,{'conversation':this});try{const _0x14a31b=this[_0x2d725e(0x15e)][_0x2d725e(0x13e)](),_0x14247a=this[_0x2d725e(0x148)][_0x2d725e(0x1ad)](),_0x2cd9af=this[_0x2d725e(0x199)]['id'];this[_0x2d725e(0x1a8)]=this[_0x2d725e(0x1aa)]({'userMessage':_0x1c225e,'contextItems':_0x14a31b,'capabilities':_0x14247a,'modelId':_0x2cd9af,'quickActionData':_0x405446}),await this[_0x2d725e(0x1a8)][_0x2d725e(0x13d)](),this[_0x2d725e(0x15e)][_0x2d725e(0x16c)](this[_0x2d725e(0x1a8)][_0x2d725e(0x1b2)]);}catch(_0x3bbe65){if(_0x3bbe65 instanceof _0x20794c)this[_0x2d725e(0x154)](_0x2d725e(0x141),{'interactionId':this[_0x2d725e(0x1a8)]?this[_0x2d725e(0x1a8)]['id']:void 0x0,'error':_0x3bbe65});else{const _0x5ab661=_0x2a96f5[_0x2d725e(0x163)](_0x3bbe65[_0x2d725e(0x175)])||_0x2d725e(0x174);this[_0x2d725e(0x154)](_0x2d725e(0x141),{'interactionId':this[_0x2d725e(0x1a8)]?this[_0x2d725e(0x1a8)]['id']:void 0x0,'error':new _0x20794c(_0x5ab661,null,{'error':_0x3bbe65})});}}finally{this[_0x2d725e(0x1a8)]?.[_0x2d725e(0x156)](),this[_0x2d725e(0x1a8)]=void 0x0;}}[_0x300448(0x1aa)]({userMessage:_0x3f504d,contextItems:_0x2ff6eb,capabilities:_0x4792c4,modelId:_0x316c50,quickActionData:_0x2278a7}){const _0x13a023=_0x300448,_0xa136cc=new _0x571219({'userMessage':_0x3f504d,'contextItems':_0x2ff6eb,'capabilities':_0x4792c4,'conversationId':this['id'],'connector':this[_0x13a023(0x190)],'editor':this[_0x13a023(0x144)][_0x13a023(0x171)]&&this[_0x13a023(0x144)][_0x13a023(0x171)](),'model':_0x316c50,'quickActionData':_0x2278a7});return _0xa136cc[_0x13a023(0x189)](..._0x4c8bba)['to'](this),this[_0x13a023(0x197)][_0x13a023(0x176)](_0xa136cc),this[_0x13a023(0x154)](_0x13a023(0x19c),_0xa136cc),_0xa136cc;}[_0x300448(0x16a)](_0x12c0ef){const _0x1cd5b6=_0x300448;return this[_0x1cd5b6(0x197)][_0x1cd5b6(0x15b)](_0x3b96d3=>_0x3b96d3['id']===_0x12c0ef);}[_0x300448(0x19d)](_0x38aab8){const _0x5de581=_0x300448,_0x3d7ee3=this[_0x5de581(0x16a)](_0x38aab8);_0x3d7ee3&&(_0x3d7ee3[_0x5de581(0x1a3)](),this[_0x5de581(0x197)][_0x5de581(0x14a)](this[_0x5de581(0x197)][_0x5de581(0x161)](_0x3d7ee3),0x1));}get[_0x300448(0x180)](){const _0x1cbbc4=_0x300448;return this[_0x1cbbc4(0x197)][this[_0x1cbbc4(0x197)][_0x1cbbc4(0x178)]-0x1];}[_0x300448(0x1af)](_0x3e91a8){const _0x36461a=_0x300448;this[_0x36461a(0x15e)][_0x36461a(0x1af)](_0x3e91a8);}async[_0x300448(0x1a5)]({content:_0x11be5c,version:_0x22ab38,sessionId:_0x413023,selections:_0xfcd026}){const _0x1f920c=_0x300448;await this[_0x1f920c(0x15e)][_0x1f920c(0x145)](_0x11be5c,_0x22ab38,_0x413023,_0xfcd026);}[_0x300448(0x17d)](){const _0x102193=_0x300448;return this[_0x102193(0x1a8)]?.[_0x102193(0x15c)]()?.[_0x102193(0x17f)]||'';}[_0x300448(0x1a9)](_0x45ea40){const _0x46262a=_0x300448;this[_0x46262a(0x15e)][_0x46262a(0x1a9)](_0x45ea40);}[_0x300448(0x1a0)](){const _0x49822c=_0x300448;this[_0x49822c(0x15e)][_0x49822c(0x1a0)]();}[_0x300448(0x157)](_0x279d2b){const _0x1c74a6=_0x300448;this[_0x1c74a6(0x15e)][_0x1c74a6(0x157)](_0x279d2b);}[_0x300448(0x14d)](_0x119e09){const _0x512cff=_0x300448;this[_0x512cff(0x15e)][_0x512cff(0x14d)](_0x119e09);}[_0x300448(0x140)](_0x531981,_0x7e55ef){const _0x5691e5=_0x300448;this[_0x5691e5(0x15e)][_0x5691e5(0x140)](_0x531981,_0x7e55ef);}[_0x300448(0x185)](_0x31e2cb,_0x2a3e26,_0x9ccc79){const _0x9dbf88=_0x300448;return this[_0x9dbf88(0x15e)][_0x9dbf88(0x185)](_0x31e2cb,_0x2a3e26,_0x9ccc79);}[_0x300448(0x149)](_0x1dd3a9){const _0x338364=_0x300448;this[_0x338364(0x15e)][_0x338364(0x149)](_0x1dd3a9);}[_0x300448(0x18f)](){const _0x536808=_0x300448;this[_0x536808(0x148)][_0x536808(0x18f)]();}[_0x300448(0x164)](){const _0x15bfd8=_0x300448;this[_0x15bfd8(0x148)][_0x15bfd8(0x164)]();}[_0x300448(0x194)](){const _0x10dde0=_0x300448;return this[_0x10dde0(0x15e)][_0x10dde0(0x194)]();}[_0x300448(0x1a6)](){const _0x5818f9=_0x300448;return this[_0x5818f9(0x15e)][_0x5818f9(0x1a6)]();}[_0x300448(0x181)](){const _0x2e8ecc=_0x300448;return this[_0x2e8ecc(0x15e)][_0x2e8ecc(0x181)]();}async[_0x300448(0x1b1)](_0x30bfe0){const _0x321ce7=_0x300448;_0x30bfe0?!0x1===await this[_0x321ce7(0x1ab)][_0x321ce7(0x165)](_0x30bfe0)&&(_0x1be831(_0x321ce7(0x153),{'conversation':this,'model':_0x30bfe0}),_0x30bfe0=(await this[_0x321ce7(0x1ab)][_0x321ce7(0x142)]())[0x0]):(_0x1be831(_0x321ce7(0x162),{'conversation':this}),_0x30bfe0=(await this[_0x321ce7(0x1ab)][_0x321ce7(0x142)]())[0x0]),_0x30bfe0['id']!==this[_0x321ce7(0x199)]?.['id']&&(this[_0x321ce7(0x199)]=_0x30bfe0,this[_0x321ce7(0x148)][_0x321ce7(0x193)](),this[_0x321ce7(0x154)](_0x321ce7(0x146),{'selectedModel':_0x30bfe0}));}}
23
+ function _0x29e7(){const _0x4493d0=['isStarted','lastInteraction','message','237910fNDhqq','ai-chat-conversation-set-model-null','getCurrentDocumentContext','addCurrentDocumentToContext','ai-chat-handle-user-conversation-not-initialized','ai-chat-conversation-set-model-not-available','addResourceToContext','handleUserInteraction','ai-chat-handle-user-interaction-already-in-progress','loadSourceResources','currentReply','type','removeSelectionFromContext','model','createReply','sessionId','getConversation','isAvailable','title','getCapabilitiesConfig','ai-chat-conversation-start-failed','capabilities','createInteraction','delegate','ai-chat-handle-user-interaction-start-failed','conversationStarted','fire','setModel','891104uAdVAL','getEditor','error','quickActionData','removeInteraction','modelSelected','populateFromMessage','isSelectionInContext','chatCapabilities','isCurrentDocumentInContext','interactionCreated','setConversationTitle','content','reset','_processMessagesToInteractions','addToConversationContext','updateCurrentDocument','group','65872tdXgBn','user','modification-delta','81sSAjjY','chatContext','init','6iRNpwL','selectedModelId','find','startConversation','length','updateCurrentDocumentInContext','prompt','getModel','start','toLowerCase','fetchConversation','conversationId','selectedModel','addUrlToContext','text','contextItems','3491940kpDDGP','ai-chat-conversation-init-from-id-failed','set','getInteraction','options','removeFromContext','stack','ai-chat-conversation-init-failed','toggleWebSearch','fetchConversationMessages','code','destroy','push','ai-chat-conversation-start-no-model-selected','reasoning','attributes','indexOf','text-delta','isCurrentDocumentInConversation','18HokEdJ','conversationInitialized','currentInteraction','connector','getPendingContextItems','chatModels','getAvailableModels','addSelectionToContext','stop','_extractContextItems','getMessages','addFilesToContext','get','appendContent','webSearch','assistant','899481SvVmHQ','2349858yjAsRN','780056YolyVG','ai-chat-conversation-already-started','hasOwn','splice','toggleReasoning','getDocumentContext','role','getAll','interactions','load'];_0x29e7=function(){return _0x4493d0;};return _0x29e7();}const _0x27180e=_0x46c7;(function(_0x52fc7f,_0x17b6ae){const _0x55904d=_0x46c7,_0x864039=_0x52fc7f();while(!![]){try{const _0x3130f1=parseInt(_0x55904d(0x1a8))/0x1+parseInt(_0x55904d(0x16f))/0x2*(parseInt(_0x55904d(0x198))/0x3)+-parseInt(_0x55904d(0x15d))/0x4+parseInt(_0x55904d(0x1b7))/0x5*(-parseInt(_0x55904d(0x175))/0x6)+parseInt(_0x55904d(0x1a9))/0x7+parseInt(_0x55904d(0x1aa))/0x8*(-parseInt(_0x55904d(0x172))/0x9)+parseInt(_0x55904d(0x185))/0xa;if(_0x3130f1===_0x17b6ae)break;else _0x864039['push'](_0x864039['shift']());}catch(_0x5986fc){_0x864039['push'](_0x864039['shift']());}}}(_0x29e7,0x9acd0));function _0x46c7(_0x2396db,_0x43ee06){const _0x29e7a9=_0x29e7();return _0x46c7=function(_0x46c786,_0x2e1762){_0x46c786=_0x46c786-0x158;let _0x35dc4=_0x29e7a9[_0x46c786];return _0x35dc4;},_0x46c7(_0x2396db,_0x43ee06);}import{CKEditorError as _0x58cf55,EmitterMixin as _0x392dce,logWarning as _0x3e202a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x37efe1}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x501822,AI_CONTEXT_MODEL_EVENT_NAMES as _0x33dd08}from'./aichatcontext.js';import{AICapabilities as _0x59e187,CAPABILITIES_MODEL_EVENT_NAMES as _0x58600e}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x35f633}from'./aichatinteraction.js';import{errorsMap as _0xb34857}from'../../errorsmap.js';export class AIChatConversation extends _0x392dce(){['id'];[_0x27180e(0x1b4)]=!0x1;[_0x27180e(0x1b2)]=[];[_0x27180e(0x19a)];[_0x27180e(0x181)];[_0x27180e(0x19b)];[_0x27180e(0x189)];constructor(_0x468cc0){const _0x5f4ee6=_0x27180e;super(),this[_0x5f4ee6(0x189)]=_0x468cc0,this[_0x5f4ee6(0x19b)]=_0x468cc0[_0x5f4ee6(0x19b)],this[_0x5f4ee6(0x19d)]=_0x468cc0[_0x5f4ee6(0x19d)],this['id']=_0x468cc0[_0x5f4ee6(0x180)];}async[_0x27180e(0x174)](_0x1b2b6c){const _0x508473=_0x27180e;try{this[_0x508473(0x173)]=new _0x501822({'connector':this[_0x508473(0x19b)],'config':_0x1b2b6c,'ownerId':this['id']}),this[_0x508473(0x173)][_0x508473(0x158)](..._0x33dd08)['to'](this),this[_0x508473(0x173)][_0x508473(0x174)](),this[_0x508473(0x165)]=new _0x59e187(),this[_0x508473(0x165)][_0x508473(0x158)](..._0x58600e)['to'](this),this[_0x508473(0x165)][_0x508473(0x174)]();const _0x56c6b5=await this[_0x508473(0x19d)][_0x508473(0x19e)]();this[_0x508473(0x15b)](_0x508473(0x199),{'availableModels':_0x56c6b5});const _0x1d6f69=await this[_0x508473(0x19d)][_0x508473(0x17c)](this[_0x508473(0x189)][_0x508473(0x176)]);_0x1d6f69&&await this[_0x508473(0x15c)](_0x1d6f69);}catch(_0x5b82fb){const _0x33d983=new _0x58cf55(_0x508473(0x18c),null,{'message':_0x5b82fb[_0x508473(0x1b6)]||_0x5b82fb});_0x33d983[_0x508473(0x18b)]=_0x5b82fb[_0x508473(0x18b)],this[_0x508473(0x15b)](_0x508473(0x15f),{'error':_0x33d983});}}async[_0x27180e(0x17d)](){const _0x56d21e=_0x27180e;if(this[_0x56d21e(0x1b4)])throw new _0x58cf55(_0x56d21e(0x1ab),null,{'conversation':this});if(!this[_0x56d21e(0x181)])throw new _0x58cf55(_0x56d21e(0x192),null,{'conversation':this});try{const {id:_0x41b3f5}=await this[_0x56d21e(0x19b)][_0x56d21e(0x178)](this['id'],this[_0x56d21e(0x189)][_0x56d21e(0x16e)])[_0x56d21e(0x1c7)]();this['id']=_0x41b3f5,this[_0x56d21e(0x1b4)]=!0x0,this[_0x56d21e(0x15b)](_0x56d21e(0x15a),{'conversationId':this['id'],'selectedModel':this[_0x56d21e(0x181)]});}catch(_0x4da94e){const _0x1332a7=new _0x58cf55(_0x56d21e(0x1cb),null,{'message':_0x4da94e[_0x56d21e(0x1b6)],'conversationId':this['id']});throw _0x1332a7[_0x56d21e(0x18b)]=_0x4da94e[_0x56d21e(0x18b)],this[_0x56d21e(0x15b)](_0x56d21e(0x15f),{'error':_0x1332a7}),_0x1332a7;}}async[_0x27180e(0x1b3)](_0x214c2a,_0x888c60){const _0x3cc737=_0x27180e;try{const _0x3b5ca3=await this[_0x3cc737(0x19b)][_0x3cc737(0x17f)](_0x214c2a)[_0x3cc737(0x1c7)](),_0x5ef02d=await this[_0x3cc737(0x19b)][_0x3cc737(0x18e)](_0x214c2a)[_0x3cc737(0x1a2)](),_0x5522bf=_0x5ef02d[0x0][_0x3cc737(0x1c4)];this[_0x3cc737(0x1b4)]=!0x0,this['id']=_0x3b5ca3['id'],_0x3cc737(0x1c9)in _0x3b5ca3?this[_0x3cc737(0x15b)](_0x3cc737(0x168),_0x3b5ca3[_0x3cc737(0x1c9)],!0x0):this[_0x3cc737(0x15b)](_0x3cc737(0x168),'',!0x0);const _0x411087=(await this[_0x3cc737(0x19d)][_0x3cc737(0x1b1)]())[_0x3cc737(0x177)](_0x893406=>_0x893406['id'][_0x3cc737(0x17e)]()===_0x5522bf[_0x3cc737(0x17e)]());return this[_0x3cc737(0x181)]=_0x411087,this[_0x3cc737(0x15b)](_0x3cc737(0x162),{'selectedModel':_0x411087,'isDisabled':!0x0}),await this[_0x3cc737(0x16b)](_0x5ef02d,_0x888c60,_0x5522bf),this[_0x3cc737(0x19a)]=void 0x0,this;}catch(_0x1baf8f){const _0x280900=new _0x58cf55(_0x3cc737(0x186),null,{'message':_0x1baf8f[_0x3cc737(0x1b6)],'conversationId':_0x214c2a});throw _0x280900[_0x3cc737(0x18b)]=_0x1baf8f[_0x3cc737(0x18b)],this[_0x3cc737(0x15b)](_0x3cc737(0x15f),{'error':_0x280900}),_0x280900;}}async[_0x27180e(0x16b)](_0x4796bb,_0x1a7a3b,_0x436cf8){const _0x1345f4=_0x27180e;let _0x4711a5;for(const _0xea1e72 of _0x4796bb)if(_0x1345f4(0x170)===_0xea1e72[_0x1345f4(0x1b0)]){const _0x42ab69=await this[_0x1345f4(0x1a1)](_0xea1e72),_0x1c22cc={'isReasoningEnabled':Object[_0x1345f4(0x1ac)](_0xea1e72[_0x1345f4(0x1cc)],_0x1345f4(0x193)),'isWebSearchEnabled':Object[_0x1345f4(0x1ac)](_0xea1e72[_0x1345f4(0x1cc)],_0x1345f4(0x1a6))};_0x4711a5=this[_0x1345f4(0x1cd)]({'userMessage':_0xea1e72[_0x1345f4(0x17b)],'contextItems':_0x42ab69,'capabilities':_0x1c22cc,'modelId':_0x436cf8,'quickActionData':_0xea1e72[_0x1345f4(0x194)]?.[_0x1345f4(0x160)]}),this[_0x1345f4(0x19a)]=_0x4711a5,this[_0x1345f4(0x173)][_0x1345f4(0x16c)](this[_0x1345f4(0x19a)][_0x1345f4(0x184)]);}else{if(_0x1345f4(0x1a7)===_0xea1e72[_0x1345f4(0x1b0)]&&_0x4711a5)for(const _0x5ce84e of _0xea1e72[_0x1345f4(0x169)]){const _0x51fe54=_0x1345f4(0x183)===_0x5ce84e[_0x1345f4(0x1c2)]?_0x1345f4(0x196):_0x1345f4(0x171),_0x3b7632=_0x4711a5[_0x1345f4(0x1af)]()?.[_0x1345f4(0x1c6)]!==_0x1a7a3b;_0x4711a5[_0x1345f4(0x1c1)]=_0x4711a5[_0x1345f4(0x1c5)]({'type':_0x51fe54,'isDone':!0x0,'interactionId':_0x4711a5['id'],'areActionsDisabled':_0x3b7632}),_0x4711a5[_0x1345f4(0x1c1)][_0x1345f4(0x1a5)](_0x5ce84e[_0x1345f4(0x169)]);}}}async[_0x27180e(0x1a1)](_0x32631){const _0x5e17b9=_0x27180e,_0x38818b=new Map();if(!_0x32631[_0x5e17b9(0x169)])return _0x38818b;for(const _0x37b4d8 of _0x32631[_0x5e17b9(0x169)]){const _0x352133=await this[_0x5e17b9(0x173)][_0x5e17b9(0x163)](_0x37b4d8);_0x352133&&_0x38818b[_0x5e17b9(0x187)](_0x352133['id'],_0x352133);}return _0x38818b;}async[_0x27180e(0x1be)]({userMessage:_0x4bface,quickActionData:_0x2934c5}){const _0x154b6d=_0x27180e;if(!this[_0x154b6d(0x1b4)])throw new _0x58cf55(_0x154b6d(0x1bb),null,{'conversation':this});if(this[_0x154b6d(0x19a)])throw new _0x58cf55(_0x154b6d(0x1bf),null,{'conversation':this});try{const _0xe10324=this[_0x154b6d(0x173)][_0x154b6d(0x19c)](),_0x23b05d=this[_0x154b6d(0x165)][_0x154b6d(0x1ca)](),_0x4b501d=this[_0x154b6d(0x181)]['id'];this[_0x154b6d(0x19a)]=this[_0x154b6d(0x1cd)]({'userMessage':_0x4bface,'contextItems':_0xe10324,'capabilities':_0x23b05d,'modelId':_0x4b501d,'quickActionData':_0x2934c5}),await this[_0x154b6d(0x19a)][_0x154b6d(0x17d)](),this[_0x154b6d(0x173)][_0x154b6d(0x16c)](this[_0x154b6d(0x19a)][_0x154b6d(0x184)]);}catch(_0x569b8f){if(_0x569b8f instanceof _0x58cf55)this[_0x154b6d(0x15b)](_0x154b6d(0x15f),{'interactionId':this[_0x154b6d(0x19a)]?this[_0x154b6d(0x19a)]['id']:void 0x0,'error':_0x569b8f});else{const _0x4e6f5b=_0xb34857[_0x154b6d(0x1a4)](_0x569b8f[_0x154b6d(0x18f)])||_0x154b6d(0x159);this[_0x154b6d(0x15b)](_0x154b6d(0x15f),{'interactionId':this[_0x154b6d(0x19a)]?this[_0x154b6d(0x19a)]['id']:void 0x0,'error':new _0x58cf55(_0x4e6f5b,null,{'error':_0x569b8f})});}}finally{this[_0x154b6d(0x19a)]?.[_0x154b6d(0x1a0)](),this[_0x154b6d(0x19a)]=void 0x0;}}[_0x27180e(0x1cd)]({userMessage:_0x43b6c7,contextItems:_0x203548,capabilities:_0x446bd9,modelId:_0x2a4d03,quickActionData:_0x1e16a1}){const _0x5ee99b=_0x27180e,_0x549c5f=new _0x35f633({'userMessage':_0x43b6c7,'contextItems':_0x203548,'capabilities':_0x446bd9,'conversationId':this['id'],'connector':this[_0x5ee99b(0x19b)],'editor':this[_0x5ee99b(0x189)][_0x5ee99b(0x15e)]&&this[_0x5ee99b(0x189)][_0x5ee99b(0x15e)](),'model':_0x2a4d03,'quickActionData':_0x1e16a1});return _0x549c5f[_0x5ee99b(0x158)](..._0x37efe1)['to'](this),this[_0x5ee99b(0x1b2)][_0x5ee99b(0x191)](_0x549c5f),this[_0x5ee99b(0x15b)](_0x5ee99b(0x167),_0x549c5f),_0x549c5f;}[_0x27180e(0x188)](_0x2b257c){const _0x28f0a7=_0x27180e;return this[_0x28f0a7(0x1b2)][_0x28f0a7(0x177)](_0x166945=>_0x166945['id']===_0x2b257c);}[_0x27180e(0x161)](_0xd5a194){const _0x504bc0=_0x27180e,_0x436f8a=this[_0x504bc0(0x188)](_0xd5a194);_0x436f8a&&(_0x436f8a[_0x504bc0(0x190)](),this[_0x504bc0(0x1b2)][_0x504bc0(0x1ad)](this[_0x504bc0(0x1b2)][_0x504bc0(0x195)](_0x436f8a),0x1));}get[_0x27180e(0x1b5)](){const _0x284aa5=_0x27180e;return this[_0x284aa5(0x1b2)][this[_0x284aa5(0x1b2)][_0x284aa5(0x179)]-0x1];}[_0x27180e(0x1ba)](_0x419894){const _0x5c2425=_0x27180e;this[_0x5c2425(0x173)][_0x5c2425(0x1ba)](_0x419894);}async[_0x27180e(0x17a)]({content:_0x1d2fde,version:_0x530824,sessionId:_0xf42416,selections:_0x84ad8c}){const _0x245eff=_0x27180e;await this[_0x245eff(0x173)][_0x245eff(0x16d)](_0x1d2fde,_0x530824,_0xf42416,_0x84ad8c);}[_0x27180e(0x1b9)](){const _0x1fb163=_0x27180e;return this[_0x1fb163(0x19a)]?.[_0x1fb163(0x1af)]()?.[_0x1fb163(0x169)]||'';}[_0x27180e(0x19f)](_0x547215){const _0x46edd2=_0x27180e;this[_0x46edd2(0x173)][_0x46edd2(0x19f)](_0x547215);}[_0x27180e(0x1c3)](){const _0x53372e=_0x27180e;this[_0x53372e(0x173)][_0x53372e(0x1c3)]();}[_0x27180e(0x1a3)](_0xb2d724){const _0x52ffd7=_0x27180e;this[_0x52ffd7(0x173)][_0x52ffd7(0x1a3)](_0xb2d724);}[_0x27180e(0x182)](_0xeb8f21){const _0x1a9314=_0x27180e;this[_0x1a9314(0x173)][_0x1a9314(0x182)](_0xeb8f21);}[_0x27180e(0x1bd)](_0x4a8b77,_0x4f77bf){const _0x22de47=_0x27180e;this[_0x22de47(0x173)][_0x22de47(0x1bd)](_0x4a8b77,_0x4f77bf);}[_0x27180e(0x1c0)](_0x5e87ac,_0x2a92d2,_0x32ae01){const _0x545bb3=_0x27180e;return this[_0x545bb3(0x173)][_0x545bb3(0x1c0)](_0x5e87ac,_0x2a92d2,_0x32ae01);}[_0x27180e(0x18a)](_0x154758){const _0x10404d=_0x27180e;this[_0x10404d(0x173)][_0x10404d(0x18a)](_0x154758);}[_0x27180e(0x18d)](){const _0xd2632f=_0x27180e;this[_0xd2632f(0x165)][_0xd2632f(0x18d)]();}[_0x27180e(0x1ae)](){const _0xf2771e=_0x27180e;this[_0xf2771e(0x165)][_0xf2771e(0x1ae)]();}[_0x27180e(0x166)](){const _0x2e87d8=_0x27180e;return this[_0x2e87d8(0x173)][_0x2e87d8(0x166)]();}[_0x27180e(0x197)](){const _0x35660c=_0x27180e;return this[_0x35660c(0x173)][_0x35660c(0x197)]();}[_0x27180e(0x164)](){const _0x457ac8=_0x27180e;return this[_0x457ac8(0x173)][_0x457ac8(0x164)]();}async[_0x27180e(0x15c)](_0x24bda3){const _0x5b54a9=_0x27180e;_0x24bda3?!0x1===await this[_0x5b54a9(0x19d)][_0x5b54a9(0x1c8)](_0x24bda3)&&(_0x3e202a(_0x5b54a9(0x1bc),{'conversation':this,'model':_0x24bda3}),_0x24bda3=(await this[_0x5b54a9(0x19d)][_0x5b54a9(0x19e)]())[0x0]):(_0x3e202a(_0x5b54a9(0x1b8),{'conversation':this}),_0x24bda3=(await this[_0x5b54a9(0x19d)][_0x5b54a9(0x19e)]())[0x0]),_0x24bda3['id']!==this[_0x5b54a9(0x181)]?.['id']&&(this[_0x5b54a9(0x181)]=_0x24bda3,this[_0x5b54a9(0x165)][_0x5b54a9(0x16a)](),this[_0x5b54a9(0x15b)](_0x5b54a9(0x162),{'selectedModel':_0x24bda3}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3427b4=_0x4298;function _0x4298(_0x5db484,_0xc72d9f){var _0x3bfed5=_0x3bfe();return _0x4298=function(_0x4298f2,_0x192a66){_0x4298f2=_0x4298f2-0x75;var _0x502198=_0x3bfed5[_0x4298f2];return _0x502198;},_0x4298(_0x5db484,_0xc72d9f);}(function(_0xc5f9f7,_0x380bc3){var _0x21f528=_0x4298,_0x270d8b=_0xc5f9f7();while(!![]){try{var _0x1933e3=parseInt(_0x21f528(0x77))/0x1+parseInt(_0x21f528(0x81))/0x2+-parseInt(_0x21f528(0x80))/0x3*(parseInt(_0x21f528(0x7f))/0x4)+-parseInt(_0x21f528(0x83))/0x5*(-parseInt(_0x21f528(0x8b))/0x6)+parseInt(_0x21f528(0x8c))/0x7*(-parseInt(_0x21f528(0x89))/0x8)+-parseInt(_0x21f528(0x7a))/0x9+parseInt(_0x21f528(0x79))/0xa;if(_0x1933e3===_0x380bc3)break;else _0x270d8b['push'](_0x270d8b['shift']());}catch(_0x54c7c1){_0x270d8b['push'](_0x270d8b['shift']());}}}(_0x3bfe,0xecb15));function _0x3bfe(){var _0x3583dc=['6945692tCtXPs','3lqsXoC','1548932lwQXWf','conversationId','368070YVxdBW','getCapabilitiesRequestData','getDocumentContext','model','quickActionData','mapContextItemsToRequestData','124888vnolKm','connector','78arDDqb','721BKElrn','capabilities','contextItems','359455bTadHT','queryAssistant','40026380SOWIVm','16017228cFJJqX','sendRequest','userMessage','get','current-document'];_0x3bfe=function(){return _0x3583dc;};return _0x3bfe();}import{AICapabilities as _0x93696d}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x164a93}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x599982}from'./aichatcontext.js';export class AIChatInteraction extends _0x164a93{[_0x3427b4(0x7c)];[_0x3427b4(0x82)];[_0x3427b4(0x76)]=new Map();[_0x3427b4(0x86)];[_0x3427b4(0x87)];constructor(_0x3d0439){var _0x25c4a0=_0x3427b4;super(_0x3d0439),this[_0x25c4a0(0x82)]=_0x3d0439[_0x25c4a0(0x82)],this[_0x25c4a0(0x76)]=_0x3d0439[_0x25c4a0(0x76)],this[_0x25c4a0(0x75)]=_0x3d0439[_0x25c4a0(0x75)],this[_0x25c4a0(0x7c)]=_0x3d0439[_0x25c4a0(0x7c)],this[_0x25c4a0(0x86)]=_0x3d0439[_0x25c4a0(0x86)],this[_0x25c4a0(0x87)]=_0x3d0439[_0x25c4a0(0x87)];}async[_0x3427b4(0x7b)](){var _0x5d5aa6=_0x3427b4;return this[_0x5d5aa6(0x8a)][_0x5d5aa6(0x78)]({'message':this[_0x5d5aa6(0x7c)],'conversationId':this[_0x5d5aa6(0x82)],'parts':_0x599982[_0x5d5aa6(0x88)](this[_0x5d5aa6(0x76)]),'capabilities':_0x93696d[_0x5d5aa6(0x84)](this[_0x5d5aa6(0x75)]),'model':this[_0x5d5aa6(0x86)],'quickActionData':this[_0x5d5aa6(0x87)]});}[_0x3427b4(0x85)](){var _0x5d2dc0=_0x3427b4;return this[_0x5d2dc0(0x76)][_0x5d2dc0(0x7d)](_0x5d2dc0(0x7e));}}
23
+ var _0x33b8bf=_0x4175;(function(_0x437d41,_0xe86151){var _0x14c473=_0x4175,_0x11894b=_0x437d41();while(!![]){try{var _0x6c6386=parseInt(_0x14c473(0x154))/0x1*(-parseInt(_0x14c473(0x15d))/0x2)+parseInt(_0x14c473(0x152))/0x3*(-parseInt(_0x14c473(0x150))/0x4)+parseInt(_0x14c473(0x157))/0x5+-parseInt(_0x14c473(0x15c))/0x6+-parseInt(_0x14c473(0x164))/0x7*(-parseInt(_0x14c473(0x168))/0x8)+parseInt(_0x14c473(0x162))/0x9+parseInt(_0x14c473(0x15b))/0xa*(parseInt(_0x14c473(0x155))/0xb);if(_0x6c6386===_0xe86151)break;else _0x11894b['push'](_0x11894b['shift']());}catch(_0x44c280){_0x11894b['push'](_0x11894b['shift']());}}}(_0x4c02,0x33d2e));import{AICapabilities as _0x49017d}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x4e871a}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1be0ca}from'./aichatcontext.js';function _0x4175(_0x340be0,_0xff027e){var _0x4c028b=_0x4c02();return _0x4175=function(_0x41754a,_0x3aa0f6){_0x41754a=_0x41754a-0x150;var _0x1541d0=_0x4c028b[_0x41754a];return _0x1541d0;},_0x4175(_0x340be0,_0xff027e);}function _0x4c02(){var _0x5edcd0=['4yqMMFG','current-document','get','capabilities','sendRequest','3106377ZxJjBT','quickActionData','106225AWCqyn','getDocumentContext','userMessage','mapContextItemsToRequestData','64jYHrQa','4gAnTxO','contextItems','567723kQSUny','model','19993oQgjqO','913QjguET','conversationId','1319595DluDhx','getCapabilitiesRequestData','queryAssistant','connector','7510CNTXdX','2107848ZnHZcL'];_0x4c02=function(){return _0x5edcd0;};return _0x4c02();}export class AIChatInteraction extends _0x4e871a{[_0x33b8bf(0x166)];[_0x33b8bf(0x156)];[_0x33b8bf(0x151)]=new Map();[_0x33b8bf(0x153)];[_0x33b8bf(0x163)];constructor(_0x2e6f4b){var _0x29060a=_0x33b8bf;super(_0x2e6f4b),this[_0x29060a(0x156)]=_0x2e6f4b[_0x29060a(0x156)],this[_0x29060a(0x151)]=_0x2e6f4b[_0x29060a(0x151)],this[_0x29060a(0x160)]=_0x2e6f4b[_0x29060a(0x160)],this[_0x29060a(0x166)]=_0x2e6f4b[_0x29060a(0x166)],this[_0x29060a(0x153)]=_0x2e6f4b[_0x29060a(0x153)],this[_0x29060a(0x163)]=_0x2e6f4b[_0x29060a(0x163)];}async[_0x33b8bf(0x161)](){var _0x179943=_0x33b8bf;return this[_0x179943(0x15a)][_0x179943(0x159)]({'message':this[_0x179943(0x166)],'conversationId':this[_0x179943(0x156)],'parts':_0x1be0ca[_0x179943(0x167)](this[_0x179943(0x151)]),'capabilities':_0x49017d[_0x179943(0x158)](this[_0x179943(0x160)]),'model':this[_0x179943(0x153)],'quickActionData':this[_0x179943(0x163)]});}[_0x33b8bf(0x165)](){var _0x1170e7=_0x33b8bf;return this[_0x1170e7(0x151)][_0x1170e7(0x15f)](_0x1170e7(0x15e));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x13f6e4=_0x2a84;(function(_0x2a92a3,_0x4ecec6){const _0x2a3a11=_0x2a84,_0xe329fd=_0x2a92a3();while(!![]){try{const _0x20ec58=-parseInt(_0x2a3a11(0x199))/0x1*(parseInt(_0x2a3a11(0x1a6))/0x2)+parseInt(_0x2a3a11(0x1a1))/0x3+parseInt(_0x2a3a11(0x19f))/0x4+-parseInt(_0x2a3a11(0x19a))/0x5+parseInt(_0x2a3a11(0x1a7))/0x6+-parseInt(_0x2a3a11(0x198))/0x7*(-parseInt(_0x2a3a11(0x1a4))/0x8)+-parseInt(_0x2a3a11(0x19b))/0x9*(parseInt(_0x2a3a11(0x1a0))/0xa);if(_0x20ec58===_0x4ecec6)break;else _0xe329fd['push'](_0xe329fd['shift']());}catch(_0x16819d){_0xe329fd['push'](_0xe329fd['shift']());}}}(_0x1a6e,0x3a686));function _0x2a84(_0x359c24,_0x5ae16c){const _0x1a6edd=_0x1a6e();return _0x2a84=function(_0x2a8403,_0xc42609){_0x2a8403=_0x2a8403-0x197;let _0x17a489=_0x1a6edd[_0x2a8403];return _0x17a489;},_0x2a84(_0x359c24,_0x5ae16c);}import{AIModels as _0x353e98}from'../../aicore/model/aimodels.js';function _0x1a6e(){const _0x431fbb=['filter','7swWnBP','387htLsuM','260795gTtGOt','512019rhElbm','sort','length','enabled','1217328SdxQmk','110TRLYxx','289188lLAiFV','values','capabilities','3438088OmDkkE','getAll','1150QMMBYI','1855404PhPzZO'];_0x1a6e=function(){return _0x431fbb;};return _0x1a6e();}export class AIChatModels extends _0x353e98{async[_0x13f6e4(0x1a5)](){const _0x5a54e8=_0x13f6e4;return(await super[_0x5a54e8(0x1a5)]())[_0x5a54e8(0x19c)]((_0x5ebea2,_0x5bf392)=>{const _0x461ce4=_0x5a54e8,_0xce89a4=Object[_0x461ce4(0x1a2)](_0x5ebea2[_0x461ce4(0x1a3)])[_0x461ce4(0x197)](_0x2b0667=>_0x2b0667[_0x461ce4(0x19e)])[_0x461ce4(0x19d)];return Object[_0x461ce4(0x1a2)](_0x5bf392[_0x461ce4(0x1a3)])[_0x461ce4(0x197)](_0x5a4c2a=>_0x5a4c2a[_0x461ce4(0x19e)])[_0x461ce4(0x19d)]-_0xce89a4;});}}
23
+ const _0x9e82ee=_0x3f37;(function(_0x1e1b11,_0x5c4529){const _0x504081=_0x3f37,_0x5197fd=_0x1e1b11();while(!![]){try{const _0x1c5004=parseInt(_0x504081(0x151))/0x1+-parseInt(_0x504081(0x14d))/0x2*(parseInt(_0x504081(0x157))/0x3)+parseInt(_0x504081(0x156))/0x4*(parseInt(_0x504081(0x14b))/0x5)+-parseInt(_0x504081(0x155))/0x6*(parseInt(_0x504081(0x150))/0x7)+-parseInt(_0x504081(0x158))/0x8*(parseInt(_0x504081(0x15c))/0x9)+parseInt(_0x504081(0x14f))/0xa+-parseInt(_0x504081(0x14e))/0xb*(-parseInt(_0x504081(0x14c))/0xc);if(_0x1c5004===_0x5c4529)break;else _0x5197fd['push'](_0x5197fd['shift']());}catch(_0x2fdfef){_0x5197fd['push'](_0x5197fd['shift']());}}}(_0x3530,0x83ba6));import{AIModels as _0x1a6468}from'../../aicore/model/aimodels.js';function _0x3f37(_0x48ab25,_0x1b073b){const _0x3530e6=_0x3530();return _0x3f37=function(_0x3f3725,_0x4921d4){_0x3f3725=_0x3f3725-0x14b;let _0x509751=_0x3530e6[_0x3f3725];return _0x509751;},_0x3f37(_0x48ab25,_0x1b073b);}function _0x3530(){const _0x54c727=['length','values','6RZwCrb','8gIBqvG','963fnHwVq','67256msJiRy','enabled','filter','sort','387ZYaBgP','capabilities','341435vAPUka','204wMtKpF','318TqAYxO','247841njqBfb','2444290IgCCcj','4602122avGRUS','845514SulQBS','getAll'];_0x3530=function(){return _0x54c727;};return _0x3530();}export class AIChatModels extends _0x1a6468{async[_0x9e82ee(0x152)](){const _0x100e30=_0x9e82ee;return(await super[_0x100e30(0x152)]())[_0x100e30(0x15b)]((_0xba8b91,_0x47ff29)=>{const _0x4e62e0=_0x100e30,_0x2518e4=Object[_0x4e62e0(0x154)](_0xba8b91[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x12a14b=>_0x12a14b[_0x4e62e0(0x159)])[_0x4e62e0(0x153)];return Object[_0x4e62e0(0x154)](_0x47ff29[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x3cc39e=>_0x3cc39e[_0x4e62e0(0x159)])[_0x4e62e0(0x153)]-_0x2518e4;});}}