ai12z 3.12.1 → 3.13.1-alpha.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.
Files changed (45) hide show
  1. package/dist/cjs/ai12z-bot.cjs.entry.js +2 -1
  2. package/dist/cjs/ai12z-form.cjs.entry.js +15 -11
  3. package/dist/cjs/image-uploader_2.cjs.entry.js +27 -18
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/library.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{scriptStyleLoader-BHz2-bYp.js → scriptStyleLoader-BTtEJqyW.js} +13 -21
  8. package/dist/collection/components/ai12z-bot/ai12z-bot.js +1 -0
  9. package/dist/collection/components/ai12z-bot/keyboard-shortcuts-dialog.js +32 -18
  10. package/dist/collection/components/ai12z-form/ai12z-form.js +14 -10
  11. package/dist/collection/utils/scriptStyleLoader.js +14 -25
  12. package/dist/components/ai12z-bot.js +1 -1
  13. package/dist/components/ai12z-cta.js +1 -1
  14. package/dist/components/ai12z-form.js +1 -1
  15. package/dist/components/ai12z-inline-search.js +1 -1
  16. package/dist/components/ai12z-input-form.js +1 -1
  17. package/dist/components/index.js +1 -1
  18. package/dist/components/keyboard-shortcuts-dialog.js +1 -1
  19. package/dist/components/{p-DtuGsk4g.js → p-B_j3KwUN.js} +1 -1
  20. package/dist/components/p-BwTPnzKJ.js +1 -0
  21. package/dist/components/{p-BmghPdvp.js → p-C95KYanP.js} +1 -1
  22. package/dist/components/p-CDcwVyQs.js +1 -0
  23. package/dist/components/{p-Bt40aKpX.js → p-DqheuPDq.js} +1 -1
  24. package/dist/components/p-FOs0CtlB.js +1 -0
  25. package/dist/components/{p-BVFbyB5u.js → p-JSEoF67X.js} +1 -1
  26. package/dist/esm/ai12z-bot.entry.js +2 -1
  27. package/dist/esm/ai12z-form.entry.js +15 -11
  28. package/dist/esm/image-uploader_2.entry.js +27 -18
  29. package/dist/esm/index.js +1 -1
  30. package/dist/esm/library.js +1 -1
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/{scriptStyleLoader-DtuGsk4g.js → scriptStyleLoader-B_j3KwUN.js} +13 -21
  33. package/dist/library/index.esm.js +1 -1
  34. package/dist/library/library.esm.js +1 -1
  35. package/dist/library/{p-6b91782d.entry.js → p-6a675406.entry.js} +1 -1
  36. package/dist/library/{p-1111677c.entry.js → p-8f164bfb.entry.js} +1 -1
  37. package/dist/library/{p-DtuGsk4g.js → p-B_j3KwUN.js} +1 -1
  38. package/dist/library/p-faa959e1.entry.js +1 -0
  39. package/dist/types/components/ai12z-bot/keyboard-shortcuts-dialog.d.ts +4 -0
  40. package/dist/types/components/ai12z-form/ai12z-form.d.ts +1 -0
  41. package/package.json +2 -2
  42. package/dist/components/p-DWtpbQds.js +0 -1
  43. package/dist/components/p-De9depzV.js +0 -1
  44. package/dist/components/p-DlxyfBqu.js +0 -1
  45. package/dist/library/p-5fbe316f.entry.js +0 -1
@@ -12,7 +12,7 @@ var reCaptchaHelpers = require('./reCaptchaHelpers-DUlImWQK.js');
12
12
  var botHelpers = require('./botHelpers-aCoootcN.js');
13
13
  var processCarouselData = require('./processCarouselData-DcPRJVyR.js');
14
14
  var surveyHelpers = require('./surveyHelpers-DTDyWBdY.js');
15
- var scriptStyleLoader = require('./scriptStyleLoader-BHz2-bYp.js');
15
+ var scriptStyleLoader = require('./scriptStyleLoader-BTtEJqyW.js');
16
16
  var ctaHelpers = require('./ctaHelpers-CVr3D-cw.js');
17
17
  var appStore = require('./app-store-D249GRTi.js');
18
18
  var parseHelper = require('./parseHelper-XIyoURy9.js');
@@ -943,6 +943,7 @@ const Ai12zBot = class {
943
943
  console.warn("Survey DOM ID is empty");
944
944
  return;
945
945
  }
