ai12z 3.17.1-alpha.2 → 3.17.1-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/dist/cjs/ai12z-beacon.cjs.entry.js +13 -4
- package/dist/cjs/ai12z-category_2.cjs.entry.js +4 -4
- package/dist/cjs/ai12z-chat-message.cjs.entry.js +2 -2
- package/dist/cjs/ai12z-chat_2.cjs.entry.js +23 -14
- package/dist/cjs/ai12z-container.cjs.entry.js +5 -1390
- package/dist/cjs/ai12z-cta.cjs.entry.js +26 -18
- package/dist/cjs/ai12z-form.cjs.entry.js +1 -1
- package/dist/cjs/ai12z-inline-search.cjs.entry.js +3 -3
- package/dist/cjs/ai12z-spinner.cjs.entry.js +1 -1
- package/dist/cjs/chat-avatar_6.cjs.entry.js +11 -11
- package/dist/cjs/chatbot-history_2.cjs.entry.js +1 -1
- package/dist/cjs/dynamic-form.cjs.entry.js +1 -1
- package/dist/cjs/image-uploader_2.cjs.entry.js +2 -2
- package/dist/cjs/index.cjs.js +1 -0
- package/dist/cjs/library.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/purify.es-B7Ashs9w.js +1389 -0
- package/dist/cjs/search-results-page.cjs.entry.js +30 -21
- package/dist/collection/components/ai12z-beacon/ai12z-beacon.js +33 -4
- package/dist/collection/components/ai12z-bot/chat-history.js +1 -1
- package/dist/collection/components/ai12z-bot/components/hamburger-menu/hamburger-menu.js +4 -4
- package/dist/collection/components/ai12z-bot/components/interaction-buttons/interaction-buttons.js +5 -5
- package/dist/collection/components/ai12z-bot/components/liveagent-chat/liveagent-chat.js +1 -1
- package/dist/collection/components/ai12z-bot/components/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/ai12z-container/ai12z-container.js +1 -1
- package/dist/collection/components/ai12z-cta/ai12z-cta.css +29 -1
- package/dist/collection/components/ai12z-cta/ai12z-cta.js +24 -16
- package/dist/collection/components/ai12z-cta/components/Chat.js +13 -4
- package/dist/collection/components/ai12z-cta/components/DynamicForm.js +1 -1
- package/dist/collection/components/ai12z-cta/components/audiorecorder/audio-recorder.js +4 -4
- package/dist/collection/components/ai12z-form/ai12z-form.js +1 -1
- package/dist/collection/components/ai12z-inline-search/ai12z-inline-search.js +3 -3
- package/dist/collection/components/ai12z-knowledge-box/components/ai12z-chat-message.js +2 -2
- package/dist/collection/components/ai12z-search-panel/search-results-view.css +78 -46
- package/dist/collection/components/ai12z-search-panel/search-results-view.js +29 -20
- package/dist/collection/components/input/ImageUploader.js +1 -1
- package/dist/collection/components/input/Input.js +9 -9
- package/dist/collection/components/input/input.css +9 -2
- package/dist/collection/components/spinner/Spinner.js +1 -1
- package/dist/collection/global/tailwind.css +1 -1
- package/dist/components/ai12z-beacon.js +1 -1
- package/dist/components/ai12z-bot.js +1 -1
- package/dist/components/ai12z-chat-message.js +1 -1
- package/dist/components/ai12z-chat.js +1 -1
- package/dist/components/ai12z-container.js +1 -1
- package/dist/components/ai12z-cta.js +1 -1
- package/dist/components/ai12z-form.js +1 -1
- package/dist/components/ai12z-inline-search.js +1 -1
- package/dist/components/ai12z-input-form.js +1 -1
- package/dist/components/ai12z-knowledge-box.js +1 -1
- package/dist/components/ai12z-search-panel.js +1 -1
- package/dist/components/ai12z-spinner.js +1 -1
- package/dist/components/audio-recorder.js +1 -1
- package/dist/components/chatbot-history.js +1 -1
- package/dist/components/dynamic-form.js +1 -1
- package/dist/components/hamburger-menu.js +1 -1
- package/dist/components/image-uploader.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/interaction-buttons.js +1 -1
- package/dist/components/live-agent-chat.js +1 -1
- package/dist/components/p-1xDC9Sfq.js +1 -0
- package/dist/components/p-82j2i1Bw.js +2 -0
- package/dist/components/{p-CtGazkHl.js → p-BBIvme7X.js} +1 -1
- package/dist/components/{p-Ds7D6ZCB.js → p-BpnC79Lm.js} +1 -1
- package/dist/components/{p-BSf2OXiK.js → p-BswGpAXe.js} +1 -1
- package/dist/components/{p-D0PteXe-.js → p-C-Bd680U.js} +1 -1
- package/dist/components/{p-B2V-wD9o.js → p-ChhV7973.js} +1 -1
- package/dist/components/{p-ZASkuPTc.js → p-ClSkLu41.js} +1 -1
- package/dist/components/p-CmXVb_3J.js +1 -0
- package/dist/components/p-D4Bi4PpL.js +1 -0
- package/dist/components/p-DBojmc3T.js +1 -0
- package/dist/components/{p-6PVjY_1U.js → p-DM33B5uU.js} +1 -1
- package/dist/components/{p-Dx_iq8hO.js → p-DVU3eIHC.js} +1 -1
- package/dist/components/{p-DjI5tnxC.js → p-DkBtust7.js} +1 -1
- package/dist/components/p-DqZdaqsU.js +1 -0
- package/dist/components/{p-HK5PYpCA.js → p-VL7c6YwM.js} +1 -1
- package/dist/components/{p--Lo7lrbl.js → p-c6Z5KXDQ.js} +1 -1
- package/dist/components/p-kJpnWRAF.js +1 -0
- package/dist/components/p-wcfgc9LM.js +1 -0
- package/dist/components/{p-C01IHdTU.js → p-yhzHvmpm.js} +1 -1
- package/dist/components/search-results-page.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/ai12z-beacon.entry.js +13 -4
- package/dist/esm/ai12z-category_2.entry.js +4 -4
- package/dist/esm/ai12z-chat-message.entry.js +2 -2
- package/dist/esm/ai12z-chat_2.entry.js +23 -14
- package/dist/esm/ai12z-container.entry.js +2 -1387
- package/dist/esm/ai12z-cta.entry.js +26 -18
- package/dist/esm/ai12z-form.entry.js +1 -1
- package/dist/esm/ai12z-inline-search.entry.js +3 -3
- package/dist/esm/ai12z-spinner.entry.js +1 -1
- package/dist/esm/chat-avatar_6.entry.js +11 -11
- package/dist/esm/chatbot-history_2.entry.js +1 -1
- package/dist/esm/dynamic-form.entry.js +1 -1
- package/dist/esm/image-uploader_2.entry.js +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/library.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/purify.es-82j2i1Bw.js +1387 -0
- package/dist/esm/search-results-page.entry.js +30 -21
- package/dist/library/index.esm.js +1 -1
- package/dist/library/library.esm.js +1 -1
- package/dist/library/{p-51299820.entry.js → p-167a95fa.entry.js} +1 -1
- package/dist/library/p-22c17745.entry.js +1 -0
- package/dist/library/{p-5b35b8ce.entry.js → p-26a8cb6b.entry.js} +1 -1
- package/dist/library/{p-0be2c23a.entry.js → p-2b22db24.entry.js} +1 -1
- package/dist/library/p-43279753.entry.js +1 -0
- package/dist/library/{p-47c7c1b3.entry.js → p-4f2ffc41.entry.js} +1 -1
- package/dist/library/{p-f9ae5fb0.entry.js → p-551a3f1d.entry.js} +1 -1
- package/dist/library/{p-7ffdb912.entry.js → p-64e9659d.entry.js} +1 -1
- package/dist/library/p-673c9f70.entry.js +1 -0
- package/dist/library/p-82j2i1Bw.js +2 -0
- package/dist/library/p-910a4e9a.entry.js +1 -0
- package/dist/library/{p-0111358b.entry.js → p-9f812fb1.entry.js} +1 -1
- package/dist/library/p-cca567b2.entry.js +1 -0
- package/dist/library/p-d7128597.entry.js +1 -0
- package/dist/library/{p-4f2bd961.entry.js → p-dd288c1f.entry.js} +1 -1
- package/dist/types/components/ai12z-beacon/ai12z-beacon.d.ts +2 -1
- package/dist/types/components/ai12z-cta/ai12z-cta.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +2 -2
- package/dist/components/p-4jDAiNAG.js +0 -1
- package/dist/components/p-BL-11f6q.js +0 -1
- package/dist/components/p-Bt_KWVYc.js +0 -1
- package/dist/components/p-Buj5Gn09.js +0 -1
- package/dist/components/p-C7OMI_aS.js +0 -1
- package/dist/components/p-C92f-4Xe.js +0 -1
- package/dist/components/p-DMdu_2Pr.js +0 -2
- package/dist/library/p-460007fb.entry.js +0 -1
- package/dist/library/p-57010a13.entry.js +0 -1
- package/dist/library/p-880947da.entry.js +0 -1
- package/dist/library/p-8b1e5b00.entry.js +0 -1
- package/dist/library/p-99cde2a6.entry.js +0 -2
- package/dist/library/p-f680df18.entry.js +0 -1
|
@@ -9,25 +9,34 @@ const Ai12zBeacon = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
this.dataKey = index.Env.DATA_KEY || "";
|
|
11
11
|
this.dataMode = index.Env.DATA_MODE || "prod";
|
|
12
|
+
this.disable = false;
|
|
12
13
|
}
|
|
13
14
|
componentWillLoad() {
|
|
14
15
|
this.initializeBeacon();
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
onPropChange() {
|
|
17
18
|
this.initializeBeacon();
|
|
18
19
|
}
|
|
19
20
|
initializeBeacon() {
|
|
20
21
|
if (!this.dataKey) {
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
if (!this.disable) {
|
|
25
|
+
beacon.initBeacon(this.dataKey, this.dataMode);
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
render() {
|
|
26
|
-
return index.h(index.Host, { key: '
|
|
29
|
+
return index.h(index.Host, { key: '84462e1e48427855a56beeca8262cb97f6752302', hidden: true });
|
|
27
30
|
}
|
|
28
31
|
static get watchers() { return {
|
|
29
32
|
"dataKey": [{
|
|
30
|
-
"
|
|
33
|
+
"onPropChange": 0
|
|
34
|
+
}],
|
|
35
|
+
"dataMode": [{
|
|
36
|
+
"onPropChange": 0
|
|
37
|
+
}],
|
|
38
|
+
"disable": [{
|
|
39
|
+
"onPropChange": 0
|
|
31
40
|
}]
|
|
32
41
|
}; }
|
|
33
42
|
};
|
|
@@ -6677,17 +6677,17 @@ const AudioRecorder = class {
|
|
|
6677
6677
|
render() {
|
|
6678
6678
|
const minutes = Math.floor(this.time / 60);
|
|
6679
6679
|
const seconds = this.time % 60;
|
|
6680
|
-
return (index.h("div", { key: '
|
|
6680
|
+
return (index.h("div", { key: 'c381efb6f2754190186c3dce1bc87e7087ccf596', class: "flex w-full" }, (this.isRecording || this.isProcessing) && (index.h("div", { key: 'e9d618072d84648011e7c4740042685508312a2d', class: `relative flex items-center w-full rounded-full` }, this.isRecording && (index.h("button", { key: 'd291a135e07fb3caa77eafbca64e8fef837d440b', "aria-label": "Cancel Recording", onClick: e => {
|
|
6681
6681
|
e.preventDefault();
|
|
6682
6682
|
this.stopRecording("cancel");
|
|
6683
|
-
}, class: "w-10 h-10 rounded-full flex items-center justify-center text-white" }, "\u274C")), index.h("div", { key: '
|
|
6683
|
+
}, class: "w-10 h-10 rounded-full flex items-center justify-center text-white" }, "\u274C")), index.h("div", { key: '9d018b5a3b0a450d67a88de1745337830519eb36', id: "mic", style: { width: "100%" } }), this.isRecording && !this.isProcessing ? (index.h("div", { class: "ml-auto text-blue-600 font-semibold" }, String(minutes).padStart(2, "0"), ":", String(seconds).padStart(2, "0"))) : null, (this.isRecording || this.isProcessing) && (index.h("button", { key: 'b55a697513fb7de3c4087f933e03403e6f6a381e', "aria-label": "Confirm Recording", disabled: this.isProcessing, onClick: e => {
|
|
6684
6684
|
e.preventDefault();
|
|
6685
6685
|
if (!this.isProcessing)
|
|
6686
6686
|
this.stopRecording("stop");
|
|
6687
|
-
}, class: `w-10 h-10 ml-2 rounded-full flex items-center justify-center ${this.isProcessing ? "cursor-not-allowed" : "text-blue-600"}` }, this.isProcessing ? (index.h("svg", { class: "activity-spinner", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("line", { x1: "12", y1: "2", x2: "12", y2: "5", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "0" } }), index.h("line", { x1: "16.24", y1: "3.76", x2: "14.12", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "1" } }), index.h("line", { x1: "19", y1: "7.76", x2: "16.24", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "2" } }), index.h("line", { x1: "20", y1: "12", x2: "17", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "3" } }), index.h("line", { x1: "19", y1: "16.24", x2: "16.24", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "4" } }), index.h("line", { x1: "16.24", y1: "20.24", x2: "14.12", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "5" } }), index.h("line", { x1: "12", y1: "22", x2: "12", y2: "19", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "6" } }), index.h("line", { x1: "7.76", y1: "20.24", x2: "9.88", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "7" } }), index.h("line", { x1: "5", y1: "16.24", x2: "7.76", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "8" } }), index.h("line", { x1: "4", y1: "12", x2: "7", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "9" } }), index.h("line", { x1: "5", y1: "7.76", x2: "7.76", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "10" } }), index.h("line", { x1: "7.76", y1: "3.76", x2: "9.88", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "11" } }))) : (index.h("span", { class: "text-blue-600 font-sans" }, "\u2714")))))), !this.isRecording && !this.isProcessing && (index.h("button", { key: '
|
|
6687
|
+
}, class: `w-10 h-10 ml-2 rounded-full flex items-center justify-center ${this.isProcessing ? "cursor-not-allowed" : "text-blue-600"}` }, this.isProcessing ? (index.h("svg", { class: "activity-spinner", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("line", { x1: "12", y1: "2", x2: "12", y2: "5", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "0" } }), index.h("line", { x1: "16.24", y1: "3.76", x2: "14.12", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "1" } }), index.h("line", { x1: "19", y1: "7.76", x2: "16.24", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "2" } }), index.h("line", { x1: "20", y1: "12", x2: "17", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "3" } }), index.h("line", { x1: "19", y1: "16.24", x2: "16.24", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "4" } }), index.h("line", { x1: "16.24", y1: "20.24", x2: "14.12", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "5" } }), index.h("line", { x1: "12", y1: "22", x2: "12", y2: "19", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "6" } }), index.h("line", { x1: "7.76", y1: "20.24", x2: "9.88", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "7" } }), index.h("line", { x1: "5", y1: "16.24", x2: "7.76", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "8" } }), index.h("line", { x1: "4", y1: "12", x2: "7", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "9" } }), index.h("line", { x1: "5", y1: "7.76", x2: "7.76", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "10" } }), index.h("line", { x1: "7.76", y1: "3.76", x2: "9.88", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "11" } }))) : (index.h("span", { class: "text-blue-600 font-sans" }, "\u2714")))))), !this.isRecording && !this.isProcessing && (index.h("button", { key: '0a321fb59ced6d858534e5817a2a0ac9f5c7a4a1', "aria-label": "Start Recording", title: "Start Recording", onClick: e => {
|
|
6688
6688
|
e.preventDefault();
|
|
6689
6689
|
this.startRecording();
|
|
6690
|
-
}, class: `flex ${this.componentType === "search" || this.componentType === "cta" ? "p-1.5 mr-0.5 self-center mt-0.5" : "w-10 h-8 p-0 mt-4"}` }, index.h("svg", { key: '
|
|
6690
|
+
}, class: `flex ${this.componentType === "search" || this.componentType === "cta" ? "p-1.5 mr-0.5 self-center mt-0.5" : "w-10 h-8 p-0 mt-4"}` }, index.h("svg", { key: '48882741d3a1bcfaded9cbaf5094f0b89c73cb78', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", class: `w-5 h-5 translate-y-[0.5px] ${this.componentType === "search" || this.componentType === "cta" ? "mic-icon" : "mic-botIcon"}` }, index.h("path", { key: 'e344d7404f71e5fd86246e3422b5f826abb4b85c', d: "M7 4a3 3 0 016 0v6a3 3 0 11-6 0V4z" }), index.h("path", { key: '797aac54042925a574342e203114e9c133fc9f95', d: "M5.5 9.643a.75.75 0 00-1.5 0V10c0 3.06 2.29 5.585 5.25 5.954V17.5h-1.5a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-1.5v-1.546A6.001 6.001 0 0016 10v-.357a.75.75 0 00-1.5 0V10a4.5 4.5 0 01-9 0v-.357z" }))))));
|
|
6691
6691
|
}
|
|
6692
6692
|
get element() { return index.getElement(this); }
|
|
6693
6693
|
};
|
|
@@ -156,9 +156,9 @@ const Ai12zChatMessage = class {
|
|
|
156
156
|
render() {
|
|
157
157
|
var _a, _b, _c, _d;
|
|
158
158
|
const lineClamp = (_b = (_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.numberOfLines) !== null && _b !== void 0 ? _b : 10;
|
|
159
|
-
return (index.h("div", { key: '
|
|
159
|
+
return (index.h("div", { key: '678e7290618485a7a59f60642a2a7774c84ff87e', class: "chat-message" }, index.h("div", { key: '6b47a9bfeec40b41d1dcbbe026f3553f5950815e', ref: (el) => this.messageRef = el, class: { 'message-text': true, "custom-line-clamp": !this.isExpanded && !this.isCollapsing && this.showButton }, style: {
|
|
160
160
|
"--line-clamp": `${lineClamp}`,
|
|
161
|
-
}, innerHTML: this.text, onClick: this.showButton ? this.toggleExpand : undefined }), !this.isExpanded && this.showButton && this.canExpand && index.h("div", { key: '
|
|
161
|
+
}, innerHTML: this.text, onClick: this.showButton ? this.toggleExpand : undefined }), !this.isExpanded && this.showButton && this.canExpand && index.h("div", { key: 'dc643873c5d998735c11d318dd65adf974abf4be', class: "fade-overlay" }), this.showButton && this.canExpand && index.h("button", { key: '7bbd87c7c71796a4b7e43d290536c13fc39254cc', class: "show-more-btn", onClick: this.toggleExpand }, this.isExpanded ? (((_c = this.kbSettings) === null || _c === void 0 ? void 0 : _c.showLessButtonLabel) || "Show less") : (((_d = this.kbSettings) === null || _d === void 0 ? void 0 : _d.showMoreButtonLabel) || "Show more"), this.isExpanded ? index.h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { points: "6 9 12 15 18 9" })) : index.h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { points: "18 15 12 9 6 15" })))));
|
|
162
162
|
}
|
|
163
163
|
get el() { return index.getElement(this); }
|
|
164
164
|
static get watchers() { return {
|
|
@@ -1142,7 +1142,7 @@ const MyChat = class {
|
|
|
1142
1142
|
render() {
|
|
1143
1143
|
var _a;
|
|
1144
1144
|
const email = "";
|
|
1145
|
-
return (index.h("div", { key: '
|
|
1145
|
+
return (index.h("div", { key: '5883ac798ea9966385dc63a39f5e4bc2afb4c866' }, index.h("ul", { key: 'f46ac1484464dac37be35530bd44f4702ddbdb97', id: "main-content", tabindex: "-1", class: {
|
|
1146
1146
|
"chat-list": true,
|
|
1147
1147
|
"custom-list": this.componentType === "search",
|
|
1148
1148
|
// "custom-chat-top-height": this.componentType === "search",
|
|
@@ -1171,7 +1171,7 @@ const MyChat = class {
|
|
|
1171
1171
|
let popup = e.target.querySelector(".non-user-container");
|
|
1172
1172
|
if (popup)
|
|
1173
1173
|
popup.style.display = "none";
|
|
1174
|
-
} }, chat.status !== "pending" && !(chat.type === "user" && chat.isHide) && (index.h("div", { class: {
|
|
1174
|
+
}, style: { width: chat.type !== "user" ? "90%" : "auto" } }, chat.status !== "pending" && !(chat.type === "user" && chat.isHide) && (index.h("div", { class: {
|
|
1175
1175
|
"p-4": true,
|
|
1176
1176
|
"max-w-full": this.componentType === "search" ? true : false,
|
|
1177
1177
|
"prose": true,
|
|
@@ -1186,7 +1186,16 @@ const MyChat = class {
|
|
|
1186
1186
|
}, id: chat.id, innerHTML: chat.message }, (_c = chat === null || chat === void 0 ? void 0 : chat.images) === null || _c === void 0 ? void 0 :
|
|
1187
1187
|
_c.map(img => {
|
|
1188
1188
|
return index.h("img", { src: img, class: "thumbnail", alt: "thumbnail", width: "70", height: "50" });
|
|
1189
|
-
}), chat.type !== "user" && (
|
|
1189
|
+
}), chat.type !== "user" && (
|
|
1190
|
+
// <svg class="animate-spin h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" id="spinner">
|
|
1191
|
+
// <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
1192
|
+
// <path
|
|
1193
|
+
// class="opacity-75"
|
|
1194
|
+
// fill="currentColor"
|
|
1195
|
+
// d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
1196
|
+
// ></path>
|
|
1197
|
+
// </svg>
|
|
1198
|
+
index.h("div", { class: "w-full rounded-md", id: "spinner" }, index.h("div", { class: "flex animate-pulse space-x-4" }, index.h("div", { class: "flex-1 space-y-3 py-1" }, index.h("div", { class: "h-4 rounded bg-gray-200" }), index.h("div", { class: "space-y-3" }, index.h("div", { class: "grid grid-cols-3 gap-4" }, index.h("div", { class: "col-span-2 h-4 rounded bg-gray-200" }), index.h("div", { class: "col-span-1 h-4 rounded bg-gray-200" })), index.h("div", { class: "h-4 rounded bg-gray-200" })))))))), chat.type !== "user" && chat.clipboard && ((_d = this.settings.showMessageIcons) !== null && _d !== void 0 ? _d : true) && !chat.surveyDomId && (index.h("div", { class: "non-user-container", style: { display: "none" } }, this.isPlayed && (index.h("button", { class: "copy-btn", "aria-label": "Stop", tabindex: "0", onClick: () => {
|
|
1190
1199
|
this.isPlayed = false;
|
|
1191
1200
|
window.speechSynthesis.cancel();
|
|
1192
1201
|
if (this.audioElement) {
|
|
@@ -1209,7 +1218,7 @@ const MyChat = class {
|
|
|
1209
1218
|
projectId: this.getProjectId(),
|
|
1210
1219
|
questionText: analyticsService.getQuestionText(this.chats, chat.insightId) || "",
|
|
1211
1220
|
}), class: "chat-thumbs-up", "aria-label": "Thumbs Down", tabindex: "0" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "w-6 h-6" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54" }))), index.h("button", { class: "copy-btn", tabindex: "0", "aria-label": "Send Email" }, index.h("a", { href: `mailto:${email}?subject=${encodeURIComponent((_e = this.chats[idx - 1]) === null || _e === void 0 ? void 0 : _e.message)}&body=${encodeURIComponent(this.removeHtmlTags(chat.clipboard))}`, target: "_blank", "aria-label": "Send Email" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", "stroke-width": "0.3", class: "w-6 h-6" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M3.75 5.25L3 6V18L3.75 18.75H20.25L21 18V6L20.25 5.25H3.75ZM4.5 7.6955V17.25H19.5V7.69525L11.9999 14.5136L4.5 7.6955ZM18.3099 6.75H5.68986L11.9999 12.4864L18.3099 6.75Z", fill: "currentColor" }), " "))))))));
|
|
1212
|
-
}), index.h("div", { key: '
|
|
1221
|
+
}), index.h("div", { key: '53802e68891a2c65e85f5df2086b129bcd15fb04', class: "scroll-bottom" }))));
|
|
1213
1222
|
}
|
|
1214
1223
|
get element() { return index.getElement(this); }
|
|
1215
1224
|
static get watchers() { return {
|
|
@@ -1220,7 +1229,7 @@ const MyChat = class {
|
|
|
1220
1229
|
};
|
|
1221
1230
|
MyChat.style = ai12zChatCss();
|
|
1222
1231
|
|
|
1223
|
-
const inputCss = () => `:host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important}.input-form{display:flex;flex-direction:column;width:100%;margin-bottom:16px}.input-container{margin-right:16px;position:relative;border-radius:64px;border-width:1px;align-items:stretch;display:flex;}.inner-container{flex-grow:1;padding:12px}.custom-input{color:black;border-width:0;max-height:300px;resize:none;overflow:hidden;background-color:inherit}.custom-input::-moz-placeholder{color:var(--ai12z-input-placeholder-color);opacity:1;font-size:var(--ai12z-input-placeholder-font-size)}.custom-input::placeholder{color:var(--ai12z-input-placeholder-color);opacity:1;font-size:var(--ai12z-input-placeholder-font-size)}.custom-input:focus{outline:none;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--ai12z-border-color)}.input-focus-color{border-color:
|
|
1232
|
+
const inputCss = () => `:host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important}.input-form{display:flex;flex-direction:column;width:100%;margin-bottom:16px}.input-container{margin-right:16px;position:relative;border-radius:64px;border-width:1px;align-items:stretch;display:flex;}.inner-container{flex-grow:1;padding:12px}.custom-input{color:black;border-width:0;max-height:300px;resize:none;overflow:hidden;background-color:inherit}.custom-input::-moz-placeholder{color:var(--ai12z-input-placeholder-color);opacity:1;font-size:var(--ai12z-input-placeholder-font-size)}.custom-input::placeholder{color:var(--ai12z-input-placeholder-color);opacity:1;font-size:var(--ai12z-input-placeholder-font-size)}.custom-input:focus{outline:none;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--ai12z-border-color)}.input-focus-color{border-color:black !important}.plus-icon{color:#fff;background-color:var(--ai12z-plus-icon-color)}.ai12z-plus-anchor{position:relative;display:inline-block}.ai12z-plus-menu{position:absolute;top:100%;left:0;margin-top:0.5rem;width:var(--ai12z-menu-width, 15rem);z-index:30;padding:0.375rem;background-color:var(--ai12z-menu-bg, #fff);border:1px solid var(--ai12z-menu-border-color, rgba(17, 24, 39, 0.08));border-radius:var(--ai12z-menu-radius, 0.875rem);box-shadow:var( --ai12z-menu-shadow, 0 12px 28px -12px rgba(17, 24, 39, 0.28), 0 4px 10px -6px rgba(17, 24, 39, 0.15) );transform-origin:top left;transition:opacity 0.16s ease, transform 0.16s ease}.ai12z-plus-menu[data-open="false"]{opacity:0;transform:scale(0.95);pointer-events:none}.ai12z-plus-menu[data-open="true"]{opacity:1;transform:scale(1);pointer-events:auto}.ai12z-menu-list{display:flex;flex-direction:column;gap:0.125rem;margin:0;padding:0;list-style:none}.ai12z-menu-item,.ai12z-menu-item--uploader .image-uploader>button{display:flex;align-items:center;gap:0.625rem;width:100%;padding:0.5rem 0.625rem;border:0;background:transparent;border-radius:0.5rem;font-family:inherit;font-size:var(--ai12z-menu-item-font-size, 0.875rem);line-height:1.25rem;color:var(--ai12z-menu-item-color, #374151);text-align:left;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease}.ai12z-menu-item:hover:not([disabled]):not([aria-disabled="true"]),.ai12z-menu-item:focus-visible,.ai12z-menu-item--uploader .image-uploader>button:hover:not([disabled]){background-color:var(--ai12z-menu-item-hover-bg, #f3f4f6)}.ai12z-menu-item:focus-visible,.ai12z-menu-item--uploader .image-uploader>button:focus-visible{outline:2px solid transparent;box-shadow:0 0 0 2px var(--ai12z-menu-focus-ring, rgba(59, 130, 246, 0.55))}.ai12z-menu-item[disabled],.ai12z-menu-item[aria-disabled="true"]{opacity:0.45;cursor:not-allowed}.ai12z-menu-item__icon,.ai12z-menu-item--uploader .image-uploader>button svg{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem;color:var(--ai12z-menu-icon-color, #6b7280)}.ai12z-menu-item__label{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ai12z-menu-item--uploader{padding:0}.ai12z-menu-item--uploader .image-uploader,.ai12z-menu-item--uploader .image-uploader>button{width:100%}@media (prefers-color-scheme: dark){.ai12z-plus-menu{--ai12z-menu-bg:#1f2937;--ai12z-menu-border-color:rgba(255, 255, 255, 0.08);--ai12z-menu-shadow:0 14px 34px -12px rgba(0, 0, 0, 0.65), 0 4px 12px -6px rgba(0, 0, 0, 0.5);--ai12z-menu-item-color:#e5e7eb;--ai12z-menu-item-hover-bg:rgba(55, 65, 81, 0.7);--ai12z-menu-icon-color:#9ca3af}}.ai-button{border-left-width:1px;padding-left:16px;padding-right:16px;white-space:nowrap;display:inline-flex;place-items:center;color:var(--ai12z-button-font-color);font-size:var(--ai12z-button-font-size);}.ai-button:hover{background-color:var(--ai12z-primary-color);color:rgb(255 255 255)}.custom-svg-checkbox{margin-top:4px;width:16px;height:16px;position:absolute}.hide-svg{display:none}.icon-width{width:28px}.custom-attachment{border-right-width:1px;padding-top:10px;padding-left:16px;padding-right:32px;cursor:pointer;width:5%}#fileInput{display:none}.error-msg{color:red;font-size:12px;margin-top:4px;text-align:center}.image-Container{position:relative;display:inline-block;margin-right:10px}.delete-image{opacity:3;position:absolute;right:3px;top:0;cursor:pointer;line-height:10px}.btn-bg-color{background-color:var(--ai12z-button-bgcolor)}.searchbar-bgcolor{background-color:var(--ai12z-searchbar-bgcolor)}.searchbar-bordercolor{border:1px solid grey}.inline-searchbar-bgcolor{border-color:var(--ai12z-inlinesearchbar-border-color);background-color:var(--ai12z-inlinesearchbar-bgcolor);border-width:1px}.enter-tip{font-size:12px;color:#666;margin-left:10px}#message-error{margin-left:10px}`;
|
|
1224
1233
|
|
|
1225
1234
|
const InputForm = class {
|
|
1226
1235
|
constructor(hostRef) {
|
|
@@ -1567,21 +1576,21 @@ const InputForm = class {
|
|
|
1567
1576
|
// this.icon_width = url.searchParams.get("w") || "28"
|
|
1568
1577
|
// this.icon_height = url.searchParams.get("h") || "28"
|
|
1569
1578
|
// }
|
|
1570
|
-
return (index.h("div", { key: '
|
|
1579
|
+
return (index.h("div", { key: 'c59679b3a11b641402f5c2b328356ad114b43833' }, index.h("form", { key: 'a804577f24fc37e7da8fbec9fae402122c72ac89', class: "w-full flex flex-col gap-1.5 sticky", onSubmit: this.handleFormSubmit }, index.h("div", { key: '7aa25122583eb481fc813803409e1d7f8f341b11', class: `flex-1 flex flex-col relative w-full rounded-3xl px-1 ${this.componentType === "inline" ? "inline-searchbar-bgcolor" : "searchbar-bgcolor searchbar-bordercolor"}`, dir: "LTR", ref: el => (this.searchFormElem = el) }, index.h("div", { key: '8a023eb115800c83962d191caaff210154a7d6a0', class: "flex items-center" }, index.h("div", { key: 'f4faaf4508c2e2a56b890af2d173352edffcb99f', class: "ml-1 self-center flex space-x-1" }, !this.hideAllButtons && (index.h("div", { key: '4300e90cc7256a0b799b910b7e452d3cd4c6830f', class: "ai12z-plus-anchor relative inline-block", style: { width: "5%" } }, index.h("button", { key: 'abfeb315a8bbb5be023bd5dde8eccdfa691ff7a9', class: "plus-icon rounded-full p-1.5", "aria-label": "Options", title: "Add images or capture screen", tabindex: "0", "aria-haspopup": "menu", "aria-expanded": this.isOpen ? "true" : "false", "aria-controls": `ai12z-options-menu-${this.instanceId}`, ref: el => (this.plusButtonElem = el), onKeyDown: this.handleTriggerKeyDown, onClick: e => {
|
|
1571
1580
|
e.stopPropagation();
|
|
1572
1581
|
this.toggleBox(e);
|
|
1573
|
-
} }, index.h("svg", { key: '
|
|
1582
|
+
} }, index.h("svg", { key: '5300f423cada715d556a1694b170090e58465b06', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", width: "20", height: "20" }, index.h("path", { key: '6a6de741c48a4984384af07a7f10088bed4afe01', d: "M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z" }))), index.h("div", { key: 'c42e95662bd835bfa39b89a9de4f6c1e460d62fe', class: "ai12z-plus-menu", id: `ai12z-options-menu-${this.instanceId}`, "data-open": this.isOpen ? "true" : "false", role: "menu", "aria-orientation": "vertical", "aria-label": "Input options", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElem = el) }, index.h("ul", { key: 'ba781458c49fa5060751cf5790cbec739dbe1f3b', class: "ai12z-menu-list" }, this.isImageUpload && (index.h("li", { key: '1fd2ddff8bc73553a645388a0a7d967c9fe2e8da', role: "none", class: "ai12z-menu-item--uploader" }, index.h("image-uploader", { key: 'bc61d3d1789184cbc612a122be4a8e3529f6091e', maxImages: 10, images: this.imagesBase64List, targetElement: this.searchInputElem, onImagesChange: this.handleImageChange, onError: this.handleImageError, ref: el => (this.imageUploaderRef = el) }))), index.h("li", { key: '010ceb2b8240d4f4cf35a37ef5899efbee9f4fd1', role: "none" }, index.h("button", { key: '47699e693a3b731896294ef7d74027d2c0f475f7', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "Capture screen", onClick: () => {
|
|
1574
1583
|
this.captureScreen();
|
|
1575
1584
|
this.closeMenu(true);
|
|
1576
|
-
} }, index.h("span", { key: '
|
|
1585
|
+
} }, index.h("span", { key: 'b1afc23600c64684093f19b19b03c63a212254c6', class: "ai12z-menu-item__icon" }, index.h("svg", { key: '91e5aa67bcd8732f82a07504a65542304a8119a9', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20" }, index.h("path", { key: '3ca1688a7176f77357daa3d4ea25583f1be09c96', d: "M12 9a3.75 3.75 0 1 0 0 7.5A3.75 3.75 0 0 0 12 9Z" }), index.h("path", { key: '4819afb3d8e7fd2234bc3cbbc7b2eb9b36740509', "fill-rule": "evenodd", d: "M9.344 3.071a49.52 49.52 0 0 1 5.312 0c.967.052 1.83.585 2.332 1.39l.821 1.317c.24.383.645.643 1.11.71.386.054.77.113 1.152.177 1.432.239 2.429 1.493 2.429 2.909V18a3 3 0 0 1-3 3h-15a3 3 0 0 1-3-3V9.574c0-1.416.997-2.67 2.429-2.909.382-.064.766-.123 1.151-.178a1.56 1.56 0 0 0 1.11-.71l.822-1.315a2.942 2.942 0 0 1 2.332-1.39ZM6.75 12.75a5.25 5.25 0 1 1 10.5 0 5.25 5.25 0 0 1-10.5 0Zm12-1.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z", "clip-rule": "evenodd" }))), index.h("span", { key: 'd74e0d316d7aae01343ff52f5285fab133ee01eb', class: "ai12z-menu-item__label" }, "Capture"))), index.h("li", { key: '704863f7e0fea6036380d88359715c3b4613ca84', role: "none" }, index.h("button", { key: '96386341f068862e5f9017a1efe81f8145bfe693', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "Start Over", "aria-disabled": this.chatLength === 0 ? "true" : "false", onClick: e => {
|
|
1577
1586
|
if (this.chatLength === 0)
|
|
1578
1587
|
return;
|
|
1579
1588
|
this.handleFollowUp(e);
|
|
1580
1589
|
this.closeMenu(true);
|
|
1581
|
-
} }, index.h("span", { key: '
|
|
1590
|
+
} }, index.h("span", { key: 'a0cbeeeaacf902ddfd505e3fb0488b1139fc14bf', class: "ai12z-menu-item__icon" }, index.h("svg", { key: 'a67d1363c4db34efc0ef8a1efceed2794746b9e9', width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { key: '8bad81e7ac00aff9de9a5f481f30cba394b3492c', d: "M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2" }))), index.h("span", { key: '923ff23c54c4da16eb354cb814938aad7dbe3848', class: "ai12z-menu-item__label" }, "Start Over"))), index.h("li", { key: 'edcef70bd7c4eaed65b22948a8893d046b5c22b4', role: "none" }, index.h("button", { key: '9dffd637d14f75a836be0586fec2757dbf9ec1bd', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "View Recent Chat", onClick: e => {
|
|
1582
1591
|
this.handleRecentChat(e);
|
|
1583
1592
|
this.closeMenu(true);
|
|
1584
|
-
} }, index.h("span", { key: '
|
|
1593
|
+
} }, index.h("span", { key: 'fa76c265e229a4c967540ff10204d8c801ed29ab', class: "ai12z-menu-item__icon" }, index.h("svg", { key: 'bf3363b0ece370dd5aa5b6e3fedfebc4fed2dc04', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { key: 'c1de8f7a7ecc3663430c0eda0aef7596a4bfe024', d: "M21 15a4 4 0 0 1-4 4H7l-4 4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z" }), index.h("path", { key: 'c70b69583d3568feea22746e53aafc2e126c515b', d: "M12 7v5l3 2" }))), index.h("span", { key: 'dbe600795088274027d6ae7d9b9659e7dc877a9e', class: "ai12z-menu-item__label" }, "View Recent Chat")))))))), !this.hideAllButtons && (index.h("div", { key: '46bb01b59bc75941717b29336ca135b78da02ba4', class: "scrollbar-hidden text-left bg-transparent dark:text-gray-100 outline-none w-full rounded-xl resize-none h-fit max-h-80 overflow-auto" }, index.h("div", { key: '8316ebe388c800d2749f48a373eed18f4d8cc12f', class: "relative w-full min-w-full h-full min-h-fit flex items-center input-prose" }, index.h("div", { key: '5233d660b64cbce8b5b1d4531a442a277001608b', id: `previewContainer-${this.instanceId}`, draggable: true }), index.h("label", { key: '17fbc8d286e714c7aa3032910c947b59974c5cb0', htmlFor: `searchInput-${this.instanceId}`, class: "sr-only" }, "Your message"), index.h("textarea", { key: '9a527bf5e1157553950b803928dd7e35b2c63647', readOnly: this.submitted, "aria-describedby": this.emptyMessageError ? `message-error-${this.instanceId} search-hint-${this.instanceId}` : `search-hint-${this.instanceId}`, "aria-invalid": this.emptyMessageError, id: `searchInput-${this.instanceId}`, ref: el => {
|
|
1585
1594
|
this.searchInputElem = el;
|
|
1586
1595
|
// Autofocus once on first mount, and never while the
|
|
1587
1596
|
// options menu is open — otherwise unrelated re-renders
|
|
@@ -1593,7 +1602,7 @@ const InputForm = class {
|
|
|
1593
1602
|
}
|
|
1594
1603
|
}, placeholder: this.placeholder, autoComplete: "off", class: "w-full p-1 custom-input", value: this.searchInput, rows: 1, onInput: utils.debounce(e => this.handleInputChange(e), 500), onKeyUp: this.adjustHeight, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFormElem.classList.add("input-focus-color"), onBlur: () => this.searchFormElem.classList.remove("input-focus-color"), onPaste: e => {
|
|
1595
1604
|
this.handlePaste(e);
|
|
1596
|
-
} }), index.h("div", { key: '
|
|
1605
|
+
} }), index.h("div", { key: '54d33e51786f35610bcafd28a5df672479601cf0', role: "status", "aria-live": "polite", "aria-atomic": "true", class: "sr-only" }, this.announceMessage), index.h("span", { key: 'a71eb1d8a69ff19ad0a25c109a10ad131b057da9', id: `search-hint-${this.instanceId}`, class: "sr-only" }, "Press Enter to send, Shift+Enter for new line")))), index.h("div", { key: 'c48bea326d1664fc38eeca340367e0a3e162705a', class: "p-1 self-end flex space-x-1 flex-row", style: { width: this.hideAllButtons ? "100%" : "auto" } }, index.h("div", { key: 'b6fd11d68b22ee353231a2992922d1c0d992a068', "aria-label": "Record voice", class: "flex self-center", style: { width: this.hideAllButtons ? "100%" : "auto" } }, this.isEnableMic && (index.h("audio-recorder", { key: '53cdabee4d2bfa8ca2722b986485c6120663dc2c', "component-type": "cta", onStartRecord: _ev => {
|
|
1597
1606
|
// console.log("test", ev)
|
|
1598
1607
|
this.hideAllButtons = true;
|
|
1599
1608
|
}, onStopRecord: _ev => {
|
|
@@ -1611,14 +1620,14 @@ const InputForm = class {
|
|
|
1611
1620
|
});
|
|
1612
1621
|
}
|
|
1613
1622
|
}, 1000);
|
|
1614
|
-
}, style: { width: "100%" } }))), " ", !this.hideAllButtons && (index.h("div", { key: '
|
|
1623
|
+
}, style: { width: "100%" } }))), " ", !this.hideAllButtons && (index.h("div", { key: 'a3c6d7e8f5d52dbe6d2d6cc182829b91ce8b8466', class: "flex items-center" }, index.h("div", { key: '2d6c1e44fcd211cbb7927decc8ebc1a58e2c2ee2', "aria-label": "Send message", class: "flex" }, index.h("button", { key: '4f886d15573c290c41daf52fcd0a2e82ef12fbd8', id: `send-message-button-${this.instanceId}`, class: "btn-bg-color text-white transition rounded-full p-1.5 self-center",
|
|
1615
1624
|
// type="submit"
|
|
1616
|
-
disabled: this.submitted, onClick: this.handleAskAI, tabindex: "0", "aria-label": "Send Message", title: "Send Message" }, index.h("svg", { key: '
|
|
1625
|
+
disabled: this.submitted, onClick: this.handleAskAI, tabindex: "0", "aria-label": "Send Message", title: "Send Message" }, index.h("svg", { key: '720a1bf26391041ae0093ad226eeeb7c791cdf1d', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", class: "size-6" }, index.h("path", { key: 'e910efa1cb7e905fb734d32007f18eec13c8f97a', "fill-rule": "evenodd", d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z", "clip-rule": "evenodd" })))))))), this.imagesBase64List.length > 0 && (index.h("div", { key: 'd47b58901e9518deddb8d3d65d4e4179eec4a05c', class: "flex flex-wrap gap-2 mx-1 mt-2.5 mb-1" }, this.imagesBase64List.map((img, idx) => (index.h("div", { class: "image-Container sc-ai12z-input-form", key: idx }, index.h("img", { src: img, style: { width: "70px", height: "50px", borderRadius: "12px" } }), index.h("span", { class: "delete-image sc-ai12z-input-form cursor-pointer ml-1", onClick: () => {
|
|
1617
1626
|
this.imagesBase64List = this.imagesBase64List.filter((_, i) => i !== idx);
|
|
1618
1627
|
if (this.imageUploaderRef && typeof this.imageUploaderRef.removeImageAtIndex === "function") {
|
|
1619
1628
|
this.imageUploaderRef.removeImageAtIndex(idx);
|
|
1620
1629
|
}
|
|
1621
|
-
} }, "\u00D7"))))))), this.showErrorMessage && (index.h("div", { key: '
|
|
1630
|
+
} }, "\u00D7"))))))), this.showErrorMessage && (index.h("div", { key: 'a5ce72356cc4b4f4ffa3a7e753d6cc07143ebd46', class: "flex" }, " ", index.h("p", { key: '40640b98780fe7bc5b2e32c1e5f4a61ae8094bbc', class: "error-msg", innerHTML: this.errorMessage }))), this.emptyMessageError && (index.h("div", { key: '09840c296e46ab20ad4f2863cc089f5e597da9b5', class: "flex" }, index.h("p", { key: 'ad516e2b0b3da9e88055c4828719fd973d4ba971', id: `message-error-${this.instanceId}`, class: "error-msg", role: "alert" }, "Message cannot be empty. Please enter a message to send."))), this.chatLength === 0 && (index.h("div", { key: '32e488697d98f2af9d9ef9644c416e84823b3fe4', class: "enter-tip", role: "tooltip" }, "Tip: Press Enter to send, Shift+Enter for new line", " ", index.h("button", { key: 'a75ede4a71ba3dabb9b6707308c1b56207428085', onClick: () => (this.showShortcutsDialog = true), class: "keyboard-shortcuts-btn", "aria-label": "Show keyboard shortcuts", title: "Keyboard shortcuts (?)", tabindex: "0" }, index.h("svg", { key: 'bfe8d8b5d91b51ecd381cf74d198832e5156d083', width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("circle", { key: '8de67ac0fe02ddd576060c1a565db44b186292b9', cx: "12", cy: "12", r: "10" }), index.h("path", { key: 'dd220b97f809b0786bfa608539ad6b9ccad97eb1', d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }), index.h("line", { key: '020e811e75544f5ab872b296160923cc6141403d', x1: "12", y1: "17", x2: "12.01", y2: "17" })))))), this.showShortcutsDialog && (index.h("keyboard-shortcuts-dialog", { key: '339cb22eba5f5256eabd3c59761a7da96fb03a9b', show: this.showShortcutsDialog, shortcuts: this.shortcuts, onCloseDialog: () => (this.showShortcutsDialog = false) }))));
|
|
1622
1631
|
}
|
|
1623
1632
|
get el() { return index.getElement(this); }
|
|
1624
1633
|
};
|