@ckeditor/ckeditor5-ai 47.3.0-alpha.2 → 47.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/index-editor.css +18 -11
- package/dist/index.css +19 -11
- package/dist/index.js +5 -5
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +15 -15
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsinteraction.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/legacyerrors.js +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiassistant/utils/common-translations.js +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
- package/src/aiballoon/ui/aiballoonview.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatfeedview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
- package/src/aichat/utils/eventnames.js +1 -1
- package/src/aichat/utils/promisequeue.js +1 -1
- package/src/aichathistory/aichathistory.js +1 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.js +1 -1
- package/src/aichathistory/model/aichathistoryconversations.js +1 -1
- package/src/aichathistory/model/aichathistoryitem.js +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
- package/src/aichathistory/ui/aichathistorylistview.js +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
- package/src/aichathistory/ui/aichathistoryview.d.ts +1 -0
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aicapabilities.js +1 -1
- package/src/aicore/model/aicontext.js +1 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aimodels.js +1 -1
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/aiskeleton.js +1 -1
- package/src/aicore/ui/aispinner.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/utils/common-translations.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/eventnames.js +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aicore/utils/scrollmanager.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/aitabsmainview.js +1 -1
- package/src/aitabs/tabs/aitabsview.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitabs/tabs/tabpanelview.js +1 -1
- package/src/errors.js +1 -1
- package/src/errorsmap.js +1 -1
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +2 -1
- package/theme/aiquickactions/aiquickactions.css +17 -10
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2bebe0=_0x134b;(function(_0x1dc91e,_0x4c3355){const _0x2c7892=_0x134b,_0x4ad028=_0x1dc91e();while(!![]){try{const _0x592e18=-parseInt(_0x2c7892(0x223))/0x1*(parseInt(_0x2c7892(0x2ec))/0x2)+-parseInt(_0x2c7892(0x2c2))/0x3*(parseInt(_0x2c7892(0x20f))/0x4)+-parseInt(_0x2c7892(0x2f8))/0x5*(parseInt(_0x2c7892(0x237))/0x6)+-parseInt(_0x2c7892(0x29d))/0x7*(-parseInt(_0x2c7892(0x206))/0x8)+parseInt(_0x2c7892(0x2e3))/0x9*(-parseInt(_0x2c7892(0x2ff))/0xa)+parseInt(_0x2c7892(0x30a))/0xb*(-parseInt(_0x2c7892(0x2b9))/0xc)+parseInt(_0x2c7892(0x20c))/0xd;if(_0x592e18===_0x4c3355)break;else _0x4ad028['push'](_0x4ad028['shift']());}catch(_0x2c2107){_0x4ad028['push'](_0x4ad028['shift']());}}}(_0x2fa2,0xd3998));import{ContextPlugin as _0x145d9a,Editor as _0x5c386c}from'ckeditor5/src/core.js';function _0x2fa2(){const _0xfaaec9=['setSelectedModel','replyChangeGroupStateUpdated','nextSibling','toViewRange','log','AI_CHAT_INVALID_REQUEST','addUrlToContext','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai-chat-context-unsupported-type','addOperation','ai-chat-conversation-init-failed','pluginName','redo','rootName','_updateRatings','activeConversation','addContextItem','isLoading','getChildAtOffset','removeFromContext','getAttribute','length','batch','getChildren','21kTTSGs','webSearchFinished','AIConnector','change','contextItemLoadingEnded','showDiff','node','ai-chat-url-upload-failed','ai-chat-missing-channel-id','addFeedItemStaticMessage','changeGroups','root','createPositionAt','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','ai-conversation-','context','applyOperation','activateTab','like','markers','startConversation','_aiConnector','stopInteraction','selection','interactionDestroyed','isDisabled','addResourceToContext','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','12mJsFAL','_stopLastInteraction','partIndex','removeFeedInteraction','interactionId','addFeedItemAISuggestion','TrackChangesEditing','start','addFileToContext','1431081ASvqja','reasoningStarted','_toggleWebSearch','toggleReasoning','AI_CHAT_UNTITLED_CONVERSATION','rejected','addCurrentDocumentToContext','filter','getChild','setAddContextOptions','uiId','state','documentContextContent','getReply','slice','showFakeVisualSelection','getRoot','addFeedItemError','disableControls','upsertAIChatRating','showNext','_logError','showPrevious','showChangeInText','getTransformedByOperation','mapper','close','type','ai.availableReplyActions','_insertSuggestion','ai-chat-context-file-too-many-pages','getFirstRange','new','1007829KDIqwa','reasoningFinished','setConversationTitle','uploadProgressChanged','contextSent','streaming','options','addFeedItemUserMessage','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','775468peeAhN','sourceResourcesLoaded','handleUserInteraction','createConversation','isDocumentOperation','_startConversationSafely','query','rejectSuggestion','ai-chat-controller-mouse-over','accepted','cloneNode','TrackChanges','6974105FEjjYg','addFeedInteractionHeader','resetConversationTitle','lastInteraction','isCurrentDocumentInConversation','createRange','sources','140QYaUBW','AIChatUI','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','ai.chat.models.defaultModelId','applySuggestion','_handleStartConversation','anchorId','dislike','removeSelectionFromChatContext','_batchToChanges','populateSourceResourceBalloon','16203121mDhpnQ','startAutoScroll','clearConversationContextUI','addContextOptionsChanged','toString','modelSelected','interactionStarted','config','_previewedChangeGroup','sourceId','hasChanges','plugins','static','setModel','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','AI_CHAT_UNABLE_TO_START_CONVERSATION','startInteraction','replyContentUpdated','addFilesToContext','stopListening','history','mouseLeaveSuggestion','resizedTabs','unshift','resourceStateChanged','addDocumentToContext','interactionFinished','model','handleRemovedConversation','split','forEach','_showConversationHistory','ai-chat-context-invalid-data','alignToTop','replies','setLoadingMessage','getDocumentContext','afterInit','removeMarker','messageId','load','selectedModel','contextItems','_setIsMaximized','updateCurrentDocumentInContext','resetMessageInput','data','revert','get','getConversation','end','AI_CHAT_RESOURCE_LOAD_FAILED','viewRangeToDom','sourcePosition','$graveyard','toggleWebSearch','isCurrentDocumentInContext','addSelectionToContext','DocumentCompare','howMany','_flushLastInteractionUI','stop','init','setFeedItemRenderingStrategy','getPath','ai.chat.context','ai-chat-source-resources-load-failed','resourceId','AI_CHAT_ABORTED_MESSAGE','open','from','loadConversation','getMarkersGroup','AI_BALLOON_HEADER_TITLE','Liked\x20response','children','view','capabilitiesUpdated','isStarted','contextItemAdded','ai-chat-context-file-too-large','updateFeedItemAIReplySuggestionContent','AITabs','_openBalloonFor','isOpen','content','enableControls','loadSourceResources','isModelAvailable','insertSuggestion','commands','sendMessage','resizeTabs','source','updateContent','_aiEditing','setIsUploadInProgress','AI_CHAT_GENERIC_ERROR','_removeFromContext','set','updateFeedItemAIReplySuggestionPartState','findIndex','sendUserMessage','error','resource','isInContext','_removeAISelectionMarkers','4325624HUnMhJ','setConversationContext','resize','contextItem','changes','_toggleReasoning','71486792eyNxDX','_handleUIUserMessage','fetchConversation','12HcjgYt','indexOf','delete','ai-chat-controller-no-active-conversation','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','locale','scrollFeedToSuggestion','AI_CHAT_CONTEXT_FILE_TOO_LARGE','updateConversationTitle','ready','ai-chat-conversation-start-failed','ai-chat-context-form-data-size-limits-exceeded','document','getDocumentData','undo','index','updateFeedItemAIReplySources','AIChatController','pending','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','1vgXGHA','_createFromRanges','version','setIsMaximized','isPremiumPlugin','ai-chat-resource-load-failed','_updateReplyContent','createPositionFromPath','chat','closeSourceResourceBalloon','full','startsWith','toggleSuggestionDisplayMode','getGroupId','ai-chat-context-unsupported-file-type','listenTo','AI_CHAT_CONTEXT_INVALID_DATA','editing','add','ai-chat-invalid-request','6abbnLT','getOperations','replyId','finishInteraction','getInteractionAndReplyById','push','getDiff','marker','addSelectionToChatContext','removeContextItem','abortPromptStream','ai.chat.models.displayedModels','maxOffset','modification-delta','toggleLoadingSkeleton','editors','getRanges','isUploadInProgress','focusPromptInput','webSearchStarted','contextItemRemoved','updateResourceState','collaboration.channelId','current-document','mouseOverSuggestion','isOfficialPlugin','indexes','updateCapabilities','_applyOperationsAsSuggestions','_scrollToSuggestionRange','removed','getContentParts','replyCreated','main','range','Disliked\x20response','Undo','dialogClosed','_integrateEditor','requires','conversationInitialized','resources','domConverter','has','setContextItemLoading','AIEditing','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','_getDocumentRangeForReplyChanges','ai-chat-file-upload-failed','_balloonShowDiff','remove','ai-no-track-changes','selectModel','removeSelectionFromContext','setChangeGroupState','text-delta','ai-chat-conversation-not-found','find','getSelectionText','Showing\x20conversation\x20history...','interactionCreated','outdated','parse','addFeedItemAIReply','message','map','baseVersion','_aiChatModels','uid','clearPendingContextUI','data-id','_applySuggestion','ai-request-aborted','_aiChatUi','path','updateFeedItemAIReplyContent','getInteraction','hideFakeVisualSelection'];_0x2fa2=function(){return _0xfaaec9;};return _0x2fa2();}import{CKEditorError as _0x467613,logError as _0x533e07,scrollViewportToShowTarget as _0x12e565,uid as _0x5f3022}from'ckeditor5/src/utils.js';import{AIConnector as _0x1be0a9}from'../aicore/aiconnector.js';import{AITabs as _0x47d958}from'../aitabs/aitabs.js';import{AIChatConversation as _0x303e02}from'./model/aichatconversation.js';import{getTranslation as _0x48e9f1}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3b7459}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x1b7888}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3ef6e5}from'./model/aichatmodels.js';import{getEditorFromContext as _0x2b7d60}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0xf9b9a3,DATA_ID_MODEL_ATTRIBUTE as _0x193346}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x4bcf55,getOperationsFromReply as _0x2f4b70}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x4fc5ba,getMinimalSelection as _0x38fec4}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x134b(_0x4efc8f,_0x13edd2){const _0x2fa29e=_0x2fa2();return _0x134b=function(_0x134bcd,_0x5ac1c8){_0x134bcd=_0x134bcd-0x1da;let _0x13600c=_0x2fa29e[_0x134bcd];return _0x13600c;},_0x134b(_0x4efc8f,_0x13edd2);}import{ModelRange as _0x2f8406,_DetachOperation as _0x5b77b1}from'ckeditor5/src/engine.js';import{findOne as _0x552680,getAttribute as _0x1879c2,serialize as _0x5cf332,Document as _0x4b6cd4,findByAttribute as _0x1deead}from'../aicore/utils/htmlparser.js';import{IconAI as _0x16cb59}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x33fc6e}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x22b587}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x145d9a{[_0x2bebe0(0x1fa)];[_0x2bebe0(0x2b2)];[_0x2bebe0(0x280)];[_0x2bebe0(0x27a)];[_0x2bebe0(0x308)]=new Map();[_0x2bebe0(0x312)]=null;[_0x2bebe0(0x268)]=!0x1;static get[_0x2bebe0(0x25e)](){return[_0x1be0a9,_0x22b587,_0xf9b9a3];}static get[_0x2bebe0(0x290)](){const _0x2e7049=_0x2bebe0;return _0x2e7049(0x220);}static get[_0x2bebe0(0x250)](){return!0x0;}static get[_0x2bebe0(0x227)](){return!0x0;}[_0x2bebe0(0x348)](){const _0x5bca80=_0x2bebe0;this[_0x5bca80(0x2b2)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x29f)),this[_0x5bca80(0x280)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x300)),this[_0x5bca80(0x1fa)]=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x264)),this[_0x5bca80(0x27a)]=new _0x3ef6e5({'connector':this[_0x5bca80(0x2b2)],'availableModels':this[_0x5bca80(0x2ac)][_0x5bca80(0x311)][_0x5bca80(0x33a)](_0x5bca80(0x242)),'defaultModelId':this[_0x5bca80(0x2ac)][_0x5bca80(0x311)][_0x5bca80(0x33a)](_0x5bca80(0x302))});const _0x86174c=this[_0x5bca80(0x2ac)][_0x5bca80(0x315)][_0x5bca80(0x33a)](_0x5bca80(0x1ed));this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2b1),()=>{const _0x1be438=_0x5bca80;this[_0x1be438(0x2f1)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x201),(_0x2a204c,_0x48f0e3)=>{const _0x42d994=_0x5bca80;this[_0x42d994(0x20d)]({'userMessage':_0x48f0e3});}),this[_0x5bca80(0x232)](_0x86174c,_0x5bca80(0x320),(_0x216d97,_0x5684a6)=>{const _0x5b168e=_0x5bca80;this[_0x5b168e(0x335)](_0x5684a6);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f7),()=>{const _0x42d0bd=_0x5bca80;_0x86174c[_0x42d0bd(0x208)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x241),async()=>{const _0x29132e=_0x5bca80;await this[_0x29132e(0x2ba)](),await this[_0x29132e(0x346)](),this[_0x29132e(0x307)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x323),()=>{const _0xb20886=_0x5bca80;this[_0xb20886(0x294)]?.[_0xb20886(0x2c8)](_0x48e9f1(this[_0xb20886(0x2ac)][_0xb20886(0x214)],_0xb20886(0x222)));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2c1),(_0x1f47e3,_0x4d7233)=>{const _0x5c5fbf=_0x5bca80;this[_0x5c5fbf(0x294)]?.[_0x5c5fbf(0x31c)](Array[_0x5c5fbf(0x1e1)](_0x4d7233));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x28b),(_0x4b4035,_0x7985a8)=>{const _0x522c4a=_0x5bca80;this[_0x522c4a(0x294)]?.[_0x522c4a(0x28b)](_0x7985a8);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2b7),(_0x506142,_0x3f772d)=>{const _0x48de17=_0x5bca80;this[_0x48de17(0x294)]?.[_0x48de17(0x2b7)](_0x3f772d[_0x48de17(0x1f8)],_0x3f772d[_0x48de17(0x203)]);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x240),(_0x31e323,_0x1a4eb0)=>{const _0x1c3ee6=_0x5bca80;this[_0x1c3ee6(0x1fd)](_0x1a4eb0);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f2),(_0x501876,_0x230664)=>{const _0x1a9c48=_0x5bca80;this[_0x1a9c48(0x294)]?.[_0x1a9c48(0x1f2)](_0x230664[_0x1a9c48(0x313)],_0x230664[_0x1a9c48(0x2f2)],_0x230664[_0x1a9c48(0x27b)]);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x341),()=>{const _0x302640=_0x5bca80;this[_0x302640(0x2c4)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2c5),()=>{const _0x147e2c=_0x5bca80;this[_0x147e2c(0x20b)]();}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x26b),(_0x4372ec,_0x5bdb19)=>{const _0x4ab1c2=_0x5bca80;this[_0x4ab1c2(0x294)]?.[_0x4ab1c2(0x317)](_0x5bdb19);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2af),(_0x4d685f,{replyId:_0x32847d})=>{const _0x11e57a=_0x5bca80;console[_0x11e57a(0x289)](_0x11e57a(0x1e5),_0x32847d);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x306),(_0xb942ce,{replyId:_0x138d39})=>{const _0x88e99d=_0x5bca80;console[_0x88e99d(0x289)](_0x88e99d(0x25a),_0x138d39);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x1f4),(_0x24f529,_0x35fa11)=>{const _0x18f1a6=_0x5bca80;this[_0x18f1a6(0x2ac)][_0x18f1a6(0x315)][_0x18f1a6(0x33a)](_0x22b587)[_0x18f1a6(0x2dc)](),this[_0x18f1a6(0x2df)](_0x35fa11);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2d9),(_0x33f043,{replyId:_0x2d7de0,partIndex:_0x40338b})=>{const _0x54fd67=_0x5bca80;this[_0x54fd67(0x268)]=this[_0x54fd67(0x280)][_0x54fd67(0x2a2)],this[_0x54fd67(0x1ee)](_0x2d7de0,_0x40338b);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x24f),(_0x41ab60,{replyId:_0x462bb1,partIndex:_0x5c3dd0})=>{const _0x591519=_0x5bca80,_0x502146=this[_0x591519(0x266)](_0x462bb1,_0x5c3dd0);_0x502146&&_0x591519(0x340)!=_0x502146[_0x591519(0x259)][_0x591519(0x2a8)][_0x591519(0x292)]&&this[_0x591519(0x1fa)][_0x591519(0x2d1)]([_0x502146[_0x591519(0x259)]],_0x591519(0x2f4));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x31f),()=>{const _0x3967be=_0x5bca80;this[_0x3967be(0x1fa)][_0x3967be(0x284)](_0x3967be(0x2f4));}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x303),(_0x10eafb,_0x46e24e)=>{const _0x4640a7=_0x5bca80;this[_0x4640a7(0x2ac)][_0x4640a7(0x315)][_0x4640a7(0x33a)](_0x22b587)[_0x4640a7(0x2dc)](),this[_0x4640a7(0x27e)](_0x46e24e);}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x22f),async(_0xbcf4d8,{replyId:_0x37d695,showDiff:_0x186f19})=>{const _0x5bcf3d=_0x5bca80,{reply:_0xc523fe}=this[_0x5bcf3d(0x23b)](_0x37d695),_0x42caa7=_0xc523fe[_0x5bcf3d(0x256)]({'showDiff':_0x186f19});await this[_0x5bcf3d(0x280)][_0x5bcf3d(0x1ec)]({'id':_0xc523fe['id'],'parts':_0x42caa7,'renderingStrategy':_0x5bcf3d(0x316)});}),this[_0x5bca80(0x232)](this[_0x5bca80(0x280)],_0x5bca80(0x2f3),(_0x3dc6c6,{replyId:_0xe84c72,partIndex:_0x27dab0})=>{const _0x53c027=_0x5bca80;this[_0x53c027(0x312)]?.[_0x53c027(0x239)]==_0xe84c72&&this[_0x53c027(0x312)]?.[_0x53c027(0x2bb)]==_0x27dab0&&this[_0x53c027(0x2ac)][_0x53c027(0x315)][_0x53c027(0x33a)](_0x22b587)[_0x53c027(0x2dc)]();const {reply:_0x1c6dd7}=this[_0x53c027(0x23b)](_0xe84c72);_0x1c6dd7[_0x53c027(0x26d)](_0x27dab0,_0x53c027(0x2c7)),this[_0x53c027(0x1fa)][_0x53c027(0x284)](_0x53c027(0x2f4));});}async[_0x2bebe0(0x32f)](){const _0x3efee2=_0x2bebe0;this[_0x3efee2(0x2ac)]instanceof _0x5c386c?this[_0x3efee2(0x25d)](this[_0x3efee2(0x2ac)]):this[_0x3efee2(0x232)](this[_0x3efee2(0x2ac)][_0x3efee2(0x246)],_0x3efee2(0x235),(_0x202ef2,_0x269c11)=>{const _0x2ed093=_0x3efee2;_0x269c11['on'](_0x2ed093(0x218),()=>{const _0x2ebe28=_0x2ed093;this[_0x2ebe28(0x25d)](_0x269c11);});}),await this[_0x3efee2(0x2f1)]();}[_0x2bebe0(0x2df)](_0x4aea4a){const _0x5eb6b4=_0x2bebe0,_0x125b69=_0x2b7d60(this[_0x5eb6b4(0x2ac)]);if(!_0x125b69[_0x5eb6b4(0x315)][_0x5eb6b4(0x262)](_0x5eb6b4(0x2f7)))throw new _0x467613(_0x5eb6b4(0x26a),null);const _0x7bf533=this[_0x5eb6b4(0x2ac)][_0x5eb6b4(0x315)][_0x5eb6b4(0x33a)](_0x5eb6b4(0x344)),{reply:_0x36e0a0,interaction:_0x47376a}=this[_0x5eb6b4(0x23b)](_0x4aea4a[_0x5eb6b4(0x239)]),_0x220e02=this[_0x5eb6b4(0x266)](_0x4aea4a[_0x5eb6b4(0x239)],_0x4aea4a[_0x5eb6b4(0x2bb)]),_0x5470bb=void 0x0!==_0x4aea4a[_0x5eb6b4(0x2bb)]?[_0x36e0a0[_0x5eb6b4(0x2a7)][_0x4aea4a[_0x5eb6b4(0x2bb)]]]:_0x36e0a0[_0x5eb6b4(0x2a7)][_0x5eb6b4(0x2c9)](_0x404d6b=>_0x5eb6b4(0x221)==_0x404d6b[_0x5eb6b4(0x2cd)]),_0x475d72=_0x5470bb[_0x5eb6b4(0x278)](_0x100fe8=>_0x36e0a0[_0x5eb6b4(0x2a7)][_0x5eb6b4(0x210)](_0x100fe8));if(!_0x220e02||_0x5eb6b4(0x340)==_0x220e02[_0x5eb6b4(0x259)][_0x5eb6b4(0x2a8)][_0x5eb6b4(0x292)])return void _0x475d72[_0x5eb6b4(0x328)](_0x5a5a32=>_0x36e0a0[_0x5eb6b4(0x26d)](_0x5a5a32,_0x5eb6b4(0x274)));_0x475d72[_0x5eb6b4(0x328)](_0x551df9=>_0x36e0a0[_0x5eb6b4(0x26d)](_0x551df9,_0x5eb6b4(0x2f5)));const _0x157fd1=_0x2f4b70({'editor':_0x125b69,'reply':_0x36e0a0,'interaction':_0x47376a,'groups':_0x5470bb,'transform':!0x0,'documentCompare':_0x7bf533,'documentCompareOptions':{'anchor':_0x5eb6b4(0x258),'markDeletions':!0x0}});let _0x568f92;_0x220e02&&this[_0x5eb6b4(0x254)](_0x220e02[_0x5eb6b4(0x259)]),_0x125b69[_0x5eb6b4(0x325)][_0x5eb6b4(0x2a0)](_0x59b530=>{const _0x566724=_0x5eb6b4;_0x568f92=_0x59b530[_0x566724(0x29b)],_0x125b69[_0x566724(0x315)][_0x566724(0x33a)](_0x566724(0x2bf))[_0x566724(0x253)](_0x157fd1),this[_0x566724(0x1fa)][_0x566724(0x284)](_0x566724(0x2f4));}),this[_0x5eb6b4(0x308)][_0x5eb6b4(0x1fe)](_0x568f92,{'interactionId':_0x47376a['id'],'replyId':_0x36e0a0['id'],'indexes':_0x475d72[_0x5eb6b4(0x2d0)]()}),this[_0x5eb6b4(0x293)](_0x36e0a0);}[_0x2bebe0(0x27e)](_0x3b6967){const _0x1a95ce=_0x2bebe0,_0x4472f7=_0x2b7d60(this[_0x1a95ce(0x2ac)]),_0x320512=this[_0x1a95ce(0x2ac)][_0x1a95ce(0x315)][_0x1a95ce(0x33a)](_0xf9b9a3),{reply:_0x19b0e1,interaction:_0x4f30fb}=this[_0x1a95ce(0x23b)](_0x3b6967[_0x1a95ce(0x239)]),_0x1eb3bf=this[_0x1a95ce(0x266)](_0x3b6967[_0x1a95ce(0x239)],_0x3b6967[_0x1a95ce(0x2bb)]),_0x28f387=void 0x0!==_0x3b6967[_0x1a95ce(0x2bb)]?[_0x19b0e1[_0x1a95ce(0x2a7)][_0x3b6967[_0x1a95ce(0x2bb)]]]:_0x19b0e1[_0x1a95ce(0x2a7)][_0x1a95ce(0x2c9)](_0x155ef6=>_0x1a95ce(0x221)==_0x155ef6[_0x1a95ce(0x2cd)]),_0x291a53=_0x28f387[_0x1a95ce(0x278)](_0x1c8720=>_0x19b0e1[_0x1a95ce(0x2a7)][_0x1a95ce(0x210)](_0x1c8720));if(!_0x1eb3bf||_0x1a95ce(0x340)==_0x1eb3bf[_0x1a95ce(0x259)][_0x1a95ce(0x2a8)][_0x1a95ce(0x292)])return void _0x291a53[_0x1a95ce(0x328)](_0x35d013=>_0x19b0e1[_0x1a95ce(0x26d)](_0x35d013,_0x1a95ce(0x274)));_0x291a53[_0x1a95ce(0x328)](_0x2601f5=>_0x19b0e1[_0x1a95ce(0x26d)](_0x2601f5,_0x1a95ce(0x2f5)));const _0x493be0=_0x2f4b70({'editor':_0x4472f7,'reply':_0x19b0e1,'interaction':_0x4f30fb,'groups':_0x28f387,'transform':!0x0,'documentCompare':_0x320512,'documentCompareOptions':{'anchor':_0x1a95ce(0x258),'markDeletions':!0x1}});let _0xb05391;_0x1eb3bf&&this[_0x1a95ce(0x254)](_0x1eb3bf[_0x1a95ce(0x259)]),_0x4472f7[_0x1a95ce(0x325)][_0x1a95ce(0x2a0)](_0xa60dee=>{const _0x24187f=_0x1a95ce;_0xb05391=_0xa60dee[_0x24187f(0x29b)];for(const _0x2b1110 of _0x493be0)_0x2b1110[_0x24187f(0x279)]=_0x4472f7[_0x24187f(0x325)][_0x24187f(0x21b)][_0x24187f(0x225)],_0x4bcf55(_0x4472f7,_0x2b1110),_0xa60dee[_0x24187f(0x29b)][_0x24187f(0x28e)](_0x2b1110),_0x4472f7[_0x24187f(0x325)][_0x24187f(0x2ad)](_0x2b1110);}),this[_0x1a95ce(0x308)][_0x1a95ce(0x1fe)](_0xb05391,{'interactionId':_0x4f30fb['id'],'replyId':_0x19b0e1['id'],'indexes':_0x291a53[_0x1a95ce(0x2d0)]()}),this[_0x1a95ce(0x293)](_0x19b0e1);}[_0x2bebe0(0x1ee)](_0x91d214,_0x3ab1ae){const _0x3415a9=_0x2bebe0,_0x53e93d=_0x2b7d60(this[_0x3415a9(0x2ac)]),_0x4951cf=this[_0x3415a9(0x266)](_0x91d214,_0x3ab1ae),_0x1a37d3=this[_0x3415a9(0x2ac)][_0x3415a9(0x315)][_0x3415a9(0x33a)](_0x22b587);if(!_0x4951cf)return void _0x1a37d3[_0x3415a9(0x2dc)]();const {range:_0x2bf425,currentIndex:_0x38ae17}=_0x4951cf;if(_0x3415a9(0x340)==_0x2bf425[_0x3415a9(0x2a8)][_0x3415a9(0x292)]){const {reply:_0xd6700e}=this[_0x3415a9(0x23b)](_0x91d214);return _0xd6700e[_0x3415a9(0x26d)](_0x38ae17,_0x3415a9(0x274)),void _0x1a37d3[_0x3415a9(0x2dc)]();}if(this[_0x3415a9(0x312)]?.[_0x3415a9(0x239)]==_0x91d214&&this[_0x3415a9(0x312)]?.[_0x3415a9(0x2bb)]==_0x38ae17)return;this[_0x3415a9(0x31d)](_0x1a37d3),this[_0x3415a9(0x312)]={'replyId':_0x91d214,'partIndex':_0x38ae17};let _0x461fbd=_0x53e93d[_0x3415a9(0x311)][_0x3415a9(0x33a)](_0x3415a9(0x2de))||[..._0x1b7888];_0x53e93d[_0x3415a9(0x315)][_0x3415a9(0x262)](_0x3415a9(0x2f7))||(_0x461fbd=_0x461fbd[_0x3415a9(0x2c9)](_0xada24c=>_0x3415a9(0x1f4)!=_0xada24c));const _0x4b6825=new _0x33fc6e(_0x53e93d[_0x3415a9(0x214)],{'showDiff':this[_0x3415a9(0x268)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x3415a9(0x22d)},'hideHeader':!0x0,'availableActions':_0x461fbd});this[_0x3415a9(0x31d)](_0x4b6825);const {reply:_0x1eda2e}=this[_0x3415a9(0x23b)](_0x91d214),_0x4080b8=_0x1eda2e[_0x3415a9(0x256)]({'showDiff':this[_0x3415a9(0x268)]})[_0x3415a9(0x2c9)](_0x236692=>_0x236692[_0x3415a9(0x314)]),_0x27168b=_0x4080b8[_0x3415a9(0x200)](_0x1a6133=>_0x1a6133[_0x3415a9(0x21e)]==_0x38ae17);if(-0x1==_0x27168b)return;const _0x16e168=_0x4080b8[_0x27168b],_0x1caefe=_0x4080b8['at']((_0x27168b-0x1)%_0x4080b8[_0x3415a9(0x29a)])?.[_0x3415a9(0x21e)],_0x5146d3=_0x4080b8['at']((_0x27168b+0x1)%_0x4080b8[_0x3415a9(0x29a)])?.[_0x3415a9(0x21e)];_0x4b6825[_0x3415a9(0x1f9)]({'parts':[_0x16e168],'renderingStrategy':_0x3415a9(0x316)});const _0x1ad306=_0x38ae17!==_0x1caefe;this[_0x3415a9(0x254)](_0x2bf425,!0x0),_0x1a37d3[_0x3415a9(0x1e0)]({'index':_0x38ae17,'title':_0x48e9f1(this[_0x3415a9(0x2ac)][_0x3415a9(0x214)],_0x3415a9(0x1e4),(_0x27168b+0x1)[_0x3415a9(0x30e)]()),'icon':_0x16cb59,'mainView':_0x4b6825,'showRotator':_0x1ad306,'showApplyButton':!0x0,'showSuggestButton':_0x53e93d[_0x3415a9(0x315)][_0x3415a9(0x262)](_0x3415a9(0x2f7)),'ranges':[_0x2bf425]}),this[_0x3415a9(0x280)][_0x3415a9(0x215)](_0x91d214,_0x38ae17),this[_0x3415a9(0x232)](_0x4b6825,_0x3415a9(0x22f),(_0x3d540e,{showDiff:_0x2120eb})=>{const _0x53c10a=_0x3415a9;this[_0x53c10a(0x268)]=_0x2120eb;const {reply:_0x4f41f8}=this[_0x53c10a(0x23b)](_0x91d214),_0x1fcd02=_0x4f41f8[_0x53c10a(0x256)]({'showDiff':_0x2120eb,'groupIndex':_0x38ae17});_0x4b6825[_0x53c10a(0x1f9)]({'parts':_0x1fcd02,'renderingStrategy':_0x53c10a(0x316)});}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x303),()=>{const _0x378bd1=_0x3415a9;this[_0x378bd1(0x27e)]({'replyId':_0x91d214,'partIndex':_0x38ae17}),_0x1ad306?this[_0x378bd1(0x1ee)](_0x91d214,_0x5146d3):_0x1a37d3[_0x378bd1(0x2dc)]();}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x1f4),()=>{const _0x8d9dea=_0x3415a9;this[_0x8d9dea(0x2df)]({'replyId':_0x91d214,'partIndex':_0x38ae17}),_0x1ad306?this[_0x8d9dea(0x1ee)](_0x91d214,_0x5146d3):_0x1a37d3[_0x8d9dea(0x2dc)]();}),_0x1ad306&&(this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x2d6),()=>{const _0x1b077c=_0x3415a9;this[_0x1b077c(0x1ee)](_0x91d214,_0x5146d3);}),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x2d8),()=>{const _0x4622ae=_0x3415a9;this[_0x4622ae(0x1ee)](_0x91d214,_0x1caefe);})),this[_0x3415a9(0x232)](_0x1a37d3,_0x3415a9(0x25c),()=>{const _0xec71a9=_0x3415a9;this[_0xec71a9(0x31d)](_0x1a37d3),this[_0xec71a9(0x31d)](_0x4b6825),this[_0xec71a9(0x312)]=null;});}[_0x2bebe0(0x266)](_0x5cf1a7,_0x4280c0){const _0x542bd1=_0x2bebe0,_0x4f3190=_0x2b7d60(this[_0x542bd1(0x2ac)]),{reply:_0x12830a,interaction:_0x328765}=this[_0x542bd1(0x23b)](_0x5cf1a7),_0x8fdd65=_0x12830a[_0x542bd1(0x2a7)][_0x542bd1(0x2c9)](_0x23362f=>_0x542bd1(0x221)==_0x23362f[_0x542bd1(0x2cd)]),_0x186037=_0x8fdd65[_0x542bd1(0x278)](_0x44cbd2=>_0x12830a[_0x542bd1(0x2a7)][_0x542bd1(0x210)](_0x44cbd2));void 0x0===_0x4280c0&&(_0x4280c0=_0x186037[0x0]);const _0x2bdf98=_0x186037[_0x542bd1(0x210)](_0x4280c0);if(-0x1==_0x2bdf98)return null;const _0x351c2f=_0x8fdd65[_0x2bdf98],_0x4b9636=new _0x4b6cd4([]),_0x31470e=new _0x4b6cd4([]);for(const _0x65679a of _0x351c2f[_0x542bd1(0x20a)])if(_0x542bd1(0x255)!=_0x65679a[_0x542bd1(0x2dd)]&&_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x65679a[_0x542bd1(0x2a3)][_0x542bd1(0x2f6)](!0x0)),_0x542bd1(0x2e2)!=_0x65679a[_0x542bd1(0x2dd)]){const _0x7c1b5a=_0x552680(_0x23163e=>_0x1879c2(_0x23163e,_0x542bd1(0x27d))==_0x65679a['id'],_0x12830a[_0x542bd1(0x2ce)],!0x0);_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x7c1b5a[_0x542bd1(0x2f6)](!0x0));}if(0x0==_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x29a)]){if(_0x351c2f[_0x542bd1(0x20a)][0x0][_0x542bd1(0x305)]){const _0x338493=_0x1deead(_0x542bd1(0x27d),_0x351c2f[_0x542bd1(0x20a)][0x0][_0x542bd1(0x305)],_0x12830a[_0x542bd1(0x2ce)]);_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x321)](_0x338493[_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x321)](_0x338493[_0x542bd1(0x2f6)](!0x0)),_0x338493[_0x542bd1(0x287)]&&(_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x338493[_0x542bd1(0x287)][_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x338493[_0x542bd1(0x287)][_0x542bd1(0x2f6)](!0x0)));}else{const _0x27b65d=_0x12830a[_0x542bd1(0x2ce)][_0x542bd1(0x1e6)][0x0];if(!_0x27b65d)return null;_0x4b9636[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x27b65d[_0x542bd1(0x2f6)](!0x0)),_0x31470e[_0x542bd1(0x1e6)][_0x542bd1(0x23c)](_0x27b65d[_0x542bd1(0x2f6)](!0x0));}}const _0xc13eca=_0x328765[_0x542bd1(0x32e)](),_0xb95629=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0xc13eca[_0x542bd1(0x1f0)]),_0x1d8515=_0x5cf332(_0x4b9636),_0x4c6cc1=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0x1d8515),_0x3a9e30=_0x4f3190[_0x542bd1(0x338)][_0x542bd1(0x275)](_0x1d8515),_0x5750f0=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2a9)](_0x4c6cc1,0x0),_0x6080cb=_0x5cf332(_0x31470e),_0x254f3d={'anchor':_0x5750f0,'markDeletions':!0x1},_0x249291=_0x4f3190[_0x542bd1(0x315)][_0x542bd1(0x33a)](_0xf9b9a3)[_0x542bd1(0x23d)](_0x1d8515,_0x6080cb,_0x254f3d)[_0x542bd1(0x238)]();if(!_0x249291[_0x542bd1(0x29a)])return null;_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2a0)](_0x5a0f2a=>{const _0x4840de=_0x542bd1;for(const _0x463838 of _0x249291)if(_0x4840de(0x269)==_0x463838[_0x4840de(0x2dd)]){const _0x41d4c7=_0x463838[_0x4840de(0x33f)],_0x2f84c0=_0x463838[_0x4840de(0x345)],_0x172ba3=new _0x5b77b1(_0x41d4c7,_0x2f84c0);_0x5a0f2a[_0x4840de(0x29b)][_0x4840de(0x28e)](_0x172ba3),_0x4f3190[_0x4840de(0x325)][_0x4840de(0x2ad)](_0x172ba3);}else _0x4840de(0x23e)!==_0x463838[_0x4840de(0x2dd)]&&(_0x463838[_0x4840de(0x279)]=null,_0x463838[_0x4840de(0x2f0)]=!0x1,_0x5a0f2a[_0x4840de(0x29b)][_0x4840de(0x28e)](_0x463838),_0x4f3190[_0x4840de(0x325)][_0x4840de(0x2ad)](_0x463838));});const _0x2a1baa=_0x38fec4(_0x4f3190,_0x249291,_0x4c6cc1);_0x4fc5ba(_0x4f3190[_0x542bd1(0x325)],_0x2a1baa);const _0x26d7c8=_0x2a1baa[_0x542bd1(0x2e1)]()[_0x542bd1(0x2c0)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x1bffc5=_0x2a1baa[_0x542bd1(0x2e1)]()[_0x542bd1(0x33c)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x5d9850=[];let _0x2a418a=_0x4c6cc1,_0x3340bb=_0x3a9e30;for(let _0x4aabe7=0x0;_0x4aabe7<_0x1bffc5[_0x542bd1(0x29a)];_0x4aabe7++){const _0x2044bb=_0x2a418a[_0x542bd1(0x243)]-_0x1bffc5[_0x4aabe7];_0x5d9850[_0x4aabe7]=_0x3340bb[_0x542bd1(0x243)]-_0x2044bb,_0x2a418a=_0x2a418a[_0x542bd1(0x297)](_0x1bffc5[_0x4aabe7]),_0x3340bb=_0x3340bb[_0x542bd1(0x297)](_0x5d9850[_0x4aabe7]);}const _0x2dd431=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2fd)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x3a9e30,_0x26d7c8),_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x3a9e30,_0x5d9850)),_0x3a3360=_0x3a9e30[_0x542bd1(0x2ca)](0x0)[_0x542bd1(0x299)](_0x193346),_0x10397f=Array[_0x542bd1(0x1e1)](_0xb95629[_0x542bd1(0x29c)]())[_0x542bd1(0x270)](_0x27d421=>_0x27d421[_0x542bd1(0x299)](_0x193346)==_0x3a3360)[_0x542bd1(0x1db)](),_0xc4a352=_0x2dd431[_0x542bd1(0x2c0)][_0x542bd1(0x281)][_0x542bd1(0x2d0)](),_0x22c1ee=_0x2dd431[_0x542bd1(0x33c)][_0x542bd1(0x281)][_0x542bd1(0x2d0)]();_0xc4a352[0x0]=_0x10397f[0x0]+_0xc4a352[0x0],_0x22c1ee[0x0]=_0x10397f[0x0]+_0x22c1ee[0x0];let _0x1102bb=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x2fd)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x2d2)](),_0xc4a352),_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x22a)](_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x2d2)](),_0x22c1ee));const _0x3ecc4a=_0x4f3190[_0x542bd1(0x325)][_0x542bd1(0x21b)][_0x542bd1(0x31e)][_0x542bd1(0x238)](_0xc13eca[_0x542bd1(0x225)]);for(const _0x277abd of _0x3ecc4a)_0x1102bb=_0x2f8406[_0x542bd1(0x224)](_0x1102bb[_0x542bd1(0x2da)](_0x277abd));return{'range':_0x1102bb,'currentIndex':_0x4280c0};}[_0x2bebe0(0x25d)](_0x1fac8c){const _0x4c0b5d=_0x2bebe0;if(!_0x1fac8c[_0x4c0b5d(0x315)][_0x4c0b5d(0x262)](_0x4c0b5d(0x25b)))return;const _0x30fff7=_0x1fac8c[_0x4c0b5d(0x1f5)][_0x4c0b5d(0x33a)](_0x4c0b5d(0x21d)),_0xbdadc0=_0x1fac8c[_0x4c0b5d(0x1f5)][_0x4c0b5d(0x33a)](_0x4c0b5d(0x291));this[_0x4c0b5d(0x232)](_0x30fff7,_0x4c0b5d(0x339),(_0x1f8bf2,_0x4bc94c,_0x301eb2)=>{const _0x20181f=_0x4c0b5d,_0x3547e9=this[_0x20181f(0x308)][_0x20181f(0x33a)](_0x4bc94c);if(!_0x3547e9)return;const _0x55e5b2=this[_0x20181f(0x294)][_0x20181f(0x283)](_0x3547e9[_0x20181f(0x2bd)])[_0x20181f(0x2cf)](_0x3547e9[_0x20181f(0x239)]);_0x3547e9[_0x20181f(0x251)][_0x20181f(0x328)](_0x35d3bb=>_0x55e5b2[_0x20181f(0x26d)](_0x35d3bb,_0x20181f(0x221))),this[_0x20181f(0x308)][_0x20181f(0x211)](_0x4bc94c),this[_0x20181f(0x308)][_0x20181f(0x1fe)](_0x301eb2,_0x3547e9);}),this[_0x4c0b5d(0x232)](_0xbdadc0,_0x4c0b5d(0x339),(_0x282186,_0x26887f,_0x5b1d90)=>{const _0x3b9a10=_0x4c0b5d,_0x4de195=this[_0x3b9a10(0x308)][_0x3b9a10(0x33a)](_0x26887f);if(!_0x4de195)return;const _0x2130c8=this[_0x3b9a10(0x294)][_0x3b9a10(0x283)](_0x4de195[_0x3b9a10(0x2bd)])[_0x3b9a10(0x2cf)](_0x4de195[_0x3b9a10(0x239)]);_0x4de195[_0x3b9a10(0x251)][_0x3b9a10(0x328)](_0x40df1e=>_0x2130c8[_0x3b9a10(0x26d)](_0x40df1e,_0x3b9a10(0x2f5))),this[_0x3b9a10(0x308)][_0x3b9a10(0x211)](_0x26887f),this[_0x3b9a10(0x308)][_0x3b9a10(0x1fe)](_0x5b1d90,_0x4de195);});}async[_0x2bebe0(0x1e2)](_0x498b6c){const _0x55349d=_0x2bebe0;this[_0x55349d(0x2ac)][_0x55349d(0x315)][_0x55349d(0x33a)](_0x22b587)[_0x55349d(0x2dc)](),this[_0x55349d(0x280)][_0x55349d(0x1da)](_0x55349d(0x316)),this[_0x55349d(0x280)][_0x55349d(0x245)](!0x0),await this[_0x55349d(0x2ba)]();try{await this[_0x55349d(0x2b2)][_0x55349d(0x20e)](_0x498b6c)[_0x55349d(0x33b)](),await this[_0x55349d(0x2f1)](_0x498b6c),this[_0x55349d(0x217)]('\x20');const {sessionId:_0x5f4140}=this[_0x55349d(0x1fa)][_0x55349d(0x21c)]();await this[_0x55349d(0x294)][_0x55349d(0x332)](_0x498b6c,_0x5f4140),this[_0x55349d(0x294)][_0x55349d(0x2fc)]()&&this[_0x55349d(0x294)][_0x55349d(0x2c8)](_0x48e9f1(this[_0x55349d(0x2ac)][_0x55349d(0x214)],_0x55349d(0x222)));}catch(_0x5841ed){this[_0x55349d(0x280)][_0x55349d(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x55349d(0x2ac)][_0x55349d(0x214)],_0x55349d(0x265)),'id':_0x498b6c}),this[_0x55349d(0x2d7)](new _0x467613(_0x55349d(0x26f),this,{'error':_0x5841ed}));}finally{this[_0x55349d(0x2ac)][_0x55349d(0x315)][_0x55349d(0x33a)](_0x47d958)[_0x55349d(0x1e7)][_0x55349d(0x2ae)](_0x55349d(0x22b)),this[_0x55349d(0x280)][_0x55349d(0x30b)](),this[_0x55349d(0x280)][_0x55349d(0x1da)](_0x55349d(0x2e8)),this[_0x55349d(0x280)][_0x55349d(0x245)](!0x1);}}[_0x2bebe0(0x326)](_0x524017){const _0x488a50=_0x2bebe0;this[_0x488a50(0x294)]['id']===_0x524017&&this[_0x488a50(0x2f1)]();}async[_0x2bebe0(0x23f)](){const _0x1bf4b3=_0x2bebe0,_0x465c5f=this[_0x1bf4b3(0x1fa)][_0x1bf4b3(0x271)]();this[_0x1bf4b3(0x294)]?.[_0x1bf4b3(0x343)](_0x465c5f),this[_0x1bf4b3(0x294)]?.[_0x1bf4b3(0x2c8)](_0x48e9f1(this[_0x1bf4b3(0x2ac)][_0x1bf4b3(0x214)],_0x1bf4b3(0x222)));}[_0x2bebe0(0x307)](){const _0xacef4b=_0x2bebe0;this[_0xacef4b(0x294)]?.[_0xacef4b(0x26c)]();}[_0x2bebe0(0x249)](){const _0x4d611f=_0x2bebe0;this[_0x4d611f(0x280)][_0x4d611f(0x249)]();}async[_0x2bebe0(0x2b1)](){const _0x576d15=_0x2bebe0;await this[_0x576d15(0x2f1)]();}async[_0x2bebe0(0x1f6)]({message:_0x2e5fe6,quickActionData:_0x284483}){const _0x31ca0b=_0x2bebe0;await this[_0x31ca0b(0x20d)]({'userMessage':_0x2e5fe6,'quickActionData':_0x284483});}[_0x2bebe0(0x230)](){const _0x11ac47=_0x2bebe0,_0x517092=this[_0x11ac47(0x2ac)][_0x11ac47(0x311)][_0x11ac47(0x33a)](_0x11ac47(0x24d));if(!_0x517092)throw new _0x467613(_0x11ac47(0x2a5),this);return _0x517092;}async[_0x2bebe0(0x2f1)](_0x2af3f8){const _0x3ad3ea=_0x2bebe0;try{this[_0x3ad3ea(0x280)][_0x3ad3ea(0x1f1)](),await this[_0x3ad3ea(0x304)](_0x2af3f8);}catch(_0x18b8d5){_0x533e07(_0x3ad3ea(0x219),_0x18b8d5),this[_0x3ad3ea(0x294)]=void 0x0,this[_0x3ad3ea(0x280)][_0x3ad3ea(0x2d4)]();}}async[_0x2bebe0(0x304)](_0x62d1e2){const _0x13802d=_0x2bebe0,_0x1c4a1b=this[_0x13802d(0x2ac)][_0x13802d(0x315)][_0x13802d(0x33a)](_0x22b587);let _0x210e55;_0x1c4a1b[_0x13802d(0x1ef)]&&_0x1c4a1b[_0x13802d(0x2dc)](),_0x62d1e2||!this[_0x13802d(0x294)]?_0x210e55=this[_0x13802d(0x2ac)][_0x13802d(0x311)][_0x13802d(0x33a)](_0x13802d(0x302)):this[_0x13802d(0x280)][_0x13802d(0x1f3)]&&(_0x210e55=this[_0x13802d(0x294)][_0x13802d(0x333)]['id']),await this[_0x13802d(0x2ba)]();const _0xb3dc0e=this[_0x13802d(0x230)](),_0xc03ed=_0x62d1e2||_0x5f3022();this[_0x13802d(0x294)]=new _0x303e02({'connector':this[_0x13802d(0x2b2)],'chatModels':this[_0x13802d(0x27a)],'selectedModelId':_0x210e55,'conversationId':_0xc03ed,'group':_0xb3dc0e,'getEditor':()=>_0x2b7d60(this[_0x13802d(0x2ac)])}),this[_0x13802d(0x294)]['on'](_0x13802d(0x25f),(_0x4e3633,_0xaa8d82)=>{const _0x27ce9b=_0x13802d;this[_0x27ce9b(0x280)][_0x27ce9b(0x2ef)](_0xaa8d82),this[_0x27ce9b(0x280)][_0x27ce9b(0x337)](),this[_0x27ce9b(0x280)][_0x27ce9b(0x27c)](),this[_0x27ce9b(0x280)][_0x27ce9b(0x30c)](),_0x62d1e2||(this[_0x27ce9b(0x280)][_0x27ce9b(0x2fa)](),this[_0x27ce9b(0x294)]?.[_0x27ce9b(0x2c8)](_0x48e9f1(this[_0x27ce9b(0x2ac)][_0x27ce9b(0x214)],_0x27ce9b(0x222))));}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e6),(_0x399f55,_0x29146b)=>{const _0x1aef3c=_0x13802d;this[_0x1aef3c(0x280)][_0x1aef3c(0x1fb)](_0x29146b[_0x1aef3c(0x248)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x273),(_0x2e56e7,_0x556a88)=>{const _0x1d5f99=_0x13802d;this[_0x1d5f99(0x280)][_0x1d5f99(0x2ea)](_0x556a88);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x24a),()=>{const _0x2692a6=_0x13802d;this[_0x2692a6(0x280)][_0x2692a6(0x32d)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2c3),()=>{const _0x411c0d=_0x13802d;this[_0x411c0d(0x280)][_0x411c0d(0x32d)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x29e),(_0x3d4c8f,_0x1579df)=>{const _0x37149f=_0x13802d;this[_0x37149f(0x280)][_0x37149f(0x2f9)](_0x1579df,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e4),(_0x5646f7,_0x46d862)=>{const _0x3a8ece=_0x13802d;this[_0x3a8ece(0x280)][_0x3a8ece(0x2f9)](_0x46d862,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x310),()=>{const _0x25ba01=_0x13802d;this[_0x25ba01(0x280)][_0x25ba01(0x31a)]();}),this[_0x13802d(0x294)]['on'](_0x13802d(0x324),async()=>{const _0x335d1c=_0x13802d;await this[_0x335d1c(0x280)][_0x335d1c(0x23a)]();}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2b5),(_0x4f26ae,_0x3eee1e)=>{const _0x1fb4bd=_0x13802d;this[_0x1fb4bd(0x280)][_0x1fb4bd(0x2bc)](_0x3eee1e['id']);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e5),(_0x197318,_0x58f128,_0x3125f3)=>{const _0x3136aa=_0x13802d;this[_0x3136aa(0x217)](_0x58f128,_0x3125f3);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x257),(_0x420771,_0x24736e)=>{const _0x587a68=_0x13802d;_0x587a68(0x26e)===_0x24736e[_0x587a68(0x2dd)]?this[_0x587a68(0x280)][_0x587a68(0x276)](_0x24736e):this[_0x587a68(0x280)][_0x587a68(0x2be)](_0x24736e);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x31b),async(_0x3c07ee,_0x4629eb)=>{const _0x4f40df=_0x13802d;await this[_0x4f40df(0x229)]({'reply':_0x4629eb});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x286),(_0x5cebe1,{reply:_0x249a18,index:_0x4fbf96,state:_0x318dbb})=>{const _0x308ae8=_0x13802d;this[_0x308ae8(0x280)][_0x308ae8(0x1ff)]({'id':_0x249a18['id'],'index':_0x4fbf96,'state':_0x318dbb});}),this[_0x13802d(0x294)]['on'](_0x13802d(0x1ea),(_0x9aca1,_0xfd6813)=>{const _0x246971=_0x13802d;if(this[_0x246971(0x280)][_0x246971(0x295)](_0xfd6813[_0x246971(0x209)],_0xfd6813[_0x246971(0x296)]),_0x246971(0x2b4)===_0xfd6813[_0x246971(0x209)][_0x246971(0x2dd)]){const _0x1a46f4=[..._0x2b7d60(this[_0x246971(0x2ac)])[_0x246971(0x325)][_0x246971(0x21b)][_0x246971(0x2b4)][_0x246971(0x247)]()];this[_0x246971(0x1fa)][_0x246971(0x2d1)](_0x1a46f4,_0x246971(0x2ab)+this[_0x246971(0x294)]?.['id']);}}),this[_0x13802d(0x294)]['on'](_0x13802d(0x24b),(_0x4b5146,_0x5c7414)=>{const _0x2d961f=_0x13802d;this[_0x2d961f(0x280)][_0x2d961f(0x240)](_0x5c7414[_0x2d961f(0x2cc)]),_0x2d961f(0x24e)==_0x5c7414[_0x2d961f(0x2cc)]&&this[_0x2d961f(0x307)](),_0x2d961f(0x2b4)===_0x5c7414[_0x2d961f(0x2dd)]&&this[_0x2d961f(0x1fa)][_0x2d961f(0x284)](_0x2d961f(0x2ab)+this[_0x2d961f(0x294)]?.['id']);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2a1),(_0x5e024f,_0x9f54b7)=>{const _0x23acf1=_0x13802d;this[_0x23acf1(0x280)][_0x23acf1(0x263)](_0x9f54b7[_0x23acf1(0x209)][_0x23acf1(0x2cc)],_0x9f54b7[_0x23acf1(0x296)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2e7),(_0x4248eb,_0x465a4c)=>{const _0xd4fc92=_0x13802d;this[_0xd4fc92(0x280)][_0xd4fc92(0x207)](_0x465a4c[_0xd4fc92(0x334)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x30d),(_0x14b715,_0x422100)=>{const _0xf282d0=_0x13802d;this[_0xf282d0(0x280)][_0xf282d0(0x2cb)](_0x422100[_0xf282d0(0x2e9)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x2ed),(_0x19c34d,_0x36f1fc)=>{const _0x2c71b0=_0x13802d;this[_0x2c71b0(0x280)][_0x2c71b0(0x309)](_0x36f1fc[_0x2c71b0(0x313)],_0x36f1fc[_0x2c71b0(0x1f8)],_0x36f1fc[_0x2c71b0(0x260)],_0x36f1fc[_0x2c71b0(0x27b)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x322),(_0x5bf621,_0x3bdf9b)=>{const _0x3a6e9f=_0x13802d;this[_0x3a6e9f(0x280)][_0x3a6e9f(0x24c)](_0x3bdf9b[_0x3a6e9f(0x313)],_0x3bdf9b[_0x3a6e9f(0x1de)],_0x3bdf9b[_0x3a6e9f(0x204)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x1e8),(_0x32c273,_0x4c90eb)=>{const _0x33af46=_0x13802d;this[_0x33af46(0x280)][_0x33af46(0x252)](_0x4c90eb);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x30f),(_0x1246fa,_0x3d3062)=>{const _0x9aebb6=_0x13802d;this[_0x9aebb6(0x280)][_0x9aebb6(0x285)](_0x3d3062[_0x9aebb6(0x333)],_0x3d3062[_0x9aebb6(0x2b6)]);}),this[_0x13802d(0x294)]['on'](_0x13802d(0x202),(_0x2a4e74,{error:_0x241d04,interactionId:_0x1641c1,fileName:_0x5f3d2d,url:_0x3971a1,sourceId:_0x3fee28,sourceLabel:_0x59768d})=>{const _0x3c8035=_0x13802d,_0x6adfe8=_0x1641c1?_0x1641c1+':'+_0x5f3022():_0x5f3022();_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x27f))?this[_0x3c8035(0x280)][_0x3c8035(0x2a6)]({'staticMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x1df)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x28f))||_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x219))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x319)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x267))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x28c),_0x5f3d2d),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x2a4))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2aa),_0x3971a1),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x32a))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x233)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x28d))?this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2eb)),'id':_0x6adfe8}):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x1dd))?(_0x3fee28&&this[_0x3c8035(0x280)][_0x3c8035(0x22c)](_0x3fee28),this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x213),_0x59768d||_0x3c8035(0x1f8)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x228))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x33d)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x236))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x28a)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x231))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x301)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x1eb))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x216)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x2e0))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x318)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):_0x241d04[_0x3c8035(0x277)][_0x3c8035(0x22e)](_0x3c8035(0x21a))?(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x2b8)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04)):(this[_0x3c8035(0x280)][_0x3c8035(0x2d3)]({'errorMessage':_0x48e9f1(this[_0x3c8035(0x2ac)][_0x3c8035(0x214)],_0x3c8035(0x1fc)),'id':_0x6adfe8}),this[_0x3c8035(0x2d7)](_0x241d04));}),await this[_0x13802d(0x294)][_0x13802d(0x348)](this[_0x13802d(0x2ac)][_0x13802d(0x311)][_0x13802d(0x33a)](_0x13802d(0x1dc))),_0x62d1e2||await this[_0x13802d(0x294)][_0x13802d(0x2c0)]();}async[_0x2bebe0(0x20d)]({userMessage:_0x6d2500,quickActionData:_0x1e9b39}){const _0x129501=_0x2bebe0;if(!this[_0x129501(0x294)])throw new _0x467613(_0x129501(0x212));this[_0x129501(0x294)][_0x129501(0x342)]()&&await this[_0x129501(0x294)][_0x129501(0x336)](this[_0x129501(0x1fa)][_0x129501(0x21c)]()),this[_0x129501(0x294)]['id']&&this[_0x129501(0x294)][_0x129501(0x1e9)]&&await this[_0x129501(0x294)][_0x129501(0x2ee)]({'userMessage':_0x6d2500,'quickActionData':_0x1e9b39}),this[_0x129501(0x205)]();}[_0x2bebe0(0x205)](){const _0x54492b=_0x2bebe0,_0x20e647=_0x2b7d60(this[_0x54492b(0x2ac)])[_0x54492b(0x325)],_0x571b62=Array[_0x54492b(0x1e1)](_0x20e647[_0x54492b(0x2b0)][_0x54492b(0x1e3)](_0x3b7459));_0x20e647[_0x54492b(0x2a0)](_0x4474c8=>{const _0x58c734=_0x54492b;_0x571b62[_0x58c734(0x328)](_0x375beb=>_0x4474c8[_0x58c734(0x330)](_0x375beb));});}[_0x2bebe0(0x329)](){const _0x57c277=_0x2bebe0;console[_0x57c277(0x289)](_0x57c277(0x272));}[_0x2bebe0(0x335)](_0x5b8df9){const _0x1dbd1a=_0x2bebe0;this[_0x1dbd1a(0x280)][_0x1dbd1a(0x226)](_0x5b8df9);}[_0x2bebe0(0x2d7)](_0x438125){const _0x2563e3=_0x2bebe0;_0x533e07(_0x438125[_0x2563e3(0x277)]);}[_0x2bebe0(0x1fd)](_0x2f1c7d){const _0xf2df7=_0x2bebe0;this[_0xf2df7(0x294)]?.[_0xf2df7(0x298)](_0x2f1c7d);}[_0x2bebe0(0x2c4)](){const _0x2b4da4=_0x2bebe0;this[_0x2b4da4(0x294)]?.[_0x2b4da4(0x341)]();}[_0x2bebe0(0x20b)](){const _0x4a64d4=_0x2bebe0;this[_0x4a64d4(0x294)]?.[_0x4a64d4(0x2c5)]();}[_0x2bebe0(0x23b)](_0x32033f){const _0x58020e=_0x2bebe0,[_0x710cf,_0x443f2e]=_0x32033f[_0x58020e(0x327)](':'),_0x36a6bc=this[_0x58020e(0x294)][_0x58020e(0x283)](_0x710cf),_0xd85726=_0x36a6bc[_0x58020e(0x2cf)](_0x443f2e);return{'interaction':_0x36a6bc,'reply':_0xd85726};}[_0x2bebe0(0x254)](_0x58cf66,_0x2bcc2a=!0x1){const _0x4c88d3=_0x2bebe0,_0x43aa6a=_0x2b7d60(this[_0x4c88d3(0x2ac)]),_0x32dd32={'target':_0x43aa6a[_0x4c88d3(0x234)][_0x4c88d3(0x1e7)][_0x4c88d3(0x261)][_0x4c88d3(0x33e)](_0x43aa6a[_0x4c88d3(0x234)][_0x4c88d3(0x2db)][_0x4c88d3(0x288)](_0x58cf66)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x2bcc2a};_0x2bcc2a&&(_0x32dd32[_0x4c88d3(0x32b)]=!0x0),_0x12e565(_0x32dd32);}[_0x2bebe0(0x217)](_0x3a7434,_0x59c2e6=!0x1){const _0xd2fc3e=_0x2bebe0;this[_0xd2fc3e(0x280)][_0xd2fc3e(0x2e5)](_0x3a7434||_0x48e9f1(this[_0xd2fc3e(0x2ac)][_0xd2fc3e(0x214)],_0xd2fc3e(0x2c6)),_0x59c2e6);}async[_0x2bebe0(0x229)]({reply:_0xdd0a77,renderingStrategy:_0x436df3}){const _0x2f9b49=_0x2bebe0,{id:_0x56d0ff,isDone:_0x20ea97,type:_0x470d53,parsedContent:_0xe88ee5}=_0xdd0a77;if(_0x2f9b49(0x244)===_0x470d53){const _0x446327=_0xdd0a77[_0x2f9b49(0x256)]({'showDiff':this[_0x2f9b49(0x280)][_0x2f9b49(0x2a2)]});await this[_0x2f9b49(0x280)][_0x2f9b49(0x1ec)]({'id':_0x56d0ff,'parts':_0x446327,'renderingStrategy':_0x436df3,'isDone':_0x20ea97});}else _0x2f9b49(0x26e)===_0x470d53&&await this[_0x2f9b49(0x280)][_0x2f9b49(0x282)]({'id':_0x56d0ff,'parsedContent':_0xe88ee5,'renderingStrategy':_0x436df3,'isDone':_0x20ea97});_0x20ea97&&_0xdd0a77[_0x2f9b49(0x2fe)][_0x2f9b49(0x29a)]>0x0&&this[_0x2f9b49(0x280)][_0x2f9b49(0x21f)](_0x56d0ff,_0xdd0a77[_0x2f9b49(0x2fe)]);}async[_0x2bebe0(0x2ba)](){const _0x3dd414=_0x2bebe0,_0x4781fa=this[_0x3dd414(0x294)]?.[_0x3dd414(0x2fb)];_0x4781fa&&(_0x4781fa[_0x3dd414(0x347)](),this[_0x3dd414(0x280)][_0x3dd414(0x2b3)](_0x4781fa));}async[_0x2bebe0(0x346)](){const _0x339c48=_0x2bebe0,_0x30ddbd=this[_0x339c48(0x294)]?.[_0x339c48(0x2fb)];if(_0x30ddbd){for await(const _0x24c971 of _0x30ddbd[_0x339c48(0x32c)])await this[_0x339c48(0x229)]({'reply':_0x24c971,'renderingStrategy':_0x339c48(0x316)});}}[_0x2bebe0(0x293)](_0x230f31){const _0x46a62e=_0x2bebe0,_0x23a568={'positiveCount':_0x230f31[_0x46a62e(0x2a7)][_0x46a62e(0x2c9)](_0x5e524c=>_0x46a62e(0x2f5)===_0x5e524c[_0x46a62e(0x2cd)])[_0x46a62e(0x29a)],'totalCount':_0x230f31[_0x46a62e(0x2a7)][_0x46a62e(0x29a)],'modificationId':_0x230f31['id']},_0xe41ab5=this[_0x46a62e(0x294)][_0x46a62e(0x283)](_0x230f31[_0x46a62e(0x2bd)])[_0x46a62e(0x331)];this[_0x46a62e(0x2b2)][_0x46a62e(0x2d5)](this[_0x46a62e(0x294)]['id'],_0xe41ab5,_0x23a568);}}
|
|
23
|
+
const _0x25bc84=_0x2ea0;(function(_0x4b0665,_0x12eb8e){const _0x283110=_0x2ea0,_0xd418ee=_0x4b0665();while(!![]){try{const _0x2615a0=parseInt(_0x283110(0x152))/0x1*(-parseInt(_0x283110(0xf3))/0x2)+parseInt(_0x283110(0x1d8))/0x3+parseInt(_0x283110(0xc5))/0x4*(parseInt(_0x283110(0x9f))/0x5)+-parseInt(_0x283110(0x85))/0x6*(-parseInt(_0x283110(0x76))/0x7)+parseInt(_0x283110(0xc4))/0x8+parseInt(_0x283110(0x16d))/0x9*(-parseInt(_0x283110(0x94))/0xa)+-parseInt(_0x283110(0x148))/0xb;if(_0x2615a0===_0x12eb8e)break;else _0xd418ee['push'](_0xd418ee['shift']());}catch(_0x188a81){_0xd418ee['push'](_0xd418ee['shift']());}}}(_0x5463,0x9829d));import{ContextPlugin as _0x218971,Editor as _0x58403b}from'ckeditor5/src/core.js';import{CKEditorError as _0x2aea12,logError as _0x37699d,scrollViewportToShowTarget as _0x1084ad,uid as _0x2df6a6}from'ckeditor5/src/utils.js';import{AIConnector as _0x43fe7d}from'../aicore/aiconnector.js';import{AITabs as _0x406009}from'../aitabs/aitabs.js';import{AIChatConversation as _0x83be58}from'./model/aichatconversation.js';import{getTranslation as _0x20a620}from'../aicore/utils/common-translations.js';function _0x5463(){const _0x3777e0=['activeConversation','isInContext','length','isPremiumPlugin','rootName','node','setModel','createConversation','ai-request-aborted','content','_updateRatings','reasoningStarted','editing','removeFeedInteraction','_integrateEditor','setIsUploadInProgress','AI_CHAT_GENERIC_ERROR','contextItemAdded','redo','AI_CHAT_RESOURCE_LOAD_FAILED','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','getDiff','createPositionAt','interactionDestroyed','capabilitiesUpdated','ai-chat-invalid-request','showFakeVisualSelection','addFilesToContext','documentContextContent','has','ai-chat-controller-mouse-over','ai-chat-context-unsupported-file-type','$graveyard','removeMarker','_insertSuggestion','root','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','from','marker','applySuggestion','children','cloneNode','handleRemovedConversation','applyOperation','setAddContextOptions','getPath','_aiChatModels','getChildAtOffset','sourceResourcesLoaded','AI_CHAT_ABORTED_MESSAGE','contextItems','source','closeSourceResourceBalloon','change','undo','_openBalloonFor','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','_getDocumentRangeForReplyChanges','activateTab','_aiConnector','updateFeedItemAIReplySuggestionPartState','setContextItemLoading','data-id','fetchConversation','domConverter','ai-conversation-','outdated','createRange','state','rejected','sourcePosition','selectModel','updateCurrentDocumentInContext','11249612hbXMLB','getInteractionAndReplyById','removeSelectionFromChatContext','collaboration.channelId','main','isUploadInProgress','updateContent','ai-chat-context-unsupported-type','sendUserMessage','Showing\x20conversation\x20history...','316DnwLEL','_batchToChanges','_toggleReasoning','ai-chat-conversation-start-failed','revert','uploadProgressChanged','_logError','delete','isCurrentDocumentInConversation','addContextItem','listenTo','model','batch','ai-chat-resource-load-failed','replyCreated','like','_handleUIUserMessage','disableControls','error','AIConnector','addFeedItemError','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','new','showPrevious','config','addResourceToContext','split','586422oybWqV','ai.chat.context','setIsMaximized','_aiEditing','accepted','stopInteraction','contextItemRemoved','_aiChatUi','_showConversationHistory','ai-chat-file-upload-failed','interactionCreated','mouseLeaveSuggestion','abortPromptStream','message','_setIsMaximized','_startConversationSafely','conversationInitialized','pending','stop','startInteraction','updateCapabilities','_updateReplyContent','_balloonShowDiff','sendMessage','indexOf','ai-chat-url-upload-failed','plugins','addOperation','addFeedItemStaticMessage','AI_CHAT_UNTITLED_CONVERSATION','uiId','end','ai-chat-context-file-too-many-pages','addDocumentToContext','sourceId','range','webSearchFinished','streaming','setSelectedModel','_flushLastInteractionUI','query','resizedTabs','startsWith','anchorId','view','init','replies','_handleStartConversation','get','getRoot','contextItemLoadingEnded','updateConversationTitle','getAttribute','getSelectionText','populateSourceResourceBalloon','indexes','finishInteraction','resourceId','resource','document','clearConversationContextUI','isModelAvailable','replyId','AI_CHAT_CONTEXT_FILE_TOO_LARGE','ai-chat-context-form-data-size-limits-exceeded','AI_BALLOON_HEADER_TITLE','editors','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai.availableReplyActions','nextSibling','updateFeedItemAIReplyContent','_createFromRanges','isStarted','toViewRange','interactionFinished','mapper','loadConversation','scrollFeedToSuggestion','Liked\x20response','ai-chat-missing-channel-id','commands','enableControls','_removeFromContext','howMany','maxOffset','contextItem','ai-no-track-changes','viewRangeToDom','Disliked\x20response','getMarkersGroup','find','webSearchStarted','toggleSuggestionDisplayMode','addUrlToContext','getReply','insertSuggestion','AI_CHAT_UNABLE_TO_START_CONVERSATION','createPositionFromPath','dislike','stopListening','toString','resources','type','ai.chat.models.defaultModelId','_applySuggestion','replyChangeGroupStateUpdated','getDocumentContext','2334717sEShlS','ai-chat-source-resources-load-failed','toggleLoadingSkeleton','forEach','getDocumentData','rejectSuggestion','setConversationContext','replyContentUpdated','options','_applyOperationsAsSuggestions','uid','7GouqiC','addFeedItemUserMessage','AIChatController','getGroupId','clearPendingContextUI','modification-delta','toggleWebSearch','_scrollToSuggestionRange','addFeedInteractionHeader','slice','AI_CHAT_CONTEXT_INVALID_DATA','setFeedItemRenderingStrategy','ai-chat-controller-no-active-conversation','dialogClosed','ai-chat-context-invalid-data','4425978hgObUG','addSelectionToContext','hideFakeVisualSelection','parse','hasChanges','setChangeGroupState','removeSelectionFromContext','_toggleWebSearch','showDiff','getContentParts','getOperations','AITabs','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','changes','partIndex','10DDlIBZ','map','addFeedItemAISuggestion','reasoningFinished','open','selectedModel','ai.chat.models.displayedModels','messageId','removed','interactionId','text-delta','15CgbQLz','version','AIEditing','path','sources','getTransformedByOperation','interactionStarted','TrackChangesEditing','modelSelected','showChangeInText','chat','data','getRanges','baseVersion','current-document','ai-chat-conversation-init-failed','isDisabled','lastInteraction','findIndex','addFileToContext','log','setLoadingMessage','start','unshift','startConversation','markers','resetMessageInput','_removeAISelectionMarkers','focusPromptInput','isDocumentOperation','_stopLastInteraction','context','filter','getFirstRange','push','ai-chat-conversation-not-found','Undo','4509456NlcHHu','457124HKELBH','alignToTop','mouseOverSuggestion','updateFeedItemAIReplySuggestionContent','TrackChanges','pluginName','index','full','removeFromContext','resizeTabs','getConversation','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','updateFeedItemAIReplySources','toggleReasoning','locale','ai-chat-context-file-too-large','resetConversationTitle','updateResourceState','changeGroups','AIChatUI','getInteraction','handleUserInteraction','addCurrentDocumentToContext','static','loadSourceResources','ready','isCurrentDocumentInContext','startAutoScroll','getChildren','upsertAIChatRating','afterInit','load','add','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','addContextOptionsChanged','requires','getChild','contextSent','isOfficialPlugin','_previewedChangeGroup','removeContextItem','addSelectionToChatContext','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','isOpen','selection','set','4502adZtAb','history','isLoading','resourceStateChanged','AI_CHAT_INVALID_REQUEST','resize','remove','DocumentCompare','close','setConversationTitle','addFeedItemAIReply','showNext'];_0x5463=function(){return _0x3777e0;};return _0x5463();}import{AI_VISUAL_SELECTION_MARKER_NAME as _0x332dfc}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x1eae55}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x40dce3}from'./model/aichatmodels.js';import{getEditorFromContext as _0x27a01b}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x1f9bda,DATA_ID_MODEL_ATTRIBUTE as _0x30bdda}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x2ea0(_0x200a2a,_0x51cf3d){const _0x54631e=_0x5463();return _0x2ea0=function(_0x2ea0a0,_0x490dfc){_0x2ea0a0=_0x2ea0a0-0x75;let _0x37d695=_0x54631e[_0x2ea0a0];return _0x37d695;},_0x2ea0(_0x200a2a,_0x51cf3d);}import{fixMarkerOperationOldRange as _0xa5e704,getOperationsFromReply as _0x27437e}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0xec16d,getMinimalSelection as _0x39d438}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x29e4f1,_DetachOperation as _0x46c604}from'ckeditor5/src/engine.js';import{findOne as _0x5b796f,getAttribute as _0x868855,serialize as _0xa90766,Document as _0x3f8498,findByAttribute as _0x542dd7}from'../aicore/utils/htmlparser.js';import{IconAI as _0x181f7c}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x12d899}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x1baf23}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x218971{[_0x25bc84(0x170)];[_0x25bc84(0x13a)];[_0x25bc84(0x174)];[_0x25bc84(0x12d)];[_0x25bc84(0x153)]=new Map();[_0x25bc84(0xec)]=null;[_0x25bc84(0x183)]=!0x1;static get[_0x25bc84(0xe8)](){return[_0x43fe7d,_0x1baf23,_0x1f9bda];}static get[_0x25bc84(0xca)](){const _0x2fc0d9=_0x25bc84;return _0x2fc0d9(0x78);}static get[_0x25bc84(0xeb)](){return!0x0;}static get[_0x25bc84(0x102)](){return!0x0;}[_0x25bc84(0x19a)](){const _0x5af906=_0x25bc84;this[_0x5af906(0x13a)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0x165)),this[_0x5af906(0x174)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0xd8)),this[_0x5af906(0x170)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0xa1)),this[_0x5af906(0x12d)]=new _0x40dce3({'connector':this[_0x5af906(0x13a)],'availableModels':this[_0x5af906(0xbe)][_0x5af906(0x16a)][_0x5af906(0x19d)](_0x5af906(0x9a)),'defaultModelId':this[_0x5af906(0xbe)][_0x5af906(0x16a)][_0x5af906(0x19d)](_0x5af906(0x1d4))});const _0x253332=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0x90));this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xb7),()=>{const _0x286708=_0x5af906;this[_0x286708(0x17c)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x150),(_0x2d20b5,_0x4e6a32)=>{const _0x58a6ca=_0x5af906;this[_0x58a6ca(0x162)]({'userMessage':_0x4e6a32});}),this[_0x5af906(0x15c)](_0x253332,_0x5af906(0x196),(_0x3c7f8e,_0x5d264b)=>{const _0x3fe629=_0x5af906;this[_0x3fe629(0x17b)](_0x5d264b);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xce),()=>{const _0x5b395b=_0x5af906;_0x253332[_0x5b395b(0xf8)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x179),async()=>{const _0x113b4e=_0x5af906;await this[_0x113b4e(0xbd)](),await this[_0x113b4e(0x194)](),this[_0x113b4e(0x14a)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x18e),()=>{const _0x12b402=_0x5af906;this[_0x12b402(0xff)]?.[_0x12b402(0xdb)](_0x20a620(this[_0x12b402(0xbe)][_0x12b402(0xd3)],_0x12b402(0x123)));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xb2),(_0x2cff56,_0x180925)=>{const _0x514e40=_0x5af906;this[_0x514e40(0xff)]?.[_0x514e40(0x11a)](Array[_0x514e40(0x124)](_0x180925));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1ca),(_0xa91acd,_0x277fc2)=>{const _0x50a61f=_0x5af906;this[_0x50a61f(0xff)]?.[_0x50a61f(0x1ca)](_0x277fc2);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x16b),(_0x5208cb,_0x4b91da)=>{const _0x5f3a5c=_0x5af906;this[_0x5f3a5c(0xff)]?.[_0x5f3a5c(0x16b)](_0x4b91da[_0x5f3a5c(0x132)],_0x4b91da[_0x5f3a5c(0x1a7)]);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xed),(_0x32310e,_0x2e0444)=>{const _0x10b421=_0x5af906;this[_0x10b421(0x1bf)](_0x2e0444);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xdd),(_0x164364,_0x5e3c3d)=>{const _0x4bef5d=_0x5af906;this[_0x4bef5d(0xff)]?.[_0x4bef5d(0xdd)](_0x5e3c3d[_0x4bef5d(0x18f)],_0x5e3c3d[_0x4bef5d(0x195)],_0x5e3c3d[_0x4bef5d(0x75)]);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x7c),()=>{const _0x1640b1=_0x5af906;this[_0x1640b1(0x8c)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xd2),()=>{const _0x209632=_0x5af906;this[_0x209632(0x154)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x146),(_0x173c33,_0x47d0f1)=>{const _0x3c3737=_0x5af906;this[_0x3c3737(0xff)]?.[_0x3c3737(0x105)](_0x47d0f1);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x161),(_0x2cceed,{replyId:_0x2c2199})=>{const _0x111c35=_0x5af906;console[_0x111c35(0xb3)](_0x111c35(0x1bb),_0x2c2199);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1cf),(_0x2480ba,{replyId:_0x840381})=>{const _0x9e3d0c=_0x5af906;console[_0x9e3d0c(0xb3)](_0x9e3d0c(0x1c5),_0x840381);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1cc),(_0x571a59,_0x34b3ca)=>{const _0x312c09=_0x5af906;this[_0x312c09(0xbe)][_0x312c09(0x187)][_0x312c09(0x19d)](_0x1baf23)[_0x312c09(0xfb)](),this[_0x312c09(0x121)](_0x34b3ca);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xa8),(_0x2ac7e2,{replyId:_0xc8a541,partIndex:_0x193d29})=>{const _0x21c64d=_0x5af906;this[_0x21c64d(0x183)]=this[_0x21c64d(0x174)][_0x21c64d(0x8d)],this[_0x21c64d(0x136)](_0xc8a541,_0x193d29);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xc7),(_0x198149,{replyId:_0x2a3c8e,partIndex:_0x3e8695})=>{const _0x2beb79=_0x5af906,_0x387ca3=this[_0x2beb79(0x138)](_0x2a3c8e,_0x3e8695);_0x387ca3&&_0x2beb79(0x11f)!=_0x387ca3[_0x2beb79(0x190)][_0x2beb79(0x122)][_0x2beb79(0x103)]&&this[_0x2beb79(0x170)][_0x2beb79(0x119)]([_0x387ca3[_0x2beb79(0x190)]],_0x2beb79(0x11d));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x178),()=>{const _0x399d9f=_0x5af906;this[_0x399d9f(0x170)][_0x399d9f(0x87)](_0x399d9f(0x11d));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x126),(_0x42a711,_0x323621)=>{const _0x105e01=_0x5af906;this[_0x105e01(0xbe)][_0x105e01(0x187)][_0x105e01(0x19d)](_0x1baf23)[_0x105e01(0xfb)](),this[_0x105e01(0x1d5)](_0x323621);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1c9),async(_0x12e1f7,{replyId:_0x2433cb,showDiff:_0x29aac1})=>{const _0x538df4=_0x5af906,{reply:_0x9fbb6}=this[_0x538df4(0x149)](_0x2433cb),_0x2c80a8=_0x9fbb6[_0x538df4(0x8e)]({'showDiff':_0x29aac1});await this[_0x538df4(0x174)][_0x538df4(0xc8)]({'id':_0x9fbb6['id'],'parts':_0x2c80a8,'renderingStrategy':_0x538df4(0xdc)});}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1dd),(_0x50bc27,{replyId:_0x11ca43,partIndex:_0xeecb4f})=>{const _0x574f1d=_0x5af906;this[_0x574f1d(0xec)]?.[_0x574f1d(0x1ab)]==_0x11ca43&&this[_0x574f1d(0xec)]?.[_0x574f1d(0x93)]==_0xeecb4f&&this[_0x574f1d(0xbe)][_0x574f1d(0x187)][_0x574f1d(0x19d)](_0x1baf23)[_0x574f1d(0xfb)]();const {reply:_0xca9e4c}=this[_0x574f1d(0x149)](_0x11ca43);_0xca9e4c[_0x574f1d(0x8a)](_0xeecb4f,_0x574f1d(0x144)),this[_0x574f1d(0x170)][_0x574f1d(0x87)](_0x574f1d(0x11d));});}async[_0x25bc84(0xe3)](){const _0x315ba7=_0x25bc84;this[_0x315ba7(0xbe)]instanceof _0x58403b?this[_0x315ba7(0x10d)](this[_0x315ba7(0xbe)]):this[_0x315ba7(0x15c)](this[_0x315ba7(0xbe)][_0x315ba7(0x1af)],_0x315ba7(0xe5),(_0xc5eeaa,_0x3b38b3)=>{const _0x3291d5=_0x315ba7;_0x3b38b3['on'](_0x3291d5(0xde),()=>{const _0x383df7=_0x3291d5;this[_0x383df7(0x10d)](_0x3b38b3);});}),await this[_0x315ba7(0x17c)]();}[_0x25bc84(0x121)](_0x1401c3){const _0x250e2e=_0x25bc84,_0x42be6a=_0x27a01b(this[_0x250e2e(0xbe)]);if(!_0x42be6a[_0x250e2e(0x187)][_0x250e2e(0x11c)](_0x250e2e(0xc9)))throw new _0x2aea12(_0x250e2e(0x1c3),null);const _0x17c70c=this[_0x250e2e(0xbe)][_0x250e2e(0x187)][_0x250e2e(0x19d)](_0x250e2e(0xfa)),{reply:_0x2a9d06,interaction:_0x2e039f}=this[_0x250e2e(0x149)](_0x1401c3[_0x250e2e(0x1ab)]),_0x532d09=this[_0x250e2e(0x138)](_0x1401c3[_0x250e2e(0x1ab)],_0x1401c3[_0x250e2e(0x93)]),_0x3d5271=void 0x0!==_0x1401c3[_0x250e2e(0x93)]?[_0x2a9d06[_0x250e2e(0xd7)][_0x1401c3[_0x250e2e(0x93)]]]:_0x2a9d06[_0x250e2e(0xd7)][_0x250e2e(0xbf)](_0x3bcc77=>_0x250e2e(0x17e)==_0x3bcc77[_0x250e2e(0x143)]),_0x4bf331=_0x3d5271[_0x250e2e(0x95)](_0x14adde=>_0x2a9d06[_0x250e2e(0xd7)][_0x250e2e(0x185)](_0x14adde));if(!_0x532d09||_0x250e2e(0x11f)==_0x532d09[_0x250e2e(0x190)][_0x250e2e(0x122)][_0x250e2e(0x103)])return void _0x4bf331[_0x250e2e(0x1db)](_0x1b649a=>_0x2a9d06[_0x250e2e(0x8a)](_0x1b649a,_0x250e2e(0x141)));_0x4bf331[_0x250e2e(0x1db)](_0x189dd5=>_0x2a9d06[_0x250e2e(0x8a)](_0x189dd5,_0x250e2e(0x171)));const _0x10a655=_0x27437e({'editor':_0x42be6a,'reply':_0x2a9d06,'interaction':_0x2e039f,'groups':_0x3d5271,'transform':!0x0,'documentCompare':_0x17c70c,'documentCompareOptions':{'anchor':_0x250e2e(0x14c),'markDeletions':!0x0}});let _0x5a1a1a;_0x532d09&&this[_0x250e2e(0x7d)](_0x532d09[_0x250e2e(0x190)]),_0x42be6a[_0x250e2e(0x15d)][_0x250e2e(0x134)](_0x23ab21=>{const _0x3252df=_0x250e2e;_0x5a1a1a=_0x23ab21[_0x3252df(0x15e)],_0x42be6a[_0x3252df(0x187)][_0x3252df(0x19d)](_0x3252df(0xa6))[_0x3252df(0x1e1)](_0x10a655),this[_0x3252df(0x170)][_0x3252df(0x87)](_0x3252df(0x11d));}),this[_0x250e2e(0x153)][_0x250e2e(0xf2)](_0x5a1a1a,{'interactionId':_0x2e039f['id'],'replyId':_0x2a9d06['id'],'indexes':_0x4bf331[_0x250e2e(0x7f)]()}),this[_0x250e2e(0x109)](_0x2a9d06);}[_0x25bc84(0x1d5)](_0x146cf8){const _0x3c0bbe=_0x25bc84,_0x7566b8=_0x27a01b(this[_0x3c0bbe(0xbe)]),_0x370d50=this[_0x3c0bbe(0xbe)][_0x3c0bbe(0x187)][_0x3c0bbe(0x19d)](_0x1f9bda),{reply:_0x5d52e5,interaction:_0x53995d}=this[_0x3c0bbe(0x149)](_0x146cf8[_0x3c0bbe(0x1ab)]),_0x33e385=this[_0x3c0bbe(0x138)](_0x146cf8[_0x3c0bbe(0x1ab)],_0x146cf8[_0x3c0bbe(0x93)]),_0x226ec0=void 0x0!==_0x146cf8[_0x3c0bbe(0x93)]?[_0x5d52e5[_0x3c0bbe(0xd7)][_0x146cf8[_0x3c0bbe(0x93)]]]:_0x5d52e5[_0x3c0bbe(0xd7)][_0x3c0bbe(0xbf)](_0x33f119=>_0x3c0bbe(0x17e)==_0x33f119[_0x3c0bbe(0x143)]),_0x2b3e92=_0x226ec0[_0x3c0bbe(0x95)](_0x16a606=>_0x5d52e5[_0x3c0bbe(0xd7)][_0x3c0bbe(0x185)](_0x16a606));if(!_0x33e385||_0x3c0bbe(0x11f)==_0x33e385[_0x3c0bbe(0x190)][_0x3c0bbe(0x122)][_0x3c0bbe(0x103)])return void _0x2b3e92[_0x3c0bbe(0x1db)](_0x4d4c0a=>_0x5d52e5[_0x3c0bbe(0x8a)](_0x4d4c0a,_0x3c0bbe(0x141)));_0x2b3e92[_0x3c0bbe(0x1db)](_0x9254e7=>_0x5d52e5[_0x3c0bbe(0x8a)](_0x9254e7,_0x3c0bbe(0x171)));const _0x48c5a0=_0x27437e({'editor':_0x7566b8,'reply':_0x5d52e5,'interaction':_0x53995d,'groups':_0x226ec0,'transform':!0x0,'documentCompare':_0x370d50,'documentCompareOptions':{'anchor':_0x3c0bbe(0x14c),'markDeletions':!0x1}});let _0x3ae138;_0x33e385&&this[_0x3c0bbe(0x7d)](_0x33e385[_0x3c0bbe(0x190)]),_0x7566b8[_0x3c0bbe(0x15d)][_0x3c0bbe(0x134)](_0x1f484d=>{const _0x5db405=_0x3c0bbe;_0x3ae138=_0x1f484d[_0x5db405(0x15e)];for(const _0xd87cd of _0x48c5a0)_0xd87cd[_0x5db405(0xac)]=_0x7566b8[_0x5db405(0x15d)][_0x5db405(0x1a8)][_0x5db405(0xa0)],_0xa5e704(_0x7566b8,_0xd87cd),_0x1f484d[_0x5db405(0x15e)][_0x5db405(0x188)](_0xd87cd),_0x7566b8[_0x5db405(0x15d)][_0x5db405(0x12a)](_0xd87cd);}),this[_0x3c0bbe(0x153)][_0x3c0bbe(0xf2)](_0x3ae138,{'interactionId':_0x53995d['id'],'replyId':_0x5d52e5['id'],'indexes':_0x2b3e92[_0x3c0bbe(0x7f)]()}),this[_0x3c0bbe(0x109)](_0x5d52e5);}[_0x25bc84(0x136)](_0x74fd63,_0x14301e){const _0x5c7792=_0x25bc84,_0x434134=_0x27a01b(this[_0x5c7792(0xbe)]),_0x3e26a5=this[_0x5c7792(0x138)](_0x74fd63,_0x14301e),_0x2bf5dd=this[_0x5c7792(0xbe)][_0x5c7792(0x187)][_0x5c7792(0x19d)](_0x1baf23);if(!_0x3e26a5)return void _0x2bf5dd[_0x5c7792(0xfb)]();const {range:_0x26a6bc,currentIndex:_0x4bd827}=_0x3e26a5;if(_0x5c7792(0x11f)==_0x26a6bc[_0x5c7792(0x122)][_0x5c7792(0x103)]){const {reply:_0x2b3c13}=this[_0x5c7792(0x149)](_0x74fd63);return _0x2b3c13[_0x5c7792(0x8a)](_0x4bd827,_0x5c7792(0x141)),void _0x2bf5dd[_0x5c7792(0xfb)]();}if(this[_0x5c7792(0xec)]?.[_0x5c7792(0x1ab)]==_0x74fd63&&this[_0x5c7792(0xec)]?.[_0x5c7792(0x93)]==_0x4bd827)return;this[_0x5c7792(0x1d0)](_0x2bf5dd),this[_0x5c7792(0xec)]={'replyId':_0x74fd63,'partIndex':_0x4bd827};let _0x4efc1c=_0x434134[_0x5c7792(0x16a)][_0x5c7792(0x19d)](_0x5c7792(0x1b1))||[..._0x1eae55];_0x434134[_0x5c7792(0x187)][_0x5c7792(0x11c)](_0x5c7792(0xc9))||(_0x4efc1c=_0x4efc1c[_0x5c7792(0xbf)](_0x44723f=>_0x5c7792(0x1cc)!=_0x44723f));const _0x400e02=new _0x12d899(_0x434134[_0x5c7792(0xd3)],{'showDiff':this[_0x5c7792(0x183)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x5c7792(0xcc)},'hideHeader':!0x0,'availableActions':_0x4efc1c});this[_0x5c7792(0x1d0)](_0x400e02);const {reply:_0x25b3ad}=this[_0x5c7792(0x149)](_0x74fd63),_0x51d15a=_0x25b3ad[_0x5c7792(0x8e)]({'showDiff':this[_0x5c7792(0x183)]})[_0x5c7792(0xbf)](_0x4e7758=>_0x4e7758[_0x5c7792(0x89)]),_0x394167=_0x51d15a[_0x5c7792(0xb1)](_0x9f0254=>_0x9f0254[_0x5c7792(0xcb)]==_0x4bd827);if(-0x1==_0x394167)return;const _0x203139=_0x51d15a[_0x394167],_0x54fea3=_0x51d15a['at']((_0x394167-0x1)%_0x51d15a[_0x5c7792(0x101)])?.[_0x5c7792(0xcb)],_0x161b16=_0x51d15a['at']((_0x394167+0x1)%_0x51d15a[_0x5c7792(0x101)])?.[_0x5c7792(0xcb)];_0x400e02[_0x5c7792(0x14e)]({'parts':[_0x203139],'renderingStrategy':_0x5c7792(0xdc)});const _0x455d40=_0x4bd827!==_0x54fea3;this[_0x5c7792(0x7d)](_0x26a6bc,!0x0),_0x2bf5dd[_0x5c7792(0x98)]({'index':_0x4bd827,'title':_0x20a620(this[_0x5c7792(0xbe)][_0x5c7792(0xd3)],_0x5c7792(0x1ae),(_0x394167+0x1)[_0x5c7792(0x1d1)]()),'icon':_0x181f7c,'mainView':_0x400e02,'showRotator':_0x455d40,'showApplyButton':!0x0,'showSuggestButton':_0x434134[_0x5c7792(0x187)][_0x5c7792(0x11c)](_0x5c7792(0xc9)),'ranges':[_0x26a6bc]}),this[_0x5c7792(0x174)][_0x5c7792(0x1ba)](_0x74fd63,_0x4bd827),this[_0x5c7792(0x15c)](_0x400e02,_0x5c7792(0x1c9),(_0xa27e86,{showDiff:_0x168d45})=>{const _0x227413=_0x5c7792;this[_0x227413(0x183)]=_0x168d45;const {reply:_0x4c3743}=this[_0x227413(0x149)](_0x74fd63),_0xc24f65=_0x4c3743[_0x227413(0x8e)]({'showDiff':_0x168d45,'groupIndex':_0x4bd827});_0x400e02[_0x227413(0x14e)]({'parts':_0xc24f65,'renderingStrategy':_0x227413(0xdc)});}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x126),()=>{const _0x3da679=_0x5c7792;this[_0x3da679(0x1d5)]({'replyId':_0x74fd63,'partIndex':_0x4bd827}),_0x455d40?this[_0x3da679(0x136)](_0x74fd63,_0x161b16):_0x2bf5dd[_0x3da679(0xfb)]();}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x1cc),()=>{const _0x241768=_0x5c7792;this[_0x241768(0x121)]({'replyId':_0x74fd63,'partIndex':_0x4bd827}),_0x455d40?this[_0x241768(0x136)](_0x74fd63,_0x161b16):_0x2bf5dd[_0x241768(0xfb)]();}),_0x455d40&&(this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0xfe),()=>{const _0x28915d=_0x5c7792;this[_0x28915d(0x136)](_0x74fd63,_0x161b16);}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x169),()=>{const _0x24817c=_0x5c7792;this[_0x24817c(0x136)](_0x74fd63,_0x54fea3);})),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x83),()=>{const _0x4aa580=_0x5c7792;this[_0x4aa580(0x1d0)](_0x2bf5dd),this[_0x4aa580(0x1d0)](_0x400e02),this[_0x4aa580(0xec)]=null;});}[_0x25bc84(0x138)](_0x55dff0,_0x5ccc58){const _0x536d62=_0x25bc84,_0x58d5ea=_0x27a01b(this[_0x536d62(0xbe)]),{reply:_0x21fd48,interaction:_0x48aeb6}=this[_0x536d62(0x149)](_0x55dff0),_0x445668=_0x21fd48[_0x536d62(0xd7)][_0x536d62(0xbf)](_0x4f1b6c=>_0x536d62(0x17e)==_0x4f1b6c[_0x536d62(0x143)]),_0x5ec2ae=_0x445668[_0x536d62(0x95)](_0x59c894=>_0x21fd48[_0x536d62(0xd7)][_0x536d62(0x185)](_0x59c894));void 0x0===_0x5ccc58&&(_0x5ccc58=_0x5ec2ae[0x0]);const _0x2f8834=_0x5ec2ae[_0x536d62(0x185)](_0x5ccc58);if(-0x1==_0x2f8834)return null;const _0x44dd17=_0x445668[_0x2f8834],_0xef59db=new _0x3f8498([]),_0x22f40d=new _0x3f8498([]);for(const _0x41ea86 of _0x44dd17[_0x536d62(0x92)])if(_0x536d62(0x9c)!=_0x41ea86[_0x536d62(0x1d3)]&&_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x41ea86[_0x536d62(0x104)][_0x536d62(0x128)](!0x0)),_0x536d62(0x168)!=_0x41ea86[_0x536d62(0x1d3)]){const _0x51e317=_0x5b796f(_0x1892e4=>_0x868855(_0x1892e4,_0x536d62(0x13d))==_0x41ea86['id'],_0x21fd48[_0x536d62(0x11b)],!0x0);_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x51e317[_0x536d62(0x128)](!0x0));}if(0x0==_0xef59db[_0x536d62(0x127)][_0x536d62(0x101)]){if(_0x44dd17[_0x536d62(0x92)][0x0][_0x536d62(0x198)]){const _0x231dc0=_0x542dd7(_0x536d62(0x13d),_0x44dd17[_0x536d62(0x92)][0x0][_0x536d62(0x198)],_0x21fd48[_0x536d62(0x11b)]);_0xef59db[_0x536d62(0x127)][_0x536d62(0xb6)](_0x231dc0[_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xb6)](_0x231dc0[_0x536d62(0x128)](!0x0)),_0x231dc0[_0x536d62(0x1b2)]&&(_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x231dc0[_0x536d62(0x1b2)][_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x231dc0[_0x536d62(0x1b2)][_0x536d62(0x128)](!0x0)));}else{const _0x25f3f3=_0x21fd48[_0x536d62(0x11b)][_0x536d62(0x127)][0x0];if(!_0x25f3f3)return null;_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x25f3f3[_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x25f3f3[_0x536d62(0x128)](!0x0));}}const _0x1fd7c7=_0x48aeb6[_0x536d62(0x1d7)](),_0x4873a8=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x1fd7c7[_0x536d62(0x108)]),_0x44c283=_0xa90766(_0xef59db),_0x495131=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x44c283),_0x124a29=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x44c283),_0x13cd28=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x115)](_0x495131,0x0),_0x1767a9=_0xa90766(_0x22f40d),_0x1e4bb6={'anchor':_0x13cd28,'markDeletions':!0x1},_0x5f0b97=_0x58d5ea[_0x536d62(0x187)][_0x536d62(0x19d)](_0x1f9bda)[_0x536d62(0x114)](_0x44c283,_0x1767a9,_0x1e4bb6)[_0x536d62(0x8f)]();if(!_0x5f0b97[_0x536d62(0x101)])return null;_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x134)](_0x3f902e=>{const _0x3cbf7c=_0x536d62;for(const _0x2d805b of _0x5f0b97)if(_0x3cbf7c(0xf9)==_0x2d805b[_0x3cbf7c(0x1d3)]){const _0x113222=_0x2d805b[_0x3cbf7c(0x145)],_0x43a6d0=_0x2d805b[_0x3cbf7c(0x1c0)],_0x47687e=new _0x46c604(_0x113222,_0x43a6d0);_0x3f902e[_0x3cbf7c(0x15e)][_0x3cbf7c(0x188)](_0x47687e),_0x58d5ea[_0x3cbf7c(0x15d)][_0x3cbf7c(0x12a)](_0x47687e);}else _0x3cbf7c(0x125)!==_0x2d805b[_0x3cbf7c(0x1d3)]&&(_0x2d805b[_0x3cbf7c(0xac)]=null,_0x2d805b[_0x3cbf7c(0xbc)]=!0x1,_0x3f902e[_0x3cbf7c(0x15e)][_0x3cbf7c(0x188)](_0x2d805b),_0x58d5ea[_0x3cbf7c(0x15d)][_0x3cbf7c(0x12a)](_0x2d805b));});const _0x2bc14e=_0x39d438(_0x58d5ea,_0x5f0b97,_0x495131);_0xec16d(_0x58d5ea[_0x536d62(0x15d)],_0x2bc14e);const _0x109d12=_0x2bc14e[_0x536d62(0xc0)]()[_0x536d62(0xb5)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x1bc702=_0x2bc14e[_0x536d62(0xc0)]()[_0x536d62(0x18c)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x279377=[];let _0x232d33=_0x495131,_0x1a114e=_0x124a29;for(let _0xaa03d1=0x0;_0xaa03d1<_0x1bc702[_0x536d62(0x101)];_0xaa03d1++){const _0x4584b5=_0x232d33[_0x536d62(0x1c1)]-_0x1bc702[_0xaa03d1];_0x279377[_0xaa03d1]=_0x1a114e[_0x536d62(0x1c1)]-_0x4584b5,_0x232d33=_0x232d33[_0x536d62(0x12e)](_0x1bc702[_0xaa03d1]),_0x1a114e=_0x1a114e[_0x536d62(0x12e)](_0x279377[_0xaa03d1]);}const _0x2cfc28=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x142)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x124a29,_0x109d12),_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x124a29,_0x279377)),_0x20fca9=_0x124a29[_0x536d62(0xe9)](0x0)[_0x536d62(0x1a1)](_0x30bdda),_0x4c4d03=Array[_0x536d62(0x124)](_0x4873a8[_0x536d62(0xe1)]())[_0x536d62(0x1c7)](_0x1ed986=>_0x1ed986[_0x536d62(0x1a1)](_0x30bdda)==_0x20fca9)[_0x536d62(0x12c)](),_0x4dbb98=_0x2cfc28[_0x536d62(0xb5)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x1d053d=_0x2cfc28[_0x536d62(0x18c)][_0x536d62(0xa2)][_0x536d62(0x7f)]();_0x4dbb98[0x0]=_0x4c4d03[0x0]+_0x4dbb98[0x0],_0x1d053d[0x0]=_0x4c4d03[0x0]+_0x1d053d[0x0];let _0x34546c=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x142)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0x19e)](),_0x4dbb98),_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0x19e)](),_0x1d053d));const _0x183339=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0xf4)][_0x536d62(0x8f)](_0x1fd7c7[_0x536d62(0xa0)]);for(const _0x1eadf6 of _0x183339)_0x34546c=_0x29e4f1[_0x536d62(0x1b4)](_0x34546c[_0x536d62(0xa4)](_0x1eadf6));return{'range':_0x34546c,'currentIndex':_0x5ccc58};}[_0x25bc84(0x10d)](_0x2a6b38){const _0x36572f=_0x25bc84;if(!_0x2a6b38[_0x36572f(0x187)][_0x36572f(0x11c)](_0x36572f(0xc3)))return;const _0x117779=_0x2a6b38[_0x36572f(0x1bd)][_0x36572f(0x19d)](_0x36572f(0x135)),_0x24280e=_0x2a6b38[_0x36572f(0x1bd)][_0x36572f(0x19d)](_0x36572f(0x111));this[_0x36572f(0x15c)](_0x117779,_0x36572f(0x156),(_0x1c7eb9,_0x4e86b6,_0x1f698f)=>{const _0x5a7928=_0x36572f,_0x5e4f10=this[_0x5a7928(0x153)][_0x5a7928(0x19d)](_0x4e86b6);if(!_0x5e4f10)return;const _0x5bc39d=this[_0x5a7928(0xff)][_0x5a7928(0xd9)](_0x5e4f10[_0x5a7928(0x9d)])[_0x5a7928(0x1cb)](_0x5e4f10[_0x5a7928(0x1ab)]);_0x5e4f10[_0x5a7928(0x1a4)][_0x5a7928(0x1db)](_0x57ad96=>_0x5bc39d[_0x5a7928(0x8a)](_0x57ad96,_0x5a7928(0x17e))),this[_0x5a7928(0x153)][_0x5a7928(0x159)](_0x4e86b6),this[_0x5a7928(0x153)][_0x5a7928(0xf2)](_0x1f698f,_0x5e4f10);}),this[_0x36572f(0x15c)](_0x24280e,_0x36572f(0x156),(_0x1f8345,_0x92ca81,_0x291150)=>{const _0x4f584f=_0x36572f,_0x4c7030=this[_0x4f584f(0x153)][_0x4f584f(0x19d)](_0x92ca81);if(!_0x4c7030)return;const _0x1b2eb2=this[_0x4f584f(0xff)][_0x4f584f(0xd9)](_0x4c7030[_0x4f584f(0x9d)])[_0x4f584f(0x1cb)](_0x4c7030[_0x4f584f(0x1ab)]);_0x4c7030[_0x4f584f(0x1a4)][_0x4f584f(0x1db)](_0x22f893=>_0x1b2eb2[_0x4f584f(0x8a)](_0x22f893,_0x4f584f(0x171))),this[_0x4f584f(0x153)][_0x4f584f(0x159)](_0x92ca81),this[_0x4f584f(0x153)][_0x4f584f(0xf2)](_0x291150,_0x4c7030);});}async[_0x25bc84(0x1b9)](_0x2c2f03){const _0x471ae4=_0x25bc84;this[_0x471ae4(0xbe)][_0x471ae4(0x187)][_0x471ae4(0x19d)](_0x1baf23)[_0x471ae4(0xfb)](),this[_0x471ae4(0x174)][_0x471ae4(0x81)](_0x471ae4(0xdc)),this[_0x471ae4(0x174)][_0x471ae4(0x1da)](!0x0),await this[_0x471ae4(0xbd)]();try{await this[_0x471ae4(0x13a)][_0x471ae4(0x13e)](_0x2c2f03)[_0x471ae4(0xcf)](),await this[_0x471ae4(0x17c)](_0x2c2f03),this[_0x471ae4(0x1a0)]('\x20');const {sessionId:_0x248fbb}=this[_0x471ae4(0x170)][_0x471ae4(0x1dc)]();await this[_0x471ae4(0xff)][_0x471ae4(0xe4)](_0x2c2f03,_0x248fbb),this[_0x471ae4(0xff)][_0x471ae4(0x15a)]()&&this[_0x471ae4(0xff)][_0x471ae4(0xdb)](_0x20a620(this[_0x471ae4(0xbe)][_0x471ae4(0xd3)],_0x471ae4(0x123)));}catch(_0x3fa17e){this[_0x471ae4(0x174)][_0x471ae4(0x166)]({'errorMessage':_0x20a620(this[_0x471ae4(0xbe)][_0x471ae4(0xd3)],_0x471ae4(0x167)),'id':_0x2c2f03}),this[_0x471ae4(0x158)](new _0x2aea12(_0x471ae4(0xc2),this,{'error':_0x3fa17e}));}finally{this[_0x471ae4(0xbe)][_0x471ae4(0x187)][_0x471ae4(0x19d)](_0x406009)[_0x471ae4(0x199)][_0x471ae4(0x139)](_0x471ae4(0xa9)),this[_0x471ae4(0x174)][_0x471ae4(0xe0)](),this[_0x471ae4(0x174)][_0x471ae4(0x81)](_0x471ae4(0x192)),this[_0x471ae4(0x174)][_0x471ae4(0x1da)](!0x1);}}[_0x25bc84(0x129)](_0x1d3648){const _0x26e877=_0x25bc84;this[_0x26e877(0xff)]['id']===_0x1d3648&&this[_0x26e877(0x17c)]();}async[_0x25bc84(0xee)](){const _0x2a2215=_0x25bc84,_0xda6861=this[_0x2a2215(0x170)][_0x2a2215(0x1a2)]();this[_0x2a2215(0xff)]?.[_0x2a2215(0x86)](_0xda6861),this[_0x2a2215(0xff)]?.[_0x2a2215(0xdb)](_0x20a620(this[_0x2a2215(0xbe)][_0x2a2215(0xd3)],_0x2a2215(0x123)));}[_0x25bc84(0x14a)](){const _0xfffd41=_0x25bc84;this[_0xfffd41(0xff)]?.[_0xfffd41(0x8b)]();}[_0x25bc84(0xbb)](){const _0x4c12e4=_0x25bc84;this[_0x4c12e4(0x174)][_0x4c12e4(0xbb)]();}async[_0x25bc84(0xb7)](){const _0x220e74=_0x25bc84;await this[_0x220e74(0x17c)]();}async[_0x25bc84(0x184)]({message:_0x4ce81c,quickActionData:_0x401ba3}){const _0x5788c8=_0x25bc84;await this[_0x5788c8(0x162)]({'userMessage':_0x4ce81c,'quickActionData':_0x401ba3});}[_0x25bc84(0x79)](){const _0x33d2ae=_0x25bc84,_0x226d6b=this[_0x33d2ae(0xbe)][_0x33d2ae(0x16a)][_0x33d2ae(0x19d)](_0x33d2ae(0x14b));if(!_0x226d6b)throw new _0x2aea12(_0x33d2ae(0x1bc),this);return _0x226d6b;}async[_0x25bc84(0x17c)](_0x2763fd){const _0x281b72=_0x25bc84;try{this[_0x281b72(0x174)][_0x281b72(0x1be)](),await this[_0x281b72(0x19c)](_0x2763fd);}catch(_0x39076e){this[_0x281b72(0x174)][_0x281b72(0x166)]({'errorMessage':_0x20a620(this[_0x281b72(0xbe)][_0x281b72(0xd3)],_0x281b72(0x1cd)),'id':_0x2763fd||_0x2df6a6()}),console[_0x281b72(0x164)](_0x39076e),this[_0x281b72(0xff)]=void 0x0,this[_0x281b72(0x174)][_0x281b72(0x163)]();}}async[_0x25bc84(0x19c)](_0x1cec4e){const _0x4aba08=_0x25bc84,_0x1feec1=this[_0x4aba08(0xbe)][_0x4aba08(0x187)][_0x4aba08(0x19d)](_0x1baf23);let _0xeda8d0;_0x1feec1[_0x4aba08(0xf0)]&&_0x1feec1[_0x4aba08(0xfb)](),_0x1cec4e||!this[_0x4aba08(0xff)]?_0xeda8d0=this[_0x4aba08(0xbe)][_0x4aba08(0x16a)][_0x4aba08(0x19d)](_0x4aba08(0x1d4)):this[_0x4aba08(0x174)][_0x4aba08(0x1aa)]&&(_0xeda8d0=this[_0x4aba08(0xff)][_0x4aba08(0x99)]['id']),await this[_0x4aba08(0xbd)]();const _0x292df8=this[_0x4aba08(0x79)](),_0xa332ba=_0x1cec4e||_0x2df6a6();this[_0x4aba08(0xff)]=new _0x83be58({'connector':this[_0x4aba08(0x13a)],'chatModels':this[_0x4aba08(0x12d)],'selectedModelId':_0xeda8d0,'conversationId':_0xa332ba,'group':_0x292df8,'getEditor':()=>_0x27a01b(this[_0x4aba08(0xbe)])}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x17d),(_0x2b3941,_0x1fb410)=>{const _0x4fc44f=_0x4aba08;this[_0x4fc44f(0x174)][_0x4fc44f(0x106)](_0x1fb410),this[_0x4fc44f(0x174)][_0x4fc44f(0xb9)](),this[_0x4fc44f(0x174)][_0x4fc44f(0x7a)](),this[_0x4fc44f(0x174)][_0x4fc44f(0x1a9)](),_0x1cec4e||(this[_0x4fc44f(0x174)][_0x4fc44f(0xd5)](),this[_0x4fc44f(0xff)]?.[_0x4fc44f(0xdb)](_0x20a620(this[_0x4fc44f(0xbe)][_0x4fc44f(0xd3)],_0x4fc44f(0x123))));}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x157),(_0x5bec91,_0x126f0c)=>{const _0x4f99d0=_0x4aba08;this[_0x4f99d0(0x174)][_0x4f99d0(0x10e)](_0x126f0c[_0x4f99d0(0x14d)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x177),(_0x324607,_0xb1a284)=>{const _0x942005=_0x4aba08;this[_0x942005(0x174)][_0x942005(0x77)](_0xb1a284);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1c8),()=>{const _0xf9f7b5=_0x4aba08;this[_0xf9f7b5(0x174)][_0xf9f7b5(0xb4)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x10a),()=>{const _0x24d33c=_0x4aba08;this[_0x24d33c(0x174)][_0x24d33c(0xb4)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x191),(_0x23f801,_0x11206c)=>{const _0x1a613e=_0x4aba08;this[_0x1a613e(0x174)][_0x1a613e(0x7e)](_0x11206c,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x97),(_0x5ef2d7,_0x1efd5a)=>{const _0x121001=_0x4aba08;this[_0x121001(0x174)][_0x121001(0x7e)](_0x1efd5a,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xa5),()=>{const _0x322acf=_0x4aba08;this[_0x322acf(0x174)][_0x322acf(0x180)]();}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1b7),async()=>{const _0x471db4=_0x4aba08;await this[_0x471db4(0x174)][_0x471db4(0x1a5)]();}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x116),(_0x23beb1,_0x26e623)=>{const _0x15984d=_0x4aba08;this[_0x15984d(0x174)][_0x15984d(0x10c)](_0x26e623['id']);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xfc),(_0x236ab3,_0x469a9b,_0x3f7817)=>{const _0x242624=_0x4aba08;this[_0x242624(0x1a0)](_0x469a9b,_0x3f7817);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x160),(_0x40397f,_0x519e26)=>{const _0x21a175=_0x4aba08;_0x21a175(0x9e)===_0x519e26[_0x21a175(0x1d3)]?this[_0x21a175(0x174)][_0x21a175(0xfd)](_0x519e26):this[_0x21a175(0x174)][_0x21a175(0x96)](_0x519e26);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1df),async(_0x46c5bd,_0xd4c057)=>{const _0xf1850c=_0x4aba08;await this[_0xf1850c(0x182)]({'reply':_0xd4c057});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1d6),(_0x2f682b,{reply:_0x2ce137,index:_0x2a539d,state:_0x1cf88e})=>{const _0x7c524d=_0x4aba08;this[_0x7c524d(0x174)][_0x7c524d(0x13b)]({'id':_0x2ce137['id'],'index':_0x2a539d,'state':_0x1cf88e});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x110),(_0x24af29,_0x4f7c4a)=>{const _0x1aef33=_0x4aba08;if(this[_0x1aef33(0x174)][_0x1aef33(0x15b)](_0x4f7c4a[_0x1aef33(0x1c2)],_0x4f7c4a[_0x1aef33(0xf5)]),_0x1aef33(0xf1)===_0x4f7c4a[_0x1aef33(0x1c2)][_0x1aef33(0x1d3)]){const _0x100886=[..._0x27a01b(this[_0x1aef33(0xbe)])[_0x1aef33(0x15d)][_0x1aef33(0x1a8)][_0x1aef33(0xf1)][_0x1aef33(0xab)]()];this[_0x1aef33(0x170)][_0x1aef33(0x119)](_0x100886,_0x1aef33(0x140)+this[_0x1aef33(0xff)]?.['id']);}}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x173),(_0x5232ba,_0x49995f)=>{const _0x515039=_0x4aba08;this[_0x515039(0x174)][_0x515039(0xed)](_0x49995f[_0x515039(0x18b)]),_0x515039(0xad)==_0x49995f[_0x515039(0x18b)]&&this[_0x515039(0x14a)](),_0x515039(0xf1)===_0x49995f[_0x515039(0x1d3)]&&this[_0x515039(0x170)][_0x515039(0x87)](_0x515039(0x140)+this[_0x515039(0xff)]?.['id']);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x19f),(_0x29ea62,_0x52f3ef)=>{const _0x3ab787=_0x4aba08;this[_0x3ab787(0x174)][_0x3ab787(0x13c)](_0x52f3ef[_0x3ab787(0x1c2)][_0x3ab787(0x18b)],_0x52f3ef[_0x3ab787(0xf5)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xea),(_0x514603,_0x287450)=>{const _0x2c93d8=_0x4aba08;this[_0x2c93d8(0x174)][_0x2c93d8(0x1de)](_0x287450[_0x2c93d8(0x131)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xe7),(_0x4f36a7,_0x3e4d4d)=>{const _0x3b286b=_0x4aba08;this[_0x3b286b(0x174)][_0x3b286b(0x12b)](_0x3e4d4d[_0x3b286b(0x1e0)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x12f),(_0x8343cd,_0x1a5bb4)=>{const _0x5e74f7=_0x4aba08;this[_0x5e74f7(0x174)][_0x5e74f7(0x1a3)](_0x1a5bb4[_0x5e74f7(0x18f)],_0x1a5bb4[_0x5e74f7(0x132)],_0x1a5bb4[_0x5e74f7(0x1d2)],_0x1a5bb4[_0x5e74f7(0x75)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xf6),(_0x23b7f7,_0x2fe49c)=>{const _0x5c57af=_0x4aba08;this[_0x5c57af(0x174)][_0x5c57af(0xd6)](_0x2fe49c[_0x5c57af(0x18f)],_0x2fe49c[_0x5c57af(0x1a6)],_0x2fe49c[_0x5c57af(0x100)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x117),(_0x1864f7,_0x437437)=>{const _0x1074ee=_0x4aba08;this[_0x1074ee(0x174)][_0x1074ee(0x181)](_0x437437);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xa7),(_0xb67dc5,_0x317c5e)=>{const _0x258f2f=_0x4aba08;this[_0x258f2f(0x174)][_0x258f2f(0x193)](_0x317c5e[_0x258f2f(0x99)],_0x317c5e[_0x258f2f(0xaf)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x164),(_0x4e311f,{error:_0x222c11,interactionId:_0x120d3f,fileName:_0x1a7e4f,url:_0x4b0722,sourceId:_0x27e404,sourceLabel:_0x44f432})=>{const _0xf06c14=_0x4aba08,_0x2062aa=_0x120d3f?_0x120d3f+':'+_0x2df6a6():_0x2df6a6();_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x107))?this[_0xf06c14(0x174)][_0xf06c14(0x189)]({'staticMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x130)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0xae))||_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x155))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1cd)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x176))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1b0),_0x1a7e4f),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x186))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x113),_0x4b0722),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x84))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x80)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x14f))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x137)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x1d9))?(_0x27e404&&this[_0xf06c14(0x174)][_0xf06c14(0x133)](_0x27e404),this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xef),_0x44f432||_0xf06c14(0x132)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x15f))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x112)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x118))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xf7)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x11e))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x91)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0xd4))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1ac)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x18d))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xd0)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x1ad))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xe6)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x10f)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11));}),await this[_0x4aba08(0xff)][_0x4aba08(0x19a)](this[_0x4aba08(0xbe)][_0x4aba08(0x16a)][_0x4aba08(0x19d)](_0x4aba08(0x16e))),_0x1cec4e||await this[_0x4aba08(0xff)][_0x4aba08(0xb5)]();}async[_0x25bc84(0x162)]({userMessage:_0x53ea46,quickActionData:_0x5114e0}){const _0x44099d=_0x25bc84;if(!this[_0x44099d(0xff)])throw new _0x2aea12(_0x44099d(0x82));this[_0x44099d(0xff)][_0x44099d(0xdf)]()&&await this[_0x44099d(0xff)][_0x44099d(0x147)](this[_0x44099d(0x170)][_0x44099d(0x1dc)]()),this[_0x44099d(0xff)]['id']&&this[_0x44099d(0xff)][_0x44099d(0x1b5)]&&await this[_0x44099d(0xff)][_0x44099d(0xda)]({'userMessage':_0x53ea46,'quickActionData':_0x5114e0}),this[_0x44099d(0xba)]();}[_0x25bc84(0xba)](){const _0x4553e3=_0x25bc84,_0x4573f6=_0x27a01b(this[_0x4553e3(0xbe)])[_0x4553e3(0x15d)],_0x3ecdd6=Array[_0x4553e3(0x124)](_0x4573f6[_0x4553e3(0xb8)][_0x4553e3(0x1c6)](_0x332dfc));_0x4573f6[_0x4553e3(0x134)](_0x16ecf1=>{const _0x4d17e5=_0x4553e3;_0x3ecdd6[_0x4d17e5(0x1db)](_0x4077b6=>_0x16ecf1[_0x4d17e5(0x120)](_0x4077b6));});}[_0x25bc84(0x175)](){const _0x1ba488=_0x25bc84;console[_0x1ba488(0xb3)](_0x1ba488(0x151));}[_0x25bc84(0x17b)](_0x561610){const _0x1286f3=_0x25bc84;this[_0x1286f3(0x174)][_0x1286f3(0x16f)](_0x561610);}[_0x25bc84(0x158)](_0x104186){const _0x17b556=_0x25bc84;_0x37699d(_0x104186[_0x17b556(0x17a)]);}[_0x25bc84(0x1bf)](_0xb5ae36){const _0x45fbea=_0x25bc84;this[_0x45fbea(0xff)]?.[_0x45fbea(0xcd)](_0xb5ae36);}[_0x25bc84(0x8c)](){const _0x37fd74=_0x25bc84;this[_0x37fd74(0xff)]?.[_0x37fd74(0x7c)]();}[_0x25bc84(0x154)](){const _0x4456c4=_0x25bc84;this[_0x4456c4(0xff)]?.[_0x4456c4(0xd2)]();}[_0x25bc84(0x149)](_0x109cad){const _0x3f1d37=_0x25bc84,[_0x3d2742,_0x3cb073]=_0x109cad[_0x3f1d37(0x16c)](':'),_0x4810e9=this[_0x3f1d37(0xff)][_0x3f1d37(0xd9)](_0x3d2742),_0x2cb25=_0x4810e9[_0x3f1d37(0x1cb)](_0x3cb073);return{'interaction':_0x4810e9,'reply':_0x2cb25};}[_0x25bc84(0x7d)](_0x7d3e8e,_0x13ba45=!0x1){const _0x3346fb=_0x25bc84,_0x16ac3a=_0x27a01b(this[_0x3346fb(0xbe)]),_0x297230={'target':_0x16ac3a[_0x3346fb(0x10b)][_0x3346fb(0x199)][_0x3346fb(0x13f)][_0x3346fb(0x1c4)](_0x16ac3a[_0x3346fb(0x10b)][_0x3346fb(0x1b8)][_0x3346fb(0x1b6)](_0x7d3e8e)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x13ba45};_0x13ba45&&(_0x297230[_0x3346fb(0xc6)]=!0x0),_0x1084ad(_0x297230);}[_0x25bc84(0x1a0)](_0x414f2a,_0x2ca332=!0x1){const _0x4c1114=_0x25bc84;this[_0x4c1114(0x174)][_0x4c1114(0xfc)](_0x414f2a||_0x20a620(this[_0x4c1114(0xbe)][_0x4c1114(0xd3)],_0x4c1114(0x18a)),_0x2ca332);}async[_0x25bc84(0x182)]({reply:_0x56841f,renderingStrategy:_0x3cf403}){const _0x5dd8f2=_0x25bc84,{id:_0x25f494,isDone:_0x463693,type:_0x1cd38d,parsedContent:_0x3eba38}=_0x56841f;if(_0x5dd8f2(0x7b)===_0x1cd38d){const _0x3421ba=_0x56841f[_0x5dd8f2(0x8e)]({'showDiff':this[_0x5dd8f2(0x174)][_0x5dd8f2(0x8d)]});await this[_0x5dd8f2(0x174)][_0x5dd8f2(0xc8)]({'id':_0x25f494,'parts':_0x3421ba,'renderingStrategy':_0x3cf403,'isDone':_0x463693});}else _0x5dd8f2(0x9e)===_0x1cd38d&&await this[_0x5dd8f2(0x174)][_0x5dd8f2(0x1b3)]({'id':_0x25f494,'parsedContent':_0x3eba38,'renderingStrategy':_0x3cf403,'isDone':_0x463693});_0x463693&&_0x56841f[_0x5dd8f2(0xa3)][_0x5dd8f2(0x101)]>0x0&&this[_0x5dd8f2(0x174)][_0x5dd8f2(0xd1)](_0x25f494,_0x56841f[_0x5dd8f2(0xa3)]);}async[_0x25bc84(0xbd)](){const _0x4ba9db=_0x25bc84,_0x29cba1=this[_0x4ba9db(0xff)]?.[_0x4ba9db(0xb0)];_0x29cba1&&(_0x29cba1[_0x4ba9db(0x17f)](),this[_0x4ba9db(0x174)][_0x4ba9db(0x172)](_0x29cba1));}async[_0x25bc84(0x194)](){const _0x459f1d=_0x25bc84,_0x1caf60=this[_0x459f1d(0xff)]?.[_0x459f1d(0xb0)];if(_0x1caf60){for await(const _0xd70ba6 of _0x1caf60[_0x459f1d(0x19b)])await this[_0x459f1d(0x182)]({'reply':_0xd70ba6,'renderingStrategy':_0x459f1d(0xdc)});}}[_0x25bc84(0x109)](_0x251841){const _0x2bdf55=_0x25bc84,_0x1f1b51={'positiveCount':_0x251841[_0x2bdf55(0xd7)][_0x2bdf55(0xbf)](_0x370e4b=>_0x2bdf55(0x171)===_0x370e4b[_0x2bdf55(0x143)])[_0x2bdf55(0x101)],'totalCount':_0x251841[_0x2bdf55(0xd7)][_0x2bdf55(0x101)],'modificationId':_0x251841['id']},_0x23eeb3=this[_0x2bdf55(0xff)][_0x2bdf55(0xd9)](_0x251841[_0x2bdf55(0x9d)])[_0x2bdf55(0x9b)];this[_0x2bdf55(0x13a)][_0x2bdf55(0xe2)](this[_0x2bdf55(0xff)]['id'],_0x23eeb3,_0x1f1b51);}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x16874d=_0x7ba9;(function(_0x5b3a85,_0x358f3d){const _0x34ca06=_0x7ba9,_0x127a77=_0x5b3a85();while(!![]){try{const _0x123781=parseInt(_0x34ca06(0x1f0))/0x1*(parseInt(_0x34ca06(0x24b))/0x2)+-parseInt(_0x34ca06(0x1ed))/0x3+-parseInt(_0x34ca06(0x258))/0x4+-parseInt(_0x34ca06(0x202))/0x5*(parseInt(_0x34ca06(0x200))/0x6)+-parseInt(_0x34ca06(0x22f))/0x7*(-parseInt(_0x34ca06(0x26b))/0x8)+parseInt(_0x34ca06(0x1dc))/0x9*(parseInt(_0x34ca06(0x24e))/0xa)+-parseInt(_0x34ca06(0x1e2))/0xb*(-parseInt(_0x34ca06(0x1f8))/0xc);if(_0x123781===_0x358f3d)break;else _0x127a77['push'](_0x127a77['shift']());}catch(_0x44ee26){_0x127a77['push'](_0x127a77['shift']());}}}(_0x4a65,0x8d8b4));function _0x7ba9(_0x53c6e2,_0x1a5998){const _0x4a6539=_0x4a65();return _0x7ba9=function(_0x7ba91a,_0x551572){_0x7ba91a=_0x7ba91a-0x1cb;let _0x7ef5e7=_0x4a6539[_0x7ba91a];return _0x7ef5e7;},_0x7ba9(_0x53c6e2,_0x1a5998);}import{ContextPlugin as _0x5660e1}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x235c00}from'ckeditor5/src/utils.js';import{AIChatView as _0x5049d0}from'./ui/aichatview.js';import{AITabs as _0x175cbf}from'../aitabs/aitabs.js';import{getTranslation as _0x1d7aed}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x409e49}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5875ea}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xd2def3}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0xa96303}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x130c64}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x111072}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x5660e1{static get[_0x16874d(0x1f3)](){return[_0x175cbf];}[_0x16874d(0x242)];static get[_0x16874d(0x20b)](){const _0xdd4ae4=_0x16874d;return _0xdd4ae4(0x26e);}static get[_0x16874d(0x209)](){return!0x0;}static get[_0x16874d(0x245)](){return!0x0;}[_0x16874d(0x1cb)]=_0x16874d(0x1ea);[_0x16874d(0x24f)]=!0x0;[_0x16874d(0x266)];[_0x16874d(0x22c)];[_0x16874d(0x207)]=void 0x0;[_0x16874d(0x217)]=!0x1;constructor(_0x5ed250){const _0x5c8b74=_0x16874d;super(_0x5ed250);const _0x24467a=this[_0x5c8b74(0x25a)][_0x5c8b74(0x271)][_0x5c8b74(0x203)](_0x5c8b74(0x243));this[_0x5c8b74(0x1f2)](_0x5c8b74(0x26d),!0x1),this[_0x5c8b74(0x266)]=new _0xd2def3(),this[_0x5c8b74(0x242)]=new _0x5049d0(this[_0x5c8b74(0x25a)][_0x5c8b74(0x222)],{'showResizeButton':_0x24467a[_0x5c8b74(0x20d)],'contextResourcesSearchInputVisibleFrom':this[_0x5c8b74(0x25a)][_0x5c8b74(0x221)][_0x5c8b74(0x203)](_0x5c8b74(0x238))}),this[_0x5c8b74(0x242)][_0x5c8b74(0x219)](..._0xa96303)['to'](this),this[_0x5c8b74(0x242)]['on'](_0x5c8b74(0x1f6),(_0x38fd1f,{showDiff:_0x536bcf})=>{const _0x359cb4=_0x5c8b74;this[_0x359cb4(0x24f)]=_0x536bcf;}),_0x24467a[_0x5c8b74(0x227)][_0x5c8b74(0x257)]({'id':_0x5c8b74(0x22e),'buttonLabel':_0x1d7aed(this[_0x5c8b74(0x25a)][_0x5c8b74(0x222)],_0x5c8b74(0x255)),'buttonIcon':_0x409e49,'order':0x0,'content':this[_0x5c8b74(0x242)]}),this[_0x5c8b74(0x242)][_0x5c8b74(0x263)][_0x5c8b74(0x1fa)](_0x5c8b74(0x23f))['to'](this,_0x5c8b74(0x26d),_0x2bd7bb=>_0x2bd7bb),this[_0x5c8b74(0x242)][_0x5c8b74(0x220)][_0x5c8b74(0x1fa)](_0x5c8b74(0x25b))['to'](this,_0x5c8b74(0x26d),_0x4eb5ec=>_0x4eb5ec),this[_0x5c8b74(0x242)][_0x5c8b74(0x263)][_0x5c8b74(0x1da)](this[_0x5c8b74(0x1f4)]()),this[_0x5c8b74(0x1fa)](_0x5c8b74(0x251))['to'](this[_0x5c8b74(0x242)][_0x5c8b74(0x263)],_0x5c8b74(0x251));}[_0x16874d(0x223)](){const _0x186b7d=_0x16874d;super[_0x186b7d(0x223)](),this[_0x186b7d(0x207)]&&clearInterval(this[_0x186b7d(0x207)]);}[_0x16874d(0x230)](_0x387664){const _0x248cdb=_0x16874d;this[_0x248cdb(0x242)][_0x248cdb(0x220)][_0x248cdb(0x1e6)](),this[_0x248cdb(0x242)][_0x248cdb(0x263)][_0x248cdb(0x225)](),this[_0x248cdb(0x242)][_0x248cdb(0x263)][_0x248cdb(0x1d3)](_0x387664[_0x248cdb(0x1e7)],!this[_0x248cdb(0x25a)][_0x248cdb(0x221)][_0x248cdb(0x203)](_0x248cdb(0x24d))),this[_0x248cdb(0x272)]({'id':_0x248cdb(0x21e),'staticMessage':_0x1d7aed(this[_0x248cdb(0x25a)][_0x248cdb(0x222)],_0x248cdb(0x235))});}[_0x16874d(0x272)]({id:_0x292170,staticMessage:_0x4af071}){const _0x1aab1d=_0x16874d;this[_0x1aab1d(0x242)][_0x1aab1d(0x220)][_0x1aab1d(0x1ce)](_0x1aab1d(0x25d),{'id':_0x292170,'initialContent':_0x1aab1d(0x1d0)+_0x4af071+_0x1aab1d(0x267)});}[_0x16874d(0x21f)](_0x1d0698){const _0xeab08e=_0x16874d,_0x1d3521=_0x1d0698[_0xeab08e(0x273)]?.[_0xeab08e(0x1e5)]||_0x1d0698[_0xeab08e(0x241)];this[_0xeab08e(0x242)][_0xeab08e(0x220)][_0xeab08e(0x1ce)](_0xeab08e(0x1ee),{'contextItems':Array[_0xeab08e(0x24c)](_0x1d0698[_0xeab08e(0x1cc)][_0xeab08e(0x204)]()),'initialContent':_0xeab08e(0x1d0)+_0x1d3521+_0xeab08e(0x267),'id':_0x1d0698['id']});}[_0x16874d(0x201)]({errorMessage:_0xc19911,id:_0x1ee1e9}){const _0x44f848=_0x16874d;this[_0x44f848(0x242)][_0x44f848(0x220)][_0x44f848(0x1ce)](_0x44f848(0x21b),{'initialContent':_0x44f848(0x1d0)+_0xc19911+_0x44f848(0x267),'id':_0x1ee1e9});}[_0x16874d(0x208)](_0x45de60){const _0x5f9491=_0x16874d;return this[_0x5f9491(0x266)][_0x5f9491(0x21a)](async()=>{const _0x3ba356=_0x5f9491;this[_0x3ba356(0x242)][_0x3ba356(0x220)][_0x3ba356(0x1ce)](_0x3ba356(0x25d),{'id':_0x45de60[_0x3ba356(0x1e1)]+':'+_0x45de60['id']}),this[_0x3ba356(0x20c)](null);});}async[_0x16874d(0x1d9)](_0x395489){const _0x473cca=_0x16874d,_0x40ff16=_0x130c64(this[_0x473cca(0x25a)]);let _0x5630ea=_0x40ff16[_0x473cca(0x221)][_0x473cca(0x203)](_0x473cca(0x25e))||[..._0x111072];if(_0x40ff16[_0x473cca(0x271)][_0x473cca(0x237)](_0x473cca(0x23e))){if(!this[_0x473cca(0x217)]){this[_0x473cca(0x217)]=!0x0;const _0x3e21d9=_0x40ff16[_0x473cca(0x22a)][_0x473cca(0x203)](_0x473cca(0x211));this[_0x473cca(0x242)][_0x473cca(0x220)][_0x473cca(0x1fa)](_0x473cca(0x212))['to'](_0x3e21d9,_0x473cca(0x218));}}else _0x5630ea=_0x5630ea[_0x473cca(0x1f9)](_0x29a294=>_0x473cca(0x261)!=_0x29a294);return this[_0x473cca(0x266)][_0x473cca(0x21a)](async()=>{const _0x57001d=_0x473cca;this[_0x57001d(0x242)][_0x57001d(0x220)][_0x57001d(0x1ce)](_0x57001d(0x269),{'id':_0x395489[_0x57001d(0x1e1)]+':'+_0x395489['id'],'areActionsDisabled':_0x395489[_0x57001d(0x259)],'showDiff':this[_0x57001d(0x24f)],'availableActions':_0x5630ea}),this[_0x57001d(0x20c)](null);});}[_0x16874d(0x1e8)](_0x57b1f1,_0x57dea0){const _0x2c08d0=_0x16874d,_0x164c3f=this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x22d)][_0x2c08d0(0x21c)];if(_0x164c3f instanceof _0x5875ea)return this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x22d)][_0x2c08d0(0x25c)](_0x164c3f),void this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x1ce)](_0x2c08d0(0x213),{'id':_0x57b1f1['id'],'capabilities':{'isWebSearchEnabled':_0x164c3f[_0x2c08d0(0x214)][_0x2c08d0(0x23b)]||_0x57dea0[_0x2c08d0(0x23b)],'isReasoningEnabled':_0x164c3f[_0x2c08d0(0x214)][_0x2c08d0(0x1d5)]||_0x57dea0[_0x2c08d0(0x1d5)]}});this[_0x2c08d0(0x242)][_0x2c08d0(0x220)][_0x2c08d0(0x1ce)](_0x2c08d0(0x213),{'id':_0x57b1f1['id'],'capabilities':_0x57dea0});}[_0x16874d(0x26f)](_0x25e8c2){const _0x3f37d3=_0x16874d,_0x36365e=this[_0x3f37d3(0x242)][_0x3f37d3(0x220)][_0x3f37d3(0x22d)][_0x3f37d3(0x210)](_0x21a62e=>_0x21a62e[_0x3f37d3(0x25f)]['id']==_0x25e8c2['id']&&_0x21a62e instanceof _0x5875ea);_0x36365e&&_0x36365e[_0x3f37d3(0x1f2)](_0x3f37d3(0x1eb),_0x25e8c2[_0x3f37d3(0x1eb)]);}async[_0x16874d(0x1f7)](_0xf18282){const _0x25d95f=_0x16874d,_0x186250=_0xf18282[_0x25d95f(0x1d4)]||this[_0x25d95f(0x1cb)];return this[_0x25d95f(0x266)][_0x25d95f(0x21a)](async _0x3296c0=>{const _0x4a261b=_0x25d95f;await this[_0x4a261b(0x242)][_0x4a261b(0x220)][_0x4a261b(0x234)]({..._0xf18282,'abortSignal':_0x3296c0,'renderingStrategy':_0x186250}),_0xf18282[_0x4a261b(0x1e3)]&&this[_0x4a261b(0x26c)](_0xf18282['id']);});}[_0x16874d(0x1f1)](_0x57f399,_0x132488){const _0x399309=_0x16874d;this[_0x399309(0x242)][_0x399309(0x220)][_0x399309(0x1d2)](_0x57f399,_0x132488);}async[_0x16874d(0x1d8)](_0x4d9904){const _0x42ea9c=_0x16874d,_0x59d54a=_0x4d9904[_0x42ea9c(0x1d4)]||this[_0x42ea9c(0x1cb)];return this[_0x42ea9c(0x266)][_0x42ea9c(0x21a)](async _0x2fae03=>{const _0x5341ac=_0x42ea9c;await this[_0x5341ac(0x242)][_0x5341ac(0x220)][_0x5341ac(0x254)]({..._0x4d9904,'abortSignal':_0x2fae03,'renderingStrategy':_0x59d54a}),_0x4d9904[_0x5341ac(0x1e3)]&&this[_0x5341ac(0x26c)](_0x4d9904['id']);});}[_0x16874d(0x224)](_0x166726){const _0x4271ef=_0x16874d;this[_0x4271ef(0x242)][_0x4271ef(0x220)][_0x4271ef(0x24a)](_0x166726);}[_0x16874d(0x26c)](_0x479d83){const _0x52d562=_0x16874d;this[_0x52d562(0x242)][_0x52d562(0x220)][_0x52d562(0x239)](_0x479d83);}[_0x16874d(0x253)](_0x547b73){const _0x48727b=_0x16874d;this[_0x48727b(0x242)][_0x48727b(0x220)][_0x48727b(0x233)]()[_0x48727b(0x1f9)](_0x2d3d23=>_0x2d3d23[_0x48727b(0x268)](_0x547b73))[_0x48727b(0x265)](_0xf3c739=>this[_0x48727b(0x242)][_0x48727b(0x220)][_0x48727b(0x26a)](_0xf3c739));}[_0x16874d(0x236)](){const _0x10753a=_0x16874d;this[_0x10753a(0x20c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x10753a(0x242)][_0x10753a(0x263)][_0x10753a(0x1df)](!this[_0x10753a(0x25a)][_0x10753a(0x221)][_0x10753a(0x203)](_0x10753a(0x24d))),this[_0x10753a(0x26d)]=!0x0,this[_0x10753a(0x242)][_0x10753a(0x220)][_0x10753a(0x226)]();}[_0x16874d(0x229)](_0x399fe6){const _0x1b361a=_0x16874d;this[_0x1b361a(0x266)][_0x1b361a(0x20f)](),this[_0x1b361a(0x242)][_0x1b361a(0x220)][_0x1b361a(0x233)]()[_0x1b361a(0x1f9)](_0x103c8e=>_0x103c8e[_0x1b361a(0x268)](_0x399fe6['id']))[_0x1b361a(0x265)](_0xc90d24=>this[_0x1b361a(0x26c)](_0xc90d24)),this[_0x1b361a(0x26d)]=!0x1,this[_0x1b361a(0x242)][_0x1b361a(0x220)][_0x1b361a(0x252)]();}async[_0x16874d(0x1fb)](){const _0x48defc=_0x16874d;return this[_0x48defc(0x266)][_0x48defc(0x246)][_0x48defc(0x247)](()=>{const _0x387daa=_0x48defc;this[_0x387daa(0x26d)]=!0x1,this[_0x387daa(0x242)][_0x387daa(0x220)][_0x387daa(0x252)]();});}[_0x16874d(0x216)](_0x3b20c4,_0x404179){const _0x1d6ae2=_0x16874d;this[_0x1d6ae2(0x242)][_0x1d6ae2(0x263)][_0x1d6ae2(0x216)](_0x3b20c4,_0x404179);}[_0x16874d(0x1de)](_0x146eb3){const _0x3a4b92=_0x16874d;this[_0x3a4b92(0x242)][_0x3a4b92(0x263)][_0x3a4b92(0x1de)](_0x146eb3);}[_0x16874d(0x1e4)](_0x2fa1d6,_0x3cfd82){const _0x49aae3=_0x16874d;this[_0x49aae3(0x242)][_0x49aae3(0x263)][_0x49aae3(0x1e4)](_0x2fa1d6,_0x3cfd82);}[_0x16874d(0x1ff)](_0x40c7b7){const _0x49e8e1=_0x16874d;this[_0x49e8e1(0x242)][_0x49e8e1(0x263)][_0x49e8e1(0x1ff)](_0x40c7b7);}[_0x16874d(0x1db)](_0x7bac38){const _0x187bf0=_0x16874d;this[_0x187bf0(0x242)][_0x187bf0(0x263)][_0x187bf0(0x1db)](_0x7bac38);}[_0x16874d(0x249)](){const _0x229c4e=_0x16874d;this[_0x229c4e(0x242)][_0x229c4e(0x263)][_0x229c4e(0x249)]();}[_0x16874d(0x21d)](){const _0x374b44=_0x16874d;this[_0x374b44(0x242)][_0x374b44(0x263)][_0x374b44(0x21d)]();}[_0x16874d(0x248)](_0x5d0105,_0x16940f,_0x2e36e4){const _0x9472fc=_0x16874d;this[_0x9472fc(0x242)][_0x9472fc(0x263)][_0x9472fc(0x248)](_0x5d0105,_0x16940f,_0x2e36e4);}[_0x16874d(0x1fc)](){const _0x14d6ef=_0x16874d;this[_0x14d6ef(0x242)][_0x14d6ef(0x263)][_0x14d6ef(0x1fc)](),this[_0x14d6ef(0x242)][_0x14d6ef(0x263)][_0x14d6ef(0x1da)](this[_0x14d6ef(0x1f4)]());}[_0x16874d(0x1d6)](_0x1ba8f3){const _0x1cdb55=_0x16874d;this[_0x1cdb55(0x242)][_0x1cdb55(0x263)][_0x1cdb55(0x1d6)](_0x1ba8f3);}[_0x16874d(0x1fe)](_0x37f512){const _0xe542c0=_0x16874d;this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x1e9)](_0x37f512[_0xe542c0(0x23b)]),this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x250)](_0x37f512[_0xe542c0(0x1d5)]),this[_0xe542c0(0x242)][_0xe542c0(0x263)][_0xe542c0(0x1da)](this[_0xe542c0(0x1f4)](_0x37f512));}[_0x16874d(0x260)](_0x1baf1e,_0x37007a){const _0x5dc50f=_0x16874d;this[_0x5dc50f(0x242)][_0x5dc50f(0x263)][_0x5dc50f(0x262)](_0x1baf1e),_0x37007a&&this[_0x5dc50f(0x242)][_0x5dc50f(0x263)][_0x5dc50f(0x1df)](!0x1);}[_0x16874d(0x22b)](_0x3b33f0){const _0x15dcf7=_0x16874d;this[_0x15dcf7(0x1cb)]=_0x3b33f0;}[_0x16874d(0x215)](_0x297f86){const _0x538c35=_0x16874d;this[_0x538c35(0x242)][_0x538c35(0x220)][_0x538c35(0x215)](_0x297f86);}[_0x16874d(0x1dd)](){const _0x4b16e7=_0x16874d;this[_0x4b16e7(0x240)](_0x1d7aed(this[_0x4b16e7(0x25a)][_0x4b16e7(0x222)],_0x4b16e7(0x255)));}[_0x16874d(0x240)](_0x18c675,_0x1fb5b3=!0x1){const _0x29dfb7=_0x16874d;if(_0x1fb5b3&&!_0x235c00()&&_0x18c675[_0x29dfb7(0x1f5)])return this[_0x29dfb7(0x242)][_0x29dfb7(0x1d7)][_0x29dfb7(0x20a)]='',void this[_0x29dfb7(0x1e0)](_0x18c675);this[_0x29dfb7(0x242)][_0x29dfb7(0x1d7)][_0x29dfb7(0x20a)]=_0x18c675;}[_0x16874d(0x20c)](_0x5c53ba){const _0x2c7b53=_0x16874d,_0x451ee7=this[_0x2c7b53(0x1d1)](_0x5c53ba);this[_0x2c7b53(0x242)][_0x2c7b53(0x220)][_0x2c7b53(0x20c)](_0x451ee7);}[_0x16874d(0x1e0)](_0x55a9c9){const _0xff5cf6=_0x16874d;let _0x534a99=0x0;clearInterval(this[_0xff5cf6(0x207)]),this[_0xff5cf6(0x207)]=setInterval(()=>{const _0x3d743b=_0xff5cf6;this[_0x3d743b(0x242)][_0x3d743b(0x1d7)][_0x3d743b(0x20a)]=this[_0x3d743b(0x242)][_0x3d743b(0x1d7)][_0x3d743b(0x20a)]+_0x55a9c9[_0x534a99],_0x534a99++,_0x534a99===_0x55a9c9[_0x3d743b(0x1f5)]&&clearInterval(this[_0x3d743b(0x207)]);},0x1e);}[_0x16874d(0x232)](_0x17b212){const _0xecd03d=_0x16874d;this[_0xecd03d(0x242)][_0xecd03d(0x1d7)][_0xecd03d(0x1fd)]=_0x17b212;}[_0x16874d(0x1d1)](_0x5a003d){const _0x1a4753=_0x16874d;return _0x5a003d?_0x5a003d[_0x1a4753(0x23b)]&&_0x5a003d[_0x1a4753(0x1d5)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x23d)):_0x5a003d[_0x1a4753(0x23b)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x244)):_0x5a003d[_0x1a4753(0x1d5)]?_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x270)):_0x1d7aed(this[_0x1a4753(0x25a)][_0x1a4753(0x222)],_0x1a4753(0x23c)):'';}[_0x16874d(0x1f4)](_0x230280){const _0x5e7d17=_0x16874d;return _0x230280?_0x230280[_0x5e7d17(0x23b)]&&_0x230280[_0x5e7d17(0x1d5)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x231)):_0x230280[_0x5e7d17(0x23b)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x1cd)):_0x230280[_0x5e7d17(0x1d5)]?_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x1ef)):_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x205)):_0x1d7aed(this[_0x5e7d17(0x25a)][_0x5e7d17(0x222)],_0x5e7d17(0x205));}[_0x16874d(0x1ec)](_0x186b2f,_0xe73f21,_0x451419,_0x3f1f29){const _0x19e450=_0x16874d;this[_0x19e450(0x242)][_0x19e450(0x1ec)](_0x186b2f,_0xe73f21,_0x451419,_0x3f1f29);}[_0x16874d(0x206)](_0x1558d2){const _0x9546ae=_0x16874d;this[_0x9546ae(0x242)][_0x9546ae(0x206)](_0x1558d2);}[_0x16874d(0x228)](){const _0x5c1f43=_0x16874d;this[_0x5c1f43(0x242)][_0x5c1f43(0x263)][_0x5c1f43(0x228)]();}[_0x16874d(0x256)](_0x8a940c,_0x1ce572){const _0x6e5af4=_0x16874d;this[_0x6e5af4(0x242)][_0x6e5af4(0x220)][_0x6e5af4(0x264)](_0x8a940c,_0x1ce572);}[_0x16874d(0x226)](){const _0x5220df=_0x16874d;this[_0x5220df(0x242)][_0x5220df(0x220)][_0x5220df(0x226)]();}[_0x16874d(0x23a)](){const _0x427091=_0x16874d;this[_0x427091(0x242)][_0x427091(0x263)][_0x427091(0x1cf)]=!0x0;}[_0x16874d(0x20e)](){const _0x20e308=_0x16874d;this[_0x20e308(0x242)][_0x20e308(0x263)][_0x20e308(0x1cf)]=!0x1;}}function _0x4a65(){const _0xd532fa=['value','delegate','enqueue','error-message','last','clearConversationContextUI','conversation-start','addFeedItemUserMessage','chatFeed','config','locale','destroy','updateFeedItemAIReplySuggestionPartState','enableModelSelector','startAutoScroll','view','focusPromptInput','stopInteraction','commands','setFeedItemRenderingStrategy','_interactionPromiseResolver','children','chat','95494gpaqFz','createConversation','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setIsMaximized','getItemIds','updateReplyItem','AI_CHAT_WELCOME_MESSAGE','startInteraction','has','ai.chat.context.searchInputVisibleFrom','markItemAsDone','disableControls','isWebSearchEnabled','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','TrackChanges','isLoading','setConversationTitle','userMessage','_view','AITabs','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','isPremiumPlugin','queueEmptyPromise','then','updateResourceState','clearPendingContextUI','updateSuggestionPartState','10ckxoub','from','ai.chat.models.modelSelectorAlwaysVisible','10HCopNn','showDiff','setReasoning','isModelAvailable','stopAutoScroll','removeFeedInteraction','updateSuggestionItem','AI_CHAT_HEADING','scrollFeedToSuggestion','addTab','3217840VDMIul','areActionsDisabled','context','isPending','remove','ai-reply','ai.availableReplyActions','options','setSelectedModel','insertSuggestion','setModel','chatControls','scrollToSuggestion','forEach','_promiseQueue','</p>','startsWith','ai-suggestion-reply','removeItem','88tfKBCc','markFeedItemAsDone','isBusy','AIChatUI','updateFeedInteractionHeader','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','plugins','addFeedItemStaticMessage','quickActionData','feedItemRenderingStrategy','contextItems','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','addItem','isDisabled','<p>','_getLoadingMessage','updateWebSources','setModelList','renderingStrategy','isReasoningEnabled','setAddContextOptions','chatHeader','updateFeedItemAIReplySuggestionContent','addFeedItemAISuggestion','setInputPlaceholder','setConversationContext','2542941TudlfL','resetConversationTitle','removeContextItem','disableModelSelector','_animateConversationTitle','interactionId','135179QJvRTK','isDone','setContextItemLoading','displayedPrompt','clear','availableModels','addFeedInteractionHeader','setWebSearch','streaming','isVisible','populateSourceResourceBalloon','3106488LYVlUI','user-message','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','138615OhVKrz','updateFeedItemAIReplySources','set','requires','_getInputPlaceholder','length','toggleSuggestionDisplayMode','updateFeedItemAIReplyContent','1728ZHoQAV','filter','bind','finishInteraction','resetMessageInput','isMaximized','updateCapabilities','setIsUploadInProgress','12sVjSTJ','addFeedItemError','1188955QDAzyv','get','values','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','closeSourceResourceBalloon','_titleAnimationInterval','addFeedItemAIReply','isOfficialPlugin','label','pluginName','setLoadingMessage','showResizeButton','enableControls','abort','find','trackChanges','isTrackChangesOn','interaction-header','capabilities','toggleLoadingSkeleton','addContextItem','_isTrackChangesCommandValueBound'];_0x4a65=function(){return _0xd532fa;};return _0x4a65();}
|
|
23
|
+
function _0xa515(){const _0x5bb85a=['updateFeedItemAIReplySources','resetConversationTitle','streaming','user-message','get','has','commands','ai-reply','chatControls','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','from','interaction-header','remove','3746892nkAAEA','1090sKfflH','enqueue','updateSuggestionPartState','updateSuggestionItem','toggleLoadingSkeleton','isVisible','context','destroy','addFeedItemError','enableControls','setAddContextOptions','scrollToSuggestion','forEach','showResizeButton','finishInteraction','addFeedItemAIReply','AIChatUI','10996392kxZRvA','updateResourceState','setModel','closeSourceResourceBalloon','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','startInteraction','ai-suggestion-reply','addTab','conversation-start','setSelectedModel','areActionsDisabled','queueEmptyPromise','getItemIds','removeFeedInteraction','addFeedItemUserMessage','markItemAsDone','addItem','length','delegate','filter','431012yDZROZ','disableControls','13332906HlGqaJ','isPremiumPlugin','addFeedInteractionHeader','27XLYBKn','TrackChanges','isDone','setConversationContext','isPending','interactionId','isBusy','_animateConversationTitle','setConversationTitle','</p>','AI_CHAT_WELCOME_MESSAGE','bind','_interactionPromiseResolver','AI_CHAT_HEADING','775xMLevR','chatHeader','view','setFeedItemRenderingStrategy','populateSourceResourceBalloon','error-message','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','ai.chat.context.searchInputVisibleFrom','isWebSearchEnabled','_titleAnimationInterval','capabilities','isModelAvailable','insertSuggestion','_isTrackChangesCommandValueBound','stopAutoScroll','then','updateWebSources','markFeedItemAsDone','setIsUploadInProgress','addFeedItemStaticMessage','setInputPlaceholder','clear','scrollFeedToSuggestion','abort','enableModelSelector','_getLoadingMessage','pluginName','disableModelSelector','setWebSearch','startAutoScroll','contextItems','showDiff','displayedPrompt','children','updateFeedInteractionHeader','3591630IUAOxt','<p>','chatFeed','setContextItemLoading','startsWith','isDisabled','values','isOfficialPlugin','config','updateFeedItemAIReplySuggestionPartState','5842710eiMONY','_view','updateFeedItemAIReplySuggestionContent','addContextItem','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','isTrackChangesOn','isLoading','options','find','setModelList','AITabs','plugins','ai.chat.models.modelSelectorAlwaysVisible','requires','_getInputPlaceholder','addFeedItemAISuggestion','setIsMaximized','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','setReasoning','isReasoningEnabled','quickActionData','updateReplyItem','stopInteraction','label','trackChanges','clearPendingContextUI','locale','isMaximized','updateCapabilities','createConversation','set','removeContextItem','feedItemRenderingStrategy','clearConversationContextUI','renderingStrategy','value','userMessage','ai.availableReplyActions','removeItem','setLoadingMessage','focusPromptInput','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','toggleSuggestionDisplayMode','updateFeedItemAIReplyContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','_promiseQueue','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','availableModels','last','resetMessageInput','chat'];_0xa515=function(){return _0x5bb85a;};return _0xa515();}function _0x3f79(_0x2c51c7,_0x123749){const _0xa515f2=_0xa515();return _0x3f79=function(_0x3f795e,_0x32d378){_0x3f795e=_0x3f795e-0xb3;let _0x5b13d6=_0xa515f2[_0x3f795e];return _0x5b13d6;},_0x3f79(_0x2c51c7,_0x123749);}const _0xf4a3bc=_0x3f79;(function(_0x118c3b,_0x4894f6){const _0xa5b70e=_0x3f79,_0x1cffc9=_0x118c3b();while(!![]){try{const _0x219040=-parseInt(_0xa5b70e(0x117))/0x1*(-parseInt(_0xa5b70e(0xdf))/0x2)+parseInt(_0xa5b70e(0x109))/0x3*(-parseInt(_0xa5b70e(0x104))/0x4)+parseInt(_0xa5b70e(0x144))/0x5+parseInt(_0xa5b70e(0xde))/0x6+-parseInt(_0xa5b70e(0x13a))/0x7+-parseInt(_0xa5b70e(0xf0))/0x8+parseInt(_0xa5b70e(0x106))/0x9;if(_0x219040===_0x4894f6)break;else _0x1cffc9['push'](_0x1cffc9['shift']());}catch(_0x12a73e){_0x1cffc9['push'](_0x1cffc9['shift']());}}}(_0xa515,0xccef9));import{ContextPlugin as _0x4a5691}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x115c84}from'ckeditor5/src/utils.js';import{AIChatView as _0x3ee84f}from'./ui/aichatview.js';import{AITabs as _0xb06856}from'../aitabs/aitabs.js';import{getTranslation as _0x5b7b06}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x363432}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1ff243}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x829663}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x11f5c7}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x137728}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4af346}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x4a5691{static get[_0xf4a3bc(0x151)](){return[_0xb06856];}[_0xf4a3bc(0x145)];static get[_0xf4a3bc(0x131)](){const _0x4c7bfa=_0xf4a3bc;return _0x4c7bfa(0xef);}static get[_0xf4a3bc(0x141)](){return!0x0;}static get[_0xf4a3bc(0x107)](){return!0x0;}[_0xf4a3bc(0xbe)]=_0xf4a3bc(0xd3);[_0xf4a3bc(0x136)]=!0x0;[_0xf4a3bc(0xcb)];[_0xf4a3bc(0x115)];[_0xf4a3bc(0x120)]=void 0x0;[_0xf4a3bc(0x124)]=!0x1;constructor(_0x3c2047){const _0x51cc7d=_0xf4a3bc;super(_0x3c2047);const _0x3a5622=this[_0x51cc7d(0xe5)][_0x51cc7d(0x14f)][_0x51cc7d(0xd5)](_0x51cc7d(0x14e));this[_0x51cc7d(0xbc)](_0x51cc7d(0x10f),!0x1),this[_0x51cc7d(0xcb)]=new _0x829663(),this[_0x51cc7d(0x145)]=new _0x3ee84f(this[_0x51cc7d(0xe5)][_0x51cc7d(0xb8)],{'showResizeButton':_0x3a5622[_0x51cc7d(0xec)],'contextResourcesSearchInputVisibleFrom':this[_0x51cc7d(0xe5)][_0x51cc7d(0x142)][_0x51cc7d(0xd5)](_0x51cc7d(0x11e))}),this[_0x51cc7d(0x145)][_0x51cc7d(0x102)](..._0x11f5c7)['to'](this),this[_0x51cc7d(0x145)]['on'](_0x51cc7d(0xc8),(_0x578ebd,{showDiff:_0x1c32bd})=>{const _0x351cea=_0x51cc7d;this[_0x351cea(0x136)]=_0x1c32bd;}),_0x3a5622[_0x51cc7d(0x119)][_0x51cc7d(0xf7)]({'id':_0x51cc7d(0xd0),'buttonLabel':_0x5b7b06(this[_0x51cc7d(0xe5)][_0x51cc7d(0xb8)],_0x51cc7d(0x116)),'buttonIcon':_0x363432,'order':0x0,'content':this[_0x51cc7d(0x145)]}),this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)][_0x51cc7d(0x114)](_0x51cc7d(0x14a))['to'](this,_0x51cc7d(0x10f),_0x43a887=>_0x43a887),this[_0x51cc7d(0x145)][_0x51cc7d(0x13c)][_0x51cc7d(0x114)](_0x51cc7d(0x10d))['to'](this,_0x51cc7d(0x10f),_0x351dd7=>_0x351dd7),this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)][_0x51cc7d(0x12b)](this[_0x51cc7d(0x152)]()),this[_0x51cc7d(0x114)](_0x51cc7d(0x122))['to'](this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)],_0x51cc7d(0x122));}[_0xf4a3bc(0xe6)](){const _0x3d8796=_0xf4a3bc;super[_0x3d8796(0xe6)](),this[_0x3d8796(0x120)]&&clearInterval(this[_0x3d8796(0x120)]);}[_0xf4a3bc(0xbb)](_0x325235){const _0xca5200=_0xf4a3bc;this[_0xca5200(0x145)][_0xca5200(0x13c)][_0xca5200(0x12c)](),this[_0xca5200(0x145)][_0xca5200(0xd9)][_0xca5200(0x12f)](),this[_0xca5200(0x145)][_0xca5200(0xd9)][_0xca5200(0x14d)](_0x325235[_0xca5200(0xcd)],!this[_0xca5200(0xe5)][_0xca5200(0x142)][_0xca5200(0xd5)](_0xca5200(0x150))),this[_0xca5200(0x12a)]({'id':_0xca5200(0xf8),'staticMessage':_0x5b7b06(this[_0xca5200(0xe5)][_0xca5200(0xb8)],_0xca5200(0x113))});}[_0xf4a3bc(0x12a)]({id:_0x5ced0a,staticMessage:_0x335ac0}){const _0x2ad8c4=_0xf4a3bc;this[_0x2ad8c4(0x145)][_0x2ad8c4(0x13c)][_0x2ad8c4(0x100)](_0x2ad8c4(0xd8),{'id':_0x5ced0a,'initialContent':_0x2ad8c4(0x13b)+_0x335ac0+_0x2ad8c4(0x112)});}[_0xf4a3bc(0xfe)](_0x322e8d){const _0x2a2176=_0xf4a3bc,_0x34ffc3=_0x322e8d[_0x2a2176(0x158)]?.[_0x2a2176(0x137)]||_0x322e8d[_0x2a2176(0xc2)];this[_0x2a2176(0x145)][_0x2a2176(0x13c)][_0x2a2176(0x100)](_0x2a2176(0xd4),{'contextItems':Array[_0x2a2176(0xdb)](_0x322e8d[_0x2a2176(0x135)][_0x2a2176(0x140)]()),'initialContent':_0x2a2176(0x13b)+_0x34ffc3+_0x2a2176(0x112),'id':_0x322e8d['id']});}[_0xf4a3bc(0xe7)]({errorMessage:_0x8c5ea7,id:_0x437104}){const _0x2ab66b=_0xf4a3bc;this[_0x2ab66b(0x145)][_0x2ab66b(0x13c)][_0x2ab66b(0x100)](_0x2ab66b(0x11c),{'initialContent':_0x2ab66b(0x13b)+_0x8c5ea7+_0x2ab66b(0x112),'id':_0x437104});}[_0xf4a3bc(0xee)](_0x319b58){const _0x4d7d03=_0xf4a3bc;return this[_0x4d7d03(0xcb)][_0x4d7d03(0xe0)](async()=>{const _0x24f48f=_0x4d7d03;this[_0x24f48f(0x145)][_0x24f48f(0x13c)][_0x24f48f(0x100)](_0x24f48f(0xd8),{'id':_0x319b58[_0x24f48f(0x10e)]+':'+_0x319b58['id']}),this[_0x24f48f(0xc5)](null);});}async[_0xf4a3bc(0x153)](_0x31e052){const _0xebfb0b=_0xf4a3bc,_0x15fcf8=_0x137728(this[_0xebfb0b(0xe5)]);let _0x1007cc=_0x15fcf8[_0xebfb0b(0x142)][_0xebfb0b(0xd5)](_0xebfb0b(0xc3))||[..._0x4af346];if(_0x15fcf8[_0xebfb0b(0x14f)][_0xebfb0b(0xd6)](_0xebfb0b(0x10a))){if(!this[_0xebfb0b(0x124)]){this[_0xebfb0b(0x124)]=!0x0;const _0x33b954=_0x15fcf8[_0xebfb0b(0xd7)][_0xebfb0b(0xd5)](_0xebfb0b(0xb6));this[_0xebfb0b(0x145)][_0xebfb0b(0x13c)][_0xebfb0b(0x114)](_0xebfb0b(0x149))['to'](_0x33b954,_0xebfb0b(0xc1));}}else _0x1007cc=_0x1007cc[_0xebfb0b(0x103)](_0x27e058=>_0xebfb0b(0x123)!=_0x27e058);return this[_0xebfb0b(0xcb)][_0xebfb0b(0xe0)](async()=>{const _0x343055=_0xebfb0b;this[_0x343055(0x145)][_0x343055(0x13c)][_0x343055(0x100)](_0x343055(0xf6),{'id':_0x31e052[_0x343055(0x10e)]+':'+_0x31e052['id'],'areActionsDisabled':_0x31e052[_0x343055(0xfa)],'showDiff':this[_0x343055(0x136)],'availableActions':_0x1007cc}),this[_0x343055(0xc5)](null);});}[_0xf4a3bc(0x108)](_0x2a6a29,_0x28afa8){const _0x3f162b=_0xf4a3bc,_0x17f555=this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x138)][_0x3f162b(0xce)];if(_0x17f555 instanceof _0x1ff243)return this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x138)][_0x3f162b(0xdd)](_0x17f555),void this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x100)](_0x3f162b(0xdc),{'id':_0x2a6a29['id'],'capabilities':{'isWebSearchEnabled':_0x17f555[_0x3f162b(0x121)][_0x3f162b(0x11f)]||_0x28afa8[_0x3f162b(0x11f)],'isReasoningEnabled':_0x17f555[_0x3f162b(0x121)][_0x3f162b(0x157)]||_0x28afa8[_0x3f162b(0x157)]}});this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x100)](_0x3f162b(0xdc),{'id':_0x2a6a29['id'],'capabilities':_0x28afa8});}[_0xf4a3bc(0x139)](_0x4b4228){const _0xc2886f=_0xf4a3bc,_0x5ea9f1=this[_0xc2886f(0x145)][_0xc2886f(0x13c)][_0xc2886f(0x138)][_0xc2886f(0x14c)](_0x3c4ab8=>_0x3c4ab8[_0xc2886f(0x14b)]['id']==_0x4b4228['id']&&_0x3c4ab8 instanceof _0x1ff243);_0x5ea9f1&&_0x5ea9f1[_0xc2886f(0xbc)](_0xc2886f(0xe4),_0x4b4228[_0xc2886f(0xe4)]);}async[_0xf4a3bc(0xc9)](_0x30ef83){const _0x3dcf3a=_0xf4a3bc,_0x4ceea7=_0x30ef83[_0x3dcf3a(0xc0)]||this[_0x3dcf3a(0xbe)];return this[_0x3dcf3a(0xcb)][_0x3dcf3a(0xe0)](async _0x104129=>{const _0x4d245a=_0x3dcf3a;await this[_0x4d245a(0x145)][_0x4d245a(0x13c)][_0x4d245a(0xb3)]({..._0x30ef83,'abortSignal':_0x104129,'renderingStrategy':_0x4ceea7}),_0x30ef83[_0x4d245a(0x10b)]&&this[_0x4d245a(0x128)](_0x30ef83['id']);});}[_0xf4a3bc(0xd1)](_0x27dd29,_0x5b07d7){const _0x40489f=_0xf4a3bc;this[_0x40489f(0x145)][_0x40489f(0x13c)][_0x40489f(0x127)](_0x27dd29,_0x5b07d7);}async[_0xf4a3bc(0x146)](_0x27bbe4){const _0x3d1704=_0xf4a3bc,_0x5855e=_0x27bbe4[_0x3d1704(0xc0)]||this[_0x3d1704(0xbe)];return this[_0x3d1704(0xcb)][_0x3d1704(0xe0)](async _0x24845d=>{const _0x50b104=_0x3d1704;await this[_0x50b104(0x145)][_0x50b104(0x13c)][_0x50b104(0xe2)]({..._0x27bbe4,'abortSignal':_0x24845d,'renderingStrategy':_0x5855e}),_0x27bbe4[_0x50b104(0x10b)]&&this[_0x50b104(0x128)](_0x27bbe4['id']);});}[_0xf4a3bc(0x143)](_0x16b793){const _0x42eddc=_0xf4a3bc;this[_0x42eddc(0x145)][_0x42eddc(0x13c)][_0x42eddc(0xe1)](_0x16b793);}[_0xf4a3bc(0x128)](_0x571cac){const _0x2c4107=_0xf4a3bc;this[_0x2c4107(0x145)][_0x2c4107(0x13c)][_0x2c4107(0xff)](_0x571cac);}[_0xf4a3bc(0xfd)](_0x4c5ea2){const _0x2aaa13=_0xf4a3bc;this[_0x2aaa13(0x145)][_0x2aaa13(0x13c)][_0x2aaa13(0xfc)]()[_0x2aaa13(0x103)](_0x1533d7=>_0x1533d7[_0x2aaa13(0x13e)](_0x4c5ea2))[_0x2aaa13(0xeb)](_0x6bf40=>this[_0x2aaa13(0x145)][_0x2aaa13(0x13c)][_0x2aaa13(0xc4)](_0x6bf40));}[_0xf4a3bc(0xf5)](){const _0x2e61a9=_0xf4a3bc;this[_0x2e61a9(0xc5)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x2e61a9(0x145)][_0x2e61a9(0xd9)][_0x2e61a9(0x132)](!this[_0x2e61a9(0xe5)][_0x2e61a9(0x142)][_0x2e61a9(0xd5)](_0x2e61a9(0x150))),this[_0x2e61a9(0x10f)]=!0x0,this[_0x2e61a9(0x145)][_0x2e61a9(0x13c)][_0x2e61a9(0x134)]();}[_0xf4a3bc(0xb4)](_0x30b9c0){const _0x442b61=_0xf4a3bc;this[_0x442b61(0xcb)][_0x442b61(0x12e)](),this[_0x442b61(0x145)][_0x442b61(0x13c)][_0x442b61(0xfc)]()[_0x442b61(0x103)](_0x3da9d5=>_0x3da9d5[_0x442b61(0x13e)](_0x30b9c0['id']))[_0x442b61(0xeb)](_0x1a483d=>this[_0x442b61(0x128)](_0x1a483d)),this[_0x442b61(0x10f)]=!0x1,this[_0x442b61(0x145)][_0x442b61(0x13c)][_0x442b61(0x125)]();}async[_0xf4a3bc(0xed)](){const _0x2366a1=_0xf4a3bc;return this[_0x2366a1(0xcb)][_0x2366a1(0xfb)][_0x2366a1(0x126)](()=>{const _0x4e6826=_0x2366a1;this[_0x4e6826(0x10f)]=!0x1,this[_0x4e6826(0x145)][_0x4e6826(0x13c)][_0x4e6826(0x125)]();});}[_0xf4a3bc(0x147)](_0x47c75b,_0x1a9767){const _0x4ad6f7=_0xf4a3bc;this[_0x4ad6f7(0x145)][_0x4ad6f7(0xd9)][_0x4ad6f7(0x147)](_0x47c75b,_0x1a9767);}[_0xf4a3bc(0xbd)](_0x261142){const _0x7b5eed=_0xf4a3bc;this[_0x7b5eed(0x145)][_0x7b5eed(0xd9)][_0x7b5eed(0xbd)](_0x261142);}[_0xf4a3bc(0x13d)](_0xb8c28f,_0x207660){const _0x336830=_0xf4a3bc;this[_0x336830(0x145)][_0x336830(0xd9)][_0x336830(0x13d)](_0xb8c28f,_0x207660);}[_0xf4a3bc(0x129)](_0xef312d){const _0x20385c=_0xf4a3bc;this[_0x20385c(0x145)][_0x20385c(0xd9)][_0x20385c(0x129)](_0xef312d);}[_0xf4a3bc(0x10c)](_0x307e97){const _0x15938d=_0xf4a3bc;this[_0x15938d(0x145)][_0x15938d(0xd9)][_0x15938d(0x10c)](_0x307e97);}[_0xf4a3bc(0xb7)](){const _0x192a36=_0xf4a3bc;this[_0x192a36(0x145)][_0x192a36(0xd9)][_0x192a36(0xb7)]();}[_0xf4a3bc(0xbf)](){const _0x1a6fbf=_0xf4a3bc;this[_0x1a6fbf(0x145)][_0x1a6fbf(0xd9)][_0x1a6fbf(0xbf)]();}[_0xf4a3bc(0xf1)](_0xe4968a,_0x536bdb,_0x4d62f6){const _0x4a5b06=_0xf4a3bc;this[_0x4a5b06(0x145)][_0x4a5b06(0xd9)][_0x4a5b06(0xf1)](_0xe4968a,_0x536bdb,_0x4d62f6);}[_0xf4a3bc(0xcf)](){const _0x48b6a3=_0xf4a3bc;this[_0x48b6a3(0x145)][_0x48b6a3(0xd9)][_0x48b6a3(0xcf)](),this[_0x48b6a3(0x145)][_0x48b6a3(0xd9)][_0x48b6a3(0x12b)](this[_0x48b6a3(0x152)]());}[_0xf4a3bc(0xe9)](_0x1d3c84){const _0x29d78e=_0xf4a3bc;this[_0x29d78e(0x145)][_0x29d78e(0xd9)][_0x29d78e(0xe9)](_0x1d3c84);}[_0xf4a3bc(0xba)](_0x5558e0){const _0x3bd25f=_0xf4a3bc;this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x133)](_0x5558e0[_0x3bd25f(0x11f)]),this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x156)](_0x5558e0[_0x3bd25f(0x157)]),this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x12b)](this[_0x3bd25f(0x152)](_0x5558e0));}[_0xf4a3bc(0xf9)](_0x9d9e3,_0x3623cc){const _0x2bf962=_0xf4a3bc;this[_0x2bf962(0x145)][_0x2bf962(0xd9)][_0x2bf962(0xf2)](_0x9d9e3),_0x3623cc&&this[_0x2bf962(0x145)][_0x2bf962(0xd9)][_0x2bf962(0x132)](!0x1);}[_0xf4a3bc(0x11a)](_0x4dc040){const _0x1510b7=_0xf4a3bc;this[_0x1510b7(0xbe)]=_0x4dc040;}[_0xf4a3bc(0xe3)](_0x5201a7){const _0x1ef34c=_0xf4a3bc;this[_0x1ef34c(0x145)][_0x1ef34c(0x13c)][_0x1ef34c(0xe3)](_0x5201a7);}[_0xf4a3bc(0xd2)](){const _0xc6947c=_0xf4a3bc;this[_0xc6947c(0x111)](_0x5b7b06(this[_0xc6947c(0xe5)][_0xc6947c(0xb8)],_0xc6947c(0x116)));}[_0xf4a3bc(0x111)](_0x49b85b,_0x175783=!0x1){const _0xe02b0a=_0xf4a3bc;if(_0x175783&&!_0x115c84()&&_0x49b85b[_0xe02b0a(0x101)])return this[_0xe02b0a(0x145)][_0xe02b0a(0x118)][_0xe02b0a(0xb5)]='',void this[_0xe02b0a(0x110)](_0x49b85b);this[_0xe02b0a(0x145)][_0xe02b0a(0x118)][_0xe02b0a(0xb5)]=_0x49b85b;}[_0xf4a3bc(0xc5)](_0x481684){const _0x5b6747=_0xf4a3bc,_0x20423b=this[_0x5b6747(0x130)](_0x481684);this[_0x5b6747(0x145)][_0x5b6747(0x13c)][_0x5b6747(0xc5)](_0x20423b);}[_0xf4a3bc(0x110)](_0x4f03cc){const _0x47d8bc=_0xf4a3bc;let _0x8f2b30=0x0;clearInterval(this[_0x47d8bc(0x120)]),this[_0x47d8bc(0x120)]=setInterval(()=>{const _0x478fe3=_0x47d8bc;this[_0x478fe3(0x145)][_0x478fe3(0x118)][_0x478fe3(0xb5)]=this[_0x478fe3(0x145)][_0x478fe3(0x118)][_0x478fe3(0xb5)]+_0x4f03cc[_0x8f2b30],_0x8f2b30++,_0x8f2b30===_0x4f03cc[_0x478fe3(0x101)]&&clearInterval(this[_0x478fe3(0x120)]);},0x1e);}[_0xf4a3bc(0x154)](_0x2bc3f6){const _0x35fac7=_0xf4a3bc;this[_0x35fac7(0x145)][_0x35fac7(0x118)][_0x35fac7(0xb9)]=_0x2bc3f6;}[_0xf4a3bc(0x130)](_0x2cd3b4){const _0x1cd785=_0xf4a3bc;return _0x2cd3b4?_0x2cd3b4[_0x1cd785(0x11f)]&&_0x2cd3b4[_0x1cd785(0x157)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0x11d)):_0x2cd3b4[_0x1cd785(0x11f)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0xca)):_0x2cd3b4[_0x1cd785(0x157)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0x148)):_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0xc7)):'';}[_0xf4a3bc(0x152)](_0x5d14f5){const _0x294014=_0xf4a3bc;return _0x5d14f5?_0x5d14f5[_0x294014(0x11f)]&&_0x5d14f5[_0x294014(0x157)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xf4)):_0x5d14f5[_0x294014(0x11f)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xda)):_0x5d14f5[_0x294014(0x157)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0x155)):_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xcc)):_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xcc));}[_0xf4a3bc(0x11b)](_0x37cef9,_0x44a3ef,_0x5b6be2,_0x4c52ad){const _0xc14b2e=_0xf4a3bc;this[_0xc14b2e(0x145)][_0xc14b2e(0x11b)](_0x37cef9,_0x44a3ef,_0x5b6be2,_0x4c52ad);}[_0xf4a3bc(0xf3)](_0x68973e){const _0x592373=_0xf4a3bc;this[_0x592373(0x145)][_0x592373(0xf3)](_0x68973e);}[_0xf4a3bc(0xc6)](){const _0x21bbbb=_0xf4a3bc;this[_0x21bbbb(0x145)][_0x21bbbb(0xd9)][_0x21bbbb(0xc6)]();}[_0xf4a3bc(0x12d)](_0x32b8d5,_0x252652){const _0x2ea90a=_0xf4a3bc;this[_0x2ea90a(0x145)][_0x2ea90a(0x13c)][_0x2ea90a(0xea)](_0x32b8d5,_0x252652);}[_0xf4a3bc(0x134)](){const _0x2a1d60=_0xf4a3bc;this[_0x2a1d60(0x145)][_0x2a1d60(0x13c)][_0x2a1d60(0x134)]();}[_0xf4a3bc(0x105)](){const _0x12f7d6=_0xf4a3bc;this[_0x12f7d6(0x145)][_0x12f7d6(0xd9)][_0x12f7d6(0x13f)]=!0x0;}[_0xf4a3bc(0xe8)](){const _0x2b25dd=_0xf4a3bc;this[_0x2b25dd(0x145)][_0x2b25dd(0xd9)][_0x2b25dd(0x13f)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x52d18f=_0x3f67;(function(_0x5b0ce9,_0x1c8ab1){const _0x89daf8=_0x3f67,_0x1b01c9=_0x5b0ce9();while(!![]){try{const _0x238e9d=-parseInt(_0x89daf8(0x21a))/0x1+-parseInt(_0x89daf8(0x22b))/0x2*(parseInt(_0x89daf8(0x1f2))/0x3)+-parseInt(_0x89daf8(0x242))/0x4*(-parseInt(_0x89daf8(0x1f7))/0x5)+parseInt(_0x89daf8(0x1fb))/0x6+-parseInt(_0x89daf8(0x24c))/0x7+parseInt(_0x89daf8(0x265))/0x8+parseInt(_0x89daf8(0x23e))/0x9;if(_0x238e9d===_0x1c8ab1)break;else _0x1b01c9['push'](_0x1b01c9['shift']());}catch(_0x2b100d){_0x1b01c9['push'](_0x1b01c9['shift']());}}}(_0x565e,0x7bcf8));import{CKEditorError as _0x3dbe0e,ObservableMixin as _0x991414,uid as _0x29edad}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x24af84,AIContextTextResourceType as _0x470c61}from'../../aicore/model/aicontext.js';import{escape as _0x51f37a}from'es-toolkit/compat';import{errorsMap as _0x4a8de0}from'../../errorsmap.js';function _0x3f67(_0x53e296,_0x235847){const _0x565e76=_0x565e();return _0x3f67=function(_0x3f67bd,_0x416d80){_0x3f67bd=_0x3f67bd-0x1db;let _0x884b3d=_0x565e76[_0x3f67bd];return _0x884b3d;},_0x3f67(_0x53e296,_0x235847);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x52d18f(0x1e5),_0x52d18f(0x1f0),_0x52d18f(0x213),_0x52d18f(0x1fe),_0x52d18f(0x20d),_0x52d18f(0x1ee),_0x52d18f(0x24d),_0x52d18f(0x259),_0x52d18f(0x1e1)];function _0x565e(){const _0x29b085=['isHidden','abort','startsWith','_getCustomSourcesInitialState','5497030GAcBKw','sourceResourcesLoaded','getSentContextItems','getId','MARKDOWN','attributes','removeFromContext','Current\x20document','populateFromMessage','getData','object\x20with\x20content\x20and\x20type\x20properties','_startUploadOperation','getDocument','resourceStateChanged','filter','all','has','map','addResourceToContext','addCurrentDocumentToContext','_pendingContextItems','uploadDocument','_mapContextItemToRequestData','version','sources','3973912hKlJDr','start','_finishContextItemLoading','HTML','name','ai-chat-document-upload-failed','urls','uiId','_ownerId','text/html','uploadProgressChanged','push','addFilesToContext','ai-chat-context-invalid-data','contextItemAdded','_addContextOptionsState','FILE','ai-chat-context-unsupported-type','from','code','_removeContextItem','find','mapContextItemsToRequestData','addContextOptionsChanged','selection','contextItemRemoved','clearPendingContextItems','7626UdlXUH','init','url','TEXT','addToConversationContext','1316835EdTuQF','addSelectionToContext','file-','files','1532712KzENIt','end','_toggleAddCurrentDocumentOptionVisibility','contextSent','enabled','forEach','_addToConversationContextItem','ai-chat-source-not-found','_connector','_addContextItem','uploadUrl','uploadFile','abortController','_convertTextResourceToFile','resources','content','length','ai-chat-url-upload-failed','error','resourceId','removeSelectionFromContext','set','isSelectionInContext','values','contextItemLoadingEnded','ai-chat-resource-no-data','message','hidden','size','document','object','275597zHhHYe','isCurrentDocumentInContext','text/markdown','_ongoingUploads','File','_isResourceInContext','ai-chat-file-upload-failed','isReadOnly','fetchDocument','sessionId','files-','label','ai-request-aborted','_ongoingUploadOperations','_config','type','text/plain','530CysiPn','url-','_findSourceIdsByResourceId','_setAddContextOptionsDefaultState','get','_updateResourceInContextState','DOCUMENT','isCurrentDocumentInConversation','fire','current-document','string','_createContextItemFromContent','updateCurrentDocument','_finishUploadOperation','addUrlToContext','delete','getPendingContextItems','ai-chat-source-resources-load-failed','URL','8664480pucSON','data','stack','isInContext','8ELuWmX','SELECTION','loadSourceResources','_conversationContextItems','ai-chat-resource-load-failed','getResources'];_0x565e=function(){return _0x29b085;};return _0x565e();}export class AIChatContext extends _0x991414(){[_0x52d18f(0x203)];[_0x52d18f(0x228)];[_0x52d18f(0x1df)];constructor({connector:_0x3a7f42,config:_0x2d2a37,ownerId:_0xfa571a}){const _0x2b0796=_0x52d18f;super(),this[_0x2b0796(0x203)]=_0x3a7f42,this[_0x2b0796(0x228)]=_0x2d2a37,this[_0x2b0796(0x1df)]=_0xfa571a;}[_0x52d18f(0x1f3)](){const _0x52e019=_0x52d18f;this[_0x52e019(0x260)]=new Map(),this[_0x52e019(0x245)]=new Map(),this[_0x52e019(0x21d)]=new Map(),this[_0x52e019(0x227)]=new Map(),this[_0x52e019(0x22e)]();}[_0x52d18f(0x23b)](){const _0x6f3671=_0x52d18f;return this[_0x6f3671(0x260)];}async[_0x52d18f(0x254)](_0x394817){const _0x13aad7=_0x52d18f,_0x2f4148=await this[_0x13aad7(0x236)](_0x394817);return this[_0x13aad7(0x201)](_0x2f4148),_0x13aad7(0x234)===_0x2f4148[_0x13aad7(0x1de)]&&this[_0x13aad7(0x1fd)](),_0x2f4148;}async[_0x52d18f(0x236)](_0x8ef278){const _0xddd98d=_0x52d18f;if(_0x8ef278[_0xddd98d(0x229)]===_0x24af84[_0xddd98d(0x231)]){const _0x47a949=await this[_0xddd98d(0x203)][_0xddd98d(0x222)](this[_0xddd98d(0x1df)],_0x8ef278['id'])[_0xddd98d(0x258)]();return{'id':_0xddd98d(0x234),'uiId':_0xddd98d(0x234),'label':_0xddd98d(0x253),'type':_0x8ef278[_0xddd98d(0x229)],'content':_0x47a949[_0xddd98d(0x20a)],'hidden':this[_0xddd98d(0x245)][_0xddd98d(0x25c)](_0xddd98d(0x234)),'version':_0x47a949[_0xddd98d(0x251)]?.[_0xddd98d(0x263)],'sessionId':_0x47a949[_0xddd98d(0x251)]?.[_0xddd98d(0x223)]};}return{'id':_0x8ef278['id'],'uiId':_0x8ef278['id'],'label':_0x8ef278[_0xddd98d(0x251)]?.[_0xddd98d(0x225)]||_0x8ef278[_0xddd98d(0x1db)]||_0x8ef278[_0xddd98d(0x1f4)]||_0x8ef278['id'],'type':_0x8ef278[_0xddd98d(0x229)],..._0x8ef278?.[_0xddd98d(0x251)]?.[_0xddd98d(0x20e)]?{'resourceId':_0x8ef278[_0xddd98d(0x251)]?.[_0xddd98d(0x20e)]}:{}};}[_0x52d18f(0x24e)](){const _0x3e8ba3=_0x52d18f;return new Map(this[_0x3e8ba3(0x245)]);}[_0x52d18f(0x252)](_0x7dd20a){const _0xfff085=_0x52d18f,_0x3641fc=this[_0xfff085(0x260)][_0xfff085(0x22f)](_0x7dd20a);_0x3641fc?.[_0xfff085(0x221)]||this[_0xfff085(0x1eb)](_0x7dd20a);}[_0x52d18f(0x1f1)](){const _0x55b2c4=_0x52d18f;if(0x0===this[_0x55b2c4(0x260)][_0x55b2c4(0x217)])return;for(const _0x12b789 of this[_0x55b2c4(0x260)][_0x55b2c4(0x212)]())this[_0x55b2c4(0x1eb)](_0x12b789[_0x55b2c4(0x1de)]);const _0x1f572e=this[_0x55b2c4(0x245)][_0x55b2c4(0x22f)](_0x55b2c4(0x234))||this[_0x55b2c4(0x260)][_0x55b2c4(0x22f)](_0x55b2c4(0x234));_0x1f572e&&this[_0x55b2c4(0x204)]({..._0x1f572e,'isReadOnly':!0x0,'hidden':!0x0});}[_0x52d18f(0x1f6)](_0x53133b){const _0x458135=_0x52d18f;for(const _0x34667f of _0x53133b[_0x458135(0x212)]())this[_0x458135(0x201)](_0x34667f);this[_0x458135(0x1f1)](),this[_0x458135(0x233)](_0x458135(0x1fe),{'contextItems':Array[_0x458135(0x1e9)](this[_0x458135(0x24e)]()[_0x458135(0x212)]())});}[_0x52d18f(0x21b)](){const _0x1c6bf9=_0x52d18f;return this[_0x1c6bf9(0x260)][_0x1c6bf9(0x25c)](_0x1c6bf9(0x234));}[_0x52d18f(0x211)](){const _0x538715=_0x52d18f;return this[_0x538715(0x260)][_0x538715(0x25c)](_0x538715(0x1ef));}[_0x52d18f(0x232)](){const _0x264bb9=_0x52d18f;return this[_0x264bb9(0x245)][_0x264bb9(0x25c)](_0x264bb9(0x234));}static[_0x52d18f(0x1ed)](_0x3cdb5e){const _0x209c05=_0x52d18f;return Array[_0x209c05(0x1e9)](_0x3cdb5e[_0x209c05(0x212)]())[_0x209c05(0x25d)](_0x406658=>this[_0x209c05(0x262)](_0x406658))[_0x209c05(0x25a)](_0x3eb2b1=>null!==_0x3eb2b1);}async[_0x52d18f(0x1e3)](_0x119234,_0x28fef5,_0x3a785e=_0x24af84[_0x52d18f(0x1e7)]){const _0x44e356=_0x52d18f,_0xb6ebad=_0x44e356(0x224)+_0x29edad();this[_0x44e356(0x257)](_0xb6ebad);try{await Promise[_0x44e356(0x25b)](_0x119234[_0x44e356(0x25d)](async _0x30a02a=>{const _0x35f772=_0x44e356,_0x2176ed=_0x35f772(0x1f9)+_0x29edad(),_0x2f9b63=_0x51f37a(_0x30a02a[_0x35f772(0x1db)]);try{this[_0x35f772(0x204)]({'type':_0x3a785e,'label':_0x28fef5?.[_0x35f772(0x225)]||_0x2f9b63,'uiId':_0x2176ed,'resourceId':_0x28fef5?.[_0x35f772(0x20e)]},!0x0);const _0x124d42=this[_0x35f772(0x203)][_0x35f772(0x206)](this[_0x35f772(0x1df)],_0x30a02a,_0x28fef5);this[_0x35f772(0x21d)][_0x35f772(0x210)](_0x2176ed,_0x124d42[_0x35f772(0x207)]);const {id:_0xe18858}=await _0x124d42[_0x35f772(0x24f)]();this[_0x35f772(0x21d)][_0x35f772(0x23a)](_0x2176ed),this[_0x35f772(0x267)]({'type':_0x3a785e,'id':_0xe18858,'label':_0x28fef5?.[_0x35f772(0x225)]||_0x2f9b63,'uiId':_0x2176ed,'resourceId':_0x28fef5?.[_0x35f772(0x20e)]},!0x1);}catch(_0x352373){this[_0x35f772(0x21d)][_0x35f772(0x23a)](_0x2176ed);if(!(_0x352373 instanceof _0x3dbe0e&&_0x352373[_0x35f772(0x215)][_0x35f772(0x24a)](_0x35f772(0x226)))){const _0x5f489d=_0x4a8de0[_0x35f772(0x22f)](_0x352373[_0x35f772(0x1ea)])||_0x35f772(0x220),_0x58d453=new _0x3dbe0e(_0x5f489d,null,{'fileName':_0x2f9b63,..._0x352373});_0x58d453[_0x35f772(0x240)]=_0x352373[_0x35f772(0x240)],this[_0x35f772(0x233)](_0x35f772(0x20d),{'error':_0x58d453});}this[_0x35f772(0x1eb)](_0x2176ed);}}));}finally{this[_0x44e356(0x238)](_0xb6ebad);}}[_0x52d18f(0x25f)](_0x5563f8){const _0x55c168=_0x52d18f;if(this[_0x55c168(0x21b)]())return;const _0x15016c={'type':_0x24af84[_0x55c168(0x231)],'uiId':_0x55c168(0x234),'label':_0x5563f8,'isReadOnly':this[_0x55c168(0x245)][_0x55c168(0x25c)](_0x55c168(0x234)),'hidden':this[_0x55c168(0x245)][_0x55c168(0x25c)](_0x55c168(0x234))};this[_0x55c168(0x204)](_0x15016c);}async[_0x52d18f(0x237)](_0x2240eb,_0x2460f0,_0x39d8e1,_0x254997){const _0x4e3796=_0x52d18f,_0x547e85=this[_0x4e3796(0x260)][_0x4e3796(0x22f)](_0x4e3796(0x234));if(_0x547e85&&_0x2240eb){_0x547e85[_0x4e3796(0x1ef)]=_0x254997?_0x254997[_0x4e3796(0x25d)](_0x556a24=>({'start':_0x556a24[_0x4e3796(0x266)],'end':_0x556a24[_0x4e3796(0x1fc)]})):[];try{if(_0x547e85[_0x4e3796(0x263)]===_0x2460f0)return;const {id:_0xd4ef93}=await this[_0x4e3796(0x203)][_0x4e3796(0x261)](this[_0x4e3796(0x1df)],_0x2240eb,{'version':_0x2460f0,'sessionId':_0x39d8e1})[_0x4e3796(0x24f)]();_0x547e85['id']=_0xd4ef93,_0x547e85[_0x4e3796(0x20a)]=_0x2240eb,_0x547e85[_0x4e3796(0x263)]=_0x2460f0,_0x547e85[_0x4e3796(0x223)]=_0x39d8e1;}catch(_0x1a2a6f){const _0x103e86=new _0x3dbe0e(_0x4e3796(0x1dc),null);_0x103e86[_0x4e3796(0x240)]=_0x1a2a6f[_0x4e3796(0x240)],this[_0x4e3796(0x233)](_0x4e3796(0x20d),{'error':_0x103e86});}}}[_0x52d18f(0x1f8)](_0x3eb614){const _0xd520a1=_0x52d18f;this[_0xd520a1(0x204)]({'type':_0x24af84[_0xd520a1(0x243)],'label':_0x3eb614,'uiId':_0xd520a1(0x1ef),'content':_0x3eb614});}[_0x52d18f(0x20f)](){const _0x545cd3=_0x52d18f;this[_0x545cd3(0x1eb)](_0x545cd3(0x1ef));}async[_0x52d18f(0x239)](_0x1e549f,_0x51b452){const _0x5bb1ba=_0x52d18f,_0x5bceef=_0x5bb1ba(0x22c)+_0x29edad();this[_0x5bb1ba(0x257)](_0x5bceef);const _0x58ce9a=_0x5bb1ba(0x22c)+_0x29edad();try{this[_0x5bb1ba(0x204)]({'type':_0x24af84[_0x5bb1ba(0x23d)],'label':_0x51b452?.[_0x5bb1ba(0x225)]||_0x1e549f,'uiId':_0x58ce9a,'resourceId':_0x51b452?.[_0x5bb1ba(0x20e)]},!0x0);const _0x560504=this[_0x5bb1ba(0x203)][_0x5bb1ba(0x205)](this[_0x5bb1ba(0x1df)],_0x1e549f,_0x51b452);this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x210)](_0x58ce9a,_0x560504[_0x5bb1ba(0x207)]);const {id:_0x246249}=await _0x560504[_0x5bb1ba(0x24f)]();this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x23a)](_0x58ce9a),this[_0x5bb1ba(0x267)]({'type':_0x24af84[_0x5bb1ba(0x23d)],'id':_0x246249,'label':_0x51b452?.[_0x5bb1ba(0x225)]||_0x1e549f,'uiId':_0x58ce9a,'resourceId':_0x51b452?.[_0x5bb1ba(0x20e)]},!0x1);}catch(_0x5c24c3){this[_0x5bb1ba(0x21d)][_0x5bb1ba(0x23a)](_0x58ce9a),(_0x5c24c3[_0x5bb1ba(0x215)][_0x5bb1ba(0x24a)](_0x5bb1ba(0x226))||this[_0x5bb1ba(0x233)](_0x5bb1ba(0x20d),{'error':new _0x3dbe0e(_0x5bb1ba(0x20c),this,{'url':_0x1e549f,'originalError':_0x5c24c3}),'url':_0x1e549f}),this[_0x5bb1ba(0x1eb)](_0x58ce9a));}finally{this[_0x5bb1ba(0x238)](_0x5bceef);}}async[_0x52d18f(0x244)](_0x4ac5cb,_0x149813,_0x3358a4){const _0x71a3d9=_0x52d18f,_0x233168=this[_0x71a3d9(0x1e6)][_0x71a3d9(0x264)][_0x71a3d9(0x1ec)](_0x476f6d=>_0x476f6d['id']===_0x4ac5cb);if(!_0x233168)return this[_0x71a3d9(0x233)](_0x71a3d9(0x20d),{'error':new _0x3dbe0e(_0x71a3d9(0x202),this,{'sourceId':_0x4ac5cb}),'sourceId':_0x4ac5cb}),[];try{const _0x34bedb=(await _0x233168[_0x71a3d9(0x247)](_0x149813))[_0x71a3d9(0x25d)](_0x300453=>{const _0x1a5f0b=_0x71a3d9,_0x407103=this[_0x1a5f0b(0x21f)](_0x300453['id']);return{..._0x300453,'isInContext':_0x407103};});return _0x233168[_0x71a3d9(0x209)]=_0x34bedb,this[_0x71a3d9(0x233)](_0x71a3d9(0x24d),{'sourceId':_0x4ac5cb,'source':_0x233168,'resources':_0x34bedb,'uid':_0x3358a4}),_0x34bedb;}catch(_0x7eabe5){return this[_0x71a3d9(0x233)](_0x71a3d9(0x20d),{'error':new _0x3dbe0e(_0x71a3d9(0x23c),this,{'sourceId':_0x4ac5cb,'originalError':_0x7eabe5}),'sourceId':_0x4ac5cb,'sourceLabel':_0x233168[_0x71a3d9(0x225)]}),[];}}async[_0x52d18f(0x25e)](_0x5a3c54,_0x11d782){const _0x2cf41c=_0x52d18f;if(this[_0x2cf41c(0x21f)](_0x11d782['id']))return;let _0x659bd=_0x11d782[_0x2cf41c(0x23f)];if(!_0x659bd&&_0x5a3c54[_0x2cf41c(0x255)])try{_0x659bd=await _0x5a3c54[_0x2cf41c(0x255)](_0x11d782['id']);}catch(_0x4a0138){return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x246),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'originalError':_0x4a0138}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}if(_0x659bd)switch(_0x11d782[_0x2cf41c(0x229)]){case _0x24af84[_0x2cf41c(0x23d)]:if(_0x2cf41c(0x235)!=typeof _0x659bd)return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x235),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});await this[_0x2cf41c(0x239)](_0x659bd,{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']});break;case _0x24af84[_0x2cf41c(0x1e7)]:if(!(_0x659bd instanceof File))return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x21e),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});await this[_0x2cf41c(0x1e3)]([_0x659bd],{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']});break;case _0x24af84[_0x2cf41c(0x1f5)]:if(_0x2cf41c(0x219)!=typeof _0x659bd||!(_0x2cf41c(0x20a)in _0x659bd)||!(_0x2cf41c(0x229)in _0x659bd))return void this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e4),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'expectedType':_0x2cf41c(0x256),'actualType':typeof _0x659bd}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});_0x659bd=AIChatContext[_0x2cf41c(0x208)](_0x659bd,_0x11d782[_0x2cf41c(0x225)]),await this[_0x2cf41c(0x1e3)]([_0x659bd],{'label':_0x11d782[_0x2cf41c(0x225)],'resourceId':_0x11d782['id']},_0x24af84[_0x2cf41c(0x1f5)]);break;default:this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x1e8),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id'],'resourceType':_0x11d782[_0x2cf41c(0x229)]}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}else this[_0x2cf41c(0x233)](_0x2cf41c(0x20d),{'error':new _0x3dbe0e(_0x2cf41c(0x214),this,{'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']}),'resourceId':_0x11d782['id'],'sourceId':_0x5a3c54['id']});}static[_0x52d18f(0x208)](_0x4c383c,_0x5833ac){const _0x3aba1f=_0x52d18f;switch(_0x4c383c[_0x3aba1f(0x229)]){case _0x470c61[_0x3aba1f(0x250)]:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x21c)});case _0x470c61[_0x3aba1f(0x268)]:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x1e0)});default:return new File([_0x4c383c[_0x3aba1f(0x20a)]],_0x5833ac,{'type':_0x3aba1f(0x22a)});}}static[_0x52d18f(0x262)](_0x208708){const _0x1923d6=_0x52d18f;switch(_0x208708[_0x1923d6(0x229)]){case _0x24af84[_0x1923d6(0x1e7)]:return{'type':_0x24af84[_0x1923d6(0x1e7)],'id':_0x208708['id']};case _0x24af84[_0x1923d6(0x23d)]:return{'type':_0x24af84[_0x1923d6(0x23d)],'id':_0x208708['id']};case _0x24af84[_0x1923d6(0x231)]:return{'type':_0x24af84[_0x1923d6(0x231)],'id':_0x208708['id'],..._0x208708[_0x1923d6(0x1ef)]?.[_0x1923d6(0x20b)]&&{'selection':_0x208708[_0x1923d6(0x1ef)]}};case _0x24af84[_0x1923d6(0x1f5)]:return{'type':_0x24af84[_0x1923d6(0x1e7)],'id':_0x208708['id']};default:return null;}}[_0x52d18f(0x204)](_0xbd68aa,_0x2d0bfc=!0x1){const _0x268685=_0x52d18f;if(this[_0x268685(0x260)][_0x268685(0x210)](_0xbd68aa[_0x268685(0x1de)],_0xbd68aa),_0xbd68aa[_0x268685(0x216)]||this[_0x268685(0x233)](_0x268685(0x1e5),{'contextItem':_0xbd68aa,'isLoading':_0x2d0bfc}),_0x268685(0x234)===_0xbd68aa[_0x268685(0x1de)]&&this[_0x268685(0x1fd)](),_0xbd68aa[_0x268685(0x20e)]){const _0xd8e32d=this[_0x268685(0x22d)](_0xbd68aa[_0x268685(0x20e)]);_0xd8e32d&&_0xd8e32d[_0x268685(0x200)](_0xd6850=>{const _0x480cc6=_0x268685;this[_0x480cc6(0x230)](_0xd6850,_0xbd68aa[_0x480cc6(0x20e)],!0x0);});}}[_0x52d18f(0x1eb)](_0x5877c0){const _0x34f397=_0x52d18f,_0x1db11b=this[_0x34f397(0x260)][_0x34f397(0x22f)](_0x5877c0),_0x3b8430=this[_0x34f397(0x21d)][_0x34f397(0x22f)](_0x5877c0);if(_0x3b8430&&(_0x3b8430[_0x34f397(0x249)](),this[_0x34f397(0x21d)][_0x34f397(0x23a)](_0x5877c0)),_0x1db11b?.[_0x34f397(0x20e)]){const _0x168608=this[_0x34f397(0x22d)](_0x1db11b[_0x34f397(0x20e)]);_0x168608&&_0x168608[_0x34f397(0x200)](_0x4e8b6b=>{const _0x365771=_0x34f397;this[_0x365771(0x230)](_0x4e8b6b,_0x1db11b[_0x365771(0x20e)],!0x1);});}this[_0x34f397(0x260)][_0x34f397(0x23a)](_0x5877c0),this[_0x34f397(0x233)](_0x34f397(0x1f0),{'uiId':_0x5877c0,'type':_0x1db11b?.[_0x34f397(0x229)]}),_0x34f397(0x234)===_0x5877c0&&this[_0x34f397(0x1fd)]();}[_0x52d18f(0x267)](_0x4931e6,_0x19309d){const _0x37e78b=_0x52d18f;if(this[_0x37e78b(0x260)][_0x37e78b(0x25c)](_0x4931e6[_0x37e78b(0x1de)])&&(this[_0x37e78b(0x260)][_0x37e78b(0x210)](_0x4931e6[_0x37e78b(0x1de)],_0x4931e6),this[_0x37e78b(0x233)](_0x37e78b(0x213),{'contextItem':_0x4931e6,'isLoading':_0x19309d}),_0x4931e6[_0x37e78b(0x20e)])){const _0x4f6be5=this[_0x37e78b(0x22d)](_0x4931e6[_0x37e78b(0x20e)]);_0x4f6be5&&_0x4f6be5[_0x37e78b(0x200)](_0x529105=>{const _0x3c6c28=_0x37e78b;this[_0x3c6c28(0x230)](_0x529105,_0x4931e6[_0x3c6c28(0x20e)],!0x0);});}}[_0x52d18f(0x201)](_0x447224){const _0x22847a=_0x52d18f;this[_0x22847a(0x245)][_0x22847a(0x210)](_0x447224[_0x22847a(0x1de)],_0x447224);}[_0x52d18f(0x22e)](){const _0x492959=_0x52d18f;this[_0x492959(0x1e6)]={'document':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x218)]?.[_0x492959(0x1ff)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x1dd)]?.[_0x492959(0x1ff)]},'files':{'enabled':!0x1!==this[_0x492959(0x228)]?.[_0x492959(0x1fa)]?.[_0x492959(0x1ff)]},'sources':this[_0x492959(0x24b)]()},this[_0x492959(0x233)](_0x492959(0x1ee),{'options':this[_0x492959(0x1e6)]});}[_0x52d18f(0x24b)](){const _0x4fbf5a=_0x52d18f;return this[_0x4fbf5a(0x228)]?.[_0x4fbf5a(0x264)]?.[_0x4fbf5a(0x25d)](_0x409d03=>({..._0x409d03,'resources':[]}))??[];}[_0x52d18f(0x1fd)](){const _0x130fb9=_0x52d18f,_0xe2456d=this[_0x130fb9(0x21b)]()||this[_0x130fb9(0x232)]();this[_0x130fb9(0x1e6)][_0x130fb9(0x218)][_0x130fb9(0x248)]=_0xe2456d,this[_0x130fb9(0x233)](_0x130fb9(0x1ee),{'options':this[_0x130fb9(0x1e6)]});}[_0x52d18f(0x21f)](_0x4b338c){const _0x3f256b=_0x52d18f;for(const _0x3cbc8b of this[_0x3f256b(0x260)][_0x3f256b(0x212)]())if(_0x3cbc8b[_0x3f256b(0x20e)]===_0x4b338c)return!0x0;for(const _0x211597 of this[_0x3f256b(0x245)][_0x3f256b(0x212)]())if(_0x211597[_0x3f256b(0x20e)]===_0x4b338c)return!0x0;return!0x1;}[_0x52d18f(0x22d)](_0x13684c){const _0xd6dd76=_0x52d18f,_0x2f48d9=[];for(const _0x25f421 of this[_0xd6dd76(0x1e6)][_0xd6dd76(0x264)]){_0x25f421[_0xd6dd76(0x209)][_0xd6dd76(0x1ec)](_0x3db8bf=>_0x3db8bf['id']===_0x13684c)&&_0x2f48d9[_0xd6dd76(0x1e2)](_0x25f421['id']);}return 0x0===_0x2f48d9[_0xd6dd76(0x20b)]?null:_0x2f48d9;}[_0x52d18f(0x230)](_0x4c1679,_0x4e2a0a,_0x3d2bc9){const _0x2f6a3f=_0x52d18f,_0x1533a4=this[_0x2f6a3f(0x1e6)][_0x2f6a3f(0x264)][_0x2f6a3f(0x1ec)](_0x147ed3=>_0x147ed3['id']===_0x4c1679);if(!_0x1533a4)return;const _0x944b59=_0x1533a4[_0x2f6a3f(0x209)][_0x2f6a3f(0x1ec)](_0x2dabc2=>_0x2dabc2['id']===_0x4e2a0a);_0x944b59&&(_0x944b59[_0x2f6a3f(0x241)]=_0x3d2bc9,this[_0x2f6a3f(0x233)](_0x2f6a3f(0x259),{'sourceId':_0x4c1679,'resourceId':_0x4e2a0a,'isInContext':_0x3d2bc9}));}[_0x52d18f(0x257)](_0x57da27){const _0x27ae57=_0x52d18f;this[_0x27ae57(0x227)][_0x27ae57(0x210)](_0x57da27,!0x0),this[_0x27ae57(0x227)][_0x27ae57(0x217)]&&this[_0x27ae57(0x233)](_0x27ae57(0x1e1),{'isUploadInProgress':!0x0});}[_0x52d18f(0x238)](_0x22c95a){const _0x5554a6=_0x52d18f;this[_0x5554a6(0x227)][_0x5554a6(0x23a)](_0x22c95a),0x0===this[_0x5554a6(0x227)][_0x5554a6(0x217)]&&this[_0x5554a6(0x233)](_0x5554a6(0x1e1),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
const _0x3e4626=_0x5302;(function(_0xe01f41,_0x2e8d01){const _0x130950=_0x5302,_0x54ffc5=_0xe01f41();while(!![]){try{const _0x559ce6=parseInt(_0x130950(0x24c))/0x1+parseInt(_0x130950(0x211))/0x2+parseInt(_0x130950(0x1e9))/0x3*(parseInt(_0x130950(0x1fb))/0x4)+parseInt(_0x130950(0x206))/0x5+parseInt(_0x130950(0x215))/0x6+-parseInt(_0x130950(0x1f1))/0x7*(-parseInt(_0x130950(0x242))/0x8)+parseInt(_0x130950(0x22f))/0x9*(-parseInt(_0x130950(0x1f3))/0xa);if(_0x559ce6===_0x2e8d01)break;else _0x54ffc5['push'](_0x54ffc5['shift']());}catch(_0x1a274c){_0x54ffc5['push'](_0x54ffc5['shift']());}}}(_0x3b7c,0xb0bb8));import{CKEditorError as _0x28d55c,ObservableMixin as _0x1e5c16,uid as _0x113b57}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x445f8b,AIContextTextResourceType as _0x2ff579}from'../../aicore/model/aicontext.js';import{escape as _0x233d96}from'es-toolkit/compat';function _0x3b7c(){const _0xa0e2cd=['has','addFilesToContext','push','values','size','from','_finishUploadOperation','Current\x20document','uiId','getData','5537050CKQFUu','_ongoingUploads','text/markdown','abortController','_updateResourceInContextState','getSentContextItems','object','_addContextOptionsState','addSelectionToContext','sourceResourcesLoaded','addContextOptionsChanged','309796xwPTxL','uploadFile','contextItemLoadingEnded','contextItemAdded','1392330mswQvP','isSelectionInContext','ai-chat-resource-load-failed','_ongoingUploadOperations','ai-chat-context-unsupported-type','SELECTION','ai-chat-url-upload-failed','ai-chat-document-upload-failed','_removeContextItem','length','version','enabled','ai-chat-context-invalid-data','addCurrentDocumentToContext','url-','_startUploadOperation','text/plain','File','all','current-document','type','message','fire','addResourceToContext','_addToConversationContextItem','files-','117BaBhFb','uploadDocument','_convertTextResourceToFile','ai-chat-file-upload-failed','contextSent','uploadProgressChanged','filter','selection','uploadUrl','MARKDOWN','code','map','set','stack','URL','string','fetchDocument','sources','isReadOnly','10063288TkHqBZ','FILE','resourceStateChanged','isCurrentDocumentInContext','addUrlToContext','getDocument','removeFromContext','populateFromMessage','_config','getPendingContextItems','1413385NclExC','updateCurrentDocument','isHidden','resources','_createContextItemFromContent','resourceId','_addContextItem','_pendingContextItems','abort','document','isCurrentDocumentInConversation','label','forEach','ai-request-aborted','data','TEXT','_isResourceInContext','ai-chat-source-not-found','HTML','removeSelectionFromContext','_toggleAddCurrentDocumentOptionVisibility','DOCUMENT','get','object\x20with\x20content\x20and\x20type\x20properties','_findSourceIdsByResourceId','_setAddContextOptionsDefaultState','mapContextItemsToRequestData','init','hidden','_ownerId','_mapContextItemToRequestData','loadSourceResources','_connector','sessionId','startsWith','isInContext','addToConversationContext','text/html','name','start','ai-chat-source-resources-load-failed','find','file-','content','1248zfGAak','contextItemRemoved','_getCustomSourcesInitialState','delete','getResources','error','end','getId','7oGyroc','urls','3350230MqrSBz','files','_finishContextItemLoading','attributes','_conversationContextItems','url','clearPendingContextItems','ai-chat-resource-no-data','8784GwEdJX'];_0x3b7c=function(){return _0xa0e2cd;};return _0x3b7c();}import{errorsMap as _0x377805}from'../../errorsmap.js';function _0x5302(_0x140ec3,_0x4bd142){const _0x3b7cfd=_0x3b7c();return _0x5302=function(_0x5302f1,_0x2a6837){_0x5302f1=_0x5302f1-0x1c4;let _0x4d3e7c=_0x3b7cfd[_0x5302f1];return _0x4d3e7c;},_0x5302(_0x140ec3,_0x4bd142);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x3e4626(0x214),_0x3e4626(0x1ea),_0x3e4626(0x213),_0x3e4626(0x233),_0x3e4626(0x1ee),_0x3e4626(0x210),_0x3e4626(0x20f),_0x3e4626(0x244),_0x3e4626(0x234)];export class AIChatContext extends _0x1e5c16(){[_0x3e4626(0x1dd)];[_0x3e4626(0x24a)];[_0x3e4626(0x1da)];constructor({connector:_0x13dc6f,config:_0x35f500,ownerId:_0x1dd461}){const _0xc723cf=_0x3e4626;super(),this[_0xc723cf(0x1dd)]=_0x13dc6f,this[_0xc723cf(0x24a)]=_0x35f500,this[_0xc723cf(0x1da)]=_0x1dd461;}[_0x3e4626(0x1d8)](){const _0x424f94=_0x3e4626;this[_0x424f94(0x1c4)]=new Map(),this[_0x424f94(0x1f7)]=new Map(),this[_0x424f94(0x207)]=new Map(),this[_0x424f94(0x218)]=new Map(),this[_0x424f94(0x1d6)]();}[_0x3e4626(0x24b)](){const _0x5a79e1=_0x3e4626;return this[_0x5a79e1(0x1c4)];}async[_0x3e4626(0x249)](_0x2751b2){const _0x1cff94=_0x3e4626,_0x378d52=await this[_0x1cff94(0x250)](_0x2751b2);return this[_0x1cff94(0x22d)](_0x378d52),_0x1cff94(0x228)===_0x378d52[_0x1cff94(0x204)]&&this[_0x1cff94(0x1d1)](),_0x378d52;}async[_0x3e4626(0x250)](_0x426686){const _0x5bbe48=_0x3e4626;if(_0x426686[_0x5bbe48(0x229)]===_0x445f8b[_0x5bbe48(0x1d2)]){const _0x11c4d0=await this[_0x5bbe48(0x1dd)][_0x5bbe48(0x23f)](this[_0x5bbe48(0x1da)],_0x426686['id'])[_0x5bbe48(0x247)]();return{'id':_0x5bbe48(0x228),'uiId':_0x5bbe48(0x228),'label':_0x5bbe48(0x203),'type':_0x426686[_0x5bbe48(0x229)],'content':_0x11c4d0[_0x5bbe48(0x1e8)],'hidden':this[_0x5bbe48(0x1f7)][_0x5bbe48(0x1fc)](_0x5bbe48(0x228)),'version':_0x11c4d0[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x21f)],'sessionId':_0x11c4d0[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x1de)]};}return{'id':_0x426686['id'],'uiId':_0x426686['id'],'label':_0x426686[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x1c8)]||_0x426686[_0x5bbe48(0x1e3)]||_0x426686[_0x5bbe48(0x1f8)]||_0x426686['id'],'type':_0x426686[_0x5bbe48(0x229)],..._0x426686?.[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x251)]?{'resourceId':_0x426686[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x251)]}:{}};}[_0x3e4626(0x20b)](){const _0x56da10=_0x3e4626;return new Map(this[_0x56da10(0x1f7)]);}[_0x3e4626(0x248)](_0x199352){const _0x32a7b5=_0x3e4626,_0x17c2a9=this[_0x32a7b5(0x1c4)][_0x32a7b5(0x1d3)](_0x199352);_0x17c2a9?.[_0x32a7b5(0x241)]||this[_0x32a7b5(0x21d)](_0x199352);}[_0x3e4626(0x1f9)](){const _0x4bad9e=_0x3e4626;if(0x0===this[_0x4bad9e(0x1c4)][_0x4bad9e(0x200)])return;for(const _0xb694ac of this[_0x4bad9e(0x1c4)][_0x4bad9e(0x1ff)]())this[_0x4bad9e(0x21d)](_0xb694ac[_0x4bad9e(0x204)]);const _0x342893=this[_0x4bad9e(0x1f7)][_0x4bad9e(0x1d3)](_0x4bad9e(0x228))||this[_0x4bad9e(0x1c4)][_0x4bad9e(0x1d3)](_0x4bad9e(0x228));_0x342893&&this[_0x4bad9e(0x252)]({..._0x342893,'isReadOnly':!0x0,'hidden':!0x0});}[_0x3e4626(0x1e1)](_0x5f2581){const _0x2c57ba=_0x3e4626;for(const _0x42ba21 of _0x5f2581[_0x2c57ba(0x1ff)]())this[_0x2c57ba(0x22d)](_0x42ba21);this[_0x2c57ba(0x1f9)](),this[_0x2c57ba(0x22b)](_0x2c57ba(0x233),{'contextItems':Array[_0x2c57ba(0x201)](this[_0x2c57ba(0x20b)]()[_0x2c57ba(0x1ff)]())});}[_0x3e4626(0x245)](){const _0x40b965=_0x3e4626;return this[_0x40b965(0x1c4)][_0x40b965(0x1fc)](_0x40b965(0x228));}[_0x3e4626(0x216)](){const _0x42b7fa=_0x3e4626;return this[_0x42b7fa(0x1c4)][_0x42b7fa(0x1fc)](_0x42b7fa(0x236));}[_0x3e4626(0x1c7)](){const _0x13ce1e=_0x3e4626;return this[_0x13ce1e(0x1f7)][_0x13ce1e(0x1fc)](_0x13ce1e(0x228));}static[_0x3e4626(0x1d7)](_0x14d5e1){const _0x31c0cd=_0x3e4626;return Array[_0x31c0cd(0x201)](_0x14d5e1[_0x31c0cd(0x1ff)]())[_0x31c0cd(0x23a)](_0x320f97=>this[_0x31c0cd(0x1db)](_0x320f97))[_0x31c0cd(0x235)](_0x58d0af=>null!==_0x58d0af);}async[_0x3e4626(0x1fd)](_0x7f461,_0x4ae7ae,_0x27c8c9=_0x445f8b[_0x3e4626(0x243)]){const _0x2f772f=_0x3e4626,_0x54e36c=_0x2f772f(0x22e)+_0x113b57();this[_0x2f772f(0x224)](_0x54e36c);try{await Promise[_0x2f772f(0x227)](_0x7f461[_0x2f772f(0x23a)](async _0x137b79=>{const _0x2576d7=_0x2f772f,_0x5a7a89=_0x2576d7(0x1e7)+_0x113b57(),_0x26a4a2=_0x233d96(_0x137b79[_0x2576d7(0x1e3)]);try{this[_0x2576d7(0x252)]({'type':_0x27c8c9,'label':_0x4ae7ae?.[_0x2576d7(0x1c8)]||_0x26a4a2,'uiId':_0x5a7a89,'resourceId':_0x4ae7ae?.[_0x2576d7(0x251)]},!0x0);const _0x555d7b=this[_0x2576d7(0x1dd)][_0x2576d7(0x212)](this[_0x2576d7(0x1da)],_0x137b79,_0x4ae7ae);this[_0x2576d7(0x207)][_0x2576d7(0x23b)](_0x5a7a89,_0x555d7b[_0x2576d7(0x209)]);const {id:_0x748ca0}=await _0x555d7b[_0x2576d7(0x1f0)]();this[_0x2576d7(0x207)][_0x2576d7(0x1ec)](_0x5a7a89),this[_0x2576d7(0x1f5)]({'type':_0x27c8c9,'id':_0x748ca0,'label':_0x4ae7ae?.[_0x2576d7(0x1c8)]||_0x26a4a2,'uiId':_0x5a7a89,'resourceId':_0x4ae7ae?.[_0x2576d7(0x251)]},!0x1);}catch(_0x3e081a){this[_0x2576d7(0x207)][_0x2576d7(0x1ec)](_0x5a7a89);if(!(_0x3e081a instanceof _0x28d55c&&_0x3e081a[_0x2576d7(0x22a)][_0x2576d7(0x1df)](_0x2576d7(0x1ca)))){const _0x16ddb4=_0x377805[_0x2576d7(0x1d3)](_0x3e081a[_0x2576d7(0x239)])||_0x2576d7(0x232),_0x1414e7=new _0x28d55c(_0x16ddb4,null,{'fileName':_0x26a4a2,..._0x3e081a});_0x1414e7[_0x2576d7(0x23c)]=_0x3e081a[_0x2576d7(0x23c)],this[_0x2576d7(0x22b)](_0x2576d7(0x1ee),{'error':_0x1414e7});}this[_0x2576d7(0x21d)](_0x5a7a89);}}));}finally{this[_0x2f772f(0x202)](_0x54e36c);}}[_0x3e4626(0x222)](_0x2ea4e8){const _0x110027=_0x3e4626;if(this[_0x110027(0x245)]())return;const _0x1f3e44={'type':_0x445f8b[_0x110027(0x1d2)],'uiId':_0x110027(0x228),'label':_0x2ea4e8,'isReadOnly':this[_0x110027(0x1f7)][_0x110027(0x1fc)](_0x110027(0x228)),'hidden':this[_0x110027(0x1f7)][_0x110027(0x1fc)](_0x110027(0x228))};this[_0x110027(0x252)](_0x1f3e44);}async[_0x3e4626(0x24d)](_0x30e684,_0x78aade,_0x141973,_0x26980c){const _0x2e6ebd=_0x3e4626,_0x9ad16f=this[_0x2e6ebd(0x1c4)][_0x2e6ebd(0x1d3)](_0x2e6ebd(0x228));if(_0x9ad16f&&_0x30e684){_0x9ad16f[_0x2e6ebd(0x236)]=_0x26980c?_0x26980c[_0x2e6ebd(0x23a)](_0x47bb69=>({'start':_0x47bb69[_0x2e6ebd(0x1e4)],'end':_0x47bb69[_0x2e6ebd(0x1ef)]})):[];try{if(_0x9ad16f[_0x2e6ebd(0x21f)]===_0x78aade)return;const {id:_0xbce828}=await this[_0x2e6ebd(0x1dd)][_0x2e6ebd(0x230)](this[_0x2e6ebd(0x1da)],_0x30e684,{'version':_0x78aade,'sessionId':_0x141973})[_0x2e6ebd(0x1f0)]();_0x9ad16f['id']=_0xbce828,_0x9ad16f[_0x2e6ebd(0x1e8)]=_0x30e684,_0x9ad16f[_0x2e6ebd(0x21f)]=_0x78aade,_0x9ad16f[_0x2e6ebd(0x1de)]=_0x141973;}catch(_0x46d8db){const _0x5539c6=new _0x28d55c(_0x2e6ebd(0x21c),null);_0x5539c6[_0x2e6ebd(0x23c)]=_0x46d8db[_0x2e6ebd(0x23c)],this[_0x2e6ebd(0x22b)](_0x2e6ebd(0x1ee),{'error':_0x5539c6});}}}[_0x3e4626(0x20e)](_0x5d38c2){const _0xbbb51=_0x3e4626;this[_0xbbb51(0x252)]({'type':_0x445f8b[_0xbbb51(0x21a)],'label':_0x5d38c2,'uiId':_0xbbb51(0x236),'content':_0x5d38c2});}[_0x3e4626(0x1d0)](){const _0x349689=_0x3e4626;this[_0x349689(0x21d)](_0x349689(0x236));}async[_0x3e4626(0x246)](_0x2fedbd,_0xc10e87){const _0x531089=_0x3e4626,_0x518f33=_0x531089(0x223)+_0x113b57();this[_0x531089(0x224)](_0x518f33);const _0x1e44b1=_0x531089(0x223)+_0x113b57();try{this[_0x531089(0x252)]({'type':_0x445f8b[_0x531089(0x23d)],'label':_0xc10e87?.[_0x531089(0x1c8)]||_0x2fedbd,'uiId':_0x1e44b1,'resourceId':_0xc10e87?.[_0x531089(0x251)]},!0x0);const _0xfe0a53=this[_0x531089(0x1dd)][_0x531089(0x237)](this[_0x531089(0x1da)],_0x2fedbd,_0xc10e87);this[_0x531089(0x207)][_0x531089(0x23b)](_0x1e44b1,_0xfe0a53[_0x531089(0x209)]);const {id:_0x29eace}=await _0xfe0a53[_0x531089(0x1f0)]();this[_0x531089(0x207)][_0x531089(0x1ec)](_0x1e44b1),this[_0x531089(0x1f5)]({'type':_0x445f8b[_0x531089(0x23d)],'id':_0x29eace,'label':_0xc10e87?.[_0x531089(0x1c8)]||_0x2fedbd,'uiId':_0x1e44b1,'resourceId':_0xc10e87?.[_0x531089(0x251)]},!0x1);}catch(_0x13a0f4){this[_0x531089(0x207)][_0x531089(0x1ec)](_0x1e44b1),(_0x13a0f4[_0x531089(0x22a)][_0x531089(0x1df)](_0x531089(0x1ca))||this[_0x531089(0x22b)](_0x531089(0x1ee),{'error':new _0x28d55c(_0x531089(0x21b),this,{'url':_0x2fedbd,'originalError':_0x13a0f4}),'url':_0x2fedbd}),this[_0x531089(0x21d)](_0x1e44b1));}finally{this[_0x531089(0x202)](_0x518f33);}}async[_0x3e4626(0x1dc)](_0xd7f9cd,_0xd47124,_0x3acc0d){const _0x3015cb=_0x3e4626,_0xac4d23=this[_0x3015cb(0x20d)][_0x3015cb(0x240)][_0x3015cb(0x1e6)](_0x4c4d9e=>_0x4c4d9e['id']===_0xd7f9cd);if(!_0xac4d23)return this[_0x3015cb(0x22b)](_0x3015cb(0x1ee),{'error':new _0x28d55c(_0x3015cb(0x1ce),this,{'sourceId':_0xd7f9cd}),'sourceId':_0xd7f9cd}),[];try{const _0x1ff61e=(await _0xac4d23[_0x3015cb(0x1ed)](_0xd47124))[_0x3015cb(0x23a)](_0x105dd4=>{const _0x225219=_0x3015cb,_0x3246e5=this[_0x225219(0x1cd)](_0x105dd4['id']);return{..._0x105dd4,'isInContext':_0x3246e5};});return _0xac4d23[_0x3015cb(0x24f)]=_0x1ff61e,this[_0x3015cb(0x22b)](_0x3015cb(0x20f),{'sourceId':_0xd7f9cd,'source':_0xac4d23,'resources':_0x1ff61e,'uid':_0x3acc0d}),_0x1ff61e;}catch(_0x427271){return this[_0x3015cb(0x22b)](_0x3015cb(0x1ee),{'error':new _0x28d55c(_0x3015cb(0x1e5),this,{'sourceId':_0xd7f9cd,'originalError':_0x427271}),'sourceId':_0xd7f9cd,'sourceLabel':_0xac4d23[_0x3015cb(0x1c8)]}),[];}}async[_0x3e4626(0x22c)](_0x4ba1ed,_0x5125e1){const _0x1d888f=_0x3e4626;if(this[_0x1d888f(0x1cd)](_0x5125e1['id']))return;let _0x27b056=_0x5125e1[_0x1d888f(0x1cb)];if(!_0x27b056&&_0x4ba1ed[_0x1d888f(0x205)])try{_0x27b056=await _0x4ba1ed[_0x1d888f(0x205)](_0x5125e1['id']);}catch(_0x361ec6){return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x217),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'originalError':_0x361ec6}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}if(_0x27b056)switch(_0x5125e1[_0x1d888f(0x229)]){case _0x445f8b[_0x1d888f(0x23d)]:if(_0x1d888f(0x23e)!=typeof _0x27b056)return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x23e),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});await this[_0x1d888f(0x246)](_0x27b056,{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']});break;case _0x445f8b[_0x1d888f(0x243)]:if(!(_0x27b056 instanceof File))return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x226),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});await this[_0x1d888f(0x1fd)]([_0x27b056],{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']});break;case _0x445f8b[_0x1d888f(0x1cc)]:if(_0x1d888f(0x20c)!=typeof _0x27b056||!(_0x1d888f(0x1e8)in _0x27b056)||!(_0x1d888f(0x229)in _0x27b056))return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x1d4),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});_0x27b056=AIChatContext[_0x1d888f(0x231)](_0x27b056,_0x5125e1[_0x1d888f(0x1c8)]),await this[_0x1d888f(0x1fd)]([_0x27b056],{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']},_0x445f8b[_0x1d888f(0x1cc)]);break;default:this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x219),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'resourceType':_0x5125e1[_0x1d888f(0x229)]}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}else this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x1fa),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}static[_0x3e4626(0x231)](_0x37d074,_0x48683f){const _0x4414b0=_0x3e4626;switch(_0x37d074[_0x4414b0(0x229)]){case _0x2ff579[_0x4414b0(0x238)]:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x208)});case _0x2ff579[_0x4414b0(0x1cf)]:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x1e2)});default:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x225)});}}static[_0x3e4626(0x1db)](_0xdee7c1){const _0x2346ed=_0x3e4626;switch(_0xdee7c1[_0x2346ed(0x229)]){case _0x445f8b[_0x2346ed(0x243)]:return{'type':_0x445f8b[_0x2346ed(0x243)],'id':_0xdee7c1['id']};case _0x445f8b[_0x2346ed(0x23d)]:return{'type':_0x445f8b[_0x2346ed(0x23d)],'id':_0xdee7c1['id']};case _0x445f8b[_0x2346ed(0x1d2)]:return{'type':_0x445f8b[_0x2346ed(0x1d2)],'id':_0xdee7c1['id'],..._0xdee7c1[_0x2346ed(0x236)]?.[_0x2346ed(0x21e)]&&{'selection':_0xdee7c1[_0x2346ed(0x236)]}};case _0x445f8b[_0x2346ed(0x1cc)]:return{'type':_0x445f8b[_0x2346ed(0x243)],'id':_0xdee7c1['id']};default:return null;}}[_0x3e4626(0x252)](_0x144885,_0x2d6329=!0x1){const _0x11b8f9=_0x3e4626;if(this[_0x11b8f9(0x1c4)][_0x11b8f9(0x23b)](_0x144885[_0x11b8f9(0x204)],_0x144885),_0x144885[_0x11b8f9(0x1d9)]||this[_0x11b8f9(0x22b)](_0x11b8f9(0x214),{'contextItem':_0x144885,'isLoading':_0x2d6329}),_0x11b8f9(0x228)===_0x144885[_0x11b8f9(0x204)]&&this[_0x11b8f9(0x1d1)](),_0x144885[_0x11b8f9(0x251)]){const _0x45503a=this[_0x11b8f9(0x1d5)](_0x144885[_0x11b8f9(0x251)]);_0x45503a&&_0x45503a[_0x11b8f9(0x1c9)](_0x25e511=>{const _0x36028b=_0x11b8f9;this[_0x36028b(0x20a)](_0x25e511,_0x144885[_0x36028b(0x251)],!0x0);});}}[_0x3e4626(0x21d)](_0x28b0b1){const _0x52d1b9=_0x3e4626,_0x4a91dc=this[_0x52d1b9(0x1c4)][_0x52d1b9(0x1d3)](_0x28b0b1),_0xe06740=this[_0x52d1b9(0x207)][_0x52d1b9(0x1d3)](_0x28b0b1);if(_0xe06740&&(_0xe06740[_0x52d1b9(0x1c5)](),this[_0x52d1b9(0x207)][_0x52d1b9(0x1ec)](_0x28b0b1)),_0x4a91dc?.[_0x52d1b9(0x251)]){const _0x1f83e3=this[_0x52d1b9(0x1d5)](_0x4a91dc[_0x52d1b9(0x251)]);_0x1f83e3&&_0x1f83e3[_0x52d1b9(0x1c9)](_0x1d191d=>{const _0x44943f=_0x52d1b9;this[_0x44943f(0x20a)](_0x1d191d,_0x4a91dc[_0x44943f(0x251)],!0x1);});}this[_0x52d1b9(0x1c4)][_0x52d1b9(0x1ec)](_0x28b0b1),this[_0x52d1b9(0x22b)](_0x52d1b9(0x1ea),{'uiId':_0x28b0b1,'type':_0x4a91dc?.[_0x52d1b9(0x229)]}),_0x52d1b9(0x228)===_0x28b0b1&&this[_0x52d1b9(0x1d1)]();}[_0x3e4626(0x1f5)](_0x55e6b0,_0x291973){const _0x2e3323=_0x3e4626;if(this[_0x2e3323(0x1c4)][_0x2e3323(0x1fc)](_0x55e6b0[_0x2e3323(0x204)])&&(this[_0x2e3323(0x1c4)][_0x2e3323(0x23b)](_0x55e6b0[_0x2e3323(0x204)],_0x55e6b0),this[_0x2e3323(0x22b)](_0x2e3323(0x213),{'contextItem':_0x55e6b0,'isLoading':_0x291973}),_0x55e6b0[_0x2e3323(0x251)])){const _0x71c000=this[_0x2e3323(0x1d5)](_0x55e6b0[_0x2e3323(0x251)]);_0x71c000&&_0x71c000[_0x2e3323(0x1c9)](_0x47bdb5=>{const _0x16da1f=_0x2e3323;this[_0x16da1f(0x20a)](_0x47bdb5,_0x55e6b0[_0x16da1f(0x251)],!0x0);});}}[_0x3e4626(0x22d)](_0xb2e9a){const _0x803cf=_0x3e4626;this[_0x803cf(0x1f7)][_0x803cf(0x23b)](_0xb2e9a[_0x803cf(0x204)],_0xb2e9a);}[_0x3e4626(0x1d6)](){const _0x2af20c=_0x3e4626;this[_0x2af20c(0x20d)]={'document':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1c6)]?.[_0x2af20c(0x220)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1f2)]?.[_0x2af20c(0x220)]},'files':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1f4)]?.[_0x2af20c(0x220)]},'sources':this[_0x2af20c(0x1eb)]()},this[_0x2af20c(0x22b)](_0x2af20c(0x210),{'options':this[_0x2af20c(0x20d)]});}[_0x3e4626(0x1eb)](){const _0x3e0b3b=_0x3e4626;return this[_0x3e0b3b(0x24a)]?.[_0x3e0b3b(0x240)]?.[_0x3e0b3b(0x23a)](_0x43f587=>({..._0x43f587,'resources':[]}))??[];}[_0x3e4626(0x1d1)](){const _0x43c9ee=_0x3e4626,_0x1ca253=this[_0x43c9ee(0x245)]()||this[_0x43c9ee(0x1c7)]();this[_0x43c9ee(0x20d)][_0x43c9ee(0x1c6)][_0x43c9ee(0x24e)]=_0x1ca253,this[_0x43c9ee(0x22b)](_0x43c9ee(0x210),{'options':this[_0x43c9ee(0x20d)]});}[_0x3e4626(0x1cd)](_0x52b12f){const _0x81b540=_0x3e4626;for(const _0xcb3412 of this[_0x81b540(0x1c4)][_0x81b540(0x1ff)]())if(_0xcb3412[_0x81b540(0x251)]===_0x52b12f)return!0x0;for(const _0x39615d of this[_0x81b540(0x1f7)][_0x81b540(0x1ff)]())if(_0x39615d[_0x81b540(0x251)]===_0x52b12f)return!0x0;return!0x1;}[_0x3e4626(0x1d5)](_0x4b31d4){const _0x3a455f=_0x3e4626,_0x3ac67e=[];for(const _0x1d86de of this[_0x3a455f(0x20d)][_0x3a455f(0x240)]){_0x1d86de[_0x3a455f(0x24f)][_0x3a455f(0x1e6)](_0x2f6c5b=>_0x2f6c5b['id']===_0x4b31d4)&&_0x3ac67e[_0x3a455f(0x1fe)](_0x1d86de['id']);}return 0x0===_0x3ac67e[_0x3a455f(0x21e)]?null:_0x3ac67e;}[_0x3e4626(0x20a)](_0x469b51,_0x44fbe7,_0x4a322b){const _0x5dd699=_0x3e4626,_0x9be18e=this[_0x5dd699(0x20d)][_0x5dd699(0x240)][_0x5dd699(0x1e6)](_0x39fc4b=>_0x39fc4b['id']===_0x469b51);if(!_0x9be18e)return;const _0x37f497=_0x9be18e[_0x5dd699(0x24f)][_0x5dd699(0x1e6)](_0x3c4cbc=>_0x3c4cbc['id']===_0x44fbe7);_0x37f497&&(_0x37f497[_0x5dd699(0x1e0)]=_0x4a322b,this[_0x5dd699(0x22b)](_0x5dd699(0x244),{'sourceId':_0x469b51,'resourceId':_0x44fbe7,'isInContext':_0x4a322b}));}[_0x3e4626(0x224)](_0x324b51){const _0x5e84d4=_0x3e4626;this[_0x5e84d4(0x218)][_0x5e84d4(0x23b)](_0x324b51,!0x0),this[_0x5e84d4(0x218)][_0x5e84d4(0x200)]&&this[_0x5e84d4(0x22b)](_0x5e84d4(0x234),{'isUploadInProgress':!0x0});}[_0x3e4626(0x202)](_0xf65a18){const _0x19c2f9=_0x3e4626;this[_0x19c2f9(0x218)][_0x19c2f9(0x1ec)](_0xf65a18),0x0===this[_0x19c2f9(0x218)][_0x19c2f9(0x200)]&&this[_0x19c2f9(0x22b)](_0x19c2f9(0x234),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x56de(_0x2107dc,_0x17c60c){const _0x2466a5=_0x2466();return _0x56de=function(_0x56de19,_0x3602f7){_0x56de19=_0x56de19-0x105;let _0x458a72=_0x2466a5[_0x56de19];return _0x458a72;},_0x56de(_0x2107dc,_0x17c60c);}const _0x467859=_0x56de;(function(_0x2850bb,_0x51e222){const _0x333fdf=_0x56de,_0x39dc75=_0x2850bb();while(!![]){try{const _0x53bd07=parseInt(_0x333fdf(0x167))/0x1+-parseInt(_0x333fdf(0x153))/0x2*(parseInt(_0x333fdf(0x136))/0x3)+-parseInt(_0x333fdf(0x112))/0x4+parseInt(_0x333fdf(0x14b))/0x5+-parseInt(_0x333fdf(0x10f))/0x6*(-parseInt(_0x333fdf(0x135))/0x7)+-parseInt(_0x333fdf(0x10c))/0x8*(-parseInt(_0x333fdf(0x169))/0x9)+-parseInt(_0x333fdf(0x149))/0xa*(parseInt(_0x333fdf(0x12c))/0xb);if(_0x53bd07===_0x51e222)break;else _0x39dc75['push'](_0x39dc75['shift']());}catch(_0x2b9c09){_0x39dc75['push'](_0x39dc75['shift']());}}}(_0x2466,0x2f672));import{CKEditorError as _0x4e667b,EmitterMixin as _0x3f49b0,logWarning as _0x5d9628}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x369196}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x5a39c3,AI_CONTEXT_MODEL_EVENT_NAMES as _0x3cc6a0}from'./aichatcontext.js';import{AICapabilities as _0x4859c4,CAPABILITIES_MODEL_EVENT_NAMES as _0x47bf47}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x5e6e38}from'./aichatinteraction.js';import{errorsMap as _0x551e46}from'../../errorsmap.js';function _0x2466(){const _0x38bcaf=['selectedModel','fire','attributes','appendContent','getModel','setConversationTitle','getDocumentContext','addResourceToContext','isSelectionInContext','role','indexOf','6782350MsiKqA','populateFromMessage','652720eFdPHs','createInteraction','start','isStarted','isCurrentDocumentInConversation','conversationInitialized','length','webSearch','112054FWecwW','lastInteraction','removeInteraction','isCurrentDocumentInContext','set','find','chatCapabilities','assistant','prompt','getConversation','code','hasOwn','ai-chat-conversation-set-model-null','quickActionData','chatContext','error','setModel','conversationId','ai-chat-conversation-already-started','ai-chat-conversation-set-model-not-available','340664XxBThA','message','9dyCkyk','interactions','text','modelSelected','options','_extractContextItems','fetchConversation','sessionId','push','modification-delta','createReply','reasoning','chatModels','stop','contextItems','fetchConversationMessages','init','delegate','_processMessagesToInteractions','getCapabilitiesConfig','conversationStarted','loadSourceResources','updateCurrentDocument','interactionCreated','ai-chat-handle-user-conversation-not-initialized','getAvailableModels','2389880kwFPRr','ai-chat-conversation-start-no-model-selected','getPendingContextItems','1670802enruOg','getAll','getCurrentDocumentContext','31728NqaNAm','removeSelectionFromContext','isAvailable','title','getMessages','handleUserInteraction','stack','model','addSelectionToContext','capabilities','addFilesToContext','toggleReasoning','currentReply','removeFromContext','text-delta','updateCurrentDocumentInContext','currentInteraction','ai-chat-conversation-init-failed','getInteraction','ai-chat-conversation-init-from-id-failed','type','toLowerCase','content','user','splice','ai-chat-conversation-start-failed','11riuyho','selectedModelId','ai-chat-handle-user-interaction-already-in-progress','ai-chat-handle-user-interaction-start-failed','load','addUrlToContext','reset','get','group','7prZhAk','9JkNGCR','connector','addCurrentDocumentToContext','addToConversationContext','startConversation','getEditor','destroy','toggleWebSearch'];_0x2466=function(){return _0x38bcaf;};return _0x2466();}export class AIChatConversation extends _0x3f49b0(){['id'];[_0x467859(0x14e)]=!0x1;[_0x467859(0x16a)]=[];[_0x467859(0x122)];[_0x467859(0x13e)];[_0x467859(0x137)];[_0x467859(0x16d)];constructor(_0x540919){const _0x1bb0ed=_0x467859;super(),this[_0x1bb0ed(0x16d)]=_0x540919,this[_0x1bb0ed(0x137)]=_0x540919[_0x1bb0ed(0x137)],this[_0x1bb0ed(0x175)]=_0x540919[_0x1bb0ed(0x175)],this['id']=_0x540919[_0x1bb0ed(0x164)];}async[_0x467859(0x179)](_0x4d5e74){const _0x12c87f=_0x467859;try{this[_0x12c87f(0x161)]=new _0x5a39c3({'connector':this[_0x12c87f(0x137)],'config':_0x4d5e74,'ownerId':this['id']}),this[_0x12c87f(0x161)][_0x12c87f(0x17a)](..._0x3cc6a0)['to'](this),this[_0x12c87f(0x161)][_0x12c87f(0x179)](),this[_0x12c87f(0x159)]=new _0x4859c4(),this[_0x12c87f(0x159)][_0x12c87f(0x17a)](..._0x47bf47)['to'](this),this[_0x12c87f(0x159)][_0x12c87f(0x179)]();const _0x1ecf7a=await this[_0x12c87f(0x175)][_0x12c87f(0x10b)]();this[_0x12c87f(0x13f)](_0x12c87f(0x150),{'availableModels':_0x1ecf7a});const _0x5dbef0=await this[_0x12c87f(0x175)][_0x12c87f(0x142)](this[_0x12c87f(0x16d)][_0x12c87f(0x12d)]);_0x5dbef0&&await this[_0x12c87f(0x163)](_0x5dbef0);}catch(_0x18e09e){const _0x2f4930=new _0x4e667b(_0x12c87f(0x123),null,{'message':_0x18e09e[_0x12c87f(0x168)]||_0x18e09e});_0x2f4930[_0x12c87f(0x118)]=_0x18e09e[_0x12c87f(0x118)],this[_0x12c87f(0x13f)](_0x12c87f(0x162),{'error':_0x2f4930});}}async[_0x467859(0x14d)](){const _0xaf75f5=_0x467859;if(this[_0xaf75f5(0x14e)])throw new _0x4e667b(_0xaf75f5(0x165),null,{'conversation':this});if(!this[_0xaf75f5(0x13e)])throw new _0x4e667b(_0xaf75f5(0x10d),null,{'conversation':this});try{const {id:_0x49e1d9}=await this[_0xaf75f5(0x137)][_0xaf75f5(0x13a)](this['id'],this[_0xaf75f5(0x16d)][_0xaf75f5(0x134)])[_0xaf75f5(0x15c)]();this['id']=_0x49e1d9,this[_0xaf75f5(0x14e)]=!0x0,this[_0xaf75f5(0x13f)](_0xaf75f5(0x106),{'conversationId':this['id'],'selectedModel':this[_0xaf75f5(0x13e)]});}catch(_0x1413bb){const _0x196327=new _0x4e667b(_0xaf75f5(0x12b),null,{'message':_0x1413bb[_0xaf75f5(0x168)],'conversationId':this['id']});throw _0x196327[_0xaf75f5(0x118)]=_0x1413bb[_0xaf75f5(0x118)],this[_0xaf75f5(0x13f)](_0xaf75f5(0x162),{'error':_0x196327}),_0x196327;}}async[_0x467859(0x130)](_0x2bb8a7,_0x3eefd0){const _0x8e6328=_0x467859;try{const _0x21886e=await this[_0x8e6328(0x137)][_0x8e6328(0x16f)](_0x2bb8a7)[_0x8e6328(0x15c)](),_0x3db912=await this[_0x8e6328(0x137)][_0x8e6328(0x178)](_0x2bb8a7)[_0x8e6328(0x116)](),_0x4b44d3=_0x3db912[0x0][_0x8e6328(0x119)];this[_0x8e6328(0x14e)]=!0x0,this['id']=_0x21886e['id'],_0x8e6328(0x115)in _0x21886e?this[_0x8e6328(0x13f)](_0x8e6328(0x143),_0x21886e[_0x8e6328(0x115)],!0x0):this[_0x8e6328(0x13f)](_0x8e6328(0x143),'',!0x0);const _0xb7eb37=(await this[_0x8e6328(0x175)][_0x8e6328(0x110)]())[_0x8e6328(0x158)](_0x4c3743=>_0x4c3743['id'][_0x8e6328(0x127)]()===_0x4b44d3[_0x8e6328(0x127)]());return this[_0x8e6328(0x13e)]=_0xb7eb37,this[_0x8e6328(0x13f)](_0x8e6328(0x16c),{'selectedModel':_0xb7eb37,'isDisabled':!0x0}),await this[_0x8e6328(0x17b)](_0x3db912,_0x3eefd0,_0x4b44d3),this[_0x8e6328(0x122)]=void 0x0,this;}catch(_0x26b750){const _0x101e66=new _0x4e667b(_0x8e6328(0x125),null,{'message':_0x26b750[_0x8e6328(0x168)],'conversationId':_0x2bb8a7});throw _0x101e66[_0x8e6328(0x118)]=_0x26b750[_0x8e6328(0x118)],this[_0x8e6328(0x13f)](_0x8e6328(0x162),{'error':_0x101e66}),_0x101e66;}}async[_0x467859(0x17b)](_0x45c301,_0x3cc7d0,_0x1e5392){const _0x1068f4=_0x467859;let _0x213a8f;for(const _0x1e1628 of _0x45c301)if(_0x1068f4(0x129)===_0x1e1628[_0x1068f4(0x147)]){const _0x22fdc4=await this[_0x1068f4(0x16e)](_0x1e1628),_0x56f4c6={'isReasoningEnabled':Object[_0x1068f4(0x15e)](_0x1e1628[_0x1068f4(0x11b)],_0x1068f4(0x174)),'isWebSearchEnabled':Object[_0x1068f4(0x15e)](_0x1e1628[_0x1068f4(0x11b)],_0x1068f4(0x152))};_0x213a8f=this[_0x1068f4(0x14c)]({'userMessage':_0x1e1628[_0x1068f4(0x15b)],'contextItems':_0x22fdc4,'capabilities':_0x56f4c6,'modelId':_0x1e5392,'quickActionData':_0x1e1628[_0x1068f4(0x140)]?.[_0x1068f4(0x160)]}),this[_0x1068f4(0x122)]=_0x213a8f,this[_0x1068f4(0x161)][_0x1068f4(0x139)](this[_0x1068f4(0x122)][_0x1068f4(0x177)]);}else{if(_0x1068f4(0x15a)===_0x1e1628[_0x1068f4(0x147)]&&_0x213a8f)for(const _0x25c69c of _0x1e1628[_0x1068f4(0x128)]){const _0x477908=_0x1068f4(0x16b)===_0x25c69c[_0x1068f4(0x126)]?_0x1068f4(0x120):_0x1068f4(0x172),_0x2dd1da=_0x213a8f[_0x1068f4(0x144)]()?.[_0x1068f4(0x170)]!==_0x3cc7d0;_0x213a8f[_0x1068f4(0x11e)]=_0x213a8f[_0x1068f4(0x173)]({'type':_0x477908,'isDone':!0x0,'interactionId':_0x213a8f['id'],'areActionsDisabled':_0x2dd1da}),_0x213a8f[_0x1068f4(0x11e)][_0x1068f4(0x141)](_0x25c69c[_0x1068f4(0x128)]);}}}async[_0x467859(0x16e)](_0x30b2ff){const _0x4ce6a1=_0x467859,_0x5ab797=new Map();if(!_0x30b2ff[_0x4ce6a1(0x128)])return _0x5ab797;for(const _0x412391 of _0x30b2ff[_0x4ce6a1(0x128)]){const _0x8bb4ef=await this[_0x4ce6a1(0x161)][_0x4ce6a1(0x14a)](_0x412391);_0x8bb4ef&&_0x5ab797[_0x4ce6a1(0x157)](_0x8bb4ef['id'],_0x8bb4ef);}return _0x5ab797;}async[_0x467859(0x117)]({userMessage:_0x3c0465,quickActionData:_0x53e04c}){const _0x296ed4=_0x467859;if(!this[_0x296ed4(0x14e)])throw new _0x4e667b(_0x296ed4(0x10a),null,{'conversation':this});if(this[_0x296ed4(0x122)])throw new _0x4e667b(_0x296ed4(0x12e),null,{'conversation':this});try{const _0x5cc714=this[_0x296ed4(0x161)][_0x296ed4(0x10e)](),_0x262d1c=this[_0x296ed4(0x159)][_0x296ed4(0x105)](),_0x2ba825=this[_0x296ed4(0x13e)]['id'];this[_0x296ed4(0x122)]=this[_0x296ed4(0x14c)]({'userMessage':_0x3c0465,'contextItems':_0x5cc714,'capabilities':_0x262d1c,'modelId':_0x2ba825,'quickActionData':_0x53e04c}),await this[_0x296ed4(0x122)][_0x296ed4(0x14d)](),this[_0x296ed4(0x161)][_0x296ed4(0x139)](this[_0x296ed4(0x122)][_0x296ed4(0x177)]);}catch(_0x26aa84){if(_0x26aa84 instanceof _0x4e667b)this[_0x296ed4(0x13f)](_0x296ed4(0x162),{'interactionId':this[_0x296ed4(0x122)]?this[_0x296ed4(0x122)]['id']:void 0x0,'error':_0x26aa84});else{const _0x480061=_0x551e46[_0x296ed4(0x133)](_0x26aa84[_0x296ed4(0x15d)])||_0x296ed4(0x12f);this[_0x296ed4(0x13f)](_0x296ed4(0x162),{'interactionId':this[_0x296ed4(0x122)]?this[_0x296ed4(0x122)]['id']:void 0x0,'error':new _0x4e667b(_0x480061,null,{'error':_0x26aa84})});}}finally{this[_0x296ed4(0x122)]?.[_0x296ed4(0x176)](),this[_0x296ed4(0x122)]=void 0x0;}}[_0x467859(0x14c)]({userMessage:_0x344cf5,contextItems:_0x100704,capabilities:_0x66308,modelId:_0x52f354,quickActionData:_0x46249b}){const _0x29fe20=_0x467859,_0x41410c=new _0x5e6e38({'userMessage':_0x344cf5,'contextItems':_0x100704,'capabilities':_0x66308,'conversationId':this['id'],'connector':this[_0x29fe20(0x137)],'editor':this[_0x29fe20(0x16d)][_0x29fe20(0x13b)]&&this[_0x29fe20(0x16d)][_0x29fe20(0x13b)](),'model':_0x52f354,'quickActionData':_0x46249b});return _0x41410c[_0x29fe20(0x17a)](..._0x369196)['to'](this),this[_0x29fe20(0x16a)][_0x29fe20(0x171)](_0x41410c),this[_0x29fe20(0x13f)](_0x29fe20(0x109),_0x41410c),_0x41410c;}[_0x467859(0x124)](_0x6ea84d){const _0x338fa9=_0x467859;return this[_0x338fa9(0x16a)][_0x338fa9(0x158)](_0x3e5749=>_0x3e5749['id']===_0x6ea84d);}[_0x467859(0x155)](_0x3b950d){const _0x39eac1=_0x467859,_0x501191=this[_0x39eac1(0x124)](_0x3b950d);_0x501191&&(_0x501191[_0x39eac1(0x13c)](),this[_0x39eac1(0x16a)][_0x39eac1(0x12a)](this[_0x39eac1(0x16a)][_0x39eac1(0x148)](_0x501191),0x1));}get[_0x467859(0x154)](){const _0x435bd2=_0x467859;return this[_0x435bd2(0x16a)][this[_0x435bd2(0x16a)][_0x435bd2(0x151)]-0x1];}[_0x467859(0x138)](_0x4ccb5b){const _0xf0dee4=_0x467859;this[_0xf0dee4(0x161)][_0xf0dee4(0x138)](_0x4ccb5b);}async[_0x467859(0x121)]({content:_0x15f54c,version:_0x1451ef,sessionId:_0x1a34b0,selections:_0x18c03b}){const _0x4d1921=_0x467859;await this[_0x4d1921(0x161)][_0x4d1921(0x108)](_0x15f54c,_0x1451ef,_0x1a34b0,_0x18c03b);}[_0x467859(0x111)](){const _0x4bbb5c=_0x467859;return this[_0x4bbb5c(0x122)]?.[_0x4bbb5c(0x144)]()?.[_0x4bbb5c(0x128)]||'';}[_0x467859(0x11a)](_0x5b6a98){const _0x5bd313=_0x467859;this[_0x5bd313(0x161)][_0x5bd313(0x11a)](_0x5b6a98);}[_0x467859(0x113)](){const _0x4f01bd=_0x467859;this[_0x4f01bd(0x161)][_0x4f01bd(0x113)]();}[_0x467859(0x11c)](_0x49a893){const _0x51e26e=_0x467859;this[_0x51e26e(0x161)][_0x51e26e(0x11c)](_0x49a893);}[_0x467859(0x131)](_0x596cb5){const _0x404e69=_0x467859;this[_0x404e69(0x161)][_0x404e69(0x131)](_0x596cb5);}[_0x467859(0x145)](_0x1c2487,_0x12d142){const _0x5aee59=_0x467859;this[_0x5aee59(0x161)][_0x5aee59(0x145)](_0x1c2487,_0x12d142);}[_0x467859(0x107)](_0x3781d1,_0x4cc084,_0x587fab){const _0x4301e9=_0x467859;return this[_0x4301e9(0x161)][_0x4301e9(0x107)](_0x3781d1,_0x4cc084,_0x587fab);}[_0x467859(0x11f)](_0x61d1cb){const _0x1a3af4=_0x467859;this[_0x1a3af4(0x161)][_0x1a3af4(0x11f)](_0x61d1cb);}[_0x467859(0x13d)](){const _0x4110d6=_0x467859;this[_0x4110d6(0x159)][_0x4110d6(0x13d)]();}[_0x467859(0x11d)](){const _0x57f30e=_0x467859;this[_0x57f30e(0x159)][_0x57f30e(0x11d)]();}[_0x467859(0x156)](){const _0xeb05ae=_0x467859;return this[_0xeb05ae(0x161)][_0xeb05ae(0x156)]();}[_0x467859(0x14f)](){const _0x56ad98=_0x467859;return this[_0x56ad98(0x161)][_0x56ad98(0x14f)]();}[_0x467859(0x146)](){const _0x625329=_0x467859;return this[_0x625329(0x161)][_0x625329(0x146)]();}async[_0x467859(0x163)](_0x3e24d1){const _0x1df9ad=_0x467859;_0x3e24d1?!0x1===await this[_0x1df9ad(0x175)][_0x1df9ad(0x114)](_0x3e24d1)&&(_0x5d9628(_0x1df9ad(0x166),{'conversation':this,'model':_0x3e24d1}),_0x3e24d1=(await this[_0x1df9ad(0x175)][_0x1df9ad(0x10b)]())[0x0]):(_0x5d9628(_0x1df9ad(0x15f),{'conversation':this}),_0x3e24d1=(await this[_0x1df9ad(0x175)][_0x1df9ad(0x10b)]())[0x0]),_0x3e24d1['id']!==this[_0x1df9ad(0x13e)]?.['id']&&(this[_0x1df9ad(0x13e)]=_0x3e24d1,this[_0x1df9ad(0x159)][_0x1df9ad(0x132)](),this[_0x1df9ad(0x13f)](_0x1df9ad(0x16c),{'selectedModel':_0x3e24d1}));}}
|
|
23
|
+
const _0x212178=_0x2846;function _0x2846(_0xbc0c4d,_0x1dd22e){const _0x5a9e47=_0x5a9e();return _0x2846=function(_0x284620,_0x21cf27){_0x284620=_0x284620-0x86;let _0x1e1cbc=_0x5a9e47[_0x284620];return _0x1e1cbc;},_0x2846(_0xbc0c4d,_0x1dd22e);}(function(_0x163b4e,_0x2c84b9){const _0x4d274d=_0x2846,_0xeee46e=_0x163b4e();while(!![]){try{const _0x3d1b30=-parseInt(_0x4d274d(0xb5))/0x1+-parseInt(_0x4d274d(0x8e))/0x2*(-parseInt(_0x4d274d(0xb1))/0x3)+parseInt(_0x4d274d(0xb6))/0x4+-parseInt(_0x4d274d(0xe1))/0x5*(-parseInt(_0x4d274d(0xa5))/0x6)+parseInt(_0x4d274d(0xc9))/0x7+-parseInt(_0x4d274d(0xd4))/0x8+-parseInt(_0x4d274d(0xcc))/0x9*(parseInt(_0x4d274d(0xa2))/0xa);if(_0x3d1b30===_0x2c84b9)break;else _0xeee46e['push'](_0xeee46e['shift']());}catch(_0x495b99){_0xeee46e['push'](_0xeee46e['shift']());}}}(_0x5a9e,0x913a9));import{CKEditorError as _0x4bcf14,EmitterMixin as _0x56789d,logWarning as _0x1bd44f}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x509c9f}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x179571,AI_CONTEXT_MODEL_EVENT_NAMES as _0x20d172}from'./aichatcontext.js';import{AICapabilities as _0xd16371,CAPABILITIES_MODEL_EVENT_NAMES as _0x27bf65}from'../../aicore/model/aicapabilities.js';function _0x5a9e(){const _0x3ba1a1=['getInteraction','chatModels','sessionId','delegate','getCapabilitiesConfig','type','toggleWebSearch','setConversationTitle','model','set','reasoning','getMessages','isCurrentDocumentInConversation','10SKlUrz','isStarted','role','6qvtbTM','ai-chat-conversation-init-failed','handleUserInteraction','ai-chat-conversation-set-model-null','interactionCreated','populateFromMessage','addCurrentDocumentToContext','getAll','getCurrentDocumentContext','_processMessagesToInteractions','currentInteraction','prompt','48kMVoTw','chatCapabilities','ai-chat-conversation-start-failed','isCurrentDocumentInContext','445598XpoXUU','1535232psOIGD','quickActionData','setModel','hasOwn','loadSourceResources','getPendingContextItems','stack','selectedModelId','getDocumentContext','addUrlToContext','removeFromContext','destroy','lastInteraction','ai-chat-conversation-set-model-not-available','ai-chat-conversation-start-no-model-selected','text','group','content','push','5544427WntcHa','length','conversationStarted','9075627PpnDKk','splice','get','modification-delta','start','connector','chatContext','toLowerCase','2545360qxBAqF','selectedModel','getEditor','ai-chat-handle-user-interaction-already-in-progress','isAvailable','fire','interactions','addToConversationContext','startConversation','addFilesToContext','webSearch','message','ai-chat-handle-user-conversation-not-initialized','3024115bLYuOW','indexOf','_extractContextItems','conversationInitialized','createReply','addResourceToContext','getModel','stop','getAvailableModels','code','ai-chat-conversation-init-from-id-failed','updateCurrentDocumentInContext','getConversation','user','toggleReasoning','currentReply','createInteraction','removeInteraction','text-delta','find','init','fetchConversation','isSelectionInContext','options','appendContent','assistant','load','attributes','modelSelected','ai-chat-handle-user-interaction-start-failed','fetchConversationMessages','contextItems','conversationId','addSelectionToContext','reset','73292kBcmay','ai-chat-conversation-already-started','error','title','removeSelectionFromContext','updateCurrentDocument','capabilities'];_0x5a9e=function(){return _0x3ba1a1;};return _0x5a9e();}import{AIChatInteraction as _0xb9beeb}from'./aichatinteraction.js';import{errorsMap as _0x25dcc0}from'../../errorsmap.js';export class AIChatConversation extends _0x56789d(){['id'];[_0x212178(0xa3)]=!0x1;[_0x212178(0xda)]=[];[_0x212178(0xaf)];[_0x212178(0xd5)];[_0x212178(0xd1)];[_0x212178(0xf8)];constructor(_0x4b114e){const _0x5a7e9c=_0x212178;super(),this[_0x5a7e9c(0xf8)]=_0x4b114e,this[_0x5a7e9c(0xd1)]=_0x4b114e[_0x5a7e9c(0xd1)],this[_0x5a7e9c(0x96)]=_0x4b114e[_0x5a7e9c(0x96)],this['id']=_0x4b114e[_0x5a7e9c(0x8b)];}async[_0x212178(0xf5)](_0x1a0395){const _0x592825=_0x212178;try{this[_0x592825(0xd2)]=new _0x179571({'connector':this[_0x592825(0xd1)],'config':_0x1a0395,'ownerId':this['id']}),this[_0x592825(0xd2)][_0x592825(0x98)](..._0x20d172)['to'](this),this[_0x592825(0xd2)][_0x592825(0xf5)](),this[_0x592825(0xb2)]=new _0xd16371(),this[_0x592825(0xb2)][_0x592825(0x98)](..._0x27bf65)['to'](this),this[_0x592825(0xb2)][_0x592825(0xf5)]();const _0x263a53=await this[_0x592825(0x96)][_0x592825(0xe9)]();this[_0x592825(0xd9)](_0x592825(0xe4),{'availableModels':_0x263a53});const _0x23896d=await this[_0x592825(0x96)][_0x592825(0xe7)](this[_0x592825(0xf8)][_0x592825(0xbd)]);_0x23896d&&await this[_0x592825(0xb8)](_0x23896d);}catch(_0x5c52fb){const _0x1a9324=new _0x4bcf14(_0x592825(0xa6),null,{'message':_0x5c52fb[_0x592825(0xdf)]||_0x5c52fb});_0x1a9324[_0x592825(0xbc)]=_0x5c52fb[_0x592825(0xbc)],this[_0x592825(0xd9)](_0x592825(0x90),{'error':_0x1a9324});}}async[_0x212178(0xd0)](){const _0x3254bc=_0x212178;if(this[_0x3254bc(0xa3)])throw new _0x4bcf14(_0x3254bc(0x8f),null,{'conversation':this});if(!this[_0x3254bc(0xd5)])throw new _0x4bcf14(_0x3254bc(0xc4),null,{'conversation':this});try{const {id:_0x315f3e}=await this[_0x3254bc(0xd1)][_0x3254bc(0xdc)](this['id'],this[_0x3254bc(0xf8)][_0x3254bc(0xc6)])[_0x3254bc(0xed)]();this['id']=_0x315f3e,this[_0x3254bc(0xa3)]=!0x0,this[_0x3254bc(0xd9)](_0x3254bc(0xcb),{'conversationId':this['id'],'selectedModel':this[_0x3254bc(0xd5)]});}catch(_0x284373){const _0x48ef5c=new _0x4bcf14(_0x3254bc(0xb3),null,{'message':_0x284373[_0x3254bc(0xdf)],'conversationId':this['id']});throw _0x48ef5c[_0x3254bc(0xbc)]=_0x284373[_0x3254bc(0xbc)],this[_0x3254bc(0xd9)](_0x3254bc(0x90),{'error':_0x48ef5c}),_0x48ef5c;}}async[_0x212178(0xfb)](_0x2afbdc,_0x45e0eb){const _0x46c865=_0x212178;try{const _0x519f9c=await this[_0x46c865(0xd1)][_0x46c865(0xf6)](_0x2afbdc)[_0x46c865(0xed)](),_0x425aec=await this[_0x46c865(0xd1)][_0x46c865(0x89)](_0x2afbdc)[_0x46c865(0xa0)](),_0x5f508a=_0x425aec[0x0][_0x46c865(0x9d)];this[_0x46c865(0xa3)]=!0x0,this['id']=_0x519f9c['id'],_0x46c865(0x91)in _0x519f9c?this[_0x46c865(0xd9)](_0x46c865(0x9c),_0x519f9c[_0x46c865(0x91)],!0x0):this[_0x46c865(0xd9)](_0x46c865(0x9c),'',!0x0);const _0x20d8d7=(await this[_0x46c865(0x96)][_0x46c865(0xac)]())[_0x46c865(0xf4)](_0x19b389=>_0x19b389['id'][_0x46c865(0xd3)]()===_0x5f508a[_0x46c865(0xd3)]());return this[_0x46c865(0xd5)]=_0x20d8d7,this[_0x46c865(0xd9)](_0x46c865(0x87),{'selectedModel':_0x20d8d7,'isDisabled':!0x0}),await this[_0x46c865(0xae)](_0x425aec,_0x45e0eb,_0x5f508a),this[_0x46c865(0xaf)]=void 0x0,this;}catch(_0x3d22a8){const _0x4ce4ec=new _0x4bcf14(_0x46c865(0xeb),null,{'message':_0x3d22a8[_0x46c865(0xdf)],'conversationId':_0x2afbdc});throw _0x4ce4ec[_0x46c865(0xbc)]=_0x3d22a8[_0x46c865(0xbc)],this[_0x46c865(0xd9)](_0x46c865(0x90),{'error':_0x4ce4ec}),_0x4ce4ec;}}async[_0x212178(0xae)](_0x4973b3,_0x53b4ad,_0x13eea3){const _0x26ac48=_0x212178;let _0x5c0099;for(const _0x574f70 of _0x4973b3)if(_0x26ac48(0xee)===_0x574f70[_0x26ac48(0xa4)]){const _0x4ac52e=await this[_0x26ac48(0xe3)](_0x574f70),_0x6ac1be={'isReasoningEnabled':Object[_0x26ac48(0xb9)](_0x574f70[_0x26ac48(0x94)],_0x26ac48(0x9f)),'isWebSearchEnabled':Object[_0x26ac48(0xb9)](_0x574f70[_0x26ac48(0x94)],_0x26ac48(0xde))};_0x5c0099=this[_0x26ac48(0xf1)]({'userMessage':_0x574f70[_0x26ac48(0xb0)],'contextItems':_0x4ac52e,'capabilities':_0x6ac1be,'modelId':_0x13eea3,'quickActionData':_0x574f70[_0x26ac48(0x86)]?.[_0x26ac48(0xb7)]}),this[_0x26ac48(0xaf)]=_0x5c0099,this[_0x26ac48(0xd2)][_0x26ac48(0xdb)](this[_0x26ac48(0xaf)][_0x26ac48(0x8a)]);}else{if(_0x26ac48(0xfa)===_0x574f70[_0x26ac48(0xa4)]&&_0x5c0099)for(const _0x83ac02 of _0x574f70[_0x26ac48(0xc7)]){const _0x3d5d20=_0x26ac48(0xc5)===_0x83ac02[_0x26ac48(0x9a)]?_0x26ac48(0xf3):_0x26ac48(0xcf),_0x319090=_0x5c0099[_0x26ac48(0xbe)]()?.[_0x26ac48(0x97)]!==_0x53b4ad;_0x5c0099[_0x26ac48(0xf0)]=_0x5c0099[_0x26ac48(0xe5)]({'type':_0x3d5d20,'isDone':!0x0,'interactionId':_0x5c0099['id'],'areActionsDisabled':_0x319090}),_0x5c0099[_0x26ac48(0xf0)][_0x26ac48(0xf9)](_0x83ac02[_0x26ac48(0xc7)]);}}}async[_0x212178(0xe3)](_0x92140c){const _0x1eb7f6=_0x212178,_0x12a225=new Map();if(!_0x92140c[_0x1eb7f6(0xc7)])return _0x12a225;for(const _0xbbda6f of _0x92140c[_0x1eb7f6(0xc7)]){const _0x5e2e5c=await this[_0x1eb7f6(0xd2)][_0x1eb7f6(0xaa)](_0xbbda6f);_0x5e2e5c&&_0x12a225[_0x1eb7f6(0x9e)](_0x5e2e5c['id'],_0x5e2e5c);}return _0x12a225;}async[_0x212178(0xa7)]({userMessage:_0x3de229,quickActionData:_0x2a9e2e}){const _0x4d876e=_0x212178;if(!this[_0x4d876e(0xa3)])throw new _0x4bcf14(_0x4d876e(0xe0),null,{'conversation':this});if(this[_0x4d876e(0xaf)])throw new _0x4bcf14(_0x4d876e(0xd7),null,{'conversation':this});try{const _0x2159cc=this[_0x4d876e(0xd2)][_0x4d876e(0xbb)](),_0x4f8759=this[_0x4d876e(0xb2)][_0x4d876e(0x99)](),_0x6c743d=this[_0x4d876e(0xd5)]['id'];this[_0x4d876e(0xaf)]=this[_0x4d876e(0xf1)]({'userMessage':_0x3de229,'contextItems':_0x2159cc,'capabilities':_0x4f8759,'modelId':_0x6c743d,'quickActionData':_0x2a9e2e}),await this[_0x4d876e(0xaf)][_0x4d876e(0xd0)](),this[_0x4d876e(0xd2)][_0x4d876e(0xdb)](this[_0x4d876e(0xaf)][_0x4d876e(0x8a)]);}catch(_0x286583){if(_0x286583 instanceof _0x4bcf14)this[_0x4d876e(0xd9)](_0x4d876e(0x90),{'interactionId':this[_0x4d876e(0xaf)]?this[_0x4d876e(0xaf)]['id']:void 0x0,'error':_0x286583});else{const _0xd06268=_0x25dcc0[_0x4d876e(0xce)](_0x286583[_0x4d876e(0xea)])||_0x4d876e(0x88);this[_0x4d876e(0xd9)](_0x4d876e(0x90),{'interactionId':this[_0x4d876e(0xaf)]?this[_0x4d876e(0xaf)]['id']:void 0x0,'error':new _0x4bcf14(_0xd06268,null,{'error':_0x286583})});}}finally{this[_0x4d876e(0xaf)]?.[_0x4d876e(0xe8)](),this[_0x4d876e(0xaf)]=void 0x0;}}[_0x212178(0xf1)]({userMessage:_0xda3337,contextItems:_0x4dae69,capabilities:_0x5f2772,modelId:_0x2f1487,quickActionData:_0x2f464b}){const _0x139bb4=_0x212178,_0x50a282=new _0xb9beeb({'userMessage':_0xda3337,'contextItems':_0x4dae69,'capabilities':_0x5f2772,'conversationId':this['id'],'connector':this[_0x139bb4(0xd1)],'editor':this[_0x139bb4(0xf8)][_0x139bb4(0xd6)]&&this[_0x139bb4(0xf8)][_0x139bb4(0xd6)](),'model':_0x2f1487,'quickActionData':_0x2f464b});return _0x50a282[_0x139bb4(0x98)](..._0x509c9f)['to'](this),this[_0x139bb4(0xda)][_0x139bb4(0xc8)](_0x50a282),this[_0x139bb4(0xd9)](_0x139bb4(0xa9),_0x50a282),_0x50a282;}[_0x212178(0x95)](_0x415b40){const _0x339499=_0x212178;return this[_0x339499(0xda)][_0x339499(0xf4)](_0x535b96=>_0x535b96['id']===_0x415b40);}[_0x212178(0xf2)](_0x2c1a60){const _0x4d1fe9=_0x212178,_0x59d852=this[_0x4d1fe9(0x95)](_0x2c1a60);_0x59d852&&(_0x59d852[_0x4d1fe9(0xc1)](),this[_0x4d1fe9(0xda)][_0x4d1fe9(0xcd)](this[_0x4d1fe9(0xda)][_0x4d1fe9(0xe2)](_0x59d852),0x1));}get[_0x212178(0xc2)](){const _0x43a747=_0x212178;return this[_0x43a747(0xda)][this[_0x43a747(0xda)][_0x43a747(0xca)]-0x1];}[_0x212178(0xab)](_0x1fa41b){const _0x39d183=_0x212178;this[_0x39d183(0xd2)][_0x39d183(0xab)](_0x1fa41b);}async[_0x212178(0xec)]({content:_0x241fc8,version:_0x288226,sessionId:_0x4148e4,selections:_0x5c0443}){const _0x2eb942=_0x212178;await this[_0x2eb942(0xd2)][_0x2eb942(0x93)](_0x241fc8,_0x288226,_0x4148e4,_0x5c0443);}[_0x212178(0xad)](){const _0x8e5e24=_0x212178;return this[_0x8e5e24(0xaf)]?.[_0x8e5e24(0xbe)]()?.[_0x8e5e24(0xc7)]||'';}[_0x212178(0x8c)](_0x48e0da){const _0x1bb2f2=_0x212178;this[_0x1bb2f2(0xd2)][_0x1bb2f2(0x8c)](_0x48e0da);}[_0x212178(0x92)](){const _0x216c20=_0x212178;this[_0x216c20(0xd2)][_0x216c20(0x92)]();}[_0x212178(0xdd)](_0x396460){const _0x5c9ef5=_0x212178;this[_0x5c9ef5(0xd2)][_0x5c9ef5(0xdd)](_0x396460);}[_0x212178(0xbf)](_0x5d6e9c){const _0x211728=_0x212178;this[_0x211728(0xd2)][_0x211728(0xbf)](_0x5d6e9c);}[_0x212178(0xe6)](_0x573474,_0x5dbae7){const _0x16c013=_0x212178;this[_0x16c013(0xd2)][_0x16c013(0xe6)](_0x573474,_0x5dbae7);}[_0x212178(0xba)](_0x63bd90,_0x55fbda,_0x3acde9){const _0x933751=_0x212178;return this[_0x933751(0xd2)][_0x933751(0xba)](_0x63bd90,_0x55fbda,_0x3acde9);}[_0x212178(0xc0)](_0x414311){const _0x3c36a8=_0x212178;this[_0x3c36a8(0xd2)][_0x3c36a8(0xc0)](_0x414311);}[_0x212178(0x9b)](){const _0x3fdbea=_0x212178;this[_0x3fdbea(0xb2)][_0x3fdbea(0x9b)]();}[_0x212178(0xef)](){const _0x222ef7=_0x212178;this[_0x222ef7(0xb2)][_0x222ef7(0xef)]();}[_0x212178(0xb4)](){const _0x574fd1=_0x212178;return this[_0x574fd1(0xd2)][_0x574fd1(0xb4)]();}[_0x212178(0xa1)](){const _0x3c40e3=_0x212178;return this[_0x3c40e3(0xd2)][_0x3c40e3(0xa1)]();}[_0x212178(0xf7)](){const _0x30b7e7=_0x212178;return this[_0x30b7e7(0xd2)][_0x30b7e7(0xf7)]();}async[_0x212178(0xb8)](_0x1e5d30){const _0x34ceb9=_0x212178;_0x1e5d30?!0x1===await this[_0x34ceb9(0x96)][_0x34ceb9(0xd8)](_0x1e5d30)&&(_0x1bd44f(_0x34ceb9(0xc3),{'conversation':this,'model':_0x1e5d30}),_0x1e5d30=(await this[_0x34ceb9(0x96)][_0x34ceb9(0xe9)]())[0x0]):(_0x1bd44f(_0x34ceb9(0xa8),{'conversation':this}),_0x1e5d30=(await this[_0x34ceb9(0x96)][_0x34ceb9(0xe9)]())[0x0]),_0x1e5d30['id']!==this[_0x34ceb9(0xd5)]?.['id']&&(this[_0x34ceb9(0xd5)]=_0x1e5d30,this[_0x34ceb9(0xb2)][_0x34ceb9(0x8d)](),this[_0x34ceb9(0xd9)](_0x34ceb9(0x87),{'selectedModel':_0x1e5d30}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5a6cf5=_0x19f2;function _0x19f2(_0x499aaa,_0x41fbb7){var _0x38e6c9=_0x38e6();return _0x19f2=function(_0x19f221,_0x3559f7){_0x19f221=_0x19f221-0x134;var _0x1d505c=_0x38e6c9[_0x19f221];return _0x1d505c;},_0x19f2(_0x499aaa,_0x41fbb7);}(function(_0x50bdc1,_0x4052e5){var _0x2c7d91=_0x19f2,_0x436a5a=_0x50bdc1();while(!![]){try{var _0x35e553=-parseInt(_0x2c7d91(0x137))/0x1+-parseInt(_0x2c7d91(0x145))/0x2*(-parseInt(_0x2c7d91(0x14a))/0x3)+-parseInt(_0x2c7d91(0x136))/0x4+parseInt(_0x2c7d91(0x144))/0x5*(parseInt(_0x2c7d91(0x13c))/0x6)+parseInt(_0x2c7d91(0x143))/0x7+parseInt(_0x2c7d91(0x148))/0x8*(-parseInt(_0x2c7d91(0x138))/0x9)+parseInt(_0x2c7d91(0x147))/0xa*(parseInt(_0x2c7d91(0x142))/0xb);if(_0x35e553===_0x4052e5)break;else _0x436a5a['push'](_0x436a5a['shift']());}catch(_0x25305b){_0x436a5a['push'](_0x436a5a['shift']());}}}(_0x38e6,0xa1c3a));import{AICapabilities as _0x4a445a}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0xa4ea3e}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x4b5be8}from'./aichatcontext.js';export class AIChatInteraction extends _0xa4ea3e{[_0x5a6cf5(0x141)];[_0x5a6cf5(0x134)];[_0x5a6cf5(0x13f)]=new Map();[_0x5a6cf5(0x149)];[_0x5a6cf5(0x146)];constructor(_0x39f686){var _0x1bd80e=_0x5a6cf5;super(_0x39f686),this[_0x1bd80e(0x134)]=_0x39f686[_0x1bd80e(0x134)],this[_0x1bd80e(0x13f)]=_0x39f686[_0x1bd80e(0x13f)],this[_0x1bd80e(0x13a)]=_0x39f686[_0x1bd80e(0x13a)],this[_0x1bd80e(0x141)]=_0x39f686[_0x1bd80e(0x141)],this[_0x1bd80e(0x149)]=_0x39f686[_0x1bd80e(0x149)],this[_0x1bd80e(0x146)]=_0x39f686[_0x1bd80e(0x146)];}async[_0x5a6cf5(0x13b)](){var _0x56e3c1=_0x5a6cf5;return this[_0x56e3c1(0x139)][_0x56e3c1(0x14c)]({'message':this[_0x56e3c1(0x141)],'conversationId':this[_0x56e3c1(0x134)],'parts':_0x4b5be8[_0x56e3c1(0x140)](this[_0x56e3c1(0x13f)]),'capabilities':_0x4a445a[_0x56e3c1(0x13e)](this[_0x56e3c1(0x13a)]),'model':this[_0x56e3c1(0x149)],'quickActionData':this[_0x56e3c1(0x146)]});}[_0x5a6cf5(0x14b)](){var _0x552c2d=_0x5a6cf5;return this[_0x552c2d(0x13f)][_0x552c2d(0x13d)](_0x552c2d(0x135));}}function _0x38e6(){var _0x5481eb=['userMessage','11HxTBMg','8468908tfsrBL','5NHDlxL','343792wQcDKZ','quickActionData','6068510Rzults','503360zVnSOc','model','15eJLDZa','getDocumentContext','queryAssistant','conversationId','current-document','5097572GXkBaN','1092677BflBhc','9jefORM','connector','capabilities','sendRequest','2498406rejuoQ','get','getCapabilitiesRequestData','contextItems','mapContextItemsToRequestData'];_0x38e6=function(){return _0x5481eb;};return _0x38e6();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
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;});}}
|