946
+ await this.assetLoader.loadSurveyDependencies();
946
947
  try {
947
948
  await surveyHelpers.renderSurvey({
948
949
  chat,
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-Ct2DwlDF.js');
4
4
  var utils = require('./utils-DG2h-dHR.js');
5
5
  var surveyHelpers = require('./surveyHelpers-DTDyWBdY.js');
6
- var scriptStyleLoader = require('./scriptStyleLoader-BHz2-bYp.js');
6
+ var scriptStyleLoader = require('./scriptStyleLoader-BTtEJqyW.js');
7
7
 
8
8
  const ai12zFormCss = () => `.ai12z-form-wrapper{width:100%}.ai12z-form-status,.ai12z-form-error{font-size:14px;margin-bottom:8px}.ai12z-form-error{color:#b91c1c}.ai12z-form-container{width:100%}.ai12z-form-honeypot{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}@keyframes ai12z-form-spin{to{transform:rotate(360deg)}}@keyframes ai12z-form-bounce{0%,80%,100%{opacity:0.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}`;
9
9
 
@@ -15,6 +15,7 @@ const Ai12zForm = class {
15
15
  this.formSubmitted = index.createEvent(this, "formSubmitted", 7);
16
16
  this.errored = index.createEvent(this, "errored", 7);
17
17
  this.loadTimer = null;
18
+ this.loadVersion = 0;
18
19
  this.surveyCDNPath = "https://cdn.ai12z.net/pkg/surveyjs";
19
20
  this.dataKey = index.Env.DATA_KEY || "";
20
21
  this.dataMode = index.Env.DATA_MODE || "prod";
@@ -40,6 +41,7 @@ const Ai12zForm = class {
40
41
  });
41
42
  // Load all bot assets
42
43
  await this.assetLoader.loadBotAssets();
44
+ await this.assetLoader.loadSurveyDependencies();
43
45
  // console.log("✅ Asset loader initialized successfully")
44
46
  }
45
47
  catch (error) {
@@ -47,25 +49,25 @@ const Ai12zForm = class {
47
49
  }
48
50
  }
49
51
  disconnectedCallback() {
50
- if (this.loadTimer) {
52
+ // Invalidate any in-flight load by bumping the version
53
+ this.loadVersion++;
54
+ if (this.loadTimer)
51
55
  clearTimeout(this.loadTimer);
52
- this.loadTimer = null;
53
- }
54
56
  }
55
57
  async watchLoadProps() {
56
58
  if (!this.isReady) {
57
59
  return;
58
60
  }
59
- if (this.loadTimer) {
61
+ if (this.loadTimer)
60
62
  clearTimeout(this.loadTimer);
61
- }
62
- this.loadTimer = setTimeout(async () => {
63
- await this.loadDynamicForm();
64
- }, 200);
63
+ this.loadTimer = setTimeout(() => {
64
+ this.loadDynamicForm();
65
+ }, 150);
65
66
  }
66
67
  async loadDynamicForm(keyName) {
67
68
  var _a;
68
69
  const nextKeyName = (_a = (keyName !== null && keyName !== void 0 ? keyName : this.keyName)) === null || _a === void 0 ? void 0 : _a.trim();
70
+ const version = ++this.loadVersion;
69
71
  if (!this.dataKey) {
70
72
  this.setError('Public Key is required. Please provide using attribute "data-key".');
71
73
  return;
@@ -74,6 +76,8 @@ const Ai12zForm = class {
74
76
  this.isLoading = true;
75
77
  try {
76
78
  const response = await this.fetchResponse(nextKeyName);
79
+ if (version !== this.loadVersion)
80
+ return;
77
81
  if (!response.success) {
78
82
  const controlHint = nextKeyName ? ` for keyName "${nextKeyName}"` : "";
79
83
  throw new Error(`No form control found${controlHint}.`);
@@ -82,7 +86,7 @@ const Ai12zForm = class {
82
86
  chat: {
83
87
  keyName: response.form.keyName,
84
88
  controlData: { form_model: response.form.model },
85
- theme: response.form.theme
89
+ theme: response.form.theme,
86
90
  },
87
91
  surveyDomId: this.surveyDomId,
88
92
  shadowRoot: this.el.shadowRoot,
@@ -126,7 +130,7 @@ const Ai12zForm = class {
126
130
  this.errored.emit(message);
127
131
  }
128
132
  render() {
129
- return (index.h("div", { key: 'a3c2cf413b46fc966831f7850183ff707d392e1c', class: "ai12z-form-wrapper" }, this.error && !this.isLoading && index.h("div", { key: '387b611ba0ed6719e0b0eb82378dff1b60bc26a2', class: "ai12z-form-error" }, this.error), index.h("div", { key: 'e5d86dec109eef1155e4633ebb40f843d0cf70ac', id: this.surveyDomId, class: "ai12z-form-container" })));
133
+ return (index.h("div", { key: 'f6d7c6128db43eb0f4c546c364ed2af9c56feb9f', class: "ai12z-form-wrapper" }, this.error && !this.isLoading && index.h("div", { key: 'fd47efae79ab4c4922f558c7892f1b79f1bbdf56', class: "ai12z-form-error" }, this.error), index.h("div", { key: '44e50ecc55cfe7938dfa1c2e2c35bada1be63318', id: this.surveyDomId, class: "ai12z-form-container" })));
130
134
  }
131
135
  get el() { return index.getElement(this); }
132
136
  static get watchers() { return {
@@ -142,7 +142,20 @@ const KeyboardShortcutsDialog = class {
142
142
  this.closeDialog = index.createEvent(this, "closeDialog", 7);
143
143
  this.show = false;
144
144
  this.shortcuts = [];
145
- this.isMac = typeof navigator !== 'undefined' && navigator.platform.toUpperCase().indexOf('MAC') >= 0;
145
+ this.groupedShortcuts = [];
146
+ this.isMac = typeof navigator !== "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0;
147
+ this.KEY_MAP = {
148
+ Meta: this.isMac ? "⌘" : "Win",
149
+ Control: this.isMac ? "⌃" : "Ctrl",
150
+ Alt: this.isMac ? "⌥" : "Alt",
151
+ Shift: this.isMac ? "⇧" : "Shift",
152
+ Enter: "↵",
153
+ Escape: "Esc",
154
+ ArrowUp: "↑",
155
+ ArrowDown: "↓",
156
+ ArrowLeft: "←",
157
+ ArrowRight: "→",
158
+ };
146
159
  this.handleKeyDown = (event) => {
147
160
  if (event.key === "Escape") {
148
161
  this.handleClose();
@@ -171,6 +184,12 @@ const KeyboardShortcutsDialog = class {
171
184
  });
172
185
  }
173
186
  }
187
+ handleShortcutsChange() {
188
+ this.groupedShortcuts = this.getGroupedShortcuts();
189
+ }
190
+ componentWillLoad() {
191
+ this.groupedShortcuts = this.getGroupedShortcuts();
192
+ }
174
193
  initFocusTrap() {
175
194
  const dialog = this.el.shadowRoot.querySelector(".shortcuts-content");
176
195
  const focusable = dialog.querySelectorAll(`
@@ -191,19 +210,7 @@ const KeyboardShortcutsDialog = class {
191
210
  this.closeDialog.emit();
192
211
  }
193
212
  formatKey(key) {
194
- const keyMap = {
195
- 'Meta': this.isMac ? '⌘' : 'Win',
196
- 'Control': this.isMac ? '⌃' : 'Ctrl',
197
- 'Alt': this.isMac ? '⌥' : 'Alt',
198
- 'Shift': this.isMac ? '⇧' : 'Shift',
199
- 'Enter': '↵',
200
- 'Escape': 'Esc',
201
- 'ArrowUp': '↑',
202
- 'ArrowDown': '↓',
203
- 'ArrowLeft': '←',
204
- 'ArrowRight': '→',
205
- };
206
- return keyMap[key] || key;
213
+ return this.KEY_MAP[key] || key;
207
214
  }
208
215
  getGroupedShortcuts() {
209
216
  const grouped = this.shortcuts.reduce((acc, shortcut) => {
@@ -219,17 +226,19 @@ const KeyboardShortcutsDialog = class {
219
226
  if (!this.show) {
220
227
  return null;
221
228
  }
222
- const groupedShortcuts = this.getGroupedShortcuts();
223
- return (index.h("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "shortcuts-dialog-title", class: "shortcuts-backdrop", onClick: () => this.handleClose(), onKeyDown: this.handleKeyDown }, index.h("div", { class: "shortcuts-content", role: "document", tabindex: "-1", onClick: (e) => e.stopPropagation() }, index.h("div", { class: "shortcuts-header" }, index.h("h2", { id: "shortcuts-dialog-title" }, "Keyboard Shortcuts"), index.h("button", { class: "close-button", onClick: () => this.handleClose(), "aria-label": "Close shortcuts dialog" }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })))), index.h("div", { class: "shortcuts-body" }, groupedShortcuts.map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category" }, index.h("h3", null, category), index.h("div", { class: "shortcuts-list" }, shortcuts.map((shortcut) => {
229
+ return (index.h("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "shortcuts-dialog-title", class: "shortcuts-backdrop", onClick: () => this.handleClose(), onKeyDown: this.handleKeyDown }, index.h("div", { class: "shortcuts-content", role: "document", tabindex: "-1", onClick: e => e.stopPropagation() }, index.h("div", { class: "shortcuts-header" }, index.h("h2", { id: "shortcuts-dialog-title" }, "Keyboard Shortcuts"), index.h("button", { class: "close-button", onClick: () => this.handleClose(), "aria-label": "Close shortcuts dialog" }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })))), index.h("div", { class: "shortcuts-body" }, this.groupedShortcuts.map(([category, shortcuts]) => (index.h("div", { class: "shortcuts-category" }, index.h("h3", null, category), index.h("div", { class: "shortcuts-list" }, shortcuts.map(shortcut => {
224
230
  var _a;
225
231
  return (index.h("div", { class: "shortcut-item", tabindex: "0" }, index.h("span", { class: "shortcut-description" }, shortcut.description), index.h("div", { class: "shortcut-keys" }, (_a = shortcut.modifiers) === null || _a === void 0 ? void 0 :
226
- _a.map((modifier, index$1) => (index.h("span", null, index.h("kbd", { class: "key" }, this.formatKey(modifier)), index$1 < shortcut.modifiers.length - 1 && (index.h("span", { class: "key-separator" }, "+"))))), shortcut.modifiers && shortcut.modifiers.length > 0 && (index.h("span", { class: "key-separator" }, "+")), index.h("kbd", { class: "key" }, this.formatKey(shortcut.key)))));
227
- })))))), index.h("div", { class: "shortcuts-footer" }, index.h("p", { class: "shortcuts-hint" }, "Press ", index.h("kbd", { class: "key-inline" }, this.formatKey('Escape')), " to close")))));
232
+ _a.map((modifier, index$1) => (index.h("span", null, index.h("kbd", { class: "key" }, this.formatKey(modifier)), index$1 < shortcut.modifiers.length - 1 && index.h("span", { class: "key-separator" }, "+")))), shortcut.modifiers && shortcut.modifiers.length > 0 && index.h("span", { class: "key-separator" }, "+"), index.h("kbd", { class: "key" }, this.formatKey(shortcut.key)))));
233
+ })))))), index.h("div", { class: "shortcuts-footer" }, index.h("p", { class: "shortcuts-hint" }, "Press ", index.h("kbd", { class: "key-inline" }, this.formatKey("Escape")), " to close")))));
228
234
  }
229
235
  get el() { return index.getElement(this); }
230
236
  static get watchers() { return {
231
237
  "show": [{
232
238
  "handleShowChange": 0
239
+ }],
240
+ "shortcuts": [{
241
+ "handleShortcutsChange": 0
233
242
  }]
234
243
  }; }
235
244
  };
@@ -21,7 +21,7 @@ require('./reCaptchaHelpers-DUlImWQK.js');
21
21
  require('./botHelpers-aCoootcN.js');
22
22
  require('./processCarouselData-DcPRJVyR.js');
23
23
  require('./surveyHelpers-DTDyWBdY.js');
24
- require('./scriptStyleLoader-BHz2-bYp.js');
24
+ require('./scriptStyleLoader-BTtEJqyW.js');
25
25
  require('./ctaHelpers-CVr3D-cw.js');
26
26
  require('./app-store-D249GRTi.js');
27
27
  require('./parseHelper-XIyoURy9.js');
@@ -45,7 +45,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
45
45
 
46
46
  patchBrowser().then(async (options) => {
47
47
  await index.globalScripts();
48
- return index.bootstrapLazy(JSON.parse("[[\"ai12z-bot.cjs\",[[257,\"ai12z-bot\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[520,\"data-attributes\"],\"excludeTags\":[16],\"includeTags\":[16],\"liveAgentButtonText\":[32],\"isLiveAgentEnabled\":[32],\"isTypingIndicatorVisible\":[32],\"botSettings\":[32],\"canRender\":[32],\"voiceType\":[32],\"voice\":[32],\"showSubmit\":[32],\"hideAllButtons\":[32],\"showMenu\":[32],\"isProse\":[32],\"isLiveAgent\":[32],\"isConnectingLiveAgent\":[32],\"showWelcomeScreen\":[32],\"showHistory\":[32],\"conversationId\":[32],\"surveyDomId\":[32],\"searchResults\":[32],\"buttons\":[32],\"currentDomId\":[32],\"messages\":[32],\"questionCounter\":[32],\"visitorID\":[32],\"timestamp\":[32],\"rowCount\":[32],\"isBot\":[32],\"conversationHistory\":[32],\"query\":[32],\"scriptArray\":[32],\"imagesBase64List\":[32],\"focusedIndex\":[32],\"isAnimated\":[32],\"isMinimized\":[32],\"isStreaming\":[32],\"showErrorMessage\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"isOpened\":[32],\"isContent\":[32],\"isExpanded\":[32],\"isToggled\":[32],\"showPrivacy\":[32],\"isRendered\":[32],\"showShortcutsDialog\":[32],\"showLiveAgentEndDialog\":[32],\"shortcuts\":[32],\"announceMessage\":[32],\"liveAgentDirective\":[32],\"sendMessage\":[64],\"sendQuery\":[64],\"sendJSON\":[64],\"openBot\":[64],\"action\":[64],\"setProcessDataOverride\":[64],\"configureSettings\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"buttonClick\",\"buttonClickHandler\"],[0,\"sendQueryToBot\",\"sendQueryToBotHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"],[0,\"openChat\",\"openChatHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-cta.cjs\",[[257,\"ai12z-cta\",{\"isCta\":[1028,\"is-cta\"],\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[1,\"data-attributes\"],\"options\":[16],\"excludeTags\":[16],\"includeTags\":[16],\"socketService\":[32],\"ctaSettings\":[32],\"showModal\":[32],\"timer\":[32],\"questionCounter\":[32],\"formData\":[32],\"searchResults\":[32],\"error\":[32],\"conversationId\":[32],\"canRender\":[32],\"chatHistory\":[32],\"isChat\":[32],\"aiMessageId\":[32],\"thumbsId\":[32],\"imgFiles\":[32],\"announceMessage\":[32],\"showHistory\":[32],\"conversationHistory\":[32],\"isRendered\":[32],\"openModal\":[64],\"sendMessage\":[64],\"sendJSON\":[64],\"closeModal\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"survey\",\"surveyHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-inline-search.cjs\",[[1,\"ai12z-inline-search\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"resultPosition\":[1,\"result-position\"],\"autoSearch\":[4,\"auto-search\"],\"categorize\":[4],\"settings\":[16],\"formData\":[32],\"conversationHistory\":[32],\"searchResults\":[32],\"isOpen\":[32]},[[4,\"survey\",\"surveyHandler\"]]]]],[\"search-results-page.cjs\",[[1,\"search-results-page\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"dataAttributes\":[1,\"data-attributes\"],\"configId\":[1,\"config-id\"],\"query\":[32],\"searchResultSettings\":[32],\"searchResults\":[32],\"hideAllButtons\":[32],\"isChat\":[32],\"chatHistory\":[32],\"aiMessageId\":[32],\"socketService\":[32],\"thumbsId\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"imgFiles\":[32],\"displayText\":[32],\"showWelcomeTemplate\":[32],\"timer\":[32],\"questionCounter\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32],\"isRendered\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},[[4,\"messageReceived\",\"messageReceivedHandler\"],[4,\"survey\",\"surveyHandler\"]]]]],[\"ai12z-search-panel.cjs\",[[1,\"ai12z-search-panel\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"categorize\":[4],\"placeholder\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"query\":[32],\"searchResults\":[32],\"hideAllButtons\":[32]}]]],[\"ai12z-knowledge-box.cjs\",[[257,\"ai12z-knowledge-box\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[1537,\"config-id\"],\"question\":[1537],\"socket\":[1032],\"isLoading\":[1028,\"is-loading\"],\"questionId\":[32],\"isInitialized\":[32],\"kbSettings\":[32],\"searchResults\":[32],\"items\":[32],\"error\":[32],\"domId\":[32],\"surveyDomId\":[32],\"buttons\":[32],\"currentStreamingText\":[32],\"isStreaming\":[32],\"finalResponse\":[32],\"scriptArray\":[32],\"showButton\":[32],\"welcomeReady\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},null,{\"question\":[{\"watchPropHandler\":0}],\"domId\":[{\"watchStateHandler\":0}]}]]],[\"list-data.cjs\",[[1,\"list-data\",{\"template\":[1],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"items\":[1040],\"formSettings\":[8,\"form-settings\"],\"itemsPerPage\":[2,\"items-per-page\"],\"emptyMessage\":[1,\"empty-message\"],\"currentPage\":[32],\"showMoreState\":[32],\"showPanel\":[32],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32],\"showImageOnMore\":[32]}]]],[\"ai12z-container.cjs\",[[1,\"ai12z-container\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"instanceId\":[513,\"instance-id\"],\"parameters\":[513],\"renderType\":[1537,\"render-type\"],\"isLoading\":[32],\"error\":[32],\"contentText\":[32],\"htmlWidgetMarkup\":[32],\"domId\":[32]},null,{\"parameters\":[{\"onParametersChanged\":0}]}]]],[\"ai12z-form.cjs\",[[1,\"ai12z-form\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"isLoading\":[32],\"error\":[32],\"isReady\":[32],\"honeypotValue\":[32],\"loadDynamicForm\":[64]},null,{\"keyName\":[{\"watchLoadProps\":0}]}]]],[\"ai12z-carousel.cjs\",[[1,\"ai12z-carousel\",{\"items\":[16],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32]}]]],[\"ai12z-mic.cjs\",[[1,\"ai12z-mic\",{\"isListening\":[1028,\"is-listening\"],\"transcript\":[32],\"isRecording\":[32]}]]],[\"ai12z-spinner.cjs\",[[2,\"ai12z-spinner\",{\"class\":[1]}]]],[\"dynamic-form.cjs\",[[0,\"dynamic-form\",{\"form\":[8],\"formSettings\":[1032,\"form-settings\"],\"formsettings\":[8],\"theme\":[8]}]]],[\"ai12z-chat-message.cjs\",[[1,\"ai12z-chat-message\",{\"text\":[1],\"streaming\":[4],\"kbSettings\":[8,\"kb-settings\"],\"showButton\":[4,\"show-button\"],\"isExpanded\":[32],\"isCollapsing\":[32],\"canExpand\":[32]},[[4,\"initializeScripts\",\"handleInitializeScripts\"]],{\"text\":[{\"onTextChange\":0}]}]]],[\"ai12z-chat_2.cjs\",[[0,\"ai12z-input-form\",{\"isChat\":[4,\"is-chat\"],\"placeholder\":[1],\"buttonText\":[1,\"button-text\"],\"followUpLabel\":[1,\"follow-up-label\"],\"iconSrc\":[1,\"icon-src\"],\"isImageUpload\":[4,\"is-image-upload\"],\"isEnableMic\":[4,\"is-enable-mic\"],\"componentType\":[1,\"component-type\"],\"chatLength\":[2,\"chat-length\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"imagesBase64List\":[32],\"showShortcutsDialog\":[32],\"shortcuts\":[32],\"searchInput\":[32],\"submitted\":[32],\"showErrorMessage\":[32],\"hideAllButtons\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32]},[[4,\"stateChanged\",\"stateChangedHandler\"],[4,\"clearInput\",\"clearInputHandler\"]]],[1,\"ai12z-chat\",{\"chatId\":[1,\"chat-id\"],\"chats\":[1032],\"query\":[1025],\"apiKey\":[1,\"api-key\"],\"aiMessageId\":[1025,\"ai-message-id\"],\"imgFiles\":[1032,\"img-files\"],\"env\":[1025],\"conversationId\":[1025,\"conversation-id\"],\"dataAttributes\":[8,\"data-attributes\"],\"chatExcludeTags\":[16],\"chatIncludeTags\":[16],\"target\":[1],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"componentType\":[1,\"component-type\"],\"chatPosition\":[1,\"chat-position\"],\"socketIn\":[16],\"customstyle\":[1],\"customJS\":[1,\"custom-j-s\"],\"avatarUrl\":[1,\"avatar-url\"],\"settings\":[8],\"scrollBottom\":[32],\"copied\":[32],\"isPlayed\":[32],\"buttons\":[32],\"itemList\":[32],\"currentChatData\":[32],\"currentTemplate\":[32],\"currentPage\":[32],\"currentResponse\":[32],\"currentSlide\":[32],\"scriptArray\":[32],\"isProse\":[32],\"isProcessingEndResponse\":[32],\"surveyDomId\":[32],\"focusedIndex\":[32],\"hydrateMessagesFromState\":[64]},[[8,\"streamResponse\",\"streamResponseHandler\"],[8,\"endResponse\",\"endResponseHandler\"],[0,\"buttonClick\",\"buttonClickHandler\"],[4,\"stopStream\",\"stopStreamInputHandler\"],[4,\"startStream\",\"startStreamInputHandler\"]],{\"chats\":[{\"watchHandler\":0}]}]]],[\"chatbot-history_2.cjs\",[[1,\"chatbot-history\",{\"chatList\":[16],\"botName\":[1,\"bot-name\"],\"chatlogo\":[1],\"heading\":[1],\"styles\":[1],\"scripts\":[1],\"showDeleteModal\":[32],\"chatToDelete\":[32],\"activeId\":[32],\"focusedIndex\":[32]}],[1,\"delete-confirmation-modal\",{\"show\":[4],\"dialogTitle\":[1,\"dialog-title\"],\"message\":[1],\"confirmButtonText\":[1,\"confirm-button-text\"],\"cancelButtonText\":[1,\"cancel-button-text\"]}]]],[\"item-list.cjs\",[[0,\"item-list\",{\"inputType\":[1,\"input-type\"],\"carouselType\":[1,\"carousel-type\"],\"customTemplate\":[16],\"customSource\":[8,\"custom-source\"],\"llm\":[16],\"customStyles\":[1,\"custom-styles\"],\"customScripts\":[1,\"custom-scripts\"],\"isExpanded\":[4,\"is-expanded\"],\"currentPage\":[32],\"htmlTemplate\":[32],\"currentIndex\":[32],\"formSettings\":[32],\"itemsPerPage\":[32],\"emptyMessage\":[32],\"buttonText\":[32],\"panelTemplate\":[32],\"panelIndex\":[32],\"panelName\":[32],\"items\":[32],\"theme\":[32],\"selectByIndex\":[64],\"selectByName\":[64]}]]],[\"chat-avatar_6.cjs\",[[0,\"interaction-buttons\",{\"message\":[8],\"chatArray\":[16],\"currentIndex\":[2,\"current-index\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"source\":[1],\"conversationId\":[1,\"conversation-id\"],\"projectId\":[1,\"project-id\"],\"isPlayed\":[32],\"audioElement\":[32],\"copied\":[32]}],[1,\"privacy-modal\",{\"message\":[1],\"show\":[4]}],[0,\"chat-avatar\",{\"senderType\":[1,\"sender-type\"],\"avatarUrl\":[1,\"avatar-url\"]}],[0,\"hamburger-menu\",{\"isToggled\":[1540,\"is-toggled\"],\"messages\":[16],\"botSettings\":[8,\"bot-settings\"],\"isLiveAgentEnabled\":[4,\"is-live-agent-enabled\"],\"liveAgentButtonText\":[1,\"live-agent-button-text\"],\"hasCheckedLiveAgent\":[32]},null,{\"isToggled\":[{\"watchToggled\":0}],\"messages\":[{\"watchMessages\":0}],\"liveAgentButtonText\":[{\"watchLiveAgentButtonText\":0}]}],[257,\"live-agent-chat\",{\"config\":[8],\"isApiReady\":[32],\"startChat\":[64]}],[1,\"typing-indicator\",{\"size\":[2],\"color\":[1],\"spacing\":[2]}]]],[\"image-uploader_2.cjs\",[[0,\"image-uploader\",{\"maxImages\":[2,\"max-images\"],\"disabled\":[4],\"images\":[16],\"targetElement\":[16],\"removeImageAtIndex\":[64]},[[4,\"isElementAvailable\",\"handleIsOpened\"],[4,\"capturedImgUpload\",\"handleCapturedImage\"]]],[1,\"keyboard-shortcuts-dialog\",{\"show\":[4],\"shortcuts\":[16]},null,{\"show\":[{\"handleShowChange\":0}]}]]],[\"ai12z-category_2.cjs\",[[0,\"ai12z-category\",{\"categoryList\":[520,\"category-list\"],\"linkTarget\":[513,\"link-target\"]},[[4,\"clearResults\",\"clearResultsHandler\"]]],[0,\"audio-recorder\",{\"componentType\":[1,\"component-type\"],\"dataKey\":[32],\"dataMode\":[32],\"isRecording\":[32],\"isProcessing\":[32],\"time\":[32],\"transcript\":[32],\"fullTranscript\":[32],\"isSpeechRecognitionSupported\":[32],\"userCountry\":[32]}]]]]"), options);
48
+ return index.bootstrapLazy(JSON.parse("[[\"ai12z-bot.cjs\",[[257,\"ai12z-bot\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[520,\"data-attributes\"],\"excludeTags\":[16],\"includeTags\":[16],\"liveAgentButtonText\":[32],\"isLiveAgentEnabled\":[32],\"isTypingIndicatorVisible\":[32],\"botSettings\":[32],\"canRender\":[32],\"voiceType\":[32],\"voice\":[32],\"showSubmit\":[32],\"hideAllButtons\":[32],\"showMenu\":[32],\"isProse\":[32],\"isLiveAgent\":[32],\"isConnectingLiveAgent\":[32],\"showWelcomeScreen\":[32],\"showHistory\":[32],\"conversationId\":[32],\"surveyDomId\":[32],\"searchResults\":[32],\"buttons\":[32],\"currentDomId\":[32],\"messages\":[32],\"questionCounter\":[32],\"visitorID\":[32],\"timestamp\":[32],\"rowCount\":[32],\"isBot\":[32],\"conversationHistory\":[32],\"query\":[32],\"scriptArray\":[32],\"imagesBase64List\":[32],\"focusedIndex\":[32],\"isAnimated\":[32],\"isMinimized\":[32],\"isStreaming\":[32],\"showErrorMessage\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"isOpened\":[32],\"isContent\":[32],\"isExpanded\":[32],\"isToggled\":[32],\"showPrivacy\":[32],\"isRendered\":[32],\"showShortcutsDialog\":[32],\"showLiveAgentEndDialog\":[32],\"shortcuts\":[32],\"announceMessage\":[32],\"liveAgentDirective\":[32],\"sendMessage\":[64],\"sendQuery\":[64],\"sendJSON\":[64],\"openBot\":[64],\"action\":[64],\"setProcessDataOverride\":[64],\"configureSettings\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"buttonClick\",\"buttonClickHandler\"],[0,\"sendQueryToBot\",\"sendQueryToBotHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"],[0,\"openChat\",\"openChatHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-cta.cjs\",[[257,\"ai12z-cta\",{\"isCta\":[1028,\"is-cta\"],\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[1,\"data-attributes\"],\"options\":[16],\"excludeTags\":[16],\"includeTags\":[16],\"socketService\":[32],\"ctaSettings\":[32],\"showModal\":[32],\"timer\":[32],\"questionCounter\":[32],\"formData\":[32],\"searchResults\":[32],\"error\":[32],\"conversationId\":[32],\"canRender\":[32],\"chatHistory\":[32],\"isChat\":[32],\"aiMessageId\":[32],\"thumbsId\":[32],\"imgFiles\":[32],\"announceMessage\":[32],\"showHistory\":[32],\"conversationHistory\":[32],\"isRendered\":[32],\"openModal\":[64],\"sendMessage\":[64],\"sendJSON\":[64],\"closeModal\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"survey\",\"surveyHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-inline-search.cjs\",[[1,\"ai12z-inline-search\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"resultPosition\":[1,\"result-position\"],\"autoSearch\":[4,\"auto-search\"],\"categorize\":[4],\"settings\":[16],\"formData\":[32],\"conversationHistory\":[32],\"searchResults\":[32],\"isOpen\":[32]},[[4,\"survey\",\"surveyHandler\"]]]]],[\"search-results-page.cjs\",[[1,\"search-results-page\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"dataAttributes\":[1,\"data-attributes\"],\"configId\":[1,\"config-id\"],\"query\":[32],\"searchResultSettings\":[32],\"searchResults\":[32],\"hideAllButtons\":[32],\"isChat\":[32],\"chatHistory\":[32],\"aiMessageId\":[32],\"socketService\":[32],\"thumbsId\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"imgFiles\":[32],\"displayText\":[32],\"showWelcomeTemplate\":[32],\"timer\":[32],\"questionCounter\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32],\"isRendered\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},[[4,\"messageReceived\",\"messageReceivedHandler\"],[4,\"survey\",\"surveyHandler\"]]]]],[\"ai12z-search-panel.cjs\",[[1,\"ai12z-search-panel\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"categorize\":[4],\"placeholder\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"query\":[32],\"searchResults\":[32],\"hideAllButtons\":[32]}]]],[\"ai12z-knowledge-box.cjs\",[[257,\"ai12z-knowledge-box\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[1537,\"config-id\"],\"question\":[1537],\"socket\":[1032],\"isLoading\":[1028,\"is-loading\"],\"questionId\":[32],\"isInitialized\":[32],\"kbSettings\":[32],\"searchResults\":[32],\"items\":[32],\"error\":[32],\"domId\":[32],\"surveyDomId\":[32],\"buttons\":[32],\"currentStreamingText\":[32],\"isStreaming\":[32],\"finalResponse\":[32],\"scriptArray\":[32],\"showButton\":[32],\"welcomeReady\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},null,{\"question\":[{\"watchPropHandler\":0}],\"domId\":[{\"watchStateHandler\":0}]}]]],[\"list-data.cjs\",[[1,\"list-data\",{\"template\":[1],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"items\":[1040],\"formSettings\":[8,\"form-settings\"],\"itemsPerPage\":[2,\"items-per-page\"],\"emptyMessage\":[1,\"empty-message\"],\"currentPage\":[32],\"showMoreState\":[32],\"showPanel\":[32],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32],\"showImageOnMore\":[32]}]]],[\"ai12z-container.cjs\",[[1,\"ai12z-container\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"instanceId\":[513,\"instance-id\"],\"parameters\":[513],\"renderType\":[1537,\"render-type\"],\"isLoading\":[32],\"error\":[32],\"contentText\":[32],\"htmlWidgetMarkup\":[32],\"domId\":[32]},null,{\"parameters\":[{\"onParametersChanged\":0}]}]]],[\"ai12z-form.cjs\",[[1,\"ai12z-form\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"isLoading\":[32],\"error\":[32],\"isReady\":[32],\"honeypotValue\":[32],\"loadDynamicForm\":[64]},null,{\"keyName\":[{\"watchLoadProps\":0}]}]]],[\"ai12z-carousel.cjs\",[[1,\"ai12z-carousel\",{\"items\":[16],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32]}]]],[\"ai12z-mic.cjs\",[[1,\"ai12z-mic\",{\"isListening\":[1028,\"is-listening\"],\"transcript\":[32],\"isRecording\":[32]}]]],[\"ai12z-spinner.cjs\",[[2,\"ai12z-spinner\",{\"class\":[1]}]]],[\"dynamic-form.cjs\",[[0,\"dynamic-form\",{\"form\":[8],\"formSettings\":[1032,\"form-settings\"],\"formsettings\":[8],\"theme\":[8]}]]],[\"ai12z-chat-message.cjs\",[[1,\"ai12z-chat-message\",{\"text\":[1],\"streaming\":[4],\"kbSettings\":[8,\"kb-settings\"],\"showButton\":[4,\"show-button\"],\"isExpanded\":[32],\"isCollapsing\":[32],\"canExpand\":[32]},[[4,\"initializeScripts\",\"handleInitializeScripts\"]],{\"text\":[{\"onTextChange\":0}]}]]],[\"ai12z-chat_2.cjs\",[[0,\"ai12z-input-form\",{\"isChat\":[4,\"is-chat\"],\"placeholder\":[1],\"buttonText\":[1,\"button-text\"],\"followUpLabel\":[1,\"follow-up-label\"],\"iconSrc\":[1,\"icon-src\"],\"isImageUpload\":[4,\"is-image-upload\"],\"isEnableMic\":[4,\"is-enable-mic\"],\"componentType\":[1,\"component-type\"],\"chatLength\":[2,\"chat-length\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"imagesBase64List\":[32],\"showShortcutsDialog\":[32],\"shortcuts\":[32],\"searchInput\":[32],\"submitted\":[32],\"showErrorMessage\":[32],\"hideAllButtons\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32]},[[4,\"stateChanged\",\"stateChangedHandler\"],[4,\"clearInput\",\"clearInputHandler\"]]],[1,\"ai12z-chat\",{\"chatId\":[1,\"chat-id\"],\"chats\":[1032],\"query\":[1025],\"apiKey\":[1,\"api-key\"],\"aiMessageId\":[1025,\"ai-message-id\"],\"imgFiles\":[1032,\"img-files\"],\"env\":[1025],\"conversationId\":[1025,\"conversation-id\"],\"dataAttributes\":[8,\"data-attributes\"],\"chatExcludeTags\":[16],\"chatIncludeTags\":[16],\"target\":[1],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"componentType\":[1,\"component-type\"],\"chatPosition\":[1,\"chat-position\"],\"socketIn\":[16],\"customstyle\":[1],\"customJS\":[1,\"custom-j-s\"],\"avatarUrl\":[1,\"avatar-url\"],\"settings\":[8],\"scrollBottom\":[32],\"copied\":[32],\"isPlayed\":[32],\"buttons\":[32],\"itemList\":[32],\"currentChatData\":[32],\"currentTemplate\":[32],\"currentPage\":[32],\"currentResponse\":[32],\"currentSlide\":[32],\"scriptArray\":[32],\"isProse\":[32],\"isProcessingEndResponse\":[32],\"surveyDomId\":[32],\"focusedIndex\":[32],\"hydrateMessagesFromState\":[64]},[[8,\"streamResponse\",\"streamResponseHandler\"],[8,\"endResponse\",\"endResponseHandler\"],[0,\"buttonClick\",\"buttonClickHandler\"],[4,\"stopStream\",\"stopStreamInputHandler\"],[4,\"startStream\",\"startStreamInputHandler\"]],{\"chats\":[{\"watchHandler\":0}]}]]],[\"chatbot-history_2.cjs\",[[1,\"chatbot-history\",{\"chatList\":[16],\"botName\":[1,\"bot-name\"],\"chatlogo\":[1],\"heading\":[1],\"styles\":[1],\"scripts\":[1],\"showDeleteModal\":[32],\"chatToDelete\":[32],\"activeId\":[32],\"focusedIndex\":[32]}],[1,\"delete-confirmation-modal\",{\"show\":[4],\"dialogTitle\":[1,\"dialog-title\"],\"message\":[1],\"confirmButtonText\":[1,\"confirm-button-text\"],\"cancelButtonText\":[1,\"cancel-button-text\"]}]]],[\"item-list.cjs\",[[0,\"item-list\",{\"inputType\":[1,\"input-type\"],\"carouselType\":[1,\"carousel-type\"],\"customTemplate\":[16],\"customSource\":[8,\"custom-source\"],\"llm\":[16],\"customStyles\":[1,\"custom-styles\"],\"customScripts\":[1,\"custom-scripts\"],\"isExpanded\":[4,\"is-expanded\"],\"currentPage\":[32],\"htmlTemplate\":[32],\"currentIndex\":[32],\"formSettings\":[32],\"itemsPerPage\":[32],\"emptyMessage\":[32],\"buttonText\":[32],\"panelTemplate\":[32],\"panelIndex\":[32],\"panelName\":[32],\"items\":[32],\"theme\":[32],\"selectByIndex\":[64],\"selectByName\":[64]}]]],[\"chat-avatar_6.cjs\",[[0,\"interaction-buttons\",{\"message\":[8],\"chatArray\":[16],\"currentIndex\":[2,\"current-index\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"source\":[1],\"conversationId\":[1,\"conversation-id\"],\"projectId\":[1,\"project-id\"],\"isPlayed\":[32],\"audioElement\":[32],\"copied\":[32]}],[1,\"privacy-modal\",{\"message\":[1],\"show\":[4]}],[0,\"chat-avatar\",{\"senderType\":[1,\"sender-type\"],\"avatarUrl\":[1,\"avatar-url\"]}],[0,\"hamburger-menu\",{\"isToggled\":[1540,\"is-toggled\"],\"messages\":[16],\"botSettings\":[8,\"bot-settings\"],\"isLiveAgentEnabled\":[4,\"is-live-agent-enabled\"],\"liveAgentButtonText\":[1,\"live-agent-button-text\"],\"hasCheckedLiveAgent\":[32]},null,{\"isToggled\":[{\"watchToggled\":0}],\"messages\":[{\"watchMessages\":0}],\"liveAgentButtonText\":[{\"watchLiveAgentButtonText\":0}]}],[257,\"live-agent-chat\",{\"config\":[8],\"isApiReady\":[32],\"startChat\":[64]}],[1,\"typing-indicator\",{\"size\":[2],\"color\":[1],\"spacing\":[2]}]]],[\"image-uploader_2.cjs\",[[0,\"image-uploader\",{\"maxImages\":[2,\"max-images\"],\"disabled\":[4],\"images\":[16],\"targetElement\":[16],\"removeImageAtIndex\":[64]},[[4,\"isElementAvailable\",\"handleIsOpened\"],[4,\"capturedImgUpload\",\"handleCapturedImage\"]]],[1,\"keyboard-shortcuts-dialog\",{\"show\":[4],\"shortcuts\":[16],\"groupedShortcuts\":[32]},null,{\"show\":[{\"handleShowChange\":0}],\"shortcuts\":[{\"handleShortcutsChange\":0}]}]]],[\"ai12z-category_2.cjs\",[[0,\"ai12z-category\",{\"categoryList\":[520,\"category-list\"],\"linkTarget\":[513,\"link-target\"]},[[4,\"clearResults\",\"clearResultsHandler\"]]],[0,\"audio-recorder\",{\"componentType\":[1,\"component-type\"],\"dataKey\":[32],\"dataMode\":[32],\"isRecording\":[32],\"isProcessing\":[32],\"time\":[32],\"transcript\":[32],\"fullTranscript\":[32],\"isSpeechRecognitionSupported\":[32],\"userCountry\":[32]}]]]]"), options);
49
49
  });
50
50
 
51
51
  exports.setNonce = index.setNonce;
@@ -5,7 +5,7 @@ var index = require('./index-Ct2DwlDF.js');
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await index.globalScripts();
8
- return index.bootstrapLazy(JSON.parse("[[\"ai12z-bot.cjs\",[[257,\"ai12z-bot\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[520,\"data-attributes\"],\"excludeTags\":[16],\"includeTags\":[16],\"liveAgentButtonText\":[32],\"isLiveAgentEnabled\":[32],\"isTypingIndicatorVisible\":[32],\"botSettings\":[32],\"canRender\":[32],\"voiceType\":[32],\"voice\":[32],\"showSubmit\":[32],\"hideAllButtons\":[32],\"showMenu\":[32],\"isProse\":[32],\"isLiveAgent\":[32],\"isConnectingLiveAgent\":[32],\"showWelcomeScreen\":[32],\"showHistory\":[32],\"conversationId\":[32],\"surveyDomId\":[32],\"searchResults\":[32],\"buttons\":[32],\"currentDomId\":[32],\"messages\":[32],\"questionCounter\":[32],\"visitorID\":[32],\"timestamp\":[32],\"rowCount\":[32],\"isBot\":[32],\"conversationHistory\":[32],\"query\":[32],\"scriptArray\":[32],\"imagesBase64List\":[32],\"focusedIndex\":[32],\"isAnimated\":[32],\"isMinimized\":[32],\"isStreaming\":[32],\"showErrorMessage\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"isOpened\":[32],\"isContent\":[32],\"isExpanded\":[32],\"isToggled\":[32],\"showPrivacy\":[32],\"isRendered\":[32],\"showShortcutsDialog\":[32],\"showLiveAgentEndDialog\":[32],\"shortcuts\":[32],\"announceMessage\":[32],\"liveAgentDirective\":[32],\"sendMessage\":[64],\"sendQuery\":[64],\"sendJSON\":[64],\"openBot\":[64],\"action\":[64],\"setProcessDataOverride\":[64],\"configureSettings\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"buttonClick\",\"buttonClickHandler\"],[0,\"sendQueryToBot\",\"sendQueryToBotHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"],[0,\"openChat\",\"openChatHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-cta.cjs\",[[257,\"ai12z-cta\",{\"isCta\":[1028,\"is-cta\"],\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[1,\"data-attributes\"],\"options\":[16],\"excludeTags\":[16],\"includeTags\":[16],\"socketService\":[32],\"ctaSettings\":[32],\"showModal\":[32],\"timer\":[32],\"questionCounter\":[32],\"formData\":[32],\"searchResults\":[32],\"error\":[32],\"conversationId\":[32],\"canRender\":[32],\"chatHistory\":[32],\"isChat\":[32],\"aiMessageId\":[32],\"thumbsId\":[32],\"imgFiles\":[32],\"announceMessage\":[32],\"showHistory\":[32],\"conversationHistory\":[32],\"isRendered\":[32],\"openModal\":[64],\"sendMessage\":[64],\"sendJSON\":[64],\"closeModal\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"survey\",\"surveyHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-inline-search.cjs\",[[1,\"ai12z-inline-search\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"resultPosition\":[1,\"result-position\"],\"autoSearch\":[4,\"auto-search\"],\"categorize\":[4],\"settings\":[16],\"formData\":[32],\"conversationHistory\":[32],\"searchResults\":[32],\"isOpen\":[32]},[[4,\"survey\",\"surveyHandler\"]]]]],[\"search-results-page.cjs\",[[1,\"search-results-page\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"dataAttributes\":[1,\"data-attributes\"],\"configId\":[1,\"config-id\"],\"query\":[32],\"searchResultSettings\":[32],\"searchResults\":[32],\"hideAllButtons\":[32],\"isChat\":[32],\"chatHistory\":[32],\"aiMessageId\":[32],\"socketService\":[32],\"thumbsId\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"imgFiles\":[32],\"displayText\":[32],\"showWelcomeTemplate\":[32],\"timer\":[32],\"questionCounter\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32],\"isRendered\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},[[4,\"messageReceived\",\"messageReceivedHandler\"],[4,\"survey\",\"surveyHandler\"]]]]],[\"ai12z-search-panel.cjs\",[[1,\"ai12z-search-panel\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"categorize\":[4],\"placeholder\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"query\":[32],\"searchResults\":[32],\"hideAllButtons\":[32]}]]],[\"ai12z-knowledge-box.cjs\",[[257,\"ai12z-knowledge-box\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[1537,\"config-id\"],\"question\":[1537],\"socket\":[1032],\"isLoading\":[1028,\"is-loading\"],\"questionId\":[32],\"isInitialized\":[32],\"kbSettings\":[32],\"searchResults\":[32],\"items\":[32],\"error\":[32],\"domId\":[32],\"surveyDomId\":[32],\"buttons\":[32],\"currentStreamingText\":[32],\"isStreaming\":[32],\"finalResponse\":[32],\"scriptArray\":[32],\"showButton\":[32],\"welcomeReady\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},null,{\"question\":[{\"watchPropHandler\":0}],\"domId\":[{\"watchStateHandler\":0}]}]]],[\"list-data.cjs\",[[1,\"list-data\",{\"template\":[1],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"items\":[1040],\"formSettings\":[8,\"form-settings\"],\"itemsPerPage\":[2,\"items-per-page\"],\"emptyMessage\":[1,\"empty-message\"],\"currentPage\":[32],\"showMoreState\":[32],\"showPanel\":[32],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32],\"showImageOnMore\":[32]}]]],[\"ai12z-container.cjs\",[[1,\"ai12z-container\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"instanceId\":[513,\"instance-id\"],\"parameters\":[513],\"renderType\":[1537,\"render-type\"],\"isLoading\":[32],\"error\":[32],\"contentText\":[32],\"htmlWidgetMarkup\":[32],\"domId\":[32]},null,{\"parameters\":[{\"onParametersChanged\":0}]}]]],[\"ai12z-form.cjs\",[[1,\"ai12z-form\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"isLoading\":[32],\"error\":[32],\"isReady\":[32],\"honeypotValue\":[32],\"loadDynamicForm\":[64]},null,{\"keyName\":[{\"watchLoadProps\":0}]}]]],[\"ai12z-carousel.cjs\",[[1,\"ai12z-carousel\",{\"items\":[16],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32]}]]],[\"ai12z-mic.cjs\",[[1,\"ai12z-mic\",{\"isListening\":[1028,\"is-listening\"],\"transcript\":[32],\"isRecording\":[32]}]]],[\"ai12z-spinner.cjs\",[[2,\"ai12z-spinner\",{\"class\":[1]}]]],[\"dynamic-form.cjs\",[[0,\"dynamic-form\",{\"form\":[8],\"formSettings\":[1032,\"form-settings\"],\"formsettings\":[8],\"theme\":[8]}]]],[\"ai12z-chat-message.cjs\",[[1,\"ai12z-chat-message\",{\"text\":[1],\"streaming\":[4],\"kbSettings\":[8,\"kb-settings\"],\"showButton\":[4,\"show-button\"],\"isExpanded\":[32],\"isCollapsing\":[32],\"canExpand\":[32]},[[4,\"initializeScripts\",\"handleInitializeScripts\"]],{\"text\":[{\"onTextChange\":0}]}]]],[\"ai12z-chat_2.cjs\",[[0,\"ai12z-input-form\",{\"isChat\":[4,\"is-chat\"],\"placeholder\":[1],\"buttonText\":[1,\"button-text\"],\"followUpLabel\":[1,\"follow-up-label\"],\"iconSrc\":[1,\"icon-src\"],\"isImageUpload\":[4,\"is-image-upload\"],\"isEnableMic\":[4,\"is-enable-mic\"],\"componentType\":[1,\"component-type\"],\"chatLength\":[2,\"chat-length\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"imagesBase64List\":[32],\"showShortcutsDialog\":[32],\"shortcuts\":[32],\"searchInput\":[32],\"submitted\":[32],\"showErrorMessage\":[32],\"hideAllButtons\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32]},[[4,\"stateChanged\",\"stateChangedHandler\"],[4,\"clearInput\",\"clearInputHandler\"]]],[1,\"ai12z-chat\",{\"chatId\":[1,\"chat-id\"],\"chats\":[1032],\"query\":[1025],\"apiKey\":[1,\"api-key\"],\"aiMessageId\":[1025,\"ai-message-id\"],\"imgFiles\":[1032,\"img-files\"],\"env\":[1025],\"conversationId\":[1025,\"conversation-id\"],\"dataAttributes\":[8,\"data-attributes\"],\"chatExcludeTags\":[16],\"chatIncludeTags\":[16],\"target\":[1],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"componentType\":[1,\"component-type\"],\"chatPosition\":[1,\"chat-position\"],\"socketIn\":[16],\"customstyle\":[1],\"customJS\":[1,\"custom-j-s\"],\"avatarUrl\":[1,\"avatar-url\"],\"settings\":[8],\"scrollBottom\":[32],\"copied\":[32],\"isPlayed\":[32],\"buttons\":[32],\"itemList\":[32],\"currentChatData\":[32],\"currentTemplate\":[32],\"currentPage\":[32],\"currentResponse\":[32],\"currentSlide\":[32],\"scriptArray\":[32],\"isProse\":[32],\"isProcessingEndResponse\":[32],\"surveyDomId\":[32],\"focusedIndex\":[32],\"hydrateMessagesFromState\":[64]},[[8,\"streamResponse\",\"streamResponseHandler\"],[8,\"endResponse\",\"endResponseHandler\"],[0,\"buttonClick\",\"buttonClickHandler\"],[4,\"stopStream\",\"stopStreamInputHandler\"],[4,\"startStream\",\"startStreamInputHandler\"]],{\"chats\":[{\"watchHandler\":0}]}]]],[\"chatbot-history_2.cjs\",[[1,\"chatbot-history\",{\"chatList\":[16],\"botName\":[1,\"bot-name\"],\"chatlogo\":[1],\"heading\":[1],\"styles\":[1],\"scripts\":[1],\"showDeleteModal\":[32],\"chatToDelete\":[32],\"activeId\":[32],\"focusedIndex\":[32]}],[1,\"delete-confirmation-modal\",{\"show\":[4],\"dialogTitle\":[1,\"dialog-title\"],\"message\":[1],\"confirmButtonText\":[1,\"confirm-button-text\"],\"cancelButtonText\":[1,\"cancel-button-text\"]}]]],[\"item-list.cjs\",[[0,\"item-list\",{\"inputType\":[1,\"input-type\"],\"carouselType\":[1,\"carousel-type\"],\"customTemplate\":[16],\"customSource\":[8,\"custom-source\"],\"llm\":[16],\"customStyles\":[1,\"custom-styles\"],\"customScripts\":[1,\"custom-scripts\"],\"isExpanded\":[4,\"is-expanded\"],\"currentPage\":[32],\"htmlTemplate\":[32],\"currentIndex\":[32],\"formSettings\":[32],\"itemsPerPage\":[32],\"emptyMessage\":[32],\"buttonText\":[32],\"panelTemplate\":[32],\"panelIndex\":[32],\"panelName\":[32],\"items\":[32],\"theme\":[32],\"selectByIndex\":[64],\"selectByName\":[64]}]]],[\"chat-avatar_6.cjs\",[[0,\"interaction-buttons\",{\"message\":[8],\"chatArray\":[16],\"currentIndex\":[2,\"current-index\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"source\":[1],\"conversationId\":[1,\"conversation-id\"],\"projectId\":[1,\"project-id\"],\"isPlayed\":[32],\"audioElement\":[32],\"copied\":[32]}],[1,\"privacy-modal\",{\"message\":[1],\"show\":[4]}],[0,\"chat-avatar\",{\"senderType\":[1,\"sender-type\"],\"avatarUrl\":[1,\"avatar-url\"]}],[0,\"hamburger-menu\",{\"isToggled\":[1540,\"is-toggled\"],\"messages\":[16],\"botSettings\":[8,\"bot-settings\"],\"isLiveAgentEnabled\":[4,\"is-live-agent-enabled\"],\"liveAgentButtonText\":[1,\"live-agent-button-text\"],\"hasCheckedLiveAgent\":[32]},null,{\"isToggled\":[{\"watchToggled\":0}],\"messages\":[{\"watchMessages\":0}],\"liveAgentButtonText\":[{\"watchLiveAgentButtonText\":0}]}],[257,\"live-agent-chat\",{\"config\":[8],\"isApiReady\":[32],\"startChat\":[64]}],[1,\"typing-indicator\",{\"size\":[2],\"color\":[1],\"spacing\":[2]}]]],[\"image-uploader_2.cjs\",[[0,\"image-uploader\",{\"maxImages\":[2,\"max-images\"],\"disabled\":[4],\"images\":[16],\"targetElement\":[16],\"removeImageAtIndex\":[64]},[[4,\"isElementAvailable\",\"handleIsOpened\"],[4,\"capturedImgUpload\",\"handleCapturedImage\"]]],[1,\"keyboard-shortcuts-dialog\",{\"show\":[4],\"shortcuts\":[16]},null,{\"show\":[{\"handleShowChange\":0}]}]]],[\"ai12z-category_2.cjs\",[[0,\"ai12z-category\",{\"categoryList\":[520,\"category-list\"],\"linkTarget\":[513,\"link-target\"]},[[4,\"clearResults\",\"clearResultsHandler\"]]],[0,\"audio-recorder\",{\"componentType\":[1,\"component-type\"],\"dataKey\":[32],\"dataMode\":[32],\"isRecording\":[32],\"isProcessing\":[32],\"time\":[32],\"transcript\":[32],\"fullTranscript\":[32],\"isSpeechRecognitionSupported\":[32],\"userCountry\":[32]}]]]]"), options);
8
+ return index.bootstrapLazy(JSON.parse("[[\"ai12z-bot.cjs\",[[257,\"ai12z-bot\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[520,\"data-attributes\"],\"excludeTags\":[16],\"includeTags\":[16],\"liveAgentButtonText\":[32],\"isLiveAgentEnabled\":[32],\"isTypingIndicatorVisible\":[32],\"botSettings\":[32],\"canRender\":[32],\"voiceType\":[32],\"voice\":[32],\"showSubmit\":[32],\"hideAllButtons\":[32],\"showMenu\":[32],\"isProse\":[32],\"isLiveAgent\":[32],\"isConnectingLiveAgent\":[32],\"showWelcomeScreen\":[32],\"showHistory\":[32],\"conversationId\":[32],\"surveyDomId\":[32],\"searchResults\":[32],\"buttons\":[32],\"currentDomId\":[32],\"messages\":[32],\"questionCounter\":[32],\"visitorID\":[32],\"timestamp\":[32],\"rowCount\":[32],\"isBot\":[32],\"conversationHistory\":[32],\"query\":[32],\"scriptArray\":[32],\"imagesBase64List\":[32],\"focusedIndex\":[32],\"isAnimated\":[32],\"isMinimized\":[32],\"isStreaming\":[32],\"showErrorMessage\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"isOpened\":[32],\"isContent\":[32],\"isExpanded\":[32],\"isToggled\":[32],\"showPrivacy\":[32],\"isRendered\":[32],\"showShortcutsDialog\":[32],\"showLiveAgentEndDialog\":[32],\"shortcuts\":[32],\"announceMessage\":[32],\"liveAgentDirective\":[32],\"sendMessage\":[64],\"sendQuery\":[64],\"sendJSON\":[64],\"openBot\":[64],\"action\":[64],\"setProcessDataOverride\":[64],\"configureSettings\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"buttonClick\",\"buttonClickHandler\"],[0,\"sendQueryToBot\",\"sendQueryToBotHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"],[0,\"openChat\",\"openChatHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-cta.cjs\",[[257,\"ai12z-cta\",{\"isCta\":[1028,\"is-cta\"],\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[1,\"data-attributes\"],\"options\":[16],\"excludeTags\":[16],\"includeTags\":[16],\"socketService\":[32],\"ctaSettings\":[32],\"showModal\":[32],\"timer\":[32],\"questionCounter\":[32],\"formData\":[32],\"searchResults\":[32],\"error\":[32],\"conversationId\":[32],\"canRender\":[32],\"chatHistory\":[32],\"isChat\":[32],\"aiMessageId\":[32],\"thumbsId\":[32],\"imgFiles\":[32],\"announceMessage\":[32],\"showHistory\":[32],\"conversationHistory\":[32],\"isRendered\":[32],\"openModal\":[64],\"sendMessage\":[64],\"sendJSON\":[64],\"closeModal\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"survey\",\"surveyHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-inline-search.cjs\",[[1,\"ai12z-inline-search\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"resultPosition\":[1,\"result-position\"],\"autoSearch\":[4,\"auto-search\"],\"categorize\":[4],\"settings\":[16],\"formData\":[32],\"conversationHistory\":[32],\"searchResults\":[32],\"isOpen\":[32]},[[4,\"survey\",\"surveyHandler\"]]]]],[\"search-results-page.cjs\",[[1,\"search-results-page\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"dataAttributes\":[1,\"data-attributes\"],\"configId\":[1,\"config-id\"],\"query\":[32],\"searchResultSettings\":[32],\"searchResults\":[32],\"hideAllButtons\":[32],\"isChat\":[32],\"chatHistory\":[32],\"aiMessageId\":[32],\"socketService\":[32],\"thumbsId\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"imgFiles\":[32],\"displayText\":[32],\"showWelcomeTemplate\":[32],\"timer\":[32],\"questionCounter\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32],\"isRendered\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},[[4,\"messageReceived\",\"messageReceivedHandler\"],[4,\"survey\",\"surveyHandler\"]]]]],[\"ai12z-search-panel.cjs\",[[1,\"ai12z-search-panel\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"categorize\":[4],\"placeholder\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"query\":[32],\"searchResults\":[32],\"hideAllButtons\":[32]}]]],[\"ai12z-knowledge-box.cjs\",[[257,\"ai12z-knowledge-box\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[1537,\"config-id\"],\"question\":[1537],\"socket\":[1032],\"isLoading\":[1028,\"is-loading\"],\"questionId\":[32],\"isInitialized\":[32],\"kbSettings\":[32],\"searchResults\":[32],\"items\":[32],\"error\":[32],\"domId\":[32],\"surveyDomId\":[32],\"buttons\":[32],\"currentStreamingText\":[32],\"isStreaming\":[32],\"finalResponse\":[32],\"scriptArray\":[32],\"showButton\":[32],\"welcomeReady\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},null,{\"question\":[{\"watchPropHandler\":0}],\"domId\":[{\"watchStateHandler\":0}]}]]],[\"list-data.cjs\",[[1,\"list-data\",{\"template\":[1],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"items\":[1040],\"formSettings\":[8,\"form-settings\"],\"itemsPerPage\":[2,\"items-per-page\"],\"emptyMessage\":[1,\"empty-message\"],\"currentPage\":[32],\"showMoreState\":[32],\"showPanel\":[32],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32],\"showImageOnMore\":[32]}]]],[\"ai12z-container.cjs\",[[1,\"ai12z-container\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"instanceId\":[513,\"instance-id\"],\"parameters\":[513],\"renderType\":[1537,\"render-type\"],\"isLoading\":[32],\"error\":[32],\"contentText\":[32],\"htmlWidgetMarkup\":[32],\"domId\":[32]},null,{\"parameters\":[{\"onParametersChanged\":0}]}]]],[\"ai12z-form.cjs\",[[1,\"ai12z-form\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"isLoading\":[32],\"error\":[32],\"isReady\":[32],\"honeypotValue\":[32],\"loadDynamicForm\":[64]},null,{\"keyName\":[{\"watchLoadProps\":0}]}]]],[\"ai12z-carousel.cjs\",[[1,\"ai12z-carousel\",{\"items\":[16],\"inputType\":[1,\"input-type\"],\"itemsPerRow\":[2,\"items-per-row\"],\"activeIndex\":[32],\"activeButton\":[32],\"activeButtonIndex\":[32]}]]],[\"ai12z-mic.cjs\",[[1,\"ai12z-mic\",{\"isListening\":[1028,\"is-listening\"],\"transcript\":[32],\"isRecording\":[32]}]]],[\"ai12z-spinner.cjs\",[[2,\"ai12z-spinner\",{\"class\":[1]}]]],[\"dynamic-form.cjs\",[[0,\"dynamic-form\",{\"form\":[8],\"formSettings\":[1032,\"form-settings\"],\"formsettings\":[8],\"theme\":[8]}]]],[\"ai12z-chat-message.cjs\",[[1,\"ai12z-chat-message\",{\"text\":[1],\"streaming\":[4],\"kbSettings\":[8,\"kb-settings\"],\"showButton\":[4,\"show-button\"],\"isExpanded\":[32],\"isCollapsing\":[32],\"canExpand\":[32]},[[4,\"initializeScripts\",\"handleInitializeScripts\"]],{\"text\":[{\"onTextChange\":0}]}]]],[\"ai12z-chat_2.cjs\",[[0,\"ai12z-input-form\",{\"isChat\":[4,\"is-chat\"],\"placeholder\":[1],\"buttonText\":[1,\"button-text\"],\"followUpLabel\":[1,\"follow-up-label\"],\"iconSrc\":[1,\"icon-src\"],\"isImageUpload\":[4,\"is-image-upload\"],\"isEnableMic\":[4,\"is-enable-mic\"],\"componentType\":[1,\"component-type\"],\"chatLength\":[2,\"chat-length\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"imagesBase64List\":[32],\"showShortcutsDialog\":[32],\"shortcuts\":[32],\"searchInput\":[32],\"submitted\":[32],\"showErrorMessage\":[32],\"hideAllButtons\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32]},[[4,\"stateChanged\",\"stateChangedHandler\"],[4,\"clearInput\",\"clearInputHandler\"]]],[1,\"ai12z-chat\",{\"chatId\":[1,\"chat-id\"],\"chats\":[1032],\"query\":[1025],\"apiKey\":[1,\"api-key\"],\"aiMessageId\":[1025,\"ai-message-id\"],\"imgFiles\":[1032,\"img-files\"],\"env\":[1025],\"conversationId\":[1025,\"conversation-id\"],\"dataAttributes\":[8,\"data-attributes\"],\"chatExcludeTags\":[16],\"chatIncludeTags\":[16],\"target\":[1],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"componentType\":[1,\"component-type\"],\"chatPosition\":[1,\"chat-position\"],\"socketIn\":[16],\"customstyle\":[1],\"customJS\":[1,\"custom-j-s\"],\"avatarUrl\":[1,\"avatar-url\"],\"settings\":[8],\"scrollBottom\":[32],\"copied\":[32],\"isPlayed\":[32],\"buttons\":[32],\"itemList\":[32],\"currentChatData\":[32],\"currentTemplate\":[32],\"currentPage\":[32],\"currentResponse\":[32],\"currentSlide\":[32],\"scriptArray\":[32],\"isProse\":[32],\"isProcessingEndResponse\":[32],\"surveyDomId\":[32],\"focusedIndex\":[32],\"hydrateMessagesFromState\":[64]},[[8,\"streamResponse\",\"streamResponseHandler\"],[8,\"endResponse\",\"endResponseHandler\"],[0,\"buttonClick\",\"buttonClickHandler\"],[4,\"stopStream\",\"stopStreamInputHandler\"],[4,\"startStream\",\"startStreamInputHandler\"]],{\"chats\":[{\"watchHandler\":0}]}]]],[\"chatbot-history_2.cjs\",[[1,\"chatbot-history\",{\"chatList\":[16],\"botName\":[1,\"bot-name\"],\"chatlogo\":[1],\"heading\":[1],\"styles\":[1],\"scripts\":[1],\"showDeleteModal\":[32],\"chatToDelete\":[32],\"activeId\":[32],\"focusedIndex\":[32]}],[1,\"delete-confirmation-modal\",{\"show\":[4],\"dialogTitle\":[1,\"dialog-title\"],\"message\":[1],\"confirmButtonText\":[1,\"confirm-button-text\"],\"cancelButtonText\":[1,\"cancel-button-text\"]}]]],[\"item-list.cjs\",[[0,\"item-list\",{\"inputType\":[1,\"input-type\"],\"carouselType\":[1,\"carousel-type\"],\"customTemplate\":[16],\"customSource\":[8,\"custom-source\"],\"llm\":[16],\"customStyles\":[1,\"custom-styles\"],\"customScripts\":[1,\"custom-scripts\"],\"isExpanded\":[4,\"is-expanded\"],\"currentPage\":[32],\"htmlTemplate\":[32],\"currentIndex\":[32],\"formSettings\":[32],\"itemsPerPage\":[32],\"emptyMessage\":[32],\"buttonText\":[32],\"panelTemplate\":[32],\"panelIndex\":[32],\"panelName\":[32],\"items\":[32],\"theme\":[32],\"selectByIndex\":[64],\"selectByName\":[64]}]]],[\"chat-avatar_6.cjs\",[[0,\"interaction-buttons\",{\"message\":[8],\"chatArray\":[16],\"currentIndex\":[2,\"current-index\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"source\":[1],\"conversationId\":[1,\"conversation-id\"],\"projectId\":[1,\"project-id\"],\"isPlayed\":[32],\"audioElement\":[32],\"copied\":[32]}],[1,\"privacy-modal\",{\"message\":[1],\"show\":[4]}],[0,\"chat-avatar\",{\"senderType\":[1,\"sender-type\"],\"avatarUrl\":[1,\"avatar-url\"]}],[0,\"hamburger-menu\",{\"isToggled\":[1540,\"is-toggled\"],\"messages\":[16],\"botSettings\":[8,\"bot-settings\"],\"isLiveAgentEnabled\":[4,\"is-live-agent-enabled\"],\"liveAgentButtonText\":[1,\"live-agent-button-text\"],\"hasCheckedLiveAgent\":[32]},null,{\"isToggled\":[{\"watchToggled\":0}],\"messages\":[{\"watchMessages\":0}],\"liveAgentButtonText\":[{\"watchLiveAgentButtonText\":0}]}],[257,\"live-agent-chat\",{\"config\":[8],\"isApiReady\":[32],\"startChat\":[64]}],[1,\"typing-indicator\",{\"size\":[2],\"color\":[1],\"spacing\":[2]}]]],[\"image-uploader_2.cjs\",[[0,\"image-uploader\",{\"maxImages\":[2,\"max-images\"],\"disabled\":[4],\"images\":[16],\"targetElement\":[16],\"removeImageAtIndex\":[64]},[[4,\"isElementAvailable\",\"handleIsOpened\"],[4,\"capturedImgUpload\",\"handleCapturedImage\"]]],[1,\"keyboard-shortcuts-dialog\",{\"show\":[4],\"shortcuts\":[16],\"groupedShortcuts\":[32]},null,{\"show\":[{\"handleShowChange\":0}],\"shortcuts\":[{\"handleShortcutsChange\":0}]}]]],[\"ai12z-category_2.cjs\",[[0,\"ai12z-category\",{\"categoryList\":[520,\"category-list\"],\"linkTarget\":[513,\"link-target\"]},[[4,\"clearResults\",\"clearResultsHandler\"]]],[0,\"audio-recorder\",{\"componentType\":[1,\"component-type\"],\"dataKey\":[32],\"dataMode\":[32],\"isRecording\":[32],\"isProcessing\":[32],\"time\":[32],\"transcript\":[32],\"fullTranscript\":[32],\"isSpeechRecognitionSupported\":[32],\"userCountry\":[32]}]]]]"), options);
9
9
  };
10
10
 
11
11
  exports.setNonce = index.setNonce;
@@ -6,17 +6,13 @@ class ScriptStyleLoader {
6
6
  this.loadedStyles = new Set();
7
7
  this.scriptPromises = new Map();
8
8
  this.stylePromises = new Map();
9
- this.config = Object.assign({ cdnPath: "https://cdn.ai12z.net/assets/bot", surveyCDNPath: "https://cdn.ai12z.net/pkg/surveyjs", customStyles: [
10
- "https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css"
11
- ], customScripts: [] }, config);
9
+ this.config = Object.assign({ cdnPath: "https://cdn.ai12z.net/assets/bot", surveyCDNPath: "https://cdn.ai12z.net/pkg/surveyjs", customStyles: ["https://unpkg.com/@highlightjs/cdn-assets@11.11.1/styles/default.min.css"], customScripts: [] }, config);
12
10
  }
13
11
  /**
14
12
  * Load a single script
15
13
  */
16
14
  loadScript(config) {
17
- const scriptConfig = typeof config === 'string'
18
- ? { src: config }
19
- : config;
15
+ const scriptConfig = typeof config === "string" ? { src: config } : config;
20
16
  const { src } = scriptConfig;
21
17
  // Return existing promise if script is already being loaded
22
18
  if (this.scriptPromises.has(src)) {
@@ -42,7 +38,7 @@ class ScriptStyleLoader {
42
38
  // console.log(`✅ Script loaded: ${src}`)
43
39
  resolve();
44
40
  };
45
- script.onerror = (error) => {
41
+ script.onerror = error => {
46
42
  this.scriptPromises.delete(src);
47
43
  const errorObj = new Error(`Failed to load script: ${src}`);
48
44
  if (scriptConfig.onError) {
@@ -66,9 +62,7 @@ class ScriptStyleLoader {
66
62
  * Load a single style
67
63
  */
68
64
  loadStyle(config, isTheme = false) {
69
- const styleConfig = typeof config === 'string'
70
- ? { href: config }
71
- : config;
65
+ const styleConfig = typeof config === "string" ? { href: config } : config;
72
66
  const { href } = styleConfig;
73
67
  // Return existing promise if style is already being loaded
74
68
  if (this.stylePromises.has(href)) {
@@ -93,7 +87,7 @@ class ScriptStyleLoader {
93
87
  // console.log(`✅ Style loaded: ${href}`)
94
88
  resolve();
95
89
  };
96
- link.onerror = (error) => {
90
+ link.onerror = error => {
97
91
  this.stylePromises.delete(href);
98
92
  const errorObj = new Error(`Failed to load style: ${href}`);
99
93
  if (styleConfig.onError) {
@@ -165,7 +159,7 @@ class ScriptStyleLoader {
165
159
  `${this.config.surveyCDNPath}/survey-core@2.3.4/survey.core.min.js`,
166
160
  `${this.config.surveyCDNPath}/survey-core@2.3.4/survey.i18n.min.js`,
167
161
  `${this.config.surveyCDNPath}/survey-core@2.3.4/themes/index.min.js`,
168
- `${this.config.surveyCDNPath}/survey-js-ui@2.3.4/survey-js-ui.min.js`
162
+ `${this.config.surveyCDNPath}/survey-js-ui@2.3.4/survey-js-ui.min.js`,
169
163
  ];
170
164
  // console.log("🔄 Loading Survey.js dependencies...")
171
165
  await this.loadScriptsSequentially(surveyScripts);
@@ -180,7 +174,7 @@ class ScriptStyleLoader {
180
174
  // Load styles and scripts in parallel
181
175
  await Promise.all([
182
176
  this.loadStyles(this.config.customStyles || []),
183
- this.loadSurveyDependencies()
177
+ // this.loadSurveyDependencies()
184
178
  ]);
185
179
  // console.log("✅ All bot assets loaded successfully")
186
180
  }
@@ -221,21 +215,21 @@ class ScriptStyleLoader {
221
215
  if ((_b = botSettings.welcome) === null || _b === void 0 ? void 0 : _b.scripts) {
222
216
  scriptsToLoad.push({
223
217
  src: botSettings.welcome.scripts,
224
- type: "text/javascript"
218
+ type: "text/javascript",
225
219
  });
226
220
  }
227
221
  // Add custom JS
228
222
  if (botSettings.customJS) {
229
223
  scriptsToLoad.push({
230
224
  src: botSettings.customJS,
231
- type: "text/javascript"
225
+ type: "text/javascript",
232
226
  });
233
227
  }
234
228
  // Load all theme assets
235
229
  await Promise.all([
236
230
  themesToLoad.length > 0 ? this.loadStyles(themesToLoad, true) : Promise.resolve(),
237
231
  stylesToLoad.length > 0 ? this.loadStyles(stylesToLoad, false) : Promise.resolve(),
238
- scriptsToLoad.length > 0 ? this.loadScriptsParallel(scriptsToLoad) : Promise.resolve()
232
+ scriptsToLoad.length > 0 ? this.loadScriptsParallel(scriptsToLoad) : Promise.resolve(),
239
233
  ]);
240
234
  // console.log("✅ Bot theme loaded successfully")
241
235
  }
@@ -244,16 +238,14 @@ class ScriptStyleLoader {
244
238
  */
245
239
  isScriptLoaded(src) {
246
240
  var _a;
247
- return !!(document.querySelector(`script[src="${src}"]`) ||
248
- ((_a = this.config.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`script[src="${src}"]`)));
241
+ return !!(document.querySelector(`script[src="${src}"]`) || ((_a = this.config.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`script[src="${src}"]`)));
249
242
  }
250
243
  /**
251
244
  * Check if style is already loaded in DOM
252
245
  */
253
246
  isStyleLoaded(href) {
254
247
  var _a;
255
- return !!(document.querySelector(`link[href="${href}"]`) ||
256
- ((_a = this.config.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`link[href="${href}"]`)));
248
+ return !!(document.querySelector(`link[href="${href}"]`) || ((_a = this.config.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`link[href="${href}"]`)));
257
249
  }
258
250
  /**
259
251
  * Get loading status
@@ -263,7 +255,7 @@ class ScriptStyleLoader {
263
255
  loadedScripts: Array.from(this.loadedScripts),
264
256
  loadedStyles: Array.from(this.loadedStyles),
265
257
  pendingScripts: Array.from(this.scriptPromises.keys()),
266
- pendingStyles: Array.from(this.stylePromises.keys())
258
+ pendingStyles: Array.from(this.stylePromises.keys()),
267
259
  };
268
260
  }
269
261
  /**
@@ -134,6 +134,7 @@ export class Ai12zBot {
134
134
  console.warn("Survey DOM ID is empty");
135
135
  return;
136
136
  }
137
+ await this.assetLoader.loadSurveyDependencies();
137
138
  try {
138
139
  await renderSurvey({
139
140
  chat,
@@ -3,7 +3,20 @@ export class KeyboardShortcutsDialog {
3
3
  constructor() {
4
4
  this.show = false;
5
5
  this.shortcuts = [];
6
- this.isMac = typeof navigator !== 'undefined' && navigator.platform.toUpperCase().indexOf('MAC') >= 0;
6
+ this.groupedShortcuts = [];
7
+ this.isMac = typeof navigator !== "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0;
8
+ this.KEY_MAP = {
9
+ Meta: this.isMac ? "⌘" : "Win",
10
+ Control: this.isMac ? "⌃" : "Ctrl",
11
+ Alt: this.isMac ? "⌥" : "Alt",
12
+ Shift: this.isMac ? "⇧" : "Shift",
13
+ Enter: "↵",
14
+ Escape: "Esc",
15
+ ArrowUp: "↑",
16
+ ArrowDown: "↓",
17
+ ArrowLeft: "←",
18
+ ArrowRight: "→",
19
+ };
7
20
  this.handleKeyDown = (event) => {
8
21
  if (event.key === "Escape") {
9
22
  this.handleClose();
@@ -32,6 +45,12 @@ export class KeyboardShortcutsDialog {
32
45
  });
33
46
  }
34
47
  }
48
+ handleShortcutsChange() {
49
+ this.groupedShortcuts = this.getGroupedShortcuts();
50
+ }
51
+ componentWillLoad() {
52
+ this.groupedShortcuts = this.getGroupedShortcuts();
53
+ }
35
54
  initFocusTrap() {
36
55
  const dialog = this.el.shadowRoot.querySelector(".shortcuts-content");
37
56
  const focusable = dialog.querySelectorAll(`
@@ -52,19 +71,7 @@ export class KeyboardShortcutsDialog {
52
71
  this.closeDialog.emit();
53
72
  }
54
73
  formatKey(key) {
55
- const keyMap = {
56
- 'Meta': this.isMac ? '⌘' : 'Win',
57
- 'Control': this.isMac ? '⌃' : 'Ctrl',
58
- 'Alt': this.isMac ? '⌥' : 'Alt',
59
- 'Shift': this.isMac ? '⇧' : 'Shift',
60
- 'Enter': '↵',
61
- 'Escape': 'Esc',
62
- 'ArrowUp': '↑',
63
- 'ArrowDown': '↓',
64
- 'ArrowLeft': '←',
65
- 'ArrowRight': '→',
66
- };
67
- return keyMap[key] || key;
74
+ return this.KEY_MAP[key] || key;
68
75
  }
69
76
  getGroupedShortcuts() {
70
77
  const grouped = this.shortcuts.reduce((acc, shortcut) => {
@@ -80,12 +87,11 @@ export class KeyboardShortcutsDialog {
80
87
  if (!this.show) {
81
88
  return null;
82
89
  }
83
- const groupedShortcuts = this.getGroupedShortcuts();
84
- return (h("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "shortcuts-dialog-title", class: "shortcuts-backdrop", onClick: () => this.handleClose(), onKeyDown: this.handleKeyDown }, h("div", { class: "shortcuts-content", role: "document", tabindex: "-1", onClick: (e) => e.stopPropagation() }, h("div", { class: "shortcuts-header" }, h("h2", { id: "shortcuts-dialog-title" }, "Keyboard Shortcuts"), h("button", { class: "close-button", onClick: () => this.handleClose(), "aria-label": "Close shortcuts dialog" }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })))), h("div", { class: "shortcuts-body" }, groupedShortcuts.map(([category, shortcuts]) => (h("div", { class: "shortcuts-category" }, h("h3", null, category), h("div", { class: "shortcuts-list" }, shortcuts.map((shortcut) => {
90
+ return (h("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": "shortcuts-dialog-title", class: "shortcuts-backdrop", onClick: () => this.handleClose(), onKeyDown: this.handleKeyDown }, h("div", { class: "shortcuts-content", role: "document", tabindex: "-1", onClick: e => e.stopPropagation() }, h("div", { class: "shortcuts-header" }, h("h2", { id: "shortcuts-dialog-title" }, "Keyboard Shortcuts"), h("button", { class: "close-button", onClick: () => this.handleClose(), "aria-label": "Close shortcuts dialog" }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })))), h("div", { class: "shortcuts-body" }, this.groupedShortcuts.map(([category, shortcuts]) => (h("div", { class: "shortcuts-category" }, h("h3", null, category), h("div", { class: "shortcuts-list" }, shortcuts.map(shortcut => {
85
91
  var _a;
86
92
  return (h("div", { class: "shortcut-item", tabindex: "0" }, h("span", { class: "shortcut-description" }, shortcut.description), h("div", { class: "shortcut-keys" }, (_a = shortcut.modifiers) === null || _a === void 0 ? void 0 :
87
- _a.map((modifier, index) => (h("span", null, h("kbd", { class: "key" }, this.formatKey(modifier)), index < shortcut.modifiers.length - 1 && (h("span", { class: "key-separator" }, "+"))))), shortcut.modifiers && shortcut.modifiers.length > 0 && (h("span", { class: "key-separator" }, "+")), h("kbd", { class: "key" }, this.formatKey(shortcut.key)))));
88
- })))))), h("div", { class: "shortcuts-footer" }, h("p", { class: "shortcuts-hint" }, "Press ", h("kbd", { class: "key-inline" }, this.formatKey('Escape')), " to close")))));
93
+ _a.map((modifier, index) => (h("span", null, h("kbd", { class: "key" }, this.formatKey(modifier)), index < shortcut.modifiers.length - 1 && h("span", { class: "key-separator" }, "+")))), shortcut.modifiers && shortcut.modifiers.length > 0 && h("span", { class: "key-separator" }, "+"), h("kbd", { class: "key" }, this.formatKey(shortcut.key)))));
94
+ })))))), h("div", { class: "shortcuts-footer" }, h("p", { class: "shortcuts-hint" }, "Press ", h("kbd", { class: "key-inline" }, this.formatKey("Escape")), " to close")))));
89
95
  }
90
96
  static get is() { return "keyboard-shortcuts-dialog"; }
91
97
  static get encapsulation() { return "shadow"; }
@@ -147,6 +153,11 @@ export class KeyboardShortcutsDialog {
147
153
  }
148
154
  };
149
155
  }
156
+ static get states() {
157
+ return {
158
+ "groupedShortcuts": {}
159
+ };
160
+ }
150
161
  static get events() {
151
162
  return [{
152
163
  "method": "closeDialog",
@@ -170,6 +181,9 @@ export class KeyboardShortcutsDialog {
170
181
  return [{
171
182
  "propName": "show",
172
183
  "methodName": "handleShowChange"
184
+ }, {
185
+ "propName": "shortcuts",
186
+ "methodName": "handleShortcutsChange"
173
187
  }];
174
188
  }
175
189
  }