@simai-studio/chat 0.0.0-stage → 1.1.0
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/LICENSE.md +182 -0
- package/README.md +67 -2
- package/dist/package-receipt.json +1553 -0
- package/dist/set.json +107 -0
- package/dist/smart/chat-composer/aliases.json +67 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +698 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +223 -0
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +550 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1028 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +73 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +28 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +28 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +416 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +651 -0
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +20 -0
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +20 -0
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +99 -0
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +20 -0
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +110 -0
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/studio.fixture.json +18 -0
- package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-composer/studio.scenario.json +37 -0
- package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +198 -0
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +109 -0
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +89 -0
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/aliases.json +20 -0
- package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +436 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +72 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/examples.json +379 -0
- package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/en.json +13 -0
- package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
- package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
- package/dist/smart/chat-interlocutor/probe.json +204 -0
- package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +110 -0
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +58 -0
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.js +43 -0
- package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
- package/dist/smart/chat-message/aliases.json +125 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +850 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +2260 -0
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -0
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +1626 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5859 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +15 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +176 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +180 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1051 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +824 -0
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +2 -0
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +2 -0
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +13 -0
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +2 -0
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +2 -0
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +40 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +22 -0
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +2 -0
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +2 -0
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +2 -0
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/default/waiting.html +2 -0
- package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +2 -0
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +2 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +12 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +452 -0
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/studio.fixture.json +27 -0
- package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-message/studio.scenario.json +22 -0
- package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +1805 -0
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-message/template/default.js +27 -0
- package/dist/smart/chat-message/template/default.js.gz +0 -0
- package/dist/smart/chat-message/template/person.js +11 -0
- package/dist/smart/chat-message/template/person.js.gz +0 -0
- package/dist/smart/chat-threads/aliases.json +174 -0
- package/dist/smart/chat-threads/aliases.json.gz +0 -0
- package/dist/smart/chat-threads/component.json +1240 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +134 -0
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +689 -0
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +859 -0
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/lang/en.json +18 -0
- package/dist/smart/chat-threads/lang/en.json.gz +0 -0
- package/dist/smart/chat-threads/lang/ru.json +18 -0
- package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
- package/dist/smart/chat-threads/probe.json +406 -0
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +1159 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +50 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +50 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +104 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +503 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/studio.fixture.json +23 -0
- package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +113 -0
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/template/default.js +62 -0
- package/dist/smart/chat-threads/template/default.js.gz +0 -0
- package/dist/smart/chat-window/aliases.json +395 -0
- package/dist/smart/chat-window/aliases.json.gz +0 -0
- package/dist/smart/chat-window/component.json +2819 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1509 -0
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -0
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +2798 -0
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +12780 -0
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -0
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/lang/en.json +212 -0
- package/dist/smart/chat-window/lang/en.json.gz +0 -0
- package/dist/smart/chat-window/lang/ru.json +218 -0
- package/dist/smart/chat-window/lang/ru.json.gz +0 -0
- package/dist/smart/chat-window/probe.json +2023 -0
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +2844 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +100 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +125 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +125 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +104 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +161 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +123 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +123 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +526 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/studio.fixture.json +13 -0
- package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-window/studio.scenario.json +95 -0
- package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1168 -0
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/chat-window/template/default.js +12 -0
- package/dist/smart/chat-window/template/default.js.gz +0 -0
- package/dist/smart/rule.js +193 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ "87be7f608247"
|
|
6
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
|
|
8
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("deb1a4d61565");
|
|
11
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5b7d7695b41b");
|
|
12
|
+
/* harmony import */ var _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("e92fd2d1a38c");
|
|
13
|
+
/* harmony import */ var _js_templates_default_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("5bdd39ee6055");
|
|
14
|
+
/* harmony import */ var _component_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("158c3492ef32");
|
|
15
|
+
/* harmony import */ var _aliases_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("8dd31d33c740");
|
|
16
|
+
/* harmony import */ var _lang_en_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("8e9da33da7a1");
|
|
17
|
+
/* harmony import */ var _lang_ru_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("b853de4604c1");
|
|
18
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_3__]);
|
|
19
|
+
([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
20
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__);
|
|
21
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__);
|
|
22
|
+
/* harmony import */ var _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__);
|
|
23
|
+
// Who a conversation is with. It came from simai/ui-chat (D31: components live
|
|
24
|
+
// in the Framework or in ui-pro, owner 2026-10-26; the move approved
|
|
25
|
+
// 2026-10-27), where a chat window placed it in its header.
|
|
26
|
+
//
|
|
27
|
+
// The list is the server's (Mirai24 bootstrap.interlocutors); this only shows
|
|
28
|
+
// it and reports a choice. A conversation belongs to one interlocutor, so
|
|
29
|
+
// choosing another one is a request for a new conversation, which the host
|
|
30
|
+
// makes; the element never changes `value` itself.
|
|
31
|
+
//
|
|
32
|
+
// One interlocutor is a name, not a choice: the button is disabled and says
|
|
33
|
+
// nothing about a menu. A conversation with one the server no longer lists
|
|
34
|
+
// (Mirai24 v1.1: the administrator's assistant gone into the personal one,
|
|
35
|
+
// its old threads kept) is named by the word «Помощник», never by an empty line.
|
|
36
|
+
//
|
|
37
|
+
// It is a thin element over the Framework's sf-menu-context: radio rows, the
|
|
38
|
+
// current one checked, the person's own interlocutors first and the knowledge
|
|
39
|
+
// bases' under their heading once both are there, and the menu's search from
|
|
40
|
+
// eight of them.
|
|
41
|
+
//
|
|
42
|
+
// From its component.json (standard simai.smart-component 1.3.9 §3, §4, §8,
|
|
43
|
+
// §11): the settings and the value are attributes and properties made by
|
|
44
|
+
// core/js/element-manifest.js, its words are lang/<locale>.json, the actions
|
|
45
|
+
// answer outcomes, and the choice is the vocabulary's `select {id}`; the old
|
|
46
|
+
// name sf-chat-interlocutor follows until 2026-12-01 (aliases.json).
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
// From this many, the menu gets a search field.
|
|
55
|
+
|
|
56
|
+
const SEARCH_FROM = 8;
|
|
57
|
+
|
|
58
|
+
const applied = () => ({
|
|
59
|
+
outcome: "applied"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const refused = reason => ({
|
|
63
|
+
outcome: "refused",
|
|
64
|
+
reason
|
|
65
|
+
}); // One interlocutor as the element holds it: id a string, the title text.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
const normalOption = one => ({ ...one,
|
|
69
|
+
id: String(one?.id ?? ""),
|
|
70
|
+
title: String(one?.title ?? "")
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const ChatInterlocutorElement = (0,_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__.elementFromManifest)(_component_json__WEBPACK_IMPORTED_MODULE_4__, {
|
|
74
|
+
base: (_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default()),
|
|
75
|
+
lang: {
|
|
76
|
+
en: _lang_en_json__WEBPACK_IMPORTED_MODULE_6__,
|
|
77
|
+
ru: _lang_ru_json__WEBPACK_IMPORTED_MODULE_7__
|
|
78
|
+
},
|
|
79
|
+
source: "ru",
|
|
80
|
+
aliases: _aliases_json__WEBPACK_IMPORTED_MODULE_5__,
|
|
81
|
+
actions: {
|
|
82
|
+
"set-options"({
|
|
83
|
+
options
|
|
84
|
+
}) {
|
|
85
|
+
this.options = options;
|
|
86
|
+
return applied();
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
open() {
|
|
90
|
+
return this.openMenu();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
class SfChatInterlocutor extends ChatInterlocutorElement {
|
|
97
|
+
static get props() {
|
|
98
|
+
return { ...super.props,
|
|
99
|
+
templateName: {
|
|
100
|
+
attribute: "template",
|
|
101
|
+
default: "default"
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
constructor() {
|
|
107
|
+
super(); // A value set as a property before the element was defined is an own
|
|
108
|
+
// property that would hide the accessor; it is taken through it.
|
|
109
|
+
|
|
110
|
+
for (const name of ["options", "value"]) {
|
|
111
|
+
if (!Object.prototype.hasOwnProperty.call(this, name)) continue;
|
|
112
|
+
const early = this[name];
|
|
113
|
+
delete this[name];
|
|
114
|
+
this[name] = early;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** The interlocutors as given, ids as strings; anything else is none. */
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
get list() {
|
|
121
|
+
const options = this.options;
|
|
122
|
+
return Array.isArray(options) ? options.filter(one => one && typeof one === "object").map(normalOption) : [];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
get single() {
|
|
126
|
+
return this.list.length < 2;
|
|
127
|
+
} // The description's id is the element's path (§7.1.1), never a counter.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
get noteId() {
|
|
131
|
+
return (0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.partId)((0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.instancePath)(this, {
|
|
132
|
+
kind: "sf-chat-interlocutor"
|
|
133
|
+
}), "note");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
templateContext() {
|
|
137
|
+
const value = String(this.value ?? "");
|
|
138
|
+
const current = this.list.find(one => one.id === value);
|
|
139
|
+
const title = current?.title || (value ? this.sfWord("assistant-text") : "");
|
|
140
|
+
const single = this.single;
|
|
141
|
+
return {
|
|
142
|
+
component: this,
|
|
143
|
+
title,
|
|
144
|
+
label: current?.title ? this.sfWord("button-label", {
|
|
145
|
+
vars: {
|
|
146
|
+
title
|
|
147
|
+
}
|
|
148
|
+
}) : title,
|
|
149
|
+
single,
|
|
150
|
+
noteId: this.noteId,
|
|
151
|
+
note: single ? "" : this.sfWord("change-text"),
|
|
152
|
+
menuLabel: this.sfWord("menu-label")
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
template() {
|
|
157
|
+
return (0,_js_templates_default_js__WEBPACK_IMPORTED_MODULE_3__.renderChatInterlocutorTemplate)(this.templateContext());
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
get button() {
|
|
161
|
+
return this.querySelector(".sf-chat-interlocutor__button");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get menu() {
|
|
165
|
+
return this.querySelector(".sf-chat-interlocutor__menu");
|
|
166
|
+
}
|
|
167
|
+
/** The menu's rows: radio entries, the person's own first, then the bases'. */
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
entries() {
|
|
171
|
+
const value = String(this.value ?? "");
|
|
172
|
+
|
|
173
|
+
const row = one => ({
|
|
174
|
+
id: one.id,
|
|
175
|
+
text: one.title,
|
|
176
|
+
kind: "radio",
|
|
177
|
+
checked: one.id === value
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
const list = this.list;
|
|
181
|
+
const own = list.filter(one => one.kind !== "knowledge");
|
|
182
|
+
const bases = list.filter(one => one.kind === "knowledge");
|
|
183
|
+
const grouped = own.length && bases.length;
|
|
184
|
+
return [...(grouped ? [{
|
|
185
|
+
type: "heading",
|
|
186
|
+
text: this.sfWord("group-own-text")
|
|
187
|
+
}] : []), ...own.map(row), ...(grouped ? [{
|
|
188
|
+
type: "heading",
|
|
189
|
+
text: this.sfWord("group-knowledge-text")
|
|
190
|
+
}] : []), ...bases.map(row), {
|
|
191
|
+
type: "separator"
|
|
192
|
+
}, {
|
|
193
|
+
type: "heading",
|
|
194
|
+
text: this.sfWord("change-text")
|
|
195
|
+
}];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
openMenu() {
|
|
199
|
+
if (this.single) return refused("single");
|
|
200
|
+
const menu = this.menu;
|
|
201
|
+
const button = this.button;
|
|
202
|
+
if (!menu || !button) return refused("unavailable");
|
|
203
|
+
menu.search = this.list.length >= SEARCH_FROM ? {
|
|
204
|
+
placeholder: this.sfWord("search-placeholder"),
|
|
205
|
+
empty: this.sfWord("search-empty-text")
|
|
206
|
+
} : null;
|
|
207
|
+
menu.entries = this.entries(); // The Loader brings sf-menu-context when the page is ready (the rule
|
|
208
|
+
// fetches it lazily); a press before that waits for it.
|
|
209
|
+
|
|
210
|
+
customElements.whenDefined("sf-menu-context").then(() => menu.toggleFor(button));
|
|
211
|
+
return applied();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
onMenuSelect(detail = {}) {
|
|
215
|
+
const id = String(detail.id ?? detail.entry?.id ?? "");
|
|
216
|
+
if (id && id !== String(this.value ?? "")) this.sfEmit("select", {
|
|
217
|
+
id
|
|
218
|
+
}, {
|
|
219
|
+
cancelable: true
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
SfChatInterlocutor.define("sf-chat-interlocutor");
|
|
226
|
+
__webpack_async_result__();
|
|
227
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
228
|
+
|
|
229
|
+
/***/ },
|
|
230
|
+
|
|
231
|
+
/***/ "5bdd39ee6055"
|
|
232
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
233
|
+
|
|
234
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
235
|
+
__webpack_require__.r(__webpack_exports__);
|
|
236
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
237
|
+
/* harmony export */ renderChatInterlocutorTemplate: () => (/* binding */ renderChatInterlocutorTemplate)
|
|
238
|
+
/* harmony export */ });
|
|
239
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a080a730149");
|
|
240
|
+
/* harmony import */ var _default_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3be755c1e72b");
|
|
241
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lit__WEBPACK_IMPORTED_MODULE_0__]);
|
|
242
|
+
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
243
|
+
lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
|
244
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lit__WEBPACK_IMPORTED_MODULE_0__);
|
|
245
|
+
|
|
246
|
+
// Whom the conversation is with: one native button that names the current
|
|
247
|
+
// interlocutor, its chevron, the sentence that describes it to a screen reader
|
|
248
|
+
// and the Framework's context menu it opens.
|
|
249
|
+
//
|
|
250
|
+
// With fewer than two interlocutors the button is a name: disabled, with no
|
|
251
|
+
// aria-haspopup, aria-expanded or description, and the chevron hidden.
|
|
252
|
+
// Otherwise it is a menu button, closed from the start (aria-expanded false);
|
|
253
|
+
// sf-menu-context sets aria-expanded while it is open and puts it back after,
|
|
254
|
+
// and the template writes it again only when the button stops or starts being
|
|
255
|
+
// a choice.
|
|
256
|
+
//
|
|
257
|
+
// The menu is printed closed: the first paint is the button (§5.4).
|
|
258
|
+
|
|
259
|
+
function renderChatInterlocutorTemplate(context) {
|
|
260
|
+
const {
|
|
261
|
+
component
|
|
262
|
+
} = context;
|
|
263
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`
|
|
264
|
+
<div class="sf-chat-interlocutor${context.single ? " sf-chat-interlocutor--single" : ""}">
|
|
265
|
+
<button
|
|
266
|
+
type="button"
|
|
267
|
+
class="sf-chat-interlocutor__button"
|
|
268
|
+
aria-label=${context.label}
|
|
269
|
+
aria-haspopup=${context.single ? lit__WEBPACK_IMPORTED_MODULE_0__.nothing : "menu"}
|
|
270
|
+
aria-expanded=${context.single ? lit__WEBPACK_IMPORTED_MODULE_0__.nothing : "false"}
|
|
271
|
+
aria-describedby=${context.single ? lit__WEBPACK_IMPORTED_MODULE_0__.nothing : context.noteId}
|
|
272
|
+
?disabled=${context.single}
|
|
273
|
+
@click=${() => component.openMenu()}
|
|
274
|
+
><span class="sf-chat-interlocutor__title">${context.title}</span><sf-icon
|
|
275
|
+
icon="expand_more" size="1/2" aria-hidden="true"></sf-icon></button>
|
|
276
|
+
<sf-menu-context
|
|
277
|
+
class="sf-chat-interlocutor__menu"
|
|
278
|
+
popup
|
|
279
|
+
aria-label=${context.menuLabel}
|
|
280
|
+
@sf-menu-context-select=${event => {
|
|
281
|
+
event.stopPropagation();
|
|
282
|
+
component.onMenuSelect(event.detail);
|
|
283
|
+
}}
|
|
284
|
+
></sf-menu-context>
|
|
285
|
+
<span class="sf-chat-interlocutor__note sr-only" id=${context.noteId}>${context.note}</span>
|
|
286
|
+
</div>
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
289
|
+
__webpack_async_result__();
|
|
290
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
291
|
+
|
|
292
|
+
/***/ },
|
|
293
|
+
|
|
294
|
+
/***/ "3be755c1e72b"
|
|
295
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
296
|
+
|
|
297
|
+
__webpack_require__.r(__webpack_exports__);
|
|
298
|
+
// extracted by mini-css-extract-plugin
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
/***/ },
|
|
302
|
+
|
|
303
|
+
/***/ "5b7d7695b41b"
|
|
304
|
+
(module) {
|
|
305
|
+
|
|
306
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("element-manifest", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("element-manifest", 1).then(resolve, reject), { once: true })));
|
|
307
|
+
|
|
308
|
+
/***/ },
|
|
309
|
+
|
|
310
|
+
/***/ "e92fd2d1a38c"
|
|
311
|
+
(module) {
|
|
312
|
+
|
|
313
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("instance-path", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("instance-path", 1).then(resolve, reject), { once: true })));
|
|
314
|
+
|
|
315
|
+
/***/ },
|
|
316
|
+
|
|
317
|
+
/***/ "2a080a730149"
|
|
318
|
+
(module) {
|
|
319
|
+
|
|
320
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("lit", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("lit", 1).then(resolve, reject), { once: true })));
|
|
321
|
+
|
|
322
|
+
/***/ },
|
|
323
|
+
|
|
324
|
+
/***/ "deb1a4d61565"
|
|
325
|
+
(module) {
|
|
326
|
+
|
|
327
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("smart-base", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("smart-base", 1).then(resolve, reject), { once: true })));
|
|
328
|
+
|
|
329
|
+
/***/ },
|
|
330
|
+
|
|
331
|
+
/***/ "8dd31d33c740"
|
|
332
|
+
(module) {
|
|
333
|
+
|
|
334
|
+
module.exports = /*#__PURE__*/JSON.parse('{"$comment":"Dated aliases of sf-chat-interlocutor for the shim (core/js/aliases.js, standard §16 item 20). The 0.3 event of simai/ui-chat follows the vocabulary\'s select with the same detail.","component":"sf-chat-interlocutor","since":"2026-10-28","remove_after":"2026-12-01","aliases":[{"from":"sf-chat-interlocutor","to":"sf-chat-interlocutor-select","kind":"event","component":"sf-chat-interlocutor","since":"2026-10-28","remove_after":"2026-12-01","mode":"same-detail","cancelable":true,"section":"§8, vocabulary §5 select, §7","note":"an event takes its tag and a verb; {id} is unchanged"}]}');
|
|
335
|
+
|
|
336
|
+
/***/ },
|
|
337
|
+
|
|
338
|
+
/***/ "158c3492ef32"
|
|
339
|
+
(module) {
|
|
340
|
+
|
|
341
|
+
module.exports = /*#__PURE__*/JSON.parse('{"id":"smart.chat-interlocutor","tag":"sf-chat-interlocutor","version":"1.0.9","kind":"leaf","settings":{"options":{"type":"list","default":[],"of":{"id":"id","title":"string","kind":{"type":"string","optional":true}},"entries":{"key":"id","changes":"content"}}},"values":{"value":{"type":"id","default":"","controlled":true}},"events":{"select":{"carries":{"id":"id"},"cancelable":true}},"actions":{"set-options":{"with":{"options":{"type":"list","schema":{"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"}},"required":["id","title"]}}}}},"open":{}},"host-states":{},"css-variables":{"--sf-chat-interlocutor-color":{"type":"color","state":"default"},"--sf-chat-interlocutor-icon-color":{"type":"color","state":"default"},"--sf-chat-interlocutor-hover-background-color":{"type":"color","state":"hover"},"--sf-chat-interlocutor-radius":{"type":"length","state":"default"},"--sf-chat-interlocutor-height":{"type":"length","state":"default"}}}');
|
|
342
|
+
|
|
343
|
+
/***/ },
|
|
344
|
+
|
|
345
|
+
/***/ "8e9da33da7a1"
|
|
346
|
+
(module) {
|
|
347
|
+
|
|
348
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Chat interlocutor","runtime":{"assistant-text":"Assistant","button-label":"Assistant: {title}","change-text":"Switching assistants starts a new conversation","group-knowledge-text":"Knowledge base assistants","group-own-text":"My assistants","menu-label":"Choose an assistant","search-empty-text":"Nothing found","search-placeholder":"Find an assistant"}}');
|
|
349
|
+
|
|
350
|
+
/***/ },
|
|
351
|
+
|
|
352
|
+
/***/ "b853de4604c1"
|
|
353
|
+
(module) {
|
|
354
|
+
|
|
355
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Собеседник чата","runtime":{"assistant-text":"Помощник","button-label":"Помощник: {title}","change-text":"При смене помощника начнётся новый разговор","group-knowledge-text":"Помощники баз","group-own-text":"Мои помощники","menu-label":"Выбрать помощника","search-empty-text":"Ничего не найдено","search-placeholder":"Найти помощника"}}');
|
|
356
|
+
|
|
357
|
+
/***/ }
|
|
358
|
+
|
|
359
|
+
/******/ });
|
|
360
|
+
/************************************************************************/
|
|
361
|
+
/******/ // The module cache
|
|
362
|
+
/******/ const __webpack_module_cache__ = {};
|
|
363
|
+
/******/
|
|
364
|
+
/******/ // The require function
|
|
365
|
+
/******/ function __webpack_require__(moduleId) {
|
|
366
|
+
/******/ // Check if module is in cache
|
|
367
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
368
|
+
/******/ if (cachedModule !== undefined) {
|
|
369
|
+
/******/ return cachedModule.exports;
|
|
370
|
+
/******/ }
|
|
371
|
+
/******/ // Create a new module (and put it into the cache)
|
|
372
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
373
|
+
/******/ // no module.id needed
|
|
374
|
+
/******/ // no module.loaded needed
|
|
375
|
+
/******/ exports: {}
|
|
376
|
+
/******/ };
|
|
377
|
+
/******/
|
|
378
|
+
/******/ // Execute the module function
|
|
379
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
380
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
381
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
382
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
383
|
+
/******/ throw e;
|
|
384
|
+
/******/ }
|
|
385
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
386
|
+
/******/
|
|
387
|
+
/******/ // Return the exports of the module
|
|
388
|
+
/******/ return module.exports;
|
|
389
|
+
/******/ }
|
|
390
|
+
/******/
|
|
391
|
+
/************************************************************************/
|
|
392
|
+
/******/ /* webpack/runtime/async module */
|
|
393
|
+
/******/ (() => {
|
|
394
|
+
/******/ const hasSymbol = typeof Symbol === "function";
|
|
395
|
+
/******/ const webpackQueues = hasSymbol ? Symbol("webpack queues") : "__webpack_queues__";
|
|
396
|
+
/******/ const webpackExports = hasSymbol ? Symbol("webpack exports") : "__webpack_exports__";
|
|
397
|
+
/******/ const webpackError = hasSymbol ? Symbol("webpack error") : "__webpack_error__";
|
|
398
|
+
/******/
|
|
399
|
+
/******/ const resolveQueue = (queue) => {
|
|
400
|
+
/******/ if(queue?.d < 1) {
|
|
401
|
+
/******/ queue.d = 1;
|
|
402
|
+
/******/ queue.forEach((fn) => (fn.r--));
|
|
403
|
+
/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
|
|
404
|
+
/******/ }
|
|
405
|
+
/******/ }
|
|
406
|
+
/******/ const wrapDeps = (deps) => (deps.map((dep) => {
|
|
407
|
+
/******/ if(dep !== null && typeof dep === "object") {
|
|
408
|
+
/******/
|
|
409
|
+
/******/ if(dep[webpackQueues]) return dep;
|
|
410
|
+
/******/ if(dep.then) {
|
|
411
|
+
/******/ const queue = [];
|
|
412
|
+
/******/ queue.d = 0;
|
|
413
|
+
/******/ dep.then((r) => {
|
|
414
|
+
/******/ obj[webpackExports] = r;
|
|
415
|
+
/******/ resolveQueue(queue);
|
|
416
|
+
/******/ }, (e) => {
|
|
417
|
+
/******/ obj[webpackError] = e;
|
|
418
|
+
/******/ resolveQueue(queue);
|
|
419
|
+
/******/ });
|
|
420
|
+
/******/ const obj = {};
|
|
421
|
+
/******/
|
|
422
|
+
/******/ obj[webpackQueues] = (fn) => (fn(queue));
|
|
423
|
+
/******/ return obj;
|
|
424
|
+
/******/ }
|
|
425
|
+
/******/ }
|
|
426
|
+
/******/ const ret = {};
|
|
427
|
+
/******/ ret[webpackQueues] = x => {};
|
|
428
|
+
/******/ ret[webpackExports] = dep;
|
|
429
|
+
/******/ return ret;
|
|
430
|
+
/******/ }));
|
|
431
|
+
/******/ __webpack_require__.a = (module, body, hasAwait) => {
|
|
432
|
+
/******/ let queue;
|
|
433
|
+
/******/ hasAwait && ((queue = []).d = -1);
|
|
434
|
+
/******/ const depQueues = new Set();
|
|
435
|
+
/******/ const exports = module.exports;
|
|
436
|
+
/******/ let currentDeps;
|
|
437
|
+
/******/ let outerResolve;
|
|
438
|
+
/******/ let reject;
|
|
439
|
+
/******/ const promise = new Promise((resolve, rej) => {
|
|
440
|
+
/******/ reject = rej;
|
|
441
|
+
/******/ outerResolve = resolve;
|
|
442
|
+
/******/ });
|
|
443
|
+
/******/ promise[webpackExports] = exports;
|
|
444
|
+
/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
|
|
445
|
+
/******/ module.exports = promise;
|
|
446
|
+
/******/ const handle = (deps) => {
|
|
447
|
+
/******/ currentDeps = wrapDeps(deps);
|
|
448
|
+
/******/ let fn;
|
|
449
|
+
/******/ const getResult = () => (currentDeps.map((d) => {
|
|
450
|
+
/******/
|
|
451
|
+
/******/ if(d[webpackError]) throw d[webpackError];
|
|
452
|
+
/******/ return d[webpackExports];
|
|
453
|
+
/******/ }))
|
|
454
|
+
/******/ const promise = new Promise((resolve) => {
|
|
455
|
+
/******/ fn = () => (resolve(getResult));
|
|
456
|
+
/******/ fn.r = 0;
|
|
457
|
+
/******/ const fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
|
|
458
|
+
/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
|
|
459
|
+
/******/ });
|
|
460
|
+
/******/ return fn.r ? promise : getResult();
|
|
461
|
+
/******/ }
|
|
462
|
+
/******/ const done = (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))
|
|
463
|
+
/******/ body(handle, done);
|
|
464
|
+
/******/ queue?.d < 0 && (queue.d = 0);
|
|
465
|
+
/******/ };
|
|
466
|
+
/******/ })();
|
|
467
|
+
/******/
|
|
468
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
469
|
+
/******/ (() => {
|
|
470
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
471
|
+
/******/ __webpack_require__.n = (module) => {
|
|
472
|
+
/******/ const getter = module && module.__esModule ?
|
|
473
|
+
/******/ () => (module['default']) :
|
|
474
|
+
/******/ () => (module);
|
|
475
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
476
|
+
/******/ return getter;
|
|
477
|
+
/******/ };
|
|
478
|
+
/******/ })();
|
|
479
|
+
/******/
|
|
480
|
+
/******/ /* webpack/runtime/define property getters */
|
|
481
|
+
/******/ (() => {
|
|
482
|
+
/******/ // define getter/value functions for harmony exports
|
|
483
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
484
|
+
/******/ if(Array.isArray(definition)) {
|
|
485
|
+
/******/ var i = 0;
|
|
486
|
+
/******/ while(i < definition.length) {
|
|
487
|
+
/******/ var key = definition[i++];
|
|
488
|
+
/******/ var binding = definition[i++];
|
|
489
|
+
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
490
|
+
/******/ if(binding === 0) {
|
|
491
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
492
|
+
/******/ } else {
|
|
493
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
494
|
+
/******/ }
|
|
495
|
+
/******/ } else if(binding === 0) { i++; }
|
|
496
|
+
/******/ }
|
|
497
|
+
/******/ } else {
|
|
498
|
+
/******/ for(var key in definition) {
|
|
499
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
500
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
501
|
+
/******/ }
|
|
502
|
+
/******/ }
|
|
503
|
+
/******/ }
|
|
504
|
+
/******/ };
|
|
505
|
+
/******/ })();
|
|
506
|
+
/******/
|
|
507
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
508
|
+
/******/ (() => {
|
|
509
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
510
|
+
/******/ })();
|
|
511
|
+
/******/
|
|
512
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
513
|
+
/******/ (() => {
|
|
514
|
+
/******/ // define __esModule on exports
|
|
515
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
516
|
+
/******/ if(Symbol.toStringTag) {
|
|
517
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
518
|
+
/******/ }
|
|
519
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
520
|
+
/******/ };
|
|
521
|
+
/******/ })();
|
|
522
|
+
/******/
|
|
523
|
+
/************************************************************************/
|
|
524
|
+
/******/
|
|
525
|
+
/******/ // startup
|
|
526
|
+
/******/ // Load entry module and return exports
|
|
527
|
+
/******/ // This entry module used 'module' so it can't be inlined
|
|
528
|
+
/******/ let __webpack_exports__ = __webpack_require__("87be7f608247");
|
|
529
|
+
/******/
|
|
530
|
+
/******/ })()
|
|
531
|
+
;
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(()=>{"use strict";var e={"87be7f608247"(e,t,n){n.a(e,async(e,t)=>{try{var s=n("deb1a4d61565"),o=n("5b7d7695b41b"),r=n("e92fd2d1a38c"),a=n("5bdd39ee6055"),i=n("158c3492ef32"),l=n("8dd31d33c740"),c=n("8e9da33da7a1"),u=n("b853de4604c1"),d=e([s,o,r,a]);[s,o,r,a]=d.then?(await d)():d;var h=n.n(s);const p=8,f=()=>({outcome:"applied"}),b=e=>({outcome:"refused",reason:e}),m=e=>({...e,id:String(e?.id??""),title:String(e?.title??"")}),g=(0,o.elementFromManifest)(i,{base:h(),lang:{en:c,ru:u},source:"ru",aliases:l,actions:{"set-options"({options:e}){return this.options=e,f()},open(){return this.openMenu()}}});class y extends g{static get props(){return{...super.props,templateName:{attribute:"template",default:"default"}}}constructor(){super();for(const e of["options","value"]){if(!Object.prototype.hasOwnProperty.call(this,e))continue;const t=this[e];delete this[e],this[e]=t}}get list(){const e=this.options;return Array.isArray(e)?e.filter(e=>e&&"object"==typeof e).map(m):[]}get single(){return this.list.length<2}get noteId(){return(0,r.partId)((0,r.instancePath)(this,{kind:"sf-chat-interlocutor"}),"note")}templateContext(){const e=String(this.value??""),t=this.list.find(t=>t.id===e),n=t?.title||(e?this.sfWord("assistant-text"):""),s=this.single;return{component:this,title:n,label:t?.title?this.sfWord("button-label",{vars:{title:n}}):n,single:s,noteId:this.noteId,note:s?"":this.sfWord("change-text"),menuLabel:this.sfWord("menu-label")}}template(){return(0,a.p)(this.templateContext())}get button(){return this.querySelector(".sf-chat-interlocutor__button")}get menu(){return this.querySelector(".sf-chat-interlocutor__menu")}entries(){const e=String(this.value??""),t=t=>({id:t.id,text:t.title,kind:"radio",checked:t.id===e}),n=this.list,s=n.filter(e=>"knowledge"!==e.kind),o=n.filter(e=>"knowledge"===e.kind),r=s.length&&o.length;return[...r?[{type:"heading",text:this.sfWord("group-own-text")}]:[],...s.map(t),...r?[{type:"heading",text:this.sfWord("group-knowledge-text")}]:[],...o.map(t),{type:"separator"},{type:"heading",text:this.sfWord("change-text")}]}openMenu(){if(this.single)return b("single");const e=this.menu,t=this.button;return e&&t?(e.search=this.list.length>=p?{placeholder:this.sfWord("search-placeholder"),empty:this.sfWord("search-empty-text")}:null,e.entries=this.entries(),customElements.whenDefined("sf-menu-context").then(()=>e.toggleFor(t)),f()):b("unavailable")}onMenuSelect(e={}){const t=String(e.id??e.entry?.id??"");t&&t!==String(this.value??"")&&this.sfEmit("select",{id:t},{cancelable:!0})}}y.define("sf-chat-interlocutor"),t()}catch(e){t(e)}})},"5bdd39ee6055"(e,t,n){n.a(e,async(e,s)=>{try{n.d(t,{p:()=>i});var o=n("2a080a730149"),r=e([o]),a=r.then?(await r)():r;o=a[0];function i(e){const{component:t}=e;return o.html`
|
|
2
|
+
<div class="sf-chat-interlocutor${e.single?" sf-chat-interlocutor--single":""}">
|
|
3
|
+
<button
|
|
4
|
+
type="button"
|
|
5
|
+
class="sf-chat-interlocutor__button"
|
|
6
|
+
aria-label=${e.label}
|
|
7
|
+
aria-haspopup=${e.single?o.nothing:"menu"}
|
|
8
|
+
aria-expanded=${e.single?o.nothing:"false"}
|
|
9
|
+
aria-describedby=${e.single?o.nothing:e.noteId}
|
|
10
|
+
?disabled=${e.single}
|
|
11
|
+
@click=${()=>t.openMenu()}
|
|
12
|
+
><span class="sf-chat-interlocutor__title">${e.title}</span><sf-icon
|
|
13
|
+
icon="expand_more" size="1/2" aria-hidden="true"></sf-icon></button>
|
|
14
|
+
<sf-menu-context
|
|
15
|
+
class="sf-chat-interlocutor__menu"
|
|
16
|
+
popup
|
|
17
|
+
aria-label=${e.menuLabel}
|
|
18
|
+
@sf-menu-context-select=${e=>{e.stopPropagation(),t.onMenuSelect(e.detail)}}
|
|
19
|
+
></sf-menu-context>
|
|
20
|
+
<span class="sf-chat-interlocutor__note sr-only" id=${e.noteId}>${e.note}</span>
|
|
21
|
+
</div>
|
|
22
|
+
`}s()}catch(l){s(l)}})},"5b7d7695b41b"(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("element-manifest",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("element-manifest",1).then(e,t),{once:!0}))},e92fd2d1a38c(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("instance-path",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("instance-path",1).then(e,t),{once:!0}))},"2a080a730149"(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("lit",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("lit",1).then(e,t),{once:!0}))},deb1a4d61565(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("smart-base",1):new Promise((e,t)=>globalThis.addEventListener("sf-runtime-ready",()=>globalThis.SF.runtimeModule("smart-base",1).then(e,t),{once:!0}))},"8dd31d33c740"(e){e.exports=JSON.parse('{"$comment":"Dated aliases of sf-chat-interlocutor for the shim (core/js/aliases.js, standard §16 item 20). The 0.3 event of simai/ui-chat follows the vocabulary\'s select with the same detail.","component":"sf-chat-interlocutor","since":"2026-10-28","remove_after":"2026-12-01","aliases":[{"from":"sf-chat-interlocutor","to":"sf-chat-interlocutor-select","kind":"event","component":"sf-chat-interlocutor","since":"2026-10-28","remove_after":"2026-12-01","mode":"same-detail","cancelable":true,"section":"§8, vocabulary §5 select, §7","note":"an event takes its tag and a verb; {id} is unchanged"}]}')},"158c3492ef32"(e){e.exports=JSON.parse('{"id":"smart.chat-interlocutor","tag":"sf-chat-interlocutor","version":"1.0.9","kind":"leaf","settings":{"options":{"type":"list","default":[],"of":{"id":"id","title":"string","kind":{"type":"string","optional":true}},"entries":{"key":"id","changes":"content"}}},"values":{"value":{"type":"id","default":"","controlled":true}},"events":{"select":{"carries":{"id":"id"},"cancelable":true}},"actions":{"set-options":{"with":{"options":{"type":"list","schema":{"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"}},"required":["id","title"]}}}}},"open":{}},"host-states":{},"css-variables":{"--sf-chat-interlocutor-color":{"type":"color","state":"default"},"--sf-chat-interlocutor-icon-color":{"type":"color","state":"default"},"--sf-chat-interlocutor-hover-background-color":{"type":"color","state":"hover"},"--sf-chat-interlocutor-radius":{"type":"length","state":"default"},"--sf-chat-interlocutor-height":{"type":"length","state":"default"}}}')},"8e9da33da7a1"(e){e.exports=JSON.parse('{"title":"Chat interlocutor","runtime":{"assistant-text":"Assistant","button-label":"Assistant: {title}","change-text":"Switching assistants starts a new conversation","group-knowledge-text":"Knowledge base assistants","group-own-text":"My assistants","menu-label":"Choose an assistant","search-empty-text":"Nothing found","search-placeholder":"Find an assistant"}}')},b853de4604c1(e){e.exports=JSON.parse('{"title":"Собеседник чата","runtime":{"assistant-text":"Помощник","button-label":"Помощник: {title}","change-text":"При смене помощника начнётся новый разговор","group-knowledge-text":"Помощники баз","group-own-text":"Мои помощники","menu-label":"Выбрать помощника","search-empty-text":"Ничего не найдено","search-placeholder":"Найти помощника"}}')}};const t={};function n(s){const o=t[s];if(void 0!==o)return o.exports;const r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}(()=>{const e="function"==typeof Symbol,t=e?Symbol("webpack queues"):"__webpack_queues__",s=e?Symbol("webpack exports"):"__webpack_exports__",o=e?Symbol("webpack error"):"__webpack_error__",r=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};n.a=(e,n,a)=>{let i;a&&((i=[]).d=-1);const l=new Set,c=e.exports;let u,d,h;const p=new Promise((e,t)=>{h=t,d=e});p[s]=c,p[t]=e=>(i&&e(i),l.forEach(e),p.catch(e=>{})),e.exports=p;n(e=>{let n;u=(e=>e.map(e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){const n=[];n.d=0,e.then(e=>{a[s]=e,r(n)},e=>{a[o]=e,r(n)});const a={};return a[t]=e=>e(n),a}}const n={};return n[t]=e=>{},n[s]=e,n}))(e);const a=()=>u.map(e=>{if(e[o])throw e[o];return e[s]}),c=new Promise(e=>{n=()=>e(a),n.r=0;const s=e=>e!==i&&!l.has(e)&&(l.add(e),e&&!e.d&&(n.r++,e.push(n)));u.map(e=>e[t](s))});return n.r?c:a()},e=>(e?h(p[o]=e):d(c),r(i))),i?.d<0&&(i.d=0)}})(),n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var s=0;s<t.length;){var o=t[s++],r=t[s++];n.o(e,o)?0===r&&s++:0===r?Object.defineProperty(e,o,{enumerable:!0,value:t[s++]}):Object.defineProperty(e,o,{enumerable:!0,get:r})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);n("87be7f608247")})();
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Chat interlocutor",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"assistant-text": "Assistant",
|
|
5
|
+
"button-label": "Assistant: {title}",
|
|
6
|
+
"change-text": "Switching assistants starts a new conversation",
|
|
7
|
+
"group-knowledge-text": "Knowledge base assistants",
|
|
8
|
+
"group-own-text": "My assistants",
|
|
9
|
+
"menu-label": "Choose an assistant",
|
|
10
|
+
"search-empty-text": "Nothing found",
|
|
11
|
+
"search-placeholder": "Find an assistant"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Собеседник чата",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"assistant-text": "Помощник",
|
|
5
|
+
"button-label": "Помощник: {title}",
|
|
6
|
+
"change-text": "При смене помощника начнётся новый разговор",
|
|
7
|
+
"group-knowledge-text": "Помощники баз",
|
|
8
|
+
"group-own-text": "Мои помощники",
|
|
9
|
+
"menu-label": "Выбрать помощника",
|
|
10
|
+
"search-empty-text": "Ничего не найдено",
|
|
11
|
+
"search-placeholder": "Найти помощника"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
Binary file
|