@ckeditor/ckeditor5-ai 47.7.2-alpha.0 → 47.7.2
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.js +5 -5
- 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/awstextadapter.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- 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/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/showaiassistantcommand.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatballoon.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/ui/aichatballoonview.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/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/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.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/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.js +1 -1
- package/src/aichatshortcuts/aichatshortcuts.js +1 -1
- package/src/aichatshortcuts/ui/aichatshortcutsview.js +1 -1
- package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.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/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/aisuggestioncontentpartheaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.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/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.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/balloon/aiactionsballoonview.js +1 -1
- package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
- package/src/aireviewcore/aireviewcorecontroller.js +1 -1
- package/src/aireviewcore/aireviewcoreediting.js +1 -1
- package/src/aireviewcore/aireviewcoreui.js +1 -1
- package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorepromptinputview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorereviewcompletedview.js +1 -1
- package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
- package/src/aireviewcore/ui/form/aireviewcoreformmanager.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitranslate/aitranslate.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x12f486=_0x3a9b;function _0x5ea4(){const _0x6daf08=['ai-chat-context-file-too-large','like','setIsMaximized','getConversation','showNext','executeCustomItemCallback','_bodyCollection','getDocumentContext','AIChatController','selection','get','sourceId','toggleReasoning','outdated','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','node','activeConversation','ai.models.defaultModelId','changeGroups','closeSourceResourceBalloon','alignToTop','AI_CHAT_CONTEXT_INVALID_DATA','resize','stop','undo','addSelectionToChatContext','toViewRange','startInteraction','addFeedItemAIReply','toggleLoadingSkeleton','slice','finishInteraction','ai-request-aborted','AI_CHAT_GENERIC_ERROR','focusPromptInput','resizedTabs','addFileToContext','ai-chat-resource-load-failed','_aiChatBalloonShowDiff','getInteractionAndReplyById','1546761eRHUTC','unshift','contextItemLoadingEnded','createPositionAt','scrollFeedToSuggestion','removeFeedInteraction','removeSelectionFromContext','ready','replyCreated','AITabs','sendMessage','applySuggestion','_aiChatBalloon','_logError','viewRangeToDom','showDiff','_updateReplyContent','current-document','ai-conversation-','nextSibling','reasoningStarted','end','change','load','isInContext','previous','partIndex','Showing\x20conversation\x20history...','detachFromDom','sendUserMessage','loadConversation','createReply','getPath','getDiff','_registerToolDataCallback','Liked\x20response','addResourceToContext','AI_CHAT_RESOURCE_LOAD_FAILED','attachToDom','enableControls','split','setConversationTitle','getAttribute','isOfficialPlugin','source','removeSelectionFromChatContext','_flushLastInteractionUI','startConversation','_openBalloonFor','addFeedItemAISuggestion','delegate','messageId','activateTab','AI_CHAT_CONTEXT_FILE_TOO_LARGE','getChild','_applyOperationsAsSuggestions','getSelectionText','addFilesToContext','dialogClosed','addFeedItemError','lastInteraction','_aiConnector','findIndex','isModelAvailable','isCurrentDocumentInContext','updateFeedItemAIReplyContent','startAutoScroll','updateFeedItemAIReplySources','_createFromRanges','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','webSearchFinished','AIChatUI','toolDataReceived','hasChanges','ai.chat.initialConversation','mouseLeaveSuggestion','createPositionFromPath','setFeedItemRenderingStrategy','find','sources','rootName','ai-chat-url-upload-failed','toggleSuggestionDisplayMode','new','maxOffset','close','query','_applySuggestion','main','_setIsMaximized','lastCreated','cloneNode','TrackChangesEditing','delete','reasoningFinished','streaming','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','isUploadInProgress','model','setIsUploadInProgress','root','Undo','24bXLKoC','resourceId','open','ai-chat-invalid-request','_aiChatModels','pluginName','ai-chat-source-resources-load-failed','clearConversationContextUI','_getDocumentRangeForReplyChanges','removeFromContext','addUrlToContext','redo','$graveyard','index','context','ai-chat-controller-mouse-over','listenTo','getChildAtOffset','documentContextContent','dislike','accepted','set','getFirstRange','getReply','ai-chat-conversation-init-failed','ai-chat-context-invalid-data','AIConnector','includes','callback','594750ugEPbv','ai-chat-context-form-data-size-limits-exceeded','content','type','AI_CHAT_UNABLE_TO_START_CONVERSATION','Disliked\x20response','data-id','clearLoadingMessage','webSearchStarted','version','replyChangeGroupStateUpdated','data','resource','ai-chat-missing-channel-id','capabilitiesUpdated','isLoading','ai-chat-context-unsupported-type','createdAt','updateConversationTitle','isStarted','AIChatBalloon','setSelectedModel','map','destroy','addOperation','replyContentUpdated','updateFeedItemAIReplySuggestionContent','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','populateSourceResourceBalloon','getConversations','isDocumentOperation','_scrollToSuggestionRange','addContextOptionsChanged','toString','handleRemovedConversation','revert','message','interactionId','addFeedItemUserMessage','path','ai-chat-context-unsupported-file-type','getTransformedByOperation','requires','getChildren','7zkYjmX','afterInit','parse','clearPendingContextUI','batch','addCurrentDocumentToChatContext','showFakeVisualSelection','howMany','updateResourceState','resetMessageInput','_toggleReasoning','error','_stopLastInteraction','setLoadingMessage','_removeFromContext','updateContent','next','setContextItemLoading','resetConversationTitle','state','log','loadSourceResources','addCurrentDocumentToContext','_getPresentableSiblingContentPartIndex','history','showPrevious','getAll','indexOf','AIEditing','_getAIChatInteractionAPI','interactionCreated','replyId','collaboration.channelId','document','getInteraction','ai.chat.context','_integrateEditor','done','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','resourceStateChanged','commands','modelSelected','length','setFeedItemAIReplySuggestionPartActive','range','sessionId','addSelectionToContext','text','resetReasoningState','_updateRatings','remove','marker','239zMJRgb','plugins','ai-no-track-changes','upsertAIChatRating','uploadProgressChanged','AI_CHAT_ABORTED_MESSAGE','setModel','add','mapper','setAddContextOptions','aiChatBalloon','resources','start','_startConversationSafely','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','ai-chat-conversation-start-failed','has','uiId','hideFakeVisualSelection','selectedModel','disableControls','stopInteraction','showChangeInText','areActionsDisabled','2156EDxrwQ','contextItemAdded','prepareLoadingMessage','applyOperation','_getLastCreatedConversationId','interactionFinished','addFeedItemCustomElement','currentReply','toggleWebSearch','ai-chat-context-file-too-many-pages','insertSuggestion','mouseOverSuggestion','3402905qzeBes','domConverter','init','4jllmFr','DocumentCompare','isPremiumPlugin','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','ai-chat-file-upload-failed','indexes','_batchToChanges','sourceResourcesLoaded','updateFeedItemAIReplySuggestionPartState','forEach','locale','editing','TrackChanges','bind','children','modification','1074681YrzfKH','getContentParts','selectModel','addFeedItemStaticMessage','config','addFeedInteractionHeader','1406226BmNIih','addDocumentToContext','setChangeGroupState','createConversation','ai.models','abortPromptStream','getDocumentData','isDisabled','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','AI_CHAT_INVALID_REQUEST','isCurrentDocumentInConversation','updateCapabilities','_getUserPresentableContentPartDocumentRange','anchorId','_currentPreviewedChangeGroup','from','_rejectSuggestion','fetchConversation','push','contextSent','AI_BALLOON_HEADER_TITLE','resetWebSearchState','getOperations','conversationInitialized','rejectSuggestion','getGroupId','_insertSuggestion','_toggleWebSearch','chat','_handleStartConversation','createRange','changes','startsWith','addContextItem','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','options','_aiChatUi','_aiEditing','updateCurrentDocumentInContext','2654290xvabfY','AI_CHAT_UNTITLED_CONVERSATION','editors','contextItem','handleUserInteraction','replies','ai-chat-controller-no-active-conversation','setState','uid','fetchConversations','baseVersion','contextItems','getRoot','view','_showConversationHistory','resizeTabs','pending','ai-chat-conversation-not-found','setConversationContext','interactionStarted','_handleUIUserMessage','removed','rejected','removeContextItem','filter','sourcePosition','interactionDestroyed','contextItemRemoved','static','getRanges'];_0x5ea4=function(){return _0x6daf08;};return _0x5ea4();}(function(_0x1cd78a,_0x3df4ce){const _0x443f11=_0x3a9b,_0x1dd61c=_0x1cd78a();while(!![]){try{const _0x49b2f8=-parseInt(_0x443f11(0x8e))/0x1*(-parseInt(_0x443f11(0xa6))/0x2)+-parseInt(_0x443f11(0x138))/0x3*(parseInt(_0x443f11(0xb5))/0x4)+-parseInt(_0x443f11(0x1bb))/0x5+parseInt(_0x443f11(0xcb))/0x6*(parseInt(_0x443f11(0x1e7))/0x7)+-parseInt(_0x443f11(0x19e))/0x8*(-parseInt(_0x443f11(0xc5))/0x9)+-parseInt(_0x443f11(0xf2))/0xa+parseInt(_0x443f11(0xb2))/0xb;if(_0x49b2f8===_0x3df4ce)break;else _0x1dd61c['push'](_0x1dd61c['shift']());}catch(_0x291744){_0x1dd61c['push'](_0x1dd61c['shift']());}}}(_0x5ea4,0x3f62d));import{ContextPlugin as _0x1bba01,Editor as _0x1ab0f4}from'ckeditor5/src/core.js';import{BodyCollection as _0x438b43}from'ckeditor5/src/ui.js';function _0x3a9b(_0x3e25e9,_0x13cffa){const _0x5ea4d7=_0x5ea4();return _0x3a9b=function(_0x3a9be2,_0x2df47a){_0x3a9be2=_0x3a9be2-0x6b;let _0x19568e=_0x5ea4d7[_0x3a9be2];return _0x19568e;},_0x3a9b(_0x3e25e9,_0x13cffa);}import{CKEditorError as _0x4b2b76,logError as _0x5319e8,scrollViewportToShowTarget as _0x343c18,uid as _0x14d190}from'ckeditor5/src/utils.js';import{AIConnector as _0x4a9833}from'../aicore/aiconnector.js';import{AITabs as _0x575159}from'../aitabs/aitabs.js';import{AIChatConversation as _0x2fc456}from'./model/aichatconversation.js';import{getTranslation as _0x541ff7}from'../aicore/utils/common-translations.js';import{AIModels as _0x1bdab5}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x4b9b70}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x41a947,DATA_ID_MODEL_ATTRIBUTE as _0xdc6d4f}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x366e90,getOperationsFromReply as _0x58de2c}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x52bea3,getMinimalSelection as _0x572c78}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x1ca952,_DetachOperation as _0x1604bc}from'ckeditor5/src/engine.js';import{findOne as _0xd10b12,getAttribute as _0xa01188,serialize as _0x52f5de,Document as _0x8e65d3,findByAttribute as _0x2b1db6}from'../aicore/utils/htmlparser.js';export class AIChatController extends _0x1bba01{[_0x12f486(0xf0)];[_0x12f486(0x175)];[_0x12f486(0xef)];[_0x12f486(0x1a2)];[_0x12f486(0x144)];[_0x12f486(0xbb)]=new Map();[_0x12f486(0xd9)]=null;[_0x12f486(0x116)];static get[_0x12f486(0x1e5)](){return[_0x4a9833,_0x41a947];}static get[_0x12f486(0x1a3)](){const _0x460de2=_0x12f486;return _0x460de2(0x118);}static get[_0x12f486(0x163)](){return!0x0;}static get[_0x12f486(0xb7)](){return!0x0;}[_0x12f486(0xb4)](){const _0x1dc127=_0x12f486;this[_0x1dc127(0x116)]=new _0x438b43(this[_0x1dc127(0x1ac)][_0x1dc127(0xbf)]),this[_0x1dc127(0x116)][_0x1dc127(0x15e)](),this[_0x1dc127(0x175)]=this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x11a)](_0x1dc127(0x1b8)),this[_0x1dc127(0xef)]=this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x11a)](_0x1dc127(0x17f)),this[_0x1dc127(0xf0)]=this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x11a)](_0x1dc127(0x76)),this[_0x1dc127(0x1a2)]=new _0x1bdab5({'connector':this[_0x1dc127(0x175)],'config':this[_0x1dc127(0x1ac)][_0x1dc127(0xc9)][_0x1dc127(0x11a)](_0x1dc127(0xcf)),'locale':this[_0x1dc127(0x1ac)][_0x1dc127(0xbf)]});const _0xd54ed3=this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x11a)](_0x1dc127(0x141));this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x167),()=>{const _0x25692d=_0x1dc127;this[_0x25692d(0x9b)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x155),(_0x87ccbc,_0x41cf6a)=>{const _0xdffe61=_0x1dc127;this[_0xdffe61(0x106)]({'userMessage':_0x41cf6a});}),this[_0x1dc127(0x1ae)](_0xd54ed3,_0x1dc127(0x133),(_0x3ea742,_0x45432b)=>{const _0x39f165=_0x1dc127;this[_0x39f165(0x191)](_0x45432b);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x101),()=>{const _0x48b26c=_0x1dc127;_0xd54ed3[_0x48b26c(0x126)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xd0),async()=>{const _0x3b7fde=_0x1dc127;await this[_0x3b7fde(0x1f3)](),await this[_0x3b7fde(0x166)](),this[_0x3b7fde(0x165)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xcc),()=>{const _0x4f47ed=_0x1dc127;this[_0x4f47ed(0x1ec)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x134),(_0x3aa7d9,_0x1b7d3d)=>{const _0x3f6410=_0x1dc127;this[_0x3f6410(0x120)]?.[_0x3f6410(0x171)](Array[_0x3f6410(0xda)](_0x1b7d3d));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x1a8),(_0x1b93e9,_0x51ecd9)=>{const _0xcad80=_0x1dc127;this[_0xcad80(0x120)]?.[_0xcad80(0x1a8)](_0x51ecd9);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x115),(_0xe50526,_0x9a4076)=>{const _0x4c4d2e=_0x1dc127;_0x9a4076[_0x4c4d2e(0x1ba)](this[_0x4c4d2e(0x1ac)]);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x15c),(_0x37750d,_0x2ebabc)=>{const _0x1ad393=_0x1dc127;this[_0x1ad393(0x120)]?.[_0x1ad393(0x15c)](_0x2ebabc[_0x1ad393(0x164)],_0x2ebabc[_0x1ad393(0x1c7)]);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x109),(_0x42274a,_0x1a86f2)=>{const _0x4d5d83=_0x1dc127;this[_0x4d5d83(0x1f5)](_0x1a86f2);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x6f),(_0x4bf45b,_0x1e01b8)=>{const _0x28d97b=_0x1dc127;this[_0x28d97b(0x120)]?.[_0x28d97b(0x6f)](_0x1e01b8[_0x28d97b(0x11b)],_0x1e01b8[_0x28d97b(0x18e)],_0x1e01b8[_0x28d97b(0xfa)]);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xae),()=>{const _0x499db6=_0x1dc127;this[_0x499db6(0xe6)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x11c),()=>{const _0x55d1fd=_0x1dc127;this[_0x55d1fd(0x1f1)]();}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xc7),(_0x2a7ddc,_0x1fe8c6)=>{const _0x222e01=_0x1dc127;this[_0x222e01(0x120)]?.[_0x222e01(0x94)](_0x1fe8c6);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x111),(_0x2b5f2b,{replyId:_0x427502})=>{const _0x24be12=_0x1dc127;console[_0x24be12(0x6e)](_0x24be12(0x15b),_0x427502);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x1b1),(_0xaa3829,{replyId:_0x348651})=>{const _0x3a4e1d=_0x1dc127;console[_0x3a4e1d(0x6e)](_0x3a4e1d(0x1c0),_0x348651);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xb0),(_0x339033,_0x52d437)=>{const _0x2f85e0=_0x1dc127;this[_0x2f85e0(0xe5)](_0x52d437);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xa4),(_0x253786,{replyId:_0x2dd668,partIndex:_0x5617ba})=>{const _0xf58846=_0x1dc127;this[_0xf58846(0x136)]=this[_0xf58846(0xef)][_0xf58846(0x147)],this[_0xf58846(0x168)](_0x2dd668,_0x5617ba);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xb1),(_0x2a5047,{replyId:_0x301d47,partIndex:_0x9d8eb0})=>{const _0x21d917=_0x1dc127,_0x3130a7=this[_0x21d917(0x1a6)](_0x301d47,_0x9d8eb0);_0x3130a7&&_0x21d917(0x1aa)!=_0x3130a7[_0x21d917(0x86)][_0x21d917(0x19c)][_0x21d917(0x188)]&&this[_0x21d917(0xf0)][_0x21d917(0x1ed)]([_0x3130a7[_0x21d917(0x86)]],_0x21d917(0x1ad));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x183),()=>{const _0x4aa01c=_0x1dc127;this[_0x4aa01c(0xf0)][_0x4aa01c(0xa0)](_0x4aa01c(0x1ad));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x143),(_0x5a3a3d,_0x3cf295)=>{const _0x5a199a=_0x1dc127;this[_0x5a199a(0xf0)][_0x5a199a(0xa0)](_0x5a199a(0x1ad)),this[_0x5a199a(0x18f)](_0x3cf295);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0x18a),async(_0x1b4c4f,{replyId:_0xc0cef0,showDiff:_0x1d7d37})=>{const _0xfd97ce=_0x1dc127,{reply:_0x579cc7}=this[_0xfd97ce(0x137)](_0xc0cef0),_0x289790=_0x579cc7[_0xfd97ce(0xc6)]({'showDiff':_0x1d7d37});await this[_0xfd97ce(0xef)][_0xfd97ce(0x1d5)]({'id':_0x579cc7['id'],'parts':_0x289790,'renderingStrategy':_0xfd97ce(0x10e)});}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0xef)],_0x1dc127(0xe3),(_0x20d6a8,{replyId:_0x579eb9,partIndex:_0x350b6f})=>{const _0x5180a5=_0x1dc127;this[_0x5180a5(0xdb)]({'replyId':_0x579eb9,'partIndex':_0x350b6f}),this[_0x5180a5(0xf0)][_0x5180a5(0xa0)](_0x5180a5(0x1ad));}),this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x9e)](_0x1dc127(0x1cf))&&(this[_0x1dc127(0x144)]=this[_0x1dc127(0x1ac)][_0x1dc127(0x8f)][_0x1dc127(0x11a)](_0x1dc127(0x1cf)),this[_0x1dc127(0x1b3)](_0x1dc127(0x136),!0x1),this[_0x1dc127(0x144)][_0x1dc127(0xc2)](_0x1dc127(0x147))['to'](this,_0x1dc127(0x136)),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0x18a),()=>{const _0x4dffca=_0x1dc127,{replyId:_0x1e6d45,partIndex:_0x9f1efe}=this[_0x4dffca(0xd9)];this[_0x4dffca(0x136)]=!this[_0x4dffca(0x136)];const {reply:_0x5bb99b}=this[_0x4dffca(0x137)](_0x1e6d45),_0x3b8a36=_0x5bb99b[_0x4dffca(0xc6)]({'showDiff':this[_0x4dffca(0x136)],'groupIndex':_0x9f1efe});this[_0x4dffca(0x144)][_0x4dffca(0x1f6)]({'part':_0x3b8a36[0x0],'renderingStrategy':_0x4dffca(0x10e),'keepErrors':!0x0});}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0x143),()=>{const _0x1a40db=_0x1dc127,{replyId:_0x478680,partIndex:_0x30e0f6}=this[_0x1a40db(0xd9)];this[_0x1a40db(0x18f)]({'replyId':_0x478680,'partIndex':_0x30e0f6}),this[_0x1a40db(0x144)][_0x1a40db(0xf9)](_0x1a40db(0x1b2));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0xb0),()=>{const _0x2edd63=_0x1dc127,{replyId:_0x787d15,partIndex:_0x5239ac}=this[_0x2edd63(0xd9)];this[_0x2edd63(0xe5)]({'replyId':_0x787d15,'partIndex':_0x5239ac}),this[_0x2edd63(0x144)][_0x2edd63(0xf9)](_0x2edd63(0x1b2));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0xe3),()=>{const _0x2fa1c2=_0x1dc127,{replyId:_0x304648,partIndex:_0x5e5d5f}=this[_0x2fa1c2(0xd9)];this[_0x2fa1c2(0xdb)]({'replyId':_0x304648,'partIndex':_0x5e5d5f}),this[_0x2fa1c2(0x144)][_0x2fa1c2(0xf9)](_0x2fa1c2(0x108));}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0x114),()=>{const _0x3712e0=_0x1dc127,{replyId:_0x1a3d70,partIndex:_0x4807b0}=this[_0x3712e0(0xd9)],_0x656dc2=this[_0x3712e0(0x71)](_0x1a3d70,_0x4807b0,_0x3712e0(0x1f7));null!==_0x656dc2&&this[_0x3712e0(0x168)](_0x1a3d70,_0x656dc2);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0x73),()=>{const _0xf290dc=_0x1dc127,{replyId:_0x37e3ec,partIndex:_0x19ce16}=this[_0xf290dc(0xd9)],_0xee9586=this[_0xf290dc(0x71)](_0x37e3ec,_0x19ce16,_0xf290dc(0x151));null!==_0xee9586&&this[_0xf290dc(0x168)](_0x37e3ec,_0xee9586);}),this[_0x1dc127(0x1ae)](this[_0x1dc127(0x144)],_0x1dc127(0x172),(_0x3306de,{id:_0x160b25})=>{const _0x168123=_0x1dc127;if(_0x168123(0x98)!==_0x160b25)return;const {replyId:_0x371ecb,partIndex:_0x277464}=this[_0x168123(0xd9)];this[_0x168123(0xd9)]=null,this[_0x168123(0xef)][_0x168123(0x85)]({'id':_0x371ecb,'index':_0x277464,'isActive':!0x1});}));}async[_0x12f486(0x1e8)](){const _0xff9820=_0x12f486;this[_0xff9820(0x1ac)]instanceof _0x1ab0f4?this[_0xff9820(0x7e)](this[_0xff9820(0x1ac)]):this[_0xff9820(0x1ae)](this[_0xff9820(0x1ac)][_0xff9820(0xf4)],_0xff9820(0x95),(_0x2402c7,_0x3dc412)=>{const _0x2da804=_0xff9820;_0x3dc412['on'](_0x2da804(0x13f),()=>{const _0x5206b6=_0x2da804;this[_0x5206b6(0x7e)](_0x3dc412);});});const _0x373747=this[_0xff9820(0x1ac)][_0xff9820(0xc9)][_0xff9820(0x11a)](_0xff9820(0x182));let _0x4b53eb=_0x373747;if(_0xff9820(0x192)!=_0x373747||(_0x4b53eb=await this[_0xff9820(0xaa)](),_0x4b53eb))return _0xff9820(0x18b)==_0x4b53eb?this[_0xff9820(0x9b)]():this[_0xff9820(0x156)](_0x4b53eb);}async[_0x12f486(0x1d2)](){const _0x128c93=_0x12f486;return await this[_0x128c93(0x1f3)](),this[_0x128c93(0x116)][_0x128c93(0x154)](),super[_0x128c93(0x1d2)]();}[_0x12f486(0xe5)](_0x33292e){const _0xfd4326=_0x12f486,_0x4dc5af=_0x4b9b70(this[_0xfd4326(0x1ac)]);if(!_0x4dc5af[_0xfd4326(0x8f)][_0xfd4326(0x9e)](_0xfd4326(0xc1)))throw new _0x4b2b76(_0xfd4326(0x90),null);const _0x33d3ee=this[_0xfd4326(0x1ac)][_0xfd4326(0x8f)][_0xfd4326(0x11a)](_0xfd4326(0xb6)),{reply:_0xa65adf,interaction:_0x312d0c}=this[_0xfd4326(0x137)](_0x33292e[_0xfd4326(0x79)]),_0x36cad7=this[_0xfd4326(0x1a6)](_0x33292e[_0xfd4326(0x79)],_0x33292e[_0xfd4326(0x152)]),_0x45eb0d=void 0x0!==_0x33292e[_0xfd4326(0x152)]?[_0xa65adf[_0xfd4326(0x122)][_0x33292e[_0xfd4326(0x152)]]]:_0xa65adf[_0xfd4326(0x122)][_0xfd4326(0x10a)](_0x15cf14=>_0xfd4326(0x102)==_0x15cf14[_0xfd4326(0x6d)]),_0x211458=_0x45eb0d[_0xfd4326(0x1d1)](_0x2e0fe6=>_0xa65adf[_0xfd4326(0x122)][_0xfd4326(0x75)](_0x2e0fe6));if(!_0x36cad7||_0xfd4326(0x1aa)==_0x36cad7[_0xfd4326(0x86)][_0xfd4326(0x19c)][_0xfd4326(0x188)])return void _0x211458[_0xfd4326(0xbe)](_0x5f1038=>_0xa65adf[_0xfd4326(0xcd)](_0x5f1038,_0xfd4326(0x11d)));_0x211458[_0xfd4326(0xbe)](_0x21fa3c=>_0xa65adf[_0xfd4326(0xcd)](_0x21fa3c,_0xfd4326(0x1b2)));const _0x23ec33=_0x58de2c({'editor':_0x4dc5af,'reply':_0xa65adf,'interaction':_0x312d0c,'groups':_0x45eb0d,'transform':!0x0,'documentCompare':_0x33d3ee,'documentCompareOptions':{'anchor':_0xfd4326(0x190),'markDeletions':!0x0}});let _0x43b986;_0x36cad7&&this[_0xfd4326(0x1da)](_0x36cad7[_0xfd4326(0x86)]),_0x4dc5af[_0xfd4326(0x19a)][_0xfd4326(0x14e)](_0x290941=>{const _0x17ea79=_0xfd4326;_0x43b986=_0x290941[_0x17ea79(0x1eb)],_0x4dc5af[_0x17ea79(0x8f)][_0x17ea79(0x11a)](_0x17ea79(0x194))[_0x17ea79(0x16f)](_0x23ec33),this[_0x17ea79(0xf0)][_0x17ea79(0xa0)](_0x17ea79(0x1ad));}),this[_0xfd4326(0xbb)][_0xfd4326(0x1b3)](_0x43b986,{'interactionId':_0x312d0c['id'],'replyId':_0xa65adf['id'],'indexes':_0x211458[_0xfd4326(0x12e)]()}),this[_0xfd4326(0x8b)](_0xa65adf);}[_0x12f486(0x18f)](_0x22f3ae){const _0x1a54bd=_0x12f486,_0x2b4987=_0x4b9b70(this[_0x1a54bd(0x1ac)]),_0x5b34a9=this[_0x1a54bd(0x1ac)][_0x1a54bd(0x8f)][_0x1a54bd(0x11a)](_0x41a947),{reply:_0x1edfe4,interaction:_0x58ec33}=this[_0x1a54bd(0x137)](_0x22f3ae[_0x1a54bd(0x79)]),_0x4f5cee=this[_0x1a54bd(0x1a6)](_0x22f3ae[_0x1a54bd(0x79)],_0x22f3ae[_0x1a54bd(0x152)]),_0x435d12=void 0x0!==_0x22f3ae[_0x1a54bd(0x152)]?[_0x1edfe4[_0x1a54bd(0x122)][_0x22f3ae[_0x1a54bd(0x152)]]]:_0x1edfe4[_0x1a54bd(0x122)][_0x1a54bd(0x10a)](_0x918551=>_0x1a54bd(0x102)==_0x918551[_0x1a54bd(0x6d)]),_0x5efc18=_0x435d12[_0x1a54bd(0x1d1)](_0x47d412=>_0x1edfe4[_0x1a54bd(0x122)][_0x1a54bd(0x75)](_0x47d412));if(!_0x4f5cee||_0x1a54bd(0x1aa)==_0x4f5cee[_0x1a54bd(0x86)][_0x1a54bd(0x19c)][_0x1a54bd(0x188)])return void _0x5efc18[_0x1a54bd(0xbe)](_0x3e802d=>_0x1edfe4[_0x1a54bd(0xcd)](_0x3e802d,_0x1a54bd(0x11d)));_0x5efc18[_0x1a54bd(0xbe)](_0x1d2cdc=>_0x1edfe4[_0x1a54bd(0xcd)](_0x1d2cdc,_0x1a54bd(0x1b2)));const _0xeb5e3b=_0x58de2c({'editor':_0x2b4987,'reply':_0x1edfe4,'interaction':_0x58ec33,'groups':_0x435d12,'transform':!0x0,'documentCompare':_0x5b34a9,'documentCompareOptions':{'anchor':_0x1a54bd(0x190),'markDeletions':!0x1}});let _0x6cb429;_0x4f5cee&&this[_0x1a54bd(0x1da)](_0x4f5cee[_0x1a54bd(0x86)]),_0x2b4987[_0x1a54bd(0x19a)][_0x1a54bd(0x14e)](_0x32685f=>{const _0xe06463=_0x1a54bd;_0x6cb429=_0x32685f[_0xe06463(0x1eb)];for(const _0x57c3cd of _0xeb5e3b)_0x57c3cd[_0xe06463(0xfc)]=_0x2b4987[_0xe06463(0x19a)][_0xe06463(0x7b)][_0xe06463(0x1c4)],_0x366e90(_0x2b4987,_0x57c3cd),_0x32685f[_0xe06463(0x1eb)][_0xe06463(0x1d3)](_0x57c3cd),_0x2b4987[_0xe06463(0x19a)][_0xe06463(0xa9)](_0x57c3cd);}),this[_0x1a54bd(0xbb)][_0x1a54bd(0x1b3)](_0x6cb429,{'interactionId':_0x58ec33['id'],'replyId':_0x1edfe4['id'],'indexes':_0x5efc18[_0x1a54bd(0x12e)]()}),this[_0x1a54bd(0x8b)](_0x1edfe4);}[_0x12f486(0xdb)](_0x184437){const _0x23c35f=_0x12f486,{reply:_0x467f13}=this[_0x23c35f(0x137)](_0x184437[_0x23c35f(0x79)]);_0x467f13[_0x23c35f(0xcd)](_0x184437[_0x23c35f(0x152)],_0x23c35f(0x108));}[_0x12f486(0x168)](_0x1cb438,_0x356f63){const _0xd0de7=_0x12f486;if(!this[_0xd0de7(0x144)])return;const {reply:_0x2bb636}=this[_0xd0de7(0x137)](_0x1cb438),_0x340a0f=_0x2bb636[_0xd0de7(0xc6)]({'showDiff':this[_0xd0de7(0x136)]});let _0x54a150,_0x45e06c;if(void 0x0!==_0x356f63?(_0x45e06c=_0x340a0f[_0xd0de7(0x186)](_0x12b688=>_0x12b688[_0xd0de7(0x1ab)]==_0x356f63),_0x54a150=_0x45e06c?.[_0xd0de7(0x1ab)]):(_0x45e06c=_0x340a0f[0x0],_0x54a150=_0x45e06c[_0xd0de7(0x1ab)]),this[_0xd0de7(0xd9)]?.[_0xd0de7(0x79)]==_0x1cb438&&this[_0xd0de7(0xd9)]?.[_0xd0de7(0x152)]==_0x54a150)return;const _0x2d37c0=this[_0xd0de7(0xd7)](_0x1cb438,_0x2bb636,_0x45e06c);if(!_0x2d37c0)return void this[_0xd0de7(0x144)][_0xd0de7(0x18d)]();this[_0xd0de7(0xd9)]={'replyId':_0x1cb438,'partIndex':_0x54a150},this[_0xd0de7(0x1da)](_0x2d37c0,!0x0);const _0xc41e9b=this[_0xd0de7(0x71)](_0x1cb438,_0x54a150,_0xd0de7(0x1f7));this[_0xd0de7(0x144)][_0xd0de7(0x1f6)]({'part':_0x45e06c,'renderingStrategy':_0xd0de7(0x10e)}),this[_0xd0de7(0x144)][_0xd0de7(0x1a0)]({'index':_0x54a150,'title':_0x541ff7(this[_0xd0de7(0x1ac)][_0xd0de7(0xbf)],_0xd0de7(0xdf),(_0x54a150+0x1)[_0xd0de7(0x1dc)]()),'showRotator':null!==_0xc41e9b,'ranges':[_0x2d37c0],'areActionsDisabled':_0x2bb636[_0xd0de7(0xa5)]}),this[_0xd0de7(0x144)][_0xd0de7(0xf9)](_0xd0de7(0x102)),this[_0xd0de7(0xef)][_0xd0de7(0x13c)](_0x1cb438,_0x54a150),this[_0xd0de7(0xef)][_0xd0de7(0x85)]({'id':_0x1cb438,'index':_0x54a150,'isActive':!0x0});}[_0x12f486(0x71)](_0x11654d,_0x32bcb8,_0xe115c6){const _0x48c3d0=_0x12f486,{reply:_0x99aff1}=this[_0x48c3d0(0x137)](_0x11654d),_0x3b2501=_0x99aff1[_0x48c3d0(0xc6)]({'showDiff':this[_0x48c3d0(0x136)]});if(0x1==_0x3b2501[_0x48c3d0(0x84)])return null;const _0x1dbb90=_0x3b2501[_0x48c3d0(0x176)](_0x50c627=>_0x50c627[_0x48c3d0(0x1ab)]==_0x32bcb8),_0x21a045=_0x48c3d0(0x1f7)==_0xe115c6?0x1:-0x1;let _0x2d61d1=_0x3b2501['at']((_0x1dbb90+_0x21a045)%_0x3b2501[_0x48c3d0(0x84)])[_0x48c3d0(0x1ab)],_0x40012f=_0x3b2501[_0x2d61d1];for(;!this[_0x48c3d0(0xd7)](_0x11654d,_0x99aff1,_0x40012f);){if(_0x2d61d1=_0x3b2501['at']((_0x2d61d1+_0x21a045)%_0x3b2501[_0x48c3d0(0x84)])[_0x48c3d0(0x1ab)],_0x2d61d1===_0x1dbb90)return null;_0x40012f=_0x3b2501[_0x2d61d1];}return _0x2d61d1;}[_0x12f486(0xd7)](_0x15014a,_0x1a29ef,_0x19b613){const _0x123598=_0x12f486,_0x1395b4=_0x1a29ef[_0x123598(0x122)];if(!_0x19b613[_0x123598(0x181)])return null;const _0x1180df=_0x1395b4[_0x123598(0x186)](_0x37020e=>_0x37020e[_0x123598(0x1ab)]==_0x19b613[_0x123598(0x1ab)]);if(_0x123598(0x102)!==_0x1180df?.[_0x123598(0x6d)])return null;const _0x30dd03=this[_0x123598(0x1a6)](_0x15014a,_0x19b613[_0x123598(0x1ab)]);if(!_0x30dd03)return null;const {range:_0x33c880,currentIndex:_0x210f55}=_0x30dd03;return _0x123598(0x1aa)==_0x33c880[_0x123598(0x19c)][_0x123598(0x188)]?(_0x1a29ef[_0x123598(0xcd)](_0x210f55,_0x123598(0x11d)),null):_0x30dd03[_0x123598(0x86)];}[_0x12f486(0x1a6)](_0x3b3573,_0x10173e){const _0x255021=_0x12f486,_0x439c5f=_0x4b9b70(this[_0x255021(0x1ac)]),{reply:_0x401849,interaction:_0x48e03d}=this[_0x255021(0x137)](_0x3b3573),_0x1327cc=_0x401849[_0x255021(0x122)][_0x255021(0x10a)](_0x4820ef=>_0x255021(0x102)==_0x4820ef[_0x255021(0x6d)]),_0x5456e2=_0x1327cc[_0x255021(0x1d1)](_0x4872e7=>_0x401849[_0x255021(0x122)][_0x255021(0x75)](_0x4872e7));void 0x0===_0x10173e&&(_0x10173e=_0x5456e2[0x0]);const _0x2c5a6a=_0x5456e2[_0x255021(0x75)](_0x10173e);if(-0x1==_0x2c5a6a)return null;const _0x4d7819=_0x1327cc[_0x2c5a6a],_0x319692=new _0x8e65d3([]),_0x55b9ae=new _0x8e65d3([]);for(const _0x2a7b16 of _0x4d7819[_0x255021(0xea)])if(_0x255021(0x107)!=_0x2a7b16[_0x255021(0x1be)]&&_0x55b9ae[_0x255021(0xc3)][_0x255021(0xdd)](_0x2a7b16[_0x255021(0x11f)][_0x255021(0x193)](!0x0)),_0x255021(0x18b)!=_0x2a7b16[_0x255021(0x1be)]){const _0x3e06a0=_0xd10b12(_0x5e682a=>_0xa01188(_0x5e682a,_0x255021(0x1c1))==_0x2a7b16['id'],_0x401849[_0x255021(0x1b0)],!0x0);_0x319692[_0x255021(0xc3)][_0x255021(0xdd)](_0x3e06a0[_0x255021(0x193)](!0x0));}if(0x0==_0x319692[_0x255021(0xc3)][_0x255021(0x84)]){if(_0x4d7819[_0x255021(0xea)][0x0][_0x255021(0xd8)]){const _0x2de812=_0x2b1db6(_0x255021(0x1c1),_0x4d7819[_0x255021(0xea)][0x0][_0x255021(0xd8)],_0x401849[_0x255021(0x1b0)]);_0x319692[_0x255021(0xc3)][_0x255021(0x139)](_0x2de812[_0x255021(0x193)](!0x0)),_0x55b9ae[_0x255021(0xc3)][_0x255021(0x139)](_0x2de812[_0x255021(0x193)](!0x0)),_0x2de812[_0x255021(0x14b)]&&(_0x319692[_0x255021(0xc3)][_0x255021(0xdd)](_0x2de812[_0x255021(0x14b)][_0x255021(0x193)](!0x0)),_0x55b9ae[_0x255021(0xc3)][_0x255021(0xdd)](_0x2de812[_0x255021(0x14b)][_0x255021(0x193)](!0x0)));}else{const _0x1531cb=_0x401849[_0x255021(0x1b0)][_0x255021(0xc3)][0x0];if(!_0x1531cb)return null;_0x319692[_0x255021(0xc3)][_0x255021(0xdd)](_0x1531cb[_0x255021(0x193)](!0x0)),_0x55b9ae[_0x255021(0xc3)][_0x255021(0xdd)](_0x1531cb[_0x255021(0x193)](!0x0));}}const _0x420e24=_0x48e03d[_0x255021(0x117)](),_0x53a6f5=_0x439c5f[_0x255021(0x1c6)][_0x255021(0x1e9)](_0x420e24[_0x255021(0x1bd)]),_0x419a89=_0x52f5de(_0x319692),_0x16c708=_0x439c5f[_0x255021(0x1c6)][_0x255021(0x1e9)](_0x419a89),_0x414649=_0x439c5f[_0x255021(0x1c6)][_0x255021(0x1e9)](_0x419a89),_0x527068=_0x439c5f[_0x255021(0x19a)][_0x255021(0x13b)](_0x16c708,0x0),_0x53009d=_0x52f5de(_0x55b9ae),_0x1042e5={'anchor':_0x527068,'markDeletions':!0x1},_0x4cecbd=_0x439c5f[_0x255021(0x8f)][_0x255021(0x11a)](_0x41a947)[_0x255021(0x159)](_0x419a89,_0x53009d,_0x1042e5)[_0x255021(0xe1)]();if(!_0x4cecbd[_0x255021(0x84)])return null;_0x439c5f[_0x255021(0x19a)][_0x255021(0x14e)](_0x4402d5=>{const _0xbbca87=_0x255021;for(const _0x45ce03 of _0x4cecbd)if(_0xbbca87(0x8c)==_0x45ce03[_0xbbca87(0x1be)]){const _0x29dded=_0x45ce03[_0xbbca87(0x10b)],_0xefe669=_0x45ce03[_0xbbca87(0x1ee)],_0x2adf78=new _0x1604bc(_0x29dded,_0xefe669);_0x4402d5[_0xbbca87(0x1eb)][_0xbbca87(0x1d3)](_0x2adf78),_0x439c5f[_0xbbca87(0x19a)][_0xbbca87(0xa9)](_0x2adf78);}else _0xbbca87(0x8d)!==_0x45ce03[_0xbbca87(0x1be)]&&(_0x45ce03[_0xbbca87(0xfc)]=null,_0x45ce03[_0xbbca87(0x1d9)]=!0x1,_0x4402d5[_0xbbca87(0x1eb)][_0xbbca87(0x1d3)](_0x45ce03),_0x439c5f[_0xbbca87(0x19a)][_0xbbca87(0xa9)](_0x45ce03));});const _0x47af60=_0x572c78(_0x439c5f,_0x4cecbd,_0x16c708);_0x52bea3(_0x439c5f[_0x255021(0x19a)],_0x47af60);const _0x2dfeb4=_0x47af60[_0x255021(0x1b4)]()[_0x255021(0x9a)][_0x255021(0x1e2)][_0x255021(0x12e)](),_0x2fc32c=_0x47af60[_0x255021(0x1b4)]()[_0x255021(0x14d)][_0x255021(0x1e2)][_0x255021(0x12e)](),_0x6f1d01=[];let _0x3bab61=_0x16c708,_0x562844=_0x414649;for(let _0x57a858=0x0;_0x57a858<_0x2fc32c[_0x255021(0x84)];_0x57a858++){const _0x3ba85=_0x3bab61[_0x255021(0x18c)]-_0x2fc32c[_0x57a858];_0x6f1d01[_0x57a858]=_0x562844[_0x255021(0x18c)]-_0x3ba85,_0x3bab61=_0x3bab61[_0x255021(0x1af)](_0x2fc32c[_0x57a858]),_0x562844=_0x562844[_0x255021(0x1af)](_0x6f1d01[_0x57a858]);}const _0x7e705f=_0x439c5f[_0x255021(0x19a)][_0x255021(0xe9)](_0x439c5f[_0x255021(0x19a)][_0x255021(0x184)](_0x414649,_0x2dfeb4),_0x439c5f[_0x255021(0x19a)][_0x255021(0x184)](_0x414649,_0x6f1d01)),_0x3d7af3=_0x414649[_0x255021(0x16e)](0x0)[_0x255021(0x162)](_0xdc6d4f),_0x5215e5=Array[_0x255021(0xda)](_0x53a6f5[_0x255021(0x1e6)]())[_0x255021(0x186)](_0x1b4e2e=>_0x1b4e2e[_0x255021(0x162)](_0xdc6d4f)==_0x3d7af3)[_0x255021(0x158)](),_0x579dfc=_0x7e705f[_0x255021(0x9a)][_0x255021(0x1e2)][_0x255021(0x12e)](),_0x127d6e=_0x7e705f[_0x255021(0x14d)][_0x255021(0x1e2)][_0x255021(0x12e)]();_0x579dfc[0x0]=_0x5215e5[0x0]+_0x579dfc[0x0],_0x127d6e[0x0]=_0x5215e5[0x0]+_0x127d6e[0x0];let _0x298940=_0x439c5f[_0x255021(0x19a)][_0x255021(0xe9)](_0x439c5f[_0x255021(0x19a)][_0x255021(0x184)](_0x439c5f[_0x255021(0x19a)][_0x255021(0x7b)][_0x255021(0xfe)](),_0x579dfc),_0x439c5f[_0x255021(0x19a)][_0x255021(0x184)](_0x439c5f[_0x255021(0x19a)][_0x255021(0x7b)][_0x255021(0xfe)](),_0x127d6e));const _0xd5d8de=_0x439c5f[_0x255021(0x19a)][_0x255021(0x7b)][_0x255021(0x72)][_0x255021(0xe1)](_0x420e24[_0x255021(0x1c4)]);for(const _0x1aad67 of _0xd5d8de)_0x298940=_0x1ca952[_0x255021(0x17c)](_0x298940[_0x255021(0x1e4)](_0x1aad67));return{'range':_0x298940,'currentIndex':_0x10173e};}[_0x12f486(0x7e)](_0x2a2496){const _0x34d6e2=_0x12f486;if(!_0x2a2496[_0x34d6e2(0x8f)][_0x34d6e2(0x9e)](_0x34d6e2(0x19d)))return;const _0xa7923a=_0x2a2496[_0x34d6e2(0x82)][_0x34d6e2(0x11a)](_0x34d6e2(0x128)),_0x439b46=_0x2a2496[_0x34d6e2(0x82)][_0x34d6e2(0x11a)](_0x34d6e2(0x1a9));this[_0x34d6e2(0x1ae)](_0xa7923a,_0x34d6e2(0x1de),(_0x154fae,_0x30a94e,_0x452b90)=>{const _0x785b1d=_0x34d6e2,_0x1ff3c3=this[_0x785b1d(0xbb)][_0x785b1d(0x11a)](_0x30a94e);if(!_0x1ff3c3)return;const _0x1b2866=this[_0x785b1d(0x120)][_0x785b1d(0x7c)](_0x1ff3c3[_0x785b1d(0x1e0)])[_0x785b1d(0x1b5)](_0x1ff3c3[_0x785b1d(0x79)]);_0x1ff3c3[_0x785b1d(0xba)][_0x785b1d(0xbe)](_0x32eb98=>_0x1b2866[_0x785b1d(0xcd)](_0x32eb98,_0x785b1d(0x102))),this[_0x785b1d(0xbb)][_0x785b1d(0x195)](_0x30a94e),this[_0x785b1d(0xbb)][_0x785b1d(0x1b3)](_0x452b90,_0x1ff3c3);}),this[_0x34d6e2(0x1ae)](_0x439b46,_0x34d6e2(0x1de),(_0x41fa79,_0x445968,_0xfd1f94)=>{const _0x85955f=_0x34d6e2,_0x48157f=this[_0x85955f(0xbb)][_0x85955f(0x11a)](_0x445968);if(!_0x48157f)return;const _0x3c32dd=this[_0x85955f(0x120)][_0x85955f(0x7c)](_0x48157f[_0x85955f(0x1e0)])[_0x85955f(0x1b5)](_0x48157f[_0x85955f(0x79)]);_0x48157f[_0x85955f(0xba)][_0x85955f(0xbe)](_0x47ec15=>_0x3c32dd[_0x85955f(0xcd)](_0x47ec15,_0x85955f(0x1b2))),this[_0x85955f(0xbb)][_0x85955f(0x195)](_0x445968),this[_0x85955f(0xbb)][_0x85955f(0x1b3)](_0xfd1f94,_0x48157f);});}async[_0x12f486(0x156)](_0x2c3a65){const _0x24969d=_0x12f486;this[_0x24969d(0x1ac)][_0x24969d(0x8f)][_0x24969d(0x9e)](_0x24969d(0x1cf))&&this[_0x24969d(0x1ac)][_0x24969d(0x8f)][_0x24969d(0x11a)](_0x24969d(0x1cf))[_0x24969d(0x18d)](),(this[_0x24969d(0x1ac)][_0x24969d(0x8f)][_0x24969d(0x11a)](_0x575159)[_0x24969d(0xff)][_0x24969d(0x16c)](_0x24969d(0xe7)),this[_0x24969d(0xef)][_0x24969d(0x185)](_0x24969d(0x10e)),this[_0x24969d(0xef)][_0x24969d(0x12d)](!0x0),await this[_0x24969d(0x1f3)]());try{await this[_0x24969d(0x175)][_0x24969d(0xdc)](_0x2c3a65)[_0x24969d(0x113)](),await this[_0x24969d(0x9b)](_0x2c3a65),this[_0x24969d(0x1cd)]('\x20'),await this[_0x24969d(0x120)][_0x24969d(0x14f)](_0x2c3a65,this[_0x24969d(0xf0)][_0x24969d(0x87)]),this[_0x24969d(0x120)][_0x24969d(0xd5)]()&&this[_0x24969d(0x1ec)]();}catch(_0x236fa9){this[_0x24969d(0xef)][_0x24969d(0x173)]({'errorMessage':_0x541ff7(this[_0x24969d(0x1ac)][_0x24969d(0xbf)],_0x24969d(0x17d)),'id':_0x2c3a65}),this[_0x24969d(0x145)](new _0x4b2b76(_0x24969d(0x103),this,{'error':_0x236fa9}));}finally{this[_0x24969d(0xef)][_0x24969d(0x17a)](),this[_0x24969d(0xef)][_0x24969d(0x185)](_0x24969d(0x197)),this[_0x24969d(0xef)][_0x24969d(0x12d)](!0x1);}}async[_0x12f486(0xaa)](){const _0x476a3d=_0x12f486,_0x519c79=this[_0x476a3d(0x175)][_0x476a3d(0xfb)](this[_0x476a3d(0xe4)](),{'limit':0x1,'sortBy':_0x476a3d(0x1cc)});try{const _0x35ba80=await _0x519c79[_0x476a3d(0x1d8)]();return _0x35ba80[_0x476a3d(0x84)]?_0x35ba80[0x0]['id']:_0x476a3d(0x18b);}catch(_0x2a4274){return this[_0x476a3d(0xef)][_0x476a3d(0x173)]({'errorMessage':_0x541ff7(this[_0x476a3d(0x1ac)][_0x476a3d(0xbf)],_0x476a3d(0x17d)),'id':_0x14d190()}),this[_0x476a3d(0x145)](new _0x4b2b76(_0x476a3d(0x1b6),this,{'error':_0x2a4274})),this[_0x476a3d(0xef)][_0x476a3d(0x12d)](!0x1),this[_0x476a3d(0xef)][_0x476a3d(0xa2)](),null;}}[_0x12f486(0x1dd)](_0xdbff9b){const _0x4aa16e=_0x12f486;this[_0x4aa16e(0x120)]['id']===_0xdbff9b&&this[_0x4aa16e(0x9b)]();}[_0x12f486(0x1ec)](){const _0x4bc248=_0x12f486;this[_0x4bc248(0x120)]?.[_0x4bc248(0x70)](_0x541ff7(this[_0x4bc248(0x1ac)][_0x4bc248(0xbf)],_0x4bc248(0xd3)));}async[_0x12f486(0x129)](){const _0x1c0804=_0x12f486,_0xdf1bb2=this[_0x1c0804(0xf0)][_0x1c0804(0x170)]();this[_0x1c0804(0x120)]?.[_0x1c0804(0x88)](_0xdf1bb2),this[_0x1c0804(0x1ec)]();}[_0x12f486(0x165)](){const _0x4d45b7=_0x12f486;this[_0x4d45b7(0x120)]?.[_0x4d45b7(0x13e)]();}[_0x12f486(0x132)](){const _0x170816=_0x12f486;this[_0x170816(0xef)][_0x170816(0x132)]();}async[_0x12f486(0x167)](){const _0x28afb5=_0x12f486;await this[_0x28afb5(0x9b)]();}async[_0x12f486(0x142)]({message:_0x199b34,attributes:_0x52e314}){const _0x5580c6=_0x12f486;await this[_0x5580c6(0x106)]({'userMessage':_0x199b34,'attributes':_0x52e314});}[_0x12f486(0xe4)](){const _0x5d49dc=_0x12f486,_0x4d3556=this[_0x5d49dc(0x1ac)][_0x5d49dc(0xc9)][_0x5d49dc(0x11a)](_0x5d49dc(0x7a));if(!_0x4d3556)throw new _0x4b2b76(_0x5d49dc(0x1c8),this);return _0x4d3556;}async[_0x12f486(0x9b)](_0x7c8731){const _0x5b7549=_0x12f486;try{this[_0x5b7549(0xef)][_0x5b7549(0x15f)](),await this[_0x5b7549(0xe8)](_0x7c8731);}catch(_0xc78bdf){this[_0x5b7549(0xef)][_0x5b7549(0x173)]({'errorMessage':_0x541ff7(this[_0x5b7549(0x1ac)][_0x5b7549(0xbf)],_0x5b7549(0x1bf)),'id':_0x7c8731||_0x14d190()}),console[_0x5b7549(0x1f2)](_0xc78bdf),this[_0x5b7549(0x120)]=void 0x0,this[_0x5b7549(0xef)][_0x5b7549(0xa2)]();}}async[_0x12f486(0xe8)](_0x2d8c44){const _0x1d59e0=_0x12f486;let _0x2ce41e;this[_0x1d59e0(0x1ac)][_0x1d59e0(0x8f)][_0x1d59e0(0x9e)](_0x1d59e0(0x1cf))&&this[_0x1d59e0(0x1ac)][_0x1d59e0(0x8f)][_0x1d59e0(0x11a)](_0x1d59e0(0x1cf))[_0x1d59e0(0x18d)](),_0x2d8c44||!this[_0x1d59e0(0x120)]?_0x2ce41e=this[_0x1d59e0(0x1ac)][_0x1d59e0(0xc9)][_0x1d59e0(0x11a)](_0x1d59e0(0x121)):this[_0x1d59e0(0xef)][_0x1d59e0(0x177)]&&(_0x2ce41e=this[_0x1d59e0(0x120)][_0x1d59e0(0xa1)]['id']),await this[_0x1d59e0(0x1f3)]();const _0x115d26=this[_0x1d59e0(0xe4)](),_0x2ab835=_0x2d8c44||_0x14d190();this[_0x1d59e0(0x120)]=new _0x2fc456({'connector':this[_0x1d59e0(0x175)],'chatModels':this[_0x1d59e0(0x1a2)],'selectedModelId':_0x2ce41e,'conversationId':_0x2ab835,'group':_0x115d26,'getEditor':()=>_0x4b9b70(this[_0x1d59e0(0x1ac)]),'isFromHistory':!!_0x2d8c44}),this[_0x1d59e0(0x120)][_0x1d59e0(0x16a)](_0x1d59e0(0x180),_0x1d59e0(0x105))['to'](this),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0xe2),(_0x207f60,_0x3c932a)=>{const _0xcb238b=_0x1d59e0;this[_0xcb238b(0xef)][_0xcb238b(0xce)](_0x3c932a),this[_0xcb238b(0xef)][_0xcb238b(0x1f0)](),this[_0xcb238b(0xef)][_0xcb238b(0x1ea)](),this[_0xcb238b(0xef)][_0xcb238b(0x1a5)](),_0x2d8c44||(this[_0xcb238b(0xef)][_0xcb238b(0x6c)](),this[_0xcb238b(0x1ec)]());}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x92),(_0x4921c2,_0x14b799)=>{const _0x4444a3=_0x1d59e0;this[_0x4444a3(0xef)][_0x4444a3(0x19b)](_0x14b799[_0x4444a3(0x199)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x78),(_0x5ee57d,_0x2fa841)=>{const _0x1dcfd4=_0x1d59e0;this[_0x1dcfd4(0xef)][_0x1dcfd4(0x1e1)](_0x2fa841);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1c3),()=>{const _0xa93082=_0x1d59e0,_0x54114c=this[_0xa93082(0xef)][_0xa93082(0xa8)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0xa93082(0xef)][_0xa93082(0x1f4)](_0x54114c);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x14c),()=>{const _0x26ed79=_0x1d59e0,_0x15739a=this[_0x26ed79(0xef)][_0x26ed79(0xa8)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x26ed79(0xef)][_0x26ed79(0x1f4)](_0x15739a);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x17e),(_0x27a643,_0x36d3ba)=>{const _0x4296d0=_0x1d59e0;this[_0x4296d0(0xef)][_0x4296d0(0xca)](_0x36d3ba,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x196),(_0x420333,_0xe81147)=>{const _0x290a5e=_0x1d59e0;this[_0x290a5e(0xef)][_0x290a5e(0xca)](_0xe81147,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x105),()=>{const _0x32af26=_0x1d59e0;this[_0x32af26(0xef)][_0x32af26(0x12b)]();}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0xab),async()=>{const _0x23b089=_0x1d59e0;await this[_0x23b089(0xef)][_0x23b089(0x12f)]();}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x10c),(_0x48d4a0,_0x8fcf5a)=>{const _0x26f276=_0x1d59e0;this[_0x26f276(0xef)][_0x26f276(0x13d)](_0x8fcf5a['id']);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x161),(_0x52ce72,_0x24bed9,_0x51af18)=>{const _0x17cb2a=_0x1d59e0;this[_0x17cb2a(0x1cd)](_0x24bed9,_0x51af18);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x140),(_0x34e583,_0x225350)=>{const _0x5e950f=_0x1d59e0;_0x5e950f(0x89)===_0x225350[_0x5e950f(0x1be)]?this[_0x5e950f(0xef)][_0x5e950f(0x12c)](_0x225350):this[_0x5e950f(0xef)][_0x5e950f(0x169)](_0x225350);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1d4),async(_0x4efdbe,_0x1281e4)=>{const _0x384841=_0x1d59e0;await this[_0x384841(0x148)]({'reply':_0x1281e4});}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1c5),(_0x3d0826,{reply:_0x15a3b0,index:_0x365d6a,state:_0xc1736e})=>{const _0x40a092=_0x1d59e0;this[_0x40a092(0xef)][_0x40a092(0xbd)]({'id':_0x15a3b0['id'],'index':_0x365d6a,'state':_0xc1736e}),this[_0x40a092(0xd9)]?.[_0x40a092(0x79)][_0x40a092(0x1b9)](_0x15a3b0['id'])&&this[_0x40a092(0xd9)]?.[_0x40a092(0x152)]==_0x365d6a&&this[_0x40a092(0x144)]?.[_0x40a092(0xf9)](_0xc1736e);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0xa7),(_0x14c886,_0x21abac)=>{const _0x42c4e6=_0x1d59e0;if(this[_0x42c4e6(0xef)][_0x42c4e6(0xec)](_0x21abac[_0x42c4e6(0xf5)],_0x21abac[_0x42c4e6(0x1ca)]),_0x42c4e6(0x119)===_0x21abac[_0x42c4e6(0xf5)][_0x42c4e6(0x1be)]){const _0x1f6824=[..._0x4b9b70(this[_0x42c4e6(0x1ac)])[_0x42c4e6(0x19a)][_0x42c4e6(0x7b)][_0x42c4e6(0x119)][_0x42c4e6(0x10f)]()];this[_0x42c4e6(0xf0)][_0x42c4e6(0x1ed)](_0x1f6824,_0x42c4e6(0x14a)+this[_0x42c4e6(0x120)]?.['id']);}}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x10d),(_0x3cf9dc,_0x4f0aeb)=>{const _0xd2094a=_0x1d59e0;this[_0xd2094a(0xef)][_0xd2094a(0x109)](_0x4f0aeb[_0xd2094a(0x9f)]),_0xd2094a(0x149)==_0x4f0aeb[_0xd2094a(0x9f)]&&this[_0xd2094a(0x165)](),_0xd2094a(0x119)===_0x4f0aeb[_0xd2094a(0x1be)]&&this[_0xd2094a(0xf0)][_0xd2094a(0xa0)](_0xd2094a(0x14a)+this[_0xd2094a(0x120)]?.['id']);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x13a),(_0x54fc61,_0x5c4dd)=>{const _0x127022=_0x1d59e0;this[_0x127022(0xef)][_0x127022(0x6b)](_0x5c4dd[_0x127022(0xf5)][_0x127022(0x9f)],_0x5c4dd[_0x127022(0x1ca)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0xde),(_0x5a11e3,_0x4a66ca)=>{const _0x48f590=_0x1d59e0;this[_0x48f590(0xef)][_0x48f590(0x104)](_0x4a66ca[_0x48f590(0xfd)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1db),(_0x520ecf,_0x19c8bc)=>{const _0x1297a8=_0x1d59e0;this[_0x1297a8(0xef)][_0x1297a8(0x97)](_0x19c8bc[_0x1297a8(0xee)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0xbc),(_0x25b6d6,_0x30b088)=>{const _0x4f6365=_0x1d59e0;this[_0x4f6365(0xef)][_0x4f6365(0x1d7)](_0x30b088[_0x4f6365(0x11b)],_0x30b088[_0x4f6365(0x164)],_0x30b088[_0x4f6365(0x99)],_0x30b088[_0x4f6365(0xfa)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x81),(_0x441e89,_0x552cf7)=>{const _0x1e07d2=_0x1d59e0;this[_0x1e07d2(0xef)][_0x1e07d2(0x1ef)](_0x552cf7[_0x1e07d2(0x11b)],_0x552cf7[_0x1e07d2(0x19f)],_0x552cf7[_0x1e07d2(0x150)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1c9),(_0xfb5aa5,_0x378fd4)=>{const _0x2433bf=_0x1d59e0;this[_0x2433bf(0xef)][_0x2433bf(0xd6)](_0x378fd4);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x83),async(_0x4028f1,_0x16b1aa)=>{const _0x3b54c6=_0x1d59e0,_0x5e279d=(await this[_0x3b54c6(0x1a2)][_0x3b54c6(0x74)]())[_0x3b54c6(0x186)](_0x15af02=>_0x15af02['id']===_0x16b1aa[_0x3b54c6(0xa1)]?.['id'])||null;this[_0x3b54c6(0xef)][_0x3b54c6(0x1d0)](_0x5e279d,_0x16b1aa[_0x3b54c6(0xd2)]);}),this[_0x1d59e0(0x120)]['on'](_0x1d59e0(0x1f2),(_0x2e2053,{error:_0x342019,interactionId:_0x233989,fileName:_0x23b837,url:_0x4f2192,sourceId:_0x10b14a,sourceLabel:_0x90e268})=>{const _0x547729=_0x1d59e0,_0x2ee824=_0x233989?_0x233989+':'+_0x14d190():_0x14d190();_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x130))?this[_0x547729(0xef)][_0x547729(0xc8)]({'staticMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x93)),'id':_0x2ee824}):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1b6))||_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x9d))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x1bf)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0xb9))?this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x198),_0x23b837),'id':_0x2ee824}):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x189))?this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x80),_0x4f2192),'id':_0x2ee824}):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1b7))?this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x125)),'id':_0x2ee824}):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1cb))?this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0xed)),'id':_0x2ee824}):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1a4))?(_0x10b14a&&this[_0x547729(0xef)][_0x547729(0x123)](_0x10b14a),this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x9c),_0x90e268||_0x547729(0x164)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x135))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x15d)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1a1))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0xd4)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1e3))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x1d6)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x110))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x16d)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0xaf))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0xb8)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):_0x342019[_0x547729(0x1df)][_0x547729(0xeb)](_0x547729(0x1bc))?(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x11e)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019)):(this[_0x547729(0xef)][_0x547729(0x173)]({'errorMessage':_0x541ff7(this[_0x547729(0x1ac)][_0x547729(0xbf)],_0x547729(0x131)),'id':_0x2ee824}),this[_0x547729(0x145)](_0x342019));}),await this[_0x1d59e0(0x120)][_0x1d59e0(0xb4)](this[_0x1d59e0(0x1ac)][_0x1d59e0(0xc9)][_0x1d59e0(0x11a)](_0x1d59e0(0x7d))),_0x2d8c44||await this[_0x1d59e0(0x120)][_0x1d59e0(0x9a)]();}async[_0x12f486(0x106)]({userMessage:_0x474d71,attributes:_0x5a0dc9}){const _0x15fb2f=_0x12f486;if(!this[_0x15fb2f(0x120)])throw new _0x4b2b76(_0x15fb2f(0xf8));if(this[_0x15fb2f(0x120)][_0x15fb2f(0x178)]()){const _0x3b9b61=await this[_0x15fb2f(0xf0)][_0x15fb2f(0xd1)]();await this[_0x15fb2f(0x120)][_0x15fb2f(0xf1)](_0x3b9b61);}this[_0x15fb2f(0x120)]['id']&&this[_0x15fb2f(0x120)][_0x15fb2f(0x1ce)]&&await this[_0x15fb2f(0x120)][_0x15fb2f(0xf6)]({'userMessage':_0x474d71,'attributes':_0x5a0dc9});}[_0x12f486(0x100)](){const _0x1aa1db=_0x12f486;console[_0x1aa1db(0x6e)](_0x1aa1db(0x153));}[_0x12f486(0x191)](_0xd722fc){const _0x201daf=_0x12f486;this[_0x201daf(0xef)][_0x201daf(0x112)](_0xd722fc);}[_0x12f486(0x145)](_0x18ca84){const _0x1c2f54=_0x12f486;_0x5319e8(_0x18ca84[_0x1c2f54(0x1df)]);}[_0x12f486(0x1f5)](_0x317741){const _0x431bca=_0x12f486;this[_0x431bca(0x120)]?.[_0x431bca(0x1a7)](_0x317741);}[_0x12f486(0xe6)](){const _0x55ad82=_0x12f486;this[_0x55ad82(0x120)]?.[_0x55ad82(0xae)]();}[_0x12f486(0x1f1)](){const _0x1106b2=_0x12f486;this[_0x1106b2(0x120)]?.[_0x1106b2(0x11c)]();}[_0x12f486(0x137)](_0x409d5e){const _0x344c26=_0x12f486,[_0x34df75,_0x5ede4e]=_0x409d5e[_0x344c26(0x160)](':'),_0x50a5d7=this[_0x344c26(0x120)][_0x344c26(0x7c)](_0x34df75),_0x3bfbdc=_0x50a5d7[_0x344c26(0x1b5)](_0x5ede4e);return{'interaction':_0x50a5d7,'reply':_0x3bfbdc};}[_0x12f486(0x1da)](_0xb0d721,_0x1fd5df=!0x1){const _0x55f66=_0x12f486,_0x3cd8e9=_0x4b9b70(this[_0x55f66(0x1ac)]),_0x27dbd9={'target':_0x3cd8e9[_0x55f66(0xc0)][_0x55f66(0xff)][_0x55f66(0xb3)][_0x55f66(0x146)](_0x3cd8e9[_0x55f66(0xc0)][_0x55f66(0x96)][_0x55f66(0x12a)](_0xb0d721)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1fd5df};_0x1fd5df&&(_0x27dbd9[_0x55f66(0x124)]=!0x0),_0x343c18(_0x27dbd9);}[_0x12f486(0x1cd)](_0x22c40a,_0xbdc0a4=!0x1){const _0x395e57=_0x12f486;this[_0x395e57(0xef)][_0x395e57(0x161)](_0x22c40a||_0x541ff7(this[_0x395e57(0x1ac)][_0x395e57(0xbf)],_0x395e57(0xf3)),_0xbdc0a4);}async[_0x12f486(0x148)]({reply:_0x21a2e3,renderingStrategy:_0x2036a7}){const _0x584d26=_0x12f486,{id:_0x55df35,interactionId:_0x37a6ec,isDone:_0x4d4c45,type:_0x23ef66,parsedContent:_0x50aef2}=_0x21a2e3,_0x3ff1fb=_0x37a6ec+':'+_0x55df35;if(_0x584d26(0xc4)===_0x23ef66){const _0x3edc53=_0x21a2e3[_0x584d26(0xc6)]({'showDiff':this[_0x584d26(0xef)][_0x584d26(0x147)]});await this[_0x584d26(0xef)][_0x584d26(0x1d5)]({'id':_0x3ff1fb,'parts':_0x3edc53,'renderingStrategy':_0x2036a7,'isDone':_0x4d4c45});}else _0x584d26(0x89)===_0x23ef66&&await this[_0x584d26(0xef)][_0x584d26(0x179)]({'id':_0x3ff1fb,'parsedContent':_0x50aef2,'renderingStrategy':_0x2036a7,'isDone':_0x4d4c45});_0x4d4c45&&_0x21a2e3[_0x584d26(0x187)][_0x584d26(0x84)]>0x0&&this[_0x584d26(0xef)][_0x584d26(0x17b)](_0x3ff1fb,_0x21a2e3[_0x584d26(0x187)]);}async[_0x12f486(0x1f3)](){const _0x5df7f9=_0x12f486,_0x2dc52c=this[_0x5df7f9(0x120)]?.[_0x5df7f9(0x174)];_0x2dc52c&&(_0x2dc52c[_0x5df7f9(0x127)](),this[_0x5df7f9(0xef)][_0x5df7f9(0xa3)](_0x2dc52c));}async[_0x12f486(0x166)](){const _0xe9beb7=_0x12f486,_0x44e665=this[_0xe9beb7(0x120)]?.[_0xe9beb7(0x174)];if(_0x44e665){for await(const _0x54d972 of _0x44e665[_0xe9beb7(0xf7)])await this[_0xe9beb7(0x148)]({'reply':_0x54d972,'renderingStrategy':_0xe9beb7(0x10e)});}}[_0x12f486(0x8b)](_0x183ae3){const _0x30f580=_0x12f486,_0x45e7f7={'positiveCount':_0x183ae3[_0x30f580(0x122)][_0x30f580(0x10a)](_0x812fa5=>_0x30f580(0x1b2)===_0x812fa5[_0x30f580(0x6d)])[_0x30f580(0x84)],'totalCount':_0x183ae3[_0x30f580(0x122)][_0x30f580(0x84)],'modificationId':_0x183ae3['id']},_0x5f147a=this[_0x30f580(0x120)][_0x30f580(0x7c)](_0x183ae3[_0x30f580(0x1e0)])[_0x30f580(0x16b)];_0x5f147a&&this[_0x30f580(0x175)][_0x30f580(0x91)](this[_0x30f580(0x120)]['id'],_0x5f147a,_0x45e7f7);}[_0x12f486(0x15a)](_0x306397){const _0x14f56f=_0x12f486;let _0x191942=null,_0x251572=null;this['on'](_0x14f56f(0x180),(_0x3322b3,_0x4b4634,_0x3255a8)=>{const _0x140d65=_0x14f56f;_0x3255a8['id']!==_0x191942&&(_0x191942=_0x3255a8['id'],_0x251572=this[_0x140d65(0x77)](_0x3255a8)),_0x306397(_0x4b4634,_0x251572);});}[_0x12f486(0x77)](_0x263f89){const _0x2d75a2=_0x12f486,_0x5d4c2d=this[_0x2d75a2(0xef)],_0x1a3f16=()=>{const _0x5392d1=_0x2d75a2;_0x263f89[_0x5392d1(0xe0)](),_0x263f89[_0x5392d1(0x8a)](),_0x5d4c2d[_0x5392d1(0x1c2)]();},_0x479083=()=>{const _0x432136=_0x2d75a2;_0x263f89[_0x432136(0xad)]&&(_0x263f89[_0x432136(0xad)][_0x432136(0x7f)](),_0x263f89[_0x432136(0xad)]=void 0x0);};return{'insertTextReply':(_0x59683a,_0x1e7ee8)=>{const _0x4ee509=_0x2d75a2;_0x479083(),_0x1a3f16();const _0xbdcb5f=_0x263f89[_0x4ee509(0xad)]=_0x263f89[_0x4ee509(0x157)]({'type':_0x4ee509(0x89),'interactionId':_0x263f89['id'],'content':_0x59683a,'id':_0x1e7ee8||_0x14d190()});return _0x479083(),_0xbdcb5f;},'insertCustomElement':async(_0x4dcc3d,_0x1ddf33)=>(_0x479083(),_0x1a3f16(),_0x5d4c2d[_0x2d75a2(0xac)](_0x4dcc3d,_0x1ddf33||_0x14d190())),'setLoadingMessage':_0x5d2abf=>{const _0x165c9e=_0x2d75a2;_0x5d4c2d[_0x165c9e(0x1f4)](_0x5d2abf);},'clearLoadingMessage':()=>{const _0x500a9b=_0x2d75a2;_0x5d4c2d[_0x500a9b(0x1c2)]();}};}}
|
|
23
|
+
function _0x28cf(_0x5d4009,_0x58c9bf){const _0x40ede9=_0x40ed();return _0x28cf=function(_0x28cf41,_0x43f1f5){_0x28cf41=_0x28cf41-0x10c;let _0x43078e=_0x40ede9[_0x28cf41];return _0x43078e;},_0x28cf(_0x5d4009,_0x58c9bf);}const _0x4aec30=_0x28cf;(function(_0x31c2b0,_0x51d30a){const _0x468a18=_0x28cf,_0x5335b8=_0x31c2b0();while(!![]){try{const _0x3d7f2d=parseInt(_0x468a18(0x121))/0x1+-parseInt(_0x468a18(0x1b9))/0x2*(parseInt(_0x468a18(0x250))/0x3)+-parseInt(_0x468a18(0x19d))/0x4*(-parseInt(_0x468a18(0x26e))/0x5)+-parseInt(_0x468a18(0x253))/0x6+parseInt(_0x468a18(0x11a))/0x7+parseInt(_0x468a18(0x1b2))/0x8*(-parseInt(_0x468a18(0x18d))/0x9)+parseInt(_0x468a18(0x20c))/0xa*(parseInt(_0x468a18(0x293))/0xb);if(_0x3d7f2d===_0x51d30a)break;else _0x5335b8['push'](_0x5335b8['shift']());}catch(_0x222c40){_0x5335b8['push'](_0x5335b8['shift']());}}}(_0x40ed,0xedba5));import{ContextPlugin as _0x5ebc1f,Editor as _0x18c442}from'ckeditor5/src/core.js';import{BodyCollection as _0x4f508d}from'ckeditor5/src/ui.js';import{CKEditorError as _0x3f52cf,logError as _0x306496,scrollViewportToShowTarget as _0x59f77d,uid as _0x4720f6}from'ckeditor5/src/utils.js';import{AIConnector as _0x266934}from'../aicore/aiconnector.js';import{AITabs as _0x330bc8}from'../aitabs/aitabs.js';import{AIChatConversation as _0x5a7bde}from'./model/aichatconversation.js';import{getTranslation as _0x21db9d}from'../aicore/utils/common-translations.js';import{AIModels as _0x479555}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x290b8e}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x344554,DATA_ID_MODEL_ATTRIBUTE as _0x2f75ed}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x41ef8f,getOperationsFromReply as _0xead07c}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x1ec15d,getMinimalSelection as _0x4101dd}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x561fcf,_DetachOperation as _0x45cacf}from'ckeditor5/src/engine.js';function _0x40ed(){const _0x5f5bf9=['AIEditing','Showing\x20conversation\x20history...','getInteraction','resize','_registerToolDataCallback','contextItemRemoved','addDocumentToContext','ai-chat-url-upload-failed','plugins','from','addFileToContext','AI_CHAT_INVALID_REQUEST','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','interactionFinished','createPositionAt','loadSourceResources','resourceId','ai.chat.context','populateSourceResourceBalloon','toViewRange','indexes','revert','_batchToChanges','baseVersion','setAddContextOptions','hasChanges','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','source','next','AI_CHAT_UNTITLED_CONVERSATION','insertSuggestion','_applyOperationsAsSuggestions','378909MIkMxl','ai-chat-controller-mouse-over','interactionDestroyed','abortPromptStream','init','setLoadingMessage','model','setFeedItemRenderingStrategy','clearLoadingMessage','sources','replyChangeGroupStateUpdated','context','isDocumentOperation','version','resource','isModelAvailable','96888ZNScur','updateCapabilities','contextSent','AI_CHAT_GENERIC_ERROR','_getAIChatInteractionAPI','rootName','ai-chat-invalid-request','_toggleReasoning','changeGroups','resetMessageInput','resizedTabs','ai-chat-missing-channel-id','contextItemAdded','_aiChatUi','ai.chat.initialConversation','DocumentCompare','_applySuggestion','ai-chat-conversation-not-found','activeConversation','addOperation','applyOperation','80hYhlVW','isCurrentDocumentInContext','root','ai-chat-conversation-start-failed','addCurrentDocumentToChatContext','updateContent','slice','328742xeBTjc','contextItem','mouseOverSuggestion','loadConversation','setChangeGroupState','dislike','_handleStartConversation','done','setConversationContext','currentReply','range','selectedModel','updateCurrentDocumentInContext','howMany','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','createdAt','_scrollToSuggestionRange','alignToTop','ai-chat-context-form-data-size-limits-exceeded','ai-request-aborted','clearPendingContextUI','type','previous','children','resizeTabs','isInContext','ai-chat-file-upload-failed','createRange','dialogClosed','addFilesToContext','getInteractionAndReplyById','addUrlToContext','_removeFromContext','log','updateConversationTitle','addResourceToContext','getChildren','areActionsDisabled','resourceStateChanged','options','fetchConversations','cloneNode','ai.models','pending','getChildAtOffset','ai-chat-controller-no-active-conversation','createPositionFromPath','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','upsertAIChatRating','contextItemLoadingEnded','showDiff','get','updateFeedItemAIReplySources','findIndex','AI_CHAT_ABORTED_MESSAGE','setConversationTitle','getChild','interactionId','sessionId','maxOffset','_createFromRanges','content','_getLastCreatedConversationId','interactionStarted','getTransformedByOperation','getRanges','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','map','setState','updateFeedItemAIReplyContent','unshift','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','_stopLastInteraction','document','_integrateEditor','removeContextItem','_aiEditing','lastCreated','split','indexOf','_logError','getSelectionText','focusPromptInput','9630oMGxZk','getConversation','state','removeSelectionFromContext','isOfficialPlugin','documentContextContent','mouseLeaveSuggestion','replyId','fetchConversation','_flushLastInteractionUI','includes','streaming','_aiChatBalloonShowDiff','ai.models.defaultModelId','AI_CHAT_UNABLE_TO_START_CONVERSATION','parse','addSelectionToChatContext','showNext','addFeedItemCustomElement','_handleUIUserMessage','webSearchFinished','ai-chat-resource-load-failed','resources','lastInteraction','outdated','_rejectSuggestion','messageId','toggleWebSearch','Liked\x20response','_getPresentableSiblingContentPartIndex','push','ai-no-track-changes','_updateRatings','isUploadInProgress','_currentPreviewedChangeGroup','delegate','sendUserMessage','addFeedItemStaticMessage','add','setSelectedModel','ai-chat-context-file-too-large','_setIsMaximized','open','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','length','AIConnector','editing','resetReasoningState','listenTo','AI_CHAT_CONTEXT_INVALID_DATA','Disliked\x20response','addFeedItemAIReply','webSearchStarted','static','editors','addSelectionToContext','getOperations','commands','getGroupId','conversationInitialized','interactionCreated','ai-chat-context-invalid-data','getDiff','undo','_bodyCollection','handleRemovedConversation','attachToDom','set','6ryLaDj','callback','afterInit','221598dFoieE','ready','addFeedInteractionHeader','_insertSuggestion','resetConversationTitle','ai-chat-context-file-too-many-pages','ai-chat-context-unsupported-type','isLoading','modification','addCurrentDocumentToContext','history','getDocumentContext','pluginName','selectModel','data-id','partIndex','addFeedItemUserMessage','_aiChatModels','start','collaboration.channelId','data','replies','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','sendMessage','uploadProgressChanged','getConversations','setModel','10KghLaf','modelSelected','_showConversationHistory','clearConversationContextUI','setFeedItemAIReplySuggestionPartActive','replyCreated','scrollFeedToSuggestion','error','node','domConverter','mapper','capabilitiesUpdated','createConversation','startAutoScroll','selection','stopInteraction','_openBalloonFor','removeFromContext','changes','showPrevious','toggleLoadingSkeleton','createReply','end','removed','isDisabled','updateResourceState','like','finishInteraction','getRoot','getContentParts','accepted','sourcePosition','destroy','config','_getDocumentRangeForReplyChanges','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','AI_CHAT_RESOURCE_LOAD_FAILED','902GzbYte','filter','text','toString','index','reasoningStarted','AI_BALLOON_HEADER_TITLE','executeCustomItemCallback','setIsMaximized','_updateReplyContent','TrackChanges','close','_aiChatBalloon','$graveyard','updateFeedItemAIReplySuggestionPartState','getAll','startsWith','getFirstRange','forEach','hideFakeVisualSelection','6165698fLrhIk','query','rejectSuggestion','has','startConversation','reasoningFinished','toggleSuggestionDisplayMode','752194TzBLvA','isPremiumPlugin','addContextItem','ai-chat-conversation-init-failed','aiChatBalloon','getReply','ai-chat-context-unsupported-file-type','nextSibling','addFeedItemError','sourceId','removeSelectionFromChatContext','batch','delete','removeFeedInteraction','change','setContextItemLoading','stop','anchorId','rejected','requires','uiId','toggleReasoning','disableControls','AI_CHAT_CONTEXT_FILE_TOO_LARGE','ai-conversation-','_getUserPresentableContentPartDocumentRange','detachFromDom','redo','isCurrentDocumentInConversation','isStarted','AIChatController','setIsUploadInProgress','new','toolDataReceived','view','enableControls','current-document','_toggleWebSearch','ai-chat-source-resources-load-failed','remove','message','getPath','closeSourceResourceBalloon','replyContentUpdated','locale','Undo','AIChatBalloon','activateTab','addContextOptionsChanged','AITabs','AIChatUI','showFakeVisualSelection','_startConversationSafely','showChangeInText','contextItems','_aiConnector','find','main','load','uid','getDocumentData','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionContent','chat','TrackChangesEditing','applySuggestion','startInteraction','path','marker','viewRangeToDom','prepareLoadingMessage','sourceResourcesLoaded','bind','handleUserInteraction','getAttribute','resetWebSearchState'];_0x40ed=function(){return _0x5f5bf9;};return _0x40ed();}import{findOne as _0x484cdd,getAttribute as _0x4b6112,serialize as _0x33812c,Document as _0x54b8e7,findByAttribute as _0x5e9a27}from'../aicore/utils/htmlparser.js';export class AIChatController extends _0x5ebc1f{[_0x4aec30(0x205)];[_0x4aec30(0x158)];[_0x4aec30(0x1aa)];[_0x4aec30(0x264)];[_0x4aec30(0x112)];[_0x4aec30(0x183)]=new Map();[_0x4aec30(0x22e)]=null;[_0x4aec30(0x24c)];static get[_0x4aec30(0x134)](){return[_0x266934,_0x344554];}static get[_0x4aec30(0x25f)](){const _0x33d5e4=_0x4aec30;return _0x33d5e4(0x13f);}static get[_0x4aec30(0x210)](){return!0x0;}static get[_0x4aec30(0x122)](){return!0x0;}[_0x4aec30(0x191)](){const _0x505845=_0x4aec30;this[_0x505845(0x24c)]=new _0x4f508d(this[_0x505845(0x198)][_0x505845(0x14d)]),this[_0x505845(0x24c)][_0x505845(0x24e)](),this[_0x505845(0x158)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x239)),this[_0x505845(0x1aa)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x153)),this[_0x505845(0x205)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x16d)),this[_0x505845(0x264)]=new _0x479555({'connector':this[_0x505845(0x158)],'config':this[_0x505845(0x198)][_0x505845(0x28f)][_0x505845(0x1ec)](_0x505845(0x1e3)),'locale':this[_0x505845(0x198)][_0x505845(0x14d)]});const _0x528971=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x152));this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x11e),()=>{const _0xb0ad61=_0x505845;this[_0xb0ad61(0x155)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x230),(_0x42d155,_0x12e44e)=>{const _0x2f00bf=_0x505845;this[_0x2f00bf(0x21f)]({'userMessage':_0x12e44e});}),this[_0x505845(0x23c)](_0x528971,_0x505845(0x1a7),(_0x397958,_0x19e97e)=>{const _0x1924cd=_0x505845;this[_0x1924cd(0x235)](_0x19e97e);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1d1),()=>{const _0x517078=_0x505845;_0x528971[_0x517078(0x170)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x190),async()=>{const _0x26887f=_0x505845;await this[_0x26887f(0x201)](),await this[_0x26887f(0x215)](),this[_0x26887f(0x12b)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x173),()=>{const _0xd2495=_0x505845;this[_0xd2495(0x1b6)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x177),(_0x1ef4ca,_0x48731c)=>{const _0x1dda12=_0x505845;this[_0x1dda12(0x1af)]?.[_0x1dda12(0x1d6)](Array[_0x1dda12(0x176)](_0x48731c));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1d8),(_0x2be030,_0xb23b9c)=>{const _0x42fab3=_0x505845;this[_0x42fab3(0x1af)]?.[_0x42fab3(0x1d8)](_0xb23b9c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x10d),(_0x1bd8df,_0x3c4ece)=>{const _0x798827=_0x505845;_0x3c4ece[_0x798827(0x251)](this[_0x798827(0x198)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1dc),(_0x59eef6,_0x26706b)=>{const _0x240690=_0x505845;this[_0x240690(0x1af)]?.[_0x240690(0x1dc)](_0x26706b[_0x240690(0x188)],_0x26706b[_0x240690(0x19b)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x204),(_0x1d1490,_0x533b03)=>{const _0x47b253=_0x505845;this[_0x47b253(0x1d9)](_0x533b03);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x17c),(_0x482263,_0x55093a)=>{const _0x163ad6=_0x505845;this[_0x163ad6(0x1af)]?.[_0x163ad6(0x17c)](_0x55093a[_0x163ad6(0x12a)],_0x55093a[_0x163ad6(0x11b)],_0x55093a[_0x163ad6(0x15c)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x227),()=>{const _0x3abc00=_0x505845;this[_0x3abc00(0x146)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x136),()=>{const _0x2ca06b=_0x505845;this[_0x2ca06b(0x1a4)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x260),(_0x351d11,_0xfdfc7c)=>{const _0x2446d5=_0x505845;this[_0x2446d5(0x1af)]?.[_0x2446d5(0x26d)](_0xfdfc7c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x288),(_0x16d432,{replyId:_0x179575})=>{const _0x98befa=_0x505845;console[_0x98befa(0x1da)](_0x98befa(0x228),_0x179575);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1be),(_0x3fbea7,{replyId:_0x4214c8})=>{const _0x410d89=_0x505845;console[_0x410d89(0x1da)](_0x410d89(0x23e),_0x4214c8);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x18b),(_0x5e0655,_0x2c56b3)=>{const _0xea5e68=_0x505845;this[_0xea5e68(0x256)](_0x2c56b3);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x156),(_0x5ef1ef,{replyId:_0x322909,partIndex:_0x18eb4c})=>{const _0x2d6cb1=_0x505845;this[_0x2d6cb1(0x218)]=this[_0x2d6cb1(0x1aa)][_0x2d6cb1(0x1eb)],this[_0x2d6cb1(0x27e)](_0x322909,_0x18eb4c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1bb),(_0x329e6e,{replyId:_0x3383aa,partIndex:_0x3886ad})=>{const _0x4cb39a=_0x505845,_0xb532d=this[_0x4cb39a(0x290)](_0x3383aa,_0x3886ad);_0xb532d&&_0x4cb39a(0x113)!=_0xb532d[_0x4cb39a(0x1c3)][_0x4cb39a(0x1b4)][_0x4cb39a(0x1a2)]&&this[_0x4cb39a(0x205)][_0x4cb39a(0x154)]([_0xb532d[_0x4cb39a(0x1c3)]],_0x4cb39a(0x18e));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x212),()=>{const _0x44d5dc=_0x505845;this[_0x44d5dc(0x205)][_0x44d5dc(0x119)](_0x44d5dc(0x18e));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x162),(_0x461a5a,_0xfcf258)=>{const _0x1b03f5=_0x505845;this[_0x1b03f5(0x205)][_0x1b03f5(0x119)](_0x1b03f5(0x18e)),this[_0x1b03f5(0x1ad)](_0xfcf258);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x120),async(_0x33c973,{replyId:_0x41a4cb,showDiff:_0x398405})=>{const _0x5d5aa7=_0x505845,{reply:_0x35ead9}=this[_0x5d5aa7(0x1d7)](_0x41a4cb),_0x3b2e9a=_0x35ead9[_0x5d5aa7(0x28b)]({'showDiff':_0x398405});await this[_0x5d5aa7(0x1aa)][_0x5d5aa7(0x15f)]({'id':_0x35ead9['id'],'parts':_0x3b2e9a,'renderingStrategy':_0x5d5aa7(0x241)});}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x11c),(_0xd2b27a,{replyId:_0x172a6d,partIndex:_0xefdea9})=>{const _0x32daa7=_0x505845;this[_0x32daa7(0x225)]({'replyId':_0x172a6d,'partIndex':_0xefdea9}),this[_0x32daa7(0x205)][_0x32daa7(0x119)](_0x32daa7(0x18e));}),this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x11d)](_0x505845(0x14f))&&(this[_0x505845(0x112)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x14f)),this[_0x505845(0x24f)](_0x505845(0x218),!0x1),this[_0x505845(0x112)][_0x505845(0x169)](_0x505845(0x1eb))['to'](this,_0x505845(0x218)),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x120),()=>{const _0x496d60=_0x505845,{replyId:_0x4a1a2f,partIndex:_0x1b77ef}=this[_0x496d60(0x22e)];this[_0x496d60(0x218)]=!this[_0x496d60(0x218)];const {reply:_0x36d7df}=this[_0x496d60(0x1d7)](_0x4a1a2f),_0x508b1b=_0x36d7df[_0x496d60(0x28b)]({'showDiff':this[_0x496d60(0x218)],'groupIndex':_0x1b77ef});this[_0x496d60(0x112)][_0x496d60(0x1b7)]({'part':_0x508b1b[0x0],'renderingStrategy':_0x496d60(0x241),'keepErrors':!0x0});}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x162),()=>{const _0x33b31b=_0x505845,{replyId:_0x34f72d,partIndex:_0x50d780}=this[_0x33b31b(0x22e)];this[_0x33b31b(0x1ad)]({'replyId':_0x34f72d,'partIndex':_0x50d780}),this[_0x33b31b(0x112)][_0x33b31b(0x1fd)](_0x33b31b(0x28c));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x18b),()=>{const _0x7920f3=_0x505845,{replyId:_0x215e98,partIndex:_0x373ded}=this[_0x7920f3(0x22e)];this[_0x7920f3(0x256)]({'replyId':_0x215e98,'partIndex':_0x373ded}),this[_0x7920f3(0x112)][_0x7920f3(0x1fd)](_0x7920f3(0x28c));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x11c),()=>{const _0x47f7ca=_0x505845,{replyId:_0x2bd3b6,partIndex:_0x101972}=this[_0x47f7ca(0x22e)];this[_0x47f7ca(0x225)]({'replyId':_0x2bd3b6,'partIndex':_0x101972}),this[_0x47f7ca(0x112)][_0x47f7ca(0x1fd)](_0x47f7ca(0x133));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x21d),()=>{const _0x12b63a=_0x505845,{replyId:_0x57572e,partIndex:_0x5f2ba0}=this[_0x12b63a(0x22e)],_0xa062fa=this[_0x12b63a(0x229)](_0x57572e,_0x5f2ba0,_0x12b63a(0x189));null!==_0xa062fa&&this[_0x12b63a(0x27e)](_0x57572e,_0xa062fa);}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x281),()=>{const _0x370941=_0x505845,{replyId:_0x73ea2d,partIndex:_0x1d1aaa}=this[_0x370941(0x22e)],_0x48a787=this[_0x370941(0x229)](_0x73ea2d,_0x1d1aaa,_0x370941(0x1cf));null!==_0x48a787&&this[_0x370941(0x27e)](_0x73ea2d,_0x48a787);}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x1d5),(_0x560187,{id:_0x164286})=>{const _0x5d2341=_0x505845;if(_0x5d2341(0x125)!==_0x164286)return;const {replyId:_0xde2d5c,partIndex:_0x21b21e}=this[_0x5d2341(0x22e)];this[_0x5d2341(0x22e)]=null,this[_0x5d2341(0x1aa)][_0x5d2341(0x272)]({'id':_0xde2d5c,'index':_0x21b21e,'isActive':!0x1});}));}async[_0x4aec30(0x252)](){const _0xe018e5=_0x4aec30;this[_0xe018e5(0x198)]instanceof _0x18c442?this[_0xe018e5(0x203)](this[_0xe018e5(0x198)]):this[_0xe018e5(0x23c)](this[_0xe018e5(0x198)][_0xe018e5(0x242)],_0xe018e5(0x232),(_0x27ee83,_0x348939)=>{const _0x59eccc=_0xe018e5;_0x348939['on'](_0x59eccc(0x254),()=>{const _0x4941ac=_0x59eccc;this[_0x4941ac(0x203)](_0x348939);});});const _0xf55a4c=this[_0xe018e5(0x198)][_0xe018e5(0x28f)][_0xe018e5(0x1ec)](_0xe018e5(0x1ab));let _0x547026=_0xf55a4c;if(_0xe018e5(0x206)!=_0xf55a4c||(_0x547026=await this[_0xe018e5(0x1f7)](),_0x547026))return _0xe018e5(0x141)==_0x547026?this[_0xe018e5(0x155)]():this[_0xe018e5(0x1bc)](_0x547026);}async[_0x4aec30(0x28e)](){const _0x412752=_0x4aec30;return await this[_0x412752(0x201)](),this[_0x412752(0x24c)][_0x412752(0x13b)](),super[_0x412752(0x28e)]();}[_0x4aec30(0x256)](_0x347bf6){const _0x50f406=_0x4aec30,_0x36efde=_0x290b8e(this[_0x50f406(0x198)]);if(!_0x36efde[_0x50f406(0x175)][_0x50f406(0x11d)](_0x50f406(0x110)))throw new _0x3f52cf(_0x50f406(0x22b),null);const _0x42839d=this[_0x50f406(0x198)][_0x50f406(0x175)][_0x50f406(0x1ec)](_0x50f406(0x1ac)),{reply:_0x13d39e,interaction:_0x2710f4}=this[_0x50f406(0x1d7)](_0x347bf6[_0x50f406(0x213)]),_0x4c6c3c=this[_0x50f406(0x290)](_0x347bf6[_0x50f406(0x213)],_0x347bf6[_0x50f406(0x262)]),_0x8d97a3=void 0x0!==_0x347bf6[_0x50f406(0x262)]?[_0x13d39e[_0x50f406(0x1a5)][_0x347bf6[_0x50f406(0x262)]]]:_0x13d39e[_0x50f406(0x1a5)][_0x50f406(0x294)](_0x1a3435=>_0x50f406(0x1e4)==_0x1a3435[_0x50f406(0x20e)]),_0x4b43be=_0x8d97a3[_0x50f406(0x1fc)](_0x4ba633=>_0x13d39e[_0x50f406(0x1a5)][_0x50f406(0x208)](_0x4ba633));if(!_0x4c6c3c||_0x50f406(0x113)==_0x4c6c3c[_0x50f406(0x1c3)][_0x50f406(0x1b4)][_0x50f406(0x1a2)])return void _0x4b43be[_0x50f406(0x118)](_0x473c1b=>_0x13d39e[_0x50f406(0x1bd)](_0x473c1b,_0x50f406(0x224)));_0x4b43be[_0x50f406(0x118)](_0x34e7c9=>_0x13d39e[_0x50f406(0x1bd)](_0x34e7c9,_0x50f406(0x28c)));const _0x4f7c71=_0xead07c({'editor':_0x36efde,'reply':_0x13d39e,'interaction':_0x2710f4,'groups':_0x8d97a3,'transform':!0x0,'documentCompare':_0x42839d,'documentCompareOptions':{'anchor':_0x50f406(0x15a),'markDeletions':!0x0}});let _0x2119b3;_0x4c6c3c&&this[_0x50f406(0x1c9)](_0x4c6c3c[_0x50f406(0x1c3)]),_0x36efde[_0x50f406(0x193)][_0x50f406(0x12f)](_0x1c1266=>{const _0x119544=_0x50f406;_0x2119b3=_0x1c1266[_0x119544(0x12c)],_0x36efde[_0x119544(0x175)][_0x119544(0x1ec)](_0x119544(0x161))[_0x119544(0x18c)](_0x4f7c71),this[_0x119544(0x205)][_0x119544(0x119)](_0x119544(0x18e));}),this[_0x50f406(0x183)][_0x50f406(0x24f)](_0x2119b3,{'interactionId':_0x2710f4['id'],'replyId':_0x13d39e['id'],'indexes':_0x4b43be[_0x50f406(0x1b8)]()}),this[_0x50f406(0x22c)](_0x13d39e);}[_0x4aec30(0x1ad)](_0x236201){const _0x10dbc6=_0x4aec30,_0x26284c=_0x290b8e(this[_0x10dbc6(0x198)]),_0x4d0b55=this[_0x10dbc6(0x198)][_0x10dbc6(0x175)][_0x10dbc6(0x1ec)](_0x344554),{reply:_0x2ed069,interaction:_0x1213a5}=this[_0x10dbc6(0x1d7)](_0x236201[_0x10dbc6(0x213)]),_0x5a7cb1=this[_0x10dbc6(0x290)](_0x236201[_0x10dbc6(0x213)],_0x236201[_0x10dbc6(0x262)]),_0x5ed088=void 0x0!==_0x236201[_0x10dbc6(0x262)]?[_0x2ed069[_0x10dbc6(0x1a5)][_0x236201[_0x10dbc6(0x262)]]]:_0x2ed069[_0x10dbc6(0x1a5)][_0x10dbc6(0x294)](_0x5c943f=>_0x10dbc6(0x1e4)==_0x5c943f[_0x10dbc6(0x20e)]),_0x3b76d7=_0x5ed088[_0x10dbc6(0x1fc)](_0x67aba2=>_0x2ed069[_0x10dbc6(0x1a5)][_0x10dbc6(0x208)](_0x67aba2));if(!_0x5a7cb1||_0x10dbc6(0x113)==_0x5a7cb1[_0x10dbc6(0x1c3)][_0x10dbc6(0x1b4)][_0x10dbc6(0x1a2)])return void _0x3b76d7[_0x10dbc6(0x118)](_0x598469=>_0x2ed069[_0x10dbc6(0x1bd)](_0x598469,_0x10dbc6(0x224)));_0x3b76d7[_0x10dbc6(0x118)](_0x1311cb=>_0x2ed069[_0x10dbc6(0x1bd)](_0x1311cb,_0x10dbc6(0x28c)));const _0x42afa8=_0xead07c({'editor':_0x26284c,'reply':_0x2ed069,'interaction':_0x1213a5,'groups':_0x5ed088,'transform':!0x0,'documentCompare':_0x4d0b55,'documentCompareOptions':{'anchor':_0x10dbc6(0x15a),'markDeletions':!0x1}});let _0x14b374;_0x5a7cb1&&this[_0x10dbc6(0x1c9)](_0x5a7cb1[_0x10dbc6(0x1c3)]),_0x26284c[_0x10dbc6(0x193)][_0x10dbc6(0x12f)](_0x54073b=>{const _0x20291c=_0x10dbc6;_0x14b374=_0x54073b[_0x20291c(0x12c)];for(const _0x1d35fa of _0x42afa8)_0x1d35fa[_0x20291c(0x184)]=_0x26284c[_0x20291c(0x193)][_0x20291c(0x202)][_0x20291c(0x19a)],_0x41ef8f(_0x26284c,_0x1d35fa),_0x54073b[_0x20291c(0x12c)][_0x20291c(0x1b0)](_0x1d35fa),_0x26284c[_0x20291c(0x193)][_0x20291c(0x1b1)](_0x1d35fa);}),this[_0x10dbc6(0x183)][_0x10dbc6(0x24f)](_0x14b374,{'interactionId':_0x1213a5['id'],'replyId':_0x2ed069['id'],'indexes':_0x3b76d7[_0x10dbc6(0x1b8)]()}),this[_0x10dbc6(0x22c)](_0x2ed069);}[_0x4aec30(0x225)](_0x5dad3b){const _0x2f393a=_0x4aec30,{reply:_0x4f3bc4}=this[_0x2f393a(0x1d7)](_0x5dad3b[_0x2f393a(0x213)]);_0x4f3bc4[_0x2f393a(0x1bd)](_0x5dad3b[_0x2f393a(0x262)],_0x2f393a(0x133));}[_0x4aec30(0x27e)](_0x522719,_0x5f3f29){const _0x31c128=_0x4aec30;if(!this[_0x31c128(0x112)])return;const {reply:_0x366fd9}=this[_0x31c128(0x1d7)](_0x522719),_0x5482fa=_0x366fd9[_0x31c128(0x28b)]({'showDiff':this[_0x31c128(0x218)]});let _0x45263e,_0x13cef4;if(void 0x0!==_0x5f3f29?(_0x13cef4=_0x5482fa[_0x31c128(0x159)](_0x215322=>_0x215322[_0x31c128(0x297)]==_0x5f3f29),_0x45263e=_0x13cef4?.[_0x31c128(0x297)]):(_0x13cef4=_0x5482fa[0x0],_0x45263e=_0x13cef4[_0x31c128(0x297)]),this[_0x31c128(0x22e)]?.[_0x31c128(0x213)]==_0x522719&&this[_0x31c128(0x22e)]?.[_0x31c128(0x262)]==_0x45263e)return;const _0x5c835a=this[_0x31c128(0x13a)](_0x522719,_0x366fd9,_0x13cef4);if(!_0x5c835a)return void this[_0x31c128(0x112)][_0x31c128(0x111)]();this[_0x31c128(0x22e)]={'replyId':_0x522719,'partIndex':_0x45263e},this[_0x31c128(0x1c9)](_0x5c835a,!0x0);const _0x18a9d0=this[_0x31c128(0x229)](_0x522719,_0x45263e,_0x31c128(0x189));this[_0x31c128(0x112)][_0x31c128(0x1b7)]({'part':_0x13cef4,'renderingStrategy':_0x31c128(0x241)}),this[_0x31c128(0x112)][_0x31c128(0x236)]({'index':_0x45263e,'title':_0x21db9d(this[_0x31c128(0x198)][_0x31c128(0x14d)],_0x31c128(0x10c),(_0x45263e+0x1)[_0x31c128(0x296)]()),'showRotator':null!==_0x18a9d0,'ranges':[_0x5c835a],'areActionsDisabled':_0x366fd9[_0x31c128(0x1de)]}),this[_0x31c128(0x112)][_0x31c128(0x1fd)](_0x31c128(0x1e4)),this[_0x31c128(0x1aa)][_0x31c128(0x274)](_0x522719,_0x45263e),this[_0x31c128(0x1aa)][_0x31c128(0x272)]({'id':_0x522719,'index':_0x45263e,'isActive':!0x0});}[_0x4aec30(0x229)](_0x5abd00,_0x3181ee,_0x288883){const _0x361b09=_0x4aec30,{reply:_0x18fbff}=this[_0x361b09(0x1d7)](_0x5abd00),_0x1c6160=_0x18fbff[_0x361b09(0x28b)]({'showDiff':this[_0x361b09(0x218)]});if(0x1==_0x1c6160[_0x361b09(0x238)])return null;const _0x2b5bb8=_0x1c6160[_0x361b09(0x1ee)](_0x5acae0=>_0x5acae0[_0x361b09(0x297)]==_0x3181ee),_0x30e979=_0x361b09(0x189)==_0x288883?0x1:-0x1;let _0x534958=_0x1c6160['at']((_0x2b5bb8+_0x30e979)%_0x1c6160[_0x361b09(0x238)])[_0x361b09(0x297)],_0xa44b4e=_0x1c6160[_0x534958];for(;!this[_0x361b09(0x13a)](_0x5abd00,_0x18fbff,_0xa44b4e);){if(_0x534958=_0x1c6160['at']((_0x534958+_0x30e979)%_0x1c6160[_0x361b09(0x238)])[_0x361b09(0x297)],_0x534958===_0x2b5bb8)return null;_0xa44b4e=_0x1c6160[_0x534958];}return _0x534958;}[_0x4aec30(0x13a)](_0x534aa2,_0x14e6f4,_0x5551ed){const _0x5df857=_0x4aec30,_0x36dc3c=_0x14e6f4[_0x5df857(0x1a5)];if(!_0x5551ed[_0x5df857(0x186)])return null;const _0x1539fc=_0x36dc3c[_0x5df857(0x159)](_0x5588b6=>_0x5588b6[_0x5df857(0x297)]==_0x5551ed[_0x5df857(0x297)]);if(_0x5df857(0x1e4)!==_0x1539fc?.[_0x5df857(0x20e)])return null;const _0x5c979e=this[_0x5df857(0x290)](_0x534aa2,_0x5551ed[_0x5df857(0x297)]);if(!_0x5c979e)return null;const {range:_0x162336,currentIndex:_0x56d0af}=_0x5c979e;return _0x5df857(0x113)==_0x162336[_0x5df857(0x1b4)][_0x5df857(0x1a2)]?(_0x14e6f4[_0x5df857(0x1bd)](_0x56d0af,_0x5df857(0x224)),null):_0x5c979e[_0x5df857(0x1c3)];}[_0x4aec30(0x290)](_0xde782d,_0x776a94){const _0x23a962=_0x4aec30,_0x960e8f=_0x290b8e(this[_0x23a962(0x198)]),{reply:_0x53ad5e,interaction:_0x22c955}=this[_0x23a962(0x1d7)](_0xde782d),_0x4eff3a=_0x53ad5e[_0x23a962(0x1a5)][_0x23a962(0x294)](_0x3fa992=>_0x23a962(0x1e4)==_0x3fa992[_0x23a962(0x20e)]),_0x569e12=_0x4eff3a[_0x23a962(0x1fc)](_0x1a115e=>_0x53ad5e[_0x23a962(0x1a5)][_0x23a962(0x208)](_0x1a115e));void 0x0===_0x776a94&&(_0x776a94=_0x569e12[0x0]);const _0x3e1185=_0x569e12[_0x23a962(0x208)](_0x776a94);if(-0x1==_0x3e1185)return null;const _0x3325e3=_0x4eff3a[_0x3e1185],_0x27bb3d=new _0x54b8e7([]),_0x35496c=new _0x54b8e7([]);for(const _0x27d5e8 of _0x3325e3[_0x23a962(0x280)])if(_0x23a962(0x285)!=_0x27d5e8[_0x23a962(0x1ce)]&&_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x27d5e8[_0x23a962(0x276)][_0x23a962(0x1e2)](!0x0)),_0x23a962(0x141)!=_0x27d5e8[_0x23a962(0x1ce)]){const _0x24a2ad=_0x484cdd(_0x254657=>_0x4b6112(_0x254657,_0x23a962(0x261))==_0x27d5e8['id'],_0x53ad5e[_0x23a962(0x211)],!0x0);_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x24a2ad[_0x23a962(0x1e2)](!0x0));}if(0x0==_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x238)]){if(_0x3325e3[_0x23a962(0x280)][0x0][_0x23a962(0x132)]){const _0x2652d7=_0x5e9a27(_0x23a962(0x261),_0x3325e3[_0x23a962(0x280)][0x0][_0x23a962(0x132)],_0x53ad5e[_0x23a962(0x211)]);_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x1ff)](_0x2652d7[_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x1ff)](_0x2652d7[_0x23a962(0x1e2)](!0x0)),_0x2652d7[_0x23a962(0x128)]&&(_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x2652d7[_0x23a962(0x128)][_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x2652d7[_0x23a962(0x128)][_0x23a962(0x1e2)](!0x0)));}else{const _0x44041e=_0x53ad5e[_0x23a962(0x211)][_0x23a962(0x1d0)][0x0];if(!_0x44041e)return null;_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x44041e[_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x44041e[_0x23a962(0x1e2)](!0x0));}}const _0x3b9fe1=_0x22c955[_0x23a962(0x25e)](),_0x2082ef=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x3b9fe1[_0x23a962(0x1f6)]),_0x23b673=_0x33812c(_0x27bb3d),_0x1d0c5f=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x23b673),_0x29c3e3=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x23b673),_0x58cfb0=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x17b)](_0x1d0c5f,0x0),_0x39e0cc=_0x33812c(_0x35496c),_0x2a2d1a={'anchor':_0x58cfb0,'markDeletions':!0x1},_0x12b090=_0x960e8f[_0x23a962(0x175)][_0x23a962(0x1ec)](_0x344554)[_0x23a962(0x24a)](_0x23b673,_0x39e0cc,_0x2a2d1a)[_0x23a962(0x244)]();if(!_0x12b090[_0x23a962(0x238)])return null;_0x960e8f[_0x23a962(0x193)][_0x23a962(0x12f)](_0x3db23d=>{const _0x2b1add=_0x23a962;for(const _0x23ac29 of _0x12b090)if(_0x2b1add(0x148)==_0x23ac29[_0x2b1add(0x1ce)]){const _0x38f4d7=_0x23ac29[_0x2b1add(0x28d)],_0x3b8711=_0x23ac29[_0x2b1add(0x1c6)],_0x552ad5=new _0x45cacf(_0x38f4d7,_0x3b8711);_0x3db23d[_0x2b1add(0x12c)][_0x2b1add(0x1b0)](_0x552ad5),_0x960e8f[_0x2b1add(0x193)][_0x2b1add(0x1b1)](_0x552ad5);}else _0x2b1add(0x165)!==_0x23ac29[_0x2b1add(0x1ce)]&&(_0x23ac29[_0x2b1add(0x184)]=null,_0x23ac29[_0x2b1add(0x199)]=!0x1,_0x3db23d[_0x2b1add(0x12c)][_0x2b1add(0x1b0)](_0x23ac29),_0x960e8f[_0x2b1add(0x193)][_0x2b1add(0x1b1)](_0x23ac29));});const _0x42b7b5=_0x4101dd(_0x960e8f,_0x12b090,_0x1d0c5f);_0x1ec15d(_0x960e8f[_0x23a962(0x193)],_0x42b7b5);const _0x3a9742=_0x42b7b5[_0x23a962(0x117)]()[_0x23a962(0x265)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x90fbf0=_0x42b7b5[_0x23a962(0x117)]()[_0x23a962(0x284)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x2fbc77=[];let _0x4c70da=_0x1d0c5f,_0x1d45da=_0x29c3e3;for(let _0x3b6761=0x0;_0x3b6761<_0x90fbf0[_0x23a962(0x238)];_0x3b6761++){const _0x186acb=_0x4c70da[_0x23a962(0x1f4)]-_0x90fbf0[_0x3b6761];_0x2fbc77[_0x3b6761]=_0x1d45da[_0x23a962(0x1f4)]-_0x186acb,_0x4c70da=_0x4c70da[_0x23a962(0x1e5)](_0x90fbf0[_0x3b6761]),_0x1d45da=_0x1d45da[_0x23a962(0x1e5)](_0x2fbc77[_0x3b6761]);}const _0x110a43=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1d4)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x29c3e3,_0x3a9742),_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x29c3e3,_0x2fbc77)),_0x4b3a7e=_0x29c3e3[_0x23a962(0x1f1)](0x0)[_0x23a962(0x16b)](_0x2f75ed),_0x1b5296=Array[_0x23a962(0x176)](_0x2082ef[_0x23a962(0x1dd)]())[_0x23a962(0x159)](_0x8d4cdd=>_0x8d4cdd[_0x23a962(0x16b)](_0x2f75ed)==_0x4b3a7e)[_0x23a962(0x14a)](),_0x1f3ccf=_0x110a43[_0x23a962(0x265)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x329ce7=_0x110a43[_0x23a962(0x284)][_0x23a962(0x164)][_0x23a962(0x1b8)]();_0x1f3ccf[0x0]=_0x1b5296[0x0]+_0x1f3ccf[0x0],_0x329ce7[0x0]=_0x1b5296[0x0]+_0x329ce7[0x0];let _0x57a0d2=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1d4)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x28a)](),_0x1f3ccf),_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x28a)](),_0x329ce7));const _0x52ceef=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x25d)][_0x23a962(0x244)](_0x3b9fe1[_0x23a962(0x19a)]);for(const _0xb7f6e0 of _0x52ceef)_0x57a0d2=_0x561fcf[_0x23a962(0x1f5)](_0x57a0d2[_0x23a962(0x1f9)](_0xb7f6e0));return{'range':_0x57a0d2,'currentIndex':_0x776a94};}[_0x4aec30(0x203)](_0x16df4e){const _0x340dfe=_0x4aec30;if(!_0x16df4e[_0x340dfe(0x175)][_0x340dfe(0x11d)](_0x340dfe(0x14e)))return;const _0x56b299=_0x16df4e[_0x340dfe(0x245)][_0x340dfe(0x1ec)](_0x340dfe(0x24b)),_0x1c6563=_0x16df4e[_0x340dfe(0x245)][_0x340dfe(0x1ec)](_0x340dfe(0x13c));this[_0x340dfe(0x23c)](_0x56b299,_0x340dfe(0x182),(_0x5a5381,_0x5e137c,_0x50a974)=>{const _0x13e6c5=_0x340dfe,_0xdcb7df=this[_0x13e6c5(0x183)][_0x13e6c5(0x1ec)](_0x5e137c);if(!_0xdcb7df)return;const _0x21910b=this[_0x13e6c5(0x1af)][_0x13e6c5(0x16f)](_0xdcb7df[_0x13e6c5(0x1f2)])[_0x13e6c5(0x126)](_0xdcb7df[_0x13e6c5(0x213)]);_0xdcb7df[_0x13e6c5(0x181)][_0x13e6c5(0x118)](_0x1607a6=>_0x21910b[_0x13e6c5(0x1bd)](_0x1607a6,_0x13e6c5(0x1e4))),this[_0x13e6c5(0x183)][_0x13e6c5(0x12d)](_0x5e137c),this[_0x13e6c5(0x183)][_0x13e6c5(0x24f)](_0x50a974,_0xdcb7df);}),this[_0x340dfe(0x23c)](_0x1c6563,_0x340dfe(0x182),(_0xb0e19c,_0x59fd0c,_0x3f9f8d)=>{const _0x26cdd2=_0x340dfe,_0x10dfea=this[_0x26cdd2(0x183)][_0x26cdd2(0x1ec)](_0x59fd0c);if(!_0x10dfea)return;const _0x3ba4e7=this[_0x26cdd2(0x1af)][_0x26cdd2(0x16f)](_0x10dfea[_0x26cdd2(0x1f2)])[_0x26cdd2(0x126)](_0x10dfea[_0x26cdd2(0x213)]);_0x10dfea[_0x26cdd2(0x181)][_0x26cdd2(0x118)](_0x1b2efa=>_0x3ba4e7[_0x26cdd2(0x1bd)](_0x1b2efa,_0x26cdd2(0x28c))),this[_0x26cdd2(0x183)][_0x26cdd2(0x12d)](_0x59fd0c),this[_0x26cdd2(0x183)][_0x26cdd2(0x24f)](_0x3f9f8d,_0x10dfea);});}async[_0x4aec30(0x1bc)](_0x509809){const _0x46d259=_0x4aec30;this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x11d)](_0x46d259(0x14f))&&this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x1ec)](_0x46d259(0x14f))[_0x46d259(0x111)](),(this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x1ec)](_0x330bc8)[_0x46d259(0x143)][_0x46d259(0x150)](_0x46d259(0x160)),this[_0x46d259(0x1aa)][_0x46d259(0x194)](_0x46d259(0x241)),this[_0x46d259(0x1aa)][_0x46d259(0x282)](!0x0),await this[_0x46d259(0x201)]());try{await this[_0x46d259(0x158)][_0x46d259(0x214)](_0x509809)[_0x46d259(0x20d)](),await this[_0x46d259(0x155)](_0x509809),this[_0x46d259(0x1db)]('\x20'),await this[_0x46d259(0x1af)][_0x46d259(0x15b)](_0x509809,this[_0x46d259(0x205)][_0x46d259(0x1f3)]),this[_0x46d259(0x1af)][_0x46d259(0x13d)]()&&this[_0x46d259(0x1b6)]();}catch(_0x33b1f4){this[_0x46d259(0x1aa)][_0x46d259(0x129)]({'errorMessage':_0x21db9d(this[_0x46d259(0x198)][_0x46d259(0x14d)],_0x46d259(0x200)),'id':_0x509809}),this[_0x46d259(0x209)](new _0x3f52cf(_0x46d259(0x1ae),this,{'error':_0x33b1f4}));}finally{this[_0x46d259(0x1aa)][_0x46d259(0x27b)](),this[_0x46d259(0x1aa)][_0x46d259(0x194)](_0x46d259(0x217)),this[_0x46d259(0x1aa)][_0x46d259(0x282)](!0x1);}}async[_0x4aec30(0x1f7)](){const _0x35cdf0=_0x4aec30,_0x523eab=this[_0x35cdf0(0x158)][_0x35cdf0(0x1e1)](this[_0x35cdf0(0x246)](),{'limit':0x1,'sortBy':_0x35cdf0(0x1c8)});try{const _0x87a577=await _0x523eab[_0x35cdf0(0x26c)]();return _0x87a577[_0x35cdf0(0x238)]?_0x87a577[0x0]['id']:_0x35cdf0(0x141);}catch(_0x5a31ed){return this[_0x35cdf0(0x1aa)][_0x35cdf0(0x129)]({'errorMessage':_0x21db9d(this[_0x35cdf0(0x198)][_0x35cdf0(0x14d)],_0x35cdf0(0x200)),'id':_0x4720f6()}),this[_0x35cdf0(0x209)](new _0x3f52cf(_0x35cdf0(0x124),this,{'error':_0x5a31ed})),this[_0x35cdf0(0x1aa)][_0x35cdf0(0x282)](!0x1),this[_0x35cdf0(0x1aa)][_0x35cdf0(0x137)](),null;}}[_0x4aec30(0x24d)](_0x115608){const _0x1c142b=_0x4aec30;this[_0x1c142b(0x1af)]['id']===_0x115608&&this[_0x1c142b(0x155)]();}[_0x4aec30(0x1b6)](){const _0x541927=_0x4aec30;this[_0x541927(0x1af)]?.[_0x541927(0x25c)](_0x21db9d(this[_0x541927(0x198)][_0x541927(0x14d)],_0x541927(0x1c7)));}async[_0x4aec30(0x21c)](){const _0x6a5a53=_0x4aec30,_0x243208=this[_0x6a5a53(0x205)][_0x6a5a53(0x20a)]();this[_0x6a5a53(0x1af)]?.[_0x6a5a53(0x243)](_0x243208),this[_0x6a5a53(0x1b6)]();}[_0x4aec30(0x12b)](){const _0x269901=_0x4aec30;this[_0x269901(0x1af)]?.[_0x269901(0x20f)]();}[_0x4aec30(0x20b)](){const _0x3ea81e=_0x4aec30;this[_0x3ea81e(0x1aa)][_0x3ea81e(0x20b)]();}async[_0x4aec30(0x11e)](){const _0x5ec010=_0x4aec30;await this[_0x5ec010(0x155)]();}async[_0x4aec30(0x26a)]({message:_0x3b0807,attributes:_0xdc0d36}){const _0x1bf6cf=_0x4aec30;await this[_0x1bf6cf(0x21f)]({'userMessage':_0x3b0807,'attributes':_0xdc0d36});}[_0x4aec30(0x246)](){const _0x1aa12e=_0x4aec30,_0x353081=this[_0x1aa12e(0x198)][_0x1aa12e(0x28f)][_0x1aa12e(0x1ec)](_0x1aa12e(0x266));if(!_0x353081)throw new _0x3f52cf(_0x1aa12e(0x1a8),this);return _0x353081;}async[_0x4aec30(0x155)](_0x457de0){const _0x5ce60c=_0x4aec30;try{this[_0x5ce60c(0x1aa)][_0x5ce60c(0x144)](),await this[_0x5ce60c(0x1bf)](_0x457de0);}catch(_0x593672){this[_0x5ce60c(0x1aa)][_0x5ce60c(0x129)]({'errorMessage':_0x21db9d(this[_0x5ce60c(0x198)][_0x5ce60c(0x14d)],_0x5ce60c(0x21a)),'id':_0x457de0||_0x4720f6()}),console[_0x5ce60c(0x275)](_0x593672),this[_0x5ce60c(0x1af)]=void 0x0,this[_0x5ce60c(0x1aa)][_0x5ce60c(0x137)]();}}async[_0x4aec30(0x1bf)](_0x4c6e15){const _0x1f4248=_0x4aec30;let _0x52e5bf;this[_0x1f4248(0x198)][_0x1f4248(0x175)][_0x1f4248(0x11d)](_0x1f4248(0x14f))&&this[_0x1f4248(0x198)][_0x1f4248(0x175)][_0x1f4248(0x1ec)](_0x1f4248(0x14f))[_0x1f4248(0x111)](),_0x4c6e15||!this[_0x1f4248(0x1af)]?_0x52e5bf=this[_0x1f4248(0x198)][_0x1f4248(0x28f)][_0x1f4248(0x1ec)](_0x1f4248(0x219)):this[_0x1f4248(0x1aa)][_0x1f4248(0x19c)]&&(_0x52e5bf=this[_0x1f4248(0x1af)][_0x1f4248(0x1c4)]['id']),await this[_0x1f4248(0x201)]();const _0x3c9c20=this[_0x1f4248(0x246)](),_0x6b6ff0=_0x4c6e15||_0x4720f6();this[_0x1f4248(0x1af)]=new _0x5a7bde({'connector':this[_0x1f4248(0x158)],'chatModels':this[_0x1f4248(0x264)],'selectedModelId':_0x52e5bf,'conversationId':_0x6b6ff0,'group':_0x3c9c20,'getEditor':()=>_0x290b8e(this[_0x1f4248(0x198)]),'isFromHistory':!!_0x4c6e15}),this[_0x1f4248(0x1af)][_0x1f4248(0x22f)](_0x1f4248(0x142),_0x1f4248(0x1f8))['to'](this),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x247),(_0x2cfc23,_0x561c47)=>{const _0x3cbdd3=_0x1f4248;this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x27a)](_0x561c47),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x1a6)](),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x1cd)](),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x271)](),_0x4c6e15||(this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x257)](),this[_0x3cbdd3(0x1b6)]());}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x26b),(_0x3a47c6,_0x314f2b)=>{const _0x122d8c=_0x1f4248;this[_0x122d8c(0x1aa)][_0x122d8c(0x140)](_0x314f2b[_0x122d8c(0x22d)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x248),(_0x56808a,_0x1e766c)=>{const _0x2866d8=_0x1f4248;this[_0x2866d8(0x1aa)][_0x2866d8(0x263)](_0x1e766c);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x240),()=>{const _0x563e54=_0x1f4248,_0x2110e2=this[_0x563e54(0x1aa)][_0x563e54(0x167)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0x563e54(0x1aa)][_0x563e54(0x192)](_0x2110e2);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x298),()=>{const _0x3a9532=_0x1f4248,_0x43e54d=this[_0x3a9532(0x1aa)][_0x3a9532(0x167)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x3a9532(0x1aa)][_0x3a9532(0x192)](_0x43e54d);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x220),(_0x1a6a36,_0x2c5c6d)=>{const _0x2743fc=_0x1f4248;this[_0x2743fc(0x1aa)][_0x2743fc(0x255)](_0x2c5c6d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x11f),(_0xfc56d7,_0x3f6e74)=>{const _0x2e88ac=_0x1f4248;this[_0x2e88ac(0x1aa)][_0x2e88ac(0x255)](_0x3f6e74,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1f8),()=>{const _0x2e0b94=_0x1f4248;this[_0x2e0b94(0x1aa)][_0x2e0b94(0x163)]();}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x17a),async()=>{const _0x1ba3c7=_0x1f4248;await this[_0x1ba3c7(0x1aa)][_0x1ba3c7(0x289)]();}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x18f),(_0x485ed7,_0x124fa4)=>{const _0x474ad2=_0x1f4248;this[_0x474ad2(0x1aa)][_0x474ad2(0x12e)](_0x124fa4['id']);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1f0),(_0x61c809,_0x363156,_0x4b7896)=>{const _0x12094d=_0x1f4248;this[_0x12094d(0x1db)](_0x363156,_0x4b7896);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x273),(_0x50e823,_0x28a5cc)=>{const _0x2b557b=_0x1f4248;_0x2b557b(0x295)===_0x28a5cc[_0x2b557b(0x1ce)]?this[_0x2b557b(0x1aa)][_0x2b557b(0x23f)](_0x28a5cc):this[_0x2b557b(0x1aa)][_0x2b557b(0x15e)](_0x28a5cc);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x14c),async(_0x2348be,_0x8ad69e)=>{const _0x14d7f3=_0x1f4248;await this[_0x14d7f3(0x10f)]({'reply':_0x8ad69e});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x197),(_0x5dc1fa,{reply:_0x2fdb42,index:_0x1e54a5,state:_0x3450d3})=>{const _0x31da4c=_0x1f4248;this[_0x31da4c(0x1aa)][_0x31da4c(0x114)]({'id':_0x2fdb42['id'],'index':_0x1e54a5,'state':_0x3450d3}),this[_0x31da4c(0x22e)]?.[_0x31da4c(0x213)][_0x31da4c(0x216)](_0x2fdb42['id'])&&this[_0x31da4c(0x22e)]?.[_0x31da4c(0x262)]==_0x1e54a5&&this[_0x31da4c(0x112)]?.[_0x31da4c(0x1fd)](_0x3450d3);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1a9),(_0x5ccd5f,_0x5a13b2)=>{const _0xd4575b=_0x1f4248;if(this[_0xd4575b(0x1aa)][_0xd4575b(0x123)](_0x5a13b2[_0xd4575b(0x1ba)],_0x5a13b2[_0xd4575b(0x25a)]),_0xd4575b(0x27c)===_0x5a13b2[_0xd4575b(0x1ba)][_0xd4575b(0x1ce)]){const _0x2d13b5=[..._0x290b8e(this[_0xd4575b(0x198)])[_0xd4575b(0x193)][_0xd4575b(0x202)][_0xd4575b(0x27c)][_0xd4575b(0x1fa)]()];this[_0xd4575b(0x205)][_0xd4575b(0x154)](_0x2d13b5,_0xd4575b(0x139)+this[_0xd4575b(0x1af)]?.['id']);}}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x172),(_0x26cd34,_0x2f2d34)=>{const _0x1c3a02=_0x1f4248;this[_0x1c3a02(0x1aa)][_0x1c3a02(0x204)](_0x2f2d34[_0x1c3a02(0x135)]),_0x1c3a02(0x145)==_0x2f2d34[_0x1c3a02(0x135)]&&this[_0x1c3a02(0x12b)](),_0x1c3a02(0x27c)===_0x2f2d34[_0x1c3a02(0x1ce)]&&this[_0x1c3a02(0x205)][_0x1c3a02(0x119)](_0x1c3a02(0x139)+this[_0x1c3a02(0x1af)]?.['id']);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1ea),(_0x2b3336,_0x12920b)=>{const _0x2c32ad=_0x1f4248;this[_0x2c32ad(0x1aa)][_0x2c32ad(0x130)](_0x12920b[_0x2c32ad(0x1ba)][_0x2c32ad(0x135)],_0x12920b[_0x2c32ad(0x25a)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x19f),(_0x14fb63,_0x45036f)=>{const _0x3d406c=_0x1f4248;this[_0x3d406c(0x1aa)][_0x3d406c(0x1c1)](_0x45036f[_0x3d406c(0x157)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x151),(_0x4be9af,_0x48b993)=>{const _0x3bde14=_0x1f4248;this[_0x3bde14(0x1aa)][_0x3bde14(0x185)](_0x48b993[_0x3bde14(0x1e0)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x168),(_0x2a1bbb,_0x3cc889)=>{const _0x1647e9=_0x1f4248;this[_0x1647e9(0x1aa)][_0x1647e9(0x17f)](_0x3cc889[_0x1647e9(0x12a)],_0x3cc889[_0x1647e9(0x188)],_0x3cc889[_0x1647e9(0x222)],_0x3cc889[_0x1647e9(0x15c)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1df),(_0x3889e4,_0x456332)=>{const _0x272923=_0x1f4248;this[_0x272923(0x1aa)][_0x272923(0x287)](_0x456332[_0x272923(0x12a)],_0x456332[_0x272923(0x17d)],_0x456332[_0x272923(0x1d2)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x279),(_0x2ef689,_0x4146a6)=>{const _0x589c7f=_0x1f4248;this[_0x589c7f(0x1aa)][_0x589c7f(0x19e)](_0x4146a6);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x26f),async(_0x481473,_0x50b8a2)=>{const _0x1987a3=_0x1f4248,_0x225848=(await this[_0x1987a3(0x264)][_0x1987a3(0x115)]())[_0x1987a3(0x159)](_0x1948f6=>_0x1948f6['id']===_0x50b8a2[_0x1987a3(0x1c4)]?.['id'])||null;this[_0x1987a3(0x1aa)][_0x1987a3(0x233)](_0x225848,_0x50b8a2[_0x1987a3(0x286)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x275),(_0x909f22,{error:_0x3c4060,interactionId:_0x1dfb8c,fileName:_0x42247a,url:_0x2d541f,sourceId:_0x1427ba,sourceLabel:_0x2ab8b5})=>{const _0xb14ba9=_0x1f4248,_0x129db2=_0x1dfb8c?_0x1dfb8c+':'+_0x4720f6():_0x4720f6();_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1cc))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x231)]({'staticMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1ef)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x124))||_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1b5))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x21a)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1d3))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x179),_0x42247a),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x174))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1fb),_0x2d541f),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x249))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x23d)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x259))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1e8)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x147))?(_0x1427ba&&this[_0xb14ba9(0x1aa)][_0xb14ba9(0x14b)](_0x1427ba),this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x291),_0x2ab8b5||_0xb14ba9(0x188)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x221))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x292)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1a3))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x178)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x127))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x269)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x234))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x138)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x258))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x187)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1cb))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x237)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1a0)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060));}),await this[_0x1f4248(0x1af)][_0x1f4248(0x191)](this[_0x1f4248(0x198)][_0x1f4248(0x28f)][_0x1f4248(0x1ec)](_0x1f4248(0x17e))),_0x4c6e15||await this[_0x1f4248(0x1af)][_0x1f4248(0x265)]();}async[_0x4aec30(0x21f)]({userMessage:_0x796e6e,attributes:_0x5b4976}){const _0x5641ad=_0x4aec30;if(!this[_0x5641ad(0x1af)])throw new _0x3f52cf(_0x5641ad(0x1e6));if(this[_0x5641ad(0x1af)][_0x5641ad(0x1b3)]()){const _0x17a232=await this[_0x5641ad(0x205)][_0x5641ad(0x15d)]();await this[_0x5641ad(0x1af)][_0x5641ad(0x1c5)](_0x17a232);}this[_0x5641ad(0x1af)]['id']&&this[_0x5641ad(0x1af)][_0x5641ad(0x13e)]&&await this[_0x5641ad(0x1af)][_0x5641ad(0x16a)]({'userMessage':_0x796e6e,'attributes':_0x5b4976});}[_0x4aec30(0x270)](){const _0x310d29=_0x4aec30;console[_0x310d29(0x1da)](_0x310d29(0x16e));}[_0x4aec30(0x235)](_0x2e6270){const _0x21fd25=_0x4aec30;this[_0x21fd25(0x1aa)][_0x21fd25(0x10e)](_0x2e6270);}[_0x4aec30(0x209)](_0x52bd02){const _0x10aabe=_0x4aec30;_0x306496(_0x52bd02[_0x10aabe(0x149)]);}[_0x4aec30(0x1d9)](_0x44133c){const _0x5de069=_0x4aec30;this[_0x5de069(0x1af)]?.[_0x5de069(0x27f)](_0x44133c);}[_0x4aec30(0x146)](){const _0x79d522=_0x4aec30;this[_0x79d522(0x1af)]?.[_0x79d522(0x227)]();}[_0x4aec30(0x1a4)](){const _0x54a72c=_0x4aec30;this[_0x54a72c(0x1af)]?.[_0x54a72c(0x136)]();}[_0x4aec30(0x1d7)](_0xb8aaa4){const _0x3e82ce=_0x4aec30,[_0x120933,_0x42afe1]=_0xb8aaa4[_0x3e82ce(0x207)](':'),_0x72261e=this[_0x3e82ce(0x1af)][_0x3e82ce(0x16f)](_0x120933),_0x1b3a40=_0x72261e[_0x3e82ce(0x126)](_0x42afe1);return{'interaction':_0x72261e,'reply':_0x1b3a40};}[_0x4aec30(0x1c9)](_0x316152,_0x32ce86=!0x1){const _0x3236f9=_0x4aec30,_0x3b4e35=_0x290b8e(this[_0x3236f9(0x198)]),_0x3ff9ed={'target':_0x3b4e35[_0x3236f9(0x23a)][_0x3236f9(0x143)][_0x3236f9(0x277)][_0x3236f9(0x166)](_0x3b4e35[_0x3236f9(0x23a)][_0x3236f9(0x278)][_0x3236f9(0x180)](_0x316152)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x32ce86};_0x32ce86&&(_0x3ff9ed[_0x3236f9(0x1ca)]=!0x0),_0x59f77d(_0x3ff9ed);}[_0x4aec30(0x1db)](_0x8cb4cb,_0x5547da=!0x1){const _0x42fbdc=_0x4aec30;this[_0x42fbdc(0x1aa)][_0x42fbdc(0x1f0)](_0x8cb4cb||_0x21db9d(this[_0x42fbdc(0x198)][_0x42fbdc(0x14d)],_0x42fbdc(0x18a)),_0x5547da);}async[_0x4aec30(0x10f)]({reply:_0x381995,renderingStrategy:_0xff338d}){const _0x1f8631=_0x4aec30,{id:_0x375bd5,interactionId:_0x4ce8e7,isDone:_0x5a71ca,type:_0x479293,parsedContent:_0x5e98c7}=_0x381995,_0x5c5eef=_0x4ce8e7+':'+_0x375bd5;if(_0x1f8631(0x25b)===_0x479293){const _0x37f1f8=_0x381995[_0x1f8631(0x28b)]({'showDiff':this[_0x1f8631(0x1aa)][_0x1f8631(0x1eb)]});await this[_0x1f8631(0x1aa)][_0x1f8631(0x15f)]({'id':_0x5c5eef,'parts':_0x37f1f8,'renderingStrategy':_0xff338d,'isDone':_0x5a71ca});}else _0x1f8631(0x295)===_0x479293&&await this[_0x1f8631(0x1aa)][_0x1f8631(0x1fe)]({'id':_0x5c5eef,'parsedContent':_0x5e98c7,'renderingStrategy':_0xff338d,'isDone':_0x5a71ca});_0x5a71ca&&_0x381995[_0x1f8631(0x196)][_0x1f8631(0x238)]>0x0&&this[_0x1f8631(0x1aa)][_0x1f8631(0x1ed)](_0x5c5eef,_0x381995[_0x1f8631(0x196)]);}async[_0x4aec30(0x201)](){const _0x57eef4=_0x4aec30,_0x3e5909=this[_0x57eef4(0x1af)]?.[_0x57eef4(0x223)];_0x3e5909&&(_0x3e5909[_0x57eef4(0x131)](),this[_0x57eef4(0x1aa)][_0x57eef4(0x27d)](_0x3e5909));}async[_0x4aec30(0x215)](){const _0x3cb086=_0x4aec30,_0x1d14f2=this[_0x3cb086(0x1af)]?.[_0x3cb086(0x223)];if(_0x1d14f2){for await(const _0x4f6e96 of _0x1d14f2[_0x3cb086(0x268)])await this[_0x3cb086(0x10f)]({'reply':_0x4f6e96,'renderingStrategy':_0x3cb086(0x241)});}}[_0x4aec30(0x22c)](_0x2a388f){const _0x2600b7=_0x4aec30,_0x32e0b7={'positiveCount':_0x2a388f[_0x2600b7(0x1a5)][_0x2600b7(0x294)](_0x3d2bed=>_0x2600b7(0x28c)===_0x3d2bed[_0x2600b7(0x20e)])[_0x2600b7(0x238)],'totalCount':_0x2a388f[_0x2600b7(0x1a5)][_0x2600b7(0x238)],'modificationId':_0x2a388f['id']},_0x572098=this[_0x2600b7(0x1af)][_0x2600b7(0x16f)](_0x2a388f[_0x2600b7(0x1f2)])[_0x2600b7(0x226)];_0x572098&&this[_0x2600b7(0x158)][_0x2600b7(0x1e9)](this[_0x2600b7(0x1af)]['id'],_0x572098,_0x32e0b7);}[_0x4aec30(0x171)](_0x5e6343){const _0x58bf86=_0x4aec30;let _0x5e461=null,_0x47f95a=null;this['on'](_0x58bf86(0x142),(_0x56ac52,_0x57fb8d,_0x3fb62c)=>{const _0x7ab809=_0x58bf86;_0x3fb62c['id']!==_0x5e461&&(_0x5e461=_0x3fb62c['id'],_0x47f95a=this[_0x7ab809(0x1a1)](_0x3fb62c)),_0x5e6343(_0x57fb8d,_0x47f95a);});}[_0x4aec30(0x1a1)](_0x5caafa){const _0x322e10=_0x4aec30,_0x49b20e=this[_0x322e10(0x1aa)],_0x2fdce6=()=>{const _0x17e981=_0x322e10;_0x5caafa[_0x17e981(0x16c)](),_0x5caafa[_0x17e981(0x23b)](),_0x49b20e[_0x17e981(0x195)]();},_0x16bcc0=()=>{const _0x57f55f=_0x322e10;_0x5caafa[_0x57f55f(0x1c2)]&&(_0x5caafa[_0x57f55f(0x1c2)][_0x57f55f(0x1c0)](),_0x5caafa[_0x57f55f(0x1c2)]=void 0x0);};return{'insertTextReply':(_0x55cd49,_0x153529)=>{const _0x6ed317=_0x322e10;_0x16bcc0(),_0x2fdce6();const _0x5e703e=_0x5caafa[_0x6ed317(0x1c2)]=_0x5caafa[_0x6ed317(0x283)]({'type':_0x6ed317(0x295),'interactionId':_0x5caafa['id'],'content':_0x55cd49,'id':_0x153529||_0x4720f6()});return _0x16bcc0(),_0x5e703e;},'insertCustomElement':async(_0x46ebab,_0x3a138d)=>(_0x16bcc0(),_0x2fdce6(),_0x49b20e[_0x322e10(0x21e)](_0x46ebab,_0x3a138d||_0x4720f6())),'setLoadingMessage':_0x4f5a73=>{const _0x3148cd=_0x322e10;_0x49b20e[_0x3148cd(0x192)](_0x4f5a73);},'clearLoadingMessage':()=>{const _0x927592=_0x322e10;_0x49b20e[_0x927592(0x195)]();}};}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x5b30e0=_0x208a;(function(_0x3f2555,_0x36db1c){const _0x122913=_0x208a,_0x4fc272=_0x3f2555();while(!![]){try{const _0x360610=parseInt(_0x122913(0x127))/0x1*(-parseInt(_0x122913(0x160))/0x2)+parseInt(_0x122913(0x19c))/0x3*(parseInt(_0x122913(0x153))/0x4)+-parseInt(_0x122913(0x139))/0x5*(-parseInt(_0x122913(0x185))/0x6)+parseInt(_0x122913(0x1bf))/0x7*(parseInt(_0x122913(0x178))/0x8)+-parseInt(_0x122913(0x170))/0x9*(parseInt(_0x122913(0x12c))/0xa)+-parseInt(_0x122913(0x1b6))/0xb+parseInt(_0x122913(0x1ac))/0xc;if(_0x360610===_0x36db1c)break;else _0x4fc272['push'](_0x4fc272['shift']());}catch(_0x571fa7){_0x4fc272['push'](_0x4fc272['shift']());}}}(_0x3c6c,0x62c91));import{ContextPlugin as _0x14576b}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x482524}from'ckeditor5/src/utils.js';import{AIChatView as _0x522b38}from'./ui/aichatview.js';import{AITabs as _0x15c315}from'../aitabs/aitabs.js';import{getTranslation as _0x2b4b9a}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x19435b}from'ckeditor5/src/icons.js';function _0x208a(_0x3a4771,_0x8ec7ad){const _0x3c6c77=_0x3c6c();return _0x208a=function(_0x208a49,_0x28276a){_0x208a49=_0x208a49-0x11c;let _0x605e65=_0x3c6c77[_0x208a49];return _0x605e65;},_0x208a(_0x3a4771,_0x8ec7ad);}import{AIChatFeedInteractionHeaderView as _0x2a22d5}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x2035af}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3cb218}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x3c6c(){const _0x58bf21=['conversationCreated','36417LGehOb','user-message','setIsMaximized','chatControls','from','clearConversationContextUI','isBusy','clearLoadingMessage','isDone','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','isVisible','updateSuggestionItem','removeFeedItem','updateWebSources','contextItems','setFeedItemAIReplySuggestionPartActive','4895040HzJrAB','removeItem','bind','interaction-header','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','value','updateFeedItemAIReplySuggestionPartState','updateSuggestionPartState','AIChatUI','AITabs','2280201oLpUrH','setModelList','ai.chat.context.searchInputVisibleFrom','setInputPlaceholder','addFeedItemCustomElement','setFeedItemRenderingStrategy','trackChanges','updateResourceState','enableControls','23807gzGeNK','values','startAutoScroll','chatHeader','conversation-start','filter','prepareLoadingMessage','commands','userMessage','isMaximized','addFeedItemAIReply','areActionsDisabled','scrollToSuggestion','get','isTrackChangesOn','addItem','stopAutoScroll','addFeedItemError','startInteraction','capabilities','isDisabled','setReasoning','setContextItemLoading','destroy','AI_CHAT_WELCOME_MESSAGE','length','addFeedInteractionHeader','stopInteraction','queueEmptyPromise','54667QABPYu','requires','createConversation','isModelAvailable','locale','6330bKYzKz','finishInteraction','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','_view','markItemAsDone','toggleLoadingSkeleton','_interactionPromiseResolver','resetConversationTitle','addFeedItemAISuggestion','_animateConversationTitle','last','clearPendingContextUI','updateFeedInteractionHeader','10dwMTnz','updateFeedItemAIReplySources','chat','ai-suggestion-reply','setLoadingMessage','setWebSearch','remove','_promiseQueue','updateFeedItemAIReplySuggestionContent','isPremiumPlugin','setModel','markFeedItemAsDone','view','hasItem','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','removeContextItem','resetMessageInput','displayedPrompt','interactionId','availableModels','plugins','attributes','focusPromptInput','startsWith','chatFeed','isReasoningEnabled','204NctLda','disableControls','forEach','TrackChanges','</p>','children','context','custom-element','updateReplyItem','_titleAnimationInterval','abort','addFeedItemUserMessage','setIsUploadInProgress','22bezCEi','getItemIds','toggleSuggestionDisplayMode','enableModelSelector','addFeedItemStaticMessage','showResizeButton','ai-reply','populateSourceResourceBalloon','ai.chat.welcomeMessage','then','options','isWebSearchEnabled','updateFeedItemAIReplyContent','clear','delegate','closeSourceResourceBalloon','3582SWWpGQ','setConversationTitle','set','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','addTab','ai.availableReplyActions','hasFeedItem','setPromptInputValue','48qfzeSU','setConversationContext','insertSuggestion','config','isPending','label','showDiff','AI_CHAT_HEADING','scrollFeedToSuggestion','streaming','error-message','has','setAddContextOptions','1253316noYNkB','setSelectedModel','<p>','enqueue','addContextItem','updateCapabilities','ai.models.showModelSelector','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setSuggestionPartActive','disableModelSelector','removeFeedInteraction','renderingStrategy','isOfficialPlugin','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','pluginName','_getInputPlaceholder','find','_isTrackChangesCommandValueBound','fire','isLoading','feedItemRenderingStrategy'];_0x3c6c=function(){return _0x58bf21;};return _0x3c6c();}import{getEditorFromContext as _0xdcfe5}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x1b7ec6}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x14576b{static get[_0x5b30e0(0x128)](){return[_0x15c315];}[_0x5b30e0(0x12f)];static get[_0x5b30e0(0x194)](){const _0x4254a7=_0x5b30e0;return _0x4254a7(0x1b4);}static get[_0x5b30e0(0x192)](){return!0x0;}static get[_0x5b30e0(0x142)](){return!0x0;}[_0x5b30e0(0x19a)]=_0x5b30e0(0x181);[_0x5b30e0(0x17e)]=!0x0;[_0x5b30e0(0x140)];[_0x5b30e0(0x132)];[_0x5b30e0(0x15c)]=void 0x0;[_0x5b30e0(0x197)]=!0x1;constructor(_0x57a970){const _0x308d03=_0x5b30e0;super(_0x57a970);const _0x47fec1=this[_0x308d03(0x159)][_0x308d03(0x14d)][_0x308d03(0x1cc)](_0x308d03(0x1b5));this[_0x308d03(0x172)](_0x308d03(0x1a2),!0x1),this[_0x308d03(0x140)]=new _0x2035af(),this[_0x308d03(0x12f)]=new _0x522b38(this[_0x308d03(0x159)][_0x308d03(0x12b)],{'showResizeButton':_0x47fec1[_0x308d03(0x165)],'contextResourcesSearchInputVisibleFrom':this[_0x308d03(0x159)][_0x308d03(0x17b)][_0x308d03(0x1cc)](_0x308d03(0x1b8))}),this[_0x308d03(0x12f)][_0x308d03(0x16e)](..._0x3cb218)['to'](this),this[_0x308d03(0x12f)]['on'](_0x308d03(0x162),(_0x4b62c3,{showDiff:_0x3b08e3})=>{const _0x401391=_0x308d03;this[_0x401391(0x17e)]=_0x3b08e3;}),_0x47fec1[_0x308d03(0x145)][_0x308d03(0x174)]({'id':_0x308d03(0x13b),'buttonLabel':_0x2b4b9a(this[_0x308d03(0x159)][_0x308d03(0x12b)],_0x308d03(0x17f)),'buttonIcon':_0x19435b,'order':0x0,'content':this[_0x308d03(0x12f)]}),this[_0x308d03(0x12f)][_0x308d03(0x19f)][_0x308d03(0x1ae)](_0x308d03(0x199))['to'](this,_0x308d03(0x1a2),_0x2b4a61=>_0x2b4a61),this[_0x308d03(0x12f)][_0x308d03(0x151)][_0x308d03(0x1ae)](_0x308d03(0x17c))['to'](this,_0x308d03(0x1a2),_0x26fa56=>_0x26fa56),this[_0x308d03(0x12f)][_0x308d03(0x19f)][_0x308d03(0x1b9)](this[_0x308d03(0x195)]()),this[_0x308d03(0x1ae)](_0x308d03(0x12a))['to'](this[_0x308d03(0x12f)][_0x308d03(0x19f)],_0x308d03(0x12a));}[_0x5b30e0(0x121)](){const _0x42136b=_0x5b30e0;super[_0x42136b(0x121)](),this[_0x42136b(0x15c)]&&clearInterval(this[_0x42136b(0x15c)]);}[_0x5b30e0(0x129)](_0x5d3476){const _0x3f7764=_0x5b30e0,_0x55f8da=this[_0x3f7764(0x159)][_0x3f7764(0x17b)][_0x3f7764(0x1cc)](_0x3f7764(0x168))??_0x2b4b9a(this[_0x3f7764(0x159)][_0x3f7764(0x12b)],_0x3f7764(0x122));this[_0x3f7764(0x12f)][_0x3f7764(0x151)][_0x3f7764(0x16d)](),this[_0x3f7764(0x12f)][_0x3f7764(0x19f)][_0x3f7764(0x163)](),this[_0x3f7764(0x12f)][_0x3f7764(0x19f)][_0x3f7764(0x1b7)](_0x5d3476[_0x3f7764(0x14c)],!this[_0x3f7764(0x159)][_0x3f7764(0x17b)][_0x3f7764(0x1cc)](_0x3f7764(0x18b))),this[_0x3f7764(0x164)]({'id':_0x3f7764(0x1c3),'staticMessage':_0x55f8da}),this[_0x3f7764(0x198)](_0x3f7764(0x19b));}[_0x5b30e0(0x164)]({id:_0x318dfd,staticMessage:_0x260f52}){const _0xd3b4a=_0x5b30e0;this[_0xd3b4a(0x12f)][_0xd3b4a(0x151)][_0xd3b4a(0x1ce)](_0xd3b4a(0x166),{'id':_0x318dfd,'initialContent':_0xd3b4a(0x187)+_0x260f52+_0xd3b4a(0x157)});}[_0x5b30e0(0x15e)](_0x34f1be){const _0x5e3f4c=_0x5b30e0,_0x13b511=_0x34f1be[_0x5e3f4c(0x14e)]?.[_0x5e3f4c(0x14a)]||_0x34f1be[_0x5e3f4c(0x1c7)];this[_0x5e3f4c(0x12f)][_0x5e3f4c(0x151)][_0x5e3f4c(0x1ce)](_0x5e3f4c(0x19d),{'contextItems':Array[_0x5e3f4c(0x1a0)](_0x34f1be[_0x5e3f4c(0x1aa)][_0x5e3f4c(0x1c0)]()),'initialContent':_0x5e3f4c(0x187)+_0x13b511+_0x5e3f4c(0x157),'id':_0x34f1be['id']});}[_0x5b30e0(0x1d0)]({errorMessage:_0x3d4ef3,id:_0x3cf878}){const _0x43f0d9=_0x5b30e0;this[_0x43f0d9(0x12f)][_0x43f0d9(0x151)][_0x43f0d9(0x1ce)](_0x43f0d9(0x182),{'initialContent':_0x43f0d9(0x187)+_0x3d4ef3+_0x43f0d9(0x157),'id':_0x3cf878});}[_0x5b30e0(0x1c9)](_0x8fba42){const _0x55b14f=_0x5b30e0;return this[_0x55b14f(0x140)][_0x55b14f(0x188)](async()=>{const _0x1e050d=_0x55b14f;this[_0x1e050d(0x12f)][_0x1e050d(0x151)][_0x1e050d(0x1ce)](_0x1e050d(0x166),{'id':_0x8fba42[_0x1e050d(0x14b)]+':'+_0x8fba42['id']}),this[_0x1e050d(0x1a3)]();});}async[_0x5b30e0(0x134)](_0x1e76fe){const _0x31ba4e=_0x5b30e0,_0x5d0ed3=_0xdcfe5(this[_0x31ba4e(0x159)]);let _0x4587c9=_0x5d0ed3[_0x31ba4e(0x17b)][_0x31ba4e(0x1cc)](_0x31ba4e(0x175))||[..._0x1b7ec6];if(_0x5d0ed3[_0x31ba4e(0x14d)][_0x31ba4e(0x183)](_0x31ba4e(0x156))){if(!this[_0x31ba4e(0x197)]){this[_0x31ba4e(0x197)]=!0x0;const _0x3007a3=_0x5d0ed3[_0x31ba4e(0x1c6)][_0x31ba4e(0x1cc)](_0x31ba4e(0x1bc));this[_0x31ba4e(0x12f)][_0x31ba4e(0x151)][_0x31ba4e(0x1ae)](_0x31ba4e(0x1cd))['to'](_0x3007a3,_0x31ba4e(0x1b1));}}else _0x4587c9=_0x4587c9[_0x31ba4e(0x1c4)](_0x3c5562=>_0x31ba4e(0x17a)!=_0x3c5562);return this[_0x31ba4e(0x140)][_0x31ba4e(0x188)](async()=>{const _0x5e22c0=_0x31ba4e;this[_0x5e22c0(0x12f)][_0x5e22c0(0x151)][_0x5e22c0(0x1ce)](_0x5e22c0(0x13c),{'id':_0x1e76fe[_0x5e22c0(0x14b)]+':'+_0x1e76fe['id'],'areActionsDisabled':_0x1e76fe[_0x5e22c0(0x1ca)],'showDiff':this[_0x5e22c0(0x17e)],'availableActions':_0x4587c9}),this[_0x5e22c0(0x1a3)]();});}[_0x5b30e0(0x124)](_0x102e31,_0x1cca37){const _0x3458aa=_0x5b30e0,_0x28037a=this[_0x3458aa(0x12f)][_0x3458aa(0x151)][_0x3458aa(0x158)][_0x3458aa(0x136)];if(_0x28037a instanceof _0x2a22d5)return this[_0x3458aa(0x12f)][_0x3458aa(0x151)][_0x3458aa(0x158)][_0x3458aa(0x13f)](_0x28037a),void this[_0x3458aa(0x12f)][_0x3458aa(0x151)][_0x3458aa(0x1ce)](_0x3458aa(0x1af),{'id':_0x102e31['id'],'capabilities':{'isWebSearchEnabled':_0x28037a[_0x3458aa(0x11d)][_0x3458aa(0x16b)]||_0x1cca37[_0x3458aa(0x16b)],'isReasoningEnabled':_0x28037a[_0x3458aa(0x11d)][_0x3458aa(0x152)]||_0x1cca37[_0x3458aa(0x152)]}});this[_0x3458aa(0x12f)][_0x3458aa(0x151)][_0x3458aa(0x1ce)](_0x3458aa(0x1af),{'id':_0x102e31['id'],'capabilities':_0x1cca37});}async[_0x5b30e0(0x1ba)](_0x5f76ae,_0x78105c){const _0x8cfa3c=_0x5b30e0;let _0x3a6034;return await this[_0x8cfa3c(0x140)][_0x8cfa3c(0x188)](async()=>{const _0x281e45=_0x8cfa3c;_0x3a6034=this[_0x281e45(0x12f)][_0x281e45(0x151)][_0x281e45(0x1ce)](_0x281e45(0x15a),{'content':_0x5f76ae,'id':_0x78105c});}),_0x3a6034;}[_0x5b30e0(0x1a8)](_0x4f8f1a){const _0x3bc284=_0x5b30e0;this[_0x3bc284(0x12f)][_0x3bc284(0x151)][_0x3bc284(0x1ad)](_0x4f8f1a);}[_0x5b30e0(0x176)](_0x41b23c){const _0x257bd5=_0x5b30e0;return this[_0x257bd5(0x12f)][_0x257bd5(0x151)][_0x257bd5(0x146)](_0x41b23c);}[_0x5b30e0(0x138)](_0x458317){const _0x2799e2=_0x5b30e0,_0x22d187=this[_0x2799e2(0x12f)][_0x2799e2(0x151)][_0x2799e2(0x158)][_0x2799e2(0x196)](_0x471b1e=>_0x471b1e[_0x2799e2(0x16a)]['id']==_0x458317['id']&&_0x471b1e instanceof _0x2a22d5);_0x22d187&&_0x22d187[_0x2799e2(0x172)](_0x2799e2(0x1a6),_0x458317[_0x2799e2(0x1a6)]);}async[_0x5b30e0(0x16c)](_0x4290db){const _0x11c6a2=_0x5b30e0,_0x4b433b=_0x4290db[_0x11c6a2(0x191)]||this[_0x11c6a2(0x19a)];return this[_0x11c6a2(0x140)][_0x11c6a2(0x188)](async _0x4e7c3a=>{const _0x3a0348=_0x11c6a2;await this[_0x3a0348(0x12f)][_0x3a0348(0x151)][_0x3a0348(0x15b)]({..._0x4290db,'abortSignal':_0x4e7c3a,'renderingStrategy':_0x4b433b}),_0x4290db[_0x3a0348(0x1a4)]&&this[_0x3a0348(0x144)](_0x4290db['id']);});}[_0x5b30e0(0x13a)](_0xbf7792,_0x3070d5){const _0x22cdc4=_0x5b30e0;this[_0x22cdc4(0x12f)][_0x22cdc4(0x151)][_0x22cdc4(0x1a9)](_0xbf7792,_0x3070d5);}async[_0x5b30e0(0x141)](_0x3a2c95){const _0x1236df=_0x5b30e0,_0x26039b=_0x3a2c95[_0x1236df(0x191)]||this[_0x1236df(0x19a)];return this[_0x1236df(0x140)][_0x1236df(0x188)](async _0x45c77a=>{const _0x3a6c35=_0x1236df;await this[_0x3a6c35(0x12f)][_0x3a6c35(0x151)][_0x3a6c35(0x1a7)]({..._0x3a2c95,'abortSignal':_0x45c77a,'renderingStrategy':_0x26039b}),_0x3a2c95[_0x3a6c35(0x1a4)]&&this[_0x3a6c35(0x144)](_0x3a2c95['id']);});}[_0x5b30e0(0x1b2)](_0x4d390b){const _0x333323=_0x5b30e0;this[_0x333323(0x12f)][_0x333323(0x151)][_0x333323(0x1b3)](_0x4d390b);}[_0x5b30e0(0x1ab)](_0x425437){const _0x3e7537=_0x5b30e0;this[_0x3e7537(0x12f)][_0x3e7537(0x151)][_0x3e7537(0x18e)](_0x425437);}[_0x5b30e0(0x144)](_0x5f38cd){const _0x307feb=_0x5b30e0;this[_0x307feb(0x12f)][_0x307feb(0x151)][_0x307feb(0x130)](_0x5f38cd);}[_0x5b30e0(0x190)](_0x44cf46){const _0x492cf6=_0x5b30e0;this[_0x492cf6(0x12f)][_0x492cf6(0x151)][_0x492cf6(0x161)]()[_0x492cf6(0x1c4)](_0x251083=>_0x251083[_0x492cf6(0x150)](_0x44cf46))[_0x492cf6(0x155)](_0xb113a0=>this[_0x492cf6(0x12f)][_0x492cf6(0x151)][_0x492cf6(0x1ad)](_0xb113a0));}[_0x5b30e0(0x11c)](){const _0x22a2fc=_0x5b30e0,_0x51d44f=this[_0x22a2fc(0x1c5)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x22a2fc(0x13d)](_0x51d44f),this[_0x22a2fc(0x12f)][_0x22a2fc(0x19f)][_0x22a2fc(0x18f)](!this[_0x22a2fc(0x159)][_0x22a2fc(0x17b)][_0x22a2fc(0x1cc)](_0x22a2fc(0x18b))),this[_0x22a2fc(0x1a2)]=!0x0,this[_0x22a2fc(0x12f)][_0x22a2fc(0x151)][_0x22a2fc(0x1c1)]();}[_0x5b30e0(0x125)](_0x430127){const _0x3d1f0d=_0x5b30e0;this[_0x3d1f0d(0x140)][_0x3d1f0d(0x15d)](),this[_0x3d1f0d(0x12f)][_0x3d1f0d(0x151)][_0x3d1f0d(0x161)]()[_0x3d1f0d(0x1c4)](_0x1cac3b=>_0x1cac3b[_0x3d1f0d(0x150)](_0x430127['id']))[_0x3d1f0d(0x155)](_0x5e0790=>this[_0x3d1f0d(0x144)](_0x5e0790)),this[_0x3d1f0d(0x1a2)]=!0x1,this[_0x3d1f0d(0x12f)][_0x3d1f0d(0x151)][_0x3d1f0d(0x1cf)]();}async[_0x5b30e0(0x12d)](){const _0x48bdd6=_0x5b30e0;return this[_0x48bdd6(0x140)][_0x48bdd6(0x126)][_0x48bdd6(0x169)](()=>{const _0x1eb5a7=_0x48bdd6;this[_0x1eb5a7(0x1a2)]=!0x1,this[_0x1eb5a7(0x12f)][_0x1eb5a7(0x151)][_0x1eb5a7(0x1cf)]();});}[_0x5b30e0(0x189)](_0x5e679a,_0x557493){const _0x33e6f3=_0x5b30e0;this[_0x33e6f3(0x12f)][_0x33e6f3(0x19f)][_0x33e6f3(0x189)](_0x5e679a,_0x557493);}[_0x5b30e0(0x148)](_0x55ef29){const _0x350dc7=_0x5b30e0;this[_0x350dc7(0x12f)][_0x350dc7(0x19f)][_0x350dc7(0x148)](_0x55ef29);}[_0x5b30e0(0x120)](_0x2f9557,_0x9da9a7){const _0x329dd5=_0x5b30e0;this[_0x329dd5(0x12f)][_0x329dd5(0x19f)][_0x329dd5(0x120)](_0x2f9557,_0x9da9a7);}[_0x5b30e0(0x15f)](_0x41d0aa){const _0x1036b9=_0x5b30e0;this[_0x1036b9(0x12f)][_0x1036b9(0x19f)][_0x1036b9(0x15f)](_0x41d0aa);}[_0x5b30e0(0x179)](_0x3e64a5){const _0x209f11=_0x5b30e0;this[_0x209f11(0x12f)][_0x209f11(0x19f)][_0x209f11(0x179)](_0x3e64a5);}[_0x5b30e0(0x137)](){const _0xff7998=_0x5b30e0;this[_0xff7998(0x12f)][_0xff7998(0x19f)][_0xff7998(0x137)]();}[_0x5b30e0(0x1a1)](){const _0x1d8454=_0x5b30e0;this[_0x1d8454(0x12f)][_0x1d8454(0x19f)][_0x1d8454(0x1a1)]();}[_0x5b30e0(0x1bd)](_0x1fd275,_0x3fea39,_0x4ca928){const _0x4247fd=_0x5b30e0;this[_0x4247fd(0x12f)][_0x4247fd(0x19f)][_0x4247fd(0x1bd)](_0x1fd275,_0x3fea39,_0x4ca928);}[_0x5b30e0(0x149)](){const _0x39831d=_0x5b30e0;this[_0x39831d(0x12f)][_0x39831d(0x19f)][_0x39831d(0x149)](),this[_0x39831d(0x12f)][_0x39831d(0x19f)][_0x39831d(0x1b9)](this[_0x39831d(0x195)]());}[_0x5b30e0(0x184)](_0x3e5525){const _0x18bc23=_0x5b30e0;this[_0x18bc23(0x12f)][_0x18bc23(0x19f)][_0x18bc23(0x184)](_0x3e5525);}[_0x5b30e0(0x18a)](_0x2c6df3){const _0x153e19=_0x5b30e0;this[_0x153e19(0x12f)][_0x153e19(0x19f)][_0x153e19(0x13e)](_0x2c6df3[_0x153e19(0x16b)]),this[_0x153e19(0x12f)][_0x153e19(0x19f)][_0x153e19(0x11f)](_0x2c6df3[_0x153e19(0x152)]),this[_0x153e19(0x12f)][_0x153e19(0x19f)][_0x153e19(0x1b9)](this[_0x153e19(0x195)](_0x2c6df3));}[_0x5b30e0(0x186)](_0x28c88a,_0x1bb7d0){const _0x57fd29=_0x5b30e0;this[_0x57fd29(0x12f)][_0x57fd29(0x19f)][_0x57fd29(0x143)](_0x28c88a),_0x1bb7d0&&this[_0x57fd29(0x12f)][_0x57fd29(0x19f)][_0x57fd29(0x18f)](!0x1);}[_0x5b30e0(0x1bb)](_0x49810e){const _0x20ddec=_0x5b30e0;this[_0x20ddec(0x19a)]=_0x49810e;}[_0x5b30e0(0x131)](_0x48ed37){const _0x5d36c6=_0x5b30e0;this[_0x5d36c6(0x12f)][_0x5d36c6(0x151)][_0x5d36c6(0x131)](_0x48ed37);}[_0x5b30e0(0x133)](){const _0x1fa503=_0x5b30e0;this[_0x1fa503(0x171)](_0x2b4b9a(this[_0x1fa503(0x159)][_0x1fa503(0x12b)],_0x1fa503(0x17f)));}[_0x5b30e0(0x171)](_0x28f682,_0x77ccac=!0x1){const _0x27a691=_0x5b30e0;if(_0x77ccac&&!_0x482524()&&_0x28f682[_0x27a691(0x123)])return this[_0x27a691(0x12f)][_0x27a691(0x1c2)][_0x27a691(0x17d)]='',void this[_0x27a691(0x135)](_0x28f682);this[_0x27a691(0x12f)][_0x27a691(0x1c2)][_0x27a691(0x17d)]=_0x28f682;}[_0x5b30e0(0x13d)](_0x54e7a1){const _0x280158=_0x5b30e0;this[_0x280158(0x12f)][_0x280158(0x151)][_0x280158(0x13d)](_0x54e7a1);}[_0x5b30e0(0x1a3)](){const _0x439e07=_0x5b30e0;this[_0x439e07(0x12f)][_0x439e07(0x151)][_0x439e07(0x13d)]('');}[_0x5b30e0(0x135)](_0x2b273f){const _0x4e730f=_0x5b30e0;let _0x346267=0x0;clearInterval(this[_0x4e730f(0x15c)]),this[_0x4e730f(0x15c)]=setInterval(()=>{const _0x5af928=_0x4e730f;this[_0x5af928(0x12f)][_0x5af928(0x1c2)][_0x5af928(0x17d)]=this[_0x5af928(0x12f)][_0x5af928(0x1c2)][_0x5af928(0x17d)]+_0x2b273f[_0x346267],_0x346267++,_0x346267===_0x2b273f[_0x5af928(0x123)]&&clearInterval(this[_0x5af928(0x15c)]);},0x1e);}[_0x5b30e0(0x19e)](_0x1d290c){const _0x3495fa=_0x5b30e0;this[_0x3495fa(0x12f)][_0x3495fa(0x1c2)][_0x3495fa(0x1c8)]=_0x1d290c;}[_0x5b30e0(0x1c5)](_0x3736cd){const _0x4c334f=_0x5b30e0;return _0x3736cd[_0x4c334f(0x16b)]&&_0x3736cd[_0x4c334f(0x152)]?_0x2b4b9a(this[_0x4c334f(0x159)][_0x4c334f(0x12b)],_0x4c334f(0x18d)):_0x3736cd[_0x4c334f(0x16b)]?_0x2b4b9a(this[_0x4c334f(0x159)][_0x4c334f(0x12b)],_0x4c334f(0x193)):_0x3736cd[_0x4c334f(0x152)]?_0x2b4b9a(this[_0x4c334f(0x159)][_0x4c334f(0x12b)],_0x4c334f(0x1b0)):_0x2b4b9a(this[_0x4c334f(0x159)][_0x4c334f(0x12b)],_0x4c334f(0x147));}[_0x5b30e0(0x195)](_0x300035){const _0x4afb78=_0x5b30e0;return _0x300035?_0x300035[_0x4afb78(0x16b)]&&_0x300035[_0x4afb78(0x152)]?_0x2b4b9a(this[_0x4afb78(0x159)][_0x4afb78(0x12b)],_0x4afb78(0x18c)):_0x300035[_0x4afb78(0x16b)]?_0x2b4b9a(this[_0x4afb78(0x159)][_0x4afb78(0x12b)],_0x4afb78(0x1a5)):_0x300035[_0x4afb78(0x152)]?_0x2b4b9a(this[_0x4afb78(0x159)][_0x4afb78(0x12b)],_0x4afb78(0x173)):_0x2b4b9a(this[_0x4afb78(0x159)][_0x4afb78(0x12b)],_0x4afb78(0x12e)):_0x2b4b9a(this[_0x4afb78(0x159)][_0x4afb78(0x12b)],_0x4afb78(0x12e));}[_0x5b30e0(0x167)](_0x2ae011,_0x5ef07b,_0x2ffda9,_0x1993ae){const _0x18eb84=_0x5b30e0;this[_0x18eb84(0x12f)][_0x18eb84(0x167)](_0x2ae011,_0x5ef07b,_0x2ffda9,_0x1993ae);}[_0x5b30e0(0x16f)](_0x214f76){const _0x2224a7=_0x5b30e0;this[_0x2224a7(0x12f)][_0x2224a7(0x16f)](_0x214f76);}[_0x5b30e0(0x177)](_0x4b626b){const _0x1c9468=_0x5b30e0;this[_0x1c9468(0x12f)][_0x1c9468(0x19f)][_0x1c9468(0x177)](_0x4b626b);}[_0x5b30e0(0x14f)](_0x414a9f=!0x1){const _0x2ba998=_0x5b30e0;this[_0x2ba998(0x12f)][_0x2ba998(0x19f)][_0x2ba998(0x14f)](_0x414a9f);}[_0x5b30e0(0x180)](_0x43cb43,_0x3ce7d5){const _0x8a74a8=_0x5b30e0;this[_0x8a74a8(0x12f)][_0x8a74a8(0x151)][_0x8a74a8(0x1cb)](_0x43cb43,_0x3ce7d5);}[_0x5b30e0(0x1c1)](){const _0x157f0a=_0x5b30e0;this[_0x157f0a(0x12f)][_0x157f0a(0x151)][_0x157f0a(0x1c1)]();}[_0x5b30e0(0x154)](){const _0x3e6d52=_0x5b30e0;this[_0x3e6d52(0x12f)][_0x3e6d52(0x19f)][_0x3e6d52(0x11e)]=!0x0;}[_0x5b30e0(0x1be)](){const _0x4f91ad=_0x5b30e0;this[_0x4f91ad(0x12f)][_0x4f91ad(0x19f)][_0x4f91ad(0x11e)]=!0x1;}}
|
|
23
|
+
function _0x49b6(){const _0x2e7011=['custom-element','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionPartState','commands','view','queueEmptyPromise','_titleAnimationInterval','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','error-message','interactionId','clearPendingContextUI','setWebSearch','_isTrackChangesCommandValueBound','updateFeedInteractionHeader','scrollFeedToSuggestion','updateSuggestionItem','setModelList','config','get','chatControls','removeFeedItem','hasItem','streaming','setSuggestionPartActive','pluginName','_interactionPromiseResolver','feedItemRenderingStrategy','setLoadingMessage','ai.models.showModelSelector','enqueue','30854730iVsNav','784780SnZkHB','toggleSuggestionDisplayMode','2835548FJgxSm','conversation-start','addItem','find','isOfficialPlugin','AI_CHAT_HEADING','addFeedItemStaticMessage','isPending','_view','AI_CHAT_WELCOME_MESSAGE','_getInputPlaceholder','startsWith','updateWebSources','updateFeedItemAIReplySources','ai.availableReplyActions','addFeedItemAIReply','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','updateReplyItem','value','userMessage','bind','addFeedInteractionHeader','areActionsDisabled','AITabs','addContextItem','setAddContextOptions','last','isBusy','renderingStrategy','removeContextItem','ai.chat.welcomeMessage','has','ai-reply','scrollToSuggestion','children','updateFeedItemAIReplySuggestionContent','isLoading','showDiff','isPremiumPlugin','toggleLoadingSkeleton','abort','_promiseQueue','setConversationContext','TrackChanges','chat','remove','insertSuggestion','setConversationTitle','trackChanges','17122ajRvRw','updateResourceState','plugins','prepareLoadingMessage','locale','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','disableControls','isDisabled','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','removeFeedInteraction','markFeedItemAsDone','resetConversationTitle','options','updateFeedItemAIReplyContent','finishInteraction','delegate','interaction-header','user-message','attributes','stopInteraction','ai.chat.context.searchInputVisibleFrom','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','startInteraction','forEach','createConversation','ai-suggestion-reply','clearConversationContextUI','resetMessageInput','conversationCreated','then','label','startAutoScroll','updateCapabilities','clearLoadingMessage','319404NHpEub','isWebSearchEnabled','isDone','setIsMaximized','enableControls','showResizeButton','updateSuggestionPartState','fire','addFeedItemUserMessage','AIChatUI','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','chatFeed','closeSourceResourceBalloon','isVisible','displayedPrompt','setIsUploadInProgress','setReasoning','isReasoningEnabled','217rhSeQM','enableModelSelector','chatHeader','setSelectedModel','_animateConversationTitle','capabilities','</p>','setContextItemLoading','context','filter','availableModels','addFeedItemError','removeItem','getItemIds','populateSourceResourceBalloon','addTab','from','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','2028090hfrksF','isMaximized','setModel','381FXlvmf','destroy','markItemAsDone','isModelAvailable','128pdiyMk','clear','setFeedItemAIReplySuggestionPartActive','focusPromptInput','length','contextItems','requires','<p>','addFeedItemCustomElement','277317lEMyfA','set','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','isTrackChangesOn','values','setFeedItemRenderingStrategy','disableModelSelector','setPromptInputValue','setInputPlaceholder','stopAutoScroll','hasFeedItem'];_0x49b6=function(){return _0x2e7011;};return _0x49b6();}const _0x225ccf=_0x43ba;(function(_0x5328f2,_0x492856){const _0x195ed6=_0x43ba,_0x15fe2d=_0x5328f2();while(!![]){try{const _0x28d991=-parseInt(_0x195ed6(0x1d6))/0x1+-parseInt(_0x195ed6(0x209))/0x2*(-parseInt(_0x195ed6(0x19f))/0x3)+-parseInt(_0x195ed6(0x1d8))/0x4+parseInt(_0x195ed6(0x19c))/0x5+-parseInt(_0x195ed6(0x22b))/0x6*(parseInt(_0x195ed6(0x18a))/0x7)+parseInt(_0x195ed6(0x1a3))/0x8*(-parseInt(_0x195ed6(0x1ac))/0x9)+parseInt(_0x195ed6(0x1d5))/0xa;if(_0x28d991===_0x492856)break;else _0x15fe2d['push'](_0x15fe2d['shift']());}catch(_0x162702){_0x15fe2d['push'](_0x15fe2d['shift']());}}}(_0x49b6,0xe5d61));import{ContextPlugin as _0x400b68}from'ckeditor5/src/core.js';import{_isMotionReduced as _0xa6660b}from'ckeditor5/src/utils.js';import{AIChatView as _0x571ea7}from'./ui/aichatview.js';import{AITabs as _0x41ca55}from'../aitabs/aitabs.js';function _0x43ba(_0x212258,_0x35e4a7){const _0x49b6bb=_0x49b6();return _0x43ba=function(_0x43ba98,_0x1c86b7){_0x43ba98=_0x43ba98-0x186;let _0x44d2c9=_0x49b6bb[_0x43ba98];return _0x44d2c9;},_0x43ba(_0x212258,_0x35e4a7);}import{getTranslation as _0xc9fde0}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x4fb30a}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x12bdfc}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x3b0821}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x13db97}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x4f536b}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x5d97f4}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x400b68{static get[_0x225ccf(0x1a9)](){return[_0x41ca55];}[_0x225ccf(0x1e0)];static get[_0x225ccf(0x1cf)](){const _0x1d1731=_0x225ccf;return _0x1d1731(0x234);}static get[_0x225ccf(0x1dc)](){return!0x0;}static get[_0x225ccf(0x1fe)](){return!0x0;}[_0x225ccf(0x1d1)]=_0x225ccf(0x1cd);[_0x225ccf(0x1fd)]=!0x0;[_0x225ccf(0x201)];[_0x225ccf(0x1d0)];[_0x225ccf(0x1bd)]=void 0x0;[_0x225ccf(0x1c3)]=!0x1;constructor(_0x3eabe9){const _0x589eac=_0x225ccf;super(_0x3eabe9);const _0x3ed6c1=this[_0x589eac(0x192)][_0x589eac(0x20b)][_0x589eac(0x1c9)](_0x589eac(0x1ef));this[_0x589eac(0x1ad)](_0x589eac(0x1f3),!0x1),this[_0x589eac(0x201)]=new _0x3b0821(),this[_0x589eac(0x1e0)]=new _0x571ea7(this[_0x589eac(0x192)][_0x589eac(0x20d)],{'showResizeButton':_0x3ed6c1[_0x589eac(0x230)],'contextResourcesSearchInputVisibleFrom':this[_0x589eac(0x192)][_0x589eac(0x1c8)][_0x589eac(0x1c9)](_0x589eac(0x21d))}),this[_0x589eac(0x1e0)][_0x589eac(0x218)](..._0x13db97)['to'](this),this[_0x589eac(0x1e0)]['on'](_0x589eac(0x1d7),(_0x3e994f,{showDiff:_0xa6ee5b})=>{const _0x405a47=_0x589eac;this[_0x405a47(0x1fd)]=_0xa6ee5b;}),_0x3ed6c1[_0x589eac(0x1bb)][_0x589eac(0x199)]({'id':_0x589eac(0x204),'buttonLabel':_0xc9fde0(this[_0x589eac(0x192)][_0x589eac(0x20d)],_0x589eac(0x1dd)),'buttonIcon':_0x4fb30a,'order':0x0,'content':this[_0x589eac(0x1e0)]}),this[_0x589eac(0x1e0)][_0x589eac(0x1ca)][_0x589eac(0x1ec)](_0x589eac(0x1fc))['to'](this,_0x589eac(0x1f3),_0x5dc1ef=>_0x5dc1ef),this[_0x589eac(0x1e0)][_0x589eac(0x236)][_0x589eac(0x1ec)](_0x589eac(0x1df))['to'](this,_0x589eac(0x1f3),_0x13da81=>_0x13da81),this[_0x589eac(0x1e0)][_0x589eac(0x1ca)][_0x589eac(0x1b4)](this[_0x589eac(0x1e2)]()),this[_0x589eac(0x1ec)](_0x589eac(0x1a2))['to'](this[_0x589eac(0x1e0)][_0x589eac(0x1ca)],_0x589eac(0x1a2));}[_0x225ccf(0x1a0)](){const _0xf6ac1e=_0x225ccf;super[_0xf6ac1e(0x1a0)](),this[_0xf6ac1e(0x1bd)]&&clearInterval(this[_0xf6ac1e(0x1bd)]);}[_0x225ccf(0x221)](_0x4baf1f){const _0x59416e=_0x225ccf,_0xd6cf6b=this[_0x59416e(0x192)][_0x59416e(0x1c8)][_0x59416e(0x1c9)](_0x59416e(0x1f6))??_0xc9fde0(this[_0x59416e(0x192)][_0x59416e(0x20d)],_0x59416e(0x1e1));this[_0x59416e(0x1e0)][_0x59416e(0x236)][_0x59416e(0x1a4)](),this[_0x59416e(0x1e0)][_0x59416e(0x1ca)][_0x59416e(0x18b)](),this[_0x59416e(0x1e0)][_0x59416e(0x1ca)][_0x59416e(0x1c7)](_0x4baf1f[_0x59416e(0x194)],!this[_0x59416e(0x192)][_0x59416e(0x1c8)][_0x59416e(0x1c9)](_0x59416e(0x1d3))),this[_0x59416e(0x1de)]({'id':_0x59416e(0x1d9),'staticMessage':_0xd6cf6b}),this[_0x59416e(0x232)](_0x59416e(0x225));}[_0x225ccf(0x1de)]({id:_0xed680e,staticMessage:_0x32d413}){const _0x17f51f=_0x225ccf;this[_0x17f51f(0x1e0)][_0x17f51f(0x236)][_0x17f51f(0x1da)](_0x17f51f(0x1f8),{'id':_0xed680e,'initialContent':_0x17f51f(0x1aa)+_0x32d413+_0x17f51f(0x190)});}[_0x225ccf(0x233)](_0x317153){const _0x3011aa=_0x225ccf,_0x3b6eb4=_0x317153[_0x3011aa(0x21b)]?.[_0x3011aa(0x186)]||_0x317153[_0x3011aa(0x1eb)];this[_0x3011aa(0x1e0)][_0x3011aa(0x236)][_0x3011aa(0x1da)](_0x3011aa(0x21a),{'contextItems':Array[_0x3011aa(0x19a)](_0x317153[_0x3011aa(0x1a8)][_0x3011aa(0x1b0)]()),'initialContent':_0x3011aa(0x1aa)+_0x3b6eb4+_0x3011aa(0x190),'id':_0x317153['id']});}[_0x225ccf(0x195)]({errorMessage:_0x49c9a6,id:_0x40023e}){const _0x468e26=_0x225ccf;this[_0x468e26(0x1e0)][_0x468e26(0x236)][_0x468e26(0x1da)](_0x468e26(0x1bf),{'initialContent':_0x468e26(0x1aa)+_0x49c9a6+_0x468e26(0x190),'id':_0x40023e});}[_0x225ccf(0x1e7)](_0x555b21){const _0x21d2e9=_0x225ccf;return this[_0x21d2e9(0x201)][_0x21d2e9(0x1d4)](async()=>{const _0x2a98cf=_0x21d2e9;this[_0x2a98cf(0x1e0)][_0x2a98cf(0x236)][_0x2a98cf(0x1da)](_0x2a98cf(0x1f8),{'id':_0x555b21[_0x2a98cf(0x1c0)]+':'+_0x555b21['id']}),this[_0x2a98cf(0x22a)]();});}async[_0x225ccf(0x1b8)](_0x559878){const _0x408365=_0x225ccf,_0x532a04=_0x4f536b(this[_0x408365(0x192)]);let _0x3b9777=_0x532a04[_0x408365(0x1c8)][_0x408365(0x1c9)](_0x408365(0x1e6))||[..._0x5d97f4];if(_0x532a04[_0x408365(0x20b)][_0x408365(0x1f7)](_0x408365(0x203))){if(!this[_0x408365(0x1c3)]){this[_0x408365(0x1c3)]=!0x0;const _0x25fb7d=_0x532a04[_0x408365(0x1ba)][_0x408365(0x1c9)](_0x408365(0x208));this[_0x408365(0x1e0)][_0x408365(0x236)][_0x408365(0x1ec)](_0x408365(0x1af))['to'](_0x25fb7d,_0x408365(0x1ea));}}else _0x3b9777=_0x3b9777[_0x408365(0x193)](_0x2bc4e4=>_0x408365(0x206)!=_0x2bc4e4);return this[_0x408365(0x201)][_0x408365(0x1d4)](async()=>{const _0x203718=_0x408365;this[_0x203718(0x1e0)][_0x203718(0x236)][_0x203718(0x1da)](_0x203718(0x222),{'id':_0x559878[_0x203718(0x1c0)]+':'+_0x559878['id'],'areActionsDisabled':_0x559878[_0x203718(0x1ee)],'showDiff':this[_0x203718(0x1fd)],'availableActions':_0x3b9777}),this[_0x203718(0x22a)]();});}[_0x225ccf(0x1ed)](_0x2e0d1d,_0x4ac061){const _0x5b19bb=_0x225ccf,_0x5e7070=this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1fa)][_0x5b19bb(0x1f2)];if(_0x5e7070 instanceof _0x12bdfc)return this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1fa)][_0x5b19bb(0x205)](_0x5e7070),void this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1da)](_0x5b19bb(0x219),{'id':_0x2e0d1d['id'],'capabilities':{'isWebSearchEnabled':_0x5e7070[_0x5b19bb(0x18f)][_0x5b19bb(0x22c)]||_0x4ac061[_0x5b19bb(0x22c)],'isReasoningEnabled':_0x5e7070[_0x5b19bb(0x18f)][_0x5b19bb(0x189)]||_0x4ac061[_0x5b19bb(0x189)]}});this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1da)](_0x5b19bb(0x219),{'id':_0x2e0d1d['id'],'capabilities':_0x4ac061});}async[_0x225ccf(0x1ab)](_0x26d719,_0x12ea44){const _0x393a91=_0x225ccf;let _0x2acec0;return await this[_0x393a91(0x201)][_0x393a91(0x1d4)](async()=>{const _0x3e4dac=_0x393a91;_0x2acec0=this[_0x3e4dac(0x1e0)][_0x3e4dac(0x236)][_0x3e4dac(0x1da)](_0x3e4dac(0x1b7),{'content':_0x26d719,'id':_0x12ea44});}),_0x2acec0;}[_0x225ccf(0x1cb)](_0x39c890){const _0x4128b5=_0x225ccf;this[_0x4128b5(0x1e0)][_0x4128b5(0x236)][_0x4128b5(0x196)](_0x39c890);}[_0x225ccf(0x1b6)](_0x151b03){const _0x5f4b59=_0x225ccf;return this[_0x5f4b59(0x1e0)][_0x5f4b59(0x236)][_0x5f4b59(0x1cc)](_0x151b03);}[_0x225ccf(0x1c4)](_0x48f0f1){const _0x61e29e=_0x225ccf,_0x303536=this[_0x61e29e(0x1e0)][_0x61e29e(0x236)][_0x61e29e(0x1fa)][_0x61e29e(0x1db)](_0x32d4ea=>_0x32d4ea[_0x61e29e(0x215)]['id']==_0x48f0f1['id']&&_0x32d4ea instanceof _0x12bdfc);_0x303536&&_0x303536[_0x61e29e(0x1ad)](_0x61e29e(0x238),_0x48f0f1[_0x61e29e(0x238)]);}async[_0x225ccf(0x216)](_0x57e927){const _0x3eb301=_0x225ccf,_0x1d9dea=_0x57e927[_0x3eb301(0x1f4)]||this[_0x3eb301(0x1d1)];return this[_0x3eb301(0x201)][_0x3eb301(0x1d4)](async _0x4fe9d4=>{const _0x519243=_0x3eb301;await this[_0x519243(0x1e0)][_0x519243(0x236)][_0x519243(0x1e9)]({..._0x57e927,'abortSignal':_0x4fe9d4,'renderingStrategy':_0x1d9dea}),_0x57e927[_0x519243(0x22d)]&&this[_0x519243(0x213)](_0x57e927['id']);});}[_0x225ccf(0x1e5)](_0x4bb13f,_0x1bed50){const _0x487af1=_0x225ccf;this[_0x487af1(0x1e0)][_0x487af1(0x236)][_0x487af1(0x1e4)](_0x4bb13f,_0x1bed50);}async[_0x225ccf(0x1fb)](_0x8522e3){const _0x369404=_0x225ccf,_0x433b62=_0x8522e3[_0x369404(0x1f4)]||this[_0x369404(0x1d1)];return this[_0x369404(0x201)][_0x369404(0x1d4)](async _0x5f3dc7=>{const _0x1f25e6=_0x369404;await this[_0x1f25e6(0x1e0)][_0x1f25e6(0x236)][_0x1f25e6(0x1c6)]({..._0x8522e3,'abortSignal':_0x5f3dc7,'renderingStrategy':_0x433b62}),_0x8522e3[_0x1f25e6(0x22d)]&&this[_0x1f25e6(0x213)](_0x8522e3['id']);});}[_0x225ccf(0x1b9)](_0x5efc09){const _0x58c043=_0x225ccf;this[_0x58c043(0x1e0)][_0x58c043(0x236)][_0x58c043(0x231)](_0x5efc09);}[_0x225ccf(0x1a5)](_0x567f22){const _0x107a9a=_0x225ccf;this[_0x107a9a(0x1e0)][_0x107a9a(0x236)][_0x107a9a(0x1ce)](_0x567f22);}[_0x225ccf(0x213)](_0x365f2e){const _0x464000=_0x225ccf;this[_0x464000(0x1e0)][_0x464000(0x236)][_0x464000(0x1a1)](_0x365f2e);}[_0x225ccf(0x212)](_0x35582f){const _0x4785ad=_0x225ccf;this[_0x4785ad(0x1e0)][_0x4785ad(0x236)][_0x4785ad(0x197)]()[_0x4785ad(0x193)](_0x5dd3de=>_0x5dd3de[_0x4785ad(0x1e3)](_0x35582f))[_0x4785ad(0x220)](_0x564bd8=>this[_0x4785ad(0x1e0)][_0x4785ad(0x236)][_0x4785ad(0x196)](_0x564bd8));}[_0x225ccf(0x21f)](){const _0x455743=_0x225ccf,_0x207f04=this[_0x455743(0x20c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x455743(0x1d2)](_0x207f04),this[_0x455743(0x1e0)][_0x455743(0x1ca)][_0x455743(0x1b2)](!this[_0x455743(0x192)][_0x455743(0x1c8)][_0x455743(0x1c9)](_0x455743(0x1d3))),this[_0x455743(0x1f3)]=!0x0,this[_0x455743(0x1e0)][_0x455743(0x236)][_0x455743(0x228)]();}[_0x225ccf(0x21c)](_0x26b4c9){const _0x302251=_0x225ccf;this[_0x302251(0x201)][_0x302251(0x200)](),this[_0x302251(0x1e0)][_0x302251(0x236)][_0x302251(0x197)]()[_0x302251(0x193)](_0x5e884b=>_0x5e884b[_0x302251(0x1e3)](_0x26b4c9['id']))[_0x302251(0x220)](_0x344cb1=>this[_0x302251(0x213)](_0x344cb1)),this[_0x302251(0x1f3)]=!0x1,this[_0x302251(0x1e0)][_0x302251(0x236)][_0x302251(0x1b5)]();}async[_0x225ccf(0x217)](){const _0x4e7e4b=_0x225ccf;return this[_0x4e7e4b(0x201)][_0x4e7e4b(0x1bc)][_0x4e7e4b(0x226)](()=>{const _0x1b8085=_0x4e7e4b;this[_0x1b8085(0x1f3)]=!0x1,this[_0x1b8085(0x1e0)][_0x1b8085(0x236)][_0x1b8085(0x1b5)]();});}[_0x225ccf(0x1f0)](_0x407d1a,_0x517902){const _0x16c91d=_0x225ccf;this[_0x16c91d(0x1e0)][_0x16c91d(0x1ca)][_0x16c91d(0x1f0)](_0x407d1a,_0x517902);}[_0x225ccf(0x1f5)](_0x171c79){const _0xc56ba=_0x225ccf;this[_0xc56ba(0x1e0)][_0xc56ba(0x1ca)][_0xc56ba(0x1f5)](_0x171c79);}[_0x225ccf(0x191)](_0x53f495,_0x410451){const _0x27f0f5=_0x225ccf;this[_0x27f0f5(0x1e0)][_0x27f0f5(0x1ca)][_0x27f0f5(0x191)](_0x53f495,_0x410451);}[_0x225ccf(0x187)](_0x257539){const _0x2531e7=_0x225ccf;this[_0x2531e7(0x1e0)][_0x2531e7(0x1ca)][_0x2531e7(0x187)](_0x257539);}[_0x225ccf(0x202)](_0x21b7b9){const _0x343366=_0x225ccf;this[_0x343366(0x1e0)][_0x343366(0x1ca)][_0x343366(0x202)](_0x21b7b9);}[_0x225ccf(0x1c1)](){const _0xb639b=_0x225ccf;this[_0xb639b(0x1e0)][_0xb639b(0x1ca)][_0xb639b(0x1c1)]();}[_0x225ccf(0x223)](){const _0x29e3d4=_0x225ccf;this[_0x29e3d4(0x1e0)][_0x29e3d4(0x1ca)][_0x29e3d4(0x223)]();}[_0x225ccf(0x20a)](_0x36c3db,_0x3a09d1,_0x44bfb7){const _0x4fb713=_0x225ccf;this[_0x4fb713(0x1e0)][_0x4fb713(0x1ca)][_0x4fb713(0x20a)](_0x36c3db,_0x3a09d1,_0x44bfb7);}[_0x225ccf(0x224)](){const _0x3a120a=_0x225ccf;this[_0x3a120a(0x1e0)][_0x3a120a(0x1ca)][_0x3a120a(0x224)](),this[_0x3a120a(0x1e0)][_0x3a120a(0x1ca)][_0x3a120a(0x1b4)](this[_0x3a120a(0x1e2)]());}[_0x225ccf(0x1f1)](_0x1973b4){const _0x2d0579=_0x225ccf;this[_0x2d0579(0x1e0)][_0x2d0579(0x1ca)][_0x2d0579(0x1f1)](_0x1973b4);}[_0x225ccf(0x229)](_0x76b99e){const _0x20dcd5=_0x225ccf;this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x1c2)](_0x76b99e[_0x20dcd5(0x22c)]),this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x188)](_0x76b99e[_0x20dcd5(0x189)]),this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x1b4)](this[_0x20dcd5(0x1e2)](_0x76b99e));}[_0x225ccf(0x18d)](_0x38479a,_0x59d42e){const _0x30d690=_0x225ccf;this[_0x30d690(0x1e0)][_0x30d690(0x1ca)][_0x30d690(0x19e)](_0x38479a),_0x59d42e&&this[_0x30d690(0x1e0)][_0x30d690(0x1ca)][_0x30d690(0x1b2)](!0x1);}[_0x225ccf(0x1b1)](_0x1def26){const _0x4331b2=_0x225ccf;this[_0x4331b2(0x1d1)]=_0x1def26;}[_0x225ccf(0x1ff)](_0x478d8b){const _0x5dbf47=_0x225ccf;this[_0x5dbf47(0x1e0)][_0x5dbf47(0x236)][_0x5dbf47(0x1ff)](_0x478d8b);}[_0x225ccf(0x214)](){const _0x549e4c=_0x225ccf;this[_0x549e4c(0x207)](_0xc9fde0(this[_0x549e4c(0x192)][_0x549e4c(0x20d)],_0x549e4c(0x1dd)));}[_0x225ccf(0x207)](_0x11abd9,_0x7ed4a3=!0x1){const _0x2f0d8e=_0x225ccf;if(_0x7ed4a3&&!_0xa6660b()&&_0x11abd9[_0x2f0d8e(0x1a7)])return this[_0x2f0d8e(0x1e0)][_0x2f0d8e(0x18c)][_0x2f0d8e(0x227)]='',void this[_0x2f0d8e(0x18e)](_0x11abd9);this[_0x2f0d8e(0x1e0)][_0x2f0d8e(0x18c)][_0x2f0d8e(0x227)]=_0x11abd9;}[_0x225ccf(0x1d2)](_0x356ee3){const _0x3b61a6=_0x225ccf;this[_0x3b61a6(0x1e0)][_0x3b61a6(0x236)][_0x3b61a6(0x1d2)](_0x356ee3);}[_0x225ccf(0x22a)](){const _0x47b46c=_0x225ccf;this[_0x47b46c(0x1e0)][_0x47b46c(0x236)][_0x47b46c(0x1d2)]('');}[_0x225ccf(0x18e)](_0x48c602){const _0x50f3f1=_0x225ccf;let _0x551dc8=0x0;clearInterval(this[_0x50f3f1(0x1bd)]),this[_0x50f3f1(0x1bd)]=setInterval(()=>{const _0x43137d=_0x50f3f1;this[_0x43137d(0x1e0)][_0x43137d(0x18c)][_0x43137d(0x227)]=this[_0x43137d(0x1e0)][_0x43137d(0x18c)][_0x43137d(0x227)]+_0x48c602[_0x551dc8],_0x551dc8++,_0x551dc8===_0x48c602[_0x43137d(0x1a7)]&&clearInterval(this[_0x43137d(0x1bd)]);},0x1e);}[_0x225ccf(0x22e)](_0x2b6aa1){const _0x3a805b=_0x225ccf;this[_0x3a805b(0x1e0)][_0x3a805b(0x18c)][_0x3a805b(0x19d)]=_0x2b6aa1;}[_0x225ccf(0x20c)](_0x1a602c){const _0x30311b=_0x225ccf;return _0x1a602c[_0x30311b(0x22c)]&&_0x1a602c[_0x30311b(0x189)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x21e)):_0x1a602c[_0x30311b(0x22c)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x211)):_0x1a602c[_0x30311b(0x189)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x1e8)):_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x1ae));}[_0x225ccf(0x1e2)](_0x88c338){const _0x9dff82=_0x225ccf;return _0x88c338?_0x88c338[_0x9dff82(0x22c)]&&_0x88c338[_0x9dff82(0x189)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x235)):_0x88c338[_0x9dff82(0x22c)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x20e)):_0x88c338[_0x9dff82(0x189)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x1be)):_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x19b)):_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x19b));}[_0x225ccf(0x198)](_0x52eb0d,_0x3929c6,_0x35b025,_0x11131f){const _0x512312=_0x225ccf;this[_0x512312(0x1e0)][_0x512312(0x198)](_0x52eb0d,_0x3929c6,_0x35b025,_0x11131f);}[_0x225ccf(0x237)](_0x7b4d0b){const _0xb735c6=_0x225ccf;this[_0xb735c6(0x1e0)][_0xb735c6(0x237)](_0x7b4d0b);}[_0x225ccf(0x1b3)](_0x2105d0){const _0x24378e=_0x225ccf;this[_0x24378e(0x1e0)][_0x24378e(0x1ca)][_0x24378e(0x1b3)](_0x2105d0);}[_0x225ccf(0x1a6)](_0x39b48e=!0x1){const _0x1e9762=_0x225ccf;this[_0x1e9762(0x1e0)][_0x1e9762(0x1ca)][_0x1e9762(0x1a6)](_0x39b48e);}[_0x225ccf(0x1c5)](_0x1268c3,_0x1b5478){const _0xcd5b17=_0x225ccf;this[_0xcd5b17(0x1e0)][_0xcd5b17(0x236)][_0xcd5b17(0x1f9)](_0x1268c3,_0x1b5478);}[_0x225ccf(0x228)](){const _0x560244=_0x225ccf;this[_0x560244(0x1e0)][_0x560244(0x236)][_0x560244(0x228)]();}[_0x225ccf(0x20f)](){const _0x35daeb=_0x225ccf;this[_0x35daeb(0x1e0)][_0x35daeb(0x1ca)][_0x35daeb(0x210)]=!0x0;}[_0x225ccf(0x22f)](){const _0x1aef81=_0x225ccf;this[_0x1aef81(0x1e0)][_0x1aef81(0x1ca)][_0x1aef81(0x210)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x93f129=_0x426d;(function(_0x29db95,_0x4f08be){const _0x3b3c60=_0x426d,_0x1f9660=_0x29db95();while(!![]){try{const _0x58297f=-parseInt(_0x3b3c60(0x161))/0x1+parseInt(_0x3b3c60(0x186))/0x2*(parseInt(_0x3b3c60(0x183))/0x3)+-parseInt(_0x3b3c60(0x154))/0x4*(parseInt(_0x3b3c60(0x19d))/0x5)+-parseInt(_0x3b3c60(0x15a))/0x6*(-parseInt(_0x3b3c60(0x17d))/0x7)+-parseInt(_0x3b3c60(0x1b4))/0x8*(-parseInt(_0x3b3c60(0x142))/0x9)+parseInt(_0x3b3c60(0x164))/0xa*(-parseInt(_0x3b3c60(0x171))/0xb)+-parseInt(_0x3b3c60(0x15b))/0xc*(-parseInt(_0x3b3c60(0x1ae))/0xd);if(_0x58297f===_0x4f08be)break;else _0x1f9660['push'](_0x1f9660['shift']());}catch(_0x3e3595){_0x1f9660['push'](_0x1f9660['shift']());}}}(_0x55eb,0x4cc47));import{CKEditorError as _0x3b1bc7,ObservableMixin as _0x171529,uid as _0x123aea}from'ckeditor5/src/utils.js';function _0x55eb(){const _0x5e8ced=['59753EAbzcy','isHidden','ai-chat-document-upload-failed','918390bVVKDP','addSelectionToContext','contextItemRemoved','TOOL','SELECTION','map','attributes','message','text/markdown','URL','selection','_isResourceInContext','file-','22pNHvxr','ai-chat-url-upload-failed','length','uploadUrl','clearPendingContextItems','abortController','substring','stack','_addContextOptionsState','_ongoingUploadOperations','size','addResourceToContext','35YjYKpN','Current\x20document','_addContextItem','removeSelectionFromContext','getData','addToConversationContext','96051DlfVSb','all','resourceStateChanged','28GVMWKb','object','delete','url-','ai-chat-source-resources-load-failed','_createContextItemFromContent','addUrlToContext','_updateResourceInContextState','isReadOnly','error','toolName','getDocument','_setAddContextOptionsDefaultState','getPendingContextItems','ai-chat-context-invalid-data','document','filter','ai-chat-resource-load-failed','_conversationContextItems','resourceId','contextItemAdded','uploadDocument','find','5YDjBWi','from','urls','abort','label','_addToConversationContextItem','isCurrentDocumentInContext','addCurrentDocumentToContext','enabled','loadSourceResources','_toggleAddCurrentDocumentOptionVisibility','DOCUMENT','data','MARKDOWN','_ownerId','_finishContextItemLoading','type','183716VEepgu','addToolItemToContext','isSelectionInContext','files','_config','customItems','88ClthGE','push','File','FILE','_getCustomSourcesInitialState','string','ai-chat-source-not-found','current-document','mcpServerName','isInContext','get','sources','populateFromMessage','version','mapContextItemsToRequestData','text/plain','getId','name','addContextOptionsChanged','_finishUploadOperation','uploadFile','uploadProgressChanged','updateCurrentDocument','values','fetchDocument','resources','content','sourceResourcesLoaded','_ongoingUploads','HTML','sessionId','startsWith','TEXT','url','set','_pendingContextItems','forEach','_convertTextResourceToFile','97974GgJfdH','_mapContextItemToRequestData','fire','_removeContextItem','removeFromContext','hidden','addFilesToContext','ai-chat-resource-no-data','has','_connector','files-','end','text/html','init','_findSourceIdsByResourceId','uiId','ai-chat-context-unsupported-type','isCurrentDocumentInConversation','307460OkLZvJ','getSentContextItems','_startUploadOperation','code','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-file-upload-failed','29226fMPtBn','36qxcjpY','contextItemLoadingEnded','getResources','start','contextSent','ai-request-aborted'];_0x55eb=function(){return _0x5e8ced;};return _0x55eb();}import{AIContextItemType as _0x14c2d3,AIContextTextResourceType as _0x373519}from'../../aicore/model/aicontext.js';import{escape as _0x524adf}from'es-toolkit/compat';import{errorsMap as _0x59d93c}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x93f129(0x19a),_0x93f129(0x166),_0x93f129(0x15c),_0x93f129(0x15f),_0x93f129(0x18f),_0x93f129(0x1c6),_0x93f129(0x137),_0x93f129(0x185),_0x93f129(0x131)];function _0x426d(_0x17d6f8,_0x59412a){const _0x55eb86=_0x55eb();return _0x426d=function(_0x426dcc,_0x105091){_0x426dcc=_0x426dcc-0x131;let _0x39fa0b=_0x55eb86[_0x426dcc];return _0x39fa0b;},_0x426d(_0x17d6f8,_0x59412a);}export class AIChatContext extends _0x171529(){[_0x93f129(0x14b)];[_0x93f129(0x1b2)];[_0x93f129(0x1ab)];constructor({connector:_0x10dd4e,config:_0x2a7203,ownerId:_0x4435d9}){const _0x2a5124=_0x93f129;super(),this[_0x2a5124(0x14b)]=_0x10dd4e,this[_0x2a5124(0x1b2)]=_0x2a7203,this[_0x2a5124(0x1ab)]=_0x4435d9;}[_0x93f129(0x14f)](){const _0x2fdb9e=_0x93f129;this[_0x2fdb9e(0x13f)]=new Map(),this[_0x2fdb9e(0x198)]=new Map(),this[_0x2fdb9e(0x138)]=new Map(),this[_0x2fdb9e(0x17a)]=new Map(),this[_0x2fdb9e(0x192)]();}[_0x93f129(0x193)](){const _0x3b0809=_0x93f129;return this[_0x3b0809(0x13f)];}async[_0x93f129(0x1c0)](_0x2bf1f6){const _0x1a5c24=_0x93f129,_0x2b735f=await this[_0x1a5c24(0x18b)](_0x2bf1f6);return this[_0x1a5c24(0x1a2)](_0x2b735f),_0x1a5c24(0x1bb)===_0x2b735f[_0x1a5c24(0x151)]&&this[_0x1a5c24(0x1a7)](),_0x2b735f;}async[_0x93f129(0x18b)](_0x38212a){const _0x313478=_0x93f129;if(_0x38212a[_0x313478(0x1ad)]===_0x14c2d3[_0x313478(0x1a8)]){const _0x5b0e1b=await this[_0x313478(0x14b)][_0x313478(0x134)](this[_0x313478(0x1ab)],_0x38212a['id'])[_0x313478(0x191)]();return{'id':_0x313478(0x1bb),'uiId':_0x313478(0x1bb),'label':_0x313478(0x17e),'type':_0x38212a[_0x313478(0x1ad)],'content':_0x5b0e1b[_0x313478(0x136)],'hidden':this[_0x313478(0x198)][_0x313478(0x14a)](_0x313478(0x1bb)),'version':_0x5b0e1b[_0x313478(0x16a)]?.[_0x313478(0x1c1)],'sessionId':_0x5b0e1b[_0x313478(0x16a)]?.[_0x313478(0x13a)]};}if(_0x38212a[_0x313478(0x1ad)]===_0x14c2d3[_0x313478(0x167)])return{'id':_0x38212a['id'],'uiId':_0x38212a['id'],'label':_0x38212a[_0x313478(0x1a9)]?.[_0x313478(0x1a1)]||_0x38212a['id'],'type':_0x14c2d3[_0x313478(0x167)],'mcpServerName':_0x38212a[_0x313478(0x1bc)],'toolName':_0x38212a[_0x313478(0x190)],'data':_0x38212a[_0x313478(0x1a9)]||{}};return{'id':_0x38212a['id'],'uiId':_0x38212a['id'],'label':_0x38212a[_0x313478(0x16a)]?.[_0x313478(0x1a1)]||_0x38212a[_0x313478(0x1c5)]||_0x38212a[_0x313478(0x13d)]||_0x38212a['id'],'type':_0x38212a[_0x313478(0x1ad)],..._0x38212a?.[_0x313478(0x16a)]?.[_0x313478(0x199)]?{'resourceId':_0x38212a[_0x313478(0x16a)]?.[_0x313478(0x199)]}:{}};}[_0x93f129(0x155)](){const _0x187b59=_0x93f129;return new Map(this[_0x187b59(0x198)]);}[_0x93f129(0x146)](_0x176290){const _0xc92e49=_0x93f129,_0x8bb269=this[_0xc92e49(0x13f)][_0xc92e49(0x1be)](_0x176290);_0x8bb269?.[_0xc92e49(0x18e)]||this[_0xc92e49(0x145)](_0x176290);}[_0x93f129(0x175)](){const _0x539410=_0x93f129;if(0x0===this[_0x539410(0x13f)][_0x539410(0x17b)])return;for(const _0x5b2496 of this[_0x539410(0x13f)][_0x539410(0x133)]())this[_0x539410(0x145)](_0x5b2496[_0x539410(0x151)]);const _0x5bc520=this[_0x539410(0x198)][_0x539410(0x1be)](_0x539410(0x1bb))||this[_0x539410(0x13f)][_0x539410(0x1be)](_0x539410(0x1bb));_0x5bc520&&this[_0x539410(0x17f)]({..._0x5bc520,'isReadOnly':!0x0,'hidden':!0x0});}[_0x93f129(0x182)](_0x104287){const _0x2ab169=_0x93f129;for(const _0x120989 of _0x104287[_0x2ab169(0x133)]())this[_0x2ab169(0x1a2)](_0x120989);this[_0x2ab169(0x175)](),this[_0x2ab169(0x144)](_0x2ab169(0x15f),{'contextItems':Array[_0x2ab169(0x19e)](this[_0x2ab169(0x155)]()[_0x2ab169(0x133)]())});}[_0x93f129(0x1a3)](){const _0x1cde3e=_0x93f129;return this[_0x1cde3e(0x13f)][_0x1cde3e(0x14a)](_0x1cde3e(0x1bb));}[_0x93f129(0x1b0)](){const _0x3f6d12=_0x93f129;return this[_0x3f6d12(0x13f)][_0x3f6d12(0x14a)](_0x3f6d12(0x16e));}[_0x93f129(0x153)](){const _0x147abb=_0x93f129;return this[_0x147abb(0x198)][_0x147abb(0x14a)](_0x147abb(0x1bb));}static[_0x93f129(0x1c2)](_0xe91a27){const _0x561fcf=_0x93f129;return Array[_0x561fcf(0x19e)](_0xe91a27[_0x561fcf(0x133)]())[_0x561fcf(0x169)](_0x17c99d=>this[_0x561fcf(0x143)](_0x17c99d))[_0x561fcf(0x196)](_0x1896aa=>null!==_0x1896aa);}async[_0x93f129(0x148)](_0x504e23,_0x1d9aa7,_0xae810a=_0x14c2d3[_0x93f129(0x1b7)]){const _0x42a5bd=_0x93f129,_0x21024f=_0x42a5bd(0x14c)+_0x123aea();this[_0x42a5bd(0x156)](_0x21024f);try{await Promise[_0x42a5bd(0x184)](_0x504e23[_0x42a5bd(0x169)](async _0x1df579=>{const _0x3dc140=_0x42a5bd,_0x32ba89=_0x3dc140(0x170)+_0x123aea(),_0x27eacb=_0x524adf(_0x1df579[_0x3dc140(0x1c5)]);try{this[_0x3dc140(0x17f)]({'type':_0xae810a,'label':_0x1d9aa7?.[_0x3dc140(0x1a1)]||_0x27eacb,'uiId':_0x32ba89,'resourceId':_0x1d9aa7?.[_0x3dc140(0x199)]},!0x0);const _0x1733cc=this[_0x3dc140(0x14b)][_0x3dc140(0x1c8)](this[_0x3dc140(0x1ab)],_0x1df579,_0x1d9aa7);this[_0x3dc140(0x138)][_0x3dc140(0x13e)](_0x32ba89,_0x1733cc[_0x3dc140(0x176)]);const {id:_0x4559}=await _0x1733cc[_0x3dc140(0x1c4)]();this[_0x3dc140(0x138)][_0x3dc140(0x188)](_0x32ba89),this[_0x3dc140(0x1ac)]({'type':_0xae810a,'id':_0x4559,'label':_0x1d9aa7?.[_0x3dc140(0x1a1)]||_0x27eacb,'uiId':_0x32ba89,'resourceId':_0x1d9aa7?.[_0x3dc140(0x199)]},!0x1);}catch(_0x4a1a28){this[_0x3dc140(0x138)][_0x3dc140(0x188)](_0x32ba89);if(!(_0x4a1a28 instanceof _0x3b1bc7&&_0x4a1a28[_0x3dc140(0x16b)][_0x3dc140(0x13b)](_0x3dc140(0x160)))){const _0x3d293d=_0x59d93c[_0x3dc140(0x1be)](_0x4a1a28[_0x3dc140(0x157)])||_0x3dc140(0x159),_0x554262=new _0x3b1bc7(_0x3d293d,null,{'fileName':_0x27eacb,..._0x4a1a28});_0x554262[_0x3dc140(0x178)]=_0x4a1a28[_0x3dc140(0x178)],this[_0x3dc140(0x144)](_0x3dc140(0x18f),{'error':_0x554262});}this[_0x3dc140(0x145)](_0x32ba89);}}));}finally{this[_0x42a5bd(0x1c7)](_0x21024f);}}[_0x93f129(0x1a4)](_0x4f2d19){const _0x443657=_0x93f129;if(this[_0x443657(0x1a3)]()||!this[_0x443657(0x179)][_0x443657(0x195)][_0x443657(0x1a5)])return;const _0x5654bf={'type':_0x14c2d3[_0x443657(0x1a8)],'uiId':_0x443657(0x1bb),'label':_0x4f2d19,'isReadOnly':this[_0x443657(0x198)][_0x443657(0x14a)](_0x443657(0x1bb)),'hidden':this[_0x443657(0x198)][_0x443657(0x14a)](_0x443657(0x1bb))};this[_0x443657(0x17f)](_0x5654bf);}async[_0x93f129(0x132)](_0x2f8652,_0x34fab9,_0x3584f1,_0x2c56d0){const _0x39c6a8=_0x93f129,_0x4a4473=this[_0x39c6a8(0x13f)][_0x39c6a8(0x1be)](_0x39c6a8(0x1bb));if(_0x4a4473&&_0x2f8652){_0x4a4473[_0x39c6a8(0x16e)]=_0x2c56d0?_0x2c56d0[_0x39c6a8(0x169)](_0x2d3828=>({'start':_0x2d3828[_0x39c6a8(0x15e)],'end':_0x2d3828[_0x39c6a8(0x14d)]})):[];try{if(_0x4a4473[_0x39c6a8(0x1c1)]===_0x34fab9)return;const {id:_0x10da25}=await this[_0x39c6a8(0x14b)][_0x39c6a8(0x19b)](this[_0x39c6a8(0x1ab)],_0x2f8652,{'version':_0x34fab9,'sessionId':_0x3584f1})[_0x39c6a8(0x1c4)]();_0x4a4473['id']=_0x10da25,_0x4a4473[_0x39c6a8(0x136)]=_0x2f8652,_0x4a4473[_0x39c6a8(0x1c1)]=_0x34fab9,_0x4a4473[_0x39c6a8(0x13a)]=_0x3584f1;}catch(_0x5aeac3){const _0x4584d9=new _0x3b1bc7(_0x39c6a8(0x163),null);_0x4584d9[_0x39c6a8(0x178)]=_0x5aeac3[_0x39c6a8(0x178)],this[_0x39c6a8(0x144)](_0x39c6a8(0x18f),{'error':_0x4584d9});}}}[_0x93f129(0x165)](_0xe7e271){const _0x5ee0b6=_0x93f129;this[_0x5ee0b6(0x17f)]({'type':_0x14c2d3[_0x5ee0b6(0x168)],'label':_0xe7e271,'uiId':_0x5ee0b6(0x16e),'content':_0xe7e271});}[_0x93f129(0x180)](){const _0x5b3a75=_0x93f129;this[_0x5b3a75(0x145)](_0x5b3a75(0x16e));}async[_0x93f129(0x18c)](_0x37ff5f,_0x246c05){const _0x257470=_0x93f129,_0x83716d=_0x257470(0x189)+_0x123aea();this[_0x257470(0x156)](_0x83716d);const _0x389931=_0x257470(0x189)+_0x123aea();try{this[_0x257470(0x17f)]({'type':_0x14c2d3[_0x257470(0x16d)],'label':_0x246c05?.[_0x257470(0x1a1)]||_0x37ff5f,'uiId':_0x389931,'resourceId':_0x246c05?.[_0x257470(0x199)]},!0x0);const _0x52ab28=this[_0x257470(0x14b)][_0x257470(0x174)](this[_0x257470(0x1ab)],_0x37ff5f,_0x246c05);this[_0x257470(0x138)][_0x257470(0x13e)](_0x389931,_0x52ab28[_0x257470(0x176)]);const {id:_0x3542f1}=await _0x52ab28[_0x257470(0x1c4)]();this[_0x257470(0x138)][_0x257470(0x188)](_0x389931),this[_0x257470(0x1ac)]({'type':_0x14c2d3[_0x257470(0x16d)],'id':_0x3542f1,'label':_0x246c05?.[_0x257470(0x1a1)]||_0x37ff5f,'uiId':_0x389931,'resourceId':_0x246c05?.[_0x257470(0x199)]},!0x1);}catch(_0x2250eb){this[_0x257470(0x138)][_0x257470(0x188)](_0x389931),(_0x2250eb[_0x257470(0x16b)][_0x257470(0x13b)](_0x257470(0x160))||this[_0x257470(0x144)](_0x257470(0x18f),{'error':new _0x3b1bc7(_0x257470(0x172),this,{'url':_0x37ff5f,'originalError':_0x2250eb}),'url':_0x37ff5f}),this[_0x257470(0x145)](_0x389931));}finally{this[_0x257470(0x1c7)](_0x83716d);}}[_0x93f129(0x1af)](_0x3e290c){const _0x308066=_0x93f129;_0x3e290c['id']=_0x3e290c['id']??_0x123aea()[_0x308066(0x177)](0x0,0x15),this[_0x308066(0x13f)][_0x308066(0x13e)](_0x3e290c[_0x308066(0x151)],_0x3e290c),this[_0x308066(0x144)](_0x308066(0x19a),{'contextItem':_0x3e290c,'isLoading':!0x1});}async[_0x93f129(0x1a6)](_0x1e116f,_0x2b33c8,_0x22f38f){const _0x2e5a51=_0x93f129,_0x5c05e8=this[_0x2e5a51(0x179)][_0x2e5a51(0x1bf)][_0x2e5a51(0x19c)](_0x3cfd13=>_0x3cfd13['id']===_0x1e116f);if(!_0x5c05e8)return this[_0x2e5a51(0x144)](_0x2e5a51(0x18f),{'error':new _0x3b1bc7(_0x2e5a51(0x1ba),this,{'sourceId':_0x1e116f}),'sourceId':_0x1e116f}),[];try{const _0x4e50d5=(await _0x5c05e8[_0x2e5a51(0x15d)](_0x2b33c8))[_0x2e5a51(0x169)](_0x3c14bc=>{const _0x577c9a=_0x2e5a51,_0x2582f0=this[_0x577c9a(0x16f)](_0x3c14bc['id']);return{..._0x3c14bc,'isInContext':_0x2582f0};});return _0x5c05e8[_0x2e5a51(0x135)]=_0x4e50d5,this[_0x2e5a51(0x144)](_0x2e5a51(0x137),{'sourceId':_0x1e116f,'source':_0x5c05e8,'resources':_0x4e50d5,'uid':_0x22f38f}),_0x4e50d5;}catch(_0x114e29){return this[_0x2e5a51(0x144)](_0x2e5a51(0x18f),{'error':new _0x3b1bc7(_0x2e5a51(0x18a),this,{'sourceId':_0x1e116f,'originalError':_0x114e29}),'sourceId':_0x1e116f,'sourceLabel':_0x5c05e8[_0x2e5a51(0x1a1)]}),[];}}async[_0x93f129(0x17c)](_0x2047ee,_0xc8d2e1){const _0x509c02=_0x93f129;if(this[_0x509c02(0x16f)](_0xc8d2e1['id']))return;let _0x56fdde=_0xc8d2e1[_0x509c02(0x1a9)];if(!_0x56fdde&&_0x2047ee[_0x509c02(0x181)])try{_0x56fdde=await _0x2047ee[_0x509c02(0x181)](_0xc8d2e1['id']);}catch(_0x1171c0){return void this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x197),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id'],'originalError':_0x1171c0}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});}if(_0x56fdde)switch(_0xc8d2e1[_0x509c02(0x1ad)]){case _0x14c2d3[_0x509c02(0x16d)]:if(_0x509c02(0x1b9)!=typeof _0x56fdde)return void this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x194),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id'],'expectedType':_0x509c02(0x1b9),'actualType':typeof _0x56fdde}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});await this[_0x509c02(0x18c)](_0x56fdde,{'label':_0xc8d2e1[_0x509c02(0x1a1)],'resourceId':_0xc8d2e1['id']});break;case _0x14c2d3[_0x509c02(0x1b7)]:if(!(_0x56fdde instanceof File))return void this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x194),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id'],'expectedType':_0x509c02(0x1b6),'actualType':typeof _0x56fdde}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});await this[_0x509c02(0x148)]([_0x56fdde],{'label':_0xc8d2e1[_0x509c02(0x1a1)],'resourceId':_0xc8d2e1['id']});break;case _0x14c2d3[_0x509c02(0x13c)]:if(_0x509c02(0x187)!=typeof _0x56fdde||!(_0x509c02(0x136)in _0x56fdde)||!(_0x509c02(0x1ad)in _0x56fdde))return void this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x194),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id'],'expectedType':_0x509c02(0x158),'actualType':typeof _0x56fdde}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});_0x56fdde=AIChatContext[_0x509c02(0x141)](_0x56fdde,_0xc8d2e1[_0x509c02(0x1a1)]),await this[_0x509c02(0x148)]([_0x56fdde],{'label':_0xc8d2e1[_0x509c02(0x1a1)],'resourceId':_0xc8d2e1['id']},_0x14c2d3[_0x509c02(0x13c)]);break;case _0x14c2d3[_0x509c02(0x167)]:break;default:this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x152),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id'],'resourceType':_0xc8d2e1[_0x509c02(0x1ad)]}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});}else this[_0x509c02(0x144)](_0x509c02(0x18f),{'error':new _0x3b1bc7(_0x509c02(0x149),this,{'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']}),'resourceId':_0xc8d2e1['id'],'sourceId':_0x2047ee['id']});}static[_0x93f129(0x141)](_0x117620,_0x8006fc){const _0x15dca8=_0x93f129;switch(_0x117620[_0x15dca8(0x1ad)]){case _0x373519[_0x15dca8(0x1aa)]:return new File([_0x117620[_0x15dca8(0x136)]],_0x8006fc,{'type':_0x15dca8(0x16c)});case _0x373519[_0x15dca8(0x139)]:return new File([_0x117620[_0x15dca8(0x136)]],_0x8006fc,{'type':_0x15dca8(0x14e)});default:return new File([_0x117620[_0x15dca8(0x136)]],_0x8006fc,{'type':_0x15dca8(0x1c3)});}}static[_0x93f129(0x143)](_0x15cb6c){const _0x3aecf8=_0x93f129;switch(_0x15cb6c[_0x3aecf8(0x1ad)]){case _0x14c2d3[_0x3aecf8(0x1b7)]:return{'type':_0x14c2d3[_0x3aecf8(0x1b7)],'id':_0x15cb6c['id']};case _0x14c2d3[_0x3aecf8(0x16d)]:return{'type':_0x14c2d3[_0x3aecf8(0x16d)],'id':_0x15cb6c['id']};case _0x14c2d3[_0x3aecf8(0x1a8)]:return{'type':_0x14c2d3[_0x3aecf8(0x1a8)],'id':_0x15cb6c['id'],..._0x15cb6c[_0x3aecf8(0x16e)]?.[_0x3aecf8(0x173)]&&{'selection':_0x15cb6c[_0x3aecf8(0x16e)]}};case _0x14c2d3[_0x3aecf8(0x13c)]:return{'type':_0x14c2d3[_0x3aecf8(0x1b7)],'id':_0x15cb6c['id']};case _0x14c2d3[_0x3aecf8(0x167)]:{const _0x507a26=_0x15cb6c;return{'type':_0x14c2d3[_0x3aecf8(0x167)],'mcpServerName':_0x507a26[_0x3aecf8(0x1bc)],'toolName':_0x507a26[_0x3aecf8(0x190)],'data':_0x507a26[_0x3aecf8(0x1a9)],'id':_0x507a26['id']};}default:return null;}}[_0x93f129(0x17f)](_0x5529f8,_0x46c139=!0x1){const _0x5c54c7=_0x93f129;if(this[_0x5c54c7(0x13f)][_0x5c54c7(0x13e)](_0x5529f8[_0x5c54c7(0x151)],_0x5529f8),_0x5529f8[_0x5c54c7(0x147)]||this[_0x5c54c7(0x144)](_0x5c54c7(0x19a),{'contextItem':_0x5529f8,'isLoading':_0x46c139}),_0x5c54c7(0x1bb)===_0x5529f8[_0x5c54c7(0x151)]&&this[_0x5c54c7(0x1a7)](),_0x5529f8[_0x5c54c7(0x199)]){const _0xeefa35=this[_0x5c54c7(0x150)](_0x5529f8[_0x5c54c7(0x199)]);_0xeefa35&&_0xeefa35[_0x5c54c7(0x140)](_0x57b59f=>{const _0x51d31b=_0x5c54c7;this[_0x51d31b(0x18d)](_0x57b59f,_0x5529f8[_0x51d31b(0x199)],!0x0);});}}[_0x93f129(0x145)](_0x1271da){const _0x2e3e5d=_0x93f129,_0x2606ab=this[_0x2e3e5d(0x13f)][_0x2e3e5d(0x1be)](_0x1271da),_0x2af3c9=this[_0x2e3e5d(0x138)][_0x2e3e5d(0x1be)](_0x1271da);if(_0x2af3c9&&(_0x2af3c9[_0x2e3e5d(0x1a0)](),this[_0x2e3e5d(0x138)][_0x2e3e5d(0x188)](_0x1271da)),_0x2606ab?.[_0x2e3e5d(0x199)]){const _0x89c0b0=this[_0x2e3e5d(0x150)](_0x2606ab[_0x2e3e5d(0x199)]);_0x89c0b0&&_0x89c0b0[_0x2e3e5d(0x140)](_0x2affc6=>{const _0x3c8771=_0x2e3e5d;this[_0x3c8771(0x18d)](_0x2affc6,_0x2606ab[_0x3c8771(0x199)],!0x1);});}this[_0x2e3e5d(0x13f)][_0x2e3e5d(0x188)](_0x1271da),this[_0x2e3e5d(0x144)](_0x2e3e5d(0x166),{'uiId':_0x1271da,'type':_0x2606ab?.[_0x2e3e5d(0x1ad)]}),_0x2e3e5d(0x1bb)===_0x1271da&&this[_0x2e3e5d(0x1a7)]();}[_0x93f129(0x1ac)](_0x4ef6f7,_0x25632f){const _0x5c98c6=_0x93f129;if(this[_0x5c98c6(0x13f)][_0x5c98c6(0x14a)](_0x4ef6f7[_0x5c98c6(0x151)])&&(this[_0x5c98c6(0x13f)][_0x5c98c6(0x13e)](_0x4ef6f7[_0x5c98c6(0x151)],_0x4ef6f7),this[_0x5c98c6(0x144)](_0x5c98c6(0x15c),{'contextItem':_0x4ef6f7,'isLoading':_0x25632f}),_0x4ef6f7[_0x5c98c6(0x199)])){const _0xeae4ba=this[_0x5c98c6(0x150)](_0x4ef6f7[_0x5c98c6(0x199)]);_0xeae4ba&&_0xeae4ba[_0x5c98c6(0x140)](_0xf73ca2=>{const _0x3b4e52=_0x5c98c6;this[_0x3b4e52(0x18d)](_0xf73ca2,_0x4ef6f7[_0x3b4e52(0x199)],!0x0);});}}[_0x93f129(0x1a2)](_0x4179ea){const _0x49f67a=_0x93f129;this[_0x49f67a(0x198)][_0x49f67a(0x13e)](_0x4179ea[_0x49f67a(0x151)],_0x4179ea);}[_0x93f129(0x192)](){const _0x342cbf=_0x93f129;this[_0x342cbf(0x179)]={'document':{'enabled':!0x1!==this[_0x342cbf(0x1b2)]?.[_0x342cbf(0x195)]?.[_0x342cbf(0x1a5)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x342cbf(0x1b2)]?.[_0x342cbf(0x19f)]?.[_0x342cbf(0x1a5)]},'files':{'enabled':!0x1!==this[_0x342cbf(0x1b2)]?.[_0x342cbf(0x1b1)]?.[_0x342cbf(0x1a5)]},'sources':this[_0x342cbf(0x1b8)](),'customItems':this[_0x342cbf(0x1b2)]?.[_0x342cbf(0x1b3)]?.[_0x342cbf(0x169)](_0x26c6ad=>({..._0x26c6ad,'enabled':!0x0}))??[]},this[_0x342cbf(0x144)](_0x342cbf(0x1c6),{'options':this[_0x342cbf(0x179)]});}[_0x93f129(0x1b8)](){const _0x1785ac=_0x93f129;return this[_0x1785ac(0x1b2)]?.[_0x1785ac(0x1bf)]?.[_0x1785ac(0x169)](_0x5957f1=>({..._0x5957f1,'resources':[]}))??[];}[_0x93f129(0x1a7)](){const _0x4123d1=_0x93f129,_0x3f8e05=this[_0x4123d1(0x1a3)]()||this[_0x4123d1(0x153)]();this[_0x4123d1(0x179)][_0x4123d1(0x195)][_0x4123d1(0x162)]=_0x3f8e05,this[_0x4123d1(0x144)](_0x4123d1(0x1c6),{'options':this[_0x4123d1(0x179)]});}[_0x93f129(0x16f)](_0x250a38){const _0x5f30f6=_0x93f129;for(const _0x34a21a of this[_0x5f30f6(0x13f)][_0x5f30f6(0x133)]())if(_0x34a21a[_0x5f30f6(0x199)]===_0x250a38)return!0x0;for(const _0x462ee3 of this[_0x5f30f6(0x198)][_0x5f30f6(0x133)]())if(_0x462ee3[_0x5f30f6(0x199)]===_0x250a38)return!0x0;return!0x1;}[_0x93f129(0x150)](_0xa01923){const _0x5554e8=_0x93f129,_0x239a7d=[];for(const _0x380454 of this[_0x5554e8(0x179)][_0x5554e8(0x1bf)]){_0x380454[_0x5554e8(0x135)][_0x5554e8(0x19c)](_0x128f53=>_0x128f53['id']===_0xa01923)&&_0x239a7d[_0x5554e8(0x1b5)](_0x380454['id']);}return 0x0===_0x239a7d[_0x5554e8(0x173)]?null:_0x239a7d;}[_0x93f129(0x18d)](_0x1fbeea,_0x302edd,_0x1e37b3){const _0x3b9297=_0x93f129,_0x493b3e=this[_0x3b9297(0x179)][_0x3b9297(0x1bf)][_0x3b9297(0x19c)](_0x3dbc6f=>_0x3dbc6f['id']===_0x1fbeea);if(!_0x493b3e)return;const _0x97e0f7=_0x493b3e[_0x3b9297(0x135)][_0x3b9297(0x19c)](_0x1bf4ac=>_0x1bf4ac['id']===_0x302edd);_0x97e0f7&&(_0x97e0f7[_0x3b9297(0x1bd)]=_0x1e37b3,this[_0x3b9297(0x144)](_0x3b9297(0x185),{'sourceId':_0x1fbeea,'resourceId':_0x302edd,'isInContext':_0x1e37b3}));}[_0x93f129(0x156)](_0x584a41){const _0x5a334a=_0x93f129;this[_0x5a334a(0x17a)][_0x5a334a(0x13e)](_0x584a41,!0x0),this[_0x5a334a(0x17a)][_0x5a334a(0x17b)]&&this[_0x5a334a(0x144)](_0x5a334a(0x131),{'isUploadInProgress':!0x0});}[_0x93f129(0x1c7)](_0x16499b){const _0x520b00=_0x93f129;this[_0x520b00(0x17a)][_0x520b00(0x188)](_0x16499b),0x0===this[_0x520b00(0x17a)][_0x520b00(0x17b)]&&this[_0x520b00(0x144)](_0x520b00(0x131),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
function _0x1b34(_0x4cf6f2,_0x1b735d){const _0x18337a=_0x1833();return _0x1b34=function(_0x1b348d,_0x2556a8){_0x1b348d=_0x1b348d-0xe3;let _0x314fa7=_0x18337a[_0x1b348d];return _0x314fa7;},_0x1b34(_0x4cf6f2,_0x1b735d);}const _0x255bd5=_0x1b34;(function(_0x2b7558,_0x219c7e){const _0x4c7633=_0x1b34,_0x902864=_0x2b7558();while(!![]){try{const _0x387e87=-parseInt(_0x4c7633(0x153))/0x1*(parseInt(_0x4c7633(0x102))/0x2)+-parseInt(_0x4c7633(0x12b))/0x3*(-parseInt(_0x4c7633(0x106))/0x4)+parseInt(_0x4c7633(0x101))/0x5*(parseInt(_0x4c7633(0x16f))/0x6)+parseInt(_0x4c7633(0x114))/0x7*(parseInt(_0x4c7633(0x10b))/0x8)+parseInt(_0x4c7633(0xe8))/0x9+-parseInt(_0x4c7633(0x10a))/0xa*(parseInt(_0x4c7633(0x120))/0xb)+parseInt(_0x4c7633(0x10e))/0xc*(parseInt(_0x4c7633(0x135))/0xd);if(_0x387e87===_0x219c7e)break;else _0x902864['push'](_0x902864['shift']());}catch(_0x1cb89c){_0x902864['push'](_0x902864['shift']());}}}(_0x1833,0xcd78e));import{CKEditorError as _0x345b32,ObservableMixin as _0x169320,uid as _0x1f2165}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x3894c2,AIContextTextResourceType as _0x462fc1}from'../../aicore/model/aicontext.js';import{escape as _0x489c5}from'es-toolkit/compat';function _0x1833(){const _0x44eae6=['name','hidden','ai-chat-url-upload-failed','files-','abortController','object','uploadFile','document','getData','_finishContextItemLoading','ai-request-aborted','contextItemAdded','MARKDOWN','615585ZKGoAX','5752fxyMPz','attributes','ai-chat-resource-load-failed','DOCUMENT','4mqGzNL','ai-chat-document-upload-failed','fetchDocument','loadSourceResources','12568370xKVYKJ','212888KpkPfe','contextItemRemoved','size','4260Lwukgg','isCurrentDocumentInContext','HTML','mcpServerName','error','_addContextOptionsState','49EhyXVB','delete','values','_toggleAddCurrentDocumentOptionVisibility','getDocument','url-','SELECTION','ai-chat-file-upload-failed','_finishUploadOperation','customItems','content','removeSelectionFromContext','11lKcAfJ','_getCustomSourcesInitialState','_convertTextResourceToFile','abort','_isResourceInContext','enabled','_ongoingUploadOperations','_removeContextItem','toolName','selection','filter','3063270MFWXOE','ai-chat-context-invalid-data','substring','_startUploadOperation','uiId','url','map','URL','_ownerId','addContextOptionsChanged','364okWaMa','_updateResourceInContextState','File','_findSourceIdsByResourceId','FILE','set','getSentContextItems','ai-chat-context-unsupported-type','getResources','sessionId','from','message','type','start','isHidden','resourceStateChanged','code','getPendingContextItems','addUrlToContext','_connector','uploadDocument','clearPendingContextItems','addCurrentDocumentToContext','TEXT','addFilesToContext','version','ai-chat-source-resources-load-failed','contextSent','resources','populateFromMessage','446pQlLCO','getId','contextItemLoadingEnded','files','text/plain','current-document','forEach','_addContextItem','uploadUrl','_pendingContextItems','_mapContextItemToRequestData','isSelectionInContext','ai-chat-resource-no-data','uploadProgressChanged','sourceResourcesLoaded','length','object\x20with\x20content\x20and\x20type\x20properties','sources','_config','TOOL','stack','find','data','text/markdown','push','string','_conversationContextItems','isInContext','66DOaVvN','resourceId','get','ai-chat-source-not-found','_createContextItemFromContent','mapContextItemsToRequestData','_addToConversationContextItem','urls','Current\x20document','removeFromContext','end','_ongoingUploads','addToConversationContext','isCurrentDocumentInConversation','startsWith','fire','addSelectionToContext','7285977sxBwnY','file-','isReadOnly','has','all','updateCurrentDocument','label','text/html','_setAddContextOptionsDefaultState','addToolItemToContext','init','addResourceToContext'];_0x1833=function(){return _0x44eae6;};return _0x1833();}import{errorsMap as _0x1d81cc}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x255bd5(0xff),_0x255bd5(0x10c),_0x255bd5(0x155),_0x255bd5(0x150),_0x255bd5(0x112),_0x255bd5(0x134),_0x255bd5(0x161),_0x255bd5(0x144),_0x255bd5(0x160)];export class AIChatContext extends _0x169320(){[_0x255bd5(0x148)];[_0x255bd5(0x165)];[_0x255bd5(0x133)];constructor({connector:_0x2b136a,config:_0x40d777,ownerId:_0x40079e}){const _0x379eca=_0x255bd5;super(),this[_0x379eca(0x148)]=_0x2b136a,this[_0x379eca(0x165)]=_0x40d777,this[_0x379eca(0x133)]=_0x40079e;}[_0x255bd5(0xf2)](){const _0x275dd5=_0x255bd5;this[_0x275dd5(0x15c)]=new Map(),this[_0x275dd5(0x16d)]=new Map(),this[_0x275dd5(0x17a)]=new Map(),this[_0x275dd5(0x126)]=new Map(),this[_0x275dd5(0xf0)]();}[_0x255bd5(0x146)](){const _0x1cb9d1=_0x255bd5;return this[_0x1cb9d1(0x15c)];}async[_0x255bd5(0x152)](_0x1b1d1b){const _0x4bce18=_0x255bd5,_0x569568=await this[_0x4bce18(0x173)](_0x1b1d1b);return this[_0x4bce18(0x175)](_0x569568),_0x4bce18(0x158)===_0x569568[_0x4bce18(0x12f)]&&this[_0x4bce18(0x117)](),_0x569568;}async[_0x255bd5(0x173)](_0x4776a4){const _0x2fcc04=_0x255bd5;if(_0x4776a4[_0x2fcc04(0x141)]===_0x3894c2[_0x2fcc04(0x105)]){const _0x34ac83=await this[_0x2fcc04(0x148)][_0x2fcc04(0x108)](this[_0x2fcc04(0x133)],_0x4776a4['id'])[_0x2fcc04(0x118)]();return{'id':_0x2fcc04(0x158),'uiId':_0x2fcc04(0x158),'label':_0x2fcc04(0x177),'type':_0x4776a4[_0x2fcc04(0x141)],'content':_0x34ac83[_0x2fcc04(0x11e)],'hidden':this[_0x2fcc04(0x16d)][_0x2fcc04(0xeb)](_0x2fcc04(0x158)),'version':_0x34ac83[_0x2fcc04(0x103)]?.[_0x2fcc04(0x14e)],'sessionId':_0x34ac83[_0x2fcc04(0x103)]?.[_0x2fcc04(0x13e)]};}if(_0x4776a4[_0x2fcc04(0x141)]===_0x3894c2[_0x2fcc04(0x166)])return{'id':_0x4776a4['id'],'uiId':_0x4776a4['id'],'label':_0x4776a4[_0x2fcc04(0x169)]?.[_0x2fcc04(0xee)]||_0x4776a4['id'],'type':_0x3894c2[_0x2fcc04(0x166)],'mcpServerName':_0x4776a4[_0x2fcc04(0x111)],'toolName':_0x4776a4[_0x2fcc04(0x128)],'data':_0x4776a4[_0x2fcc04(0x169)]||{}};return{'id':_0x4776a4['id'],'uiId':_0x4776a4['id'],'label':_0x4776a4[_0x2fcc04(0x103)]?.[_0x2fcc04(0xee)]||_0x4776a4[_0x2fcc04(0xf4)]||_0x4776a4[_0x2fcc04(0x130)]||_0x4776a4['id'],'type':_0x4776a4[_0x2fcc04(0x141)],..._0x4776a4?.[_0x2fcc04(0x103)]?.[_0x2fcc04(0x170)]?{'resourceId':_0x4776a4[_0x2fcc04(0x103)]?.[_0x2fcc04(0x170)]}:{}};}[_0x255bd5(0x13b)](){const _0x447385=_0x255bd5;return new Map(this[_0x447385(0x16d)]);}[_0x255bd5(0x178)](_0x4ddb70){const _0x875614=_0x255bd5,_0x4c231b=this[_0x875614(0x15c)][_0x875614(0x171)](_0x4ddb70);_0x4c231b?.[_0x875614(0xea)]||this[_0x875614(0x127)](_0x4ddb70);}[_0x255bd5(0x14a)](){const _0x315eaa=_0x255bd5;if(0x0===this[_0x315eaa(0x15c)][_0x315eaa(0x10d)])return;for(const _0x42516c of this[_0x315eaa(0x15c)][_0x315eaa(0x116)]())this[_0x315eaa(0x127)](_0x42516c[_0x315eaa(0x12f)]);const _0x2cafa9=this[_0x315eaa(0x16d)][_0x315eaa(0x171)](_0x315eaa(0x158))||this[_0x315eaa(0x15c)][_0x315eaa(0x171)](_0x315eaa(0x158));_0x2cafa9&&this[_0x315eaa(0x15a)]({..._0x2cafa9,'isReadOnly':!0x0,'hidden':!0x0});}[_0x255bd5(0xe3)](_0x180621){const _0x1d79b2=_0x255bd5;for(const _0x2530da of _0x180621[_0x1d79b2(0x116)]())this[_0x1d79b2(0x175)](_0x2530da);this[_0x1d79b2(0x14a)](),this[_0x1d79b2(0xe6)](_0x1d79b2(0x150),{'contextItems':Array[_0x1d79b2(0x13f)](this[_0x1d79b2(0x13b)]()[_0x1d79b2(0x116)]())});}[_0x255bd5(0x10f)](){const _0x267e43=_0x255bd5;return this[_0x267e43(0x15c)][_0x267e43(0xeb)](_0x267e43(0x158));}[_0x255bd5(0x15e)](){const _0x28fd1d=_0x255bd5;return this[_0x28fd1d(0x15c)][_0x28fd1d(0xeb)](_0x28fd1d(0x129));}[_0x255bd5(0xe4)](){const _0x75dba8=_0x255bd5;return this[_0x75dba8(0x16d)][_0x75dba8(0xeb)](_0x75dba8(0x158));}static[_0x255bd5(0x174)](_0xa8e816){const _0xccc783=_0x255bd5;return Array[_0xccc783(0x13f)](_0xa8e816[_0xccc783(0x116)]())[_0xccc783(0x131)](_0x1872f1=>this[_0xccc783(0x15d)](_0x1872f1))[_0xccc783(0x12a)](_0xcf4eac=>null!==_0xcf4eac);}async[_0x255bd5(0x14d)](_0x34828c,_0x53addc,_0x372804=_0x3894c2[_0x255bd5(0x139)]){const _0x52d13c=_0x255bd5,_0x261f73=_0x52d13c(0xf7)+_0x1f2165();this[_0x52d13c(0x12e)](_0x261f73);try{await Promise[_0x52d13c(0xec)](_0x34828c[_0x52d13c(0x131)](async _0x5b1d79=>{const _0x39dfab=_0x52d13c,_0x58ba9b=_0x39dfab(0xe9)+_0x1f2165(),_0xf074f5=_0x489c5(_0x5b1d79[_0x39dfab(0xf4)]);try{this[_0x39dfab(0x15a)]({'type':_0x372804,'label':_0x53addc?.[_0x39dfab(0xee)]||_0xf074f5,'uiId':_0x58ba9b,'resourceId':_0x53addc?.[_0x39dfab(0x170)]},!0x0);const _0x50dc75=this[_0x39dfab(0x148)][_0x39dfab(0xfa)](this[_0x39dfab(0x133)],_0x5b1d79,_0x53addc);this[_0x39dfab(0x17a)][_0x39dfab(0x13a)](_0x58ba9b,_0x50dc75[_0x39dfab(0xf8)]);const {id:_0xd0e62a}=await _0x50dc75[_0x39dfab(0x154)]();this[_0x39dfab(0x17a)][_0x39dfab(0x115)](_0x58ba9b),this[_0x39dfab(0xfd)]({'type':_0x372804,'id':_0xd0e62a,'label':_0x53addc?.[_0x39dfab(0xee)]||_0xf074f5,'uiId':_0x58ba9b,'resourceId':_0x53addc?.[_0x39dfab(0x170)]},!0x1);}catch(_0x1961fe){this[_0x39dfab(0x17a)][_0x39dfab(0x115)](_0x58ba9b);if(!(_0x1961fe instanceof _0x345b32&&_0x1961fe[_0x39dfab(0x140)][_0x39dfab(0xe5)](_0x39dfab(0xfe)))){const _0x46df66=_0x1d81cc[_0x39dfab(0x171)](_0x1961fe[_0x39dfab(0x145)])||_0x39dfab(0x11b),_0x201498=new _0x345b32(_0x46df66,null,{'fileName':_0xf074f5,..._0x1961fe});_0x201498[_0x39dfab(0x167)]=_0x1961fe[_0x39dfab(0x167)],this[_0x39dfab(0xe6)](_0x39dfab(0x112),{'error':_0x201498});}this[_0x39dfab(0x127)](_0x58ba9b);}}));}finally{this[_0x52d13c(0x11c)](_0x261f73);}}[_0x255bd5(0x14b)](_0x557b87){const _0x484096=_0x255bd5;if(this[_0x484096(0x10f)]()||!this[_0x484096(0x113)][_0x484096(0xfb)][_0x484096(0x125)])return;const _0x21af0d={'type':_0x3894c2[_0x484096(0x105)],'uiId':_0x484096(0x158),'label':_0x557b87,'isReadOnly':this[_0x484096(0x16d)][_0x484096(0xeb)](_0x484096(0x158)),'hidden':this[_0x484096(0x16d)][_0x484096(0xeb)](_0x484096(0x158))};this[_0x484096(0x15a)](_0x21af0d);}async[_0x255bd5(0xed)](_0x335a64,_0x30eeff,_0x4a6804,_0x3c2d1e){const _0x3ff69d=_0x255bd5,_0x66bfa6=this[_0x3ff69d(0x15c)][_0x3ff69d(0x171)](_0x3ff69d(0x158));if(_0x66bfa6&&_0x335a64){_0x66bfa6[_0x3ff69d(0x129)]=_0x3c2d1e?_0x3c2d1e[_0x3ff69d(0x131)](_0x2762f9=>({'start':_0x2762f9[_0x3ff69d(0x142)],'end':_0x2762f9[_0x3ff69d(0x179)]})):[];try{if(_0x66bfa6[_0x3ff69d(0x14e)]===_0x30eeff)return;const {id:_0x12c8f8}=await this[_0x3ff69d(0x148)][_0x3ff69d(0x149)](this[_0x3ff69d(0x133)],_0x335a64,{'version':_0x30eeff,'sessionId':_0x4a6804})[_0x3ff69d(0x154)]();_0x66bfa6['id']=_0x12c8f8,_0x66bfa6[_0x3ff69d(0x11e)]=_0x335a64,_0x66bfa6[_0x3ff69d(0x14e)]=_0x30eeff,_0x66bfa6[_0x3ff69d(0x13e)]=_0x4a6804;}catch(_0x3ef979){const _0x3f6815=new _0x345b32(_0x3ff69d(0x107),null);_0x3f6815[_0x3ff69d(0x167)]=_0x3ef979[_0x3ff69d(0x167)],this[_0x3ff69d(0xe6)](_0x3ff69d(0x112),{'error':_0x3f6815});}}}[_0x255bd5(0xe7)](_0x1426ad){const _0x560764=_0x255bd5;this[_0x560764(0x15a)]({'type':_0x3894c2[_0x560764(0x11a)],'label':_0x1426ad,'uiId':_0x560764(0x129),'content':_0x1426ad});}[_0x255bd5(0x11f)](){const _0x8856d1=_0x255bd5;this[_0x8856d1(0x127)](_0x8856d1(0x129));}async[_0x255bd5(0x147)](_0x29d31c,_0x4b25fd){const _0x3433bf=_0x255bd5,_0x430903=_0x3433bf(0x119)+_0x1f2165();this[_0x3433bf(0x12e)](_0x430903);const _0x4be228=_0x3433bf(0x119)+_0x1f2165();try{this[_0x3433bf(0x15a)]({'type':_0x3894c2[_0x3433bf(0x132)],'label':_0x4b25fd?.[_0x3433bf(0xee)]||_0x29d31c,'uiId':_0x4be228,'resourceId':_0x4b25fd?.[_0x3433bf(0x170)]},!0x0);const _0x43d972=this[_0x3433bf(0x148)][_0x3433bf(0x15b)](this[_0x3433bf(0x133)],_0x29d31c,_0x4b25fd);this[_0x3433bf(0x17a)][_0x3433bf(0x13a)](_0x4be228,_0x43d972[_0x3433bf(0xf8)]);const {id:_0x1f5287}=await _0x43d972[_0x3433bf(0x154)]();this[_0x3433bf(0x17a)][_0x3433bf(0x115)](_0x4be228),this[_0x3433bf(0xfd)]({'type':_0x3894c2[_0x3433bf(0x132)],'id':_0x1f5287,'label':_0x4b25fd?.[_0x3433bf(0xee)]||_0x29d31c,'uiId':_0x4be228,'resourceId':_0x4b25fd?.[_0x3433bf(0x170)]},!0x1);}catch(_0x5db3db){this[_0x3433bf(0x17a)][_0x3433bf(0x115)](_0x4be228),(_0x5db3db[_0x3433bf(0x140)][_0x3433bf(0xe5)](_0x3433bf(0xfe))||this[_0x3433bf(0xe6)](_0x3433bf(0x112),{'error':new _0x345b32(_0x3433bf(0xf6),this,{'url':_0x29d31c,'originalError':_0x5db3db}),'url':_0x29d31c}),this[_0x3433bf(0x127)](_0x4be228));}finally{this[_0x3433bf(0x11c)](_0x430903);}}[_0x255bd5(0xf1)](_0x479309){const _0x4d80eb=_0x255bd5;_0x479309['id']=_0x479309['id']??_0x1f2165()[_0x4d80eb(0x12d)](0x0,0x15),this[_0x4d80eb(0x15c)][_0x4d80eb(0x13a)](_0x479309[_0x4d80eb(0x12f)],_0x479309),this[_0x4d80eb(0xe6)](_0x4d80eb(0xff),{'contextItem':_0x479309,'isLoading':!0x1});}async[_0x255bd5(0x109)](_0x277a71,_0x238f88,_0x5eba66){const _0x367e6=_0x255bd5,_0x41bb6e=this[_0x367e6(0x113)][_0x367e6(0x164)][_0x367e6(0x168)](_0x19f1eb=>_0x19f1eb['id']===_0x277a71);if(!_0x41bb6e)return this[_0x367e6(0xe6)](_0x367e6(0x112),{'error':new _0x345b32(_0x367e6(0x172),this,{'sourceId':_0x277a71}),'sourceId':_0x277a71}),[];try{const _0x7ff8ba=(await _0x41bb6e[_0x367e6(0x13d)](_0x238f88))[_0x367e6(0x131)](_0x516375=>{const _0xada895=_0x367e6,_0x29559c=this[_0xada895(0x124)](_0x516375['id']);return{..._0x516375,'isInContext':_0x29559c};});return _0x41bb6e[_0x367e6(0x151)]=_0x7ff8ba,this[_0x367e6(0xe6)](_0x367e6(0x161),{'sourceId':_0x277a71,'source':_0x41bb6e,'resources':_0x7ff8ba,'uid':_0x5eba66}),_0x7ff8ba;}catch(_0x4474ad){return this[_0x367e6(0xe6)](_0x367e6(0x112),{'error':new _0x345b32(_0x367e6(0x14f),this,{'sourceId':_0x277a71,'originalError':_0x4474ad}),'sourceId':_0x277a71,'sourceLabel':_0x41bb6e[_0x367e6(0xee)]}),[];}}async[_0x255bd5(0xf3)](_0x571283,_0x4bd6b3){const _0x3609c0=_0x255bd5;if(this[_0x3609c0(0x124)](_0x4bd6b3['id']))return;let _0x423847=_0x4bd6b3[_0x3609c0(0x169)];if(!_0x423847&&_0x571283[_0x3609c0(0xfc)])try{_0x423847=await _0x571283[_0x3609c0(0xfc)](_0x4bd6b3['id']);}catch(_0x55525f){return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x104),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'originalError':_0x55525f}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}if(_0x423847)switch(_0x4bd6b3[_0x3609c0(0x141)]){case _0x3894c2[_0x3609c0(0x132)]:if(_0x3609c0(0x16c)!=typeof _0x423847)return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x16c),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});await this[_0x3609c0(0x147)](_0x423847,{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']});break;case _0x3894c2[_0x3609c0(0x139)]:if(!(_0x423847 instanceof File))return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x137),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});await this[_0x3609c0(0x14d)]([_0x423847],{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']});break;case _0x3894c2[_0x3609c0(0x14c)]:if(_0x3609c0(0xf9)!=typeof _0x423847||!(_0x3609c0(0x11e)in _0x423847)||!(_0x3609c0(0x141)in _0x423847))return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x163),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});_0x423847=AIChatContext[_0x3609c0(0x122)](_0x423847,_0x4bd6b3[_0x3609c0(0xee)]),await this[_0x3609c0(0x14d)]([_0x423847],{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']},_0x3894c2[_0x3609c0(0x14c)]);break;case _0x3894c2[_0x3609c0(0x166)]:break;default:this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x13c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'resourceType':_0x4bd6b3[_0x3609c0(0x141)]}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}else this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x15f),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}static[_0x255bd5(0x122)](_0x5a105e,_0x4069d2){const _0x21eba4=_0x255bd5;switch(_0x5a105e[_0x21eba4(0x141)]){case _0x462fc1[_0x21eba4(0x100)]:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0x16a)});case _0x462fc1[_0x21eba4(0x110)]:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0xef)});default:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0x157)});}}static[_0x255bd5(0x15d)](_0x38c003){const _0x1a959c=_0x255bd5;switch(_0x38c003[_0x1a959c(0x141)]){case _0x3894c2[_0x1a959c(0x139)]:return{'type':_0x3894c2[_0x1a959c(0x139)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x132)]:return{'type':_0x3894c2[_0x1a959c(0x132)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x105)]:return{'type':_0x3894c2[_0x1a959c(0x105)],'id':_0x38c003['id'],..._0x38c003[_0x1a959c(0x129)]?.[_0x1a959c(0x162)]&&{'selection':_0x38c003[_0x1a959c(0x129)]}};case _0x3894c2[_0x1a959c(0x14c)]:return{'type':_0x3894c2[_0x1a959c(0x139)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x166)]:{const _0x97d9ff=_0x38c003;return{'type':_0x3894c2[_0x1a959c(0x166)],'mcpServerName':_0x97d9ff[_0x1a959c(0x111)],'toolName':_0x97d9ff[_0x1a959c(0x128)],'data':_0x97d9ff[_0x1a959c(0x169)],'id':_0x97d9ff['id']};}default:return null;}}[_0x255bd5(0x15a)](_0xfd786f,_0x3723fb=!0x1){const _0x55e0a1=_0x255bd5;if(this[_0x55e0a1(0x15c)][_0x55e0a1(0x13a)](_0xfd786f[_0x55e0a1(0x12f)],_0xfd786f),_0xfd786f[_0x55e0a1(0xf5)]||this[_0x55e0a1(0xe6)](_0x55e0a1(0xff),{'contextItem':_0xfd786f,'isLoading':_0x3723fb}),_0x55e0a1(0x158)===_0xfd786f[_0x55e0a1(0x12f)]&&this[_0x55e0a1(0x117)](),_0xfd786f[_0x55e0a1(0x170)]){const _0x384916=this[_0x55e0a1(0x138)](_0xfd786f[_0x55e0a1(0x170)]);_0x384916&&_0x384916[_0x55e0a1(0x159)](_0x9d72fe=>{const _0x560ed7=_0x55e0a1;this[_0x560ed7(0x136)](_0x9d72fe,_0xfd786f[_0x560ed7(0x170)],!0x0);});}}[_0x255bd5(0x127)](_0xbfa8ec){const _0xf2d0f=_0x255bd5,_0x4509da=this[_0xf2d0f(0x15c)][_0xf2d0f(0x171)](_0xbfa8ec),_0x3226f6=this[_0xf2d0f(0x17a)][_0xf2d0f(0x171)](_0xbfa8ec);if(_0x3226f6&&(_0x3226f6[_0xf2d0f(0x123)](),this[_0xf2d0f(0x17a)][_0xf2d0f(0x115)](_0xbfa8ec)),_0x4509da?.[_0xf2d0f(0x170)]){const _0x3fc0e7=this[_0xf2d0f(0x138)](_0x4509da[_0xf2d0f(0x170)]);_0x3fc0e7&&_0x3fc0e7[_0xf2d0f(0x159)](_0x411baf=>{const _0x1fe5be=_0xf2d0f;this[_0x1fe5be(0x136)](_0x411baf,_0x4509da[_0x1fe5be(0x170)],!0x1);});}this[_0xf2d0f(0x15c)][_0xf2d0f(0x115)](_0xbfa8ec),this[_0xf2d0f(0xe6)](_0xf2d0f(0x10c),{'uiId':_0xbfa8ec,'type':_0x4509da?.[_0xf2d0f(0x141)]}),_0xf2d0f(0x158)===_0xbfa8ec&&this[_0xf2d0f(0x117)]();}[_0x255bd5(0xfd)](_0x3f4bf2,_0x4dbb28){const _0x272810=_0x255bd5;if(this[_0x272810(0x15c)][_0x272810(0xeb)](_0x3f4bf2[_0x272810(0x12f)])&&(this[_0x272810(0x15c)][_0x272810(0x13a)](_0x3f4bf2[_0x272810(0x12f)],_0x3f4bf2),this[_0x272810(0xe6)](_0x272810(0x155),{'contextItem':_0x3f4bf2,'isLoading':_0x4dbb28}),_0x3f4bf2[_0x272810(0x170)])){const _0x3f112a=this[_0x272810(0x138)](_0x3f4bf2[_0x272810(0x170)]);_0x3f112a&&_0x3f112a[_0x272810(0x159)](_0x260d2a=>{const _0x59b541=_0x272810;this[_0x59b541(0x136)](_0x260d2a,_0x3f4bf2[_0x59b541(0x170)],!0x0);});}}[_0x255bd5(0x175)](_0x5d1162){const _0x2f89ed=_0x255bd5;this[_0x2f89ed(0x16d)][_0x2f89ed(0x13a)](_0x5d1162[_0x2f89ed(0x12f)],_0x5d1162);}[_0x255bd5(0xf0)](){const _0x1a32d0=_0x255bd5;this[_0x1a32d0(0x113)]={'document':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0xfb)]?.[_0x1a32d0(0x125)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x176)]?.[_0x1a32d0(0x125)]},'files':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x156)]?.[_0x1a32d0(0x125)]},'sources':this[_0x1a32d0(0x121)](),'customItems':this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x11d)]?.[_0x1a32d0(0x131)](_0x41b9cf=>({..._0x41b9cf,'enabled':!0x0}))??[]},this[_0x1a32d0(0xe6)](_0x1a32d0(0x134),{'options':this[_0x1a32d0(0x113)]});}[_0x255bd5(0x121)](){const _0x387868=_0x255bd5;return this[_0x387868(0x165)]?.[_0x387868(0x164)]?.[_0x387868(0x131)](_0x5e64c9=>({..._0x5e64c9,'resources':[]}))??[];}[_0x255bd5(0x117)](){const _0x4dc5c3=_0x255bd5,_0x3c589d=this[_0x4dc5c3(0x10f)]()||this[_0x4dc5c3(0xe4)]();this[_0x4dc5c3(0x113)][_0x4dc5c3(0xfb)][_0x4dc5c3(0x143)]=_0x3c589d,this[_0x4dc5c3(0xe6)](_0x4dc5c3(0x134),{'options':this[_0x4dc5c3(0x113)]});}[_0x255bd5(0x124)](_0x27fee1){const _0x23b2df=_0x255bd5;for(const _0x3e2d0d of this[_0x23b2df(0x15c)][_0x23b2df(0x116)]())if(_0x3e2d0d[_0x23b2df(0x170)]===_0x27fee1)return!0x0;for(const _0x584a0d of this[_0x23b2df(0x16d)][_0x23b2df(0x116)]())if(_0x584a0d[_0x23b2df(0x170)]===_0x27fee1)return!0x0;return!0x1;}[_0x255bd5(0x138)](_0x3110c9){const _0xa83afd=_0x255bd5,_0x3bba6b=[];for(const _0x19a33e of this[_0xa83afd(0x113)][_0xa83afd(0x164)]){_0x19a33e[_0xa83afd(0x151)][_0xa83afd(0x168)](_0x1e2b92=>_0x1e2b92['id']===_0x3110c9)&&_0x3bba6b[_0xa83afd(0x16b)](_0x19a33e['id']);}return 0x0===_0x3bba6b[_0xa83afd(0x162)]?null:_0x3bba6b;}[_0x255bd5(0x136)](_0x5cedd3,_0x45ff2e,_0x3a0f11){const _0x40596f=_0x255bd5,_0x4548cc=this[_0x40596f(0x113)][_0x40596f(0x164)][_0x40596f(0x168)](_0x43ac54=>_0x43ac54['id']===_0x5cedd3);if(!_0x4548cc)return;const _0x5ca669=_0x4548cc[_0x40596f(0x151)][_0x40596f(0x168)](_0x206dd4=>_0x206dd4['id']===_0x45ff2e);_0x5ca669&&(_0x5ca669[_0x40596f(0x16e)]=_0x3a0f11,this[_0x40596f(0xe6)](_0x40596f(0x144),{'sourceId':_0x5cedd3,'resourceId':_0x45ff2e,'isInContext':_0x3a0f11}));}[_0x255bd5(0x12e)](_0x489829){const _0x375cc7=_0x255bd5;this[_0x375cc7(0x126)][_0x375cc7(0x13a)](_0x489829,!0x0),this[_0x375cc7(0x126)][_0x375cc7(0x10d)]&&this[_0x375cc7(0xe6)](_0x375cc7(0x160),{'isUploadInProgress':!0x0});}[_0x255bd5(0x11c)](_0x1e6f60){const _0x2dcc53=_0x255bd5;this[_0x2dcc53(0x126)][_0x2dcc53(0x115)](_0x1e6f60),0x0===this[_0x2dcc53(0x126)][_0x2dcc53(0x10d)]&&this[_0x2dcc53(0xe6)](_0x2dcc53(0x160),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x1c1a(){const _0x1c4108=['assistant','group','ai-chat-conversation-set-model-null','contextItems','hasOwn','getAvailableModels','14dWkIvX','find','addFilesToContext','removeFromContext','getPendingContextItems','_processMessagesToInteractions','getMessages','populateFromMessage','createReply','splice','loadSourceResources','setConversationTitle','setModel','49664186ynTnpF','type','connector','getDocumentContext','conversationStarted','mcp-tool-result','addToConversationContext','start','modelSelected','addUrlToContext','appendContent','9dardfG','sessionId','isStarted','isCurrentDocumentInConversation','modification','15122970LFtgWU','url','getCurrentDocumentContext','12wtEaeF','sources','isAvailable','chatContext','ai-chat-conversation-start-failed','lastInteraction','stack','removeSelectionFromContext','toolName','push','4564AYvbPA','set','selectedModel','conversationInitialized','ai-chat-handle-user-conversation-not-initialized','message','addResourceToContext','fetchConversation','getCapabilitiesConfig','capabilities','createInteraction','error','6025VDipvB','ai-chat-conversation-set-model-not-available','init','getConversation','fire','toggleReasoning','addSelectionToContext','setReasoning','ai-chat-handle-user-interaction-already-in-progress','getEditor','getAll','stop','addCurrentDocumentToContext','toggleWebSearch','delegate','options','_handleToolResultData','get','reset','setWebSearch','ai-chat-conversation-init-from-id-failed','parse','fetchConversationMessages','currentReply','destroy','conversationId','handleUserInteraction','3780321Awcqux','ai-chat-conversation-already-started','3798042aOxZaf','ai-chat-handle-user-interaction-start-failed','22404KMPhxE','getInteraction','6461264YvhYfV','updateCurrentDocumentInContext','isSelectionInContext','startConversation','user','model','ai-chat-conversation-start-no-model-selected','_extractContextItems','interactionCreated','content','chatCapabilities','updateCurrentDocument','ai-chat-conversation-init-failed','getModel','toLowerCase','length','title','addToolItemToContext','selectedModelId','indexOf','role','load','currentInteraction','removeInteraction','webSearch','chatModels','attributes','isFromHistory','isCurrentDocumentInContext','code','text','interactions','reasoning','11CBxxbK','prompt'];_0x1c1a=function(){return _0x1c4108;};return _0x1c1a();}const _0x30d668=_0x34ed;(function(_0x2f89f7,_0x2cfa64){const _0x54a78b=_0x34ed,_0x104621=_0x2f89f7();while(!![]){try{const _0x55f30f=parseInt(_0x54a78b(0x16d))/0x1*(parseInt(_0x54a78b(0x1ca))/0x2)+-parseInt(_0x54a78b(0x1c6))/0x3+-parseInt(_0x54a78b(0x19f))/0x4*(parseInt(_0x54a78b(0x1ab))/0x5)+parseInt(_0x54a78b(0x1c8))/0x6*(parseInt(_0x54a78b(0x175))/0x7)+-parseInt(_0x54a78b(0x1cc))/0x8+-parseInt(_0x54a78b(0x18d))/0x9*(parseInt(_0x54a78b(0x192))/0xa)+parseInt(_0x54a78b(0x182))/0xb*(parseInt(_0x54a78b(0x195))/0xc);if(_0x55f30f===_0x2cfa64)break;else _0x104621['push'](_0x104621['shift']());}catch(_0x14291c){_0x104621['push'](_0x104621['shift']());}}}(_0x1c1a,0xe7bcb));function _0x34ed(_0x87c1fd,_0x390cbb){const _0x1c1a9d=_0x1c1a();return _0x34ed=function(_0x34edd4,_0x3cd318){_0x34edd4=_0x34edd4-0x16c;let _0x2e7459=_0x1c1a9d[_0x34edd4];return _0x2e7459;},_0x34ed(_0x87c1fd,_0x390cbb);}import{CKEditorError as _0x3eee87,EmitterMixin as _0x513841,logWarning as _0x450e4d}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x1ca8e9}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x5e0a88,AI_CONTEXT_MODEL_EVENT_NAMES as _0x181a8f}from'./aichatcontext.js';import{AICapabilities as _0x1288fc,CAPABILITIES_MODEL_EVENT_NAMES as _0x447165}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x466f4a}from'./aichatinteraction.js';import{errorsMap as _0x4b8785}from'../../errorsmap.js';export class AIChatConversation extends _0x513841(){['id'];[_0x30d668(0x18f)]=!0x1;[_0x30d668(0x1e7)];[_0x30d668(0x1eb)]=[];[_0x30d668(0x1e2)];[_0x30d668(0x1a1)];[_0x30d668(0x184)];[_0x30d668(0x1ba)];constructor(_0xa0bd97){const _0x4f3eea=_0x30d668;super(),this[_0x4f3eea(0x1ba)]=_0xa0bd97,this[_0x4f3eea(0x184)]=_0xa0bd97[_0x4f3eea(0x184)],this[_0x4f3eea(0x1e5)]=_0xa0bd97[_0x4f3eea(0x1e5)],this['id']=_0xa0bd97[_0x4f3eea(0x1c4)],this[_0x4f3eea(0x1e7)]=_0xa0bd97[_0x4f3eea(0x1e7)];}async[_0x30d668(0x1ad)](_0x3804a9){const _0x1c8e8e=_0x30d668;try{this[_0x1c8e8e(0x198)]=new _0x5e0a88({'connector':this[_0x1c8e8e(0x184)],'config':_0x3804a9,'ownerId':this['id']}),this[_0x1c8e8e(0x198)][_0x1c8e8e(0x1b9)](..._0x181a8f)['to'](this),this[_0x1c8e8e(0x198)][_0x1c8e8e(0x1ad)](),this[_0x1c8e8e(0x1d6)]=new _0x1288fc(),this[_0x1c8e8e(0x1d6)][_0x1c8e8e(0x1b9)](..._0x447165)['to'](this),this[_0x1c8e8e(0x1d6)][_0x1c8e8e(0x1ad)]();const _0x3d56e1=await this[_0x1c8e8e(0x1e5)][_0x1c8e8e(0x174)]();this[_0x1c8e8e(0x1af)](_0x1c8e8e(0x1a2),{'availableModels':_0x3d56e1});const _0x309483=await this[_0x1c8e8e(0x1e5)][_0x1c8e8e(0x1d9)](this[_0x1c8e8e(0x1ba)][_0x1c8e8e(0x1de)]);_0x309483&&await this[_0x1c8e8e(0x181)](_0x309483);}catch(_0x3a6eb3){const _0x32e790=new _0x3eee87(_0x1c8e8e(0x1d8),null,{'message':_0x3a6eb3[_0x1c8e8e(0x1a4)]||_0x3a6eb3});_0x32e790[_0x1c8e8e(0x19b)]=_0x3a6eb3[_0x1c8e8e(0x19b)],this[_0x1c8e8e(0x1af)](_0x1c8e8e(0x1aa),{'error':_0x32e790});}}async[_0x30d668(0x189)](){const _0x467342=_0x30d668;if(this[_0x467342(0x18f)])throw new _0x3eee87(_0x467342(0x1c7),null,{'conversation':this});if(!this[_0x467342(0x1a1)])throw new _0x3eee87(_0x467342(0x1d2),null,{'conversation':this});try{const {id:_0x16a863}=await this[_0x467342(0x184)][_0x467342(0x1cf)](this['id'],this[_0x467342(0x1ba)][_0x467342(0x170)])[_0x467342(0x1ae)]();this['id']=_0x16a863,this[_0x467342(0x18f)]=!0x0,this[_0x467342(0x1af)](_0x467342(0x186),{'conversationId':this['id'],'selectedModel':this[_0x467342(0x1a1)]});}catch(_0xfe729e){const _0x1b3e06=new _0x3eee87(_0x467342(0x199),null,{'message':_0xfe729e[_0x467342(0x1a4)],'conversationId':this['id']});throw _0x1b3e06[_0x467342(0x19b)]=_0xfe729e[_0x467342(0x19b)],this[_0x467342(0x1af)](_0x467342(0x1aa),{'error':_0x1b3e06}),_0x1b3e06;}}async[_0x30d668(0x1e1)](_0x1d857c,_0x3dcdb6){const _0x46e92d=_0x30d668;try{const _0x45fdb9=await this[_0x46e92d(0x184)][_0x46e92d(0x1a6)](_0x1d857c)[_0x46e92d(0x1ae)](),_0x5a79ca=await this[_0x46e92d(0x184)][_0x46e92d(0x1c1)](_0x1d857c)[_0x46e92d(0x17b)](),_0x5191d3=_0x5a79ca[0x0][_0x46e92d(0x1d1)];this[_0x46e92d(0x18f)]=!0x0,this['id']=_0x45fdb9['id'],_0x46e92d(0x1dc)in _0x45fdb9?this[_0x46e92d(0x1af)](_0x46e92d(0x180),_0x45fdb9[_0x46e92d(0x1dc)],!0x0):this[_0x46e92d(0x1af)](_0x46e92d(0x180),'',!0x0);const _0x462595=(await this[_0x46e92d(0x1e5)][_0x46e92d(0x1b5)]())[_0x46e92d(0x176)](_0x46ca6f=>_0x46ca6f['id'][_0x46e92d(0x1da)]()===_0x5191d3[_0x46e92d(0x1da)]());return this[_0x46e92d(0x1a1)]=_0x462595,this[_0x46e92d(0x1af)](_0x46e92d(0x18a),{'selectedModel':_0x462595,'isDisabled':!0x0}),await this[_0x46e92d(0x17a)](_0x5a79ca,_0x3dcdb6,_0x5191d3),this[_0x46e92d(0x1e2)]=void 0x0,this;}catch(_0x37b177){const _0x116d8a=new _0x3eee87(_0x46e92d(0x1bf),null,{'message':_0x37b177[_0x46e92d(0x1a4)],'conversationId':_0x1d857c});throw _0x116d8a[_0x46e92d(0x19b)]=_0x37b177[_0x46e92d(0x19b)],this[_0x46e92d(0x1af)](_0x46e92d(0x1aa),{'error':_0x116d8a}),_0x116d8a;}}async[_0x30d668(0x17a)](_0x3a04f8,_0x115292,_0x525546){const _0x1abfb0=_0x30d668;let _0x17614f;for(const _0x3ebb6c of _0x3a04f8)if(_0x1abfb0(0x1d0)===_0x3ebb6c[_0x1abfb0(0x1e0)]){const _0xb30646=await this[_0x1abfb0(0x1d3)](_0x3ebb6c),_0x48079e={'isReasoningEnabled':Object[_0x1abfb0(0x173)](_0x3ebb6c[_0x1abfb0(0x1a8)],_0x1abfb0(0x16c)),'isWebSearchEnabled':Object[_0x1abfb0(0x173)](_0x3ebb6c[_0x1abfb0(0x1a8)],_0x1abfb0(0x1e4))};_0x17614f=this[_0x1abfb0(0x1a9)]({'userMessage':_0x3ebb6c[_0x1abfb0(0x16e)],'contextItems':_0xb30646,'capabilities':_0x48079e,'modelId':_0x525546,'attributes':_0x3ebb6c[_0x1abfb0(0x1e6)]}),this[_0x1abfb0(0x1e2)]=_0x17614f,this[_0x1abfb0(0x198)][_0x1abfb0(0x188)](this[_0x1abfb0(0x1e2)][_0x1abfb0(0x172)]);}else{if(_0x1abfb0(0x16f)===_0x3ebb6c[_0x1abfb0(0x1e0)]&&_0x17614f){const _0x575f75=[];for(const _0x2e5453 of _0x3ebb6c[_0x1abfb0(0x1d5)])switch(_0x2e5453[_0x1abfb0(0x183)]){case _0x1abfb0(0x1ea):case _0x1abfb0(0x191):{const _0xf925b5=_0x17614f[_0x1abfb0(0x185)]()?.[_0x1abfb0(0x18e)]!==_0x115292;_0x17614f[_0x1abfb0(0x1c2)]=_0x17614f[_0x1abfb0(0x17d)]({'type':_0x2e5453[_0x1abfb0(0x183)],'isDone':!0x0,'interactionId':_0x17614f['id'],'areActionsDisabled':_0xf925b5}),_0x17614f[_0x1abfb0(0x1c2)][_0x1abfb0(0x18c)](_0x2e5453[_0x1abfb0(0x1d5)]),_0x575f75[_0x1abfb0(0x1db)]>0x0&&(_0x17614f[_0x1abfb0(0x1c2)][_0x1abfb0(0x196)]=_0x575f75[_0x1abfb0(0x17e)](0x0));break;}case _0x1abfb0(0x193):_0x575f75[_0x1abfb0(0x19e)](_0x2e5453);break;case _0x1abfb0(0x187):{const {data:_0x44202a,attributes:_0x286cc3}=JSON[_0x1abfb0(0x1c0)](_0x2e5453[_0x1abfb0(0x1d5)]);_0x17614f[_0x1abfb0(0x1bb)]({'toolName':_0x2e5453[_0x1abfb0(0x19d)],'data':_0x44202a,'attributes':_0x286cc3});break;}}}}}async[_0x30d668(0x1d3)](_0x218f77){const _0x1db3da=_0x30d668,_0x3380fd=new Map();if(!_0x218f77[_0x1db3da(0x1d5)])return _0x3380fd;for(const _0x3ebc3f of _0x218f77[_0x1db3da(0x1d5)]){const _0x59fa13=await this[_0x1db3da(0x198)][_0x1db3da(0x17c)](_0x3ebc3f);_0x59fa13&&_0x3380fd[_0x1db3da(0x1a0)](_0x59fa13['id'],_0x59fa13);}return _0x3380fd;}async[_0x30d668(0x1c5)]({userMessage:_0x293606,attributes:_0xa1cbab}){const _0x1b14b8=_0x30d668;if(!this[_0x1b14b8(0x18f)])throw new _0x3eee87(_0x1b14b8(0x1a3),null,{'conversation':this});if(this[_0x1b14b8(0x1e2)])throw new _0x3eee87(_0x1b14b8(0x1b3),null,{'conversation':this});try{const _0x117bf0=this[_0x1b14b8(0x198)][_0x1b14b8(0x179)](),_0x4d594d=this[_0x1b14b8(0x1d6)][_0x1b14b8(0x1a7)](),_0x269905=this[_0x1b14b8(0x1a1)]['id'];this[_0x1b14b8(0x1e2)]=this[_0x1b14b8(0x1a9)]({'userMessage':_0x293606,'contextItems':_0x117bf0,'capabilities':_0x4d594d,'modelId':_0x269905,'attributes':_0xa1cbab}),await this[_0x1b14b8(0x1e2)][_0x1b14b8(0x189)](),this[_0x1b14b8(0x198)][_0x1b14b8(0x188)](this[_0x1b14b8(0x1e2)][_0x1b14b8(0x172)]);}catch(_0x4ebf14){if(_0x4ebf14 instanceof _0x3eee87)this[_0x1b14b8(0x1af)](_0x1b14b8(0x1aa),{'interactionId':this[_0x1b14b8(0x1e2)]?this[_0x1b14b8(0x1e2)]['id']:void 0x0,'error':_0x4ebf14});else{const _0x45ea51=_0x4b8785[_0x1b14b8(0x1bc)](_0x4ebf14[_0x1b14b8(0x1e9)])||_0x1b14b8(0x1c9);this[_0x1b14b8(0x1af)](_0x1b14b8(0x1aa),{'interactionId':this[_0x1b14b8(0x1e2)]?this[_0x1b14b8(0x1e2)]['id']:void 0x0,'error':new _0x3eee87(_0x45ea51,null,{'error':_0x4ebf14})});}}finally{this[_0x1b14b8(0x1e2)]?.[_0x1b14b8(0x1b6)](),this[_0x1b14b8(0x1e2)]=void 0x0;}}[_0x30d668(0x1a9)]({userMessage:_0x32d088,contextItems:_0x52e6fe,capabilities:_0x24265c,modelId:_0x2036d2,attributes:_0x246842}){const _0x2dc74d=_0x30d668,_0x115128=new _0x466f4a({'userMessage':_0x32d088,'contextItems':_0x52e6fe,'capabilities':_0x24265c,'conversationId':this['id'],'connector':this[_0x2dc74d(0x184)],'editor':this[_0x2dc74d(0x1ba)][_0x2dc74d(0x1b4)]&&this[_0x2dc74d(0x1ba)][_0x2dc74d(0x1b4)](),'model':_0x2036d2,'attributes':_0x246842});return _0x115128[_0x2dc74d(0x1b9)](..._0x1ca8e9)['to'](this),this[_0x2dc74d(0x1eb)][_0x2dc74d(0x19e)](_0x115128),this[_0x2dc74d(0x1af)](_0x2dc74d(0x1d4),_0x115128),_0x115128;}[_0x30d668(0x1cb)](_0x3d1519){const _0x32d830=_0x30d668;return this[_0x32d830(0x1eb)][_0x32d830(0x176)](_0x98da0e=>_0x98da0e['id']===_0x3d1519);}[_0x30d668(0x1e3)](_0x14d92f){const _0x3c58fc=_0x30d668,_0x46bf19=this[_0x3c58fc(0x1cb)](_0x14d92f);_0x46bf19&&(_0x46bf19[_0x3c58fc(0x1c3)](),this[_0x3c58fc(0x1eb)][_0x3c58fc(0x17e)](this[_0x3c58fc(0x1eb)][_0x3c58fc(0x1df)](_0x46bf19),0x1));}get[_0x30d668(0x19a)](){const _0x283a1c=_0x30d668;return this[_0x283a1c(0x1eb)][this[_0x283a1c(0x1eb)][_0x283a1c(0x1db)]-0x1];}[_0x30d668(0x1b7)](_0x4bc4a9){const _0x10a0f6=_0x30d668;this[_0x10a0f6(0x198)][_0x10a0f6(0x1b7)](_0x4bc4a9);}async[_0x30d668(0x1cd)]({content:_0x33394e,version:_0x5370fe,sessionId:_0x588094,selections:_0x3c8fca}){const _0x46f32b=_0x30d668;await this[_0x46f32b(0x198)][_0x46f32b(0x1d7)](_0x33394e,_0x5370fe,_0x588094,_0x3c8fca);}[_0x30d668(0x194)](){const _0x3f630=_0x30d668;return this[_0x3f630(0x1e2)]?.[_0x3f630(0x185)]()?.[_0x3f630(0x1d5)]||'';}[_0x30d668(0x1b1)](_0x13bfc0){const _0x5caca5=_0x30d668;this[_0x5caca5(0x198)][_0x5caca5(0x1b1)](_0x13bfc0);}[_0x30d668(0x19c)](){const _0x67899b=_0x30d668;this[_0x67899b(0x198)][_0x67899b(0x19c)]();}[_0x30d668(0x177)](_0x273919){const _0x4a03b2=_0x30d668;this[_0x4a03b2(0x198)][_0x4a03b2(0x177)](_0x273919);}[_0x30d668(0x18b)](_0x3a37b1){const _0x494ad1=_0x30d668;this[_0x494ad1(0x198)][_0x494ad1(0x18b)](_0x3a37b1);}[_0x30d668(0x1dd)](_0x20b170){const _0x3ebdf5=_0x30d668;this[_0x3ebdf5(0x198)][_0x3ebdf5(0x1dd)](_0x20b170);}[_0x30d668(0x1a5)](_0xaf3380,_0x22bc90){const _0x362ce7=_0x30d668;this[_0x362ce7(0x198)][_0x362ce7(0x1a5)](_0xaf3380,_0x22bc90);}[_0x30d668(0x17f)](_0x9ac4fc,_0x45167e,_0x3e2055){const _0xc1088e=_0x30d668;return this[_0xc1088e(0x198)][_0xc1088e(0x17f)](_0x9ac4fc,_0x45167e,_0x3e2055);}[_0x30d668(0x178)](_0x525580){const _0x15d85d=_0x30d668;this[_0x15d85d(0x198)][_0x15d85d(0x178)](_0x525580);}[_0x30d668(0x1be)](_0x52f6d2){const _0x4b318e=_0x30d668;this[_0x4b318e(0x1d6)][_0x4b318e(0x1be)](_0x52f6d2);}[_0x30d668(0x1b8)](){const _0x3571f4=_0x30d668;this[_0x3571f4(0x1d6)][_0x3571f4(0x1b8)]();}[_0x30d668(0x1b2)](_0x175b30){const _0x22604f=_0x30d668;this[_0x22604f(0x1d6)][_0x22604f(0x1b2)](_0x175b30);}[_0x30d668(0x1b0)](){const _0x34d45f=_0x30d668;this[_0x34d45f(0x1d6)][_0x34d45f(0x1b0)]();}[_0x30d668(0x1e8)](){const _0x28c47c=_0x30d668;return this[_0x28c47c(0x198)][_0x28c47c(0x1e8)]();}[_0x30d668(0x190)](){const _0xf8cd37=_0x30d668;return this[_0xf8cd37(0x198)][_0xf8cd37(0x190)]();}[_0x30d668(0x1ce)](){const _0x2c608f=_0x30d668;return this[_0x2c608f(0x198)][_0x2c608f(0x1ce)]();}async[_0x30d668(0x181)](_0xfef04b){const _0x170930=_0x30d668;_0xfef04b?!0x1===await this[_0x170930(0x1e5)][_0x170930(0x197)](_0xfef04b)&&(_0x450e4d(_0x170930(0x1ac),{'conversation':this,'model':_0xfef04b}),_0xfef04b=(await this[_0x170930(0x1e5)][_0x170930(0x174)]())[0x0]):(_0x450e4d(_0x170930(0x171),{'conversation':this}),_0xfef04b=(await this[_0x170930(0x1e5)][_0x170930(0x174)]())[0x0]),_0xfef04b['id']!==this[_0x170930(0x1a1)]?.['id']&&(this[_0x170930(0x1a1)]=_0xfef04b,this[_0x170930(0x1d6)][_0x170930(0x1bd)](),this[_0x170930(0x1af)](_0x170930(0x18a),{'selectedModel':_0xfef04b}));}}
|
|
23
|
+
function _0x5a50(){const _0x5f337e=['load','_processMessagesToInteractions','addResourceToContext','createInteraction','assistant','get','ai-chat-conversation-init-from-id-failed','model','type','2980466gpVWsn','addUrlToContext','toolName','getMessages','toLowerCase','getConversation','getCurrentDocumentContext','hasOwn','sessionId','reset','url','capabilities','isSelectionInContext','3BVGRkV','conversationId','length','role','ai-chat-conversation-already-started','updateCurrentDocument','getModel','8741040iTqYGV','ai-chat-conversation-start-failed','interactionCreated','toggleReasoning','destroy','fetchConversation','ai-chat-conversation-start-no-model-selected','push','updateCurrentDocumentInContext','code','removeFromContext','chatContext','ai-chat-handle-user-interaction-already-in-progress','1074042KMHXfW','start','addToolItemToContext','getInteraction','fire','toggleWebSearch','webSearch','indexOf','chatCapabilities','conversationStarted','setConversationTitle','isStarted','loadSourceResources','getAvailableModels','stack','ai-chat-handle-user-conversation-not-initialized','connector','set','populateFromMessage','isFromHistory','getDocumentContext','_handleToolResultData','5778824WsGBAE','title','handleUserInteraction','getPendingContextItems','fetchConversationMessages','mcp-tool-result','selectedModel','setModel','find','addSelectionToContext','text','ai-chat-handle-user-interaction-start-failed','modelSelected','delegate','currentReply','appendContent','ai-chat-conversation-set-model-not-available','addFilesToContext','addToConversationContext','341716YXDLvR','splice','addCurrentDocumentToContext','content','_extractContextItems','ai-chat-conversation-init-failed','isCurrentDocumentInContext','isAvailable','conversationInitialized','isCurrentDocumentInConversation','removeSelectionFromContext','removeInteraction','1651614lZZbly','startConversation','sources','chatModels','getCapabilitiesConfig','group','init','interactions','message','getAll','2261005yURMUw','lastInteraction','ai-chat-conversation-set-model-null','options','reasoning','modification','createReply','setWebSearch','parse','getEditor','error','setReasoning','currentInteraction','1fghnNZ','stop','selectedModelId','user','attributes','prompt','contextItems','7yAfbdz'];_0x5a50=function(){return _0x5f337e;};return _0x5a50();}const _0x56fbd5=_0x10ed;(function(_0x5d70ad,_0x2b9231){const _0x5b4fb7=_0x10ed,_0x249f64=_0x5d70ad();while(!![]){try{const _0x4b864d=parseInt(_0x5b4fb7(0x1a7))/0x1*(parseInt(_0x5b4fb7(0x1b8))/0x2)+-parseInt(_0x5b4fb7(0x1c5))/0x3*(-parseInt(_0x5b4fb7(0x184))/0x4)+-parseInt(_0x5b4fb7(0x19a))/0x5+-parseInt(_0x5b4fb7(0x190))/0x6+parseInt(_0x5b4fb7(0x1ae))/0x7*(parseInt(_0x5b4fb7(0x1ef))/0x8)+parseInt(_0x5b4fb7(0x1d9))/0x9+-parseInt(_0x5b4fb7(0x1cc))/0xa;if(_0x4b864d===_0x2b9231)break;else _0x249f64['push'](_0x249f64['shift']());}catch(_0xde6d14){_0x249f64['push'](_0x249f64['shift']());}}}(_0x5a50,0xc72a3));import{CKEditorError as _0x2d9d07,EmitterMixin as _0x1c2472,logWarning as _0x57ebd4}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x2bc3ee}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0xcbfaf2,AI_CONTEXT_MODEL_EVENT_NAMES as _0xe3ed0}from'./aichatcontext.js';import{AICapabilities as _0x16a27d,CAPABILITIES_MODEL_EVENT_NAMES as _0x85c80e}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x3e0766}from'./aichatinteraction.js';import{errorsMap as _0x1bed94}from'../../errorsmap.js';function _0x10ed(_0x2e5722,_0x42ba0f){const _0x5a5091=_0x5a50();return _0x10ed=function(_0x10edc2,_0x4c943f){_0x10edc2=_0x10edc2-0x177;let _0x141773=_0x5a5091[_0x10edc2];return _0x141773;},_0x10ed(_0x2e5722,_0x42ba0f);}export class AIChatConversation extends _0x1c2472(){['id'];[_0x56fbd5(0x1e4)]=!0x1;[_0x56fbd5(0x1ec)];[_0x56fbd5(0x197)]=[];[_0x56fbd5(0x1a6)];[_0x56fbd5(0x177)];[_0x56fbd5(0x1e9)];[_0x56fbd5(0x19d)];constructor(_0x20e4eb){const _0x5a4fd3=_0x56fbd5;super(),this[_0x5a4fd3(0x19d)]=_0x20e4eb,this[_0x5a4fd3(0x1e9)]=_0x20e4eb[_0x5a4fd3(0x1e9)],this[_0x5a4fd3(0x193)]=_0x20e4eb[_0x5a4fd3(0x193)],this['id']=_0x20e4eb[_0x5a4fd3(0x1c6)],this[_0x5a4fd3(0x1ec)]=_0x20e4eb[_0x5a4fd3(0x1ec)];}async[_0x56fbd5(0x196)](_0x30ea5f){const _0x1b3e9b=_0x56fbd5;try{this[_0x1b3e9b(0x1d7)]=new _0xcbfaf2({'connector':this[_0x1b3e9b(0x1e9)],'config':_0x30ea5f,'ownerId':this['id']}),this[_0x1b3e9b(0x1d7)][_0x1b3e9b(0x17e)](..._0xe3ed0)['to'](this),this[_0x1b3e9b(0x1d7)][_0x1b3e9b(0x196)](),this[_0x1b3e9b(0x1e1)]=new _0x16a27d(),this[_0x1b3e9b(0x1e1)][_0x1b3e9b(0x17e)](..._0x85c80e)['to'](this),this[_0x1b3e9b(0x1e1)][_0x1b3e9b(0x196)]();const _0x56da28=await this[_0x1b3e9b(0x193)][_0x1b3e9b(0x1e6)]();this[_0x1b3e9b(0x1dd)](_0x1b3e9b(0x18c),{'availableModels':_0x56da28});const _0x2b4c8f=await this[_0x1b3e9b(0x193)][_0x1b3e9b(0x1cb)](this[_0x1b3e9b(0x19d)][_0x1b3e9b(0x1a9)]);_0x2b4c8f&&await this[_0x1b3e9b(0x178)](_0x2b4c8f);}catch(_0x442409){const _0x4ff159=new _0x2d9d07(_0x1b3e9b(0x189),null,{'message':_0x442409[_0x1b3e9b(0x198)]||_0x442409});_0x4ff159[_0x1b3e9b(0x1e7)]=_0x442409[_0x1b3e9b(0x1e7)],this[_0x1b3e9b(0x1dd)](_0x1b3e9b(0x1a4),{'error':_0x4ff159});}}async[_0x56fbd5(0x1da)](){const _0x452878=_0x56fbd5;if(this[_0x452878(0x1e4)])throw new _0x2d9d07(_0x452878(0x1c9),null,{'conversation':this});if(!this[_0x452878(0x177)])throw new _0x2d9d07(_0x452878(0x1d2),null,{'conversation':this});try{const {id:_0x2b601f}=await this[_0x452878(0x1e9)][_0x452878(0x191)](this['id'],this[_0x452878(0x19d)][_0x452878(0x195)])[_0x452878(0x1bd)]();this['id']=_0x2b601f,this[_0x452878(0x1e4)]=!0x0,this[_0x452878(0x1dd)](_0x452878(0x1e2),{'conversationId':this['id'],'selectedModel':this[_0x452878(0x177)]});}catch(_0x27aac0){const _0x191d3e=new _0x2d9d07(_0x452878(0x1cd),null,{'message':_0x27aac0[_0x452878(0x198)],'conversationId':this['id']});throw _0x191d3e[_0x452878(0x1e7)]=_0x27aac0[_0x452878(0x1e7)],this[_0x452878(0x1dd)](_0x452878(0x1a4),{'error':_0x191d3e}),_0x191d3e;}}async[_0x56fbd5(0x1af)](_0x536b0a,_0x4c33fb){const _0xb737d6=_0x56fbd5;try{const _0x500036=await this[_0xb737d6(0x1e9)][_0xb737d6(0x1d1)](_0x536b0a)[_0xb737d6(0x1bd)](),_0x196dda=await this[_0xb737d6(0x1e9)][_0xb737d6(0x1f3)](_0x536b0a)[_0xb737d6(0x1bb)](),_0x2a8988=_0x196dda[0x0][_0xb737d6(0x1b6)];this[_0xb737d6(0x1e4)]=!0x0,this['id']=_0x500036['id'],_0xb737d6(0x1f0)in _0x500036?this[_0xb737d6(0x1dd)](_0xb737d6(0x1e3),_0x500036[_0xb737d6(0x1f0)],!0x0):this[_0xb737d6(0x1dd)](_0xb737d6(0x1e3),'',!0x0);const _0x46526c=(await this[_0xb737d6(0x193)][_0xb737d6(0x199)]())[_0xb737d6(0x179)](_0x18a196=>_0x18a196['id'][_0xb737d6(0x1bc)]()===_0x2a8988[_0xb737d6(0x1bc)]());return this[_0xb737d6(0x177)]=_0x46526c,this[_0xb737d6(0x1dd)](_0xb737d6(0x17d),{'selectedModel':_0x46526c,'isDisabled':!0x0}),await this[_0xb737d6(0x1b0)](_0x196dda,_0x4c33fb,_0x2a8988),this[_0xb737d6(0x1a6)]=void 0x0,this;}catch(_0x14c794){const _0xfb4c1=new _0x2d9d07(_0xb737d6(0x1b5),null,{'message':_0x14c794[_0xb737d6(0x198)],'conversationId':_0x536b0a});throw _0xfb4c1[_0xb737d6(0x1e7)]=_0x14c794[_0xb737d6(0x1e7)],this[_0xb737d6(0x1dd)](_0xb737d6(0x1a4),{'error':_0xfb4c1}),_0xfb4c1;}}async[_0x56fbd5(0x1b0)](_0x55110a,_0x15c437,_0x2e6286){const _0x2ed0e2=_0x56fbd5;let _0x4a5816;for(const _0x4ef608 of _0x55110a)if(_0x2ed0e2(0x1aa)===_0x4ef608[_0x2ed0e2(0x1c8)]){const _0x3839ed=await this[_0x2ed0e2(0x188)](_0x4ef608),_0x59a569={'isReasoningEnabled':Object[_0x2ed0e2(0x1bf)](_0x4ef608[_0x2ed0e2(0x1c3)],_0x2ed0e2(0x19e)),'isWebSearchEnabled':Object[_0x2ed0e2(0x1bf)](_0x4ef608[_0x2ed0e2(0x1c3)],_0x2ed0e2(0x1df))};_0x4a5816=this[_0x2ed0e2(0x1b2)]({'userMessage':_0x4ef608[_0x2ed0e2(0x1ac)],'contextItems':_0x3839ed,'capabilities':_0x59a569,'modelId':_0x2e6286,'attributes':_0x4ef608[_0x2ed0e2(0x1ab)]}),this[_0x2ed0e2(0x1a6)]=_0x4a5816,this[_0x2ed0e2(0x1d7)][_0x2ed0e2(0x183)](this[_0x2ed0e2(0x1a6)][_0x2ed0e2(0x1ad)]);}else{if(_0x2ed0e2(0x1b3)===_0x4ef608[_0x2ed0e2(0x1c8)]&&_0x4a5816){const _0x5dd278=[];for(const _0xb5e4e8 of _0x4ef608[_0x2ed0e2(0x187)])switch(_0xb5e4e8[_0x2ed0e2(0x1b7)]){case _0x2ed0e2(0x17b):case _0x2ed0e2(0x19f):{const _0x40aaf6=_0x4a5816[_0x2ed0e2(0x1ed)]()?.[_0x2ed0e2(0x1c0)]!==_0x15c437;_0x4a5816[_0x2ed0e2(0x17f)]=_0x4a5816[_0x2ed0e2(0x1a0)]({'type':_0xb5e4e8[_0x2ed0e2(0x1b7)],'isDone':!0x0,'interactionId':_0x4a5816['id'],'areActionsDisabled':_0x40aaf6}),_0x4a5816[_0x2ed0e2(0x17f)][_0x2ed0e2(0x180)](_0xb5e4e8[_0x2ed0e2(0x187)]),_0x5dd278[_0x2ed0e2(0x1c7)]>0x0&&(_0x4a5816[_0x2ed0e2(0x17f)][_0x2ed0e2(0x192)]=_0x5dd278[_0x2ed0e2(0x185)](0x0));break;}case _0x2ed0e2(0x1c2):_0x5dd278[_0x2ed0e2(0x1d3)](_0xb5e4e8);break;case _0x2ed0e2(0x1f4):{const {data:_0x550a76,attributes:_0x1f4c2f}=JSON[_0x2ed0e2(0x1a2)](_0xb5e4e8[_0x2ed0e2(0x187)]);_0x4a5816[_0x2ed0e2(0x1ee)]({'toolName':_0xb5e4e8[_0x2ed0e2(0x1ba)],'data':_0x550a76,'attributes':_0x1f4c2f});break;}}}}}async[_0x56fbd5(0x188)](_0x3efb70){const _0xa64167=_0x56fbd5,_0xbeff3a=new Map();if(!_0x3efb70[_0xa64167(0x187)])return _0xbeff3a;for(const _0x364777 of _0x3efb70[_0xa64167(0x187)]){const _0x12a76e=await this[_0xa64167(0x1d7)][_0xa64167(0x1eb)](_0x364777);_0x12a76e&&_0xbeff3a[_0xa64167(0x1ea)](_0x12a76e['id'],_0x12a76e);}return _0xbeff3a;}async[_0x56fbd5(0x1f1)]({userMessage:_0x35f434,attributes:_0x1665e0}){const _0x153cf2=_0x56fbd5;if(!this[_0x153cf2(0x1e4)])throw new _0x2d9d07(_0x153cf2(0x1e8),null,{'conversation':this});if(this[_0x153cf2(0x1a6)])throw new _0x2d9d07(_0x153cf2(0x1d8),null,{'conversation':this});try{const _0xdb684a=this[_0x153cf2(0x1d7)][_0x153cf2(0x1f2)](),_0x17c5a4=this[_0x153cf2(0x1e1)][_0x153cf2(0x194)](),_0x8216c2=this[_0x153cf2(0x177)]['id'];this[_0x153cf2(0x1a6)]=this[_0x153cf2(0x1b2)]({'userMessage':_0x35f434,'contextItems':_0xdb684a,'capabilities':_0x17c5a4,'modelId':_0x8216c2,'attributes':_0x1665e0}),await this[_0x153cf2(0x1a6)][_0x153cf2(0x1da)](),this[_0x153cf2(0x1d7)][_0x153cf2(0x183)](this[_0x153cf2(0x1a6)][_0x153cf2(0x1ad)]);}catch(_0x2a3659){if(_0x2a3659 instanceof _0x2d9d07)this[_0x153cf2(0x1dd)](_0x153cf2(0x1a4),{'interactionId':this[_0x153cf2(0x1a6)]?this[_0x153cf2(0x1a6)]['id']:void 0x0,'error':_0x2a3659});else{const _0x18963f=_0x1bed94[_0x153cf2(0x1b4)](_0x2a3659[_0x153cf2(0x1d5)])||_0x153cf2(0x17c);this[_0x153cf2(0x1dd)](_0x153cf2(0x1a4),{'interactionId':this[_0x153cf2(0x1a6)]?this[_0x153cf2(0x1a6)]['id']:void 0x0,'error':new _0x2d9d07(_0x18963f,null,{'error':_0x2a3659})});}}finally{this[_0x153cf2(0x1a6)]?.[_0x153cf2(0x1a8)](),this[_0x153cf2(0x1a6)]=void 0x0;}}[_0x56fbd5(0x1b2)]({userMessage:_0xe5df84,contextItems:_0x3e7e92,capabilities:_0x4c517b,modelId:_0x524160,attributes:_0xa16b4b}){const _0x53f8c4=_0x56fbd5,_0x338e67=new _0x3e0766({'userMessage':_0xe5df84,'contextItems':_0x3e7e92,'capabilities':_0x4c517b,'conversationId':this['id'],'connector':this[_0x53f8c4(0x1e9)],'editor':this[_0x53f8c4(0x19d)][_0x53f8c4(0x1a3)]&&this[_0x53f8c4(0x19d)][_0x53f8c4(0x1a3)](),'model':_0x524160,'attributes':_0xa16b4b});return _0x338e67[_0x53f8c4(0x17e)](..._0x2bc3ee)['to'](this),this[_0x53f8c4(0x197)][_0x53f8c4(0x1d3)](_0x338e67),this[_0x53f8c4(0x1dd)](_0x53f8c4(0x1ce),_0x338e67),_0x338e67;}[_0x56fbd5(0x1dc)](_0x442d2b){const _0xf29f52=_0x56fbd5;return this[_0xf29f52(0x197)][_0xf29f52(0x179)](_0x70a0ef=>_0x70a0ef['id']===_0x442d2b);}[_0x56fbd5(0x18f)](_0x22dd95){const _0x5aea08=_0x56fbd5,_0x334c6c=this[_0x5aea08(0x1dc)](_0x22dd95);_0x334c6c&&(_0x334c6c[_0x5aea08(0x1d0)](),this[_0x5aea08(0x197)][_0x5aea08(0x185)](this[_0x5aea08(0x197)][_0x5aea08(0x1e0)](_0x334c6c),0x1));}get[_0x56fbd5(0x19b)](){const _0x122d7d=_0x56fbd5;return this[_0x122d7d(0x197)][this[_0x122d7d(0x197)][_0x122d7d(0x1c7)]-0x1];}[_0x56fbd5(0x186)](_0x3e6da5){const _0x31a2f9=_0x56fbd5;this[_0x31a2f9(0x1d7)][_0x31a2f9(0x186)](_0x3e6da5);}async[_0x56fbd5(0x1d4)]({content:_0x238bcf,version:_0x5d2119,sessionId:_0x5658f7,selections:_0x3753d8}){const _0x15ab45=_0x56fbd5;await this[_0x15ab45(0x1d7)][_0x15ab45(0x1ca)](_0x238bcf,_0x5d2119,_0x5658f7,_0x3753d8);}[_0x56fbd5(0x1be)](){const _0x1a7c51=_0x56fbd5;return this[_0x1a7c51(0x1a6)]?.[_0x1a7c51(0x1ed)]()?.[_0x1a7c51(0x187)]||'';}[_0x56fbd5(0x17a)](_0x44b507){const _0x14e53d=_0x56fbd5;this[_0x14e53d(0x1d7)][_0x14e53d(0x17a)](_0x44b507);}[_0x56fbd5(0x18e)](){const _0xd5e067=_0x56fbd5;this[_0xd5e067(0x1d7)][_0xd5e067(0x18e)]();}[_0x56fbd5(0x182)](_0x128438){const _0xd7598c=_0x56fbd5;this[_0xd7598c(0x1d7)][_0xd7598c(0x182)](_0x128438);}[_0x56fbd5(0x1b9)](_0x7addaa){const _0xd197f8=_0x56fbd5;this[_0xd197f8(0x1d7)][_0xd197f8(0x1b9)](_0x7addaa);}[_0x56fbd5(0x1db)](_0x12e5ef){const _0x2216bd=_0x56fbd5;this[_0x2216bd(0x1d7)][_0x2216bd(0x1db)](_0x12e5ef);}[_0x56fbd5(0x1b1)](_0x54776b,_0x2df0ed){const _0x3ad0ac=_0x56fbd5;this[_0x3ad0ac(0x1d7)][_0x3ad0ac(0x1b1)](_0x54776b,_0x2df0ed);}[_0x56fbd5(0x1e5)](_0x5e3825,_0x210013,_0x1539b6){const _0x53562e=_0x56fbd5;return this[_0x53562e(0x1d7)][_0x53562e(0x1e5)](_0x5e3825,_0x210013,_0x1539b6);}[_0x56fbd5(0x1d6)](_0x5bbc1b){const _0x3d8916=_0x56fbd5;this[_0x3d8916(0x1d7)][_0x3d8916(0x1d6)](_0x5bbc1b);}[_0x56fbd5(0x1a1)](_0x3779e7){const _0x304f45=_0x56fbd5;this[_0x304f45(0x1e1)][_0x304f45(0x1a1)](_0x3779e7);}[_0x56fbd5(0x1de)](){const _0x222939=_0x56fbd5;this[_0x222939(0x1e1)][_0x222939(0x1de)]();}[_0x56fbd5(0x1a5)](_0x295666){const _0x3f6bb7=_0x56fbd5;this[_0x3f6bb7(0x1e1)][_0x3f6bb7(0x1a5)](_0x295666);}[_0x56fbd5(0x1cf)](){const _0x44cc43=_0x56fbd5;this[_0x44cc43(0x1e1)][_0x44cc43(0x1cf)]();}[_0x56fbd5(0x18a)](){const _0x57090c=_0x56fbd5;return this[_0x57090c(0x1d7)][_0x57090c(0x18a)]();}[_0x56fbd5(0x18d)](){const _0x20c40b=_0x56fbd5;return this[_0x20c40b(0x1d7)][_0x20c40b(0x18d)]();}[_0x56fbd5(0x1c4)](){const _0x2799e4=_0x56fbd5;return this[_0x2799e4(0x1d7)][_0x2799e4(0x1c4)]();}async[_0x56fbd5(0x178)](_0x16972f){const _0x2c4658=_0x56fbd5;_0x16972f?!0x1===await this[_0x2c4658(0x193)][_0x2c4658(0x18b)](_0x16972f)&&(_0x57ebd4(_0x2c4658(0x181),{'conversation':this,'model':_0x16972f}),_0x16972f=(await this[_0x2c4658(0x193)][_0x2c4658(0x1e6)]())[0x0]):(_0x57ebd4(_0x2c4658(0x19c),{'conversation':this}),_0x16972f=(await this[_0x2c4658(0x193)][_0x2c4658(0x1e6)]())[0x0]),_0x16972f['id']!==this[_0x2c4658(0x177)]?.['id']&&(this[_0x2c4658(0x177)]=_0x16972f,this[_0x2c4658(0x1e1)][_0x2c4658(0x1c1)](),this[_0x2c4658(0x1dd)](_0x2c4658(0x17d),{'selectedModel':_0x16972f}));}}
|