ai12z 3.18.1-alpha.7 → 3.18.1-alpha.8

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 (147) hide show
  1. package/dist/cjs/ai12z-beacon.cjs.entry.js +2 -2
  2. package/dist/cjs/ai12z-bot.cjs.entry.js +13 -18
  3. package/dist/cjs/ai12z-category_2.cjs.entry.js +3 -3
  4. package/dist/cjs/ai12z-chat-message.cjs.entry.js +2 -2
  5. package/dist/cjs/ai12z-chat_2.cjs.entry.js +28 -15
  6. package/dist/cjs/ai12z-container.cjs.entry.js +3 -3
  7. package/dist/cjs/ai12z-cta.cjs.entry.js +8 -6
  8. package/dist/cjs/ai12z-form.cjs.entry.js +2 -2
  9. package/dist/cjs/ai12z-inline-search.cjs.entry.js +2 -2
  10. package/dist/cjs/ai12z-knowledge-box.cjs.entry.js +6 -6
  11. package/dist/cjs/ai12z-search-panel.cjs.entry.js +1 -1
  12. package/dist/cjs/{beacon-D57uiQD_.js → beacon-BdrVSTG9.js} +1 -1
  13. package/dist/cjs/chat-avatar_6.cjs.entry.js +1 -1
  14. package/dist/cjs/{ctaHelpers-YuTLEI-L.js → ctaHelpers-C_kr1Vtb.js} +1 -1
  15. package/dist/cjs/dynamic-form.cjs.entry.js +1 -1
  16. package/dist/cjs/{index-3r9eIF0N.js → index-DHMenPFV.js} +1 -1
  17. package/dist/cjs/index.cjs.js +11 -11
  18. package/dist/cjs/item-list.cjs.entry.js +2 -2
  19. package/dist/cjs/{keyboard-shortcuts-CG5wmCzE.js → keyboard-shortcuts-CwvGtpbZ.js} +2 -2
  20. package/dist/cjs/{parseHelper-D5-IDbvW.js → parseHelper-D7RRUwX1.js} +1 -1
  21. package/dist/cjs/{processCarouselData-wo_rseiO.js → processCarouselData-DONfvPLm.js} +1 -1
  22. package/dist/cjs/{reCaptchaHelpers-rbqUu9hP.js → reCaptchaHelpers-DxVdo-_H.js} +1 -1
  23. package/dist/cjs/search-results-page.cjs.entry.js +19 -19
  24. package/dist/cjs/{socket-service-BVVsiQ0_.js → socket-service-CrFIYIKp.js} +5 -5
  25. package/dist/cjs/{styleSheetRegistry-ByKro2xI.js → styleSheetRegistry-D506vs8H.js} +1 -1
  26. package/dist/cjs/{surveyHelpers-D4hpoZ62.js → surveyHelpers-CY3OcY-A.js} +1 -1
  27. package/dist/cjs/{utils-BVLGsz5A.js → utils-TWniAA9b.js} +11 -1
  28. package/dist/collection/components/ai12z-bot/ai12z-bot.js +5 -10
  29. package/dist/collection/components/ai12z-cta/ai12z-cta.js +3 -1
  30. package/dist/collection/components/ai12z-cta/components/Chat.js +20 -7
  31. package/dist/collection/components/ai12z-search-panel/search-results-view.js +14 -14
  32. package/dist/collection/utils/socket-service.js +4 -4
  33. package/dist/collection/utils/utils.js +10 -1
  34. package/dist/components/ai12z-beacon.js +1 -1
  35. package/dist/components/ai12z-bot.js +1 -1
  36. package/dist/components/ai12z-chat-message.js +1 -1
  37. package/dist/components/ai12z-chat.js +1 -1
  38. package/dist/components/ai12z-container.js +1 -1
  39. package/dist/components/ai12z-cta.js +1 -1
  40. package/dist/components/ai12z-form.js +1 -1
  41. package/dist/components/ai12z-inline-search.js +1 -1
  42. package/dist/components/ai12z-input-form.js +1 -1
  43. package/dist/components/ai12z-knowledge-box.js +1 -1
  44. package/dist/components/ai12z-search-panel.js +1 -1
  45. package/dist/components/audio-recorder.js +1 -1
  46. package/dist/components/dynamic-form.js +1 -1
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/interaction-buttons.js +1 -1
  49. package/dist/components/item-list.js +1 -1
  50. package/dist/components/{p-Cwwmlbm1.js → p-0KFM4XDn.js} +1 -1
  51. package/dist/components/{p-7nkZmW6S.js → p-1IMfSwva.js} +1 -1
  52. package/dist/components/{p-FMaZWQWs.js → p-68O0uDGO.js} +1 -1
  53. package/dist/components/p-8LjRgX3A.js +1 -0
  54. package/dist/components/{p-DcOKHO2y.js → p-9uhgFb1b.js} +1 -1
  55. package/dist/components/p-B6rxXYIj.js +1 -0
  56. package/dist/components/{p-CMsJu77K.js → p-BLDJXTf7.js} +1 -1
  57. package/dist/components/{p-CDM40ci1.js → p-CNodaHIB.js} +1 -1
  58. package/dist/components/{p-Den_E0yr.js → p-CTf1uTVT.js} +1 -1
  59. package/dist/components/p-Cg9h5lni.js +1 -0
  60. package/dist/components/{p-DAbUgLyU.js → p-Cx8BoV8Q.js} +1 -1
  61. package/dist/components/p-DH2GWvLq.js +1 -0
  62. package/dist/components/{p-C_vJzk90.js → p-DRSAvpqr.js} +1 -1
  63. package/dist/components/p-DSXZRO18.js +1 -0
  64. package/dist/components/{p-BwO8U5c2.js → p-DZxTMLPD.js} +1 -1
  65. package/dist/components/{p-DCXtJ3V1.js → p-Dkg6KTlo.js} +1 -1
  66. package/dist/components/p-DnYKbtZr.js +1 -0
  67. package/dist/components/{p-uBqtYDJ1.js → p-Dsr8YMDp.js} +6 -6
  68. package/dist/components/{p-CrJCDSt_.js → p-DyCoklj5.js} +1 -1
  69. package/dist/components/{p-6rjAC9SF.js → p-KKrqf3LI.js} +1 -1
  70. package/dist/components/{p-bd94FKmg.js → p-PRm7izPC.js} +1 -1
  71. package/dist/components/{p-dnAnO2G5.js → p-ermnholx.js} +1 -1
  72. package/dist/components/p-q1GDA7hC.js +1 -0
  73. package/dist/components/privacy-modal.js +1 -1
  74. package/dist/components/search-results-page.js +1 -1
  75. package/dist/esm/ai12z-beacon.entry.js +2 -2
  76. package/dist/esm/ai12z-bot.entry.js +13 -18
  77. package/dist/esm/ai12z-category_2.entry.js +3 -3
  78. package/dist/esm/ai12z-chat-message.entry.js +2 -2
  79. package/dist/esm/ai12z-chat_2.entry.js +28 -15
  80. package/dist/esm/ai12z-container.entry.js +3 -3
  81. package/dist/esm/ai12z-cta.entry.js +8 -6
  82. package/dist/esm/ai12z-form.entry.js +2 -2
  83. package/dist/esm/ai12z-inline-search.entry.js +2 -2
  84. package/dist/esm/ai12z-knowledge-box.entry.js +6 -6
  85. package/dist/esm/ai12z-search-panel.entry.js +1 -1
  86. package/dist/esm/{beacon-ChyMsPZk.js → beacon-DzGjIL56.js} +1 -1
  87. package/dist/esm/chat-avatar_6.entry.js +1 -1
  88. package/dist/esm/{ctaHelpers-CsmWmgjC.js → ctaHelpers-DICc703H.js} +1 -1
  89. package/dist/esm/dynamic-form.entry.js +1 -1
  90. package/dist/esm/{index-DjJj6YIT.js → index-Brxx6BAS.js} +1 -1
  91. package/dist/esm/index.js +11 -11
  92. package/dist/esm/item-list.entry.js +2 -2
  93. package/dist/esm/{keyboard-shortcuts-C5h2Sukn.js → keyboard-shortcuts-CxZWWMic.js} +2 -2
  94. package/dist/esm/{parseHelper-xPqFIiju.js → parseHelper-C42_MsSE.js} +1 -1
  95. package/dist/esm/{processCarouselData-Dyu26-nl.js → processCarouselData-Ddnu5K8u.js} +1 -1
  96. package/dist/esm/{reCaptchaHelpers-C6tUN29w.js → reCaptchaHelpers-CWsNWHSR.js} +1 -1
  97. package/dist/esm/search-results-page.entry.js +19 -19
  98. package/dist/esm/{socket-service-BrnzA8Hq.js → socket-service-49bcLZsD.js} +5 -5
  99. package/dist/esm/{styleSheetRegistry-D2TtLUbT.js → styleSheetRegistry-DAy9Q28m.js} +1 -1
  100. package/dist/esm/{surveyHelpers-B_BOPbNu.js → surveyHelpers-B0iGS3y-.js} +1 -1
  101. package/dist/esm/{utils-BsntSu6O.js → utils-5GQcMaHD.js} +11 -2
  102. package/dist/library/index.esm.js +1 -1
  103. package/dist/library/library.esm.js +1 -1
  104. package/dist/library/p-1d6696ba.entry.js +1 -0
  105. package/dist/library/{p-d3f6ff89.entry.js → p-243d0880.entry.js} +1 -1
  106. package/dist/library/{p-2f3d6933.entry.js → p-3f72b713.entry.js} +1 -1
  107. package/dist/library/{p-31a8ec1e.entry.js → p-54097fef.entry.js} +1 -1
  108. package/dist/library/p-61b2fcef.entry.js +1 -0
  109. package/dist/library/{p-4df24b4b.entry.js → p-6d6eb537.entry.js} +1 -1
  110. package/dist/library/p-7a7283f1.entry.js +1 -0
  111. package/dist/library/{p-418e9245.entry.js → p-7b37e166.entry.js} +1 -1
  112. package/dist/library/{p-45d51b77.entry.js → p-95b27676.entry.js} +1 -1
  113. package/dist/library/p-BLuiObas.js +1 -0
  114. package/dist/library/{p-BWDVpWXF.js → p-BUgNn0TW.js} +1 -1
  115. package/dist/library/{p-DaBnlTEb.js → p-BZ1QKNiw.js} +1 -1
  116. package/dist/library/{p-CxVw-Bsu.js → p-DAzK9hmk.js} +1 -1
  117. package/dist/library/{p-BSi7DW4S.js → p-DPRlw1Ux.js} +1 -1
  118. package/dist/library/{p-BnAh8Q4p.js → p-DPUkppIM.js} +1 -1
  119. package/dist/library/{p-lDJNMwVU.js → p-DbYzgw5I.js} +1 -1
  120. package/dist/library/{p-BmHVrZuc.js → p-DjtrkYBW.js} +1 -1
  121. package/dist/library/{p-B3hh9JvQ.js → p-DmIxTmip.js} +1 -1
  122. package/dist/library/{p-CmN5Gi3c.js → p-DoD2RQaA.js} +3 -3
  123. package/dist/library/p-a33dfc57.entry.js +1 -0
  124. package/dist/library/{p-90c19556.entry.js → p-b2ed4ad5.entry.js} +1 -1
  125. package/dist/library/{p-981f46d8.entry.js → p-b42c6b37.entry.js} +1 -1
  126. package/dist/library/p-bbnO8hFN.js +1 -0
  127. package/dist/library/{p-cbbbae2a.entry.js → p-d859ff22.entry.js} +1 -1
  128. package/dist/library/p-db1a4fbe.entry.js +1 -0
  129. package/dist/library/{p-3a5fe448.entry.js → p-dba650e0.entry.js} +1 -1
  130. package/dist/types/components/ai12z-bot/ai12z-bot.d.ts +0 -1
  131. package/dist/types/components/ai12z-cta/components/Chat.d.ts +1 -1
  132. package/dist/types/utils/utils.d.ts +2 -1
  133. package/package.json +2 -2
  134. package/dist/components/p-79S3732-.js +0 -1
  135. package/dist/components/p-8qApXH06.js +0 -1
  136. package/dist/components/p-97NcHeyv.js +0 -1
  137. package/dist/components/p-B4yEREni.js +0 -1
  138. package/dist/components/p-B7hT_aMW.js +0 -1
  139. package/dist/components/p-Bdo8w0x_.js +0 -1
  140. package/dist/components/p-oRscvRiv.js +0 -1
  141. package/dist/library/p-01e165f9.entry.js +0 -1
  142. package/dist/library/p-2f942d6d.entry.js +0 -1
  143. package/dist/library/p-547957fa.entry.js +0 -1
  144. package/dist/library/p-6b3c7bad.entry.js +0 -1
  145. package/dist/library/p-Bi3YItgm.js +0 -1
  146. package/dist/library/p-CV_crg_Q.js +0 -1
  147. package/dist/library/p-c538e529.entry.js +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var beacon = require('./beacon-D57uiQD_.js');
