@ckeditor/ckeditor5-ai 47.2.0-alpha.1 → 47.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/dist/index.js +5 -5
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/translations/ar.po +34 -34
- package/lang/translations/bg.po +26 -26
- package/lang/translations/bn.po +26 -26
- package/lang/translations/ca.po +26 -26
- package/lang/translations/cs.po +28 -28
- package/lang/translations/da.po +26 -26
- package/lang/translations/de.po +26 -26
- package/lang/translations/el.po +26 -26
- package/lang/translations/es.po +26 -26
- package/lang/translations/et.po +26 -26
- package/lang/translations/fi.po +26 -26
- package/lang/translations/fr.po +26 -26
- package/lang/translations/he.po +26 -26
- package/lang/translations/hi.po +26 -26
- package/lang/translations/hu.po +26 -26
- package/lang/translations/id.po +24 -24
- package/lang/translations/it.po +26 -26
- package/lang/translations/ja.po +24 -24
- package/lang/translations/ko.po +24 -24
- package/lang/translations/lt.po +28 -28
- package/lang/translations/lv.po +28 -28
- package/lang/translations/ms.po +24 -24
- package/lang/translations/nl.po +26 -26
- package/lang/translations/no.po +26 -26
- package/lang/translations/pl.po +28 -28
- package/lang/translations/pt-br.po +26 -26
- package/lang/translations/pt.po +26 -26
- package/lang/translations/ro.po +28 -28
- package/lang/translations/ru.po +28 -28
- package/lang/translations/sk.po +28 -28
- package/lang/translations/sr.po +28 -28
- package/lang/translations/sv.po +26 -26
- package/lang/translations/th.po +24 -24
- package/lang/translations/tr.po +26 -26
- package/lang/translations/uk.po +28 -28
- package/lang/translations/vi.po +24 -24
- package/lang/translations/zh-cn.po +24 -24
- package/lang/translations/zh.po +24 -24
- package/package.json +15 -15
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsinteraction.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/legacyerrors.js +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiassistant/utils/common-translations.js +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
- package/src/aiballoon/ui/aiballoonview.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatfeedview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
- package/src/aichat/utils/eventnames.js +1 -1
- package/src/aichat/utils/promisequeue.js +1 -1
- package/src/aichat/utils/scrollmanager.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/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aicapabilities.js +1 -1
- package/src/aicore/model/aicontext.js +1 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aimodels.js +1 -1
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/aiskeleton.js +1 -1
- package/src/aicore/ui/aispinner.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/utils/common-translations.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/eventnames.js +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/aitabsmainview.js +1 -1
- package/src/aitabs/tabs/aitabsview.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitabs/tabs/tabpanelview.js +1 -1
- package/src/errors.js +1 -1
- package/src/index.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x1a2717=_0x1917;(function(_0x3ea692,_0x521067){const _0x62027f=_0x1917,_0x1ac591=_0x3ea692();while(!![]){try{const _0x154e67=-parseInt(_0x62027f(0x243))/0x1+-parseInt(_0x62027f(0x291))/0x2*(parseInt(_0x62027f(0x18a))/0x3)+parseInt(_0x62027f(0x263))/0x4*(-parseInt(_0x62027f(0x1df))/0x5)+parseInt(_0x62027f(0x284))/0x6+parseInt(_0x62027f(0x258))/0x7*(parseInt(_0x62027f(0x209))/0x8)+parseInt(_0x62027f(0x2bb))/0x9+parseInt(_0x62027f(0x1e8))/0xa*(parseInt(_0x62027f(0x1ab))/0xb);if(_0x154e67===_0x521067)break;else _0x1ac591['push'](_0x1ac591['shift']());}catch(_0x36dc9c){_0x1ac591['push'](_0x1ac591['shift']());}}}(_0xf9cb,0x5722c));import{ContextPlugin as _0x5f0104,Editor as _0x38df1b}from'ckeditor5/src/core.js';function _0x1917(_0x65c98a,_0x1b15d9){const _0xf9cb00=_0xf9cb();return _0x1917=function(_0x191766,_0x41d1d3){_0x191766=_0x191766-0x16d;let _0x4805e3=_0xf9cb00[_0x191766];return _0x4805e3;},_0x1917(_0x65c98a,_0x1b15d9);}import{CKEditorError as _0x8ac84b,logError as _0x38d8c6,scrollViewportToShowTarget as _0x1bc34d,uid as _0x5102d0}from'ckeditor5/src/utils.js';import{AIConnector as _0x2c18b8}from'../aicore/aiconnector.js';import{AITabs as _0x14453f}from'../aitabs/aitabs.js';import{AIChatConversation as _0x151ae4}from'./model/aichatconversation.js';import{getTranslation as _0x10e65f}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x280f3a}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x4b3c6b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x2dcedc}from'./model/aichatmodels.js';import{getEditorFromContext as _0x3c8c69}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x547b50,DATA_ID_MODEL_ATTRIBUTE as _0x5738df}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x3ee9ea,getOperationsFromReply as _0x4b52ab}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x38d747,getMinimalSelection as _0x2c6897}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x54ad58,_DetachOperation as _0x200188}from'ckeditor5/src/engine.js';import{findOne as _0x139136,getAttribute as _0x5a6aa8,serialize as _0x3a9a66,Document as _0x55df7e,findByAttribute as _0xf37b8c}from'../aicore/utils/htmlparser.js';import{IconAI as _0x18af1f}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x45e5e0}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x4ba62e}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x5f0104{[_0x1a2717(0x17a)];[_0x1a2717(0x236)];[_0x1a2717(0x205)];[_0x1a2717(0x21e)];[_0x1a2717(0x226)]=new Map();[_0x1a2717(0x16e)]=null;[_0x1a2717(0x20c)]=!0x1;static get[_0x1a2717(0x1af)](){return[_0x2c18b8,_0x4ba62e,_0x547b50];}static get[_0x1a2717(0x250)](){const _0x40c95e=_0x1a2717;return _0x40c95e(0x1ae);}static get[_0x1a2717(0x29d)](){return!0x0;}static get[_0x1a2717(0x1d8)](){return!0x0;}[_0x1a2717(0x245)](){const _0x2b8f9e=_0x1a2717;this[_0x2b8f9e(0x236)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x23a)),this[_0x2b8f9e(0x205)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x1b3)),this[_0x2b8f9e(0x17a)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x1b4)),this[_0x2b8f9e(0x21e)]=new _0x2dcedc({'connector':this[_0x2b8f9e(0x236)],'availableModels':this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x282)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x230)),'defaultModelId':this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x282)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x2ad))});const _0x1cc82d=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x267));this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x201),()=>{const _0x2008e3=_0x2b8f9e;this[_0x2008e3(0x17d)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x174),(_0x28d45b,_0x4cc20c)=>{const _0x957b4f=_0x2b8f9e;this[_0x957b4f(0x223)]({'userMessage':_0x4cc20c});}),this[_0x2b8f9e(0x1a3)](_0x1cc82d,_0x2b8f9e(0x1ef),(_0x1652a9,_0x4e44eb)=>{const _0x264311=_0x2b8f9e;this[_0x264311(0x1f2)](_0x4e44eb);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x272),()=>{const _0x27ca3b=_0x2b8f9e;_0x1cc82d[_0x27ca3b(0x198)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x25c),async()=>{const _0x176bc1=_0x2b8f9e;await this[_0x176bc1(0x2c3)](),await this[_0x176bc1(0x1ce)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x19f),()=>{const _0x549ff5=_0x2b8f9e;this[_0x549ff5(0x298)]?.[_0x549ff5(0x186)](_0x10e65f(this[_0x549ff5(0x26f)][_0x549ff5(0x1da)],_0x549ff5(0x195)));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1e5),(_0x588d1a,_0x5e17ba)=>{const _0xf5d99e=_0x2b8f9e;this[_0xf5d99e(0x298)]?.[_0xf5d99e(0x1a1)](Array[_0xf5d99e(0x1ba)](_0x5e17ba));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x271),(_0x5873e8,_0x14ff90)=>{const _0x3c6fa9=_0x2b8f9e;this[_0x3c6fa9(0x298)]?.[_0x3c6fa9(0x271)](_0x14ff90);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x187),(_0x556a86,_0x1fa481)=>{const _0x3de392=_0x2b8f9e;this[_0x3de392(0x298)]?.[_0x3de392(0x187)](_0x1fa481[_0x3de392(0x20e)],_0x1fa481[_0x3de392(0x215)]);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x270),(_0x1bb4aa,_0x4102ce)=>{const _0x1b6706=_0x2b8f9e;this[_0x1b6706(0x19b)](_0x4102ce);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1c6),(_0x24c845,_0x5e187e)=>{const _0x127676=_0x2b8f9e;this[_0x127676(0x298)]?.[_0x127676(0x1c6)](_0x5e187e[_0x127676(0x202)],_0x5e187e[_0x127676(0x27d)],_0x5e187e[_0x127676(0x1b7)]);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x2a1),()=>{const _0x315058=_0x2b8f9e;this[_0x315058(0x180)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x184),()=>{const _0x230c54=_0x2b8f9e;this[_0x230c54(0x1e2)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x2cc),(_0x41f3dc,_0x41986a)=>{const _0x3ee765=_0x2b8f9e;this[_0x3ee765(0x298)]?.[_0x3ee765(0x269)](_0x41986a);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1f1),(_0x357d29,{replyId:_0x437523})=>{const _0x17880e=_0x2b8f9e;console[_0x17880e(0x1a0)](_0x17880e(0x290),_0x437523);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x27b),(_0x55af3b,{replyId:_0x45f4f1})=>{const _0x228880=_0x2b8f9e;console[_0x228880(0x1a0)](_0x228880(0x27a),_0x45f4f1);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x18f),(_0x518ac5,_0x5bc460)=>{const _0x2adbfd=_0x2b8f9e;this[_0x2adbfd(0x26f)][_0x2adbfd(0x221)][_0x2adbfd(0x1aa)](_0x4ba62e)[_0x2adbfd(0x1eb)](),this[_0x2adbfd(0x2b3)](_0x5bc460);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1fe),(_0x104b6e,{replyId:_0x56cfa1,partIndex:_0x1c7bac})=>{const _0x70fdda=_0x2b8f9e;this[_0x70fdda(0x20c)]=this[_0x70fdda(0x205)][_0x70fdda(0x1a8)],this[_0x70fdda(0x244)](_0x56cfa1,_0x1c7bac);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x268),(_0x1e4f56,{replyId:_0x27909e,partIndex:_0x274253})=>{const _0x42a748=_0x2b8f9e,_0x53f234=this[_0x42a748(0x208)](_0x27909e,_0x274253);_0x53f234&&_0x42a748(0x26e)!=_0x53f234[_0x42a748(0x1f5)][_0x42a748(0x190)][_0x42a748(0x1f7)]&&this[_0x42a748(0x17a)][_0x42a748(0x28b)]([_0x53f234[_0x42a748(0x1f5)]],_0x42a748(0x1c7));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x21f),()=>{const _0x4c706a=_0x2b8f9e;this[_0x4c706a(0x17a)][_0x4c706a(0x2a0)](_0x4c706a(0x1c7));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x237),(_0x289709,_0x10b502)=>{const _0xe5a2ff=_0x2b8f9e;this[_0xe5a2ff(0x26f)][_0xe5a2ff(0x221)][_0xe5a2ff(0x1aa)](_0x4ba62e)[_0xe5a2ff(0x1eb)](),this[_0xe5a2ff(0x229)](_0x10b502);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x25e),async(_0x34eb71,{replyId:_0x372dbf,showDiff:_0x4b2595})=>{const _0x51a994=_0x2b8f9e,{reply:_0x18bcf3}=this[_0x51a994(0x1c3)](_0x372dbf),_0x608a41=_0x18bcf3[_0x51a994(0x29e)]({'showDiff':_0x4b2595});await this[_0x51a994(0x205)][_0x51a994(0x1c1)]({'id':_0x18bcf3['id'],'parts':_0x608a41,'renderingStrategy':_0x51a994(0x235)});}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x27c),(_0x3dafe6,{replyId:_0x1e2edd,partIndex:_0x2fb74a})=>{const _0x5d39ab=_0x2b8f9e;this[_0x5d39ab(0x16e)]?.[_0x5d39ab(0x21c)]==_0x1e2edd&&this[_0x5d39ab(0x16e)]?.[_0x5d39ab(0x2a7)]==_0x2fb74a&&this[_0x5d39ab(0x26f)][_0x5d39ab(0x221)][_0x5d39ab(0x1aa)](_0x4ba62e)[_0x5d39ab(0x1eb)]();const {reply:_0x43ccad}=this[_0x5d39ab(0x1c3)](_0x1e2edd);_0x43ccad[_0x5d39ab(0x24a)](_0x2fb74a,_0x5d39ab(0x2b2)),this[_0x5d39ab(0x17a)][_0x5d39ab(0x2a0)](_0x5d39ab(0x1c7));});}async[_0x1a2717(0x175)](){const _0x301f1a=_0x1a2717;this[_0x301f1a(0x26f)]instanceof _0x38df1b?this[_0x301f1a(0x1fc)](this[_0x301f1a(0x26f)]):this[_0x301f1a(0x1a3)](this[_0x301f1a(0x26f)][_0x301f1a(0x204)],_0x301f1a(0x193),(_0x13962f,_0x3cb848)=>{const _0x4c99f7=_0x301f1a;_0x3cb848['on'](_0x4c99f7(0x19c),()=>{const _0x2271f6=_0x4c99f7;this[_0x2271f6(0x1fc)](_0x3cb848);});}),await this[_0x301f1a(0x17d)]();}[_0x1a2717(0x2b3)](_0x31b943){const _0x33ff2d=_0x1a2717,_0x503e05=_0x3c8c69(this[_0x33ff2d(0x26f)]);if(!_0x503e05[_0x33ff2d(0x221)][_0x33ff2d(0x29f)](_0x33ff2d(0x1fd)))throw new _0x8ac84b(_0x33ff2d(0x1e9),null);const _0x1b2f38=this[_0x33ff2d(0x26f)][_0x33ff2d(0x221)][_0x33ff2d(0x1aa)](_0x33ff2d(0x1fa)),{reply:_0x37b245,interaction:_0x5bf2e6}=this[_0x33ff2d(0x1c3)](_0x31b943[_0x33ff2d(0x21c)]),_0x28ca0f=this[_0x33ff2d(0x208)](_0x31b943[_0x33ff2d(0x21c)],_0x31b943[_0x33ff2d(0x2a7)]),_0xfa7a51=void 0x0!==_0x31b943[_0x33ff2d(0x2a7)]?[_0x37b245[_0x33ff2d(0x2ac)][_0x31b943[_0x33ff2d(0x2a7)]]]:_0x37b245[_0x33ff2d(0x2ac)][_0x33ff2d(0x188)](_0x3eeeef=>_0x33ff2d(0x1d9)==_0x3eeeef[_0x33ff2d(0x1a9)]),_0x11fa9a=_0xfa7a51[_0x33ff2d(0x179)](_0x138db2=>_0x37b245[_0x33ff2d(0x2ac)][_0x33ff2d(0x2a3)](_0x138db2));if(!_0x28ca0f||_0x33ff2d(0x26e)==_0x28ca0f[_0x33ff2d(0x1f5)][_0x33ff2d(0x190)][_0x33ff2d(0x1f7)])return void _0x11fa9a[_0x33ff2d(0x213)](_0x5836bf=>_0x37b245[_0x33ff2d(0x24a)](_0x5836bf,_0x33ff2d(0x279)));_0x11fa9a[_0x33ff2d(0x213)](_0x161b59=>_0x37b245[_0x33ff2d(0x24a)](_0x161b59,_0x33ff2d(0x1cf)));const _0x80516e=_0x4b52ab({'editor':_0x503e05,'reply':_0x37b245,'interaction':_0x5bf2e6,'groups':_0xfa7a51,'transform':!0x0,'documentCompare':_0x1b2f38,'documentCompareOptions':{'anchor':_0x33ff2d(0x254),'markDeletions':!0x0}});let _0x41bc01;_0x28ca0f&&this[_0x33ff2d(0x2b4)](_0x28ca0f[_0x33ff2d(0x1f5)]),_0x503e05[_0x33ff2d(0x29b)][_0x33ff2d(0x27e)](_0x34328c=>{const _0xe2904f=_0x33ff2d;_0x41bc01=_0x34328c[_0xe2904f(0x1d6)],_0x503e05[_0xe2904f(0x221)][_0xe2904f(0x1aa)](_0xe2904f(0x178))[_0xe2904f(0x1f3)](_0x80516e),this[_0xe2904f(0x17a)][_0xe2904f(0x2a0)](_0xe2904f(0x1c7));}),this[_0x33ff2d(0x226)][_0x33ff2d(0x2a5)](_0x41bc01,{'interactionId':_0x5bf2e6['id'],'replyId':_0x37b245['id'],'indexes':_0x11fa9a[_0x33ff2d(0x207)]()}),this[_0x33ff2d(0x18e)](_0x37b245);}[_0x1a2717(0x229)](_0x95570b){const _0x1be94f=_0x1a2717,_0x24d139=_0x3c8c69(this[_0x1be94f(0x26f)]),_0x5226fe=this[_0x1be94f(0x26f)][_0x1be94f(0x221)][_0x1be94f(0x1aa)](_0x547b50),{reply:_0x1120f6,interaction:_0x2700f7}=this[_0x1be94f(0x1c3)](_0x95570b[_0x1be94f(0x21c)]),_0x403d39=this[_0x1be94f(0x208)](_0x95570b[_0x1be94f(0x21c)],_0x95570b[_0x1be94f(0x2a7)]),_0x2c4df8=void 0x0!==_0x95570b[_0x1be94f(0x2a7)]?[_0x1120f6[_0x1be94f(0x2ac)][_0x95570b[_0x1be94f(0x2a7)]]]:_0x1120f6[_0x1be94f(0x2ac)][_0x1be94f(0x188)](_0x172df6=>_0x1be94f(0x1d9)==_0x172df6[_0x1be94f(0x1a9)]),_0x12d8e0=_0x2c4df8[_0x1be94f(0x179)](_0x2a4bdc=>_0x1120f6[_0x1be94f(0x2ac)][_0x1be94f(0x2a3)](_0x2a4bdc));if(!_0x403d39||_0x1be94f(0x26e)==_0x403d39[_0x1be94f(0x1f5)][_0x1be94f(0x190)][_0x1be94f(0x1f7)])return void _0x12d8e0[_0x1be94f(0x213)](_0x3470e1=>_0x1120f6[_0x1be94f(0x24a)](_0x3470e1,_0x1be94f(0x279)));_0x12d8e0[_0x1be94f(0x213)](_0x1a4a57=>_0x1120f6[_0x1be94f(0x24a)](_0x1a4a57,_0x1be94f(0x1cf)));const _0x5bd8b1=_0x4b52ab({'editor':_0x24d139,'reply':_0x1120f6,'interaction':_0x2700f7,'groups':_0x2c4df8,'transform':!0x0,'documentCompare':_0x5226fe,'documentCompareOptions':{'anchor':_0x1be94f(0x254),'markDeletions':!0x1}});let _0x38ce24;_0x403d39&&this[_0x1be94f(0x2b4)](_0x403d39[_0x1be94f(0x1f5)]),_0x24d139[_0x1be94f(0x29b)][_0x1be94f(0x27e)](_0x3e9f2c=>{const _0x3773fa=_0x1be94f;_0x38ce24=_0x3e9f2c[_0x3773fa(0x1d6)];for(const _0x2b0634 of _0x5bd8b1)_0x2b0634[_0x3773fa(0x2bd)]=_0x24d139[_0x3773fa(0x29b)][_0x3773fa(0x1de)][_0x3773fa(0x1a5)],_0x3ee9ea(_0x24d139,_0x2b0634),_0x3e9f2c[_0x3773fa(0x1d6)][_0x3773fa(0x18c)](_0x2b0634),_0x24d139[_0x3773fa(0x29b)][_0x3773fa(0x295)](_0x2b0634);}),this[_0x1be94f(0x226)][_0x1be94f(0x2a5)](_0x38ce24,{'interactionId':_0x2700f7['id'],'replyId':_0x1120f6['id'],'indexes':_0x12d8e0[_0x1be94f(0x207)]()}),this[_0x1be94f(0x18e)](_0x1120f6);}[_0x1a2717(0x244)](_0x2849d9,_0x79eb8){const _0x46103f=_0x1a2717,_0x39ec60=_0x3c8c69(this[_0x46103f(0x26f)]),_0x599071=this[_0x46103f(0x208)](_0x2849d9,_0x79eb8),_0xebe400=this[_0x46103f(0x26f)][_0x46103f(0x221)][_0x46103f(0x1aa)](_0x4ba62e);if(!_0x599071)return void _0xebe400[_0x46103f(0x1eb)]();const {range:_0x16d732,currentIndex:_0x291350}=_0x599071;if(_0x46103f(0x26e)==_0x16d732[_0x46103f(0x190)][_0x46103f(0x1f7)]){const {reply:_0x3fe19a}=this[_0x46103f(0x1c3)](_0x2849d9);return _0x3fe19a[_0x46103f(0x24a)](_0x291350,_0x46103f(0x279)),void _0xebe400[_0x46103f(0x1eb)]();}if(this[_0x46103f(0x16e)]?.[_0x46103f(0x21c)]==_0x2849d9&&this[_0x46103f(0x16e)]?.[_0x46103f(0x2a7)]==_0x291350)return;this[_0x46103f(0x25f)](_0xebe400),this[_0x46103f(0x16e)]={'replyId':_0x2849d9,'partIndex':_0x291350};let _0x3f52ba=_0x39ec60[_0x46103f(0x282)][_0x46103f(0x1aa)](_0x46103f(0x1dc))||[..._0x4b3c6b];_0x39ec60[_0x46103f(0x221)][_0x46103f(0x29f)](_0x46103f(0x1fd))||(_0x3f52ba=_0x3f52ba[_0x46103f(0x188)](_0x27bab4=>_0x46103f(0x18f)!=_0x27bab4));const _0x10e417=new _0x45e5e0(_0x39ec60[_0x46103f(0x1da)],{'showDiff':this[_0x46103f(0x20c)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x46103f(0x22c)},'hideHeader':!0x0,'availableActions':_0x3f52ba});this[_0x46103f(0x25f)](_0x10e417);const {reply:_0x23e1ec}=this[_0x46103f(0x1c3)](_0x2849d9),_0xe177a5=_0x23e1ec[_0x46103f(0x29e)]({'showDiff':this[_0x46103f(0x20c)]})[_0x46103f(0x188)](_0x5c44b0=>_0x5c44b0[_0x46103f(0x25a)]),_0x4d7d68=_0xe177a5[_0x46103f(0x26a)](_0x3dc8a7=>_0x3dc8a7[_0x46103f(0x200)]==_0x291350);if(-0x1==_0x4d7d68)return;const _0x231ad8=_0xe177a5[_0x4d7d68],_0x4aca0c=_0xe177a5['at']((_0x4d7d68-0x1)%_0xe177a5[_0x46103f(0x23b)])?.[_0x46103f(0x200)],_0x457492=_0xe177a5['at']((_0x4d7d68+0x1)%_0xe177a5[_0x46103f(0x23b)])?.[_0x46103f(0x200)];_0x10e417[_0x46103f(0x2a2)]({'parts':[_0x231ad8],'renderingStrategy':_0x46103f(0x235)});const _0x442ba0=_0x291350!==_0x4aca0c;this[_0x46103f(0x2b4)](_0x16d732,!0x0),_0xebe400[_0x46103f(0x170)]({'index':_0x291350,'title':_0x10e65f(this[_0x46103f(0x26f)][_0x46103f(0x1da)],_0x46103f(0x1e4),(_0x4d7d68+0x1)[_0x46103f(0x288)]()),'icon':_0x18af1f,'mainView':_0x10e417,'showRotator':_0x442ba0,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x16d732]}),this[_0x46103f(0x205)][_0x46103f(0x1db)](_0x2849d9,_0x291350),this[_0x46103f(0x1a3)](_0x10e417,_0x46103f(0x25e),(_0x1786ce,{showDiff:_0x135576})=>{const _0x1d7d8f=_0x46103f;this[_0x1d7d8f(0x20c)]=_0x135576;const {reply:_0x32c337}=this[_0x1d7d8f(0x1c3)](_0x2849d9),_0x1c746b=_0x32c337[_0x1d7d8f(0x29e)]({'showDiff':_0x135576,'groupIndex':_0x291350});_0x10e417[_0x1d7d8f(0x2a2)]({'parts':_0x1c746b,'renderingStrategy':_0x1d7d8f(0x235)});}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x237),()=>{const _0x553f27=_0x46103f;this[_0x553f27(0x229)]({'replyId':_0x2849d9,'partIndex':_0x291350}),_0x442ba0?this[_0x553f27(0x244)](_0x2849d9,_0x457492):_0xebe400[_0x553f27(0x1eb)]();}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x18f),()=>{const _0x281dfd=_0x46103f;this[_0x281dfd(0x2b3)]({'replyId':_0x2849d9,'partIndex':_0x291350}),_0x442ba0?this[_0x281dfd(0x244)](_0x2849d9,_0x457492):_0xebe400[_0x281dfd(0x1eb)]();}),_0x442ba0&&(this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x1a4),()=>{const _0x49f4c1=_0x46103f;this[_0x49f4c1(0x244)](_0x2849d9,_0x457492);}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x1e3),()=>{const _0x45519f=_0x46103f;this[_0x45519f(0x244)](_0x2849d9,_0x4aca0c);})),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x211),()=>{const _0x5179db=_0x46103f;this[_0x5179db(0x25f)](_0xebe400),this[_0x5179db(0x25f)](_0x10e417),this[_0x5179db(0x16e)]=null;});}[_0x1a2717(0x208)](_0x243df8,_0x5243b7){const _0x196084=_0x1a2717,_0xa9bb3=_0x3c8c69(this[_0x196084(0x26f)]),{reply:_0x5efd34,interaction:_0x5d3664}=this[_0x196084(0x1c3)](_0x243df8),_0x121d57=_0x5efd34[_0x196084(0x2ac)][_0x196084(0x188)](_0x31e60e=>_0x196084(0x1d9)==_0x31e60e[_0x196084(0x1a9)]),_0x40bee9=_0x121d57[_0x196084(0x179)](_0x1401b4=>_0x5efd34[_0x196084(0x2ac)][_0x196084(0x2a3)](_0x1401b4));void 0x0===_0x5243b7&&(_0x5243b7=_0x40bee9[0x0]);const _0x1e9d15=_0x40bee9[_0x196084(0x2a3)](_0x5243b7);if(-0x1==_0x1e9d15)return null;const _0x4e5f5b=_0x121d57[_0x1e9d15],_0x5625c7=new _0x55df7e([]),_0x400f5b=new _0x55df7e([]);for(const _0x1afb7e of _0x4e5f5b[_0x196084(0x265)])if(_0x196084(0x285)!=_0x1afb7e[_0x196084(0x1f6)]&&_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x1afb7e[_0x196084(0x1e6)][_0x196084(0x210)](!0x0)),_0x196084(0x238)!=_0x1afb7e[_0x196084(0x1f6)]){const _0x26b585=_0x139136(_0x367083=>_0x5a6aa8(_0x367083,_0x196084(0x280))==_0x1afb7e['id'],_0x5efd34[_0x196084(0x2b9)],!0x0);_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x26b585[_0x196084(0x210)](!0x0));}if(0x0==_0x5625c7[_0x196084(0x24e)][_0x196084(0x23b)]){if(_0x4e5f5b[_0x196084(0x265)][0x0][_0x196084(0x1d4)]){const _0x5067b5=_0xf37b8c(_0x196084(0x280),_0x4e5f5b[_0x196084(0x265)][0x0][_0x196084(0x1d4)],_0x5efd34[_0x196084(0x2b9)]);_0x5625c7[_0x196084(0x24e)][_0x196084(0x21d)](_0x5067b5[_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x21d)](_0x5067b5[_0x196084(0x210)](!0x0)),_0x5067b5[_0x196084(0x1d0)]&&(_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x5067b5[_0x196084(0x1d0)][_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x5067b5[_0x196084(0x1d0)][_0x196084(0x210)](!0x0)));}else{const _0x3ac2f9=_0x5efd34[_0x196084(0x2b9)][_0x196084(0x24e)][0x0];if(!_0x3ac2f9)return null;_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x3ac2f9[_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x3ac2f9[_0x196084(0x210)](!0x0));}}const _0x93f1a2=_0x5d3664[_0x196084(0x2c4)](),_0xa0864b=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x93f1a2[_0x196084(0x1ed)]),_0x5a111d=_0x3a9a66(_0x5625c7),_0x2ab0ee=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x5a111d),_0x422653=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x5a111d),_0x565fb2=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x232)](_0x2ab0ee,0x0),_0x3e1ed6=_0x3a9a66(_0x400f5b),_0x4e2bad={'anchor':_0x565fb2,'markDeletions':!0x1},_0x49127c=_0xa9bb3[_0x196084(0x221)][_0x196084(0x1aa)](_0x547b50)[_0x196084(0x2cb)](_0x5a111d,_0x3e1ed6,_0x4e2bad)[_0x196084(0x212)]();if(!_0x49127c[_0x196084(0x23b)])return null;_0xa9bb3[_0x196084(0x29b)][_0x196084(0x27e)](_0x2f91f9=>{const _0x32d5ce=_0x196084;for(const _0x5213bb of _0x49127c)if(_0x32d5ce(0x294)==_0x5213bb[_0x32d5ce(0x1f6)]){const _0x295577=_0x5213bb[_0x32d5ce(0x262)],_0x82f3fe=_0x5213bb[_0x32d5ce(0x177)],_0x44b915=new _0x200188(_0x295577,_0x82f3fe);_0x2f91f9[_0x32d5ce(0x1d6)][_0x32d5ce(0x18c)](_0x44b915),_0xa9bb3[_0x32d5ce(0x29b)][_0x32d5ce(0x295)](_0x44b915);}else _0x32d5ce(0x278)!==_0x5213bb[_0x32d5ce(0x1f6)]&&(_0x5213bb[_0x32d5ce(0x2bd)]=null,_0x5213bb[_0x32d5ce(0x20a)]=!0x1,_0x2f91f9[_0x32d5ce(0x1d6)][_0x32d5ce(0x18c)](_0x5213bb),_0xa9bb3[_0x32d5ce(0x29b)][_0x32d5ce(0x295)](_0x5213bb));});const _0xd3560f=_0x2c6897(_0xa9bb3,_0x49127c,_0x2ab0ee);_0x38d747(_0xa9bb3[_0x196084(0x29b)],_0xd3560f);const _0x1c994e=_0xd3560f[_0x196084(0x23c)]()[_0x196084(0x2c6)][_0x196084(0x217)][_0x196084(0x207)](),_0x1026c0=_0xd3560f[_0x196084(0x23c)]()[_0x196084(0x2b1)][_0x196084(0x217)][_0x196084(0x207)](),_0x395ee5=[];let _0x274057=_0x2ab0ee,_0x16149a=_0x422653;for(let _0x5a63f4=0x0;_0x5a63f4<_0x1026c0[_0x196084(0x23b)];_0x5a63f4++){const _0x11f2e6=_0x274057[_0x196084(0x192)]-_0x1026c0[_0x5a63f4];_0x395ee5[_0x5a63f4]=_0x16149a[_0x196084(0x192)]-_0x11f2e6,_0x274057=_0x274057[_0x196084(0x1b5)](_0x1026c0[_0x5a63f4]),_0x16149a=_0x16149a[_0x196084(0x1b5)](_0x395ee5[_0x5a63f4]);}const _0x4c776b=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x242)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0x422653,_0x1c994e),_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0x422653,_0x395ee5)),_0x3804ee=_0x422653[_0x196084(0x1b0)](0x0)[_0x196084(0x2be)](_0x5738df),_0x1e46df=Array[_0x196084(0x1ba)](_0xa0864b[_0x196084(0x259)]())[_0x196084(0x247)](_0x9103bc=>_0x9103bc[_0x196084(0x2be)](_0x5738df)==_0x3804ee)[_0x196084(0x22f)](),_0x47ab0b=_0x4c776b[_0x196084(0x2c6)][_0x196084(0x217)][_0x196084(0x207)](),_0x537add=_0x4c776b[_0x196084(0x2b1)][_0x196084(0x217)][_0x196084(0x207)]();_0x47ab0b[0x0]=_0x1e46df[0x0]+_0x47ab0b[0x0],_0x537add[0x0]=_0x1e46df[0x0]+_0x537add[0x0];let _0x4573fb=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x242)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x1ac)](),_0x47ab0b),_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x1ac)](),_0x537add));const _0x63f680=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x266)][_0x196084(0x212)](_0x93f1a2[_0x196084(0x1a5)]);for(const _0x4a66ca of _0x63f680)_0x4573fb=_0x54ad58[_0x196084(0x17f)](_0x4573fb[_0x196084(0x222)](_0x4a66ca));return{'range':_0x4573fb,'currentIndex':_0x5243b7};}[_0x1a2717(0x1fc)](_0x2f72c0){const _0x37d891=_0x1a2717;if(!_0x2f72c0[_0x37d891(0x221)][_0x37d891(0x29f)](_0x37d891(0x22b)))return;const _0x398fe7=_0x2f72c0[_0x37d891(0x172)][_0x37d891(0x1aa)](_0x37d891(0x296)),_0x37a5a3=_0x2f72c0[_0x37d891(0x172)][_0x37d891(0x1aa)](_0x37d891(0x251));this[_0x37d891(0x1a3)](_0x398fe7,_0x37d891(0x19e),(_0x48cdc0,_0x273115,_0xa77ff7)=>{const _0x1711f3=_0x37d891,_0x235983=this[_0x1711f3(0x226)][_0x1711f3(0x1aa)](_0x273115);if(!_0x235983)return;const _0x266bf2=this[_0x1711f3(0x298)][_0x1711f3(0x183)](_0x235983[_0x1711f3(0x1d2)])[_0x1711f3(0x1b2)](_0x235983[_0x1711f3(0x21c)]);_0x235983[_0x1711f3(0x1f8)][_0x1711f3(0x213)](_0x40d004=>_0x266bf2[_0x1711f3(0x24a)](_0x40d004,_0x1711f3(0x1d9))),this[_0x1711f3(0x226)][_0x1711f3(0x171)](_0x273115),this[_0x1711f3(0x226)][_0x1711f3(0x2a5)](_0xa77ff7,_0x235983);}),this[_0x37d891(0x1a3)](_0x37a5a3,_0x37d891(0x19e),(_0xffa3ff,_0x4e1b1e,_0x21dbc5)=>{const _0x30b678=_0x37d891,_0x1109e9=this[_0x30b678(0x226)][_0x30b678(0x1aa)](_0x4e1b1e);if(!_0x1109e9)return;const _0x5a9722=this[_0x30b678(0x298)][_0x30b678(0x183)](_0x1109e9[_0x30b678(0x1d2)])[_0x30b678(0x1b2)](_0x1109e9[_0x30b678(0x21c)]);_0x1109e9[_0x30b678(0x1f8)][_0x30b678(0x213)](_0x3ecfb6=>_0x5a9722[_0x30b678(0x24a)](_0x3ecfb6,_0x30b678(0x1cf))),this[_0x30b678(0x226)][_0x30b678(0x171)](_0x4e1b1e),this[_0x30b678(0x226)][_0x30b678(0x2a5)](_0x21dbc5,_0x1109e9);});}async[_0x1a2717(0x287)](_0xcc65c8){const _0x126e21=_0x1a2717;this[_0x126e21(0x26f)][_0x126e21(0x221)][_0x126e21(0x1aa)](_0x4ba62e)[_0x126e21(0x1eb)](),this[_0x126e21(0x205)][_0x126e21(0x228)](_0x126e21(0x235)),this[_0x126e21(0x205)][_0x126e21(0x2a6)](!0x0),await this[_0x126e21(0x2c3)]();try{const _0x1c5ad5=this[_0x126e21(0x26f)][_0x126e21(0x221)][_0x126e21(0x1aa)](_0x14453f);this[_0x126e21(0x173)]('\x20'),_0x1c5ad5[_0x126e21(0x1b8)][_0x126e21(0x216)](_0x126e21(0x1cc)),await this[_0x126e21(0x17d)](_0xcc65c8);const {sessionId:_0x262cdc}=this[_0x126e21(0x17a)][_0x126e21(0x1ea)]();await this[_0x126e21(0x298)][_0x126e21(0x2c1)](_0xcc65c8,_0x262cdc),this[_0x126e21(0x298)][_0x126e21(0x16f)]()&&this[_0x126e21(0x298)][_0x126e21(0x186)](_0x10e65f(this[_0x126e21(0x26f)][_0x126e21(0x1da)],_0x126e21(0x195)));}catch(_0x142f91){console[_0x126e21(0x206)](_0x126e21(0x26b),_0x142f91);}finally{this[_0x126e21(0x205)][_0x126e21(0x21b)](),this[_0x126e21(0x205)][_0x126e21(0x228)](_0x126e21(0x276)),this[_0x126e21(0x205)][_0x126e21(0x2a6)](!0x1);}}[_0x1a2717(0x2c9)](_0x15fdf7){const _0xe13d5f=_0x1a2717;this[_0xe13d5f(0x298)]['id']===_0x15fdf7&&this[_0xe13d5f(0x17d)]();}async[_0x1a2717(0x1cb)](){const _0x599544=_0x1a2717,_0x41a861=this[_0x599544(0x17a)][_0x599544(0x2c2)]();this[_0x599544(0x298)]?.[_0x599544(0x273)](_0x41a861),this[_0x599544(0x298)]?.[_0x599544(0x186)](_0x10e65f(this[_0x599544(0x26f)][_0x599544(0x1da)],_0x599544(0x195)));}[_0x1a2717(0x24b)](){const _0x292bb8=_0x1a2717;this[_0x292bb8(0x298)]?.[_0x292bb8(0x1b9)]();}[_0x1a2717(0x1a6)](){const _0x16fc36=_0x1a2717;this[_0x16fc36(0x205)][_0x16fc36(0x1a6)]();}async[_0x1a2717(0x201)](){const _0x5d5f46=_0x1a2717;await this[_0x5d5f46(0x17d)]();}async[_0x1a2717(0x1a7)]({message:_0x2919ba,quickActionData:_0x4d66f1}){const _0x5a50ee=_0x1a2717;await this[_0x5a50ee(0x223)]({'userMessage':_0x2919ba,'quickActionData':_0x4d66f1});}[_0x1a2717(0x28e)](){const _0x20a41f=_0x1a2717,_0x2bec0a=this[_0x20a41f(0x26f)][_0x20a41f(0x282)][_0x20a41f(0x1aa)](_0x20a41f(0x2a4));if(!_0x2bec0a)throw new _0x8ac84b(_0x20a41f(0x23e),this);return _0x2bec0a;}async[_0x1a2717(0x17d)](_0xb8223f){const _0x31b99b=_0x1a2717;try{this[_0x31b99b(0x205)][_0x31b99b(0x22d)](),await this[_0x31b99b(0x191)](_0xb8223f);}catch(_0x4e89c6){_0x38d8c6(_0x31b99b(0x2a8),_0x4e89c6),this[_0x31b99b(0x298)]=void 0x0,this[_0x31b99b(0x205)][_0x31b99b(0x176)]();}}async[_0x1a2717(0x191)](_0x1e5b31){const _0x495fbd=_0x1a2717,_0x21436b=this[_0x495fbd(0x26f)][_0x495fbd(0x221)][_0x495fbd(0x1aa)](_0x4ba62e);let _0x45d2b2;_0x21436b[_0x495fbd(0x1d3)]&&_0x21436b[_0x495fbd(0x1eb)](),_0x1e5b31||!this[_0x495fbd(0x298)]?_0x45d2b2=this[_0x495fbd(0x26f)][_0x495fbd(0x282)][_0x495fbd(0x1aa)](_0x495fbd(0x2ad)):this[_0x495fbd(0x205)][_0x495fbd(0x248)]&&(_0x45d2b2=this[_0x495fbd(0x298)][_0x495fbd(0x181)]['id']),await this[_0x495fbd(0x2c3)]();const _0x44a8ec=this[_0x495fbd(0x28e)](),_0x1e7629=_0x1e5b31||_0x5102d0();this[_0x495fbd(0x298)]=new _0x151ae4({'connector':this[_0x495fbd(0x236)],'chatModels':this[_0x495fbd(0x21e)],'selectedModelId':_0x45d2b2,'conversationId':_0x1e7629,'group':_0x44a8ec,'getEditor':()=>_0x3c8c69(this[_0x495fbd(0x26f)])}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1f9),(_0x41db9e,_0x332982)=>{const _0x4b35bc=_0x495fbd;this[_0x4b35bc(0x205)][_0x4b35bc(0x1c4)](_0x332982),this[_0x4b35bc(0x205)][_0x4b35bc(0x275)](),this[_0x4b35bc(0x205)][_0x4b35bc(0x197)](),this[_0x4b35bc(0x205)][_0x4b35bc(0x253)](),_0x1e5b31||(this[_0x4b35bc(0x205)][_0x4b35bc(0x29a)](),this[_0x4b35bc(0x298)]?.[_0x4b35bc(0x186)](_0x10e65f(this[_0x4b35bc(0x26f)][_0x4b35bc(0x1da)],_0x4b35bc(0x195))));}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x239),(_0xecb250,_0x38e42a)=>{const _0x27f626=_0x495fbd;this[_0x27f626(0x205)][_0x27f626(0x24f)](_0x38e42a[_0x27f626(0x1ff)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2a9),(_0x4181fa,_0x42a974)=>{const _0x44d024=_0x495fbd;this[_0x44d024(0x205)][_0x44d024(0x26c)](_0x42a974);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x25d),()=>{const _0x3082b6=_0x495fbd;this[_0x3082b6(0x205)][_0x3082b6(0x2b6)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2c8),()=>{const _0x298e7f=_0x495fbd;this[_0x298e7f(0x205)][_0x298e7f(0x2b6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x17e),(_0xce38e5,_0x4039a9)=>{const _0x1c67d3=_0x495fbd;this[_0x1c67d3(0x205)][_0x1c67d3(0x1b1)](_0x4039a9,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x224),(_0xf32130,_0x5af1ce)=>{const _0x52e9ad=_0x495fbd;this[_0x52e9ad(0x205)][_0x52e9ad(0x1b1)](_0x5af1ce,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x25b),()=>{const _0x51b84f=_0x495fbd;this[_0x51b84f(0x205)][_0x51b84f(0x28a)]();}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x261),async()=>{const _0x3f37b6=_0x495fbd;await this[_0x3f37b6(0x205)][_0x3f37b6(0x19d)]();}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1e0),(_0x867b60,_0x390535)=>{const _0x3886fd=_0x495fbd;this[_0x3886fd(0x205)][_0x3886fd(0x17b)](_0x390535['id']);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x240),(_0x27ecfe,_0x4b98ee,_0x5256d4)=>{const _0x550c82=_0x495fbd;this[_0x550c82(0x173)](_0x4b98ee,_0x5256d4);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x227),(_0x20092e,_0x3149eb)=>{const _0x4fc42d=_0x495fbd;_0x4fc42d(0x2c5)===_0x3149eb[_0x4fc42d(0x1f6)]?this[_0x4fc42d(0x205)][_0x4fc42d(0x21a)](_0x3149eb):this[_0x4fc42d(0x205)][_0x4fc42d(0x29c)](_0x3149eb);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1bf),async(_0x459968,_0x17a071)=>{const _0x26efab=_0x495fbd;await this[_0x26efab(0x292)]({'reply':_0x17a071});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1d1),(_0x1d1862,{reply:_0x85b3df,index:_0x220975,state:_0x3a2ed6})=>{const _0x3b1f44=_0x495fbd;this[_0x3b1f44(0x205)][_0x3b1f44(0x249)]({'id':_0x85b3df['id'],'index':_0x220975,'state':_0x3a2ed6});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1bd),(_0x5a7f4b,_0x4cfffa)=>{const _0x1becfc=_0x495fbd;if(this[_0x1becfc(0x205)][_0x1becfc(0x1bb)](_0x4cfffa[_0x1becfc(0x22e)],_0x4cfffa[_0x1becfc(0x277)]),_0x1becfc(0x286)===_0x4cfffa[_0x1becfc(0x22e)][_0x1becfc(0x1f6)]){const _0x279f03=[..._0x3c8c69(this[_0x1becfc(0x26f)])[_0x1becfc(0x29b)][_0x1becfc(0x1de)][_0x1becfc(0x286)][_0x1becfc(0x20b)]()];this[_0x1becfc(0x17a)][_0x1becfc(0x28b)](_0x279f03,_0x1becfc(0x220)+this[_0x1becfc(0x298)]?.['id']);}}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x196),(_0xbb8d73,_0x1b526c)=>{const _0x9e3b1e=_0x495fbd;this[_0x9e3b1e(0x205)][_0x9e3b1e(0x270)](_0x1b526c[_0x9e3b1e(0x182)]),_0x9e3b1e(0x20d)==_0x1b526c[_0x9e3b1e(0x182)]&&this[_0x9e3b1e(0x24b)](),_0x9e3b1e(0x286)===_0x1b526c[_0x9e3b1e(0x1f6)]&&this[_0x9e3b1e(0x17a)][_0x9e3b1e(0x2a0)](_0x9e3b1e(0x220)+this[_0x9e3b1e(0x298)]?.['id']);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1ee),(_0x28755e,_0x217a4e)=>{const _0x19b750=_0x495fbd;this[_0x19b750(0x205)][_0x19b750(0x241)](_0x217a4e[_0x19b750(0x22e)][_0x19b750(0x182)],_0x217a4e[_0x19b750(0x277)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x264),(_0x2b81a1,_0x43288d)=>{const _0x2225bc=_0x495fbd;this[_0x2225bc(0x205)][_0x2225bc(0x2af)](_0x43288d[_0x2225bc(0x233)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2b8),(_0x1961a6,_0x3de913)=>{const _0x45f7f6=_0x495fbd;this[_0x45f7f6(0x205)][_0x45f7f6(0x199)](_0x3de913[_0x45f7f6(0x1c5)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x293),(_0x2327a4,_0x3022a6)=>{const _0x5b2997=_0x495fbd;this[_0x5b2997(0x205)][_0x5b2997(0x19a)](_0x3022a6[_0x5b2997(0x202)],_0x3022a6[_0x5b2997(0x20e)],_0x3022a6[_0x5b2997(0x28d)],_0x3022a6[_0x5b2997(0x1b7)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1c9),(_0x1e2830,_0x1c9d6c)=>{const _0x44c14d=_0x495fbd;this[_0x44c14d(0x205)][_0x44c14d(0x1fb)](_0x1c9d6c[_0x44c14d(0x202)],_0x1c9d6c[_0x44c14d(0x289)],_0x1c9d6c[_0x44c14d(0x18b)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1be),(_0x55c08f,_0x30508c)=>{const _0x1a2074=_0x495fbd;this[_0x1a2074(0x205)][_0x1a2074(0x297)](_0x30508c);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x22a),(_0xc306b2,_0x41073b)=>{const _0x2ef3ef=_0x495fbd;this[_0x2ef3ef(0x205)][_0x2ef3ef(0x189)](_0x41073b[_0x2ef3ef(0x181)],_0x41073b[_0x2ef3ef(0x23d)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x206),(_0x3adfda,{error:_0x5421a0,interactionId:_0x482a0f,fileName:_0x37e282,url:_0xa97b92,sourceId:_0x403efc,sourceLabel:_0x3fb38})=>{const _0x535d71=_0x495fbd,_0x19f458=_0x482a0f?_0x482a0f+':'+_0x5102d0():_0x5102d0();_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1ad))?this[_0x535d71(0x205)][_0x535d71(0x23f)]({'staticMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1cd)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x299))||_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x2a8))?(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1f4)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1ec))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1c2),_0x37e282),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1d5))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x2ba),_0xa97b92),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x24d))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x274)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x2c0))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x246)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x283))?(_0x403efc&&this[_0x535d71(0x205)][_0x535d71(0x1e7)](_0x403efc),this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x2ab),_0x3fb38||_0x535d71(0x20e)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x27f))?(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x231)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x234)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0));}),await this[_0x495fbd(0x298)][_0x495fbd(0x245)](this[_0x495fbd(0x26f)][_0x495fbd(0x282)][_0x495fbd(0x1aa)](_0x495fbd(0x2b0))),_0x1e5b31||await this[_0x495fbd(0x298)][_0x495fbd(0x2c6)]();}async[_0x1a2717(0x223)]({userMessage:_0x4857fc,quickActionData:_0x41106d}){const _0x2895aa=_0x1a2717;if(!this[_0x2895aa(0x298)])throw new _0x8ac84b(_0x2895aa(0x18d));this[_0x2895aa(0x298)][_0x2895aa(0x2b7)]()&&await this[_0x2895aa(0x298)][_0x2895aa(0x28f)](this[_0x2895aa(0x17a)][_0x2895aa(0x1ea)]()),this[_0x2895aa(0x298)]['id']&&this[_0x2895aa(0x298)][_0x2895aa(0x2ca)]&&await this[_0x2895aa(0x298)][_0x2895aa(0x281)]({'userMessage':_0x4857fc,'quickActionData':_0x41106d}),this[_0x2895aa(0x257)]();}[_0x1a2717(0x257)](){const _0x4d3617=_0x1a2717,_0x36a38c=_0x3c8c69(this[_0x4d3617(0x26f)])[_0x4d3617(0x29b)],_0x1971e5=Array[_0x4d3617(0x1ba)](_0x36a38c[_0x4d3617(0x1c0)][_0x4d3617(0x194)](_0x280f3a));_0x36a38c[_0x4d3617(0x27e)](_0x363765=>{const _0x4d5458=_0x4d3617;_0x1971e5[_0x4d5458(0x213)](_0x10c6e9=>_0x363765[_0x4d5458(0x2b5)](_0x10c6e9));});}[_0x1a2717(0x219)](){const _0x2fcab8=_0x1a2717;console[_0x2fcab8(0x1a0)](_0x2fcab8(0x2bf));}[_0x1a2717(0x1f2)](_0x316cf6){const _0x53b266=_0x1a2717;this[_0x53b266(0x205)][_0x53b266(0x2bc)](_0x316cf6);}[_0x1a2717(0x28c)](_0x3a5113){const _0x295d1c=_0x1a2717;_0x38d8c6(_0x3a5113[_0x295d1c(0x1a2)]);}[_0x1a2717(0x19b)](_0x47fb80){const _0x563245=_0x1a2717;this[_0x563245(0x298)]?.[_0x563245(0x2c7)](_0x47fb80);}[_0x1a2717(0x180)](){const _0xdcb1fd=_0x1a2717;this[_0xdcb1fd(0x298)]?.[_0xdcb1fd(0x2a1)]();}[_0x1a2717(0x1e2)](){const _0x4d5aa9=_0x1a2717;this[_0x4d5aa9(0x298)]?.[_0x4d5aa9(0x184)]();}[_0x1a2717(0x1c3)](_0x51d7ca){const _0x10f7e3=_0x1a2717,[_0x1b92f4,_0x173b14]=_0x51d7ca[_0x10f7e3(0x1dd)](':'),_0x50f91e=this[_0x10f7e3(0x298)][_0x10f7e3(0x183)](_0x1b92f4),_0xc9b78e=_0x50f91e[_0x10f7e3(0x1b2)](_0x173b14);return{'interaction':_0x50f91e,'reply':_0xc9b78e};}[_0x1a2717(0x2b4)](_0x1c60cf,_0x2a7720=!0x1){const _0x33ca08=_0x1a2717,_0x39b65d=_0x3c8c69(this[_0x33ca08(0x26f)]),_0x59cc13={'target':_0x39b65d[_0x33ca08(0x1bc)][_0x33ca08(0x1b8)][_0x33ca08(0x203)][_0x33ca08(0x225)](_0x39b65d[_0x33ca08(0x1bc)][_0x33ca08(0x16d)][_0x33ca08(0x2aa)](_0x1c60cf)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x2a7720};_0x2a7720&&(_0x59cc13[_0x33ca08(0x1d7)]=!0x0),_0x1bc34d(_0x59cc13);}[_0x1a2717(0x173)](_0x512659,_0x5d5f8b=!0x1){const _0x4137a0=_0x1a2717;this[_0x4137a0(0x205)][_0x4137a0(0x240)](_0x512659||_0x10e65f(this[_0x4137a0(0x26f)][_0x4137a0(0x1da)],_0x4137a0(0x1f0)),_0x5d5f8b);}async[_0x1a2717(0x292)]({reply:_0xe9e6a,renderingStrategy:_0x5e67cb}){const _0x325da7=_0x1a2717,{id:_0x5594bc,isDone:_0xb401e1,type:_0x2ea102,parsedContent:_0x1a666d}=_0xe9e6a;if(_0x325da7(0x1ca)===_0x2ea102){const _0x3250b5=_0xe9e6a[_0x325da7(0x29e)]({'showDiff':this[_0x325da7(0x205)][_0x325da7(0x1a8)]});await this[_0x325da7(0x205)][_0x325da7(0x1c1)]({'id':_0x5594bc,'parts':_0x3250b5,'renderingStrategy':_0x5e67cb,'isDone':_0xb401e1});}else _0x325da7(0x2c5)===_0x2ea102&&await this[_0x325da7(0x205)][_0x325da7(0x1e1)]({'id':_0x5594bc,'parsedContent':_0x1a666d,'renderingStrategy':_0x5e67cb,'isDone':_0xb401e1});_0xb401e1&&_0xe9e6a[_0x325da7(0x2ae)][_0x325da7(0x23b)]>0x0&&this[_0x325da7(0x205)][_0x325da7(0x256)](_0x5594bc,_0xe9e6a[_0x325da7(0x2ae)]);}async[_0x1a2717(0x2c3)](){const _0x26083a=_0x1a2717,_0x2ec2d4=this[_0x26083a(0x298)]?.[_0x26083a(0x24c)];_0x2ec2d4&&(_0x2ec2d4[_0x26083a(0x185)](),this[_0x26083a(0x205)][_0x26083a(0x20f)](_0x2ec2d4));}async[_0x1a2717(0x1ce)](){const _0x5ce1fc=_0x1a2717,_0x535c28=this[_0x5ce1fc(0x298)]?.[_0x5ce1fc(0x24c)];if(_0x535c28){for await(const _0x4eb0d9 of _0x535c28[_0x5ce1fc(0x218)])await this[_0x5ce1fc(0x292)]({'reply':_0x4eb0d9,'renderingStrategy':_0x5ce1fc(0x235)});}}[_0x1a2717(0x18e)](_0x2d317a){const _0x4adaaa=_0x1a2717,_0x17a0d3={'positiveCount':_0x2d317a[_0x4adaaa(0x2ac)][_0x4adaaa(0x188)](_0x442495=>_0x4adaaa(0x1cf)===_0x442495[_0x4adaaa(0x1a9)])[_0x4adaaa(0x23b)],'totalCount':_0x2d317a[_0x4adaaa(0x2ac)][_0x4adaaa(0x23b)],'modificationId':_0x2d317a['id']},_0x52a718=this[_0x4adaaa(0x298)][_0x4adaaa(0x183)](_0x2d317a[_0x4adaaa(0x1d2)])[_0x4adaaa(0x255)];this[_0x4adaaa(0x236)][_0x4adaaa(0x214)](this[_0x4adaaa(0x298)]['id'],_0x52a718,_0x17a0d3);}}function _0xf9cb(){const _0x357112=['293854OEpBZm','_openBalloonFor','init','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','find','isModelAvailable','updateFeedItemAIReplySuggestionPartState','setChangeGroupState','removeSelectionFromChatContext','lastInteraction','ai-chat-context-invalid-data','children','setIsUploadInProgress','pluginName','redo','startsWith','clearConversationContextUI','main','messageId','updateFeedItemAIReplySources','_removeAISelectionMarkers','3311CufESz','getChildren','hasChanges','interactionStarted','abortPromptStream','webSearchStarted','toggleSuggestionDisplayMode','stopListening','push','interactionFinished','sourcePosition','7204JfdWMZ','contextSent','changes','history','AITabs','mouseOverSuggestion','setModel','findIndex','Failed\x20to\x20load\x20conversation','addFeedItemUserMessage','addFeedItemError','$graveyard','context','removeContextItem','addUrlToContext','resizeTabs','addSelectionToContext','AI_CHAT_CONTEXT_INVALID_DATA','resetMessageInput','streaming','isLoading','marker','outdated','Disliked\x20response','dislike','rejectSuggestion','query','change','ai-chat-resource-load-failed','data-id','handleUserInteraction','config','ai-chat-source-resources-load-failed','3969570JkhHQj','removed','selection','loadConversation','toString','resourceId','startInteraction','showFakeVisualSelection','_logError','resources','getGroupId','updateCurrentDocumentInContext','Liked\x20response','100020xPwkVt','_updateReplyContent','sourceResourcesLoaded','remove','applyOperation','undo','updateCapabilities','activeConversation','ai-chat-conversation-init-failed','resetConversationTitle','model','addFeedItemAISuggestion','isOfficialPlugin','getContentParts','has','hideFakeVisualSelection','toggleWebSearch','updateContent','indexOf','collaboration.channelId','set','toggleLoadingSkeleton','partIndex','ai-chat-conversation-start-failed','interactionCreated','toViewRange','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','changeGroups','ai.chat.models.defaultModelId','sources','setConversationContext','ai.chat.context','end','rejected','_insertSuggestion','_scrollToSuggestionRange','removeMarker','setLoadingMessage','isCurrentDocumentInContext','addContextOptionsChanged','documentContextContent','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','1911285YIVTVI','setIsMaximized','baseVersion','getAttribute','Showing\x20conversation\x20history...','ai-chat-context-unsupported-type','load','getSelectionText','_stopLastInteraction','getDocumentContext','text-delta','start','removeFromContext','reasoningStarted','handleRemovedConversation','isStarted','getDiff','selectModel','mapper','_previewedChangeGroup','isCurrentDocumentInConversation','open','delete','commands','updateConversationTitle','sendUserMessage','afterInit','disableControls','howMany','TrackChangesEditing','map','_aiEditing','removeFeedInteraction','parse','_startConversationSafely','webSearchFinished','_createFromRanges','_toggleWebSearch','selectedModel','uiId','getInteraction','toggleReasoning','stop','addCurrentDocumentToContext','addResourceToContext','filter','setSelectedModel','3CuxeAG','isInContext','addOperation','ai-chat-controller-no-active-conversation','_updateRatings','insertSuggestion','root','_handleStartConversation','maxOffset','add','getMarkersGroup','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','contextItemRemoved','clearPendingContextUI','resize','setAddContextOptions','populateSourceResourceBalloon','_removeFromContext','ready','finishInteraction','revert','addDocumentToContext','log','addFilesToContext','message','listenTo','showNext','version','focusPromptInput','sendMessage','showDiff','state','get','66smHcDg','getRoot','ai-request-aborted','AIChatController','requires','getChild','addFeedInteractionHeader','getReply','AIChatUI','AIEditing','getChildAtOffset','data','uid','view','removeSelectionFromContext','from','addContextItem','editing','contextItemAdded','capabilitiesUpdated','replyContentUpdated','markers','updateFeedItemAIReplySuggestionContent','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','getInteractionAndReplyById','createConversation','options','loadSourceResources','ai-chat-controller-mouse-over','createPositionFromPath','resourceStateChanged','modification-delta','addSelectionToChatContext','chat','AI_CHAT_ABORTED_MESSAGE','_flushLastInteractionUI','accepted','nextSibling','replyChangeGroupStateUpdated','interactionId','isOpen','anchorId','ai-chat-url-upload-failed','batch','alignToTop','isPremiumPlugin','pending','locale','scrollFeedToSuggestion','ai.availableReplyActions','split','document','1765jSFYOc','interactionDestroyed','updateFeedItemAIReplyContent','_toggleReasoning','showPrevious','AI_BALLOON_HEADER_TITLE','addFileToContext','node','closeSourceResourceBalloon','393330HBOTWy','ai-no-track-changes','getDocumentData','close','ai-chat-file-upload-failed','content','contextItemLoadingEnded','resizedTabs','AI_CHAT_UNTITLED_CONVERSATION','like','_setIsMaximized','_applyOperationsAsSuggestions','AI_CHAT_UNABLE_TO_START_CONVERSATION','range','type','rootName','indexes','conversationInitialized','DocumentCompare','updateResourceState','_integrateEditor','TrackChanges','showChangeInText','isUploadInProgress','index','startConversation','sourceId','domConverter','editors','_aiChatUi','error','slice','_getDocumentRangeForReplyChanges','3832UhquMN','isDocumentOperation','getRanges','_balloonShowDiff','current-document','source','stopInteraction','cloneNode','dialogClosed','getOperations','forEach','upsertAIChatRating','resource','activateTab','path','replies','_showConversationHistory','addFeedItemAIReply','startAutoScroll','replyId','unshift','_aiChatModels','mouseLeaveSuggestion','ai-conversation-','plugins','getTransformedByOperation','_handleUIUserMessage','reasoningFinished','viewRangeToDom','_batchToChanges','replyCreated','setFeedItemRenderingStrategy','_applySuggestion','modelSelected','Undo','full','enableControls','contextItem','getPath','ai.chat.models.displayedModels','AI_CHAT_RESOURCE_LOAD_FAILED','createPositionAt','contextItems','AI_CHAT_GENERIC_ERROR','static','_aiConnector','applySuggestion','new','uploadProgressChanged','AIConnector','length','getFirstRange','isDisabled','ai-chat-missing-channel-id','addFeedItemStaticMessage','setConversationTitle','setContextItemLoading','createRange'];_0xf9cb=function(){return _0x357112;};return _0xf9cb();}
|
|
23
|
+
const _0x3f0e4e=_0x5873;(function(_0x22dd5b,_0x299a7c){const _0x2c6ab7=_0x5873,_0x59aaf3=_0x22dd5b();while(!![]){try{const _0x4bce80=-parseInt(_0x2c6ab7(0x1b7))/0x1+-parseInt(_0x2c6ab7(0x254))/0x2*(-parseInt(_0x2c6ab7(0x241))/0x3)+parseInt(_0x2c6ab7(0x24f))/0x4+-parseInt(_0x2c6ab7(0x249))/0x5*(-parseInt(_0x2c6ab7(0x2b9))/0x6)+-parseInt(_0x2c6ab7(0x1d4))/0x7+-parseInt(_0x2c6ab7(0x1d3))/0x8*(-parseInt(_0x2c6ab7(0x1b6))/0x9)+parseInt(_0x2c6ab7(0x27e))/0xa;if(_0x4bce80===_0x299a7c)break;else _0x59aaf3['push'](_0x59aaf3['shift']());}catch(_0x479c56){_0x59aaf3['push'](_0x59aaf3['shift']());}}}(_0x101f,0xab9fc));function _0x5873(_0x228c82,_0x543c4e){const _0x101fb4=_0x101f();return _0x5873=function(_0x58738b,_0x2dbba2){_0x58738b=_0x58738b-0x195;let _0x130ee6=_0x101fb4[_0x58738b];return _0x130ee6;},_0x5873(_0x228c82,_0x543c4e);}import{ContextPlugin as _0x3d5196,Editor as _0xf7fefe}from'ckeditor5/src/core.js';import{CKEditorError as _0x1e9b3b,logError as _0x3c1905,scrollViewportToShowTarget as _0x1596df,uid as _0x416d88}from'ckeditor5/src/utils.js';import{AIConnector as _0x369b38}from'../aicore/aiconnector.js';import{AITabs as _0x2a1897}from'../aitabs/aitabs.js';import{AIChatConversation as _0x470ab6}from'./model/aichatconversation.js';function _0x101f(){const _0x46ab82=['slice','addFeedItemAISuggestion','AI_CHAT_CONTEXT_INVALID_DATA','error','isStarted','ai.chat.models.defaultModelId','redo','marker','AIEditing','addFeedItemUserMessage','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','_handleStartConversation','AIConnector','ai-chat-missing-channel-id','root','_getDocumentRangeForReplyChanges','requires','createRange','outdated','showPrevious','createPositionAt','addSelectionToChatContext','_openBalloonFor','loadSourceResources','contextItem','lastInteraction','log','setContextItemLoading','76600lFnIAa','ai-chat-controller-mouse-over','parse','ai-request-aborted','data','editors','modelSelected','context','content','updateResourceState','addContextOptionsChanged','$graveyard','updateCurrentDocumentInContext','changeGroups','setChangeGroupState','AIChatUI','getAttribute','AI_CHAT_UNABLE_TO_START_CONVERSATION','toViewRange','toggleWebSearch','open','addFeedItemError','sourcePosition','isInContext','stop','getChild','_showConversationHistory','interactionFinished','replies','addResourceToContext','finishInteraction','replyContentUpdated','addCurrentDocumentToContext','pending','addFilesToContext','uid','rejectSuggestion','delete','_handleUIUserMessage','getInteractionAndReplyById','removeFromContext','contextSent','capabilitiesUpdated','main','document','mouseLeaveSuggestion','messageId','has','contextItemAdded','_toggleReasoning','isCurrentDocumentInContext','createConversation','showChangeInText','current-document','query','ai-chat-conversation-init-failed','scrollFeedToSuggestion','ai-chat-context-invalid-data','howMany','6HPQgTf','set','_insertSuggestion','removed','ai-chat-file-upload-failed','getRoot','get','uiId','TrackChanges','mapper','changes','addSelectionToContext','_removeAISelectionMarkers','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','addContextItem','type','_aiChatUi','maxOffset','startInteraction','activeConversation','sources','updateFeedItemAIReplyContent','init','contextItems','interactionId','ai-chat-context-unsupported-type','toggleReasoning','abortPromptStream','upsertAIChatRating','showFakeVisualSelection','DocumentCompare','state','ai-chat-conversation-start-failed','interactionCreated','find','setFeedItemRenderingStrategy','chat','updateFeedItemAIReplySuggestionContent','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','revert','_previewedChangeGroup','setConversationTitle','contextItemLoadingEnded','isCurrentDocumentInConversation','load','mouseOverSuggestion','resourceId','rootName','resizedTabs','clearPendingContextUI','view','getChildren','createPositionFromPath','text-delta','ai.availableReplyActions','conversationInitialized','length','replyId','_toggleWebSearch','_integrateEditor','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','_updateRatings','hideFakeVisualSelection','undo','_aiChatModels','webSearchStarted','_batchToChanges','ready','sendUserMessage','options','AI_BALLOON_HEADER_TITLE','removeContextItem','replyChangeGroupStateUpdated','getPath','viewRangeToDom','showNext','_aiConnector','setIsMaximized','map','resetMessageInput','accepted','reasoningStarted','findIndex','full','_balloonShowDiff','isOfficialPlugin','stopListening','new','disableControls','node','end','baseVersion','1507302UbgqxT','579342DPEhUa','updateFeedItemAIReplySources','activateTab','contextItemRemoved','resetConversationTitle','addFeedItemAIReply','getInteraction','clearConversationContextUI','getDocumentData','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','_setIsMaximized','forEach','children','Failed\x20to\x20load\x20conversation','partIndex','getGroupId','startsWith','_logError','documentContextContent','afterInit','sendMessage','unshift','webSearchFinished','closeSourceResourceBalloon','like','sourceResourcesLoaded','setLoadingMessage','addFeedItemStaticMessage','40STyLrH','6242831NBlkGM','selectModel','addFeedInteractionHeader','isUploadInProgress','version','getDocumentContext','toggleLoadingSkeleton','isPremiumPlugin','message','isLoading','remove','_startConversationSafely','resize','index','modification-delta','AI_CHAT_UNTITLED_CONVERSATION','source','split','ai-no-track-changes','cloneNode','ai-chat-url-upload-failed','commands','selection','listenTo','selectedModel','addUrlToContext','applyOperation','reasoningFinished','nextSibling','getMarkersGroup','_createFromRanges','getTransformedByOperation','collaboration.channelId','interactionStarted','data-id','indexes','change','AI_CHAT_GENERIC_ERROR','addDocumentToContext','Undo','ai-conversation-','resource','stopInteraction','isModelAvailable','startAutoScroll','AIChatController','resourceStateChanged','replyCreated','updateCapabilities','toggleSuggestionDisplayMode','getChildAtOffset','start','showDiff','ai.chat.context','streaming','enableControls','AI_CHAT_RESOURCE_LOAD_FAILED','ai.chat.models.displayedModels','alignToTop','getRanges','removeFeedInteraction','getFirstRange','pluginName','updateConversationTitle','batch','resources','history','isDisabled','getSelectionText','domConverter','getReply','anchorId','plugins','Liked\x20response','_flushLastInteractionUI','resizeTabs','static','Showing\x20conversation\x20history...','getContentParts','updateContent','editing','Disliked\x20response','path','applySuggestion','dialogClosed','getOperations','removeSelectionFromChatContext','startConversation','focusPromptInput','add','AI_CHAT_ABORTED_MESSAGE','ai-chat-controller-no-active-conversation','loadConversation','indexOf','_applySuggestion','_aiEditing','_scrollToSuggestionRange','markers','from','setModel','model','sourceId','isOpen','handleUserInteraction','_removeFromContext','populateSourceResourceBalloon','dislike','_stopLastInteraction','_updateReplyContent','3AIlEWr','filter','hasChanges','updateFeedItemAIReplySuggestionPartState','locale','range','setAddContextOptions','_applyOperationsAsSuggestions','1150405jmbrHr','uploadProgressChanged','interactionDestroyed','TrackChangesEditing','push','setIsUploadInProgress','3584312ayiQjy','close','addOperation','toString','ai-chat-resource-load-failed','405876MUcbAM','config','removeMarker','addFileToContext','insertSuggestion','isDocumentOperation','handleRemovedConversation','ai-chat-source-resources-load-failed','removeSelectionFromContext','getDiff','setSelectedModel','rejected','setConversationContext','AITabs'];_0x101f=function(){return _0x46ab82;};return _0x101f();}import{getTranslation as _0x3610a1}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x823a86}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x54b317}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x226989}from'./model/aichatmodels.js';import{getEditorFromContext as _0x2b4fc0}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x3de2e6,DATA_ID_MODEL_ATTRIBUTE as _0x55edee}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x5b162f,getOperationsFromReply as _0x4671bd}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0xc37610,getMinimalSelection as _0x11bb9a}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0xd0bcd1,_DetachOperation as _0x5382b6}from'ckeditor5/src/engine.js';import{findOne as _0x2b4cab,getAttribute as _0x310d02,serialize as _0x1354a1,Document as _0x30c88d,findByAttribute as _0x5e155c}from'../aicore/utils/htmlparser.js';import{IconAI as _0xba88b9}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x535f23}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x50f6b4}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x3d5196{[_0x3f0e4e(0x233)];[_0x3f0e4e(0x1a6)];[_0x3f0e4e(0x2c9)];[_0x3f0e4e(0x19a)];[_0x3f0e4e(0x19c)]=new Map();[_0x3f0e4e(0x2e1)]=null;[_0x3f0e4e(0x1ae)]=!0x1;static get[_0x3f0e4e(0x272)](){return[_0x369b38,_0x50f6b4,_0x3de2e6];}static get[_0x3f0e4e(0x212)](){const _0x41b896=_0x3f0e4e;return _0x41b896(0x201);}static get[_0x3f0e4e(0x1af)](){return!0x0;}static get[_0x3f0e4e(0x1db)](){return!0x0;}[_0x3f0e4e(0x2cf)](){const _0x5b1a15=_0x3f0e4e;this[_0x5b1a15(0x1a6)]=this[_0x5b1a15(0x285)][_0x5b1a15(0x21c)][_0x5b1a15(0x2bf)](_0x5b1a15(0x26e)),this[_0x5b1a15(0x2c9)]=this[_0x5b1a15(0x285)][_0x5b1a15(0x21c)][_0x5b1a15(0x2bf)](_0x5b1a15(0x28d)),this[_0x5b1a15(0x233)]=this[_0x5b1a15(0x285)][_0x5b1a15(0x21c)][_0x5b1a15(0x2bf)](_0x5b1a15(0x26a)),this[_0x5b1a15(0x19a)]=new _0x226989({'connector':this[_0x5b1a15(0x1a6)],'availableModels':this[_0x5b1a15(0x285)][_0x5b1a15(0x255)][_0x5b1a15(0x2bf)](_0x5b1a15(0x20d)),'defaultModelId':this[_0x5b1a15(0x285)][_0x5b1a15(0x255)][_0x5b1a15(0x2bf)](_0x5b1a15(0x267))});const _0x40e646=this[_0x5b1a15(0x285)][_0x5b1a15(0x21c)][_0x5b1a15(0x2bf)](_0x5b1a15(0x261));this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x22b),()=>{const _0x95a55e=_0x5b1a15;this[_0x95a55e(0x1df)]();}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x19e),(_0x54b908,_0x55be1d)=>{const _0x48c3a2=_0x5b1a15;this[_0x48c3a2(0x2a4)]({'userMessage':_0x55be1d});}),this[_0x5b1a15(0x1eb)](_0x40e646,_0x5b1a15(0x2e9),(_0x3ece01,_0x4ab6fe)=>{const _0x3ad249=_0x5b1a15;this[_0x3ad249(0x1c1)](_0x4ab6fe);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x21f),()=>{const _0x63af7=_0x5b1a15;_0x40e646[_0x63af7(0x1e0)]();}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2d4),async()=>{const _0x37764c=_0x5b1a15;await this[_0x37764c(0x23f)](),await this[_0x37764c(0x21e)]();}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x1fa),()=>{const _0x11c484=_0x5b1a15;this[_0x11c484(0x2cc)]?.[_0x11c484(0x29e)](_0x3610a1(this[_0x11c484(0x285)][_0x11c484(0x245)],_0x11c484(0x2df)));}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x257),(_0x1fc0a4,_0x473e9b)=>{const _0x40cfbc=_0x5b1a15;this[_0x40cfbc(0x2cc)]?.[_0x40cfbc(0x2a0)](Array[_0x40cfbc(0x236)](_0x473e9b));}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x1ed),(_0x296f47,_0x52ab85)=>{const _0x2faffa=_0x5b1a15;this[_0x2faffa(0x2cc)]?.[_0x2faffa(0x1ed)](_0x52ab85);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x29b),(_0x2c510d,_0x10a589)=>{const _0x3d5c93=_0x5b1a15;this[_0x3d5c93(0x2cc)]?.[_0x3d5c93(0x29b)](_0x10a589[_0x3d5c93(0x1e4)],_0x10a589[_0x3d5c93(0x1fd)]);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x1a1),(_0x5d86a2,_0x481c31)=>{const _0x3c0f39=_0x5b1a15;this[_0x3c0f39(0x23c)](_0x481c31);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x279),(_0xd3d71e,_0x4488ac)=>{const _0x5b4da3=_0x5b1a15;this[_0x5b4da3(0x2cc)]?.[_0x5b4da3(0x279)](_0x4488ac[_0x5b4da3(0x239)],_0x4488ac[_0x5b4da3(0x2b4)],_0x4488ac[_0x5b4da3(0x2a1)]);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x291),()=>{const _0x514c09=_0x5b1a15;this[_0x514c09(0x2f3)]();}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2d3),()=>{const _0x5cc652=_0x5b1a15;this[_0x5cc652(0x2af)]();}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x1d5),(_0x59e777,_0x17c9c2)=>{const _0x4e21c2=_0x5b1a15;this[_0x4e21c2(0x2cc)]?.[_0x4e21c2(0x237)](_0x17c9c2);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x1cf),(_0x2a8f61,{replyId:_0x55487b})=>{const _0x3e4613=_0x5b1a15;console[_0x3e4613(0x27c)](_0x3e4613(0x21d),_0x55487b);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x23e),(_0x39e800,{replyId:_0x9e461c})=>{const _0x278355=_0x5b1a15;console[_0x278355(0x27c)](_0x278355(0x225),_0x9e461c);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x258),(_0x46e277,_0x336b4c)=>{const _0x39a5bf=_0x5b1a15;this[_0x39a5bf(0x285)][_0x39a5bf(0x21c)][_0x39a5bf(0x2bf)](_0x50f6b4)[_0x39a5bf(0x250)](),this[_0x39a5bf(0x2bb)](_0x336b4c);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2b2),(_0x462055,{replyId:_0x13ccf1,partIndex:_0x4aa634})=>{const _0x1378ef=_0x5b1a15;this[_0x1378ef(0x1ae)]=this[_0x1378ef(0x2c9)][_0x1378ef(0x208)],this[_0x1378ef(0x278)](_0x13ccf1,_0x4aa634);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2e6),(_0x4529cf,{replyId:_0x2d44e3,partIndex:_0x73e591})=>{const _0x2f47e5=_0x5b1a15,_0x28d448=this[_0x2f47e5(0x271)](_0x2d44e3,_0x73e591);_0x28d448&&_0x2f47e5(0x289)!=_0x28d448[_0x2f47e5(0x246)][_0x2f47e5(0x270)][_0x2f47e5(0x2e8)]&&this[_0x2f47e5(0x233)][_0x2f47e5(0x2d6)]([_0x28d448[_0x2f47e5(0x246)]],_0x2f47e5(0x27f));}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2ab),()=>{const _0x248c75=_0x5b1a15;this[_0x248c75(0x233)][_0x248c75(0x198)](_0x248c75(0x27f));}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x227),(_0x4db84c,_0xb2c0ef)=>{const _0x440fc9=_0x5b1a15;this[_0x440fc9(0x285)][_0x440fc9(0x21c)][_0x440fc9(0x2bf)](_0x50f6b4)[_0x440fc9(0x250)](),this[_0x440fc9(0x232)](_0xb2c0ef);}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x205),async(_0x176add,{replyId:_0x1f0ff2,showDiff:_0x203d87})=>{const _0x433c62=_0x5b1a15,{reply:_0x325fcf}=this[_0x433c62(0x2a5)](_0x1f0ff2),_0xc7565=_0x325fcf[_0x433c62(0x222)]({'showDiff':_0x203d87});await this[_0x433c62(0x2c9)][_0x433c62(0x2de)]({'id':_0x325fcf['id'],'parts':_0xc7565,'renderingStrategy':_0x433c62(0x220)});}),this[_0x5b1a15(0x1eb)](this[_0x5b1a15(0x2c9)],_0x5b1a15(0x2a2),(_0x393edf,{replyId:_0x23b9e5,partIndex:_0x4b90a7})=>{const _0x34a16a=_0x5b1a15;this[_0x34a16a(0x2e1)]?.[_0x34a16a(0x2f2)]==_0x23b9e5&&this[_0x34a16a(0x2e1)]?.[_0x34a16a(0x1c5)]==_0x4b90a7&&this[_0x34a16a(0x285)][_0x34a16a(0x21c)][_0x34a16a(0x2bf)](_0x50f6b4)[_0x34a16a(0x250)]();const {reply:_0x1f43ba}=this[_0x34a16a(0x2a5)](_0x23b9e5);_0x1f43ba[_0x34a16a(0x28c)](_0x4b90a7,_0x34a16a(0x25f)),this[_0x34a16a(0x233)][_0x34a16a(0x198)](_0x34a16a(0x27f));});}async[_0x3f0e4e(0x1ca)](){const _0x4ac25c=_0x3f0e4e;this[_0x4ac25c(0x285)]instanceof _0xf7fefe?this[_0x4ac25c(0x195)](this[_0x4ac25c(0x285)]):this[_0x4ac25c(0x1eb)](this[_0x4ac25c(0x285)][_0x4ac25c(0x283)],_0x4ac25c(0x22d),(_0x441134,_0x2824d1)=>{const _0x200f7a=_0x4ac25c;_0x2824d1['on'](_0x200f7a(0x19d),()=>{const _0x36bb77=_0x200f7a;this[_0x36bb77(0x195)](_0x2824d1);});}),await this[_0x4ac25c(0x1df)]();}[_0x3f0e4e(0x2bb)](_0x3a4aad){const _0x2d8d04=_0x3f0e4e,_0x3d573c=_0x2b4fc0(this[_0x2d8d04(0x285)]);if(!_0x3d573c[_0x2d8d04(0x21c)][_0x2d8d04(0x2ad)](_0x2d8d04(0x2c1)))throw new _0x1e9b3b(_0x2d8d04(0x1e6),null);const _0x541b70=this[_0x2d8d04(0x285)][_0x2d8d04(0x21c)][_0x2d8d04(0x2bf)](_0x2d8d04(0x2d7)),{reply:_0x3de5db,interaction:_0x35001c}=this[_0x2d8d04(0x2a5)](_0x3a4aad[_0x2d8d04(0x2f2)]),_0x2cf1d2=this[_0x2d8d04(0x271)](_0x3a4aad[_0x2d8d04(0x2f2)],_0x3a4aad[_0x2d8d04(0x1c5)]),_0x1269a3=void 0x0!==_0x3a4aad[_0x2d8d04(0x1c5)]?[_0x3de5db[_0x2d8d04(0x28b)][_0x3a4aad[_0x2d8d04(0x1c5)]]]:_0x3de5db[_0x2d8d04(0x28b)][_0x2d8d04(0x242)](_0x51bca3=>_0x2d8d04(0x29f)==_0x51bca3[_0x2d8d04(0x2d8)]),_0x5d507a=_0x1269a3[_0x2d8d04(0x1a8)](_0x1779a1=>_0x3de5db[_0x2d8d04(0x28b)][_0x2d8d04(0x231)](_0x1779a1));if(!_0x2cf1d2||_0x2d8d04(0x289)==_0x2cf1d2[_0x2d8d04(0x246)][_0x2d8d04(0x270)][_0x2d8d04(0x2e8)])return void _0x5d507a[_0x2d8d04(0x1c2)](_0x5cba89=>_0x3de5db[_0x2d8d04(0x28c)](_0x5cba89,_0x2d8d04(0x274)));_0x5d507a[_0x2d8d04(0x1c2)](_0x5581bb=>_0x3de5db[_0x2d8d04(0x28c)](_0x5581bb,_0x2d8d04(0x1aa)));const _0x1098a4=_0x4671bd({'editor':_0x3d573c,'reply':_0x3de5db,'interaction':_0x35001c,'groups':_0x1269a3,'transform':!0x0,'documentCompare':_0x541b70,'documentCompareOptions':{'anchor':_0x2d8d04(0x2a9),'markDeletions':!0x0}});let _0x121036;_0x2cf1d2&&this[_0x2d8d04(0x234)](_0x2cf1d2[_0x2d8d04(0x246)]),_0x3d573c[_0x2d8d04(0x238)][_0x2d8d04(0x1f8)](_0x4d6821=>{const _0x2313fc=_0x2d8d04;_0x121036=_0x4d6821[_0x2313fc(0x214)],_0x3d573c[_0x2313fc(0x21c)][_0x2313fc(0x2bf)](_0x2313fc(0x24c))[_0x2313fc(0x248)](_0x1098a4),this[_0x2313fc(0x233)][_0x2313fc(0x198)](_0x2313fc(0x27f));}),this[_0x2d8d04(0x19c)][_0x2d8d04(0x2ba)](_0x121036,{'interactionId':_0x35001c['id'],'replyId':_0x3de5db['id'],'indexes':_0x5d507a[_0x2d8d04(0x262)]()}),this[_0x2d8d04(0x197)](_0x3de5db);}[_0x3f0e4e(0x232)](_0x34028f){const _0x140835=_0x3f0e4e,_0x26c6ba=_0x2b4fc0(this[_0x140835(0x285)]),_0x43d874=this[_0x140835(0x285)][_0x140835(0x21c)][_0x140835(0x2bf)](_0x3de2e6),{reply:_0x4ee179,interaction:_0x4e37f9}=this[_0x140835(0x2a5)](_0x34028f[_0x140835(0x2f2)]),_0x4621ff=this[_0x140835(0x271)](_0x34028f[_0x140835(0x2f2)],_0x34028f[_0x140835(0x1c5)]),_0x245aad=void 0x0!==_0x34028f[_0x140835(0x1c5)]?[_0x4ee179[_0x140835(0x28b)][_0x34028f[_0x140835(0x1c5)]]]:_0x4ee179[_0x140835(0x28b)][_0x140835(0x242)](_0x3a4603=>_0x140835(0x29f)==_0x3a4603[_0x140835(0x2d8)]),_0x25e927=_0x245aad[_0x140835(0x1a8)](_0x441018=>_0x4ee179[_0x140835(0x28b)][_0x140835(0x231)](_0x441018));if(!_0x4621ff||_0x140835(0x289)==_0x4621ff[_0x140835(0x246)][_0x140835(0x270)][_0x140835(0x2e8)])return void _0x25e927[_0x140835(0x1c2)](_0x52ec59=>_0x4ee179[_0x140835(0x28c)](_0x52ec59,_0x140835(0x274)));_0x25e927[_0x140835(0x1c2)](_0x33dec2=>_0x4ee179[_0x140835(0x28c)](_0x33dec2,_0x140835(0x1aa)));const _0x2d63f4=_0x4671bd({'editor':_0x26c6ba,'reply':_0x4ee179,'interaction':_0x4e37f9,'groups':_0x245aad,'transform':!0x0,'documentCompare':_0x43d874,'documentCompareOptions':{'anchor':_0x140835(0x2a9),'markDeletions':!0x1}});let _0x138ed1;_0x4621ff&&this[_0x140835(0x234)](_0x4621ff[_0x140835(0x246)]),_0x26c6ba[_0x140835(0x238)][_0x140835(0x1f8)](_0x2d5e39=>{const _0x3a7c35=_0x140835;_0x138ed1=_0x2d5e39[_0x3a7c35(0x214)];for(const _0x2a7669 of _0x2d63f4)_0x2a7669[_0x3a7c35(0x1b5)]=_0x26c6ba[_0x3a7c35(0x238)][_0x3a7c35(0x2aa)][_0x3a7c35(0x1d8)],_0x5b162f(_0x26c6ba,_0x2a7669),_0x2d5e39[_0x3a7c35(0x214)][_0x3a7c35(0x251)](_0x2a7669),_0x26c6ba[_0x3a7c35(0x238)][_0x3a7c35(0x1ee)](_0x2a7669);}),this[_0x140835(0x19c)][_0x140835(0x2ba)](_0x138ed1,{'interactionId':_0x4e37f9['id'],'replyId':_0x4ee179['id'],'indexes':_0x25e927[_0x140835(0x262)]()}),this[_0x140835(0x197)](_0x4ee179);}[_0x3f0e4e(0x278)](_0x15b25b,_0x425ec2){const _0x132c1b=_0x3f0e4e,_0x49ea59=_0x2b4fc0(this[_0x132c1b(0x285)]),_0x872fbd=this[_0x132c1b(0x271)](_0x15b25b,_0x425ec2),_0x120997=this[_0x132c1b(0x285)][_0x132c1b(0x21c)][_0x132c1b(0x2bf)](_0x50f6b4);if(!_0x872fbd)return void _0x120997[_0x132c1b(0x250)]();const {range:_0x14139d,currentIndex:_0x4a30f3}=_0x872fbd;if(_0x132c1b(0x289)==_0x14139d[_0x132c1b(0x270)][_0x132c1b(0x2e8)]){const {reply:_0x4f2186}=this[_0x132c1b(0x2a5)](_0x15b25b);return _0x4f2186[_0x132c1b(0x28c)](_0x4a30f3,_0x132c1b(0x274)),void _0x120997[_0x132c1b(0x250)]();}if(this[_0x132c1b(0x2e1)]?.[_0x132c1b(0x2f2)]==_0x15b25b&&this[_0x132c1b(0x2e1)]?.[_0x132c1b(0x1c5)]==_0x4a30f3)return;this[_0x132c1b(0x1b0)](_0x120997),this[_0x132c1b(0x2e1)]={'replyId':_0x15b25b,'partIndex':_0x4a30f3};let _0x22b66e=_0x49ea59[_0x132c1b(0x255)][_0x132c1b(0x2bf)](_0x132c1b(0x2ef))||[..._0x54b317];_0x49ea59[_0x132c1b(0x21c)][_0x132c1b(0x2ad)](_0x132c1b(0x2c1))||(_0x22b66e=_0x22b66e[_0x132c1b(0x242)](_0x5d8c92=>_0x132c1b(0x258)!=_0x5d8c92));const _0x6f2597=new _0x535f23(_0x49ea59[_0x132c1b(0x245)],{'showDiff':this[_0x132c1b(0x1ae)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x132c1b(0x1ad)},'hideHeader':!0x0,'availableActions':_0x22b66e});this[_0x132c1b(0x1b0)](_0x6f2597);const {reply:_0x4c0c09}=this[_0x132c1b(0x2a5)](_0x15b25b),_0x410f4d=_0x4c0c09[_0x132c1b(0x222)]({'showDiff':this[_0x132c1b(0x1ae)]})[_0x132c1b(0x242)](_0x21e6f3=>_0x21e6f3[_0x132c1b(0x243)]),_0x38c515=_0x410f4d[_0x132c1b(0x1ac)](_0x1597b9=>_0x1597b9[_0x132c1b(0x1e1)]==_0x4a30f3);if(-0x1==_0x38c515)return;const _0x2488fe=_0x410f4d[_0x38c515],_0x37b2b3=_0x410f4d['at']((_0x38c515-0x1)%_0x410f4d[_0x132c1b(0x2f1)])?.[_0x132c1b(0x1e1)],_0x3f240d=_0x410f4d['at']((_0x38c515+0x1)%_0x410f4d[_0x132c1b(0x2f1)])?.[_0x132c1b(0x1e1)];_0x6f2597[_0x132c1b(0x223)]({'parts':[_0x2488fe],'renderingStrategy':_0x132c1b(0x220)});const _0x1cbb3a=_0x4a30f3!==_0x37b2b3;this[_0x132c1b(0x234)](_0x14139d,!0x0),_0x120997[_0x132c1b(0x292)]({'index':_0x4a30f3,'title':_0x3610a1(this[_0x132c1b(0x285)][_0x132c1b(0x245)],_0x132c1b(0x1a0),(_0x38c515+0x1)[_0x132c1b(0x252)]()),'icon':_0xba88b9,'mainView':_0x6f2597,'showRotator':_0x1cbb3a,'showApplyButton':!0x0,'showSuggestButton':_0x49ea59[_0x132c1b(0x21c)][_0x132c1b(0x2ad)](_0x132c1b(0x2c1)),'ranges':[_0x14139d]}),this[_0x132c1b(0x2c9)][_0x132c1b(0x2b6)](_0x15b25b,_0x4a30f3),this[_0x132c1b(0x1eb)](_0x6f2597,_0x132c1b(0x205),(_0x44ca28,{showDiff:_0xca1edf})=>{const _0x2c94e1=_0x132c1b;this[_0x2c94e1(0x1ae)]=_0xca1edf;const {reply:_0x57ca4e}=this[_0x2c94e1(0x2a5)](_0x15b25b),_0x25c9aa=_0x57ca4e[_0x2c94e1(0x222)]({'showDiff':_0xca1edf,'groupIndex':_0x4a30f3});_0x6f2597[_0x2c94e1(0x223)]({'parts':_0x25c9aa,'renderingStrategy':_0x2c94e1(0x220)});}),this[_0x132c1b(0x1eb)](_0x120997,_0x132c1b(0x227),()=>{const _0x42e8b0=_0x132c1b;this[_0x42e8b0(0x232)]({'replyId':_0x15b25b,'partIndex':_0x4a30f3}),_0x1cbb3a?this[_0x42e8b0(0x278)](_0x15b25b,_0x3f240d):_0x120997[_0x42e8b0(0x250)]();}),this[_0x132c1b(0x1eb)](_0x120997,_0x132c1b(0x258),()=>{const _0x5245aa=_0x132c1b;this[_0x5245aa(0x2bb)]({'replyId':_0x15b25b,'partIndex':_0x4a30f3}),_0x1cbb3a?this[_0x5245aa(0x278)](_0x15b25b,_0x3f240d):_0x120997[_0x5245aa(0x250)]();}),_0x1cbb3a&&(this[_0x132c1b(0x1eb)](_0x120997,_0x132c1b(0x1a5),()=>{const _0x1b615b=_0x132c1b;this[_0x1b615b(0x278)](_0x15b25b,_0x3f240d);}),this[_0x132c1b(0x1eb)](_0x120997,_0x132c1b(0x275),()=>{const _0x437e2=_0x132c1b;this[_0x437e2(0x278)](_0x15b25b,_0x37b2b3);})),this[_0x132c1b(0x1eb)](_0x120997,_0x132c1b(0x228),()=>{const _0x22265c=_0x132c1b;this[_0x22265c(0x1b0)](_0x120997),this[_0x22265c(0x1b0)](_0x6f2597),this[_0x22265c(0x2e1)]=null;});}[_0x3f0e4e(0x271)](_0x3bb684,_0x153951){const _0x976dd9=_0x3f0e4e,_0x170c88=_0x2b4fc0(this[_0x976dd9(0x285)]),{reply:_0x4509a8,interaction:_0x3aa603}=this[_0x976dd9(0x2a5)](_0x3bb684),_0x3c85c8=_0x4509a8[_0x976dd9(0x28b)][_0x976dd9(0x242)](_0x5846a2=>_0x976dd9(0x29f)==_0x5846a2[_0x976dd9(0x2d8)]),_0x1faf68=_0x3c85c8[_0x976dd9(0x1a8)](_0x13ad27=>_0x4509a8[_0x976dd9(0x28b)][_0x976dd9(0x231)](_0x13ad27));void 0x0===_0x153951&&(_0x153951=_0x1faf68[0x0]);const _0x41081d=_0x1faf68[_0x976dd9(0x231)](_0x153951);if(-0x1==_0x41081d)return null;const _0x330712=_0x3c85c8[_0x41081d],_0xd601ba=new _0x30c88d([]),_0x3a745a=new _0x30c88d([]);for(const _0x4aace9 of _0x330712[_0x976dd9(0x2c3)])if(_0x976dd9(0x2bc)!=_0x4aace9[_0x976dd9(0x2c8)]&&_0x3a745a[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x4aace9[_0x976dd9(0x1b3)][_0x976dd9(0x1e7)](!0x0)),_0x976dd9(0x1b1)!=_0x4aace9[_0x976dd9(0x2c8)]){const _0x29e458=_0x2b4cab(_0x2ce4b5=>_0x310d02(_0x2ce4b5,_0x976dd9(0x1f6))==_0x4aace9['id'],_0x4509a8[_0x976dd9(0x1c9)],!0x0);_0xd601ba[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x29e458[_0x976dd9(0x1e7)](!0x0));}if(0x0==_0xd601ba[_0x976dd9(0x1c3)][_0x976dd9(0x2f1)]){if(_0x330712[_0x976dd9(0x2c3)][0x0][_0x976dd9(0x21b)]){const _0x2cd5fb=_0x5e155c(_0x976dd9(0x1f6),_0x330712[_0x976dd9(0x2c3)][0x0][_0x976dd9(0x21b)],_0x4509a8[_0x976dd9(0x1c9)]);_0xd601ba[_0x976dd9(0x1c3)][_0x976dd9(0x1cc)](_0x2cd5fb[_0x976dd9(0x1e7)](!0x0)),_0x3a745a[_0x976dd9(0x1c3)][_0x976dd9(0x1cc)](_0x2cd5fb[_0x976dd9(0x1e7)](!0x0)),_0x2cd5fb[_0x976dd9(0x1f0)]&&(_0xd601ba[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x2cd5fb[_0x976dd9(0x1f0)][_0x976dd9(0x1e7)](!0x0)),_0x3a745a[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x2cd5fb[_0x976dd9(0x1f0)][_0x976dd9(0x1e7)](!0x0)));}else{const _0x547c7f=_0x4509a8[_0x976dd9(0x1c9)][_0x976dd9(0x1c3)][0x0];if(!_0x547c7f)return null;_0xd601ba[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x547c7f[_0x976dd9(0x1e7)](!0x0)),_0x3a745a[_0x976dd9(0x1c3)][_0x976dd9(0x24d)](_0x547c7f[_0x976dd9(0x1e7)](!0x0));}}const _0x4e7a23=_0x3aa603[_0x976dd9(0x1d9)](),_0x215a88=_0x170c88[_0x976dd9(0x282)][_0x976dd9(0x280)](_0x4e7a23[_0x976dd9(0x286)]),_0x13ecde=_0x1354a1(_0xd601ba),_0x449030=_0x170c88[_0x976dd9(0x282)][_0x976dd9(0x280)](_0x13ecde),_0x3f9fdb=_0x170c88[_0x976dd9(0x282)][_0x976dd9(0x280)](_0x13ecde),_0x5c92dc=_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x276)](_0x449030,0x0),_0x55fe11=_0x1354a1(_0x3a745a),_0x1ef840={'anchor':_0x5c92dc,'markDeletions':!0x1},_0x3ef76b=_0x170c88[_0x976dd9(0x21c)][_0x976dd9(0x2bf)](_0x3de2e6)[_0x976dd9(0x25d)](_0x13ecde,_0x55fe11,_0x1ef840)[_0x976dd9(0x229)]();if(!_0x3ef76b[_0x976dd9(0x2f1)])return null;_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x1f8)](_0x40491f=>{const _0x4e611c=_0x976dd9;for(const _0x469d35 of _0x3ef76b)if(_0x4e611c(0x1de)==_0x469d35[_0x4e611c(0x2c8)]){const _0x3bfd4a=_0x469d35[_0x4e611c(0x294)],_0x2e25ec=_0x469d35[_0x4e611c(0x2b8)],_0x4d2fc7=new _0x5382b6(_0x3bfd4a,_0x2e25ec);_0x40491f[_0x4e611c(0x214)][_0x4e611c(0x251)](_0x4d2fc7),_0x170c88[_0x4e611c(0x238)][_0x4e611c(0x1ee)](_0x4d2fc7);}else _0x4e611c(0x269)!==_0x469d35[_0x4e611c(0x2c8)]&&(_0x469d35[_0x4e611c(0x1b5)]=null,_0x469d35[_0x4e611c(0x259)]=!0x1,_0x40491f[_0x4e611c(0x214)][_0x4e611c(0x251)](_0x469d35),_0x170c88[_0x4e611c(0x238)][_0x4e611c(0x1ee)](_0x469d35));});const _0xf5060a=_0x11bb9a(_0x170c88,_0x3ef76b,_0x449030);_0xc37610(_0x170c88[_0x976dd9(0x238)],_0xf5060a);const _0x2ef283=_0xf5060a[_0x976dd9(0x211)]()[_0x976dd9(0x207)][_0x976dd9(0x226)][_0x976dd9(0x262)](),_0x4c3460=_0xf5060a[_0x976dd9(0x211)]()[_0x976dd9(0x1b4)][_0x976dd9(0x226)][_0x976dd9(0x262)](),_0x3b5953=[];let _0x9b6944=_0x449030,_0x4f97a7=_0x3f9fdb;for(let _0x30a22d=0x0;_0x30a22d<_0x4c3460[_0x976dd9(0x2f1)];_0x30a22d++){const _0x39a073=_0x9b6944[_0x976dd9(0x2ca)]-_0x4c3460[_0x30a22d];_0x3b5953[_0x30a22d]=_0x4f97a7[_0x976dd9(0x2ca)]-_0x39a073,_0x9b6944=_0x9b6944[_0x976dd9(0x206)](_0x4c3460[_0x30a22d]),_0x4f97a7=_0x4f97a7[_0x976dd9(0x206)](_0x3b5953[_0x30a22d]);}const _0x4b3212=_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x273)](_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2ed)](_0x3f9fdb,_0x2ef283),_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2ed)](_0x3f9fdb,_0x3b5953)),_0x54f8fb=_0x3f9fdb[_0x976dd9(0x297)](0x0)[_0x976dd9(0x28e)](_0x55edee),_0x5cd48a=Array[_0x976dd9(0x236)](_0x215a88[_0x976dd9(0x2ec)]())[_0x976dd9(0x2db)](_0x2bc36a=>_0x2bc36a[_0x976dd9(0x28e)](_0x55edee)==_0x54f8fb)[_0x976dd9(0x1a3)](),_0x2c3f9d=_0x4b3212[_0x976dd9(0x207)][_0x976dd9(0x226)][_0x976dd9(0x262)](),_0x26e8ea=_0x4b3212[_0x976dd9(0x1b4)][_0x976dd9(0x226)][_0x976dd9(0x262)]();_0x2c3f9d[0x0]=_0x5cd48a[0x0]+_0x2c3f9d[0x0],_0x26e8ea[0x0]=_0x5cd48a[0x0]+_0x26e8ea[0x0];let _0x2054a6=_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x273)](_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2ed)](_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2aa)][_0x976dd9(0x2be)](),_0x2c3f9d),_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2ed)](_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2aa)][_0x976dd9(0x2be)](),_0x26e8ea));const _0xf8243d=_0x170c88[_0x976dd9(0x238)][_0x976dd9(0x2aa)][_0x976dd9(0x216)][_0x976dd9(0x229)](_0x4e7a23[_0x976dd9(0x1d8)]);for(const _0x4e00b8 of _0xf8243d)_0x2054a6=_0xd0bcd1[_0x976dd9(0x1f2)](_0x2054a6[_0x976dd9(0x1f3)](_0x4e00b8));return{'range':_0x2054a6,'currentIndex':_0x153951};}[_0x3f0e4e(0x195)](_0xb8ccc6){const _0xc09294=_0x3f0e4e;if(!_0xb8ccc6[_0xc09294(0x21c)][_0xc09294(0x2ad)](_0xc09294(0x1fb)))return;const _0x2c8f2c=_0xb8ccc6[_0xc09294(0x1e9)][_0xc09294(0x2bf)](_0xc09294(0x199)),_0x39377f=_0xb8ccc6[_0xc09294(0x1e9)][_0xc09294(0x2bf)](_0xc09294(0x268));this[_0xc09294(0x1eb)](_0x2c8f2c,_0xc09294(0x2e0),(_0x46b262,_0x3d4288,_0x56051e)=>{const _0x22d940=_0xc09294,_0x18e4f8=this[_0x22d940(0x19c)][_0x22d940(0x2bf)](_0x3d4288);if(!_0x18e4f8)return;const _0x2eda80=this[_0x22d940(0x2cc)][_0x22d940(0x1bd)](_0x18e4f8[_0x22d940(0x2d1)])[_0x22d940(0x21a)](_0x18e4f8[_0x22d940(0x2f2)]);_0x18e4f8[_0x22d940(0x1f7)][_0x22d940(0x1c2)](_0x5beb9d=>_0x2eda80[_0x22d940(0x28c)](_0x5beb9d,_0x22d940(0x29f))),this[_0x22d940(0x19c)][_0x22d940(0x2a3)](_0x3d4288),this[_0x22d940(0x19c)][_0x22d940(0x2ba)](_0x56051e,_0x18e4f8);}),this[_0xc09294(0x1eb)](_0x39377f,_0xc09294(0x2e0),(_0x593150,_0x1e2192,_0x26c5e9)=>{const _0x22658f=_0xc09294,_0x48cc12=this[_0x22658f(0x19c)][_0x22658f(0x2bf)](_0x1e2192);if(!_0x48cc12)return;const _0x3f5174=this[_0x22658f(0x2cc)][_0x22658f(0x1bd)](_0x48cc12[_0x22658f(0x2d1)])[_0x22658f(0x21a)](_0x48cc12[_0x22658f(0x2f2)]);_0x48cc12[_0x22658f(0x1f7)][_0x22658f(0x1c2)](_0x1dd1f1=>_0x3f5174[_0x22658f(0x28c)](_0x1dd1f1,_0x22658f(0x1aa))),this[_0x22658f(0x19c)][_0x22658f(0x2a3)](_0x1e2192),this[_0x22658f(0x19c)][_0x22658f(0x2ba)](_0x26c5e9,_0x48cc12);});}async[_0x3f0e4e(0x230)](_0x3f9a39){const _0x4c2bd5=_0x3f0e4e;this[_0x4c2bd5(0x285)][_0x4c2bd5(0x21c)][_0x4c2bd5(0x2bf)](_0x50f6b4)[_0x4c2bd5(0x250)](),this[_0x4c2bd5(0x2c9)][_0x4c2bd5(0x2dc)](_0x4c2bd5(0x220)),this[_0x4c2bd5(0x2c9)][_0x4c2bd5(0x1da)](!0x0),await this[_0x4c2bd5(0x23f)]();try{const _0x5cae3f=this[_0x4c2bd5(0x285)][_0x4c2bd5(0x21c)][_0x4c2bd5(0x2bf)](_0x2a1897);this[_0x4c2bd5(0x213)]('\x20'),_0x5cae3f[_0x4c2bd5(0x2eb)][_0x4c2bd5(0x1b9)](_0x4c2bd5(0x2dd)),await this[_0x4c2bd5(0x1df)](_0x3f9a39);const {sessionId:_0x4b2dc5}=this[_0x4c2bd5(0x233)][_0x4c2bd5(0x1bf)]();await this[_0x4c2bd5(0x2cc)][_0x4c2bd5(0x2e5)](_0x3f9a39,_0x4b2dc5),this[_0x4c2bd5(0x2cc)][_0x4c2bd5(0x2e4)]()&&this[_0x4c2bd5(0x2cc)][_0x4c2bd5(0x29e)](_0x3610a1(this[_0x4c2bd5(0x285)][_0x4c2bd5(0x245)],_0x4c2bd5(0x2df)));}catch(_0x18f23c){console[_0x4c2bd5(0x265)](_0x4c2bd5(0x1c4),_0x18f23c);}finally{this[_0x4c2bd5(0x2c9)][_0x4c2bd5(0x200)](),this[_0x4c2bd5(0x2c9)][_0x4c2bd5(0x2dc)](_0x4c2bd5(0x20a)),this[_0x4c2bd5(0x2c9)][_0x4c2bd5(0x1da)](!0x1);}}[_0x3f0e4e(0x25a)](_0x27a105){const _0xc6e0d8=_0x3f0e4e;this[_0xc6e0d8(0x2cc)]['id']===_0x27a105&&this[_0xc6e0d8(0x1df)]();}async[_0x3f0e4e(0x277)](){const _0x4fa143=_0x3f0e4e,_0x1c2334=this[_0x4fa143(0x233)][_0x4fa143(0x218)]();this[_0x4fa143(0x2cc)]?.[_0x4fa143(0x2c4)](_0x1c2334),this[_0x4fa143(0x2cc)]?.[_0x4fa143(0x29e)](_0x3610a1(this[_0x4fa143(0x285)][_0x4fa143(0x245)],_0x4fa143(0x2df)));}[_0x3f0e4e(0x22a)](){const _0x1a3f92=_0x3f0e4e;this[_0x1a3f92(0x2cc)]?.[_0x1a3f92(0x25c)]();}[_0x3f0e4e(0x22c)](){const _0x2f4bb3=_0x3f0e4e;this[_0x2f4bb3(0x2c9)][_0x2f4bb3(0x22c)]();}async[_0x3f0e4e(0x22b)](){const _0x4dd2cb=_0x3f0e4e;await this[_0x4dd2cb(0x1df)]();}async[_0x3f0e4e(0x1cb)]({message:_0x455d48,quickActionData:_0xe4d124}){const _0x2ed823=_0x3f0e4e;await this[_0x2ed823(0x2a4)]({'userMessage':_0x455d48,'quickActionData':_0xe4d124});}[_0x3f0e4e(0x1c6)](){const _0x417e05=_0x3f0e4e,_0x4bf5c9=this[_0x417e05(0x285)][_0x417e05(0x255)][_0x417e05(0x2bf)](_0x417e05(0x1f4));if(!_0x4bf5c9)throw new _0x1e9b3b(_0x417e05(0x26f),this);return _0x4bf5c9;}async[_0x3f0e4e(0x1df)](_0x52af05){const _0x3c3874=_0x3f0e4e;try{this[_0x3c3874(0x2c9)][_0x3c3874(0x20b)](),await this[_0x3c3874(0x26d)](_0x52af05);}catch(_0x6913ee){_0x3c1905(_0x3c3874(0x2d9),_0x6913ee),this[_0x3c3874(0x2cc)]=void 0x0,this[_0x3c3874(0x2c9)][_0x3c3874(0x1b2)]();}}async[_0x3f0e4e(0x26d)](_0x2a30ac){const _0x29bce0=_0x3f0e4e,_0x236aa7=this[_0x29bce0(0x285)][_0x29bce0(0x21c)][_0x29bce0(0x2bf)](_0x50f6b4);let _0x47dd6e;_0x236aa7[_0x29bce0(0x23a)]&&_0x236aa7[_0x29bce0(0x250)](),_0x2a30ac||!this[_0x29bce0(0x2cc)]?_0x47dd6e=this[_0x29bce0(0x285)][_0x29bce0(0x255)][_0x29bce0(0x2bf)](_0x29bce0(0x267)):this[_0x29bce0(0x2c9)][_0x29bce0(0x1ff)]&&(_0x47dd6e=this[_0x29bce0(0x2cc)][_0x29bce0(0x1ec)]['id']),await this[_0x29bce0(0x23f)]();const _0x4f4c14=this[_0x29bce0(0x1c6)](),_0x5ab168=_0x2a30ac||_0x416d88();this[_0x29bce0(0x2cc)]=new _0x470ab6({'connector':this[_0x29bce0(0x1a6)],'chatModels':this[_0x29bce0(0x19a)],'selectedModelId':_0x47dd6e,'conversationId':_0x5ab168,'group':_0x4f4c14,'getEditor':()=>_0x2b4fc0(this[_0x29bce0(0x285)])}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2f0),(_0x196632,_0x9bfe2)=>{const _0x5c31e9=_0x29bce0;this[_0x5c31e9(0x2c9)][_0x5c31e9(0x2b1)](_0x9bfe2),this[_0x5c31e9(0x2c9)][_0x5c31e9(0x1a9)](),this[_0x5c31e9(0x2c9)][_0x5c31e9(0x2ea)](),this[_0x5c31e9(0x2c9)][_0x5c31e9(0x1be)](),_0x2a30ac||(this[_0x5c31e9(0x2c9)][_0x5c31e9(0x1bb)](),this[_0x5c31e9(0x2cc)]?.[_0x5c31e9(0x29e)](_0x3610a1(this[_0x5c31e9(0x285)][_0x5c31e9(0x245)],_0x5c31e9(0x2df))));}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x24a),(_0x329918,_0x2db6ee)=>{const _0x50bf07=_0x29bce0;this[_0x50bf07(0x2c9)][_0x50bf07(0x24e)](_0x2db6ee[_0x50bf07(0x1d7)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2da),(_0x3f605d,_0x5d0be7)=>{const _0x3c4efa=_0x29bce0;this[_0x3c4efa(0x2c9)][_0x3c4efa(0x26b)](_0x5d0be7);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x19b),()=>{const _0x2b7c84=_0x29bce0;this[_0x2b7c84(0x2c9)][_0x2b7c84(0x1d1)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1ab),()=>{const _0x9bb521=_0x29bce0;this[_0x9bb521(0x2c9)][_0x9bb521(0x1d1)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1cd),(_0x45845b,_0x41e123)=>{const _0x4ef361=_0x29bce0;this[_0x4ef361(0x2c9)][_0x4ef361(0x1d6)](_0x41e123,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1ef),(_0x2576f7,_0x44d7c8)=>{const _0xc6b023=_0x29bce0;this[_0xc6b023(0x2c9)][_0xc6b023(0x1d6)](_0x44d7c8,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1f5),()=>{const _0xa64fcb=_0x29bce0;this[_0xa64fcb(0x2c9)][_0xa64fcb(0x2cb)]();}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x299),async()=>{const _0x232106=_0x29bce0;await this[_0x232106(0x2c9)][_0x232106(0x29c)]();}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x24b),(_0x115928,_0x3122e2)=>{const _0x18e642=_0x29bce0;this[_0x18e642(0x2c9)][_0x18e642(0x210)](_0x3122e2['id']);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2e2),(_0x5319bb,_0x21d951,_0x5890be)=>{const _0x53f73b=_0x29bce0;this[_0x53f73b(0x213)](_0x21d951,_0x5890be);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x203),(_0x489106,_0x39ea70)=>{const _0x33b430=_0x29bce0;_0x33b430(0x2ee)===_0x39ea70[_0x33b430(0x2c8)]?this[_0x33b430(0x2c9)][_0x33b430(0x1bc)](_0x39ea70):this[_0x33b430(0x2c9)][_0x33b430(0x263)](_0x39ea70);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x29d),async(_0x54e584,_0x111fe0)=>{const _0x48d4b7=_0x29bce0;await this[_0x48d4b7(0x240)]({'reply':_0x111fe0});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1a2),(_0x279d2d,{reply:_0x5ae758,index:_0x5563a6,state:_0x11854a})=>{const _0x5b7cff=_0x29bce0;this[_0x5b7cff(0x2c9)][_0x5b7cff(0x244)]({'id':_0x5ae758['id'],'index':_0x5563a6,'state':_0x11854a});}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2ae),(_0x4dbb20,_0x53ee8f)=>{const _0x244e5e=_0x29bce0;if(this[_0x244e5e(0x2c9)][_0x244e5e(0x2c7)](_0x53ee8f[_0x244e5e(0x27a)],_0x53ee8f[_0x244e5e(0x1dd)]),_0x244e5e(0x1ea)===_0x53ee8f[_0x244e5e(0x27a)][_0x244e5e(0x2c8)]){const _0x8361dd=[..._0x2b4fc0(this[_0x244e5e(0x285)])[_0x244e5e(0x238)][_0x244e5e(0x2aa)][_0x244e5e(0x1ea)][_0x244e5e(0x20f)]()];this[_0x244e5e(0x233)][_0x244e5e(0x2d6)](_0x8361dd,_0x244e5e(0x1fc)+this[_0x244e5e(0x2cc)]?.['id']);}}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1ba),(_0x2e34a6,_0x3fc187)=>{const _0x1306b8=_0x29bce0;this[_0x1306b8(0x2c9)][_0x1306b8(0x1a1)](_0x3fc187[_0x1306b8(0x2c0)]),_0x1306b8(0x2b3)==_0x3fc187[_0x1306b8(0x2c0)]&&this[_0x1306b8(0x22a)](),_0x1306b8(0x1ea)===_0x3fc187[_0x1306b8(0x2c8)]&&this[_0x1306b8(0x233)][_0x1306b8(0x198)](_0x1306b8(0x1fc)+this[_0x1306b8(0x2cc)]?.['id']);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2e3),(_0x230dbf,_0x3950b4)=>{const _0x1df037=_0x29bce0;this[_0x1df037(0x2c9)][_0x1df037(0x27d)](_0x3950b4[_0x1df037(0x27a)][_0x1df037(0x2c0)],_0x3950b4[_0x1df037(0x1dd)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2a7),(_0x522571,_0xfc81d0)=>{const _0x24681a=_0x29bce0;this[_0x24681a(0x2c9)][_0x24681a(0x260)](_0xfc81d0[_0x24681a(0x2d0)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x288),(_0x124214,_0x5ec354)=>{const _0x2f3c6d=_0x29bce0;this[_0x2f3c6d(0x2c9)][_0x2f3c6d(0x247)](_0x5ec354[_0x2f3c6d(0x19f)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x1d0),(_0x1907f1,_0x5e4c48)=>{const _0x59ed5f=_0x29bce0;this[_0x59ed5f(0x2c9)][_0x59ed5f(0x23d)](_0x5e4c48[_0x59ed5f(0x239)],_0x5e4c48[_0x59ed5f(0x1e4)],_0x5e4c48[_0x59ed5f(0x215)],_0x5e4c48[_0x59ed5f(0x2a1)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x202),(_0x3e499c,_0x26740d)=>{const _0x566397=_0x29bce0;this[_0x566397(0x2c9)][_0x566397(0x287)](_0x26740d[_0x566397(0x239)],_0x26740d[_0x566397(0x2e7)],_0x26740d[_0x566397(0x295)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x2a8),(_0x5afa3e,_0x51fe82)=>{const _0x3d2077=_0x29bce0;this[_0x3d2077(0x2c9)][_0x3d2077(0x204)](_0x51fe82);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x284),(_0x1de380,_0x3204a3)=>{const _0x13a2d9=_0x29bce0;this[_0x13a2d9(0x2c9)][_0x13a2d9(0x25e)](_0x3204a3[_0x13a2d9(0x1ec)],_0x3204a3[_0x13a2d9(0x217)]);}),this[_0x29bce0(0x2cc)]['on'](_0x29bce0(0x265),(_0x11b2fc,{error:_0x42957b,interactionId:_0x418983,fileName:_0x5e7a51,url:_0x364ec7,sourceId:_0x28617d,sourceLabel:_0x48779a})=>{const _0x53f9bf=_0x29bce0,_0x34b7f9=_0x418983?_0x418983+':'+_0x416d88():_0x416d88();_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x281))?this[_0x53f9bf(0x2c9)][_0x53f9bf(0x1d2)]({'staticMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x22e)),'id':_0x34b7f9}):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x2b5))||_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x2d9))?(this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x28f)),'id':_0x34b7f9}),this[_0x53f9bf(0x1c8)](_0x42957b)):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x2bd))?this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x196),_0x5e7a51),'id':_0x34b7f9}):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x1e8))?this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x1c0),_0x364ec7),'id':_0x34b7f9}):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x2b7))?this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x264)),'id':_0x34b7f9}):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x2d2))?this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x2c6)),'id':_0x34b7f9}):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x25b))?(_0x28617d&&this[_0x53f9bf(0x2c9)][_0x53f9bf(0x1ce)](_0x28617d),this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x26c),_0x48779a||_0x53f9bf(0x1e4)),'id':_0x34b7f9}),this[_0x53f9bf(0x1c8)](_0x42957b)):_0x42957b[_0x53f9bf(0x1dc)][_0x53f9bf(0x1c7)](_0x53f9bf(0x253))?(this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x20c)),'id':_0x34b7f9}),this[_0x53f9bf(0x1c8)](_0x42957b)):(this[_0x53f9bf(0x2c9)][_0x53f9bf(0x293)]({'errorMessage':_0x3610a1(this[_0x53f9bf(0x285)][_0x53f9bf(0x245)],_0x53f9bf(0x1f9)),'id':_0x34b7f9}),this[_0x53f9bf(0x1c8)](_0x42957b));}),await this[_0x29bce0(0x2cc)][_0x29bce0(0x2cf)](this[_0x29bce0(0x285)][_0x29bce0(0x255)][_0x29bce0(0x2bf)](_0x29bce0(0x209))),_0x2a30ac||await this[_0x29bce0(0x2cc)][_0x29bce0(0x207)]();}async[_0x3f0e4e(0x2a4)]({userMessage:_0x1aff3a,quickActionData:_0x228b60}){const _0x4cb89e=_0x3f0e4e;if(!this[_0x4cb89e(0x2cc)])throw new _0x1e9b3b(_0x4cb89e(0x22f));this[_0x4cb89e(0x2cc)][_0x4cb89e(0x2b0)]()&&await this[_0x4cb89e(0x2cc)][_0x4cb89e(0x28a)](this[_0x4cb89e(0x233)][_0x4cb89e(0x1bf)]()),this[_0x4cb89e(0x2cc)]['id']&&this[_0x4cb89e(0x2cc)][_0x4cb89e(0x266)]&&await this[_0x4cb89e(0x2cc)][_0x4cb89e(0x23b)]({'userMessage':_0x1aff3a,'quickActionData':_0x228b60}),this[_0x4cb89e(0x2c5)]();}[_0x3f0e4e(0x2c5)](){const _0x13a24d=_0x3f0e4e,_0xc24d12=_0x2b4fc0(this[_0x13a24d(0x285)])[_0x13a24d(0x238)],_0x11d824=Array[_0x13a24d(0x236)](_0xc24d12[_0x13a24d(0x235)][_0x13a24d(0x1f1)](_0x823a86));_0xc24d12[_0x13a24d(0x1f8)](_0x1330ac=>{const _0x3378b0=_0x13a24d;_0x11d824[_0x3378b0(0x1c2)](_0x3e1049=>_0x1330ac[_0x3378b0(0x256)](_0x3e1049));});}[_0x3f0e4e(0x298)](){const _0x240d65=_0x3f0e4e;console[_0x240d65(0x27c)](_0x240d65(0x221));}[_0x3f0e4e(0x1c1)](_0x4a1c7b){const _0x58fdae=_0x3f0e4e;this[_0x58fdae(0x2c9)][_0x58fdae(0x1a7)](_0x4a1c7b);}[_0x3f0e4e(0x1c8)](_0x3c7559){const _0x88e550=_0x3f0e4e;_0x3c1905(_0x3c7559[_0x88e550(0x1dc)]);}[_0x3f0e4e(0x23c)](_0x2fd3d7){const _0x2c533a=_0x3f0e4e;this[_0x2c533a(0x2cc)]?.[_0x2c533a(0x2a6)](_0x2fd3d7);}[_0x3f0e4e(0x2f3)](){const _0x3b29a6=_0x3f0e4e;this[_0x3b29a6(0x2cc)]?.[_0x3b29a6(0x291)]();}[_0x3f0e4e(0x2af)](){const _0x389fbd=_0x3f0e4e;this[_0x389fbd(0x2cc)]?.[_0x389fbd(0x2d3)]();}[_0x3f0e4e(0x2a5)](_0x59e075){const _0xc57b8e=_0x3f0e4e,[_0x1280cf,_0x2cf66e]=_0x59e075[_0xc57b8e(0x1e5)](':'),_0xa5ff1f=this[_0xc57b8e(0x2cc)][_0xc57b8e(0x1bd)](_0x1280cf),_0x134318=_0xa5ff1f[_0xc57b8e(0x21a)](_0x2cf66e);return{'interaction':_0xa5ff1f,'reply':_0x134318};}[_0x3f0e4e(0x234)](_0x11e5bb,_0x47b532=!0x1){const _0x3bd37a=_0x3f0e4e,_0x12ab49=_0x2b4fc0(this[_0x3bd37a(0x285)]),_0xc2d86b={'target':_0x12ab49[_0x3bd37a(0x224)][_0x3bd37a(0x2eb)][_0x3bd37a(0x219)][_0x3bd37a(0x1a4)](_0x12ab49[_0x3bd37a(0x224)][_0x3bd37a(0x2c2)][_0x3bd37a(0x290)](_0x11e5bb)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x47b532};_0x47b532&&(_0xc2d86b[_0x3bd37a(0x20e)]=!0x0),_0x1596df(_0xc2d86b);}[_0x3f0e4e(0x213)](_0x5213a5,_0x4b45a5=!0x1){const _0x3553e6=_0x3f0e4e;this[_0x3553e6(0x2c9)][_0x3553e6(0x2e2)](_0x5213a5||_0x3610a1(this[_0x3553e6(0x285)][_0x3553e6(0x245)],_0x3553e6(0x1e3)),_0x4b45a5);}async[_0x3f0e4e(0x240)]({reply:_0x1ab284,renderingStrategy:_0x4610b7}){const _0x2bee50=_0x3f0e4e,{id:_0x1f48ed,isDone:_0x21bc9b,type:_0x4ca68b,parsedContent:_0x57298f}=_0x1ab284;if(_0x2bee50(0x1e2)===_0x4ca68b){const _0x2e9d0b=_0x1ab284[_0x2bee50(0x222)]({'showDiff':this[_0x2bee50(0x2c9)][_0x2bee50(0x208)]});await this[_0x2bee50(0x2c9)][_0x2bee50(0x2de)]({'id':_0x1f48ed,'parts':_0x2e9d0b,'renderingStrategy':_0x4610b7,'isDone':_0x21bc9b});}else _0x2bee50(0x2ee)===_0x4ca68b&&await this[_0x2bee50(0x2c9)][_0x2bee50(0x2ce)]({'id':_0x1f48ed,'parsedContent':_0x57298f,'renderingStrategy':_0x4610b7,'isDone':_0x21bc9b});_0x21bc9b&&_0x1ab284[_0x2bee50(0x2cd)][_0x2bee50(0x2f1)]>0x0&&this[_0x2bee50(0x2c9)][_0x2bee50(0x1b8)](_0x1f48ed,_0x1ab284[_0x2bee50(0x2cd)]);}async[_0x3f0e4e(0x23f)](){const _0x5f4240=_0x3f0e4e,_0x9ad1d3=this[_0x5f4240(0x2cc)]?.[_0x5f4240(0x27b)];_0x9ad1d3&&(_0x9ad1d3[_0x5f4240(0x296)](),this[_0x5f4240(0x2c9)][_0x5f4240(0x1fe)](_0x9ad1d3));}async[_0x3f0e4e(0x21e)](){const _0x5a599a=_0x3f0e4e,_0x37582d=this[_0x5a599a(0x2cc)]?.[_0x5a599a(0x27b)];if(_0x37582d){for await(const _0xc4a0b6 of _0x37582d[_0x5a599a(0x29a)])await this[_0x5a599a(0x240)]({'reply':_0xc4a0b6,'renderingStrategy':_0x5a599a(0x220)});}}[_0x3f0e4e(0x197)](_0x248e03){const _0x56c426=_0x3f0e4e,_0x3cbb00={'positiveCount':_0x248e03[_0x56c426(0x28b)][_0x56c426(0x242)](_0x4ec366=>_0x56c426(0x1aa)===_0x4ec366[_0x56c426(0x2d8)])[_0x56c426(0x2f1)],'totalCount':_0x248e03[_0x56c426(0x28b)][_0x56c426(0x2f1)],'modificationId':_0x248e03['id']},_0x4b833a=this[_0x56c426(0x2cc)][_0x56c426(0x1bd)](_0x248e03[_0x56c426(0x2d1)])[_0x56c426(0x2ac)];this[_0x56c426(0x1a6)][_0x56c426(0x2d5)](this[_0x56c426(0x2cc)]['id'],_0x4b833a,_0x3cbb00);}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x49c0(_0x30961d,_0x5237db){const _0x3d3605=_0x3d36();return _0x49c0=function(_0x49c0cd,_0x549cc4){_0x49c0cd=_0x49c0cd-0x196;let _0x22dde2=_0x3d3605[_0x49c0cd];return _0x22dde2;},_0x49c0(_0x30961d,_0x5237db);}const _0x5a3453=_0x49c0;(function(_0x279e65,_0x54b2c1){const _0x2e3af7=_0x49c0,_0x567b90=_0x279e65();while(!![]){try{const _0x2f99ec=parseInt(_0x2e3af7(0x1b4))/0x1*(parseInt(_0x2e3af7(0x200))/0x2)+parseInt(_0x2e3af7(0x214))/0x3+parseInt(_0x2e3af7(0x220))/0x4*(-parseInt(_0x2e3af7(0x1e7))/0x5)+parseInt(_0x2e3af7(0x215))/0x6*(parseInt(_0x2e3af7(0x1db))/0x7)+parseInt(_0x2e3af7(0x1d7))/0x8*(parseInt(_0x2e3af7(0x1c5))/0x9)+-parseInt(_0x2e3af7(0x229))/0xa+parseInt(_0x2e3af7(0x1a1))/0xb*(-parseInt(_0x2e3af7(0x1ba))/0xc);if(_0x2f99ec===_0x54b2c1)break;else _0x567b90['push'](_0x567b90['shift']());}catch(_0x167422){_0x567b90['push'](_0x567b90['shift']());}}}(_0x3d36,0xd3cdd));import{ContextPlugin as _0x4f74fa}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x4cb9b6}from'ckeditor5/src/utils.js';import{AIChatView as _0xaf56bf}from'./ui/aichatview.js';import{AITabs as _0x291215}from'../aitabs/aitabs.js';import{getTranslation as _0x5f2058}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x1b61c3}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x38bc1b}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xc426c9}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x470759}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x44b991}from'../aicore/utils/geteditorfromcontext.js';function _0x3d36(){const _0x3aad4a=['92WrzcmT','_getInputPlaceholder','ai-suggestion-reply','availableModels','addFeedInteractionHeader','startAutoScroll','addContextItem','removeFeedInteraction','pluginName','closeSourceResourceBalloon','showDiff','view','isMaximized','then','feedItemRenderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','values','isWebSearchEnabled','createConversation','_promiseQueue','4362735ZrLSdA','98334cIBdSw','enableModelSelector','updateSuggestionItem','streaming','addFeedItemError','enqueue','options','updateFeedInteractionHeader','queueEmptyPromise','setConversationContext','interaction-header','32jmjLNL','displayedPrompt','setWebSearch','stopInteraction','label','setSelectedModel','insertSuggestion','addFeedItemStaticMessage','disableModelSelector','16651230KgALAp','setContextItemLoading','contextItems','areActionsDisabled','filter','value','destroy','capabilities','setConversationTitle','_view','addFeedItemAISuggestion','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','get','setLoadingMessage','isDone','AIChatUI','ai.chat.context.searchInputVisibleFrom','scrollFeedToSuggestion','isPremiumPlugin','updateFeedItemAIReplySuggestionContent','clear','setFeedItemRenderingStrategy','isBusy','conversation-start','error-message','setAddContextOptions','AI_CHAT_HEADING','finishInteraction','ai-reply','</p>','clearConversationContextUI','_titleAnimationInterval','userMessage','4898366iZCTDY','updateReplyItem','toggleLoadingSkeleton','ai.availableReplyActions','isVisible','getItemIds','isPending','quickActionData','TrackChanges','toggleSuggestionDisplayMode','set','commands','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','length','chatControls','removeItem','user-message','resetConversationTitle','setIsUploadInProgress','30188ahtXrS','find','enableControls','markItemAsDone','AITabs','setIsMaximized','36fRAEpl','setReasoning','resetMessageInput','populateSourceResourceBalloon','updateSuggestionPartState','_animateConversationTitle','isReasoningEnabled','<p>','AI_CHAT_WELCOME_MESSAGE','isLoading','renderingStrategy','72dzVsrT','isOfficialPlugin','setInputPlaceholder','has','children','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','updateFeedItemAIReplySources','scrollToSuggestion','isTrackChangesOn','startInteraction','updateFeedItemAIReplySuggestionPartState','startsWith','bind','last','context','updateWebSources','showResizeButton','remove','256136zHTNLL','chat','addFeedItemUserMessage','plugins','651vhcruO','forEach','_isTrackChangesCommandValueBound','stopAutoScroll','clearPendingContextUI','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','updateCapabilities','interactionId','updateFeedItemAIReplyContent','requires','isDisabled','chatFeed','471635hmcQoN','setModel','focusPromptInput','updateResourceState','trackChanges','ai.chat.models.modelSelectorAlwaysVisible','chatHeader','setModelList','_getLoadingMessage','_interactionPromiseResolver','delegate','markFeedItemAsDone','abort','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','locale','config','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','addTab','removeContextItem','addFeedItemAIReply','isModelAvailable','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','disableControls','addItem','from'];_0x3d36=function(){return _0x3aad4a;};return _0x3d36();}import{AI_REPLY_ACTIONS as _0x26edaf}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x4f74fa{static get[_0x5a3453(0x1e4)](){return[_0x291215];}[_0x5a3453(0x232)];static get[_0x5a3453(0x208)](){const _0x483a51=_0x5a3453;return _0x483a51(0x238);}static get[_0x5a3453(0x1c6)](){return!0x0;}static get[_0x5a3453(0x23b)](){return!0x0;}[_0x5a3453(0x20e)]=_0x5a3453(0x218);[_0x5a3453(0x20a)]=!0x0;[_0x5a3453(0x213)];[_0x5a3453(0x1f0)];[_0x5a3453(0x19f)]=void 0x0;[_0x5a3453(0x1dd)]=!0x1;constructor(_0x378371){const _0x4e2ed0=_0x5a3453;super(_0x378371);const _0x49f77b=this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1da)][_0x4e2ed0(0x235)](_0x4e2ed0(0x1b8));this[_0x4e2ed0(0x1ab)](_0x4e2ed0(0x196),!0x1),this[_0x4e2ed0(0x213)]=new _0xc426c9(),this[_0x4e2ed0(0x232)]=new _0xaf56bf(this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f5)],{'showResizeButton':_0x49f77b[_0x4e2ed0(0x1d5)],'contextResourcesSearchInputVisibleFrom':this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f6)][_0x4e2ed0(0x235)](_0x4e2ed0(0x239))}),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1f1)](..._0x470759)['to'](this),this[_0x4e2ed0(0x232)]['on'](_0x4e2ed0(0x1aa),(_0x2c5a16,{showDiff:_0x102970})=>{const _0x28d5f3=_0x4e2ed0;this[_0x28d5f3(0x20a)]=_0x102970;}),_0x49f77b[_0x4e2ed0(0x20b)][_0x4e2ed0(0x1f8)]({'id':_0x4e2ed0(0x1d8),'buttonLabel':_0x5f2058(this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f5)],_0x4e2ed0(0x19a)),'buttonIcon':_0x1b61c3,'order':0x0,'content':this[_0x4e2ed0(0x232)]}),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)][_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1c3))['to'](this,_0x4e2ed0(0x196),_0x15cfe2=>_0x15cfe2),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1e6)][_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1a7))['to'](this,_0x4e2ed0(0x196),_0x2a3d3a=>_0x2a3d3a),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)][_0x4e2ed0(0x1c7)](this[_0x4e2ed0(0x201)]()),this[_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1fb))['to'](this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)],_0x4e2ed0(0x1fb));}[_0x5a3453(0x22f)](){const _0x27a42f=_0x5a3453;super[_0x27a42f(0x22f)](),this[_0x27a42f(0x19f)]&&clearInterval(this[_0x27a42f(0x19f)]);}[_0x5a3453(0x212)](_0x4e5c6c){const _0x2cda92=_0x5a3453;this[_0x2cda92(0x232)][_0x2cda92(0x1e6)][_0x2cda92(0x23d)](),this[_0x2cda92(0x232)][_0x2cda92(0x1af)][_0x2cda92(0x216)](),this[_0x2cda92(0x232)][_0x2cda92(0x1af)][_0x2cda92(0x1ee)](_0x4e5c6c[_0x2cda92(0x203)],!this[_0x2cda92(0x1d3)][_0x2cda92(0x1f6)][_0x2cda92(0x235)](_0x2cda92(0x1ec))),this[_0x2cda92(0x227)]({'id':_0x2cda92(0x197),'staticMessage':_0x5f2058(this[_0x2cda92(0x1d3)][_0x2cda92(0x1f5)],_0x2cda92(0x1c2))});}[_0x5a3453(0x227)]({id:_0x4feafb,staticMessage:_0x1ffbc7}){const _0x22159e=_0x5a3453;this[_0x22159e(0x232)][_0x22159e(0x1e6)][_0x22159e(0x1fe)](_0x22159e(0x19c),{'id':_0x4feafb,'initialContent':_0x22159e(0x1c1)+_0x1ffbc7+_0x22159e(0x19d)});}[_0x5a3453(0x1d9)](_0x3d9465){const _0x1f2353=_0x5a3453,_0x284067=_0x3d9465[_0x1f2353(0x1a8)]?.[_0x1f2353(0x221)]||_0x3d9465[_0x1f2353(0x1a0)];this[_0x1f2353(0x232)][_0x1f2353(0x1e6)][_0x1f2353(0x1fe)](_0x1f2353(0x1b1),{'contextItems':Array[_0x1f2353(0x1ff)](_0x3d9465[_0x1f2353(0x22b)][_0x1f2353(0x210)]()),'initialContent':_0x1f2353(0x1c1)+_0x284067+_0x1f2353(0x19d),'id':_0x3d9465['id']});}[_0x5a3453(0x219)]({errorMessage:_0x4d45cc,id:_0x84463b}){const _0x6323ce=_0x5a3453;this[_0x6323ce(0x232)][_0x6323ce(0x1e6)][_0x6323ce(0x1fe)](_0x6323ce(0x198),{'initialContent':_0x6323ce(0x1c1)+_0x4d45cc+_0x6323ce(0x19d),'id':_0x84463b});}[_0x5a3453(0x1fa)](_0x506f1d){const _0x223256=_0x5a3453;return this[_0x223256(0x213)][_0x223256(0x21a)](async()=>{const _0x1c9d33=_0x223256;this[_0x1c9d33(0x232)][_0x1c9d33(0x1e6)][_0x1c9d33(0x1fe)](_0x1c9d33(0x19c),{'id':_0x506f1d[_0x1c9d33(0x1e2)]+':'+_0x506f1d['id']}),this[_0x1c9d33(0x236)](null);});}async[_0x5a3453(0x233)](_0x52d3e5){const _0x331503=_0x5a3453,_0x437128=_0x44b991(this[_0x331503(0x1d3)]);let _0x283f0f=_0x437128[_0x331503(0x1f6)][_0x331503(0x235)](_0x331503(0x1a4))||[..._0x26edaf];if(_0x437128[_0x331503(0x1da)][_0x331503(0x1c8)](_0x331503(0x1a9))){if(!this[_0x331503(0x1dd)]){this[_0x331503(0x1dd)]=!0x0;const _0x497c2f=_0x437128[_0x331503(0x1ac)][_0x331503(0x235)](_0x331503(0x1eb));this[_0x331503(0x232)][_0x331503(0x1e6)][_0x331503(0x1d1)](_0x331503(0x1cd))['to'](_0x497c2f,_0x331503(0x22e));}}else _0x283f0f=_0x283f0f[_0x331503(0x22d)](_0x4ca99f=>_0x331503(0x226)!=_0x4ca99f);return this[_0x331503(0x213)][_0x331503(0x21a)](async()=>{const _0x4a12b5=_0x331503;this[_0x4a12b5(0x232)][_0x4a12b5(0x1e6)][_0x4a12b5(0x1fe)](_0x4a12b5(0x202),{'id':_0x52d3e5[_0x4a12b5(0x1e2)]+':'+_0x52d3e5['id'],'areActionsDisabled':_0x52d3e5[_0x4a12b5(0x22c)],'showDiff':this[_0x4a12b5(0x20a)],'availableActions':_0x283f0f}),this[_0x4a12b5(0x236)](null);});}[_0x5a3453(0x204)](_0xf0c9df,_0x36746b){const _0x3087b1=_0x5a3453,_0x34cb33=this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1c9)][_0x3087b1(0x1d2)];if(_0x34cb33 instanceof _0x38bc1b)return this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1c9)][_0x3087b1(0x1d6)](_0x34cb33),void this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1fe)](_0x3087b1(0x21f),{'id':_0xf0c9df['id'],'capabilities':{'isWebSearchEnabled':_0x34cb33[_0x3087b1(0x230)][_0x3087b1(0x211)]||_0x36746b[_0x3087b1(0x211)],'isReasoningEnabled':_0x34cb33[_0x3087b1(0x230)][_0x3087b1(0x1c0)]||_0x36746b[_0x3087b1(0x1c0)]}});this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1fe)](_0x3087b1(0x21f),{'id':_0xf0c9df['id'],'capabilities':_0x36746b});}[_0x5a3453(0x21c)](_0x3d97f4){const _0x3ce151=_0x5a3453,_0x30c185=this[_0x3ce151(0x232)][_0x3ce151(0x1e6)][_0x3ce151(0x1c9)][_0x3ce151(0x1b5)](_0x580a04=>_0x580a04[_0x3ce151(0x21b)]['id']==_0x3d97f4['id']&&_0x580a04 instanceof _0x38bc1b);_0x30c185&&_0x30c185[_0x3ce151(0x1ab)](_0x3ce151(0x1a5),_0x3d97f4[_0x3ce151(0x1a5)]);}async[_0x5a3453(0x1e3)](_0x448809){const _0x122e8c=_0x5a3453,_0x416b6f=_0x448809[_0x122e8c(0x1c4)]||this[_0x122e8c(0x20e)];return this[_0x122e8c(0x213)][_0x122e8c(0x21a)](async _0x32372d=>{const _0x56b580=_0x122e8c;await this[_0x56b580(0x232)][_0x56b580(0x1e6)][_0x56b580(0x1a2)]({..._0x448809,'abortSignal':_0x32372d,'renderingStrategy':_0x416b6f}),_0x448809[_0x56b580(0x237)]&&this[_0x56b580(0x1f2)](_0x448809['id']);});}[_0x5a3453(0x1cb)](_0xfee93b,_0x576dae){const _0xd0c0ab=_0x5a3453;this[_0xd0c0ab(0x232)][_0xd0c0ab(0x1e6)][_0xd0c0ab(0x1d4)](_0xfee93b,_0x576dae);}async[_0x5a3453(0x23c)](_0x25a200){const _0x4430a3=_0x5a3453,_0x4eb041=_0x25a200[_0x4430a3(0x1c4)]||this[_0x4430a3(0x20e)];return this[_0x4430a3(0x213)][_0x4430a3(0x21a)](async _0x5cd998=>{const _0x237e1b=_0x4430a3;await this[_0x237e1b(0x232)][_0x237e1b(0x1e6)][_0x237e1b(0x217)]({..._0x25a200,'abortSignal':_0x5cd998,'renderingStrategy':_0x4eb041}),_0x25a200[_0x237e1b(0x237)]&&this[_0x237e1b(0x1f2)](_0x25a200['id']);});}[_0x5a3453(0x1cf)](_0x350150){const _0x31f01b=_0x5a3453;this[_0x31f01b(0x232)][_0x31f01b(0x1e6)][_0x31f01b(0x1be)](_0x350150);}[_0x5a3453(0x1f2)](_0x395c94){const _0x930dfa=_0x5a3453;this[_0x930dfa(0x232)][_0x930dfa(0x1e6)][_0x930dfa(0x1b7)](_0x395c94);}[_0x5a3453(0x207)](_0x20145c){const _0x58e967=_0x5a3453;this[_0x58e967(0x232)][_0x58e967(0x1e6)][_0x58e967(0x1a6)]()[_0x58e967(0x22d)](_0x16d5f6=>_0x16d5f6[_0x58e967(0x1d0)](_0x20145c))[_0x58e967(0x1dc)](_0x3f10c5=>this[_0x58e967(0x232)][_0x58e967(0x1e6)][_0x58e967(0x1b0)](_0x3f10c5));}[_0x5a3453(0x1ce)](){const _0x3b13f1=_0x5a3453;this[_0x3b13f1(0x236)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x3b13f1(0x232)][_0x3b13f1(0x1af)][_0x3b13f1(0x228)](!this[_0x3b13f1(0x1d3)][_0x3b13f1(0x1f6)][_0x3b13f1(0x235)](_0x3b13f1(0x1ec))),this[_0x3b13f1(0x196)]=!0x0,this[_0x3b13f1(0x232)][_0x3b13f1(0x1e6)][_0x3b13f1(0x205)]();}[_0x5a3453(0x223)](_0x59338c){const _0x552ecc=_0x5a3453;this[_0x552ecc(0x213)][_0x552ecc(0x1f3)](),this[_0x552ecc(0x232)][_0x552ecc(0x1e6)][_0x552ecc(0x1a6)]()[_0x552ecc(0x22d)](_0x8f0e01=>_0x8f0e01[_0x552ecc(0x1d0)](_0x59338c['id']))[_0x552ecc(0x1dc)](_0x4f929a=>this[_0x552ecc(0x1f2)](_0x4f929a)),this[_0x552ecc(0x196)]=!0x1,this[_0x552ecc(0x232)][_0x552ecc(0x1e6)][_0x552ecc(0x1de)]();}async[_0x5a3453(0x19b)](){const _0x4942c2=_0x5a3453;return this[_0x4942c2(0x213)][_0x4942c2(0x21d)][_0x4942c2(0x20d)](()=>{const _0x219ecf=_0x4942c2;this[_0x219ecf(0x196)]=!0x1,this[_0x219ecf(0x232)][_0x219ecf(0x1e6)][_0x219ecf(0x1de)]();});}[_0x5a3453(0x206)](_0x416338,_0x594c21){const _0x34eadc=_0x5a3453;this[_0x34eadc(0x232)][_0x34eadc(0x1af)][_0x34eadc(0x206)](_0x416338,_0x594c21);}[_0x5a3453(0x1f9)](_0xe344f4){const _0x51fac8=_0x5a3453;this[_0x51fac8(0x232)][_0x51fac8(0x1af)][_0x51fac8(0x1f9)](_0xe344f4);}[_0x5a3453(0x22a)](_0x3f2246,_0x456aeb){const _0xd4ce91=_0x5a3453;this[_0xd4ce91(0x232)][_0xd4ce91(0x1af)][_0xd4ce91(0x22a)](_0x3f2246,_0x456aeb);}[_0x5a3453(0x1b3)](_0x4d0218){const _0x490552=_0x5a3453;this[_0x490552(0x232)][_0x490552(0x1af)][_0x490552(0x1b3)](_0x4d0218);}[_0x5a3453(0x21e)](_0x1868ea){const _0x1499fb=_0x5a3453;this[_0x1499fb(0x232)][_0x1499fb(0x1af)][_0x1499fb(0x21e)](_0x1868ea);}[_0x5a3453(0x1df)](){const _0x58e3d3=_0x5a3453;this[_0x58e3d3(0x232)][_0x58e3d3(0x1af)][_0x58e3d3(0x1df)]();}[_0x5a3453(0x19e)](){const _0x534c2b=_0x5a3453;this[_0x534c2b(0x232)][_0x534c2b(0x1af)][_0x534c2b(0x19e)]();}[_0x5a3453(0x1ea)](_0x57634a,_0x51cc62,_0x33bfb2){const _0x4a78f0=_0x5a3453;this[_0x4a78f0(0x232)][_0x4a78f0(0x1af)][_0x4a78f0(0x1ea)](_0x57634a,_0x51cc62,_0x33bfb2);}[_0x5a3453(0x1bc)](){const _0x53ef53=_0x5a3453;this[_0x53ef53(0x232)][_0x53ef53(0x1af)][_0x53ef53(0x1bc)](),this[_0x53ef53(0x232)][_0x53ef53(0x1af)][_0x53ef53(0x1c7)](this[_0x53ef53(0x201)]());}[_0x5a3453(0x199)](_0x42a9e0){const _0x232aea=_0x5a3453;this[_0x232aea(0x232)][_0x232aea(0x1af)][_0x232aea(0x199)](_0x42a9e0);}[_0x5a3453(0x1e1)](_0x246e16){const _0x44c723=_0x5a3453;this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x222)](_0x246e16[_0x44c723(0x211)]),this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x1bb)](_0x246e16[_0x44c723(0x1c0)]),this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x1c7)](this[_0x44c723(0x201)](_0x246e16));}[_0x5a3453(0x225)](_0x40946c,_0x578437){const _0x482f82=_0x5a3453;this[_0x482f82(0x232)][_0x482f82(0x1af)][_0x482f82(0x1e8)](_0x40946c),_0x578437&&this[_0x482f82(0x232)][_0x482f82(0x1af)][_0x482f82(0x228)](!0x1);}[_0x5a3453(0x23e)](_0x463f85){const _0x101f44=_0x5a3453;this[_0x101f44(0x20e)]=_0x463f85;}[_0x5a3453(0x1a3)](_0x5a80fa){const _0x11b6bf=_0x5a3453;this[_0x11b6bf(0x232)][_0x11b6bf(0x1e6)][_0x11b6bf(0x1a3)](_0x5a80fa);}[_0x5a3453(0x1b2)](){const _0x5bc9de=_0x5a3453;this[_0x5bc9de(0x231)](_0x5f2058(this[_0x5bc9de(0x1d3)][_0x5bc9de(0x1f5)],_0x5bc9de(0x19a)));}[_0x5a3453(0x231)](_0x1bf985,_0x780937=!0x1){const _0x4e8442=_0x5a3453;if(_0x780937&&!_0x4cb9b6()&&_0x1bf985[_0x4e8442(0x1ae)])return this[_0x4e8442(0x232)][_0x4e8442(0x1ed)][_0x4e8442(0x224)]='',void this[_0x4e8442(0x1bf)](_0x1bf985);this[_0x4e8442(0x232)][_0x4e8442(0x1ed)][_0x4e8442(0x224)]=_0x1bf985;}[_0x5a3453(0x236)](_0x2511c2){const _0x3fbd4c=_0x5a3453,_0x20b5ae=this[_0x3fbd4c(0x1ef)](_0x2511c2);this[_0x3fbd4c(0x232)][_0x3fbd4c(0x1e6)][_0x3fbd4c(0x236)](_0x20b5ae);}[_0x5a3453(0x1bf)](_0x10ac0d){const _0x111389=_0x5a3453;let _0x161e0b=0x0;clearInterval(this[_0x111389(0x19f)]),this[_0x111389(0x19f)]=setInterval(()=>{const _0x521426=_0x111389;this[_0x521426(0x232)][_0x521426(0x1ed)][_0x521426(0x224)]=this[_0x521426(0x232)][_0x521426(0x1ed)][_0x521426(0x224)]+_0x10ac0d[_0x161e0b],_0x161e0b++,_0x161e0b===_0x10ac0d[_0x521426(0x1ae)]&&clearInterval(this[_0x521426(0x19f)]);},0x1e);}[_0x5a3453(0x1b9)](_0x17f56a){const _0x4d2e06=_0x5a3453;this[_0x4d2e06(0x232)][_0x4d2e06(0x1ed)][_0x4d2e06(0x20c)]=_0x17f56a;}[_0x5a3453(0x1ef)](_0x2b805b){const _0x475bea=_0x5a3453;return _0x2b805b?_0x2b805b[_0x475bea(0x211)]&&_0x2b805b[_0x475bea(0x1c0)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1ad)):_0x2b805b[_0x475bea(0x211)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1fc)):_0x2b805b[_0x475bea(0x1c0)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1f7)):_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1f4)):'';}[_0x5a3453(0x201)](_0x22d6d0){const _0x396c60=_0x5a3453;return _0x22d6d0?_0x22d6d0[_0x396c60(0x211)]&&_0x22d6d0[_0x396c60(0x1c0)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x1ca)):_0x22d6d0[_0x396c60(0x211)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x1e0)):_0x22d6d0[_0x396c60(0x1c0)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x234)):_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x20f)):_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x20f));}[_0x5a3453(0x1bd)](_0x2a1cda,_0x329f69,_0x55abba,_0x40d47b){const _0x4ec010=_0x5a3453;this[_0x4ec010(0x232)][_0x4ec010(0x1bd)](_0x2a1cda,_0x329f69,_0x55abba,_0x40d47b);}[_0x5a3453(0x209)](_0x5e2e6b){const _0x672891=_0x5a3453;this[_0x672891(0x232)][_0x672891(0x209)](_0x5e2e6b);}[_0x5a3453(0x1e9)](){const _0x40d0b6=_0x5a3453;this[_0x40d0b6(0x232)][_0x40d0b6(0x1af)][_0x40d0b6(0x1e9)]();}[_0x5a3453(0x23a)](_0x1ec7b1,_0x26b563){const _0xc5aa09=_0x5a3453;this[_0xc5aa09(0x232)][_0xc5aa09(0x1e6)][_0xc5aa09(0x1cc)](_0x1ec7b1,_0x26b563);}[_0x5a3453(0x205)](){const _0x15cd10=_0x5a3453;this[_0x15cd10(0x232)][_0x15cd10(0x1e6)][_0x15cd10(0x205)]();}[_0x5a3453(0x1fd)](){const _0x1ca38e=_0x5a3453;this[_0x1ca38e(0x232)][_0x1ca38e(0x1af)][_0x1ca38e(0x1e5)]=!0x0;}[_0x5a3453(0x1b6)](){const _0x2e5daf=_0x5a3453;this[_0x2e5daf(0x232)][_0x2e5daf(0x1af)][_0x2e5daf(0x1e5)]=!0x1;}}
|
|
23
|
+
function _0x5462(_0x11a472,_0x1be880){const _0x66a5bd=_0x66a5();return _0x5462=function(_0x546269,_0x3b9eef){_0x546269=_0x546269-0x1ec;let _0x28e2ae=_0x66a5bd[_0x546269];return _0x28e2ae;},_0x5462(_0x11a472,_0x1be880);}const _0x4c0c2f=_0x5462;(function(_0x292fa4,_0xe9e480){const _0x4d4c64=_0x5462,_0x424ec5=_0x292fa4();while(!![]){try{const _0x511b8a=-parseInt(_0x4d4c64(0x21e))/0x1+-parseInt(_0x4d4c64(0x20a))/0x2+parseInt(_0x4d4c64(0x1f7))/0x3*(-parseInt(_0x4d4c64(0x211))/0x4)+parseInt(_0x4d4c64(0x287))/0x5+-parseInt(_0x4d4c64(0x21d))/0x6*(-parseInt(_0x4d4c64(0x223))/0x7)+parseInt(_0x4d4c64(0x265))/0x8*(parseInt(_0x4d4c64(0x283))/0x9)+parseInt(_0x4d4c64(0x259))/0xa;if(_0x511b8a===_0xe9e480)break;else _0x424ec5['push'](_0x424ec5['shift']());}catch(_0x36dd94){_0x424ec5['push'](_0x424ec5['shift']());}}}(_0x66a5,0xdbc4f));import{ContextPlugin as _0x29c7e0}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x34055f}from'ckeditor5/src/utils.js';import{AIChatView as _0x3cba1f}from'./ui/aichatview.js';import{AITabs as _0x5839cd}from'../aitabs/aitabs.js';import{getTranslation as _0xd99c66}from'../aicore/utils/common-translations.js';function _0x66a5(){const _0x72ea18=['values','streaming','_getInputPlaceholder','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','78638cbyykw','clearConversationContextUI','setSelectedModel','availableModels','_view','addFeedItemUserMessage','TrackChanges','_interactionPromiseResolver','enqueue','disableModelSelector','bind','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','clearPendingContextUI','isBusy','isPending','setAddContextOptions','ai.availableReplyActions','abort','_getLoadingMessage','filter','resetMessageInput','last','setFeedItemRenderingStrategy','addContextItem','focusPromptInput','isReasoningEnabled','setWebSearch','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','has','removeItem','enableControls','setConversationContext','clear','AI_CHAT_WELCOME_MESSAGE','isDisabled','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplyContent','feedItemRenderingStrategy','closeSourceResourceBalloon','get','ai.chat.context.searchInputVisibleFrom','queueEmptyPromise','setModel','updateFeedInteractionHeader','user-message','error-message','updateCapabilities','label','set','stopInteraction','setReasoning','createConversation','destroy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','22906010zeuLby','plugins','isVisible','isPremiumPlugin','renderingStrategy','updateSuggestionItem','<p>','toggleSuggestionDisplayMode','setLoadingMessage','ai-suggestion-reply','conversation-start','pluginName','344CKbynn','isMaximized','displayedPrompt','length','chat','setConversationTitle','find','_isTrackChangesCommandValueBound','interaction-header','resetConversationTitle','removeContextItem','ai-reply','stopAutoScroll','_animateConversationTitle','_promiseQueue','quickActionData','markFeedItemAsDone','updateFeedItemAIReplySuggestionPartState','AIChatUI','delegate','remove','chatControls','isModelAvailable','locale','addItem','showDiff','AITabs','finishInteraction','updateResourceState','setIsUploadInProgress','297639WrMwaf','setIsMaximized','</p>','populateSourceResourceBalloon','11060XbBDKG','addFeedItemAISuggestion','chatFeed','insertSuggestion','ai.chat.models.modelSelectorAlwaysVisible','addFeedItemAIReply','updateSuggestionPartState','addFeedItemStaticMessage','AI_CHAT_HEADING','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','contextItems','isLoading','isOfficialPlugin','toggleLoadingSkeleton','requires','startAutoScroll','startsWith','addFeedInteractionHeader','_titleAnimationInterval','disableControls','context','isTrackChangesOn','view','333NxkJqH','setInputPlaceholder','config','getItemIds','from','interactionId','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','scrollFeedToSuggestion','chatHeader','updateFeedItemAIReplySources','addFeedItemError','removeFeedInteraction','scrollToSuggestion','value','isDone','markItemAsDone','setModelList','capabilities','startInteraction','2024666ShZGrg','isWebSearchEnabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','forEach','updateReplyItem','updateWebSources','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','25364cmPUMc','options','addTab','areActionsDisabled','commands','children','showResizeButton','enableModelSelector','setContextItemLoading','trackChanges','userMessage','then','366TXNYYc','1783781cjdknZ'];_0x66a5=function(){return _0x72ea18;};return _0x66a5();}import{IconAIChat as _0x32615d}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x4f1eb9}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x5b4db5}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x54c5e5}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x1563ee}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0xe07d54}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x29c7e0{static get[_0x4c0c2f(0x1ee)](){return[_0x5839cd];}[_0x4c0c2f(0x227)];static get[_0x4c0c2f(0x264)](){const _0x223d9a=_0x4c0c2f;return _0x223d9a(0x277);}static get[_0x4c0c2f(0x1ec)](){return!0x0;}static get[_0x4c0c2f(0x25c)](){return!0x0;}[_0x4c0c2f(0x248)]=_0x4c0c2f(0x220);[_0x4c0c2f(0x27e)]=!0x0;[_0x4c0c2f(0x273)];[_0x4c0c2f(0x22a)];[_0x4c0c2f(0x1f2)]=void 0x0;[_0x4c0c2f(0x26c)]=!0x1;constructor(_0x3c41cb){const _0x2b5490=_0x4c0c2f;super(_0x3c41cb);const _0x175086=this[_0x2b5490(0x1f4)][_0x2b5490(0x25a)][_0x2b5490(0x24a)](_0x2b5490(0x27f));this[_0x2b5490(0x253)](_0x2b5490(0x230),!0x1),this[_0x2b5490(0x273)]=new _0x5b4db5(),this[_0x2b5490(0x227)]=new _0x3cba1f(this[_0x2b5490(0x1f4)][_0x2b5490(0x27c)],{'showResizeButton':_0x175086[_0x2b5490(0x217)],'contextResourcesSearchInputVisibleFrom':this[_0x2b5490(0x1f4)][_0x2b5490(0x1f9)][_0x2b5490(0x24a)](_0x2b5490(0x24b))}),this[_0x2b5490(0x227)][_0x2b5490(0x278)](..._0x54c5e5)['to'](this),this[_0x2b5490(0x227)]['on'](_0x2b5490(0x260),(_0x5b1c3a,{showDiff:_0x4b60c7})=>{const _0x66764c=_0x2b5490;this[_0x66764c(0x27e)]=_0x4b60c7;}),_0x175086[_0x2b5490(0x1f6)][_0x2b5490(0x213)]({'id':_0x2b5490(0x269),'buttonLabel':_0xd99c66(this[_0x2b5490(0x1f4)][_0x2b5490(0x27c)],_0x2b5490(0x28f)),'buttonIcon':_0x32615d,'order':0x0,'content':this[_0x2b5490(0x227)]}),this[_0x2b5490(0x227)][_0x2b5490(0x27a)][_0x2b5490(0x22d)](_0x2b5490(0x292))['to'](this,_0x2b5490(0x230),_0x5dbcda=>_0x5dbcda),this[_0x2b5490(0x227)][_0x2b5490(0x289)][_0x2b5490(0x22d)](_0x2b5490(0x231))['to'](this,_0x2b5490(0x230),_0x3cb5b1=>_0x3cb5b1),this[_0x2b5490(0x227)][_0x2b5490(0x27a)][_0x2b5490(0x1f8)](this[_0x2b5490(0x221)]()),this[_0x2b5490(0x22d)](_0x2b5490(0x27b))['to'](this[_0x2b5490(0x227)][_0x2b5490(0x27a)],_0x2b5490(0x27b));}[_0x4c0c2f(0x257)](){const _0x4d475e=_0x4c0c2f;super[_0x4d475e(0x257)](),this[_0x4d475e(0x1f2)]&&clearInterval(this[_0x4d475e(0x1f2)]);}[_0x4c0c2f(0x256)](_0x24d8dc){const _0x52e5a0=_0x4c0c2f;this[_0x52e5a0(0x227)][_0x52e5a0(0x289)][_0x52e5a0(0x243)](),this[_0x52e5a0(0x227)][_0x52e5a0(0x27a)][_0x52e5a0(0x218)](),this[_0x52e5a0(0x227)][_0x52e5a0(0x27a)][_0x52e5a0(0x207)](_0x24d8dc[_0x52e5a0(0x226)],!this[_0x52e5a0(0x1f4)][_0x52e5a0(0x1f9)][_0x52e5a0(0x24a)](_0x52e5a0(0x28b))),this[_0x52e5a0(0x28e)]({'id':_0x52e5a0(0x263),'staticMessage':_0xd99c66(this[_0x52e5a0(0x1f4)][_0x52e5a0(0x27c)],_0x52e5a0(0x244))});}[_0x4c0c2f(0x28e)]({id:_0x51f3da,staticMessage:_0x2af47e}){const _0x680c1f=_0x4c0c2f;this[_0x680c1f(0x227)][_0x680c1f(0x289)][_0x680c1f(0x27d)](_0x680c1f(0x270),{'id':_0x51f3da,'initialContent':_0x680c1f(0x25f)+_0x2af47e+_0x680c1f(0x285)});}[_0x4c0c2f(0x228)](_0x356b7d){const _0x3e1682=_0x4c0c2f,_0xd7480=_0x356b7d[_0x3e1682(0x274)]?.[_0x3e1682(0x267)]||_0x356b7d[_0x3e1682(0x21b)];this[_0x3e1682(0x227)][_0x3e1682(0x289)][_0x3e1682(0x27d)](_0x3e1682(0x24f),{'contextItems':Array[_0x3e1682(0x1fb)](_0x356b7d[_0x3e1682(0x291)][_0x3e1682(0x21f)]()),'initialContent':_0x3e1682(0x25f)+_0xd7480+_0x3e1682(0x285),'id':_0x356b7d['id']});}[_0x4c0c2f(0x201)]({errorMessage:_0x2c3892,id:_0xdb33dd}){const _0x4d15a2=_0x4c0c2f;this[_0x4d15a2(0x227)][_0x4d15a2(0x289)][_0x4d15a2(0x27d)](_0x4d15a2(0x250),{'initialContent':_0x4d15a2(0x25f)+_0x2c3892+_0x4d15a2(0x285),'id':_0xdb33dd});}[_0x4c0c2f(0x28c)](_0x4c4d97){const _0x1d8d82=_0x4c0c2f;return this[_0x1d8d82(0x273)][_0x1d8d82(0x22b)](async()=>{const _0x39c930=_0x1d8d82;this[_0x39c930(0x227)][_0x39c930(0x289)][_0x39c930(0x27d)](_0x39c930(0x270),{'id':_0x4c4d97[_0x39c930(0x1fc)]+':'+_0x4c4d97['id']}),this[_0x39c930(0x261)](null);});}async[_0x4c0c2f(0x288)](_0x2a9230){const _0x1e10db=_0x4c0c2f,_0x268c43=_0x1563ee(this[_0x1e10db(0x1f4)]);let _0xfc3891=_0x268c43[_0x1e10db(0x1f9)][_0x1e10db(0x24a)](_0x1e10db(0x233))||[..._0xe07d54];if(_0x268c43[_0x1e10db(0x25a)][_0x1e10db(0x23f)](_0x1e10db(0x229))){if(!this[_0x1e10db(0x26c)]){this[_0x1e10db(0x26c)]=!0x0;const _0xd38915=_0x268c43[_0x1e10db(0x215)][_0x1e10db(0x24a)](_0x1e10db(0x21a));this[_0x1e10db(0x227)][_0x1e10db(0x289)][_0x1e10db(0x22d)](_0x1e10db(0x1f5))['to'](_0xd38915,_0x1e10db(0x204));}}else _0xfc3891=_0xfc3891[_0x1e10db(0x236)](_0x1c51f1=>_0x1e10db(0x28a)!=_0x1c51f1);return this[_0x1e10db(0x273)][_0x1e10db(0x22b)](async()=>{const _0x1e9d5d=_0x1e10db;this[_0x1e9d5d(0x227)][_0x1e9d5d(0x289)][_0x1e9d5d(0x27d)](_0x1e9d5d(0x262),{'id':_0x2a9230[_0x1e9d5d(0x1fc)]+':'+_0x2a9230['id'],'areActionsDisabled':_0x2a9230[_0x1e9d5d(0x214)],'showDiff':this[_0x1e9d5d(0x27e)],'availableActions':_0xfc3891}),this[_0x1e9d5d(0x261)](null);});}[_0x4c0c2f(0x1f1)](_0x1c0c05,_0x13e3fd){const _0x533447=_0x4c0c2f,_0x18ef3e=this[_0x533447(0x227)][_0x533447(0x289)][_0x533447(0x216)][_0x533447(0x238)];if(_0x18ef3e instanceof _0x4f1eb9)return this[_0x533447(0x227)][_0x533447(0x289)][_0x533447(0x216)][_0x533447(0x279)](_0x18ef3e),void this[_0x533447(0x227)][_0x533447(0x289)][_0x533447(0x27d)](_0x533447(0x26d),{'id':_0x1c0c05['id'],'capabilities':{'isWebSearchEnabled':_0x18ef3e[_0x533447(0x208)][_0x533447(0x20b)]||_0x13e3fd[_0x533447(0x20b)],'isReasoningEnabled':_0x18ef3e[_0x533447(0x208)][_0x533447(0x23c)]||_0x13e3fd[_0x533447(0x23c)]}});this[_0x533447(0x227)][_0x533447(0x289)][_0x533447(0x27d)](_0x533447(0x26d),{'id':_0x1c0c05['id'],'capabilities':_0x13e3fd});}[_0x4c0c2f(0x24e)](_0x19fe63){const _0x1493d8=_0x4c0c2f,_0x8e5fd6=this[_0x1493d8(0x227)][_0x1493d8(0x289)][_0x1493d8(0x216)][_0x1493d8(0x26b)](_0x2ed906=>_0x2ed906[_0x1493d8(0x212)]['id']==_0x19fe63['id']&&_0x2ed906 instanceof _0x4f1eb9);_0x8e5fd6&&_0x8e5fd6[_0x1493d8(0x253)](_0x1493d8(0x25b),_0x19fe63[_0x1493d8(0x25b)]);}async[_0x4c0c2f(0x247)](_0x46f3f5){const _0x53fd05=_0x4c0c2f,_0x422cc2=_0x46f3f5[_0x53fd05(0x25d)]||this[_0x53fd05(0x248)];return this[_0x53fd05(0x273)][_0x53fd05(0x22b)](async _0x5a4bea=>{const _0xc6106f=_0x53fd05;await this[_0xc6106f(0x227)][_0xc6106f(0x289)][_0xc6106f(0x20e)]({..._0x46f3f5,'abortSignal':_0x5a4bea,'renderingStrategy':_0x422cc2}),_0x46f3f5[_0xc6106f(0x205)]&&this[_0xc6106f(0x275)](_0x46f3f5['id']);});}[_0x4c0c2f(0x200)](_0x2c980a,_0xdcaaef){const _0x38742b=_0x4c0c2f;this[_0x38742b(0x227)][_0x38742b(0x289)][_0x38742b(0x20f)](_0x2c980a,_0xdcaaef);}async[_0x4c0c2f(0x246)](_0x10e7a6){const _0x20e3dd=_0x4c0c2f,_0x3234b6=_0x10e7a6[_0x20e3dd(0x25d)]||this[_0x20e3dd(0x248)];return this[_0x20e3dd(0x273)][_0x20e3dd(0x22b)](async _0xa69024=>{const _0x128472=_0x20e3dd;await this[_0x128472(0x227)][_0x128472(0x289)][_0x128472(0x25e)]({..._0x10e7a6,'abortSignal':_0xa69024,'renderingStrategy':_0x3234b6}),_0x10e7a6[_0x128472(0x205)]&&this[_0x128472(0x275)](_0x10e7a6['id']);});}[_0x4c0c2f(0x276)](_0x4e6ed2){const _0x263f59=_0x4c0c2f;this[_0x263f59(0x227)][_0x263f59(0x289)][_0x263f59(0x28d)](_0x4e6ed2);}[_0x4c0c2f(0x275)](_0x1bca8f){const _0x4408ec=_0x4c0c2f;this[_0x4408ec(0x227)][_0x4408ec(0x289)][_0x4408ec(0x206)](_0x1bca8f);}[_0x4c0c2f(0x202)](_0x1270e1){const _0x2574e4=_0x4c0c2f;this[_0x2574e4(0x227)][_0x2574e4(0x289)][_0x2574e4(0x1fa)]()[_0x2574e4(0x236)](_0xb40419=>_0xb40419[_0x2574e4(0x1f0)](_0x1270e1))[_0x2574e4(0x20d)](_0x6ccfd7=>this[_0x2574e4(0x227)][_0x2574e4(0x289)][_0x2574e4(0x240)](_0x6ccfd7));}[_0x4c0c2f(0x209)](){const _0x2868ba=_0x4c0c2f;this[_0x2868ba(0x261)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x2868ba(0x227)][_0x2868ba(0x27a)][_0x2868ba(0x22c)](!this[_0x2868ba(0x1f4)][_0x2868ba(0x1f9)][_0x2868ba(0x24a)](_0x2868ba(0x28b))),this[_0x2868ba(0x230)]=!0x0,this[_0x2868ba(0x227)][_0x2868ba(0x289)][_0x2868ba(0x1ef)]();}[_0x4c0c2f(0x254)](_0x12f113){const _0x511a0f=_0x4c0c2f;this[_0x511a0f(0x273)][_0x511a0f(0x234)](),this[_0x511a0f(0x227)][_0x511a0f(0x289)][_0x511a0f(0x1fa)]()[_0x511a0f(0x236)](_0x42d44e=>_0x42d44e[_0x511a0f(0x1f0)](_0x12f113['id']))[_0x511a0f(0x20d)](_0x457ee6=>this[_0x511a0f(0x275)](_0x457ee6)),this[_0x511a0f(0x230)]=!0x1,this[_0x511a0f(0x227)][_0x511a0f(0x289)][_0x511a0f(0x271)]();}async[_0x4c0c2f(0x280)](){const _0x52f496=_0x4c0c2f;return this[_0x52f496(0x273)][_0x52f496(0x24c)][_0x52f496(0x21c)](()=>{const _0x26a962=_0x52f496;this[_0x26a962(0x230)]=!0x1,this[_0x26a962(0x227)][_0x26a962(0x289)][_0x26a962(0x271)]();});}[_0x4c0c2f(0x23a)](_0x1f075e,_0x2b15bd){const _0x413552=_0x4c0c2f;this[_0x413552(0x227)][_0x413552(0x27a)][_0x413552(0x23a)](_0x1f075e,_0x2b15bd);}[_0x4c0c2f(0x26f)](_0x15018d){const _0x536ce4=_0x4c0c2f;this[_0x536ce4(0x227)][_0x536ce4(0x27a)][_0x536ce4(0x26f)](_0x15018d);}[_0x4c0c2f(0x219)](_0x3b67a2,_0x14d4b6){const _0xbe759f=_0x4c0c2f;this[_0xbe759f(0x227)][_0xbe759f(0x27a)][_0xbe759f(0x219)](_0x3b67a2,_0x14d4b6);}[_0x4c0c2f(0x282)](_0x4bd22f){const _0x3a49de=_0x4c0c2f;this[_0x3a49de(0x227)][_0x3a49de(0x27a)][_0x3a49de(0x282)](_0x4bd22f);}[_0x4c0c2f(0x242)](_0x3aa154){const _0x1fab4a=_0x4c0c2f;this[_0x1fab4a(0x227)][_0x1fab4a(0x27a)][_0x1fab4a(0x242)](_0x3aa154);}[_0x4c0c2f(0x22f)](){const _0x578874=_0x4c0c2f;this[_0x578874(0x227)][_0x578874(0x27a)][_0x578874(0x22f)]();}[_0x4c0c2f(0x224)](){const _0x4dffc9=_0x4c0c2f;this[_0x4dffc9(0x227)][_0x4dffc9(0x27a)][_0x4dffc9(0x224)]();}[_0x4c0c2f(0x281)](_0x23c8d3,_0x5c6556,_0x4bfcf5){const _0x2153d1=_0x4c0c2f;this[_0x2153d1(0x227)][_0x2153d1(0x27a)][_0x2153d1(0x281)](_0x23c8d3,_0x5c6556,_0x4bfcf5);}[_0x4c0c2f(0x237)](){const _0x5055ff=_0x4c0c2f;this[_0x5055ff(0x227)][_0x5055ff(0x27a)][_0x5055ff(0x237)](),this[_0x5055ff(0x227)][_0x5055ff(0x27a)][_0x5055ff(0x1f8)](this[_0x5055ff(0x221)]());}[_0x4c0c2f(0x232)](_0x21d0a4){const _0xf31120=_0x4c0c2f;this[_0xf31120(0x227)][_0xf31120(0x27a)][_0xf31120(0x232)](_0x21d0a4);}[_0x4c0c2f(0x251)](_0x14cc4a){const _0x4f0245=_0x4c0c2f;this[_0x4f0245(0x227)][_0x4f0245(0x27a)][_0x4f0245(0x23d)](_0x14cc4a[_0x4f0245(0x20b)]),this[_0x4f0245(0x227)][_0x4f0245(0x27a)][_0x4f0245(0x255)](_0x14cc4a[_0x4f0245(0x23c)]),this[_0x4f0245(0x227)][_0x4f0245(0x27a)][_0x4f0245(0x1f8)](this[_0x4f0245(0x221)](_0x14cc4a));}[_0x4c0c2f(0x225)](_0x186792,_0x4bf40d){const _0x1c112c=_0x4c0c2f;this[_0x1c112c(0x227)][_0x1c112c(0x27a)][_0x1c112c(0x24d)](_0x186792),_0x4bf40d&&this[_0x1c112c(0x227)][_0x1c112c(0x27a)][_0x1c112c(0x22c)](!0x1);}[_0x4c0c2f(0x239)](_0x17b348){const _0x1cdd36=_0x4c0c2f;this[_0x1cdd36(0x248)]=_0x17b348;}[_0x4c0c2f(0x1ed)](_0x283343){const _0x54d6fa=_0x4c0c2f;this[_0x54d6fa(0x227)][_0x54d6fa(0x289)][_0x54d6fa(0x1ed)](_0x283343);}[_0x4c0c2f(0x26e)](){const _0x4d7d3c=_0x4c0c2f;this[_0x4d7d3c(0x26a)](_0xd99c66(this[_0x4d7d3c(0x1f4)][_0x4d7d3c(0x27c)],_0x4d7d3c(0x28f)));}[_0x4c0c2f(0x26a)](_0x6e1abe,_0x5b1425=!0x1){const _0x29982=_0x4c0c2f;if(_0x5b1425&&!_0x34055f()&&_0x6e1abe[_0x29982(0x268)])return this[_0x29982(0x227)][_0x29982(0x1ff)][_0x29982(0x252)]='',void this[_0x29982(0x272)](_0x6e1abe);this[_0x29982(0x227)][_0x29982(0x1ff)][_0x29982(0x252)]=_0x6e1abe;}[_0x4c0c2f(0x261)](_0x2c530e){const _0x37f3e0=_0x4c0c2f,_0x10ff3d=this[_0x37f3e0(0x235)](_0x2c530e);this[_0x37f3e0(0x227)][_0x37f3e0(0x289)][_0x37f3e0(0x261)](_0x10ff3d);}[_0x4c0c2f(0x272)](_0xf2f1eb){const _0x30ba41=_0x4c0c2f;let _0xaeac66=0x0;clearInterval(this[_0x30ba41(0x1f2)]),this[_0x30ba41(0x1f2)]=setInterval(()=>{const _0x135cd7=_0x30ba41;this[_0x135cd7(0x227)][_0x135cd7(0x1ff)][_0x135cd7(0x252)]=this[_0x135cd7(0x227)][_0x135cd7(0x1ff)][_0x135cd7(0x252)]+_0xf2f1eb[_0xaeac66],_0xaeac66++,_0xaeac66===_0xf2f1eb[_0x135cd7(0x268)]&&clearInterval(this[_0x135cd7(0x1f2)]);},0x1e);}[_0x4c0c2f(0x284)](_0x2f9594){const _0x1403a7=_0x4c0c2f;this[_0x1403a7(0x227)][_0x1403a7(0x1ff)][_0x1403a7(0x266)]=_0x2f9594;}[_0x4c0c2f(0x235)](_0x1d7c1a){const _0x169270=_0x4c0c2f;return _0x1d7c1a?_0x1d7c1a[_0x169270(0x20b)]&&_0x1d7c1a[_0x169270(0x23c)]?_0xd99c66(this[_0x169270(0x1f4)][_0x169270(0x27c)],_0x169270(0x222)):_0x1d7c1a[_0x169270(0x20b)]?_0xd99c66(this[_0x169270(0x1f4)][_0x169270(0x27c)],_0x169270(0x23e)):_0x1d7c1a[_0x169270(0x23c)]?_0xd99c66(this[_0x169270(0x1f4)][_0x169270(0x27c)],_0x169270(0x290)):_0xd99c66(this[_0x169270(0x1f4)][_0x169270(0x27c)],_0x169270(0x22e)):'';}[_0x4c0c2f(0x221)](_0xda1f3a){const _0x253c5c=_0x4c0c2f;return _0xda1f3a?_0xda1f3a[_0x253c5c(0x20b)]&&_0xda1f3a[_0x253c5c(0x23c)]?_0xd99c66(this[_0x253c5c(0x1f4)][_0x253c5c(0x27c)],_0x253c5c(0x210)):_0xda1f3a[_0x253c5c(0x20b)]?_0xd99c66(this[_0x253c5c(0x1f4)][_0x253c5c(0x27c)],_0x253c5c(0x1fd)):_0xda1f3a[_0x253c5c(0x23c)]?_0xd99c66(this[_0x253c5c(0x1f4)][_0x253c5c(0x27c)],_0x253c5c(0x20c)):_0xd99c66(this[_0x253c5c(0x1f4)][_0x253c5c(0x27c)],_0x253c5c(0x258)):_0xd99c66(this[_0x253c5c(0x1f4)][_0x253c5c(0x27c)],_0x253c5c(0x258));}[_0x4c0c2f(0x286)](_0x22823a,_0x1d8693,_0x16ae9b,_0xfa114f){const _0x390dc2=_0x4c0c2f;this[_0x390dc2(0x227)][_0x390dc2(0x286)](_0x22823a,_0x1d8693,_0x16ae9b,_0xfa114f);}[_0x4c0c2f(0x249)](_0x583a18){const _0x2876df=_0x4c0c2f;this[_0x2876df(0x227)][_0x2876df(0x249)](_0x583a18);}[_0x4c0c2f(0x23b)](){const _0x81d9de=_0x4c0c2f;this[_0x81d9de(0x227)][_0x81d9de(0x27a)][_0x81d9de(0x23b)]();}[_0x4c0c2f(0x1fe)](_0x47cd03,_0x293e73){const _0x8975e8=_0x4c0c2f;this[_0x8975e8(0x227)][_0x8975e8(0x289)][_0x8975e8(0x203)](_0x47cd03,_0x293e73);}[_0x4c0c2f(0x1ef)](){const _0xdf82e4=_0x4c0c2f;this[_0xdf82e4(0x227)][_0xdf82e4(0x289)][_0xdf82e4(0x1ef)]();}[_0x4c0c2f(0x1f3)](){const _0x33fde3=_0x4c0c2f;this[_0x33fde3(0x227)][_0x33fde3(0x27a)][_0x33fde3(0x245)]=!0x0;}[_0x4c0c2f(0x241)](){const _0x8ca0ed=_0x4c0c2f;this[_0x8ca0ed(0x227)][_0x8ca0ed(0x27a)][_0x8ca0ed(0x245)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x49eb93=_0x4b60;(function(_0x18226f,_0x567295){const _0x116593=_0x4b60,_0x3e10c6=_0x18226f();while(!![]){try{const _0x5e675b=-parseInt(_0x116593(0x178))/0x1*(parseInt(_0x116593(0x11e))/0x2)+parseInt(_0x116593(0x182))/0x3*(parseInt(_0x116593(0x10e))/0x4)+-parseInt(_0x116593(0x103))/0x5+parseInt(_0x116593(0x123))/0x6+-parseInt(_0x116593(0x167))/0x7*(-parseInt(_0x116593(0x144))/0x8)+parseInt(_0x116593(0x105))/0x9+-parseInt(_0x116593(0x183))/0xa;if(_0x5e675b===_0x567295)break;else _0x3e10c6['push'](_0x3e10c6['shift']());}catch(_0x47c68c){_0x3e10c6['push'](_0x3e10c6['shift']());}}}(_0x4b89,0xbb8bd));import{CKEditorError as _0x7e5f12,ObservableMixin as _0x1ed34b,uid as _0x5d8ef0}from'ckeditor5/src/utils.js';function _0x4b89(){const _0x4e7ba8=['label','files-','11459rBqZXb','FILE','ai-chat-context-invalid-data','_createContextItemFromContent','getId','get','MARKDOWN','ai-chat-context-unsupported-type','_addContextItem','_finishUploadOperation','files','ai-chat-source-not-found','start','removeSelectionFromContext','addToConversationContext','fetchDocument','urls','47kNipFc','removeFromContext','TEXT','_addContextOptionsState','isCurrentDocumentInConversation','resources','isSelectionInContext','isHidden','updateCurrentDocument','addContextOptionsChanged','12126QwAOrq','4827170FbANin','startsWith','ai-request-aborted','version','HTML','_config','text/markdown','filter','contextItemAdded','abortController','contextSent','_connector','end','contextItemLoadingEnded','1173210mzAzfO','isCurrentDocumentInContext','3222108zLSdxv','object','url-','URL','content','addFilesToContext','stack','ai-chat-document-upload-failed','data','740UkDEvM','has','resourceId','enabled','populateFromMessage','_toggleAddCurrentDocumentOptionVisibility','_ownerId','_conversationContextItems','getSentContextItems','attributes','forEach','_convertTextResourceToFile','type','File','_ongoingUploadOperations','sources','47310gbPtku','ai-chat-source-resources-load-failed','string','text/plain','message','7053660sPYpxR','abort','all','length','file-','text/html','addUrlToContext','_addToConversationContextItem','sourceResourcesLoaded','contextItemRemoved','isReadOnly','size','addResourceToContext','getResources','getPendingContextItems','from','mapContextItemsToRequestData','init','document','hidden','_removeContextItem','ai-chat-resource-load-failed','getData','_ongoingUploads','getDocument','_isResourceInContext','current-document','url','resourceStateChanged','DOCUMENT','uploadFile','ai-chat-resource-no-data','_pendingContextItems','1544iqtbVS','uploadDocument','map','ai-chat-file-upload-failed','delete','push','set','Current\x20document','_findSourceIdsByResourceId','uploadUrl','error','addCurrentDocumentToContext','clearPendingContextItems','values','sessionId','addSelectionToContext','uploadProgressChanged','isInContext','ai-chat-url-upload-failed','object\x20with\x20content\x20and\x20type\x20properties','_getCustomSourcesInitialState','fire','name','_finishContextItemLoading','_setAddContextOptionsDefaultState','SELECTION','_updateResourceInContextState','_startUploadOperation','uiId','find','selection','loadSourceResources','_mapContextItemToRequestData'];_0x4b89=function(){return _0x4e7ba8;};return _0x4b89();}import{AIContextItemType as _0x51c85d,AIContextTextResourceType as _0x541474}from'../../aicore/model/aicontext.js';import{escape as _0xc0b8dd}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x49eb93(0xfd),_0x49eb93(0x12c),_0x49eb93(0x102),_0x49eb93(0xff),_0x49eb93(0x14e),_0x49eb93(0x181),_0x49eb93(0x12b),_0x49eb93(0x13f),_0x49eb93(0x154)];function _0x4b60(_0xec07ef,_0xa7f84e){const _0x4b8966=_0x4b89();return _0x4b60=function(_0x4b6065,_0x4e859d){_0x4b6065=_0x4b6065-0xfb;let _0x1d63ec=_0x4b8966[_0x4b6065];return _0x1d63ec;},_0x4b60(_0xec07ef,_0xa7f84e);}export class AIChatContext extends _0x1ed34b(){[_0x49eb93(0x100)];[_0x49eb93(0x188)];[_0x49eb93(0x114)];constructor({connector:_0x32e611,config:_0x474cbe,ownerId:_0x5186dd}){const _0x2cf429=_0x49eb93;super(),this[_0x2cf429(0x100)]=_0x32e611,this[_0x2cf429(0x188)]=_0x474cbe,this[_0x2cf429(0x114)]=_0x5186dd;}[_0x49eb93(0x134)](){const _0x380cf7=_0x49eb93;this[_0x380cf7(0x143)]=new Map(),this[_0x380cf7(0x115)]=new Map(),this[_0x380cf7(0x13a)]=new Map(),this[_0x380cf7(0x11c)]=new Map(),this[_0x380cf7(0x15c)]();}[_0x49eb93(0x131)](){const _0x41a40f=_0x49eb93;return this[_0x41a40f(0x143)];}async[_0x49eb93(0x112)](_0x4cc3d6){const _0x40eac0=_0x49eb93,_0x328814=await this[_0x40eac0(0x16a)](_0x4cc3d6);return this[_0x40eac0(0x12a)](_0x328814),_0x40eac0(0x13d)===_0x328814[_0x40eac0(0x160)]&&this[_0x40eac0(0x113)](),_0x328814;}async[_0x49eb93(0x16a)](_0x148090){const _0x4ea1e2=_0x49eb93;if(_0x148090[_0x4ea1e2(0x11a)]===_0x51c85d[_0x4ea1e2(0x140)]){const _0x3f8167=await this[_0x4ea1e2(0x100)][_0x4ea1e2(0x176)](this[_0x4ea1e2(0x114)],_0x148090['id'])[_0x4ea1e2(0x13b)]();return{'id':_0x4ea1e2(0x13d),'uiId':_0x4ea1e2(0x13d),'label':_0x4ea1e2(0x14b),'type':_0x148090[_0x4ea1e2(0x11a)],'content':_0x3f8167[_0x4ea1e2(0x109)],'hidden':this[_0x4ea1e2(0x115)][_0x4ea1e2(0x10f)](_0x4ea1e2(0x13d)),'version':_0x3f8167[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x186)],'sessionId':_0x3f8167[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x152)]};}return{'id':_0x148090['id'],'uiId':_0x148090['id'],'label':_0x148090[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x165)]||_0x148090[_0x4ea1e2(0x15a)]||_0x148090[_0x4ea1e2(0x13e)]||_0x148090['id'],'type':_0x148090[_0x4ea1e2(0x11a)],..._0x148090?.[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x110)]?{'resourceId':_0x148090[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x110)]}:{}};}[_0x49eb93(0x116)](){const _0x2f5ec6=_0x49eb93;return new Map(this[_0x2f5ec6(0x115)]);}[_0x49eb93(0x179)](_0xa8b84a){const _0x2c1bb9=_0x49eb93,_0x2d952c=this[_0x2c1bb9(0x143)][_0x2c1bb9(0x16c)](_0xa8b84a);_0x2d952c?.[_0x2c1bb9(0x12d)]||this[_0x2c1bb9(0x137)](_0xa8b84a);}[_0x49eb93(0x150)](){const _0x40b620=_0x49eb93;if(0x0===this[_0x40b620(0x143)][_0x40b620(0x12e)])return;for(const _0x23356c of this[_0x40b620(0x143)][_0x40b620(0x151)]())this[_0x40b620(0x137)](_0x23356c[_0x40b620(0x160)]);const _0xd31ef7=this[_0x40b620(0x115)][_0x40b620(0x16c)](_0x40b620(0x13d))||this[_0x40b620(0x143)][_0x40b620(0x16c)](_0x40b620(0x13d));_0xd31ef7&&this[_0x40b620(0x16f)]({..._0xd31ef7,'isReadOnly':!0x0,'hidden':!0x0});}[_0x49eb93(0x175)](_0xb175ec){const _0x209b89=_0x49eb93;for(const _0x57ecab of _0xb175ec[_0x209b89(0x151)]())this[_0x209b89(0x12a)](_0x57ecab);this[_0x209b89(0x150)](),this[_0x209b89(0x159)](_0x209b89(0xff),{'contextItems':Array[_0x209b89(0x132)](this[_0x209b89(0x116)]()[_0x209b89(0x151)]())});}[_0x49eb93(0x104)](){const _0x508243=_0x49eb93;return this[_0x508243(0x143)][_0x508243(0x10f)](_0x508243(0x13d));}[_0x49eb93(0x17e)](){const _0x396bf4=_0x49eb93;return this[_0x396bf4(0x143)][_0x396bf4(0x10f)](_0x396bf4(0x162));}[_0x49eb93(0x17c)](){const _0x4dc478=_0x49eb93;return this[_0x4dc478(0x115)][_0x4dc478(0x10f)](_0x4dc478(0x13d));}static[_0x49eb93(0x133)](_0x36e8dc){const _0x4f8022=_0x49eb93;return Array[_0x4f8022(0x132)](_0x36e8dc[_0x4f8022(0x151)]())[_0x4f8022(0x146)](_0x5f5be6=>this[_0x4f8022(0x164)](_0x5f5be6))[_0x4f8022(0xfc)](_0x49078b=>null!==_0x49078b);}async[_0x49eb93(0x10a)](_0x7f84b3,_0x5809f9,_0x45f85d=_0x51c85d[_0x49eb93(0x168)]){const _0x2f4f6f=_0x49eb93,_0x158799=_0x2f4f6f(0x166)+_0x5d8ef0();this[_0x2f4f6f(0x15f)](_0x158799);try{await Promise[_0x2f4f6f(0x125)](_0x7f84b3[_0x2f4f6f(0x146)](async _0x3ec497=>{const _0xa0b346=_0x2f4f6f,_0x5a0578=_0xa0b346(0x127)+_0x5d8ef0(),_0x38ee4a=_0xc0b8dd(_0x3ec497[_0xa0b346(0x15a)]);try{this[_0xa0b346(0x16f)]({'type':_0x45f85d,'label':_0x5809f9?.[_0xa0b346(0x165)]||_0x38ee4a,'uiId':_0x5a0578,'resourceId':_0x5809f9?.[_0xa0b346(0x110)]},!0x0);const _0x58a39e=this[_0xa0b346(0x100)][_0xa0b346(0x141)](this[_0xa0b346(0x114)],_0x3ec497,_0x5809f9);this[_0xa0b346(0x13a)][_0xa0b346(0x14a)](_0x5a0578,_0x58a39e[_0xa0b346(0xfe)]);const {id:_0x239ff7}=await _0x58a39e[_0xa0b346(0x16b)]();this[_0xa0b346(0x13a)][_0xa0b346(0x148)](_0x5a0578),this[_0xa0b346(0x15b)]({'type':_0x45f85d,'id':_0x239ff7,'label':_0x5809f9?.[_0xa0b346(0x165)]||_0x38ee4a,'uiId':_0x5a0578,'resourceId':_0x5809f9?.[_0xa0b346(0x110)]},!0x1);}catch(_0x10006f){this[_0xa0b346(0x13a)][_0xa0b346(0x148)](_0x5a0578);if(!_0x10006f[_0xa0b346(0x122)][_0xa0b346(0x184)](_0xa0b346(0x185))){const _0x42b240=new _0x7e5f12(_0xa0b346(0x147),null,{'fileName':_0x38ee4a});_0x42b240[_0xa0b346(0x10b)]=_0x10006f[_0xa0b346(0x10b)],this[_0xa0b346(0x159)](_0xa0b346(0x14e),{'error':_0x42b240,'fileName':_0x38ee4a});}this[_0xa0b346(0x137)](_0x5a0578);}}));}finally{this[_0x2f4f6f(0x170)](_0x158799);}}[_0x49eb93(0x14f)](_0x573a3f){const _0x12e660=_0x49eb93;if(this[_0x12e660(0x104)]())return;const _0x568f6c={'type':_0x51c85d[_0x12e660(0x140)],'uiId':_0x12e660(0x13d),'label':_0x573a3f,'isReadOnly':this[_0x12e660(0x115)][_0x12e660(0x10f)](_0x12e660(0x13d)),'hidden':this[_0x12e660(0x115)][_0x12e660(0x10f)](_0x12e660(0x13d))};this[_0x12e660(0x16f)](_0x568f6c);}async[_0x49eb93(0x180)](_0x1e0988,_0x48521d,_0x5ca5be,_0x45b7e5){const _0x1bc2d9=_0x49eb93,_0x21fae3=this[_0x1bc2d9(0x143)][_0x1bc2d9(0x16c)](_0x1bc2d9(0x13d));if(_0x21fae3&&_0x1e0988){_0x21fae3[_0x1bc2d9(0x162)]=_0x45b7e5?_0x45b7e5[_0x1bc2d9(0x146)](_0x2c9eb9=>({'start':_0x2c9eb9[_0x1bc2d9(0x173)],'end':_0x2c9eb9[_0x1bc2d9(0x101)]})):[];try{if(_0x21fae3[_0x1bc2d9(0x186)]===_0x48521d)return;const {id:_0x1eb75e}=await this[_0x1bc2d9(0x100)][_0x1bc2d9(0x145)](this[_0x1bc2d9(0x114)],_0x1e0988,{'version':_0x48521d,'sessionId':_0x5ca5be})[_0x1bc2d9(0x16b)]();_0x21fae3['id']=_0x1eb75e,_0x21fae3[_0x1bc2d9(0x109)]=_0x1e0988,_0x21fae3[_0x1bc2d9(0x186)]=_0x48521d,_0x21fae3[_0x1bc2d9(0x152)]=_0x5ca5be;}catch(_0x1e33aa){const _0xa061c1=new _0x7e5f12(_0x1bc2d9(0x10c),null);_0xa061c1[_0x1bc2d9(0x10b)]=_0x1e33aa[_0x1bc2d9(0x10b)],this[_0x1bc2d9(0x159)](_0x1bc2d9(0x14e),{'error':_0xa061c1});}}}[_0x49eb93(0x153)](_0x1d1f65){const _0x193175=_0x49eb93;this[_0x193175(0x16f)]({'type':_0x51c85d[_0x193175(0x15d)],'label':_0x1d1f65,'uiId':_0x193175(0x162),'content':_0x1d1f65});}[_0x49eb93(0x174)](){const _0x904bbe=_0x49eb93;this[_0x904bbe(0x137)](_0x904bbe(0x162));}async[_0x49eb93(0x129)](_0x4363c8,_0x5e038f){const _0x155789=_0x49eb93,_0x4f8f94=_0x155789(0x107)+_0x5d8ef0();this[_0x155789(0x15f)](_0x4f8f94);const _0x415b6a=_0x155789(0x107)+_0x5d8ef0();try{this[_0x155789(0x16f)]({'type':_0x51c85d[_0x155789(0x108)],'label':_0x5e038f?.[_0x155789(0x165)]||_0x4363c8,'uiId':_0x415b6a,'resourceId':_0x5e038f?.[_0x155789(0x110)]},!0x0);const _0x345c6e=this[_0x155789(0x100)][_0x155789(0x14d)](this[_0x155789(0x114)],_0x4363c8,_0x5e038f);this[_0x155789(0x13a)][_0x155789(0x14a)](_0x415b6a,_0x345c6e[_0x155789(0xfe)]);const {id:_0x346217}=await _0x345c6e[_0x155789(0x16b)]();this[_0x155789(0x13a)][_0x155789(0x148)](_0x415b6a),this[_0x155789(0x15b)]({'type':_0x51c85d[_0x155789(0x108)],'id':_0x346217,'label':_0x5e038f?.[_0x155789(0x165)]||_0x4363c8,'uiId':_0x415b6a,'resourceId':_0x5e038f?.[_0x155789(0x110)]},!0x1);}catch(_0x3a08af){this[_0x155789(0x13a)][_0x155789(0x148)](_0x415b6a),(_0x3a08af[_0x155789(0x122)][_0x155789(0x184)](_0x155789(0x185))||this[_0x155789(0x159)](_0x155789(0x14e),{'error':new _0x7e5f12(_0x155789(0x156),this,{'url':_0x4363c8,'originalError':_0x3a08af}),'url':_0x4363c8}),this[_0x155789(0x137)](_0x415b6a));}finally{this[_0x155789(0x170)](_0x4f8f94);}}async[_0x49eb93(0x163)](_0x2371dd,_0x42f946,_0x2f99cf){const _0x4d2dda=_0x49eb93,_0x31a669=this[_0x4d2dda(0x17b)][_0x4d2dda(0x11d)][_0x4d2dda(0x161)](_0x4af002=>_0x4af002['id']===_0x2371dd);if(!_0x31a669)return this[_0x4d2dda(0x159)](_0x4d2dda(0x14e),{'error':new _0x7e5f12(_0x4d2dda(0x172),this,{'sourceId':_0x2371dd}),'sourceId':_0x2371dd}),[];try{const _0x330377=(await _0x31a669[_0x4d2dda(0x130)](_0x42f946))[_0x4d2dda(0x146)](_0x2832d6=>{const _0x2649e8=_0x4d2dda,_0x4e236e=this[_0x2649e8(0x13c)](_0x2832d6['id']);return{..._0x2832d6,'isInContext':_0x4e236e};});return _0x31a669[_0x4d2dda(0x17d)]=_0x330377,this[_0x4d2dda(0x159)](_0x4d2dda(0x12b),{'sourceId':_0x2371dd,'source':_0x31a669,'resources':_0x330377,'uid':_0x2f99cf}),_0x330377;}catch(_0x1d98fa){return this[_0x4d2dda(0x159)](_0x4d2dda(0x14e),{'error':new _0x7e5f12(_0x4d2dda(0x11f),this,{'sourceId':_0x2371dd,'originalError':_0x1d98fa}),'sourceId':_0x2371dd,'sourceLabel':_0x31a669[_0x4d2dda(0x165)]}),[];}}async[_0x49eb93(0x12f)](_0x4bbc64,_0x2949c4){const _0x56f327=_0x49eb93;if(this[_0x56f327(0x13c)](_0x2949c4['id']))return;let _0x59165f=_0x2949c4[_0x56f327(0x10d)];if(!_0x59165f&&_0x4bbc64[_0x56f327(0x139)])try{_0x59165f=await _0x4bbc64[_0x56f327(0x139)](_0x2949c4['id']);}catch(_0x477e01){return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x138),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'originalError':_0x477e01}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}if(_0x59165f)switch(_0x2949c4[_0x56f327(0x11a)]){case _0x51c85d[_0x56f327(0x108)]:if(_0x56f327(0x120)!=typeof _0x59165f)return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x120),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});await this[_0x56f327(0x129)](_0x59165f,{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']});break;case _0x51c85d[_0x56f327(0x168)]:if(!(_0x59165f instanceof File))return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x11b),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});await this[_0x56f327(0x10a)]([_0x59165f],{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']});break;case _0x51c85d[_0x56f327(0x17a)]:if(_0x56f327(0x106)!=typeof _0x59165f||!(_0x56f327(0x109)in _0x59165f)||!(_0x56f327(0x11a)in _0x59165f))return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x157),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});_0x59165f=AIChatContext[_0x56f327(0x119)](_0x59165f,_0x2949c4[_0x56f327(0x165)]),await this[_0x56f327(0x10a)]([_0x59165f],{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']},_0x51c85d[_0x56f327(0x17a)]);break;default:this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x16e),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'resourceType':_0x2949c4[_0x56f327(0x11a)]}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}else this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x142),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}static[_0x49eb93(0x119)](_0x19bd0b,_0x39a60a){const _0x1f1601=_0x49eb93;switch(_0x19bd0b[_0x1f1601(0x11a)]){case _0x541474[_0x1f1601(0x16d)]:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0xfb)});case _0x541474[_0x1f1601(0x187)]:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0x128)});default:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0x121)});}}static[_0x49eb93(0x164)](_0xf1ac02){const _0x165f5e=_0x49eb93;switch(_0xf1ac02[_0x165f5e(0x11a)]){case _0x51c85d[_0x165f5e(0x168)]:return{'type':_0x51c85d[_0x165f5e(0x168)],'id':_0xf1ac02['id']};case _0x51c85d[_0x165f5e(0x108)]:return{'type':_0x51c85d[_0x165f5e(0x108)],'id':_0xf1ac02['id']};case _0x51c85d[_0x165f5e(0x140)]:return{'type':_0x51c85d[_0x165f5e(0x140)],'id':_0xf1ac02['id'],..._0xf1ac02[_0x165f5e(0x162)]?.[_0x165f5e(0x126)]&&{'selection':_0xf1ac02[_0x165f5e(0x162)]}};case _0x51c85d[_0x165f5e(0x17a)]:return{'type':_0x51c85d[_0x165f5e(0x168)],'id':_0xf1ac02['id']};default:return null;}}[_0x49eb93(0x16f)](_0xe23830,_0x7ffce7=!0x1){const _0x662acf=_0x49eb93;if(this[_0x662acf(0x143)][_0x662acf(0x14a)](_0xe23830[_0x662acf(0x160)],_0xe23830),_0xe23830[_0x662acf(0x136)]||this[_0x662acf(0x159)](_0x662acf(0xfd),{'contextItem':_0xe23830,'isLoading':_0x7ffce7}),_0x662acf(0x13d)===_0xe23830[_0x662acf(0x160)]&&this[_0x662acf(0x113)](),_0xe23830[_0x662acf(0x110)]){const _0x57be4d=this[_0x662acf(0x14c)](_0xe23830[_0x662acf(0x110)]);_0x57be4d&&_0x57be4d[_0x662acf(0x118)](_0x2edf1f=>{const _0x1f60c2=_0x662acf;this[_0x1f60c2(0x15e)](_0x2edf1f,_0xe23830[_0x1f60c2(0x110)],!0x0);});}}[_0x49eb93(0x137)](_0x504ea6){const _0x210609=_0x49eb93,_0x21db22=this[_0x210609(0x143)][_0x210609(0x16c)](_0x504ea6),_0x45a6af=this[_0x210609(0x13a)][_0x210609(0x16c)](_0x504ea6);if(_0x45a6af&&(_0x45a6af[_0x210609(0x124)](),this[_0x210609(0x13a)][_0x210609(0x148)](_0x504ea6)),_0x21db22?.[_0x210609(0x110)]){const _0x15f77d=this[_0x210609(0x14c)](_0x21db22[_0x210609(0x110)]);_0x15f77d&&_0x15f77d[_0x210609(0x118)](_0x34008e=>{const _0x1fa69b=_0x210609;this[_0x1fa69b(0x15e)](_0x34008e,_0x21db22[_0x1fa69b(0x110)],!0x1);});}this[_0x210609(0x143)][_0x210609(0x148)](_0x504ea6),this[_0x210609(0x159)](_0x210609(0x12c),{'uiId':_0x504ea6,'type':_0x21db22?.[_0x210609(0x11a)]}),_0x210609(0x13d)===_0x504ea6&&this[_0x210609(0x113)]();}[_0x49eb93(0x15b)](_0x13c54e,_0x1daf9d){const _0x184ee4=_0x49eb93;if(this[_0x184ee4(0x143)][_0x184ee4(0x10f)](_0x13c54e[_0x184ee4(0x160)])&&(this[_0x184ee4(0x143)][_0x184ee4(0x14a)](_0x13c54e[_0x184ee4(0x160)],_0x13c54e),this[_0x184ee4(0x159)](_0x184ee4(0x102),{'contextItem':_0x13c54e,'isLoading':_0x1daf9d}),_0x13c54e[_0x184ee4(0x110)])){const _0x4be4ce=this[_0x184ee4(0x14c)](_0x13c54e[_0x184ee4(0x110)]);_0x4be4ce&&_0x4be4ce[_0x184ee4(0x118)](_0x1f854a=>{const _0x1b85d9=_0x184ee4;this[_0x1b85d9(0x15e)](_0x1f854a,_0x13c54e[_0x1b85d9(0x110)],!0x0);});}}[_0x49eb93(0x12a)](_0x130baf){const _0x428ab5=_0x49eb93;this[_0x428ab5(0x115)][_0x428ab5(0x14a)](_0x130baf[_0x428ab5(0x160)],_0x130baf);}[_0x49eb93(0x15c)](){const _0x499a99=_0x49eb93;this[_0x499a99(0x17b)]={'document':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x135)]?.[_0x499a99(0x111)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x177)]?.[_0x499a99(0x111)]},'files':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x171)]?.[_0x499a99(0x111)]},'sources':this[_0x499a99(0x158)]()},this[_0x499a99(0x159)](_0x499a99(0x181),{'options':this[_0x499a99(0x17b)]});}[_0x49eb93(0x158)](){const _0x3f82d3=_0x49eb93;return this[_0x3f82d3(0x188)]?.[_0x3f82d3(0x11d)]?.[_0x3f82d3(0x146)](_0x2d833b=>({..._0x2d833b,'resources':[]}))??[];}[_0x49eb93(0x113)](){const _0x565d9=_0x49eb93,_0x250e4e=this[_0x565d9(0x104)]()||this[_0x565d9(0x17c)]();this[_0x565d9(0x17b)][_0x565d9(0x135)][_0x565d9(0x17f)]=_0x250e4e,this[_0x565d9(0x159)](_0x565d9(0x181),{'options':this[_0x565d9(0x17b)]});}[_0x49eb93(0x13c)](_0x189e19){const _0x92b3a0=_0x49eb93;for(const _0x5f5002 of this[_0x92b3a0(0x143)][_0x92b3a0(0x151)]())if(_0x5f5002[_0x92b3a0(0x110)]===_0x189e19)return!0x0;for(const _0x3f28b7 of this[_0x92b3a0(0x115)][_0x92b3a0(0x151)]())if(_0x3f28b7[_0x92b3a0(0x110)]===_0x189e19)return!0x0;return!0x1;}[_0x49eb93(0x14c)](_0x6967e2){const _0x24a98a=_0x49eb93,_0x404ea7=[];for(const _0x17a9aa of this[_0x24a98a(0x17b)][_0x24a98a(0x11d)]){_0x17a9aa[_0x24a98a(0x17d)][_0x24a98a(0x161)](_0x372049=>_0x372049['id']===_0x6967e2)&&_0x404ea7[_0x24a98a(0x149)](_0x17a9aa['id']);}return 0x0===_0x404ea7[_0x24a98a(0x126)]?null:_0x404ea7;}[_0x49eb93(0x15e)](_0x5cdb05,_0x157eea,_0x1bb8a3){const _0x2ae1ae=_0x49eb93,_0x21312d=this[_0x2ae1ae(0x17b)][_0x2ae1ae(0x11d)][_0x2ae1ae(0x161)](_0x12e51b=>_0x12e51b['id']===_0x5cdb05);if(!_0x21312d)return;const _0xc8c83c=_0x21312d[_0x2ae1ae(0x17d)][_0x2ae1ae(0x161)](_0x2e8595=>_0x2e8595['id']===_0x157eea);_0xc8c83c&&(_0xc8c83c[_0x2ae1ae(0x155)]=_0x1bb8a3,this[_0x2ae1ae(0x159)](_0x2ae1ae(0x13f),{'sourceId':_0x5cdb05,'resourceId':_0x157eea,'isInContext':_0x1bb8a3}));}[_0x49eb93(0x15f)](_0xf02177){const _0x4a4823=_0x49eb93;this[_0x4a4823(0x11c)][_0x4a4823(0x14a)](_0xf02177,!0x0),this[_0x4a4823(0x11c)][_0x4a4823(0x12e)]&&this[_0x4a4823(0x159)](_0x4a4823(0x154),{'isUploadInProgress':!0x0});}[_0x49eb93(0x170)](_0x4d72fa){const _0x2f7554=_0x49eb93;this[_0x2f7554(0x11c)][_0x2f7554(0x148)](_0x4d72fa),0x0===this[_0x2f7554(0x11c)][_0x2f7554(0x12e)]&&this[_0x2f7554(0x159)](_0x2f7554(0x154),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
function _0x2ec3(_0x433b10,_0x4499fe){const _0x3daedb=_0x3dae();return _0x2ec3=function(_0x2ec3f2,_0x3273be){_0x2ec3f2=_0x2ec3f2-0x18e;let _0x2b041a=_0x3daedb[_0x2ec3f2];return _0x2b041a;},_0x2ec3(_0x433b10,_0x4499fe);}const _0x453b6d=_0x2ec3;(function(_0x522e03,_0x3d5405){const _0x447386=_0x2ec3,_0x425b08=_0x522e03();while(!![]){try{const _0x260df9=-parseInt(_0x447386(0x1f6))/0x1*(-parseInt(_0x447386(0x1fe))/0x2)+parseInt(_0x447386(0x1e8))/0x3+-parseInt(_0x447386(0x1b9))/0x4*(-parseInt(_0x447386(0x1a3))/0x5)+-parseInt(_0x447386(0x192))/0x6+-parseInt(_0x447386(0x1e6))/0x7*(parseInt(_0x447386(0x201))/0x8)+parseInt(_0x447386(0x1ec))/0x9*(-parseInt(_0x447386(0x214))/0xa)+-parseInt(_0x447386(0x1db))/0xb*(parseInt(_0x447386(0x209))/0xc);if(_0x260df9===_0x3d5405)break;else _0x425b08['push'](_0x425b08['shift']());}catch(_0x382016){_0x425b08['push'](_0x425b08['shift']());}}}(_0x3dae,0x8142b));import{CKEditorError as _0x5a252e,ObservableMixin as _0x2c3e1b,uid as _0x5c3674}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x209a0c,AIContextTextResourceType as _0xf7701a}from'../../aicore/model/aicontext.js';import{escape as _0x437800}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x453b6d(0x19c),_0x453b6d(0x1e7),_0x453b6d(0x1fc),_0x453b6d(0x1c2),_0x453b6d(0x1f7),_0x453b6d(0x19a),_0x453b6d(0x1ea),_0x453b6d(0x1c6),_0x453b6d(0x1eb)];export class AIChatContext extends _0x2c3e1b(){[_0x453b6d(0x1d8)];[_0x453b6d(0x18f)];[_0x453b6d(0x1a1)];constructor({connector:_0x4c9fb5,config:_0x266dcb,ownerId:_0x1f431d}){const _0x253bb0=_0x453b6d;super(),this[_0x253bb0(0x1d8)]=_0x4c9fb5,this[_0x253bb0(0x18f)]=_0x266dcb,this[_0x253bb0(0x1a1)]=_0x1f431d;}[_0x453b6d(0x20e)](){const _0x48dfb9=_0x453b6d;this[_0x48dfb9(0x1c8)]=new Map(),this[_0x48dfb9(0x202)]=new Map(),this[_0x48dfb9(0x1f2)]=new Map(),this[_0x48dfb9(0x1fd)]=new Map(),this[_0x48dfb9(0x1d2)]();}[_0x453b6d(0x20f)](){const _0x424095=_0x453b6d;return this[_0x424095(0x1c8)];}async[_0x453b6d(0x19d)](_0x12923d){const _0x1d3d49=_0x453b6d,_0x10db1b=await this[_0x1d3d49(0x1ab)](_0x12923d);return this[_0x1d3d49(0x197)](_0x10db1b),_0x1d3d49(0x1c5)===_0x10db1b[_0x1d3d49(0x193)]&&this[_0x1d3d49(0x1d7)](),_0x10db1b;}async[_0x453b6d(0x1ab)](_0x4f0b24){const _0x4d2e82=_0x453b6d;if(_0x4f0b24[_0x4d2e82(0x213)]===_0x209a0c[_0x4d2e82(0x20d)]){const _0x52c14f=await this[_0x4d2e82(0x1d8)][_0x4d2e82(0x1ca)](this[_0x4d2e82(0x1a1)],_0x4f0b24['id'])[_0x4d2e82(0x1e1)]();return{'id':_0x4d2e82(0x1c5),'uiId':_0x4d2e82(0x1c5),'label':_0x4d2e82(0x1c1),'type':_0x4f0b24[_0x4d2e82(0x213)],'content':_0x52c14f[_0x4d2e82(0x1e2)],'hidden':this[_0x4d2e82(0x202)][_0x4d2e82(0x1bd)](_0x4d2e82(0x1c5)),'version':_0x52c14f[_0x4d2e82(0x1d4)]?.[_0x4d2e82(0x18e)],'sessionId':_0x52c14f[_0x4d2e82(0x1d4)]?.[_0x4d2e82(0x1a9)]};}return{'id':_0x4f0b24['id'],'uiId':_0x4f0b24['id'],'label':_0x4f0b24[_0x4d2e82(0x1d4)]?.[_0x4d2e82(0x191)]||_0x4f0b24[_0x4d2e82(0x204)]||_0x4f0b24[_0x4d2e82(0x210)]||_0x4f0b24['id'],'type':_0x4f0b24[_0x4d2e82(0x213)],..._0x4f0b24?.[_0x4d2e82(0x1d4)]?.[_0x4d2e82(0x1b3)]?{'resourceId':_0x4f0b24[_0x4d2e82(0x1d4)]?.[_0x4d2e82(0x1b3)]}:{}};}[_0x453b6d(0x1e3)](){const _0x18e8a2=_0x453b6d;return new Map(this[_0x18e8a2(0x202)]);}[_0x453b6d(0x1e9)](_0x4c8d14){const _0x430c84=_0x453b6d,_0xf68a8e=this[_0x430c84(0x1c8)][_0x430c84(0x203)](_0x4c8d14);_0xf68a8e?.[_0x430c84(0x211)]||this[_0x430c84(0x21d)](_0x4c8d14);}[_0x453b6d(0x207)](){const _0x24d7a8=_0x453b6d;if(0x0===this[_0x24d7a8(0x1c8)][_0x24d7a8(0x1ff)])return;for(const _0x65c889 of this[_0x24d7a8(0x1c8)][_0x24d7a8(0x1cc)]())this[_0x24d7a8(0x21d)](_0x65c889[_0x24d7a8(0x193)]);const _0x828bd1=this[_0x24d7a8(0x202)][_0x24d7a8(0x203)](_0x24d7a8(0x1c5))||this[_0x24d7a8(0x1c8)][_0x24d7a8(0x203)](_0x24d7a8(0x1c5));_0x828bd1&&this[_0x24d7a8(0x1dc)]({..._0x828bd1,'isReadOnly':!0x0,'hidden':!0x0});}[_0x453b6d(0x1a8)](_0x4291c7){const _0xb72b9b=_0x453b6d;for(const _0x3d980b of _0x4291c7[_0xb72b9b(0x1cc)]())this[_0xb72b9b(0x197)](_0x3d980b);this[_0xb72b9b(0x207)](),this[_0xb72b9b(0x1b2)](_0xb72b9b(0x1c2),{'contextItems':Array[_0xb72b9b(0x1b7)](this[_0xb72b9b(0x1e3)]()[_0xb72b9b(0x1cc)]())});}[_0x453b6d(0x194)](){const _0x58b56d=_0x453b6d;return this[_0x58b56d(0x1c8)][_0x58b56d(0x1bd)](_0x58b56d(0x1c5));}[_0x453b6d(0x1d3)](){const _0x255a5a=_0x453b6d;return this[_0x255a5a(0x1c8)][_0x255a5a(0x1bd)](_0x255a5a(0x1de));}[_0x453b6d(0x1f1)](){const _0x3cfbd7=_0x453b6d;return this[_0x3cfbd7(0x202)][_0x3cfbd7(0x1bd)](_0x3cfbd7(0x1c5));}static[_0x453b6d(0x1ef)](_0x158b66){const _0x192326=_0x453b6d;return Array[_0x192326(0x1b7)](_0x158b66[_0x192326(0x1cc)]())[_0x192326(0x19f)](_0x502ce3=>this[_0x192326(0x198)](_0x502ce3))[_0x192326(0x217)](_0x48df45=>null!==_0x48df45);}async[_0x453b6d(0x1d0)](_0x177145,_0x596a89,_0x2889cf=_0x209a0c[_0x453b6d(0x1dd)]){const _0x2af0f3=_0x453b6d,_0xf388f2=_0x2af0f3(0x219)+_0x5c3674();this[_0x2af0f3(0x1b8)](_0xf388f2);try{await Promise[_0x2af0f3(0x1a0)](_0x177145[_0x2af0f3(0x19f)](async _0x4a8e36=>{const _0x27a0d6=_0x2af0f3,_0x3c8705=_0x27a0d6(0x1c7)+_0x5c3674(),_0x693db8=_0x437800(_0x4a8e36[_0x27a0d6(0x204)]);try{this[_0x27a0d6(0x1dc)]({'type':_0x2889cf,'label':_0x596a89?.[_0x27a0d6(0x191)]||_0x693db8,'uiId':_0x3c8705,'resourceId':_0x596a89?.[_0x27a0d6(0x1b3)]},!0x0);const _0x20416c=this[_0x27a0d6(0x1d8)][_0x27a0d6(0x1ce)](this[_0x27a0d6(0x1a1)],_0x4a8e36,_0x596a89);this[_0x27a0d6(0x1f2)][_0x27a0d6(0x20a)](_0x3c8705,_0x20416c[_0x27a0d6(0x1ba)]);const {id:_0x19201d}=await _0x20416c[_0x27a0d6(0x1a2)]();this[_0x27a0d6(0x1f2)][_0x27a0d6(0x1f8)](_0x3c8705),this[_0x27a0d6(0x218)]({'type':_0x2889cf,'id':_0x19201d,'label':_0x596a89?.[_0x27a0d6(0x191)]||_0x693db8,'uiId':_0x3c8705,'resourceId':_0x596a89?.[_0x27a0d6(0x1b3)]},!0x1);}catch(_0x2c14b4){this[_0x27a0d6(0x1f2)][_0x27a0d6(0x1f8)](_0x3c8705);if(!_0x2c14b4[_0x27a0d6(0x1ae)][_0x27a0d6(0x206)](_0x27a0d6(0x1da))){const _0x41d3c6=new _0x5a252e(_0x27a0d6(0x1a4),null,{'fileName':_0x693db8});_0x41d3c6[_0x27a0d6(0x20b)]=_0x2c14b4[_0x27a0d6(0x20b)],this[_0x27a0d6(0x1b2)](_0x27a0d6(0x1f7),{'error':_0x41d3c6,'fileName':_0x693db8});}this[_0x27a0d6(0x21d)](_0x3c8705);}}));}finally{this[_0x2af0f3(0x1d6)](_0xf388f2);}}[_0x453b6d(0x205)](_0x26926c){const _0x358d92=_0x453b6d;if(this[_0x358d92(0x194)]())return;const _0x403d30={'type':_0x209a0c[_0x358d92(0x20d)],'uiId':_0x358d92(0x1c5),'label':_0x26926c,'isReadOnly':this[_0x358d92(0x202)][_0x358d92(0x1bd)](_0x358d92(0x1c5)),'hidden':this[_0x358d92(0x202)][_0x358d92(0x1bd)](_0x358d92(0x1c5))};this[_0x358d92(0x1dc)](_0x403d30);}async[_0x453b6d(0x1d1)](_0x5d817d,_0x10e3e8,_0x9d6972,_0x84bf02){const _0x42f332=_0x453b6d,_0x47c9f2=this[_0x42f332(0x1c8)][_0x42f332(0x203)](_0x42f332(0x1c5));if(_0x47c9f2&&_0x5d817d){_0x47c9f2[_0x42f332(0x1de)]=_0x84bf02?_0x84bf02[_0x42f332(0x19f)](_0x13c174=>({'start':_0x13c174[_0x42f332(0x19e)],'end':_0x13c174[_0x42f332(0x1bc)]})):[];try{if(_0x47c9f2[_0x42f332(0x18e)]===_0x10e3e8)return;const {id:_0x4226e9}=await this[_0x42f332(0x1d8)][_0x42f332(0x1b0)](this[_0x42f332(0x1a1)],_0x5d817d,{'version':_0x10e3e8,'sessionId':_0x9d6972})[_0x42f332(0x1a2)]();_0x47c9f2['id']=_0x4226e9,_0x47c9f2[_0x42f332(0x1e2)]=_0x5d817d,_0x47c9f2[_0x42f332(0x18e)]=_0x10e3e8,_0x47c9f2[_0x42f332(0x1a9)]=_0x9d6972;}catch(_0x546b72){const _0x20254f=new _0x5a252e(_0x42f332(0x21c),null);_0x20254f[_0x42f332(0x20b)]=_0x546b72[_0x42f332(0x20b)],this[_0x42f332(0x1b2)](_0x42f332(0x1f7),{'error':_0x20254f});}}}[_0x453b6d(0x196)](_0x11b0fb){const _0x5aee3d=_0x453b6d;this[_0x5aee3d(0x1dc)]({'type':_0x209a0c[_0x5aee3d(0x1af)],'label':_0x11b0fb,'uiId':_0x5aee3d(0x1de),'content':_0x11b0fb});}[_0x453b6d(0x1e4)](){const _0x59a1d0=_0x453b6d;this[_0x59a1d0(0x21d)](_0x59a1d0(0x1de));}async[_0x453b6d(0x1e5)](_0x454c21,_0x3ee8be){const _0x437405=_0x453b6d,_0x2dc46e=_0x437405(0x1b6)+_0x5c3674();this[_0x437405(0x1b8)](_0x2dc46e);const _0xbedb2=_0x437405(0x1b6)+_0x5c3674();try{this[_0x437405(0x1dc)]({'type':_0x209a0c[_0x437405(0x1ed)],'label':_0x3ee8be?.[_0x437405(0x191)]||_0x454c21,'uiId':_0xbedb2,'resourceId':_0x3ee8be?.[_0x437405(0x1b3)]},!0x0);const _0x12ad45=this[_0x437405(0x1d8)][_0x437405(0x1b4)](this[_0x437405(0x1a1)],_0x454c21,_0x3ee8be);this[_0x437405(0x1f2)][_0x437405(0x20a)](_0xbedb2,_0x12ad45[_0x437405(0x1ba)]);const {id:_0x25a91b}=await _0x12ad45[_0x437405(0x1a2)]();this[_0x437405(0x1f2)][_0x437405(0x1f8)](_0xbedb2),this[_0x437405(0x218)]({'type':_0x209a0c[_0x437405(0x1ed)],'id':_0x25a91b,'label':_0x3ee8be?.[_0x437405(0x191)]||_0x454c21,'uiId':_0xbedb2,'resourceId':_0x3ee8be?.[_0x437405(0x1b3)]},!0x1);}catch(_0x169dbb){this[_0x437405(0x1f2)][_0x437405(0x1f8)](_0xbedb2),(_0x169dbb[_0x437405(0x1ae)][_0x437405(0x206)](_0x437405(0x1da))||this[_0x437405(0x1b2)](_0x437405(0x1f7),{'error':new _0x5a252e(_0x437405(0x1f3),this,{'url':_0x454c21,'originalError':_0x169dbb}),'url':_0x454c21}),this[_0x437405(0x21d)](_0xbedb2));}finally{this[_0x437405(0x1d6)](_0x2dc46e);}}async[_0x453b6d(0x1bb)](_0x1604a4,_0x4a4ac2,_0x4851aa){const _0x1e3a10=_0x453b6d,_0x1582ac=this[_0x1e3a10(0x1aa)][_0x1e3a10(0x1ad)][_0x1e3a10(0x1df)](_0x1adf97=>_0x1adf97['id']===_0x1604a4);if(!_0x1582ac)return this[_0x1e3a10(0x1b2)](_0x1e3a10(0x1f7),{'error':new _0x5a252e(_0x1e3a10(0x1fb),this,{'sourceId':_0x1604a4}),'sourceId':_0x1604a4}),[];try{const _0x1ed7a9=(await _0x1582ac[_0x1e3a10(0x199)](_0x4a4ac2))[_0x1e3a10(0x19f)](_0xcdb581=>{const _0xb11d81=_0x1e3a10,_0x14f395=this[_0xb11d81(0x1f4)](_0xcdb581['id']);return{..._0xcdb581,'isInContext':_0x14f395};});return _0x1582ac[_0x1e3a10(0x1b1)]=_0x1ed7a9,this[_0x1e3a10(0x1b2)](_0x1e3a10(0x1ea),{'sourceId':_0x1604a4,'source':_0x1582ac,'resources':_0x1ed7a9,'uid':_0x4851aa}),_0x1ed7a9;}catch(_0x29f82c){return this[_0x1e3a10(0x1b2)](_0x1e3a10(0x1f7),{'error':new _0x5a252e(_0x1e3a10(0x1c9),this,{'sourceId':_0x1604a4,'originalError':_0x29f82c}),'sourceId':_0x1604a4,'sourceLabel':_0x1582ac[_0x1e3a10(0x191)]}),[];}}async[_0x453b6d(0x1a6)](_0x179aea,_0x48f1c0){const _0x168e78=_0x453b6d;if(this[_0x168e78(0x1f4)](_0x48f1c0['id']))return;let _0x126cd4=_0x48f1c0[_0x168e78(0x1bf)];if(!_0x126cd4&&_0x179aea[_0x168e78(0x1f0)])try{_0x126cd4=await _0x179aea[_0x168e78(0x1f0)](_0x48f1c0['id']);}catch(_0x3eb077){return void this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1f5),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id'],'originalError':_0x3eb077}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});}if(_0x126cd4)switch(_0x48f1c0[_0x168e78(0x213)]){case _0x209a0c[_0x168e78(0x1ed)]:if(_0x168e78(0x212)!=typeof _0x126cd4)return void this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1ee),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id'],'expectedType':_0x168e78(0x212),'actualType':typeof _0x126cd4}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});await this[_0x168e78(0x1e5)](_0x126cd4,{'label':_0x48f1c0[_0x168e78(0x191)],'resourceId':_0x48f1c0['id']});break;case _0x209a0c[_0x168e78(0x1dd)]:if(!(_0x126cd4 instanceof File))return void this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1ee),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id'],'expectedType':_0x168e78(0x1c0),'actualType':typeof _0x126cd4}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});await this[_0x168e78(0x1d0)]([_0x126cd4],{'label':_0x48f1c0[_0x168e78(0x191)],'resourceId':_0x48f1c0['id']});break;case _0x209a0c[_0x168e78(0x208)]:if(_0x168e78(0x216)!=typeof _0x126cd4||!(_0x168e78(0x1e2)in _0x126cd4)||!(_0x168e78(0x213)in _0x126cd4))return void this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1ee),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id'],'expectedType':_0x168e78(0x1a5),'actualType':typeof _0x126cd4}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});_0x126cd4=AIChatContext[_0x168e78(0x20c)](_0x126cd4,_0x48f1c0[_0x168e78(0x191)]),await this[_0x168e78(0x1d0)]([_0x126cd4],{'label':_0x48f1c0[_0x168e78(0x191)],'resourceId':_0x48f1c0['id']},_0x209a0c[_0x168e78(0x208)]);break;default:this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1f9),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id'],'resourceType':_0x48f1c0[_0x168e78(0x213)]}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});}else this[_0x168e78(0x1b2)](_0x168e78(0x1f7),{'error':new _0x5a252e(_0x168e78(0x1cf),this,{'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']}),'resourceId':_0x48f1c0['id'],'sourceId':_0x179aea['id']});}static[_0x453b6d(0x20c)](_0x1b4b92,_0x53e095){const _0x2df4de=_0x453b6d;switch(_0x1b4b92[_0x2df4de(0x213)]){case _0xf7701a[_0x2df4de(0x21a)]:return new File([_0x1b4b92[_0x2df4de(0x1e2)]],_0x53e095,{'type':_0x2df4de(0x1cb)});case _0xf7701a[_0x2df4de(0x1ac)]:return new File([_0x1b4b92[_0x2df4de(0x1e2)]],_0x53e095,{'type':_0x2df4de(0x1c3)});default:return new File([_0x1b4b92[_0x2df4de(0x1e2)]],_0x53e095,{'type':_0x2df4de(0x1be)});}}static[_0x453b6d(0x198)](_0x385ba7){const _0x26c7f8=_0x453b6d;switch(_0x385ba7[_0x26c7f8(0x213)]){case _0x209a0c[_0x26c7f8(0x1dd)]:return{'type':_0x209a0c[_0x26c7f8(0x1dd)],'id':_0x385ba7['id']};case _0x209a0c[_0x26c7f8(0x1ed)]:return{'type':_0x209a0c[_0x26c7f8(0x1ed)],'id':_0x385ba7['id']};case _0x209a0c[_0x26c7f8(0x20d)]:return{'type':_0x209a0c[_0x26c7f8(0x20d)],'id':_0x385ba7['id'],..._0x385ba7[_0x26c7f8(0x1de)]?.[_0x26c7f8(0x200)]&&{'selection':_0x385ba7[_0x26c7f8(0x1de)]}};case _0x209a0c[_0x26c7f8(0x208)]:return{'type':_0x209a0c[_0x26c7f8(0x1dd)],'id':_0x385ba7['id']};default:return null;}}[_0x453b6d(0x1dc)](_0x3f29b7,_0x52f336=!0x1){const _0x5a1faf=_0x453b6d;if(this[_0x5a1faf(0x1c8)][_0x5a1faf(0x20a)](_0x3f29b7[_0x5a1faf(0x193)],_0x3f29b7),_0x3f29b7[_0x5a1faf(0x1e0)]||this[_0x5a1faf(0x1b2)](_0x5a1faf(0x19c),{'contextItem':_0x3f29b7,'isLoading':_0x52f336}),_0x5a1faf(0x1c5)===_0x3f29b7[_0x5a1faf(0x193)]&&this[_0x5a1faf(0x1d7)](),_0x3f29b7[_0x5a1faf(0x1b3)]){const _0x131672=this[_0x5a1faf(0x1a7)](_0x3f29b7[_0x5a1faf(0x1b3)]);_0x131672&&_0x131672[_0x5a1faf(0x19b)](_0x4c0d8f=>{const _0x492764=_0x5a1faf;this[_0x492764(0x215)](_0x4c0d8f,_0x3f29b7[_0x492764(0x1b3)],!0x0);});}}[_0x453b6d(0x21d)](_0x24014e){const _0x57614b=_0x453b6d,_0x53b4da=this[_0x57614b(0x1c8)][_0x57614b(0x203)](_0x24014e),_0x4eae77=this[_0x57614b(0x1f2)][_0x57614b(0x203)](_0x24014e);if(_0x4eae77&&(_0x4eae77[_0x57614b(0x1b5)](),this[_0x57614b(0x1f2)][_0x57614b(0x1f8)](_0x24014e)),_0x53b4da?.[_0x57614b(0x1b3)]){const _0x30dd92=this[_0x57614b(0x1a7)](_0x53b4da[_0x57614b(0x1b3)]);_0x30dd92&&_0x30dd92[_0x57614b(0x19b)](_0xa89ee2=>{const _0x415a5b=_0x57614b;this[_0x415a5b(0x215)](_0xa89ee2,_0x53b4da[_0x415a5b(0x1b3)],!0x1);});}this[_0x57614b(0x1c8)][_0x57614b(0x1f8)](_0x24014e),this[_0x57614b(0x1b2)](_0x57614b(0x1e7),{'uiId':_0x24014e,'type':_0x53b4da?.[_0x57614b(0x213)]}),_0x57614b(0x1c5)===_0x24014e&&this[_0x57614b(0x1d7)]();}[_0x453b6d(0x218)](_0x45badc,_0x141b71){const _0x5096e9=_0x453b6d;if(this[_0x5096e9(0x1c8)][_0x5096e9(0x1bd)](_0x45badc[_0x5096e9(0x193)])&&(this[_0x5096e9(0x1c8)][_0x5096e9(0x20a)](_0x45badc[_0x5096e9(0x193)],_0x45badc),this[_0x5096e9(0x1b2)](_0x5096e9(0x1fc),{'contextItem':_0x45badc,'isLoading':_0x141b71}),_0x45badc[_0x5096e9(0x1b3)])){const _0x4dbc8c=this[_0x5096e9(0x1a7)](_0x45badc[_0x5096e9(0x1b3)]);_0x4dbc8c&&_0x4dbc8c[_0x5096e9(0x19b)](_0x1ba508=>{const _0x46e7d6=_0x5096e9;this[_0x46e7d6(0x215)](_0x1ba508,_0x45badc[_0x46e7d6(0x1b3)],!0x0);});}}[_0x453b6d(0x197)](_0x26ea88){const _0x40b8eb=_0x453b6d;this[_0x40b8eb(0x202)][_0x40b8eb(0x20a)](_0x26ea88[_0x40b8eb(0x193)],_0x26ea88);}[_0x453b6d(0x1d2)](){const _0x39e461=_0x453b6d;this[_0x39e461(0x1aa)]={'document':{'enabled':!0x1!==this[_0x39e461(0x18f)]?.[_0x39e461(0x195)]?.[_0x39e461(0x1cd)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x39e461(0x18f)]?.[_0x39e461(0x1fa)]?.[_0x39e461(0x1cd)]},'files':{'enabled':!0x1!==this[_0x39e461(0x18f)]?.[_0x39e461(0x1c4)]?.[_0x39e461(0x1cd)]},'sources':this[_0x39e461(0x190)]()},this[_0x39e461(0x1b2)](_0x39e461(0x19a),{'options':this[_0x39e461(0x1aa)]});}[_0x453b6d(0x190)](){const _0x22b458=_0x453b6d;return this[_0x22b458(0x18f)]?.[_0x22b458(0x1ad)]?.[_0x22b458(0x19f)](_0x2428e3=>({..._0x2428e3,'resources':[]}))??[];}[_0x453b6d(0x1d7)](){const _0x4b9a31=_0x453b6d,_0x55bd3c=this[_0x4b9a31(0x194)]()||this[_0x4b9a31(0x1f1)]();this[_0x4b9a31(0x1aa)][_0x4b9a31(0x195)][_0x4b9a31(0x21b)]=_0x55bd3c,this[_0x4b9a31(0x1b2)](_0x4b9a31(0x19a),{'options':this[_0x4b9a31(0x1aa)]});}[_0x453b6d(0x1f4)](_0x441d94){const _0x626b24=_0x453b6d;for(const _0x82af46 of this[_0x626b24(0x1c8)][_0x626b24(0x1cc)]())if(_0x82af46[_0x626b24(0x1b3)]===_0x441d94)return!0x0;for(const _0x411cf4 of this[_0x626b24(0x202)][_0x626b24(0x1cc)]())if(_0x411cf4[_0x626b24(0x1b3)]===_0x441d94)return!0x0;return!0x1;}[_0x453b6d(0x1a7)](_0x4c4951){const _0x104ce4=_0x453b6d,_0x58452e=[];for(const _0x349aaf of this[_0x104ce4(0x1aa)][_0x104ce4(0x1ad)]){_0x349aaf[_0x104ce4(0x1b1)][_0x104ce4(0x1df)](_0x11e4ff=>_0x11e4ff['id']===_0x4c4951)&&_0x58452e[_0x104ce4(0x1d9)](_0x349aaf['id']);}return 0x0===_0x58452e[_0x104ce4(0x200)]?null:_0x58452e;}[_0x453b6d(0x215)](_0x45c26e,_0x1ca956,_0x3703ef){const _0x4f333e=_0x453b6d,_0x42592d=this[_0x4f333e(0x1aa)][_0x4f333e(0x1ad)][_0x4f333e(0x1df)](_0x3a67e2=>_0x3a67e2['id']===_0x45c26e);if(!_0x42592d)return;const _0x11e1f3=_0x42592d[_0x4f333e(0x1b1)][_0x4f333e(0x1df)](_0xde2d91=>_0xde2d91['id']===_0x1ca956);_0x11e1f3&&(_0x11e1f3[_0x4f333e(0x1d5)]=_0x3703ef,this[_0x4f333e(0x1b2)](_0x4f333e(0x1c6),{'sourceId':_0x45c26e,'resourceId':_0x1ca956,'isInContext':_0x3703ef}));}[_0x453b6d(0x1b8)](_0x125127){const _0x27bec3=_0x453b6d;this[_0x27bec3(0x1fd)][_0x27bec3(0x20a)](_0x125127,!0x0),this[_0x27bec3(0x1fd)][_0x27bec3(0x1ff)]&&this[_0x27bec3(0x1b2)](_0x27bec3(0x1eb),{'isUploadInProgress':!0x0});}[_0x453b6d(0x1d6)](_0xef9e9b){const _0x3b10d6=_0x453b6d;this[_0x3b10d6(0x1fd)][_0x3b10d6(0x1f8)](_0xef9e9b),0x0===this[_0x3b10d6(0x1fd)][_0x3b10d6(0x1ff)]&&this[_0x3b10d6(0x1b2)](_0x3b10d6(0x1eb),{'isUploadInProgress':!0x1});}}function _0x3dae(){const _0x505867=['resourceStateChanged','file-','_pendingContextItems','ai-chat-source-resources-load-failed','fetchDocument','text/markdown','values','enabled','uploadFile','ai-chat-resource-no-data','addFilesToContext','updateCurrentDocument','_setAddContextOptionsDefaultState','isSelectionInContext','attributes','isInContext','_finishUploadOperation','_toggleAddCurrentDocumentOptionVisibility','_connector','push','ai-request-aborted','6645144PTvTMz','_addContextItem','FILE','selection','find','hidden','getDocument','content','getSentContextItems','removeSelectionFromContext','addUrlToContext','14kAxXYT','contextItemRemoved','1703292PpVXDu','removeFromContext','sourceResourcesLoaded','uploadProgressChanged','2394KAOkmq','URL','ai-chat-context-invalid-data','mapContextItemsToRequestData','getData','isCurrentDocumentInConversation','_ongoingUploads','ai-chat-url-upload-failed','_isResourceInContext','ai-chat-resource-load-failed','44570heHedu','error','delete','ai-chat-context-unsupported-type','urls','ai-chat-source-not-found','contextItemLoadingEnded','_ongoingUploadOperations','34edyevy','size','length','1576016BBymUY','_conversationContextItems','get','name','addCurrentDocumentToContext','startsWith','clearPendingContextItems','TEXT','12eAzyxt','set','stack','_convertTextResourceToFile','DOCUMENT','init','getPendingContextItems','url','isReadOnly','string','type','12500andKbe','_updateResourceInContextState','object','filter','_finishContextItemLoading','files-','MARKDOWN','isHidden','ai-chat-document-upload-failed','_removeContextItem','version','_config','_getCustomSourcesInitialState','label','1433862IXUJkz','uiId','isCurrentDocumentInContext','document','addSelectionToContext','_addToConversationContextItem','_mapContextItemToRequestData','getResources','addContextOptionsChanged','forEach','contextItemAdded','populateFromMessage','start','map','all','_ownerId','getId','7705CbuHLV','ai-chat-file-upload-failed','object\x20with\x20content\x20and\x20type\x20properties','addResourceToContext','_findSourceIdsByResourceId','addToConversationContext','sessionId','_addContextOptionsState','_createContextItemFromContent','HTML','sources','message','SELECTION','uploadDocument','resources','fire','resourceId','uploadUrl','abort','url-','from','_startUploadOperation','2008qGLtdp','abortController','loadSourceResources','end','has','text/plain','data','File','Current\x20document','contextSent','text/html','files','current-document'];_0x3dae=function(){return _0x505867;};return _0x3dae();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2502e4=_0x541c;(function(_0x251d08,_0x5ca952){const _0x5cffd1=_0x541c,_0x1fb241=_0x251d08();while(!![]){try{const _0x9fa013=-parseInt(_0x5cffd1(0x154))/0x1*(-parseInt(_0x5cffd1(0x1b0))/0x2)+-parseInt(_0x5cffd1(0x19d))/0x3+-parseInt(_0x5cffd1(0x1b1))/0x4+-parseInt(_0x5cffd1(0x195))/0x5*(parseInt(_0x5cffd1(0x1a9))/0x6)+-parseInt(_0x5cffd1(0x17b))/0x7+-parseInt(_0x5cffd1(0x1b4))/0x8*(parseInt(_0x5cffd1(0x1aa))/0x9)+parseInt(_0x5cffd1(0x1af))/0xa;if(_0x9fa013===_0x5ca952)break;else _0x1fb241['push'](_0x1fb241['shift']());}catch(_0x482892){_0x1fb241['push'](_0x1fb241['shift']());}}}(_0x181d,0x21be2));import{CKEditorError as _0xbae659,EmitterMixin as _0x4d7429,logWarning as _0x191c41}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x5d3ffa}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x542f25,AI_CONTEXT_MODEL_EVENT_NAMES as _0x53528d}from'./aichatcontext.js';function _0x541c(_0x8fbff8,_0x35b2c1){const _0x181d3d=_0x181d();return _0x541c=function(_0x541c58,_0x467e1e){_0x541c58=_0x541c58-0x144;let _0x2750bd=_0x181d3d[_0x541c58];return _0x2750bd;},_0x541c(_0x8fbff8,_0x35b2c1);}import{AICapabilities as _0x180c28,CAPABILITIES_MODEL_EVENT_NAMES as _0x481def}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x241e46}from'./aichatinteraction.js';export class AIChatConversation extends _0x4d7429(){['id'];[_0x2502e4(0x161)]=!0x1;[_0x2502e4(0x14e)]=[];[_0x2502e4(0x147)];[_0x2502e4(0x145)];[_0x2502e4(0x170)];[_0x2502e4(0x1ad)];constructor(_0x1d0c8a){const _0x253bc3=_0x2502e4;super(),this[_0x253bc3(0x1ad)]=_0x1d0c8a,this[_0x253bc3(0x170)]=_0x1d0c8a[_0x253bc3(0x170)],this[_0x253bc3(0x1a7)]=_0x1d0c8a[_0x253bc3(0x1a7)],this['id']=_0x1d0c8a[_0x253bc3(0x175)];}async[_0x2502e4(0x183)](_0x4b041b){const _0x52e95c=_0x2502e4;try{this[_0x52e95c(0x16f)]=new _0x542f25({'connector':this[_0x52e95c(0x170)],'config':_0x4b041b,'ownerId':this['id']}),this[_0x52e95c(0x16f)][_0x52e95c(0x18a)](..._0x53528d)['to'](this),this[_0x52e95c(0x16f)][_0x52e95c(0x183)](),this[_0x52e95c(0x156)]=new _0x180c28(),this[_0x52e95c(0x156)][_0x52e95c(0x18a)](..._0x481def)['to'](this),this[_0x52e95c(0x156)][_0x52e95c(0x183)]();const _0x29b30d=await this[_0x52e95c(0x1a7)][_0x52e95c(0x1a2)]();this[_0x52e95c(0x18b)](_0x52e95c(0x1a3),{'availableModels':_0x29b30d});const _0xdcf635=await this[_0x52e95c(0x1a7)][_0x52e95c(0x168)](this[_0x52e95c(0x1ad)][_0x52e95c(0x1a1)]);_0xdcf635&&await this[_0x52e95c(0x144)](_0xdcf635);}catch(_0x5a4a51){const _0x3bb1a8=new _0xbae659(_0x52e95c(0x16d),null,{'message':_0x5a4a51[_0x52e95c(0x181)]});_0x3bb1a8[_0x52e95c(0x17c)]=_0x5a4a51[_0x52e95c(0x17c)],this[_0x52e95c(0x18b)](_0x52e95c(0x177),{'error':_0x3bb1a8});}}async[_0x2502e4(0x17a)](){const _0x193e0e=_0x2502e4;if(this[_0x193e0e(0x161)])throw new _0xbae659(_0x193e0e(0x16c),null,{'conversation':this});if(!this[_0x193e0e(0x145)])throw new _0xbae659(_0x193e0e(0x1a8),null,{'conversation':this});try{const {id:_0x44f102}=await this[_0x193e0e(0x170)][_0x193e0e(0x159)](this['id'],this[_0x193e0e(0x1ad)][_0x193e0e(0x182)])[_0x193e0e(0x169)]();this['id']=_0x44f102,this[_0x193e0e(0x161)]=!0x0,this[_0x193e0e(0x18b)](_0x193e0e(0x174),{'conversationId':this['id'],'selectedModel':this[_0x193e0e(0x145)]});}catch(_0x4aafbe){const _0x9506b7=new _0xbae659(_0x193e0e(0x198),null,{'message':_0x4aafbe[_0x193e0e(0x181)]});_0x9506b7[_0x193e0e(0x17c)]=_0x4aafbe[_0x193e0e(0x17c)],this[_0x193e0e(0x18b)](_0x193e0e(0x177),{'error':_0x9506b7});}}async[_0x2502e4(0x19c)](_0x215a81,_0x3d3101){const _0x1260ba=_0x2502e4;try{const _0x5c0658=await this[_0x1260ba(0x170)][_0x1260ba(0x176)](_0x215a81)[_0x1260ba(0x169)](),_0x5a84b0=await this[_0x1260ba(0x170)][_0x1260ba(0x187)](_0x215a81)[_0x1260ba(0x19b)](),_0x40781d=_0x5a84b0[0x0][_0x1260ba(0x16e)];this[_0x1260ba(0x161)]=!0x0,this['id']=_0x5c0658['id'],_0x1260ba(0x199)in _0x5c0658?this[_0x1260ba(0x18b)](_0x1260ba(0x173),_0x5c0658[_0x1260ba(0x199)],!0x0):this[_0x1260ba(0x18b)](_0x1260ba(0x173),'',!0x0);const _0x5ed935=(await this[_0x1260ba(0x1a7)][_0x1260ba(0x148)]())[_0x1260ba(0x1b6)](_0x6fafab=>_0x6fafab['id'][_0x1260ba(0x1a4)]()===_0x40781d[_0x1260ba(0x1a4)]());return this[_0x1260ba(0x145)]=_0x5ed935,this[_0x1260ba(0x18b)](_0x1260ba(0x17f),{'selectedModel':_0x5ed935,'isDisabled':!0x0}),await this[_0x1260ba(0x1b5)](_0x5a84b0,_0x3d3101,_0x40781d),this[_0x1260ba(0x147)]=void 0x0,this;}catch(_0x405e29){const _0x2dbf3e=new _0xbae659(_0x1260ba(0x1a5),null,{'message':_0x405e29[_0x1260ba(0x181)],'conversationId':_0x215a81});throw _0x2dbf3e[_0x1260ba(0x17c)]=_0x405e29[_0x1260ba(0x17c)],this[_0x1260ba(0x18b)](_0x1260ba(0x177),{'error':_0x2dbf3e}),_0x2dbf3e;}}async[_0x2502e4(0x1b5)](_0x99cc40,_0x4c93e5,_0x2b66a8){const _0x3217e4=_0x2502e4;let _0x3f5116;for(const _0x1de5fc of _0x99cc40)if(_0x3217e4(0x160)===_0x1de5fc[_0x3217e4(0x16a)]){const _0x27bd0c=await this[_0x3217e4(0x180)](_0x1de5fc),_0x42f7f9={'isReasoningEnabled':Object[_0x3217e4(0x192)](_0x1de5fc[_0x3217e4(0x149)],_0x3217e4(0x157)),'isWebSearchEnabled':Object[_0x3217e4(0x192)](_0x1de5fc[_0x3217e4(0x149)],_0x3217e4(0x194))};_0x3f5116=this[_0x3217e4(0x14d)]({'userMessage':_0x1de5fc[_0x3217e4(0x171)],'contextItems':_0x27bd0c,'capabilities':_0x42f7f9,'modelId':_0x2b66a8,'quickActionData':_0x1de5fc[_0x3217e4(0x197)]?.[_0x3217e4(0x190)]}),this[_0x3217e4(0x147)]=_0x3f5116,this[_0x3217e4(0x16f)][_0x3217e4(0x17d)](this[_0x3217e4(0x147)][_0x3217e4(0x193)]);}else{if(_0x3217e4(0x1b2)===_0x1de5fc[_0x3217e4(0x16a)]&&_0x3f5116)for(const _0x1be38d of _0x1de5fc[_0x3217e4(0x15c)]){const _0x305e6b=_0x3217e4(0x1a6)===_0x1be38d[_0x3217e4(0x14f)]?_0x3217e4(0x15a):_0x3217e4(0x19a),_0x3dfa76=_0x3f5116[_0x3217e4(0x1b3)]()?.[_0x3217e4(0x18d)]!==_0x4c93e5;_0x3f5116[_0x3217e4(0x17e)]=_0x3f5116[_0x3217e4(0x172)]({'type':_0x305e6b,'isDone':!0x0,'interactionId':_0x3f5116['id'],'areActionsDisabled':_0x3dfa76}),_0x3f5116[_0x3217e4(0x17e)][_0x3217e4(0x165)](_0x1be38d[_0x3217e4(0x15c)]);}}}async[_0x2502e4(0x180)](_0x160d39){const _0x59acaa=_0x2502e4,_0x1c1c0d=new Map();if(!_0x160d39[_0x59acaa(0x15c)])return _0x1c1c0d;for(const _0x543af2 of _0x160d39[_0x59acaa(0x15c)]){const _0x11e66b=await this[_0x59acaa(0x16f)][_0x59acaa(0x15b)](_0x543af2);_0x11e66b&&_0x1c1c0d[_0x59acaa(0x1ac)](_0x11e66b['id'],_0x11e66b);}return _0x1c1c0d;}async[_0x2502e4(0x1ae)]({userMessage:_0x545420,quickActionData:_0x516ac8}){const _0x26f1cc=_0x2502e4;if(!this[_0x26f1cc(0x161)])throw new _0xbae659(_0x26f1cc(0x14a),null,{'conversation':this});if(this[_0x26f1cc(0x147)])throw new _0xbae659(_0x26f1cc(0x15e),null,{'conversation':this});try{const _0x116614=this[_0x26f1cc(0x16f)][_0x26f1cc(0x158)](),_0x1c8d4b=this[_0x26f1cc(0x156)][_0x26f1cc(0x18f)](),_0x17bdf9=this[_0x26f1cc(0x145)]['id'];this[_0x26f1cc(0x147)]=this[_0x26f1cc(0x14d)]({'userMessage':_0x545420,'contextItems':_0x116614,'capabilities':_0x1c8d4b,'modelId':_0x17bdf9,'quickActionData':_0x516ac8}),await this[_0x26f1cc(0x147)][_0x26f1cc(0x17a)](),this[_0x26f1cc(0x16f)][_0x26f1cc(0x17d)](this[_0x26f1cc(0x147)][_0x26f1cc(0x193)]);}catch(_0x4bc3dc){this[_0x26f1cc(0x18b)](_0x26f1cc(0x177),{'interactionId':this[_0x26f1cc(0x147)]?this[_0x26f1cc(0x147)]['id']:void 0x0,'error':_0x4bc3dc});}finally{this[_0x26f1cc(0x147)]?.[_0x26f1cc(0x15f)](),this[_0x26f1cc(0x147)]=void 0x0;}}[_0x2502e4(0x14d)]({userMessage:_0xcb4b49,contextItems:_0x2dcf8c,capabilities:_0x42f8d2,modelId:_0x337eba,quickActionData:_0x36edaf}){const _0x992846=_0x2502e4,_0x4c5c81=new _0x241e46({'userMessage':_0xcb4b49,'contextItems':_0x2dcf8c,'capabilities':_0x42f8d2,'conversationId':this['id'],'connector':this[_0x992846(0x170)],'editor':this[_0x992846(0x1ad)][_0x992846(0x1a0)]&&this[_0x992846(0x1ad)][_0x992846(0x1a0)](),'model':_0x337eba,'quickActionData':_0x36edaf});return _0x4c5c81[_0x992846(0x18a)](..._0x5d3ffa)['to'](this),this[_0x992846(0x14e)][_0x992846(0x155)](_0x4c5c81),this[_0x992846(0x18b)](_0x992846(0x185),_0x4c5c81),_0x4c5c81;}[_0x2502e4(0x163)](_0x47fede){const _0xba58d7=_0x2502e4;return this[_0xba58d7(0x14e)][_0xba58d7(0x1b6)](_0x3b0f55=>_0x3b0f55['id']===_0x47fede);}[_0x2502e4(0x18e)](_0x58a223){const _0x3f1ae0=_0x2502e4,_0x47e166=this[_0x3f1ae0(0x163)](_0x58a223);_0x47e166&&(_0x47e166[_0x3f1ae0(0x146)](),this[_0x3f1ae0(0x14e)][_0x3f1ae0(0x15d)](this[_0x3f1ae0(0x14e)][_0x3f1ae0(0x153)](_0x47e166),0x1));}get[_0x2502e4(0x186)](){const _0x5b640e=_0x2502e4;return this[_0x5b640e(0x14e)][this[_0x5b640e(0x14e)][_0x5b640e(0x188)]-0x1];}[_0x2502e4(0x179)](_0x416f3a){const _0x549750=_0x2502e4;this[_0x549750(0x16f)][_0x549750(0x179)](_0x416f3a);}async[_0x2502e4(0x1ab)]({content:_0x1ce3b8,version:_0x216317,sessionId:_0x4cf3bb,selections:_0x46785a}){const _0x3f497d=_0x2502e4;await this[_0x3f497d(0x16f)][_0x3f497d(0x162)](_0x1ce3b8,_0x216317,_0x4cf3bb,_0x46785a);}[_0x2502e4(0x152)](){const _0xa4d499=_0x2502e4;return this[_0xa4d499(0x147)]?.[_0xa4d499(0x1b3)]()?.[_0xa4d499(0x15c)]||'';}[_0x2502e4(0x19e)](_0x4d9a2d){const _0xc70521=_0x2502e4;this[_0xc70521(0x16f)][_0xc70521(0x19e)](_0x4d9a2d);}[_0x2502e4(0x18c)](){const _0x208b54=_0x2502e4;this[_0x208b54(0x16f)][_0x208b54(0x18c)]();}[_0x2502e4(0x14b)](_0x50ca40){const _0x1605be=_0x2502e4;this[_0x1605be(0x16f)][_0x1605be(0x14b)](_0x50ca40);}[_0x2502e4(0x150)](_0x47e9ce){const _0x604695=_0x2502e4;this[_0x604695(0x16f)][_0x604695(0x150)](_0x47e9ce);}[_0x2502e4(0x191)](_0x3a31df,_0xb5a720){const _0x61f38f=_0x2502e4;this[_0x61f38f(0x16f)][_0x61f38f(0x191)](_0x3a31df,_0xb5a720);}[_0x2502e4(0x166)](_0x216113,_0x1b0d72,_0x4696a1){const _0x5ce6b3=_0x2502e4;return this[_0x5ce6b3(0x16f)][_0x5ce6b3(0x166)](_0x216113,_0x1b0d72,_0x4696a1);}[_0x2502e4(0x184)](_0x8bff9){const _0x1ebf58=_0x2502e4;this[_0x1ebf58(0x16f)][_0x1ebf58(0x184)](_0x8bff9);}[_0x2502e4(0x164)](){const _0x2d2901=_0x2502e4;this[_0x2d2901(0x156)][_0x2d2901(0x164)]();}[_0x2502e4(0x196)](){const _0x25b8d6=_0x2502e4;this[_0x25b8d6(0x156)][_0x25b8d6(0x196)]();}[_0x2502e4(0x14c)](){const _0x41c650=_0x2502e4;return this[_0x41c650(0x16f)][_0x41c650(0x14c)]();}[_0x2502e4(0x19f)](){const _0x1ae130=_0x2502e4;return this[_0x1ae130(0x16f)][_0x1ae130(0x19f)]();}[_0x2502e4(0x167)](){const _0x4f0290=_0x2502e4;return this[_0x4f0290(0x16f)][_0x4f0290(0x167)]();}async[_0x2502e4(0x144)](_0x19acb7){const _0x54086b=_0x2502e4;_0x19acb7?!0x1===await this[_0x54086b(0x1a7)][_0x54086b(0x189)](_0x19acb7)&&(_0x191c41(_0x54086b(0x151),{'conversation':this,'model':_0x19acb7}),_0x19acb7=(await this[_0x54086b(0x1a7)][_0x54086b(0x1a2)]())[0x0]):(_0x191c41(_0x54086b(0x16b),{'conversation':this}),_0x19acb7=(await this[_0x54086b(0x1a7)][_0x54086b(0x1a2)]())[0x0]),_0x19acb7['id']!==this[_0x54086b(0x145)]?.['id']&&(this[_0x54086b(0x145)]=_0x19acb7,this[_0x54086b(0x156)][_0x54086b(0x178)](),this[_0x54086b(0x18b)](_0x54086b(0x17f),{'selectedModel':_0x19acb7}));}}function _0x181d(){const _0x39ecfb=['1632659rVSbIh','stack','addToConversationContext','currentReply','modelSelected','_extractContextItems','message','group','init','removeFromContext','interactionCreated','lastInteraction','fetchConversationMessages','length','isAvailable','delegate','fire','removeSelectionFromContext','sessionId','removeInteraction','getCapabilitiesConfig','quickActionData','addResourceToContext','hasOwn','contextItems','webSearch','395bSvckf','toggleReasoning','attributes','ai-chat-conversation-start-failed','title','modification-delta','getMessages','load','455949BpXclg','addSelectionToContext','isCurrentDocumentInConversation','getEditor','selectedModelId','getAvailableModels','conversationInitialized','toLowerCase','ai-chat-conversation-init-from-id-failed','text','chatModels','ai-chat-conversation-start-no-model-selected','8010CCSEnF','9pNTxVw','updateCurrentDocumentInContext','set','options','handleUserInteraction','7005750FSywop','42134PXOjiw','492368KobBSr','assistant','getDocumentContext','94312IvURjm','_processMessagesToInteractions','find','setModel','selectedModel','destroy','currentInteraction','getAll','capabilities','ai-chat-handle-user-conversation-not-initialized','addFilesToContext','isCurrentDocumentInContext','createInteraction','interactions','type','addUrlToContext','ai-chat-conversation-set-model-not-available','getCurrentDocumentContext','indexOf','3hUUcAb','push','chatCapabilities','reasoning','getPendingContextItems','startConversation','text-delta','populateFromMessage','content','splice','ai-chat-handle-user-interaction-already-in-progress','stop','user','isStarted','updateCurrentDocument','getInteraction','toggleWebSearch','appendContent','loadSourceResources','isSelectionInContext','getModel','getConversation','role','ai-chat-conversation-set-model-null','ai-chat-conversation-already-started','ai-chat-conversation-init-failed','model','chatContext','connector','prompt','createReply','setConversationTitle','conversationStarted','conversationId','fetchConversation','error','reset','addCurrentDocumentToContext','start'];_0x181d=function(){return _0x39ecfb;};return _0x181d();}
|
|
23
|
+
const _0x10b59d=_0x30ee;(function(_0x5b248a,_0xf72f46){const _0x4d8b7f=_0x30ee,_0x313f06=_0x5b248a();while(!![]){try{const _0x399641=parseInt(_0x4d8b7f(0x188))/0x1+-parseInt(_0x4d8b7f(0x191))/0x2*(-parseInt(_0x4d8b7f(0x1ad))/0x3)+parseInt(_0x4d8b7f(0x18a))/0x4*(parseInt(_0x4d8b7f(0x18d))/0x5)+parseInt(_0x4d8b7f(0x189))/0x6*(-parseInt(_0x4d8b7f(0x1b0))/0x7)+-parseInt(_0x4d8b7f(0x1ab))/0x8+parseInt(_0x4d8b7f(0x1cd))/0x9*(-parseInt(_0x4d8b7f(0x1f2))/0xa)+parseInt(_0x4d8b7f(0x1a0))/0xb;if(_0x399641===_0xf72f46)break;else _0x313f06['push'](_0x313f06['shift']());}catch(_0x380791){_0x313f06['push'](_0x313f06['shift']());}}}(_0x4fea,0x8f8b6));function _0x30ee(_0x2168e9,_0x1a7f72){const _0x4fea50=_0x4fea();return _0x30ee=function(_0x30eec0,_0x322dbc){_0x30eec0=_0x30eec0-0x181;let _0x4d1a71=_0x4fea50[_0x30eec0];return _0x4d1a71;},_0x30ee(_0x2168e9,_0x1a7f72);}import{CKEditorError as _0x2c60c8,EmitterMixin as _0xa0818c,logWarning as _0x307623}from'ckeditor5/src/utils.js';function _0x4fea(){const _0x15488c=['getInteraction','start','createInteraction','addToConversationContext','interactions','490259zREhgC','253554Wscoaa','8NTUVtR','_processMessagesToInteractions','splice','1853405krmcAm','connector','length','set','2UoBlAq','stack','isAvailable','prompt','chatCapabilities','appendContent','init','addUrlToContext','contextItems','isCurrentDocumentInConversation','user','removeSelectionFromContext','chatModels','lastInteraction','ai-chat-handle-user-conversation-not-initialized','7990257HCLFjI','content','setModel','isCurrentDocumentInContext','updateCurrentDocument','chatContext','capabilities','modification-delta','conversationInitialized','reasoning','options','8183792xCOtAm','type','2259567AHMbOx','getCurrentDocumentContext','removeFromContext','7TkxGrV','load','addSelectionToContext','ai-chat-conversation-init-failed','error','ai-chat-conversation-set-model-not-available','reset','currentInteraction','removeInteraction','ai-chat-conversation-set-model-null','getEditor','conversationStarted','startConversation','addCurrentDocumentToContext','role','getCapabilitiesConfig','attributes','assistant','currentReply','interactionCreated','getModel','fetchConversationMessages','ai-chat-conversation-init-from-id-failed','handleUserInteraction','toLowerCase','webSearch','sessionId','toggleReasoning','loadSourceResources','18XzWLpR','ai-chat-handle-user-interaction-already-in-progress','indexOf','text-delta','toggleWebSearch','getAvailableModels','setConversationTitle','isSelectionInContext','push','ai-chat-conversation-already-started','populateFromMessage','fetchConversation','getPendingContextItems','delegate','message','getAll','_extractContextItems','destroy','getDocumentContext','getConversation','modelSelected','title','conversationId','addResourceToContext','fire','model','find','isStarted','createReply','selectedModel','addFilesToContext','ai-chat-conversation-start-no-model-selected','group','selectedModelId','quickActionData','hasOwn','ai-chat-conversation-start-failed','5290030SgYXSp','stop','text','getMessages','updateCurrentDocumentInContext'];_0x4fea=function(){return _0x15488c;};return _0x4fea();}import{AI_MODEL_EVENT_NAMES as _0x1dbe0e}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x4f0a99,AI_CONTEXT_MODEL_EVENT_NAMES as _0x20f1d2}from'./aichatcontext.js';import{AICapabilities as _0x3a5d2b,CAPABILITIES_MODEL_EVENT_NAMES as _0x2f8447}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x4a0e78}from'./aichatinteraction.js';export class AIChatConversation extends _0xa0818c(){['id'];[_0x10b59d(0x1e8)]=!0x1;[_0x10b59d(0x187)]=[];[_0x10b59d(0x1b7)];[_0x10b59d(0x1ea)];[_0x10b59d(0x18e)];[_0x10b59d(0x1aa)];constructor(_0x4e09fc){const _0xd53eb2=_0x10b59d;super(),this[_0xd53eb2(0x1aa)]=_0x4e09fc,this[_0xd53eb2(0x18e)]=_0x4e09fc[_0xd53eb2(0x18e)],this[_0xd53eb2(0x19d)]=_0x4e09fc[_0xd53eb2(0x19d)],this['id']=_0x4e09fc[_0xd53eb2(0x1e3)];}async[_0x10b59d(0x197)](_0x113c7a){const _0x1ca0de=_0x10b59d;try{this[_0x1ca0de(0x1a5)]=new _0x4f0a99({'connector':this[_0x1ca0de(0x18e)],'config':_0x113c7a,'ownerId':this['id']}),this[_0x1ca0de(0x1a5)][_0x1ca0de(0x1da)](..._0x20f1d2)['to'](this),this[_0x1ca0de(0x1a5)][_0x1ca0de(0x197)](),this[_0x1ca0de(0x195)]=new _0x3a5d2b(),this[_0x1ca0de(0x195)][_0x1ca0de(0x1da)](..._0x2f8447)['to'](this),this[_0x1ca0de(0x195)][_0x1ca0de(0x197)]();const _0x44d768=await this[_0x1ca0de(0x19d)][_0x1ca0de(0x1d2)]();this[_0x1ca0de(0x1e5)](_0x1ca0de(0x1a8),{'availableModels':_0x44d768});const _0x271046=await this[_0x1ca0de(0x19d)][_0x1ca0de(0x1c4)](this[_0x1ca0de(0x1aa)][_0x1ca0de(0x1ee)]);_0x271046&&await this[_0x1ca0de(0x1a2)](_0x271046);}catch(_0x3d5e5a){const _0x114c75=new _0x2c60c8(_0x1ca0de(0x1b3),null,{'message':_0x3d5e5a[_0x1ca0de(0x1db)]});_0x114c75[_0x1ca0de(0x192)]=_0x3d5e5a[_0x1ca0de(0x192)],this[_0x1ca0de(0x1e5)](_0x1ca0de(0x1b4),{'error':_0x114c75});}}async[_0x10b59d(0x184)](){const _0x4049=_0x10b59d;if(this[_0x4049(0x1e8)])throw new _0x2c60c8(_0x4049(0x1d6),null,{'conversation':this});if(!this[_0x4049(0x1ea)])throw new _0x2c60c8(_0x4049(0x1ec),null,{'conversation':this});try{const {id:_0x24fcba}=await this[_0x4049(0x18e)][_0x4049(0x1bc)](this['id'],this[_0x4049(0x1aa)][_0x4049(0x1ed)])[_0x4049(0x1e0)]();this['id']=_0x24fcba,this[_0x4049(0x1e8)]=!0x0,this[_0x4049(0x1e5)](_0x4049(0x1bb),{'conversationId':this['id'],'selectedModel':this[_0x4049(0x1ea)]});}catch(_0x5f586a){const _0x230afc=new _0x2c60c8(_0x4049(0x1f1),null,{'message':_0x5f586a[_0x4049(0x1db)]});_0x230afc[_0x4049(0x192)]=_0x5f586a[_0x4049(0x192)],this[_0x4049(0x1e5)](_0x4049(0x1b4),{'error':_0x230afc});}}async[_0x10b59d(0x1b1)](_0x308a48,_0x18bb7a){const _0x4d95c6=_0x10b59d;try{const _0x3a7651=await this[_0x4d95c6(0x18e)][_0x4d95c6(0x1d8)](_0x308a48)[_0x4d95c6(0x1e0)](),_0x498168=await this[_0x4d95c6(0x18e)][_0x4d95c6(0x1c5)](_0x308a48)[_0x4d95c6(0x181)](),_0xf27d77=_0x498168[0x0][_0x4d95c6(0x1e6)];this[_0x4d95c6(0x1e8)]=!0x0,this['id']=_0x3a7651['id'],_0x4d95c6(0x1e2)in _0x3a7651?this[_0x4d95c6(0x1e5)](_0x4d95c6(0x1d3),_0x3a7651[_0x4d95c6(0x1e2)],!0x0):this[_0x4d95c6(0x1e5)](_0x4d95c6(0x1d3),'',!0x0);const _0x386cea=(await this[_0x4d95c6(0x19d)][_0x4d95c6(0x1dc)]())[_0x4d95c6(0x1e7)](_0x147074=>_0x147074['id'][_0x4d95c6(0x1c8)]()===_0xf27d77[_0x4d95c6(0x1c8)]());return this[_0x4d95c6(0x1ea)]=_0x386cea,this[_0x4d95c6(0x1e5)](_0x4d95c6(0x1e1),{'selectedModel':_0x386cea,'isDisabled':!0x0}),await this[_0x4d95c6(0x18b)](_0x498168,_0x18bb7a,_0xf27d77),this[_0x4d95c6(0x1b7)]=void 0x0,this;}catch(_0x206358){const _0x566b11=new _0x2c60c8(_0x4d95c6(0x1c6),null,{'message':_0x206358[_0x4d95c6(0x1db)],'conversationId':_0x308a48});throw _0x566b11[_0x4d95c6(0x192)]=_0x206358[_0x4d95c6(0x192)],this[_0x4d95c6(0x1e5)](_0x4d95c6(0x1b4),{'error':_0x566b11}),_0x566b11;}}async[_0x10b59d(0x18b)](_0x389a6a,_0x3b3374,_0x16e9f7){const _0x2b77cc=_0x10b59d;let _0x54f235;for(const _0x149c7f of _0x389a6a)if(_0x2b77cc(0x19b)===_0x149c7f[_0x2b77cc(0x1be)]){const _0x68c37d=await this[_0x2b77cc(0x1dd)](_0x149c7f),_0x35d076={'isReasoningEnabled':Object[_0x2b77cc(0x1f0)](_0x149c7f[_0x2b77cc(0x1a6)],_0x2b77cc(0x1a9)),'isWebSearchEnabled':Object[_0x2b77cc(0x1f0)](_0x149c7f[_0x2b77cc(0x1a6)],_0x2b77cc(0x1c9))};_0x54f235=this[_0x2b77cc(0x185)]({'userMessage':_0x149c7f[_0x2b77cc(0x194)],'contextItems':_0x68c37d,'capabilities':_0x35d076,'modelId':_0x16e9f7,'quickActionData':_0x149c7f[_0x2b77cc(0x1c0)]?.[_0x2b77cc(0x1ef)]}),this[_0x2b77cc(0x1b7)]=_0x54f235,this[_0x2b77cc(0x1a5)][_0x2b77cc(0x186)](this[_0x2b77cc(0x1b7)][_0x2b77cc(0x199)]);}else{if(_0x2b77cc(0x1c1)===_0x149c7f[_0x2b77cc(0x1be)]&&_0x54f235)for(const _0x25bd47 of _0x149c7f[_0x2b77cc(0x1a1)]){const _0x19143b=_0x2b77cc(0x1f4)===_0x25bd47[_0x2b77cc(0x1ac)]?_0x2b77cc(0x1d0):_0x2b77cc(0x1a7),_0x282310=_0x54f235[_0x2b77cc(0x1df)]()?.[_0x2b77cc(0x1ca)]!==_0x3b3374;_0x54f235[_0x2b77cc(0x1c2)]=_0x54f235[_0x2b77cc(0x1e9)]({'type':_0x19143b,'isDone':!0x0,'interactionId':_0x54f235['id'],'areActionsDisabled':_0x282310}),_0x54f235[_0x2b77cc(0x1c2)][_0x2b77cc(0x196)](_0x25bd47[_0x2b77cc(0x1a1)]);}}}async[_0x10b59d(0x1dd)](_0x4b1b6e){const _0xf98e8f=_0x10b59d,_0x158f69=new Map();if(!_0x4b1b6e[_0xf98e8f(0x1a1)])return _0x158f69;for(const _0xc6bb64 of _0x4b1b6e[_0xf98e8f(0x1a1)]){const _0x2be008=await this[_0xf98e8f(0x1a5)][_0xf98e8f(0x1d7)](_0xc6bb64);_0x2be008&&_0x158f69[_0xf98e8f(0x190)](_0x2be008['id'],_0x2be008);}return _0x158f69;}async[_0x10b59d(0x1c7)]({userMessage:_0x4b37f8,quickActionData:_0x2f4b96}){const _0x3de978=_0x10b59d;if(!this[_0x3de978(0x1e8)])throw new _0x2c60c8(_0x3de978(0x19f),null,{'conversation':this});if(this[_0x3de978(0x1b7)])throw new _0x2c60c8(_0x3de978(0x1ce),null,{'conversation':this});try{const _0x2e0dc1=this[_0x3de978(0x1a5)][_0x3de978(0x1d9)](),_0x41c132=this[_0x3de978(0x195)][_0x3de978(0x1bf)](),_0x346856=this[_0x3de978(0x1ea)]['id'];this[_0x3de978(0x1b7)]=this[_0x3de978(0x185)]({'userMessage':_0x4b37f8,'contextItems':_0x2e0dc1,'capabilities':_0x41c132,'modelId':_0x346856,'quickActionData':_0x2f4b96}),await this[_0x3de978(0x1b7)][_0x3de978(0x184)](),this[_0x3de978(0x1a5)][_0x3de978(0x186)](this[_0x3de978(0x1b7)][_0x3de978(0x199)]);}catch(_0x2c6c90){this[_0x3de978(0x1e5)](_0x3de978(0x1b4),{'interactionId':this[_0x3de978(0x1b7)]?this[_0x3de978(0x1b7)]['id']:void 0x0,'error':_0x2c6c90});}finally{this[_0x3de978(0x1b7)]?.[_0x3de978(0x1f3)](),this[_0x3de978(0x1b7)]=void 0x0;}}[_0x10b59d(0x185)]({userMessage:_0x3e96d5,contextItems:_0x9be780,capabilities:_0xd01c39,modelId:_0x2ac113,quickActionData:_0x2e9473}){const _0x1c4b93=_0x10b59d,_0xe6ea82=new _0x4a0e78({'userMessage':_0x3e96d5,'contextItems':_0x9be780,'capabilities':_0xd01c39,'conversationId':this['id'],'connector':this[_0x1c4b93(0x18e)],'editor':this[_0x1c4b93(0x1aa)][_0x1c4b93(0x1ba)]&&this[_0x1c4b93(0x1aa)][_0x1c4b93(0x1ba)](),'model':_0x2ac113,'quickActionData':_0x2e9473});return _0xe6ea82[_0x1c4b93(0x1da)](..._0x1dbe0e)['to'](this),this[_0x1c4b93(0x187)][_0x1c4b93(0x1d5)](_0xe6ea82),this[_0x1c4b93(0x1e5)](_0x1c4b93(0x1c3),_0xe6ea82),_0xe6ea82;}[_0x10b59d(0x183)](_0x21a9d6){const _0x4670e2=_0x10b59d;return this[_0x4670e2(0x187)][_0x4670e2(0x1e7)](_0x555f8d=>_0x555f8d['id']===_0x21a9d6);}[_0x10b59d(0x1b8)](_0x1eff6a){const _0x4b4406=_0x10b59d,_0x64fa3c=this[_0x4b4406(0x183)](_0x1eff6a);_0x64fa3c&&(_0x64fa3c[_0x4b4406(0x1de)](),this[_0x4b4406(0x187)][_0x4b4406(0x18c)](this[_0x4b4406(0x187)][_0x4b4406(0x1cf)](_0x64fa3c),0x1));}get[_0x10b59d(0x19e)](){const _0x453069=_0x10b59d;return this[_0x453069(0x187)][this[_0x453069(0x187)][_0x453069(0x18f)]-0x1];}[_0x10b59d(0x1bd)](_0x3844a2){const _0x4d9541=_0x10b59d;this[_0x4d9541(0x1a5)][_0x4d9541(0x1bd)](_0x3844a2);}async[_0x10b59d(0x182)]({content:_0x5ec104,version:_0x22c3a4,sessionId:_0x16f783,selections:_0x10de68}){const _0x401ebb=_0x10b59d;await this[_0x401ebb(0x1a5)][_0x401ebb(0x1a4)](_0x5ec104,_0x22c3a4,_0x16f783,_0x10de68);}[_0x10b59d(0x1ae)](){const _0xbe2dd0=_0x10b59d;return this[_0xbe2dd0(0x1b7)]?.[_0xbe2dd0(0x1df)]()?.[_0xbe2dd0(0x1a1)]||'';}[_0x10b59d(0x1b2)](_0x16aa5d){const _0x4b0b64=_0x10b59d;this[_0x4b0b64(0x1a5)][_0x4b0b64(0x1b2)](_0x16aa5d);}[_0x10b59d(0x19c)](){const _0x42d9db=_0x10b59d;this[_0x42d9db(0x1a5)][_0x42d9db(0x19c)]();}[_0x10b59d(0x1eb)](_0x25a1fa){const _0x3cebd1=_0x10b59d;this[_0x3cebd1(0x1a5)][_0x3cebd1(0x1eb)](_0x25a1fa);}[_0x10b59d(0x198)](_0x2caf56){const _0x1137b5=_0x10b59d;this[_0x1137b5(0x1a5)][_0x1137b5(0x198)](_0x2caf56);}[_0x10b59d(0x1e4)](_0x3644cb,_0x2c25d2){const _0xcf97aa=_0x10b59d;this[_0xcf97aa(0x1a5)][_0xcf97aa(0x1e4)](_0x3644cb,_0x2c25d2);}[_0x10b59d(0x1cc)](_0x5540fc,_0x21f806,_0x2f8e7d){const _0xfbec71=_0x10b59d;return this[_0xfbec71(0x1a5)][_0xfbec71(0x1cc)](_0x5540fc,_0x21f806,_0x2f8e7d);}[_0x10b59d(0x1af)](_0x2cb1c8){const _0x1a8501=_0x10b59d;this[_0x1a8501(0x1a5)][_0x1a8501(0x1af)](_0x2cb1c8);}[_0x10b59d(0x1d1)](){const _0x9b2e77=_0x10b59d;this[_0x9b2e77(0x195)][_0x9b2e77(0x1d1)]();}[_0x10b59d(0x1cb)](){const _0x2842b1=_0x10b59d;this[_0x2842b1(0x195)][_0x2842b1(0x1cb)]();}[_0x10b59d(0x1a3)](){const _0x415206=_0x10b59d;return this[_0x415206(0x1a5)][_0x415206(0x1a3)]();}[_0x10b59d(0x19a)](){const _0x54dcba=_0x10b59d;return this[_0x54dcba(0x1a5)][_0x54dcba(0x19a)]();}[_0x10b59d(0x1d4)](){const _0x3f4ba3=_0x10b59d;return this[_0x3f4ba3(0x1a5)][_0x3f4ba3(0x1d4)]();}async[_0x10b59d(0x1a2)](_0x49ac73){const _0x20c863=_0x10b59d;_0x49ac73?!0x1===await this[_0x20c863(0x19d)][_0x20c863(0x193)](_0x49ac73)&&(_0x307623(_0x20c863(0x1b5),{'conversation':this,'model':_0x49ac73}),_0x49ac73=(await this[_0x20c863(0x19d)][_0x20c863(0x1d2)]())[0x0]):(_0x307623(_0x20c863(0x1b9),{'conversation':this}),_0x49ac73=(await this[_0x20c863(0x19d)][_0x20c863(0x1d2)]())[0x0]),_0x49ac73['id']!==this[_0x20c863(0x1ea)]?.['id']&&(this[_0x20c863(0x1ea)]=_0x49ac73,this[_0x20c863(0x195)][_0x20c863(0x1b6)](),this[_0x20c863(0x1e5)](_0x20c863(0x1e1),{'selectedModel':_0x49ac73}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x198813=_0x2b39;(function(_0x4a16a9,_0x3c89a9){var _0x1846a6=_0x2b39,_0x7eb6d0=_0x4a16a9();while(!![]){try{var _0x155542=parseInt(_0x1846a6(0x1ac))/0x1+parseInt(_0x1846a6(0x1b8))/0x2+parseInt(_0x1846a6(0x1af))/0x3*(-parseInt(_0x1846a6(0x1b0))/0x4)+-parseInt(_0x1846a6(0x1b7))/0x5+-parseInt(_0x1846a6(0x1b4))/0x6*(parseInt(_0x1846a6(0x1b9))/0x7)+parseInt(_0x1846a6(0x1b6))/0x8*(-parseInt(_0x1846a6(0x1b2))/0x9)+parseInt(_0x1846a6(0x1bb))/0xa;if(_0x155542===_0x3c89a9)break;else _0x7eb6d0['push'](_0x7eb6d0['shift']());}catch(_0x1ca3bc){_0x7eb6d0['push'](_0x7eb6d0['shift']());}}}(_0x1da2,0x2caed));function _0x2b39(_0x5b13fc,_0x55cdea){var _0x1da281=_0x1da2();return _0x2b39=function(_0x2b391e,_0x5263d0){_0x2b391e=_0x2b391e-0x1ab;var _0x30b5b2=_0x1da281[_0x2b391e];return _0x30b5b2;},_0x2b39(_0x5b13fc,_0x55cdea);}import{AICapabilities as _0x85eb}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x3ac3f6}from'../../aicore/model/aiinteraction.js';function _0x1da2(){var _0x4aea1a=['connector','getDocumentContext','187837uoRPIL','getCapabilitiesRequestData','userMessage','205680WBMFWW','4EKRRKU','contextItems','619002ziEsZc','get','324xFAEvH','queryAssistant','24jbpkID','1755620JYFtHZ','574012SgCwMY','22323hkXcTS','sendRequest','5064020GxFZjb','quickActionData','current-document','mapContextItemsToRequestData','model','conversationId','capabilities'];_0x1da2=function(){return _0x4aea1a;};return _0x1da2();}import{AIChatContext as _0x13de9a}from'./aichatcontext.js';export class AIChatInteraction extends _0x3ac3f6{[_0x198813(0x1ae)];[_0x198813(0x1c0)];[_0x198813(0x1b1)]=new Map();[_0x198813(0x1bf)];[_0x198813(0x1bc)];constructor(_0x1c423d){var _0x12d148=_0x198813;super(_0x1c423d),this[_0x12d148(0x1c0)]=_0x1c423d[_0x12d148(0x1c0)],this[_0x12d148(0x1b1)]=_0x1c423d[_0x12d148(0x1b1)],this[_0x12d148(0x1c1)]=_0x1c423d[_0x12d148(0x1c1)],this[_0x12d148(0x1ae)]=_0x1c423d[_0x12d148(0x1ae)],this[_0x12d148(0x1bf)]=_0x1c423d[_0x12d148(0x1bf)],this[_0x12d148(0x1bc)]=_0x1c423d[_0x12d148(0x1bc)];}async[_0x198813(0x1ba)](){var _0x1526e9=_0x198813;return this[_0x1526e9(0x1c2)][_0x1526e9(0x1b5)]({'message':this[_0x1526e9(0x1ae)],'conversationId':this[_0x1526e9(0x1c0)],'parts':_0x13de9a[_0x1526e9(0x1be)](this[_0x1526e9(0x1b1)]),'capabilities':_0x85eb[_0x1526e9(0x1ad)](this[_0x1526e9(0x1c1)]),'model':this[_0x1526e9(0x1bf)],'quickActionData':this[_0x1526e9(0x1bc)]});}[_0x198813(0x1ab)](){var _0x278366=_0x198813;return this[_0x278366(0x1b1)][_0x278366(0x1b3)](_0x278366(0x1bd));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0xf86c(_0x13711d,_0x13febf){const _0x2175d4=_0x2175();return _0xf86c=function(_0xf86c2,_0x17dbf7){_0xf86c2=_0xf86c2-0xda;let _0x2742ee=_0x2175d4[_0xf86c2];return _0x2742ee;},_0xf86c(_0x13711d,_0x13febf);}const _0xa62ea1=_0xf86c;(function(_0x19c3e4,_0x3284d6){const _0x3eaca3=_0xf86c,_0x470435=_0x19c3e4();while(!![]){try{const _0x319a7e=-parseInt(_0x3eaca3(0xe4))/0x1*(parseInt(_0x3eaca3(0xda))/0x2)+-parseInt(_0x3eaca3(0xe6))/0x3+-parseInt(_0x3eaca3(0xe1))/0x4+-parseInt(_0x3eaca3(0xe7))/0x5+-parseInt(_0x3eaca3(0xe5))/0x6+-parseInt(_0x3eaca3(0xde))/0x7*(parseInt(_0x3eaca3(0xdf))/0x8)+parseInt(_0x3eaca3(0xe2))/0x9;if(_0x319a7e===_0x3284d6)break;else _0x470435['push'](_0x470435['shift']());}catch(_0x5d801a){_0x470435['push'](_0x470435['shift']());}}}(_0x2175,0x54ee1));import{AIModels as _0x265d58}from'../../aicore/model/aimodels.js';export class AIChatModels extends _0x265d58{async[_0xa62ea1(0xe3)](){const _0x5a63a7=_0xa62ea1;return(await super[_0x5a63a7(0xe3)]())[_0x5a63a7(0xdb)]((_0x41cbb2,_0x36ab02)=>{const _0x312533=_0x5a63a7,_0x3b356=Object[_0x312533(0xdd)](_0x41cbb2[_0x312533(0xe8)])[_0x312533(0xe0)](_0x58d6cd=>_0x58d6cd[_0x312533(0xe9)])[_0x312533(0xdc)];return Object[_0x312533(0xdd)](_0x36ab02[_0x312533(0xe8)])[_0x312533(0xe0)](_0x4f5666=>_0x4f5666[_0x312533(0xe9)])[_0x312533(0xdc)]-_0x3b356;});}}function _0x2175(){const _0x3d4161=['capabilities','enabled','16TGTBKe','sort','length','values','8351DMrBvH','3800UvvuAt','filter','730792obKhwr','23440365vatEyp','getAll','27578HxtiAL','1356144MjPvSN','1264314YXNlpS','3195765uyHplm'];_0x2175=function(){return _0x3d4161;};return _0x2175();}
|