@ada-support/embed2 1.0.57 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/npm-entry/common/constants/events.d.ts +1 -0
- package/dist/npm-entry/common/constants/storage-keys.d.ts +2 -0
- package/dist/npm-entry/common/types/store-state.d.ts +2 -0
- package/dist/npm-entry/frames/lib/safe-storage/index.d.ts +3 -1
- package/dist/npm-entry/index.js +99 -61
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ export declare const BROWSER_HAS_NOTIFICATIONS_RESPONSE_EVENT = "BROWSER_HAS_NOT
|
|
|
21
21
|
export declare const REQUEST_NOTIFICATIONS_EVENT = "REQUEST_NOTIFICATIONS";
|
|
22
22
|
export declare const END_CONVERSATION_EVENT = "END_CONVERSATION";
|
|
23
23
|
export declare const PUBLISH_EVENT = "PUBLISH_EVENT";
|
|
24
|
+
export declare const ZD_MESSAGING_HANDOFF = "ZD_MESSAGING_HANDOFF";
|
|
24
25
|
/**
|
|
25
26
|
* Store Events
|
|
26
27
|
*/
|
|
@@ -4,5 +4,7 @@ export declare const IN_LIVE_CHAT_STORAGE_KEY = "inLiveChat";
|
|
|
4
4
|
export declare const ZD_SESSION_STORAGE_KEY = "ada-embed_zd-session-id";
|
|
5
5
|
export declare const ZD_PREVIOUS_TAGS_STORAGE_KEY = "ada-embed_zd-previous-tags";
|
|
6
6
|
export declare const IS_DRAWER_OPEN_STORAGE_KEY = "ada-embed_is-drawer-open";
|
|
7
|
+
export declare const ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY = "ada-embed_zd-messaging-external-user-id";
|
|
8
|
+
export declare const ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY = "ada-embed_zd-messaging-chatter-created";
|
|
7
9
|
/** @deprecated - Use CHATTER_TOKEN_STORAGE_KEY */
|
|
8
10
|
export declare const CHATTER_STORAGE_KEY = "chatter";
|
|
@@ -44,6 +44,8 @@ export interface StoreState extends StartOptionsNoFunction {
|
|
|
44
44
|
isDrawerOpen: boolean;
|
|
45
45
|
zdSessionId?: string | null;
|
|
46
46
|
zdPreviousTags?: string | null;
|
|
47
|
+
zdMessagingExternalUserId?: string | null;
|
|
48
|
+
zdMessagingChatterCreated?: string | null;
|
|
47
49
|
drawerHasBeenOpened: boolean;
|
|
48
50
|
isIntroShown: boolean;
|
|
49
51
|
isButtonShown: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CHATTER_CREATED_STORAGE_KEY, CHATTER_TOKEN_STORAGE_KEY, IN_LIVE_CHAT_STORAGE_KEY, ZD_PREVIOUS_TAGS_STORAGE_KEY, ZD_SESSION_STORAGE_KEY } from "common/constants/storage-keys";
|
|
1
|
+
import { CHATTER_CREATED_STORAGE_KEY, CHATTER_TOKEN_STORAGE_KEY, IN_LIVE_CHAT_STORAGE_KEY, ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY, ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY, ZD_PREVIOUS_TAGS_STORAGE_KEY, ZD_SESSION_STORAGE_KEY } from "common/constants/storage-keys";
|
|
2
2
|
export declare enum StorageTypes {
|
|
3
3
|
Local = "local",
|
|
4
4
|
Session = "session"
|
|
@@ -11,6 +11,8 @@ export interface StorageValueByKey {
|
|
|
11
11
|
[IN_LIVE_CHAT_STORAGE_KEY]: boolean;
|
|
12
12
|
[ZD_SESSION_STORAGE_KEY]: string;
|
|
13
13
|
[ZD_PREVIOUS_TAGS_STORAGE_KEY]: string;
|
|
14
|
+
[ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY]: string;
|
|
15
|
+
[ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY]: string;
|
|
14
16
|
"liveChatPending": boolean;
|
|
15
17
|
"ada-embed_is-drawer-open": boolean;
|
|
16
18
|
"[handle]_marketing_campaigns_shown": string;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8788
8788
|
return event;
|
|
8789
8789
|
},
|
|
8790
8790
|
environment: "production",
|
|
8791
|
-
release: "1.0.
|
|
8791
|
+
release: "1.0.58-8858d05",
|
|
8792
8792
|
sampleRate: 0.25,
|
|
8793
8793
|
autoSessionTracking: false,
|
|
8794
8794
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -8867,6 +8867,7 @@ var BROWSER_HAS_NOTIFICATIONS_RESPONSE_EVENT = "BROWSER_HAS_NOTIFICATIONS_RESPON
|
|
|
8867
8867
|
var REQUEST_NOTIFICATIONS_EVENT = "REQUEST_NOTIFICATIONS";
|
|
8868
8868
|
var END_CONVERSATION_EVENT = "END_CONVERSATION";
|
|
8869
8869
|
var PUBLISH_EVENT = "PUBLISH_EVENT";
|
|
8870
|
+
var ZD_MESSAGING_HANDOFF = "ZD_MESSAGING_HANDOFF";
|
|
8870
8871
|
/**
|
|
8871
8872
|
* Store Events
|
|
8872
8873
|
*/
|
|
@@ -9487,7 +9488,7 @@ function getEmbedURL(_ref) {
|
|
|
9487
9488
|
polyfillVersionString = "legacy";
|
|
9488
9489
|
}
|
|
9489
9490
|
|
|
9490
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9491
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "8858d05", "/index.html");
|
|
9491
9492
|
}
|
|
9492
9493
|
/**
|
|
9493
9494
|
* Generate the Chat / API URL
|
|
@@ -9649,6 +9650,8 @@ var IN_LIVE_CHAT_STORAGE_KEY = "inLiveChat";
|
|
|
9649
9650
|
var ZD_SESSION_STORAGE_KEY = "ada-embed_zd-session-id";
|
|
9650
9651
|
var ZD_PREVIOUS_TAGS_STORAGE_KEY = "ada-embed_zd-previous-tags";
|
|
9651
9652
|
var IS_DRAWER_OPEN_STORAGE_KEY = "ada-embed_is-drawer-open";
|
|
9653
|
+
var ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY = "ada-embed_zd-messaging-external-user-id";
|
|
9654
|
+
var ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY = "ada-embed_zd-messaging-chatter-created";
|
|
9652
9655
|
/** @deprecated - Use CHATTER_TOKEN_STORAGE_KEY */
|
|
9653
9656
|
|
|
9654
9657
|
var CHATTER_STORAGE_KEY = CHATTER_TOKEN_STORAGE_KEY;
|
|
@@ -9950,6 +9953,8 @@ var state = {
|
|
|
9950
9953
|
chatterCreated: getValueFromStorage(CHATTER_CREATED_STORAGE_KEY) || undefined,
|
|
9951
9954
|
zdSessionId: getValueFromStorage(ZD_SESSION_STORAGE_KEY) || undefined,
|
|
9952
9955
|
zdPreviousTags: getValueFromStorage(ZD_PREVIOUS_TAGS_STORAGE_KEY) || undefined,
|
|
9956
|
+
zdMessagingExternalUserId: getValueFromStorage(ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY) || null,
|
|
9957
|
+
zdMessagingChatterCreated: getValueFromStorage(ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY) || null,
|
|
9953
9958
|
connections: {},
|
|
9954
9959
|
appConnectionState: ConnectionState.Uninitiated,
|
|
9955
9960
|
testMode: false,
|
|
@@ -11972,7 +11977,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11972
11977
|
var _handleChatEvent = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee(type, payload, id) {
|
|
11973
11978
|
var _this4 = this;
|
|
11974
11979
|
|
|
11975
|
-
var _this$props9, adaSettings, setState, setConnectionState, _ref, eventKey, data, _ref2, analytics, analyticsCallback, client, _ref3, chatter, created, chatterTokenCallback, _client, _ref4, zdSessionId, zdPreviousTags, storage, _client2, _ref5, inLiveChat, eventCallbacks, customJavascriptEvent, specificCallback, genericCallback, resetChat, zdChatterAuthCallback, conversationEndCallback;
|
|
11980
|
+
var _this$props9, adaSettings, setState, setConnectionState, _ref, eventKey, data, _ref2, analytics, analyticsCallback, client, _ref3, chatter, created, chatterTokenCallback, _client, _ref4, zdSessionId, zdPreviousTags, storage, _client2, _ref5, zdMessagingExternalUserId, zdMessagingChatterCreated, _client3, _ref6, inLiveChat, eventCallbacks, customJavascriptEvent, specificCallback, genericCallback, resetChat, zdChatterAuthCallback, conversationEndCallback;
|
|
11976
11981
|
|
|
11977
11982
|
return regenerator_default().wrap(function _callee$(_context22) {
|
|
11978
11983
|
while (1) {
|
|
@@ -11980,7 +11985,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11980
11985
|
case 0:
|
|
11981
11986
|
_this$props9 = this.props, adaSettings = _this$props9.adaSettings, setState = _this$props9.setState, setConnectionState = _this$props9.setConnectionState;
|
|
11982
11987
|
_context22.t0 = type;
|
|
11983
|
-
_context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 8 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 13 : _context22.t0 === PUBLISH_EVENT ? 15 : _context22.t0 === ANALYTICS_EVENT ? 18 : _context22.t0 === CHATTER_EVENT ? 22 : _context22.t0 === "ZD_SESSION" ? 32 : _context22.t0 ===
|
|
11988
|
+
_context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 8 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 13 : _context22.t0 === PUBLISH_EVENT ? 15 : _context22.t0 === ANALYTICS_EVENT ? 18 : _context22.t0 === CHATTER_EVENT ? 22 : _context22.t0 === "ZD_SESSION" ? 32 : _context22.t0 === ZD_MESSAGING_HANDOFF ? 41 : _context22.t0 === CHATTER_LIVECHAT_EVENT ? 50 : _context22.t0 === CUSTOM_JAVASCRIPT_EVENT ? 58 : _context22.t0 === RESET_FROM_CHAT_EVENT ? 67 : _context22.t0 === ZD_JWT_AUTH_EVENT ? 70 : _context22.t0 === CREATE_NOTIFICATION_EVENT ? 88 : _context22.t0 === BROWSER_HAS_NOTIFICATIONS_EVENT ? 90 : _context22.t0 === REQUEST_NOTIFICATIONS_EVENT ? 94 : _context22.t0 === END_CONVERSATION_EVENT ? 96 : 99;
|
|
11984
11989
|
break;
|
|
11985
11990
|
|
|
11986
11991
|
case 4:
|
|
@@ -11993,7 +11998,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11993
11998
|
|
|
11994
11999
|
case 6:
|
|
11995
12000
|
this.channel.postMessage("SET_WINDOW_ORIGIN", window.location, id);
|
|
11996
|
-
return _context22.abrupt("break",
|
|
12001
|
+
return _context22.abrupt("break", 100);
|
|
11997
12002
|
|
|
11998
12003
|
case 8:
|
|
11999
12004
|
if (this.channel) {
|
|
@@ -12008,18 +12013,18 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12008
12013
|
setConnectionState({
|
|
12009
12014
|
"chat": ConnectionState.Done
|
|
12010
12015
|
});
|
|
12011
|
-
return _context22.abrupt("break",
|
|
12016
|
+
return _context22.abrupt("break", 100);
|
|
12012
12017
|
|
|
12013
12018
|
case 13:
|
|
12014
12019
|
setState({
|
|
12015
12020
|
isChatWebsocketConnected: true
|
|
12016
12021
|
});
|
|
12017
|
-
return _context22.abrupt("break",
|
|
12022
|
+
return _context22.abrupt("break", 100);
|
|
12018
12023
|
|
|
12019
12024
|
case 15:
|
|
12020
12025
|
_ref = payload, eventKey = _ref.eventKey, data = _ref.data;
|
|
12021
12026
|
publishEvent(eventKey, data);
|
|
12022
|
-
return _context22.abrupt("break",
|
|
12027
|
+
return _context22.abrupt("break", 100);
|
|
12023
12028
|
|
|
12024
12029
|
case 18:
|
|
12025
12030
|
_ref2 = payload, analytics = _ref2.analytics;
|
|
@@ -12029,7 +12034,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12029
12034
|
analyticsCallback(analytics);
|
|
12030
12035
|
}
|
|
12031
12036
|
|
|
12032
|
-
return _context22.abrupt("break",
|
|
12037
|
+
return _context22.abrupt("break", 100);
|
|
12033
12038
|
|
|
12034
12039
|
case 22:
|
|
12035
12040
|
client = this.props.client;
|
|
@@ -12067,7 +12072,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12067
12072
|
chatterTokenCallback(chatter);
|
|
12068
12073
|
}
|
|
12069
12074
|
|
|
12070
|
-
return _context22.abrupt("break",
|
|
12075
|
+
return _context22.abrupt("break", 100);
|
|
12071
12076
|
|
|
12072
12077
|
case 32:
|
|
12073
12078
|
_client = this.props.client;
|
|
@@ -12113,48 +12118,81 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12113
12118
|
}
|
|
12114
12119
|
}
|
|
12115
12120
|
|
|
12116
|
-
return _context22.abrupt("break",
|
|
12121
|
+
return _context22.abrupt("break", 100);
|
|
12117
12122
|
|
|
12118
12123
|
case 41:
|
|
12119
12124
|
_client2 = this.props.client;
|
|
12120
|
-
_ref5 = payload,
|
|
12121
|
-
|
|
12125
|
+
_ref5 = payload, zdMessagingExternalUserId = _ref5.zdMessagingExternalUserId, zdMessagingChatterCreated = _ref5.zdMessagingChatterCreated;
|
|
12126
|
+
|
|
12127
|
+
if (_client2) {
|
|
12128
|
+
_context22.next = 45;
|
|
12129
|
+
break;
|
|
12130
|
+
}
|
|
12131
|
+
|
|
12132
|
+
throw new errors/* AdaEmbedError */.S("`client` is undefined");
|
|
12133
|
+
|
|
12134
|
+
case 45:
|
|
12135
|
+
_context22.next = 47;
|
|
12136
|
+
return setState({
|
|
12137
|
+
zdMessagingExternalUserId: zdMessagingExternalUserId,
|
|
12138
|
+
zdMessagingChatterCreated: zdMessagingChatterCreated
|
|
12139
|
+
});
|
|
12140
|
+
|
|
12141
|
+
case 47:
|
|
12142
|
+
if (zdMessagingExternalUserId === null) {
|
|
12143
|
+
safeLocalStorage.removeItem(ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY);
|
|
12144
|
+
} else {
|
|
12145
|
+
safeLocalStorage.setItem(ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY, zdMessagingExternalUserId);
|
|
12146
|
+
}
|
|
12147
|
+
|
|
12148
|
+
if (zdMessagingChatterCreated === null) {
|
|
12149
|
+
safeLocalStorage.removeItem(ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY);
|
|
12150
|
+
} else {
|
|
12151
|
+
safeLocalStorage.setItem(ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY, zdMessagingChatterCreated);
|
|
12152
|
+
}
|
|
12153
|
+
|
|
12154
|
+
return _context22.abrupt("break", 100);
|
|
12155
|
+
|
|
12156
|
+
case 50:
|
|
12157
|
+
_client3 = this.props.client;
|
|
12158
|
+
_ref6 = payload, inLiveChat = _ref6.inLiveChat;
|
|
12159
|
+
_context22.next = 54;
|
|
12122
12160
|
return setState({
|
|
12123
12161
|
chatterInLiveChat: inLiveChat
|
|
12124
12162
|
});
|
|
12125
12163
|
|
|
12126
|
-
case
|
|
12127
|
-
if (
|
|
12128
|
-
_context22.next =
|
|
12164
|
+
case 54:
|
|
12165
|
+
if (_client3) {
|
|
12166
|
+
_context22.next = 56;
|
|
12129
12167
|
break;
|
|
12130
12168
|
}
|
|
12131
12169
|
|
|
12132
12170
|
throw new errors/* AdaEmbedError */.S("`client` is not defined");
|
|
12133
12171
|
|
|
12134
|
-
case
|
|
12172
|
+
case 56:
|
|
12135
12173
|
/**
|
|
12136
12174
|
* Store the token so when embed loads in the future, it doesn't have to wait for it to
|
|
12137
12175
|
* come from chat. This is important for campaign and business event triggers.
|
|
12138
12176
|
*/
|
|
12139
|
-
if (
|
|
12177
|
+
if (_client3.persistence === PERSISTENCE_NORMAL) {
|
|
12140
12178
|
safeLocalStorage.setItem(IN_LIVE_CHAT_STORAGE_KEY, inLiveChat);
|
|
12141
|
-
} else if (
|
|
12179
|
+
} else if (_client3.persistence === PERSISTENCE_SESSION) {
|
|
12142
12180
|
safeSessionStorage.setItem(IN_LIVE_CHAT_STORAGE_KEY, inLiveChat);
|
|
12143
12181
|
}
|
|
12144
12182
|
|
|
12145
|
-
return _context22.abrupt("break",
|
|
12183
|
+
return _context22.abrupt("break", 100);
|
|
12146
12184
|
|
|
12147
|
-
case
|
|
12185
|
+
case 58:
|
|
12148
12186
|
eventCallbacks = adaSettings.eventCallbacks;
|
|
12149
12187
|
|
|
12150
12188
|
if (eventCallbacks) {
|
|
12151
|
-
_context22.next =
|
|
12189
|
+
_context22.next = 61;
|
|
12152
12190
|
break;
|
|
12153
12191
|
}
|
|
12154
12192
|
|
|
12155
|
-
return _context22.abrupt("break",
|
|
12193
|
+
return _context22.abrupt("break", 100);
|
|
12156
12194
|
|
|
12157
|
-
case
|
|
12195
|
+
case 61:
|
|
12158
12196
|
customJavascriptEvent = payload.event_data;
|
|
12159
12197
|
specificCallback = eventCallbacks[customJavascriptEvent.event_name];
|
|
12160
12198
|
genericCallback = eventCallbacks["*"];
|
|
@@ -12167,22 +12205,22 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12167
12205
|
genericCallback(customJavascriptEvent);
|
|
12168
12206
|
}
|
|
12169
12207
|
|
|
12170
|
-
return _context22.abrupt("break",
|
|
12208
|
+
return _context22.abrupt("break", 100);
|
|
12171
12209
|
|
|
12172
|
-
case
|
|
12210
|
+
case 67:
|
|
12173
12211
|
resetChat = this.props.resetChat;
|
|
12174
12212
|
resetChat();
|
|
12175
|
-
return _context22.abrupt("break",
|
|
12213
|
+
return _context22.abrupt("break", 100);
|
|
12176
12214
|
|
|
12177
|
-
case
|
|
12215
|
+
case 70:
|
|
12178
12216
|
zdChatterAuthCallback = adaSettings.zdChatterAuthCallback;
|
|
12179
12217
|
|
|
12180
12218
|
if (!zdChatterAuthCallback) {
|
|
12181
|
-
_context22.next =
|
|
12219
|
+
_context22.next = 84;
|
|
12182
12220
|
break;
|
|
12183
12221
|
}
|
|
12184
12222
|
|
|
12185
|
-
_context22.prev =
|
|
12223
|
+
_context22.prev = 72;
|
|
12186
12224
|
zdChatterAuthCallback(function (token) {
|
|
12187
12225
|
if (!_this4.channel) {
|
|
12188
12226
|
throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
|
|
@@ -12192,82 +12230,82 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
12192
12230
|
token: token
|
|
12193
12231
|
}, id);
|
|
12194
12232
|
});
|
|
12195
|
-
_context22.next =
|
|
12233
|
+
_context22.next = 82;
|
|
12196
12234
|
break;
|
|
12197
12235
|
|
|
12198
|
-
case
|
|
12199
|
-
_context22.prev =
|
|
12200
|
-
_context22.t1 = _context22["catch"](
|
|
12236
|
+
case 76:
|
|
12237
|
+
_context22.prev = 76;
|
|
12238
|
+
_context22.t1 = _context22["catch"](72);
|
|
12201
12239
|
console.warn("Function for zdChatterAuthCallback produced an error - please ensure the callback is functioning normally");
|
|
12202
12240
|
|
|
12203
12241
|
if (this.channel) {
|
|
12204
|
-
_context22.next =
|
|
12242
|
+
_context22.next = 81;
|
|
12205
12243
|
break;
|
|
12206
12244
|
}
|
|
12207
12245
|
|
|
12208
12246
|
throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
|
|
12209
12247
|
|
|
12210
|
-
case
|
|
12248
|
+
case 81:
|
|
12211
12249
|
this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
|
|
12212
12250
|
|
|
12213
|
-
case
|
|
12214
|
-
_context22.next =
|
|
12251
|
+
case 82:
|
|
12252
|
+
_context22.next = 87;
|
|
12215
12253
|
break;
|
|
12216
12254
|
|
|
12217
|
-
case
|
|
12255
|
+
case 84:
|
|
12218
12256
|
if (this.channel) {
|
|
12219
|
-
_context22.next =
|
|
12257
|
+
_context22.next = 86;
|
|
12220
12258
|
break;
|
|
12221
12259
|
}
|
|
12222
12260
|
|
|
12223
12261
|
throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
|
|
12224
12262
|
|
|
12225
|
-
case
|
|
12263
|
+
case 86:
|
|
12226
12264
|
this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
|
|
12227
12265
|
|
|
12228
|
-
case
|
|
12229
|
-
return _context22.abrupt("break",
|
|
12266
|
+
case 87:
|
|
12267
|
+
return _context22.abrupt("break", 100);
|
|
12230
12268
|
|
|
12231
|
-
case
|
|
12269
|
+
case 88:
|
|
12232
12270
|
this.handleNotifications(payload);
|
|
12233
|
-
return _context22.abrupt("break",
|
|
12271
|
+
return _context22.abrupt("break", 100);
|
|
12234
12272
|
|
|
12235
|
-
case
|
|
12273
|
+
case 90:
|
|
12236
12274
|
if (this.channel) {
|
|
12237
|
-
_context22.next =
|
|
12275
|
+
_context22.next = 92;
|
|
12238
12276
|
break;
|
|
12239
12277
|
}
|
|
12240
12278
|
|
|
12241
12279
|
throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
|
|
12242
12280
|
|
|
12243
|
-
case
|
|
12281
|
+
case 92:
|
|
12244
12282
|
this.channel.postMessage(BROWSER_HAS_NOTIFICATIONS_RESPONSE_EVENT, {
|
|
12245
12283
|
browserHasNotificationSupport: browserHasNotificationSupport
|
|
12246
12284
|
});
|
|
12247
|
-
return _context22.abrupt("break",
|
|
12285
|
+
return _context22.abrupt("break", 100);
|
|
12248
12286
|
|
|
12249
|
-
case
|
|
12287
|
+
case 94:
|
|
12250
12288
|
requestNotificationPermission();
|
|
12251
|
-
return _context22.abrupt("break",
|
|
12289
|
+
return _context22.abrupt("break", 100);
|
|
12252
12290
|
|
|
12253
|
-
case
|
|
12291
|
+
case 96:
|
|
12254
12292
|
conversationEndCallback = adaSettings.conversationEndCallback;
|
|
12255
12293
|
|
|
12256
12294
|
if (conversationEndCallback) {
|
|
12257
12295
|
conversationEndCallback(payload);
|
|
12258
12296
|
}
|
|
12259
12297
|
|
|
12260
|
-
return _context22.abrupt("break",
|
|
12298
|
+
return _context22.abrupt("break", 100);
|
|
12261
12299
|
|
|
12262
|
-
case
|
|
12263
|
-
return _context22.abrupt("break",
|
|
12300
|
+
case 99:
|
|
12301
|
+
return _context22.abrupt("break", 100);
|
|
12264
12302
|
|
|
12265
|
-
case
|
|
12303
|
+
case 100:
|
|
12266
12304
|
case "end":
|
|
12267
12305
|
return _context22.stop();
|
|
12268
12306
|
}
|
|
12269
12307
|
}
|
|
12270
|
-
}, _callee, this, [[
|
|
12308
|
+
}, _callee, this, [[72, 76]]);
|
|
12271
12309
|
}));
|
|
12272
12310
|
|
|
12273
12311
|
function handleChatEvent(_x, _x2, _x3) {
|
|
@@ -14331,7 +14369,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14331
14369
|
/* harmony export */ });
|
|
14332
14370
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(97|(9[8-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(96|(9[7-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(96|(9[7-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
14333
14371
|
var isProduction = "production" === "production";
|
|
14334
|
-
var embed2Version = "
|
|
14372
|
+
var embed2Version = "8858d05";
|
|
14335
14373
|
|
|
14336
14374
|
/***/ }),
|
|
14337
14375
|
|
|
@@ -14673,9 +14711,9 @@ function _log() {
|
|
|
14673
14711
|
service: "embed",
|
|
14674
14712
|
env: "production",
|
|
14675
14713
|
embedVersion: 2,
|
|
14676
|
-
version: "1.0.
|
|
14714
|
+
version: "1.0.58",
|
|
14677
14715
|
isNpm: true,
|
|
14678
|
-
commitHash: "
|
|
14716
|
+
commitHash: "8858d05"
|
|
14679
14717
|
}))
|
|
14680
14718
|
});
|
|
14681
14719
|
|
|
@@ -24222,7 +24260,7 @@ function _loadEmbed() {
|
|
|
24222
24260
|
polyfillVersionString = "legacy";
|
|
24223
24261
|
}
|
|
24224
24262
|
|
|
24225
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
24263
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "8858d05", "/index.js");
|
|
24226
24264
|
}
|
|
24227
24265
|
|
|
24228
24266
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|