5
- require('./utils-BVLGsz5A.js');
4
+ var beacon = require('./beacon-BdrVSTG9.js');
5
+ require('./utils-TWniAA9b.js');
6
6
 
7
7
  const Ai12zBeacon = class {
8
8
  constructor(hostRef) {
@@ -2,20 +2,20 @@
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
4
  var responseAdapter = require('./response-adapter-BiZsYx3F.js');
5
- var processCarouselData = require('./processCarouselData-wo_rseiO.js');
5
+ var processCarouselData = require('./processCarouselData-DONfvPLm.js');
6
6
  var logger$2 = require('./logger-D--BUQGx.js');
7
- var utils = require('./utils-BVLGsz5A.js');
8
- var index$1 = require('./index-3r9eIF0N.js');
7
+ var utils = require('./utils-TWniAA9b.js');
8
+ var index$1 = require('./index-DHMenPFV.js');
9
9
  var globalStore = require('./global-store-R6x06KvJ.js');
10
- var reCaptchaHelpers = require('./reCaptchaHelpers-rbqUu9hP.js');
10
+ var reCaptchaHelpers = require('./reCaptchaHelpers-DxVdo-_H.js');
11
11
  var botHelpers = require('./botHelpers-B_lFspU6.js');
12
- var surveyHelpers = require('./surveyHelpers-D4hpoZ62.js');
12
+ var surveyHelpers = require('./surveyHelpers-CY3OcY-A.js');
13
13
  var scriptStyleLoader = require('./scriptStyleLoader-D-bqKqSb.js');
14
- var keyboardShortcuts = require('./keyboard-shortcuts-CG5wmCzE.js');
15
- var ctaHelpers = require('./ctaHelpers-YuTLEI-L.js');
14
+ var keyboardShortcuts = require('./keyboard-shortcuts-CwvGtpbZ.js');
15
+ var ctaHelpers = require('./ctaHelpers-C_kr1Vtb.js');
16
16
  var appStore = require('./app-store-BtkiHvcw.js');
17
- var parseHelper = require('./parseHelper-D5-IDbvW.js');
18
- var beacon = require('./beacon-D57uiQD_.js');
17
+ var parseHelper = require('./parseHelper-D7RRUwX1.js');
18
+ var beacon = require('./beacon-BdrVSTG9.js');
19
19
  var bodyScrollLock = require('./bodyScrollLock-C7gKTAfx.js');
20
20
  require('./_commonjsHelpers-MBWFX2dn.js');
21
21
 
@@ -1098,7 +1098,6 @@ const Ai12zBot = class {
1098
1098
  this.hasPersistedConversationId = false;
1099
1099
  this.tokenExpiresAtMs = null;
1100
1100
  this.turnTimedOut = false;
1101
- this.retiringTimedOutSocket = false;
1102
1101
  this.liveAgentButtonText = "Talk to a Live Agent";
1103
1102
  this.isLiveAgentEnabled = false;
1104
1103
  this.isTypingIndicatorVisible = false;
@@ -1970,7 +1969,7 @@ const Ai12zBot = class {
1970
1969
  this.ignoreChunks = true;
1971
1970
  this.failTurn("Something went wrong. Please try again.");
1972
1971
  // Retire the timed-out SID; the next send opens a fresh connection.
1973
- this.retiringTimedOutSocket = true;
1972
+ // failTurn released the lock, so the disconnect handler below is a no-op for this turn.
1974
1973
  this.socket.disconnect();
1975
1974
  }, STREAM_END_TIMEOUT_MS);
1976
1975
  }
@@ -2807,10 +2806,6 @@ const Ai12zBot = class {
2807
2806
  this.socket.off("chunk");
2808
2807
  this.socket.off("end_response");
2809
2808
  this.socket.off("complete");
2810
- if (this.retiringTimedOutSocket) {
2811
- this.retiringTimedOutSocket = false;
2812
- return;
2813
- }
2814
2809
  // Handle disconnection if needed
2815
2810
  if (this.isStreaming)
2816
2811
  this.failTurn("Connection lost. Please try again.");
@@ -2834,7 +2829,7 @@ const Ai12zBot = class {
2834
2829
  if (protocol === "v2") {
2835
2830
  eventName = "query";
2836
2831
  const beaconId = sessionStorage.getItem("ai12zBeaconId");
2837
- data = Object.assign(Object.assign({ query, botType: this.botType, conversation_id: this.conversationId || "", base64_images: ((_a = this.imagesBase64List) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.imagesBase64List : undefined, beacon_id: this.botSettings.disableBeacon ? "" : beaconId !== null && beaconId !== void 0 ? beaconId : "" }, (this.botSettings.disableBeacon || beaconId ? {} : { beacon_data: beacon.buildBeacon() })), { attributes: this.dataAttributes, excludeTags: this.excludeTags, includeTags: this.includeTags, meta: utils.getMetaInfo() });
2832
+ data = Object.assign(Object.assign({ query, botType: this.botType, conversation_id: this.conversationId || "", base64_images: ((_a = this.imagesBase64List) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.imagesBase64List : undefined, beacon_id: this.botSettings.disableBeacon ? "" : beaconId !== null && beaconId !== void 0 ? beaconId : "" }, (this.botSettings.disableBeacon || beaconId ? {} : { beacon_data: beacon.buildBeacon() })), { attributes: this.dataAttributes, excludeTags: utils.normalizeTags(this.excludeTags), includeTags: utils.normalizeTags(this.includeTags), meta: utils.getMetaInfo() });
2838
2833
  }
2839
2834
  else {
2840
2835
  eventName = "evaluate_query";
@@ -2844,8 +2839,8 @@ const Ai12zBot = class {
2844
2839
  conversationId: this.conversationId,
2845
2840
  event: "evaluate_query",
2846
2841
  attributes: this.dataAttributes,
2847
- excludeTags: this.excludeTags,
2848
- includeTags: this.includeTags,
2842
+ excludeTags: utils.normalizeTags(this.excludeTags),
2843
+ includeTags: utils.normalizeTags(this.includeTags),
2849
2844
  base64Images: this.imagesBase64List,
2850
2845
  meta: utils.getMetaInfo(),
2851
2846
  };
@@ -2,11 +2,11 @@
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
4
  var SearchResult = require('./SearchResult-CvTJr55G.js');
5
- var utils = require('./utils-BVLGsz5A.js');
5
+ var utils = require('./utils-TWniAA9b.js');
6
6
  var _commonjsHelpers = require('./_commonjsHelpers-MBWFX2dn.js');
7
7
  var appStore = require('./app-store-BtkiHvcw.js');
8
- var parseHelper = require('./parseHelper-D5-IDbvW.js');
9
- require('./ctaHelpers-YuTLEI-L.js');
8
+ var parseHelper = require('./parseHelper-D7RRUwX1.js');
9
+ require('./ctaHelpers-C_kr1Vtb.js');
10
10
  require('./logger-D--BUQGx.js');
11
11
 
12
12
  const categoryCss = () => `ai12z-category{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-search-font-size, var(--ai12z-font-size)) !important}.custom-title{font-size:var(--ai12z-category-font-size);color:var(--ai12z-category-font-color)}`;
@@ -2,8 +2,8 @@
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
4
  var botHelpers = require('./botHelpers-B_lFspU6.js');
5
- var styleSheetRegistry = require('./styleSheetRegistry-ByKro2xI.js');
6
- require('./utils-BVLGsz5A.js');
5
+ var styleSheetRegistry = require('./styleSheetRegistry-D506vs8H.js');
6
+ require('./utils-TWniAA9b.js');
7
7
 
8
8
  const ai12zChatMessageCss = () => `.show-more-btn{background:none;color:var(--ai12z-knowledge-box-show-more-color, #4a8aff);font-size:16px;cursor:pointer;font-weight:500;border-radius:6px;transition:color 0.2s ease, background 0.2s ease;border:1px solid var(--ai12z-knowledge-box-show-more-border, blue);padding:10px;border-radius:20px;align-items:center;justify-content:center;margin:auto;display:block;z-index:20;position:relative;width:30%}.show-more-btn:hover{color:var(--ai12z-knowledge-box-show-more-hover-color, #1a73e8);background:rgba(74, 138, 255, 0.08)}.show-more-btn:active{background:rgba(74, 138, 255, 0.15)}.show-more-btn svg{vertical-align:middle;gap:5px;transition:transform 0.3s ease-in-out;display:inline-block;margin-left:10px;font-size:20}.message-text{line-height:1.55;font-size:15px;color:var(--ai12z-knowledge-box-text-color, #1e1e1e);transition:max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}.fade-overlay{position:absolute;bottom:0;left:0;right:0;height:100px;z-index:10;pointer-events:none;opacity:1;transition:opacity 0.3s ease-in-out;background:linear-gradient( to bottom, rgba(255, 255, 255, 0) 0%, var(--ai12z-knowledge-box-bg-color, #ffffff) 85% )}.chat-message{position:relative;}.custom-line-clamp{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);line-clamp:var(--line-clamp)}.ai12z-form-honeypot{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.ai12zBtn{background-color:var(--ai12z-knowledge-box-primary-color);color:white;padding:5px 10px;border:none;border-radius:5px;cursor:pointer;text-decoration:none;margin:5px}`;
9
9
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var processCarouselData = require('./processCarouselData-wo_rseiO.js');
5
- var parseHelper = require('./parseHelper-D5-IDbvW.js');
6
- var utils = require('./utils-BVLGsz5A.js');
7
- var ctaHelpers = require('./ctaHelpers-YuTLEI-L.js');
8
- var index$1 = require('./index-3r9eIF0N.js');
9
- var socketService = require('./socket-service-BVVsiQ0_.js');
10
- var surveyHelpers = require('./surveyHelpers-D4hpoZ62.js');
11
- var keyboardShortcuts = require('./keyboard-shortcuts-CG5wmCzE.js');
4
+ var processCarouselData = require('./processCarouselData-DONfvPLm.js');
5
+ var parseHelper = require('./parseHelper-D7RRUwX1.js');
6
+ var utils = require('./utils-TWniAA9b.js');
7
+ var ctaHelpers = require('./ctaHelpers-C_kr1Vtb.js');
8
+ var index$1 = require('./index-DHMenPFV.js');
9
+ var socketService = require('./socket-service-CrFIYIKp.js');
10
+ var surveyHelpers = require('./surveyHelpers-CY3OcY-A.js');
11
+ var keyboardShortcuts = require('./keyboard-shortcuts-CwvGtpbZ.js');
12
12
  var analyticsService = require('./analyticsService-CkAva47S.js');
13
13
  var botHelpers = require('./botHelpers-B_lFspU6.js');
14
- var beacon = require('./beacon-D57uiQD_.js');
14
+ var beacon = require('./beacon-BdrVSTG9.js');
15
15
  require('./_commonjsHelpers-MBWFX2dn.js');
16
16
  require('./logger-D--BUQGx.js');
17
17
  require('./response-adapter-BiZsYx3F.js');
@@ -340,6 +340,10 @@ const MyChat = class {
340
340
  return (_d = (_b = (_a = this.settings) === null || _a === void 0 ? void 0 : _a.pId) !== null && _b !== void 0 ? _b : (_c = this.dataAttributes) === null || _c === void 0 ? void 0 : _c.projectId) !== null && _d !== void 0 ? _d : null;
341
341
  }
342
342
  streamResponseHandler(event) {
343
+ var _a, _b;
344
+ if (!((_a = event.detail) === null || _a === void 0 ? void 0 : _a.socketId) || event.detail.socketId !== ((_b = this.socketIn) === null || _b === void 0 ? void 0 : _b.getSocketId())) {
345
+ return;
346
+ }
343
347
  const { id, idChanged } = parseHelper.ensureMessageId(this.aiMessageId, this.chats, "ai-message");
344
348
  this.aiMessageId = id;
345
349
  if (idChanged)
@@ -384,6 +388,10 @@ const MyChat = class {
384
388
  }
385
389
  }
386
390
  endResponseHandler(event) {
391
+ var _a, _b;
392
+ if (!((_a = event.detail) === null || _a === void 0 ? void 0 : _a.socketId) || event.detail.socketId !== ((_b = this.socketIn) === null || _b === void 0 ? void 0 : _b.getSocketId())) {
393
+ return;
394
+ }
387
395
  const { id, idChanged, orphaned } = parseHelper.ensureMessageId(this.aiMessageId, this.chats, "ai-message");
388
396
  this.aiMessageId = id;
389
397
  if (idChanged)
@@ -931,7 +939,7 @@ const MyChat = class {
931
939
  if (protocol === "v2") {
932
940
  eventName = "query";
933
941
  const beaconId = sessionStorage.getItem("ai12zBeaconId");
934
- data = Object.assign(Object.assign({ query: this.query, conversation_id: this.conversationId || "", base64_images: ((_c = this.imgFiles) === null || _c === void 0 ? void 0 : _c.length) > 0 ? this.imgFiles : undefined, beacon_id: this.settings.disableBeacon ? "" : beaconId !== null && beaconId !== void 0 ? beaconId : "" }, (this.settings.disableBeacon || beaconId ? {} : { beacon_data: beacon.buildBeacon() })), { attributes: this.dataAttributes, excludeTags: this.chatExcludeTags, includeTags: this.chatIncludeTags, meta: utils.getMetaInfo() });
942
+ data = Object.assign(Object.assign({ query: this.query, conversation_id: this.conversationId || "", base64_images: ((_c = this.imgFiles) === null || _c === void 0 ? void 0 : _c.length) > 0 ? this.imgFiles : undefined, beacon_id: this.settings.disableBeacon ? "" : beaconId !== null && beaconId !== void 0 ? beaconId : "" }, (this.settings.disableBeacon || beaconId ? {} : { beacon_data: beacon.buildBeacon() })), { attributes: this.dataAttributes, excludeTags: utils.normalizeTags(this.chatExcludeTags), includeTags: utils.normalizeTags(this.chatIncludeTags), meta: utils.getMetaInfo() });
935
943
  }
936
944
  else {
937
945
  eventName = "evaluate_query";
@@ -942,8 +950,8 @@ const MyChat = class {
942
950
  base64Images: ((_f = this.imgFiles) === null || _f === void 0 ? void 0 : _f.length) > 0 ? this.imgFiles : [],
943
951
  event: "evaluate_query",
944
952
  attributes: this.dataAttributes,
945
- excludeTags: this.chatExcludeTags,
946
- includeTags: this.chatIncludeTags,
953
+ excludeTags: utils.normalizeTags(this.chatExcludeTags),
954
+ includeTags: utils.normalizeTags(this.chatIncludeTags),
947
955
  meta: utils.getMetaInfo(),
948
956
  };
949
957
  }
@@ -1025,7 +1033,8 @@ const MyChat = class {
1025
1033
  }
1026
1034
  }
1027
1035
  stopStreamInputHandler(_state) {
1028
- if (this.socketIn) {
1036
+ var _a;
1037
+ if (this.socketIn && ((_a = _state.detail) === null || _a === void 0 ? void 0 : _a.socketId) === this.socketIn.getSocketId()) {
1029
1038
  // console.log("*****stop stream***", this.socketIn)
1030
1039
  // this.socketIn.disconnect()
1031
1040
  socketService.SocketService.disconnectSocketById(_state.detail.socketId);
@@ -1033,6 +1042,10 @@ const MyChat = class {
1033
1042
  }
1034
1043
  startStreamInputHandler(_state) {
1035
1044
  var _a, _b, _c;
1045
+ const root = this.element.getRootNode();
1046
+ if (!(root instanceof ShadowRoot) || (_state.target !== root.host && !_state.composedPath().includes(root.host))) {
1047
+ return;
1048
+ }
1036
1049
  // console.log("*****start stream***", _state.detail?.search)
1037
1050
  if ((_a = _state.detail) === null || _a === void 0 ? void 0 : _a.maxQuestion) {
1038
1051
  setTimeout(() => {
@@ -1141,7 +1154,7 @@ const MyChat = class {
1141
1154
  render() {
1142
1155
  var _a;
1143
1156
  const email = "";
1144
- return (index.h("div", { key: '8c7eb47de3df215b16be245508523f2bdfe2ec62' }, index.h("ul", { key: '3964600732eabc85fcd19843e788a428a33ced04', id: "main-content", tabindex: "-1", class: {
1157
+ return (index.h("div", { key: '9209355b6524a107e61245426352952cf79ab478' }, index.h("ul", { key: 'c5ff9e9f2ecab53b8adc3001dc66d6974c7013db', id: "main-content", tabindex: "-1", class: {
1145
1158
  "chat-list": true,
1146
1159
  "custom-list": this.componentType === "search",
1147
1160
  // "custom-chat-top-height": this.componentType === "search",
@@ -1217,7 +1230,7 @@ const MyChat = class {
1217
1230
  projectId: this.getProjectId(),
1218
1231
  questionText: analyticsService.getQuestionText(this.chats, chat.insightId) || "",
1219
1232
  }), 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" }), " "))))))));
1220
- }), index.h("div", { key: '5ee47a4243891b0de0dad6e0e3d545732035f279', class: "scroll-bottom" }))));
1233
+ }), index.h("div", { key: '9a4cbf368241d84e5739883dbf35ed3a63455776', class: "scroll-bottom" }))));
1221
1234
  }
1222
1235
  get element() { return index.getElement(this); }
1223
1236
  static get watchers() { return {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
5
- var processCarouselData = require('./processCarouselData-wo_rseiO.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
+ var processCarouselData = require('./processCarouselData-DONfvPLm.js');
6
6
  var botHelpers = require('./botHelpers-B_lFspU6.js');
7
- var index$1 = require('./index-3r9eIF0N.js');
7
+ var index$1 = require('./index-DHMenPFV.js');
8
8
  var purify_es = require('./purify.es-B7Ashs9w.js');
9
9
  require('./_commonjsHelpers-MBWFX2dn.js');
10
10
 
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
5
  var SearchResult = require('./SearchResult-CvTJr55G.js');
6
- var socketService = require('./socket-service-BVVsiQ0_.js');
6
+ var socketService = require('./socket-service-CrFIYIKp.js');
7
7
  var globalStore = require('./global-store-R6x06KvJ.js');
8
- var reCaptchaHelpers = require('./reCaptchaHelpers-rbqUu9hP.js');
9
- var ctaHelpers = require('./ctaHelpers-YuTLEI-L.js');
10
- var beacon = require('./beacon-D57uiQD_.js');
8
+ var reCaptchaHelpers = require('./reCaptchaHelpers-DxVdo-_H.js');
9
+ var ctaHelpers = require('./ctaHelpers-C_kr1Vtb.js');
10
+ var beacon = require('./beacon-BdrVSTG9.js');
11
11
  var appStore = require('./app-store-BtkiHvcw.js');
12
12
  var bodyScrollLock = require('./bodyScrollLock-C7gKTAfx.js');
13
13
  var purify_es = require('./purify.es-B7Ashs9w.js');
@@ -192,7 +192,7 @@ const Ai12zCta = class {
192
192
  }
193
193
  else {
194
194
  if ((_e = this.ctaSettings) === null || _e === void 0 ? void 0 : _e.autoSearch) {
195
- response = await utils.search(this.dataKey, this.dataMode, this.formData.search);
195
+ response = await utils.search(this.dataKey, this.dataMode, this.formData.search, this.excludeTags, this.includeTags);
196
196
  this.displaySearchResults(response);
197
197
  }
198
198
  }
@@ -225,6 +225,8 @@ const Ai12zCta = class {
225
225
  var _a;
226
226
  this.showModal = true;
227
227
  this.dirty = false;
228
+ globalStore.setCtaElement(this.el);
229
+ index.ai12zManager.register("cta", this);
228
230
  index.ai12zManager.setActive("cta");
229
231
  // this.invokeSocket()
230
232
  if ((_a = this.ctaSettings) === null || _a === void 0 ? void 0 : _a.clearMemory) {
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
5
- var surveyHelpers = require('./surveyHelpers-D4hpoZ62.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
+ var surveyHelpers = require('./surveyHelpers-CY3OcY-A.js');
6
6
  var scriptStyleLoader = require('./scriptStyleLoader-D-bqKqSb.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)}}`;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
5
  var SearchResult = require('./SearchResult-CvTJr55G.js');
6
- var socketService = require('./socket-service-BVVsiQ0_.js');
6
+ var socketService = require('./socket-service-CrFIYIKp.js');
7
7
  require('./response-adapter-BiZsYx3F.js');
8
8
 
9
9
  const ai12zInlineSearchCss = () => `:host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important;color:var(--ai12z-font-color, black);text-align:var(--ai12z-text-align, left)}`;
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
5
- var styleSheetRegistry = require('./styleSheetRegistry-ByKro2xI.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
+ var styleSheetRegistry = require('./styleSheetRegistry-D506vs8H.js');
6
6
  var responseAdapter = require('./response-adapter-BiZsYx3F.js');
7
- var processCarouselData = require('./processCarouselData-wo_rseiO.js');
7
+ var processCarouselData = require('./processCarouselData-DONfvPLm.js');
8
8
  var globalStore = require('./global-store-R6x06KvJ.js');
9
- var index$1 = require('./index-3r9eIF0N.js');
10
- var surveyHelpers = require('./surveyHelpers-D4hpoZ62.js');
9
+ var index$1 = require('./index-DHMenPFV.js');
10
+ var surveyHelpers = require('./surveyHelpers-CY3OcY-A.js');
11
11
  var botHelpers = require('./botHelpers-B_lFspU6.js');
12
12
  var analyticsService = require('./analyticsService-CkAva47S.js');
13
- var beacon = require('./beacon-D57uiQD_.js');
13
+ var beacon = require('./beacon-BdrVSTG9.js');
14
14
  require('./_commonjsHelpers-MBWFX2dn.js');
15
15
 
16
16
  const ai12zKnowledgeBoxCss = () => `:host{font-family:var(--ai12z-knowledge-box-font-family) !important;font-size:var(--ai12z-knowledge-box-font-size) !important;color:var(--ai12z-knowledge-box-font-color, black);text-align:var(--ai12z-knowledge-box-text-align, left)}.ai12z-kb-wrapper{background-color:var(--ai12z-knowledge-box-bg-color)}.ai12z-suggest-container{padding:32px 32px 32px 32px;flex:none}.ai12z-suggest-answer{font-size:var(--ai12z-knowledge-box-font-size)}.ai12z-suggest-title{font-weight:700}.ai12z-suggest-align{float:left}.ai12z-suggest-relevance{text-align:end}.ai12z-suggest-error-msg{color:rgb(239 68 68)}.ai12z-suggest-hide{display:none}.ai12z-suggest-thumbs{margin-left:90%}.ai12z-suggest-thumbs-up{fill:var(--ai12z-feedback-selected);width:24px}.ai12z-suggest-thumbs-down{fill:var(--ai12z-feedback-selected);width:24px}.not-allowed{cursor:not-allowed}.ai12zBtn{background-color:var(--ai12z-knowledge-box-button-bgcolor);color:var(--ai12z-knowledge-box-button-color) !important;padding:5px 10px;border:none;border-radius:5px;cursor:pointer;text-decoration:none !important;margin:5px}.custom-privacy{color:var(--ai12z-knowledge-box-privacy-color);text-align:center;font-size:var(--ai12z-knowledge-box-privacy-font-size);margin-top:10px}button:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color, #0A2A43);outline-offset:2px}button.kb-btn-primary:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color-primary, --ai12z-knowledge-box-focus-visible-color);outline-offset:2px}button.kb-btn-secondary:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color-secondary, --ai12z-knowledge-box-focus-visible-color)}.diamond-icon{color:var(--ai12z-knowledge-box-icon-color, #a5e6e6);width:28px;height:28px;transform-origin:center;}.diamond-icon.loading{animation:rotate 2s linear infinite}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
5
  var SearchResult = require('./SearchResult-CvTJr55G.js');
6
6
 
7
7
  const ai12zSearchPanelCss = () => `:host{display:block;width:100%;font-family:var(--ai12z-font-family);font-size:var(--ai12z-font-size)}.input-focus-color{border:1px solid var(--ai12z-search-panel-focus-color)}.search-btn-bg-color{background-color:var(--ai12z-search-panel-button-bgcolor)}.input-border{border-bottom:1px solid var(--ai12z-search-panel-input-border-color)}.search-container{background-color:var(--ai12z-search-panel-bg)}.search-icon svg{width:20px;height:20px;color:var(--ai12z-search-panel-icon-color);}.search-input::-moz-placeholder{color:#999}.search-input::placeholder{color:#999}.search-results{width:100%;text-align:left}.cta-search-results{border-top-width:1px;border-bottom-width:0px;border-color:rgb(243 244 246)}.cta-search-results-list{position:relative;padding-bottom:20px;padding-top:20px}.cta-search-results-list:hover{background-color:var(--ai12z-hover-bg-color)}.cta-search-container{margin-left:auto;margin-right:auto;display:flex;max-width:896px;justify-content:space-between;-moz-column-gap:24px;column-gap:24px}.cta-search-container-two{display:flex;min-width:0px;-moz-column-gap:16px;column-gap:16px}.cta-search-container-three{min-width:0px;flex:1 1 auto}.cta-search-text{font-weight:600;line-height:24px;font-size:var(--ai12z-search-result-title-font-size);color:var(--ai12z-search-result-title-color)}.cta-search-text-position{position:absolute;left:0px;right:0px;top:-1px;bottom:0px}.cta-search-description{margin-top:4px;display:flex;font-size:var(--ai12z-search-result-description-font-size);line-height:16px;line-height:20px;color:var(--ai12z-search-result-description-color)}.cta-search-list-arrow{display:flex;align-items:center;flex-shrink:0;-moz-column-gap:16px;column-gap:16px}.custom-icon-width{width:64px}.results-icon svg{width:24px;height:24px}`;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var utils = require('./utils-BVLGsz5A.js');
3
+ var utils = require('./utils-TWniAA9b.js');
4
4
 
5
5
  // Google supported search domains.
6
6
  // Source: https://www.google.com/supported_domains
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-v8T1EJAJ.js');
4
- var utils = require('./utils-BVLGsz5A.js');
4
+ var utils = require('./utils-TWniAA9b.js');
5
5
  var analyticsService = require('./analyticsService-CkAva47S.js');
6
6
  var logger$1 = require('./logger-D--BUQGx.js');
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var utils = require('./utils-BVLGsz5A.js');
3
+ var utils = require('./utils-TWniAA9b.js');
4
4
 
5
5
  // Utility: Generate UUID
6
6
  function generateUUID() {