@kavchat/core 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +312 -145
- package/dist/index.d.ts +312 -145
- package/dist/index.js +487 -13
- package/dist/index.mjs +468 -13
- package/i18n/ar.json +30 -2
- package/i18n/de.json +30 -2
- package/i18n/en.json +30 -2
- package/i18n/es.json +30 -2
- package/i18n/fr.json +30 -2
- package/i18n/he.json +30 -2
- package/i18n/it.json +30 -2
- package/i18n/pt.json +30 -2
- package/i18n/ru.json +30 -2
- package/i18n/th.json +29 -1
- package/i18n/tr.json +30 -2
- package/package.json +1 -1
- package/test-vectors/live.json +1308 -0
package/dist/index.js
CHANGED
|
@@ -22,6 +22,10 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
AI_ANSWER_MAX: () => AI_ANSWER_MAX,
|
|
24
24
|
AI_QUESTION_MAX: () => AI_QUESTION_MAX,
|
|
25
|
+
LIVE_AVAILABILITY_TTL_MS: () => LIVE_AVAILABILITY_TTL_MS,
|
|
26
|
+
LIVE_MESSAGE_MAX: () => LIVE_MESSAGE_MAX,
|
|
27
|
+
LIVE_TYPING_HIDE_MS: () => LIVE_TYPING_HIDE_MS,
|
|
28
|
+
LIVE_TYPING_INTERVAL_MS: () => LIVE_TYPING_INTERVAL_MS,
|
|
25
29
|
RTL_LOCALES: () => RTL_LOCALES,
|
|
26
30
|
SUPPORTED_LOCALES: () => SUPPORTED_LOCALES,
|
|
27
31
|
UI_TEXTS: () => UI_TEXTS,
|
|
@@ -31,9 +35,23 @@ __export(index_exports, {
|
|
|
31
35
|
eventsPayload: () => eventsPayload,
|
|
32
36
|
format: () => format,
|
|
33
37
|
groupKey: () => groupKey,
|
|
38
|
+
isLiveClientId: () => isLiveClientId,
|
|
39
|
+
isLiveFinal: () => isLiveFinal,
|
|
34
40
|
isRtl: () => isRtl,
|
|
35
41
|
isSpacelessScript: () => isSpacelessScript,
|
|
36
42
|
keyTerms: () => keyTerms,
|
|
43
|
+
liveAddPending: () => liveAddPending,
|
|
44
|
+
liveApplyConversation: () => liveApplyConversation,
|
|
45
|
+
liveApplyEvent: () => liveApplyEvent,
|
|
46
|
+
liveApplySync: () => liveApplySync,
|
|
47
|
+
liveBackoff: () => liveBackoff,
|
|
48
|
+
liveClock: () => liveClock,
|
|
49
|
+
liveLines: () => liveLines,
|
|
50
|
+
liveSetPending: () => liveSetPending,
|
|
51
|
+
liveStart: () => liveStart,
|
|
52
|
+
liveStatus: () => liveStatus,
|
|
53
|
+
liveUnavailableText: () => liveUnavailableText,
|
|
54
|
+
liveWaitLeft: () => liveWaitLeft,
|
|
37
55
|
matchQuestion: () => matchQuestion,
|
|
38
56
|
normalizeWords: () => normalizeWords,
|
|
39
57
|
pendingQuestion: () => pendingQuestion,
|
|
@@ -44,6 +62,7 @@ __export(index_exports, {
|
|
|
44
62
|
toBubbles: () => toBubbles,
|
|
45
63
|
transcriptOf: () => transcriptOf,
|
|
46
64
|
uiTexts: () => uiTexts,
|
|
65
|
+
withLiveChip: () => withLiveChip,
|
|
47
66
|
withinOneEdit: () => withinOneEdit
|
|
48
67
|
});
|
|
49
68
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -363,7 +382,35 @@ var en_default = {
|
|
|
363
382
|
"form.required": "Required",
|
|
364
383
|
"form.contactRequired": "Leave an email or a phone number so we can get back to you",
|
|
365
384
|
"form.emailInvalid": "Invalid email address",
|
|
366
|
-
"form.backToChat": "Back to chat"
|
|
385
|
+
"form.backToChat": "Back to chat",
|
|
386
|
+
"live.talk": "Talk to a representative",
|
|
387
|
+
"live.intro": "A representative will join shortly. Leave an email or a phone number in case we need to get back to you.",
|
|
388
|
+
"live.department": "Department",
|
|
389
|
+
"live.message": "Your message (optional)",
|
|
390
|
+
"live.start": "Start chat",
|
|
391
|
+
"live.connecting": "Connecting...",
|
|
392
|
+
"live.waiting": "Waiting for a representative",
|
|
393
|
+
"live.waitingLeft": "Waiting for a representative ({time})",
|
|
394
|
+
"live.leave": "Leave a message instead",
|
|
395
|
+
"live.end": "End chat",
|
|
396
|
+
"live.joined": "{name} joined the chat",
|
|
397
|
+
"live.with": "Chatting with {name}",
|
|
398
|
+
"live.agent": "Representative",
|
|
399
|
+
"live.typing": "Typing a reply...",
|
|
400
|
+
"live.ended": "The chat has ended",
|
|
401
|
+
"live.ticket": "We got your message and will get back to you soon.",
|
|
402
|
+
"live.timeout": "No representative was free in time, so we saved your chat as a request.",
|
|
403
|
+
"live.number": "Request #{number}",
|
|
404
|
+
"live.closed": "Our representatives are not available right now. Leave a message and we will get back to you.",
|
|
405
|
+
"live.closedUntil": "Our representatives are not available right now and will be back at {time}. Leave a message and we will get back to you.",
|
|
406
|
+
"live.busy": "All our representatives are busy right now. Leave a message and we will get back to you.",
|
|
407
|
+
"live.failed": "Message not sent. Tap to try again.",
|
|
408
|
+
"live.back": "Back to the bot",
|
|
409
|
+
"live.reconnecting": "Reconnecting...",
|
|
410
|
+
"live.tooLong": "Messages are limited to 2000 characters.",
|
|
411
|
+
"live.elsewhere": "You already have an open chat in another window.",
|
|
412
|
+
"live.replaced": "This chat continues in another window.",
|
|
413
|
+
"live.placeholder": "Type a message..."
|
|
367
414
|
};
|
|
368
415
|
|
|
369
416
|
// i18n/he.json
|
|
@@ -404,7 +451,35 @@ var he_default = {
|
|
|
404
451
|
"form.required": "\u05E9\u05D3\u05D4 \u05D7\u05D5\u05D1\u05D4",
|
|
405
452
|
"form.contactRequired": "\u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05D0\u05D5 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DB\u05D3\u05D9 \u05E9\u05E0\u05D5\u05DB\u05DC \u05DC\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD",
|
|
406
453
|
"form.emailInvalid": "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4",
|
|
407
|
-
"form.backToChat": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6'\u05D0\u05D8"
|
|
454
|
+
"form.backToChat": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6'\u05D0\u05D8",
|
|
455
|
+
"live.talk": "\u05E9\u05D9\u05D7\u05D4 \u05E2\u05DD \u05E0\u05E6\u05D9\u05D2",
|
|
456
|
+
"live.intro": "\u05E0\u05E6\u05D9\u05D2 \u05D9\u05E6\u05D8\u05E8\u05E3 \u05D1\u05E2\u05D5\u05D3 \u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05D0\u05D5 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DC\u05DE\u05E7\u05E8\u05D4 \u05E9\u05E0\u05E6\u05D8\u05E8\u05DA \u05DC\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
457
|
+
"live.department": "\u05DE\u05D7\u05DC\u05E7\u05D4",
|
|
458
|
+
"live.message": "\u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E9\u05DC\u05DB\u05DD (\u05DC\u05D0 \u05D7\u05D5\u05D1\u05D4)",
|
|
459
|
+
"live.start": "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E9\u05D9\u05D7\u05D4",
|
|
460
|
+
"live.connecting": "\u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD...",
|
|
461
|
+
"live.waiting": "\u05DE\u05DE\u05EA\u05D9\u05E0\u05D9\u05DD \u05DC\u05E0\u05E6\u05D9\u05D2",
|
|
462
|
+
"live.waitingLeft": "\u05DE\u05DE\u05EA\u05D9\u05E0\u05D9\u05DD \u05DC\u05E0\u05E6\u05D9\u05D2 ({time})",
|
|
463
|
+
"live.leave": "\u05DC\u05D4\u05E9\u05D0\u05D9\u05E8 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D1\u05DE\u05E7\u05D5\u05DD",
|
|
464
|
+
"live.end": "\u05E1\u05D9\u05D5\u05DD \u05D4\u05E9\u05D9\u05D7\u05D4",
|
|
465
|
+
"live.joined": "\u05E2\u05DB\u05E9\u05D9\u05D5 \u05D1\u05E9\u05D9\u05D7\u05D4: {name}",
|
|
466
|
+
"live.with": "\u05D1\u05E9\u05D9\u05D7\u05D4 \u05E2\u05DD {name}",
|
|
467
|
+
"live.agent": "\u05E0\u05E6\u05D9\u05D2",
|
|
468
|
+
"live.typing": "\u05DE\u05E7\u05DC\u05D9\u05D3\u05D9\u05DD \u05EA\u05E9\u05D5\u05D1\u05D4...",
|
|
469
|
+
"live.ended": "\u05D4\u05E9\u05D9\u05D7\u05D4 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DE\u05D4",
|
|
470
|
+
"live.ticket": "\u05E7\u05D9\u05D1\u05DC\u05E0\u05D5 \u05D0\u05EA \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD \u05D1\u05D4\u05E7\u05D3\u05DD.",
|
|
471
|
+
"live.timeout": "\u05D0\u05E3 \u05E0\u05E6\u05D9\u05D2 \u05DC\u05D0 \u05D4\u05EA\u05E4\u05E0\u05D4 \u05D1\u05D6\u05DE\u05DF, \u05D0\u05D6 \u05E9\u05DE\u05E8\u05E0\u05D5 \u05D0\u05EA \u05D4\u05E9\u05D9\u05D7\u05D4 \u05DB\u05E4\u05E0\u05D9\u05D9\u05D4.",
|
|
472
|
+
"live.number": "\u05E4\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05E4\u05E8 {number}",
|
|
473
|
+
"live.closed": "\u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05DC\u05D0 \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
474
|
+
"live.closedUntil": "\u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05DC\u05D0 \u05D6\u05DE\u05D9\u05E0\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2 \u05D5\u05D9\u05D7\u05D6\u05E8\u05D5 \u05D1-{time}. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
475
|
+
"live.busy": "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05E2\u05E1\u05D5\u05E7\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2. \u05D4\u05E9\u05D0\u05D9\u05E8\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05E0\u05D7\u05D6\u05D5\u05E8 \u05D0\u05DC\u05D9\u05DB\u05DD.",
|
|
476
|
+
"live.failed": "\u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05DC\u05D0 \u05E0\u05E9\u05DC\u05D7\u05D4. \u05D4\u05E7\u05D9\u05E9\u05D5 \u05DB\u05D3\u05D9 \u05DC\u05E0\u05E1\u05D5\u05EA \u05E9\u05D5\u05D1.",
|
|
477
|
+
"live.back": "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D1\u05D5\u05D8",
|
|
478
|
+
"live.reconnecting": "\u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9...",
|
|
479
|
+
"live.tooLong": "\u05D0\u05E4\u05E9\u05E8 \u05DC\u05E9\u05DC\u05D5\u05D7 \u05E2\u05D3 2000 \u05EA\u05D5\u05D5\u05D9\u05DD \u05D1\u05D4\u05D5\u05D3\u05E2\u05D4.",
|
|
480
|
+
"live.elsewhere": "\u05DB\u05D1\u05E8 \u05D9\u05E9 \u05DC\u05DB\u05DD \u05E9\u05D9\u05D7\u05D4 \u05E4\u05EA\u05D5\u05D7\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D0\u05D7\u05E8.",
|
|
481
|
+
"live.replaced": "\u05D4\u05E9\u05D9\u05D7\u05D4 \u05DE\u05DE\u05E9\u05D9\u05DB\u05D4 \u05D1\u05D7\u05DC\u05D5\u05DF \u05D0\u05D7\u05E8.",
|
|
482
|
+
"live.placeholder": "\u05DB\u05EA\u05D1\u05D5 \u05D4\u05D5\u05D3\u05E2\u05D4..."
|
|
408
483
|
};
|
|
409
484
|
|
|
410
485
|
// i18n/ar.json
|
|
@@ -445,7 +520,35 @@ var ar_default = {
|
|
|
445
520
|
"form.required": "\u0645\u0637\u0644\u0648\u0628",
|
|
446
521
|
"form.contactRequired": "\u0627\u062A\u0631\u0643 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0623\u0648 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0644\u0646\u062A\u0645\u0643\u0646 \u0645\u0646 \u0627\u0644\u0631\u062F \u0639\u0644\u064A\u0643",
|
|
447
522
|
"form.emailInvalid": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",
|
|
448
|
-
"form.backToChat": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629"
|
|
523
|
+
"form.backToChat": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
524
|
+
"live.talk": "\u0627\u0644\u062A\u062D\u062F\u062B \u0645\u0639 \u0645\u0645\u062B\u0644",
|
|
525
|
+
"live.intro": "\u0633\u064A\u0646\u0636\u0645 \u0645\u0645\u062B\u0644 \u0628\u0639\u062F \u0644\u062D\u0638\u0627\u062A. \u0627\u062A\u0631\u0643 \u0628\u0631\u064A\u062F\u064B\u0627 \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\u064B\u0627 \u0623\u0648 \u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0641\u064A \u062D\u0627\u0644 \u0627\u062D\u062A\u062C\u0646\u0627 \u0625\u0644\u0649 \u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u064A\u0643.",
|
|
526
|
+
"live.department": "\u0627\u0644\u0642\u0633\u0645",
|
|
527
|
+
"live.message": "\u0631\u0633\u0627\u0644\u062A\u0643 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
|
|
528
|
+
"live.start": "\u0628\u062F\u0621 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
529
|
+
"live.connecting": "\u062C\u0627\u0631\u064D \u0627\u0644\u0627\u062A\u0635\u0627\u0644...",
|
|
530
|
+
"live.waiting": "\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0645\u062B\u0644",
|
|
531
|
+
"live.waitingLeft": "\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0645\u062B\u0644 ({time})",
|
|
532
|
+
"live.leave": "\u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643",
|
|
533
|
+
"live.end": "\u0625\u0646\u0647\u0627\u0621 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
534
|
+
"live.joined": "\u0627\u0646\u0636\u0645 {name} \u0625\u0644\u0649 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
535
|
+
"live.with": "\u062A\u062A\u062D\u062F\u062B \u0645\u0639 {name}",
|
|
536
|
+
"live.agent": "\u0645\u0645\u062B\u0644",
|
|
537
|
+
"live.typing": "\u064A\u0643\u062A\u0628 \u0631\u062F\u064B\u0627...",
|
|
538
|
+
"live.ended": "\u0627\u0646\u062A\u0647\u062A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629",
|
|
539
|
+
"live.ticket": "\u0648\u0635\u0644\u062A\u0646\u0627 \u0631\u0633\u0627\u0644\u062A\u0643 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643 \u0642\u0631\u064A\u0628\u064B\u0627.",
|
|
540
|
+
"live.timeout": "\u0644\u0645 \u064A\u062A\u0641\u0631\u063A \u0623\u064A \u0645\u0645\u062B\u0644 \u0641\u064A \u0627\u0644\u0648\u0642\u062A \u0627\u0644\u0645\u0646\u0627\u0633\u0628\u060C \u0644\u0630\u0644\u0643 \u062D\u0641\u0638\u0646\u0627 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0643\u0637\u0644\u0628.",
|
|
541
|
+
"live.number": "\u0637\u0644\u0628 \u0631\u0642\u0645 {number}",
|
|
542
|
+
"live.closed": "\u0645\u0645\u062B\u0644\u0648\u0646\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u064A\u0646 \u0627\u0644\u0622\u0646. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
543
|
+
"live.closedUntil": "\u0645\u0645\u062B\u0644\u0648\u0646\u0627 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u064A\u0646 \u0627\u0644\u0622\u0646 \u0648\u0633\u064A\u0639\u0648\u062F\u0648\u0646 \u0641\u064A {time}. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
544
|
+
"live.busy": "\u062C\u0645\u064A\u0639 \u0645\u0645\u062B\u0644\u064A\u0646\u0627 \u0645\u0634\u063A\u0648\u0644\u0648\u0646 \u0627\u0644\u0622\u0646. \u0627\u062A\u0631\u0643 \u0631\u0633\u0627\u0644\u0629 \u0648\u0633\u0646\u0639\u0648\u062F \u0625\u0644\u064A\u0643.",
|
|
545
|
+
"live.failed": "\u0644\u0645 \u062A\u064F\u0631\u0633\u0644 \u0627\u0644\u0631\u0633\u0627\u0644\u0629. \u0627\u0636\u063A\u0637 \u0644\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
|
|
546
|
+
"live.back": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0628\u0648\u062A",
|
|
547
|
+
"live.reconnecting": "\u062C\u0627\u0631\u064D \u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0627\u062A\u0635\u0627\u0644...",
|
|
548
|
+
"live.tooLong": "\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0631\u0633\u0627\u0644\u0629 2000 \u062D\u0631\u0641.",
|
|
549
|
+
"live.elsewhere": "\u0644\u062F\u064A\u0643 \u0645\u062D\u0627\u062F\u062B\u0629 \u0645\u0641\u062A\u0648\u062D\u0629 \u0628\u0627\u0644\u0641\u0639\u0644 \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u0623\u062E\u0631\u0649.",
|
|
550
|
+
"live.replaced": "\u062A\u0633\u062A\u0645\u0631 \u0647\u0630\u0647 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0641\u064A \u0646\u0627\u0641\u0630\u0629 \u0623\u062E\u0631\u0649.",
|
|
551
|
+
"live.placeholder": "\u0627\u0643\u062A\u0628 \u0631\u0633\u0627\u0644\u0629..."
|
|
449
552
|
};
|
|
450
553
|
|
|
451
554
|
// i18n/ru.json
|
|
@@ -486,7 +589,35 @@ var ru_default = {
|
|
|
486
589
|
"form.required": "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435",
|
|
487
590
|
"form.contactRequired": "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 email \u0438\u043B\u0438 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430, \u0447\u0442\u043E\u0431\u044B \u043C\u044B \u043C\u043E\u0433\u043B\u0438 \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F",
|
|
488
591
|
"form.emailInvalid": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 email",
|
|
489
|
-
"form.backToChat": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u0447\u0430\u0442"
|
|
592
|
+
"form.backToChat": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u0432 \u0447\u0430\u0442",
|
|
593
|
+
"live.talk": "\u0421\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F \u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u043E\u043C",
|
|
594
|
+
"live.intro": "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u0441\u043A\u043E\u0440\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0441\u044F. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 email \u0438\u043B\u0438 \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u043D\u0430 \u0441\u043B\u0443\u0447\u0430\u0439, \u0435\u0441\u043B\u0438 \u043D\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0431\u0443\u0434\u0435\u0442 \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F.",
|
|
595
|
+
"live.department": "\u041E\u0442\u0434\u0435\u043B",
|
|
596
|
+
"live.message": "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 (\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)",
|
|
597
|
+
"live.start": "\u041D\u0430\u0447\u0430\u0442\u044C \u0447\u0430\u0442",
|
|
598
|
+
"live.connecting": "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435...",
|
|
599
|
+
"live.waiting": "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0430",
|
|
600
|
+
"live.waitingLeft": "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0430 ({time})",
|
|
601
|
+
"live.leave": "\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
602
|
+
"live.end": "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0447\u0430\u0442",
|
|
603
|
+
"live.joined": "{name} \u043F\u0440\u0438\u0441\u043E\u0435\u0434\u0438\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u0447\u0430\u0442\u0443",
|
|
604
|
+
"live.with": "\u0427\u0430\u0442 \u0441: {name}",
|
|
605
|
+
"live.agent": "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440",
|
|
606
|
+
"live.typing": "\u041F\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043E\u0442\u0432\u0435\u0442...",
|
|
607
|
+
"live.ended": "\u0427\u0430\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D",
|
|
608
|
+
"live.ticket": "\u041C\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0432\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u0441\u043A\u043E\u0440\u043E \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
609
|
+
"live.timeout": "\u041D\u0438 \u043E\u0434\u0438\u043D \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 \u043D\u0435 \u043E\u0441\u0432\u043E\u0431\u043E\u0434\u0438\u043B\u0441\u044F \u0432\u043E\u0432\u0440\u0435\u043C\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u043C\u044B \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B\u0438 \u0447\u0430\u0442 \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435.",
|
|
610
|
+
"live.number": "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u2116{number}",
|
|
611
|
+
"live.closed": "\u0421\u0435\u0439\u0447\u0430\u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
612
|
+
"live.closedUntil": "\u0421\u0435\u0439\u0447\u0430\u0441 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0438 \u0432\u0435\u0440\u043D\u0443\u0442\u0441\u044F \u0432 {time}. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
613
|
+
"live.busy": "\u0412\u0441\u0435 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043D\u044F\u0442\u044B. \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u0438 \u043C\u044B \u0441 \u0432\u0430\u043C\u0438 \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F.",
|
|
614
|
+
"live.failed": "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C.",
|
|
615
|
+
"live.back": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0431\u043E\u0442\u0443",
|
|
616
|
+
"live.reconnecting": "\u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435...",
|
|
617
|
+
"live.tooLong": "\u0414\u043B\u0438\u043D\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0431\u043E\u043B\u0435\u0435 2000 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432.",
|
|
618
|
+
"live.elsewhere": "\u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0439 \u0447\u0430\u0442 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435.",
|
|
619
|
+
"live.replaced": "\u042D\u0442\u043E\u0442 \u0447\u0430\u0442 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442\u0441\u044F \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435.",
|
|
620
|
+
"live.placeholder": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435..."
|
|
490
621
|
};
|
|
491
622
|
|
|
492
623
|
// i18n/es.json
|
|
@@ -527,7 +658,35 @@ var es_default = {
|
|
|
527
658
|
"form.required": "Obligatorio",
|
|
528
659
|
"form.contactRequired": "Deja un correo o un tel\xE9fono para que podamos responderte",
|
|
529
660
|
"form.emailInvalid": "Correo electr\xF3nico no v\xE1lido",
|
|
530
|
-
"form.backToChat": "Volver al chat"
|
|
661
|
+
"form.backToChat": "Volver al chat",
|
|
662
|
+
"live.talk": "Hablar con un agente",
|
|
663
|
+
"live.intro": "Un agente se unir\xE1 en breve. Deja un email o un tel\xE9fono por si necesitamos contactarte.",
|
|
664
|
+
"live.department": "Departamento",
|
|
665
|
+
"live.message": "Tu mensaje (opcional)",
|
|
666
|
+
"live.start": "Iniciar chat",
|
|
667
|
+
"live.connecting": "Conectando...",
|
|
668
|
+
"live.waiting": "Esperando a un agente",
|
|
669
|
+
"live.waitingLeft": "Esperando a un agente ({time})",
|
|
670
|
+
"live.leave": "Dejar un mensaje",
|
|
671
|
+
"live.end": "Terminar chat",
|
|
672
|
+
"live.joined": "{name} se uni\xF3 al chat",
|
|
673
|
+
"live.with": "Hablando con {name}",
|
|
674
|
+
"live.agent": "Agente",
|
|
675
|
+
"live.typing": "Escribiendo una respuesta...",
|
|
676
|
+
"live.ended": "El chat ha terminado",
|
|
677
|
+
"live.ticket": "Recibimos tu mensaje y te responderemos pronto.",
|
|
678
|
+
"live.timeout": "Ning\xFAn agente qued\xF3 libre a tiempo, as\xED que guardamos tu chat como una solicitud.",
|
|
679
|
+
"live.number": "Solicitud n.\xBA {number}",
|
|
680
|
+
"live.closed": "Nuestros agentes no est\xE1n disponibles ahora. Deja un mensaje y te responderemos.",
|
|
681
|
+
"live.closedUntil": "Nuestros agentes no est\xE1n disponibles ahora y volver\xE1n a las {time}. Deja un mensaje y te responderemos.",
|
|
682
|
+
"live.busy": "Todos nuestros agentes est\xE1n ocupados ahora. Deja un mensaje y te responderemos.",
|
|
683
|
+
"live.failed": "Mensaje no enviado. Toca para intentarlo de nuevo.",
|
|
684
|
+
"live.back": "Volver al bot",
|
|
685
|
+
"live.reconnecting": "Reconectando...",
|
|
686
|
+
"live.tooLong": "Los mensajes tienen un m\xE1ximo de 2000 caracteres.",
|
|
687
|
+
"live.elsewhere": "Ya tienes un chat abierto en otra ventana.",
|
|
688
|
+
"live.replaced": "Este chat contin\xFAa en otra ventana.",
|
|
689
|
+
"live.placeholder": "Escribe un mensaje..."
|
|
531
690
|
};
|
|
532
691
|
|
|
533
692
|
// i18n/fr.json
|
|
@@ -568,7 +727,35 @@ var fr_default = {
|
|
|
568
727
|
"form.required": "Obligatoire",
|
|
569
728
|
"form.contactRequired": "Indiquez un e-mail ou un num\xE9ro de t\xE9l\xE9phone pour que nous puissions vous r\xE9pondre",
|
|
570
729
|
"form.emailInvalid": "Adresse e-mail invalide",
|
|
571
|
-
"form.backToChat": "Retour au chat"
|
|
730
|
+
"form.backToChat": "Retour au chat",
|
|
731
|
+
"live.talk": "Parler \xE0 un conseiller",
|
|
732
|
+
"live.intro": "Un conseiller va vous rejoindre. Laissez un email ou un num\xE9ro de t\xE9l\xE9phone au cas o\xF9 nous devrions vous recontacter.",
|
|
733
|
+
"live.department": "Service",
|
|
734
|
+
"live.message": "Votre message (facultatif)",
|
|
735
|
+
"live.start": "D\xE9marrer le chat",
|
|
736
|
+
"live.connecting": "Connexion...",
|
|
737
|
+
"live.waiting": "En attente d\u2019un conseiller",
|
|
738
|
+
"live.waitingLeft": "En attente d\u2019un conseiller ({time})",
|
|
739
|
+
"live.leave": "Laisser un message \xE0 la place",
|
|
740
|
+
"live.end": "Terminer le chat",
|
|
741
|
+
"live.joined": "{name} a rejoint le chat",
|
|
742
|
+
"live.with": "En conversation avec {name}",
|
|
743
|
+
"live.agent": "Conseiller",
|
|
744
|
+
"live.typing": "R\xE9dige une r\xE9ponse...",
|
|
745
|
+
"live.ended": "Le chat est termin\xE9",
|
|
746
|
+
"live.ticket": "Nous avons bien re\xE7u votre message et revenons vers vous rapidement.",
|
|
747
|
+
"live.timeout": "Aucun conseiller ne s\u2019est lib\xE9r\xE9 \xE0 temps, nous avons donc enregistr\xE9 votre chat comme demande.",
|
|
748
|
+
"live.number": "Demande n\xB0 {number}",
|
|
749
|
+
"live.closed": "Nos conseillers ne sont pas disponibles pour le moment. Laissez un message et nous reviendrons vers vous.",
|
|
750
|
+
"live.closedUntil": "Nos conseillers ne sont pas disponibles pour le moment et reviennent \xE0 {time}. Laissez un message et nous reviendrons vers vous.",
|
|
751
|
+
"live.busy": "Tous nos conseillers sont occup\xE9s. Laissez un message et nous reviendrons vers vous.",
|
|
752
|
+
"live.failed": "Message non envoy\xE9. Touchez pour r\xE9essayer.",
|
|
753
|
+
"live.back": "Retour au bot",
|
|
754
|
+
"live.reconnecting": "Reconnexion...",
|
|
755
|
+
"live.tooLong": "Les messages sont limit\xE9s \xE0 2000 caract\xE8res.",
|
|
756
|
+
"live.elsewhere": "Vous avez d\xE9j\xE0 un chat ouvert dans une autre fen\xEAtre.",
|
|
757
|
+
"live.replaced": "Ce chat continue dans une autre fen\xEAtre.",
|
|
758
|
+
"live.placeholder": "\xC9crivez un message..."
|
|
572
759
|
};
|
|
573
760
|
|
|
574
761
|
// i18n/de.json
|
|
@@ -609,7 +796,35 @@ var de_default = {
|
|
|
609
796
|
"form.required": "Pflichtfeld",
|
|
610
797
|
"form.contactRequired": "Bitte geben Sie eine E-Mail-Adresse oder Telefonnummer an, damit wir uns melden k\xF6nnen",
|
|
611
798
|
"form.emailInvalid": "Ung\xFCltige E-Mail-Adresse",
|
|
612
|
-
"form.backToChat": "Zur\xFCck zum Chat"
|
|
799
|
+
"form.backToChat": "Zur\xFCck zum Chat",
|
|
800
|
+
"live.talk": "Mit einem Mitarbeiter sprechen",
|
|
801
|
+
"live.intro": "Gleich ist jemand f\xFCr Sie da. Hinterlassen Sie eine E-Mail-Adresse oder Telefonnummer, falls wir uns bei Ihnen melden m\xFCssen.",
|
|
802
|
+
"live.department": "Abteilung",
|
|
803
|
+
"live.message": "Ihre Nachricht (optional)",
|
|
804
|
+
"live.start": "Chat starten",
|
|
805
|
+
"live.connecting": "Verbinden...",
|
|
806
|
+
"live.waiting": "Warten auf einen Mitarbeiter",
|
|
807
|
+
"live.waitingLeft": "Warten auf einen Mitarbeiter ({time})",
|
|
808
|
+
"live.leave": "Stattdessen eine Nachricht hinterlassen",
|
|
809
|
+
"live.end": "Chat beenden",
|
|
810
|
+
"live.joined": "{name} ist dem Chat beigetreten",
|
|
811
|
+
"live.with": "Im Chat mit {name}",
|
|
812
|
+
"live.agent": "Mitarbeiter",
|
|
813
|
+
"live.typing": "Schreibt eine Antwort...",
|
|
814
|
+
"live.ended": "Der Chat wurde beendet",
|
|
815
|
+
"live.ticket": "Wir haben Ihre Nachricht erhalten und melden uns bald bei Ihnen.",
|
|
816
|
+
"live.timeout": "Es wurde rechtzeitig niemand frei, deshalb haben wir Ihren Chat als Anfrage gespeichert.",
|
|
817
|
+
"live.number": "Anfrage Nr. {number}",
|
|
818
|
+
"live.closed": "Unsere Mitarbeiter sind gerade nicht erreichbar. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
819
|
+
"live.closedUntil": "Unsere Mitarbeiter sind gerade nicht erreichbar und ab {time} wieder da. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
820
|
+
"live.busy": "Alle Mitarbeiter sind gerade besch\xE4ftigt. Hinterlassen Sie eine Nachricht, wir melden uns bei Ihnen.",
|
|
821
|
+
"live.failed": "Nachricht nicht gesendet. Tippen Sie, um es erneut zu versuchen.",
|
|
822
|
+
"live.back": "Zur\xFCck zum Bot",
|
|
823
|
+
"live.reconnecting": "Neu verbinden...",
|
|
824
|
+
"live.tooLong": "Nachrichten sind auf 2000 Zeichen begrenzt.",
|
|
825
|
+
"live.elsewhere": "Sie haben bereits einen offenen Chat in einem anderen Fenster.",
|
|
826
|
+
"live.replaced": "Dieser Chat geht in einem anderen Fenster weiter.",
|
|
827
|
+
"live.placeholder": "Nachricht eingeben..."
|
|
613
828
|
};
|
|
614
829
|
|
|
615
830
|
// i18n/pt.json
|
|
@@ -650,7 +865,35 @@ var pt_default = {
|
|
|
650
865
|
"form.required": "Obrigat\xF3rio",
|
|
651
866
|
"form.contactRequired": "Informe um e-mail ou telefone para que possamos retornar",
|
|
652
867
|
"form.emailInvalid": "Endere\xE7o de e-mail inv\xE1lido",
|
|
653
|
-
"form.backToChat": "Voltar ao chat"
|
|
868
|
+
"form.backToChat": "Voltar ao chat",
|
|
869
|
+
"live.talk": "Falar com um atendente",
|
|
870
|
+
"live.intro": "Um atendente vai entrar em instantes. Deixe um email ou telefone caso precisemos retornar o contato.",
|
|
871
|
+
"live.department": "Departamento",
|
|
872
|
+
"live.message": "Sua mensagem (opcional)",
|
|
873
|
+
"live.start": "Iniciar chat",
|
|
874
|
+
"live.connecting": "Conectando...",
|
|
875
|
+
"live.waiting": "Aguardando um atendente",
|
|
876
|
+
"live.waitingLeft": "Aguardando um atendente ({time})",
|
|
877
|
+
"live.leave": "Deixar uma mensagem",
|
|
878
|
+
"live.end": "Encerrar chat",
|
|
879
|
+
"live.joined": "{name} entrou no chat",
|
|
880
|
+
"live.with": "Conversando com {name}",
|
|
881
|
+
"live.agent": "Atendente",
|
|
882
|
+
"live.typing": "Digitando uma resposta...",
|
|
883
|
+
"live.ended": "O chat foi encerrado",
|
|
884
|
+
"live.ticket": "Recebemos sua mensagem e retornaremos em breve.",
|
|
885
|
+
"live.timeout": "Nenhum atendente ficou livre a tempo, ent\xE3o salvamos seu chat como uma solicita\xE7\xE3o.",
|
|
886
|
+
"live.number": "Solicita\xE7\xE3o n\xBA {number}",
|
|
887
|
+
"live.closed": "Nossos atendentes n\xE3o est\xE3o dispon\xEDveis agora. Deixe uma mensagem e retornaremos.",
|
|
888
|
+
"live.closedUntil": "Nossos atendentes n\xE3o est\xE3o dispon\xEDveis agora e voltam \xE0s {time}. Deixe uma mensagem e retornaremos.",
|
|
889
|
+
"live.busy": "Todos os nossos atendentes est\xE3o ocupados agora. Deixe uma mensagem e retornaremos.",
|
|
890
|
+
"live.failed": "Mensagem n\xE3o enviada. Toque para tentar de novo.",
|
|
891
|
+
"live.back": "Voltar ao bot",
|
|
892
|
+
"live.reconnecting": "Reconectando...",
|
|
893
|
+
"live.tooLong": "As mensagens t\xEAm no m\xE1ximo 2000 caracteres.",
|
|
894
|
+
"live.elsewhere": "Voc\xEA j\xE1 tem um chat aberto em outra janela.",
|
|
895
|
+
"live.replaced": "Este chat continua em outra janela.",
|
|
896
|
+
"live.placeholder": "Digite uma mensagem..."
|
|
654
897
|
};
|
|
655
898
|
|
|
656
899
|
// i18n/it.json
|
|
@@ -691,7 +934,35 @@ var it_default = {
|
|
|
691
934
|
"form.required": "Obbligatorio",
|
|
692
935
|
"form.contactRequired": "Lascia un'email o un numero di telefono per poterti ricontattare",
|
|
693
936
|
"form.emailInvalid": "Indirizzo email non valido",
|
|
694
|
-
"form.backToChat": "Torna alla chat"
|
|
937
|
+
"form.backToChat": "Torna alla chat",
|
|
938
|
+
"live.talk": "Parla con un operatore",
|
|
939
|
+
"live.intro": "Un operatore arriver\xE0 a breve. Lascia un\u2019email o un numero di telefono nel caso dovessimo ricontattarti.",
|
|
940
|
+
"live.department": "Reparto",
|
|
941
|
+
"live.message": "Il tuo messaggio (facoltativo)",
|
|
942
|
+
"live.start": "Avvia la chat",
|
|
943
|
+
"live.connecting": "Connessione...",
|
|
944
|
+
"live.waiting": "In attesa di un operatore",
|
|
945
|
+
"live.waitingLeft": "In attesa di un operatore ({time})",
|
|
946
|
+
"live.leave": "Lascia invece un messaggio",
|
|
947
|
+
"live.end": "Termina la chat",
|
|
948
|
+
"live.joined": "{name} \xE8 entrato nella chat",
|
|
949
|
+
"live.with": "In chat con {name}",
|
|
950
|
+
"live.agent": "Operatore",
|
|
951
|
+
"live.typing": "Sta scrivendo una risposta...",
|
|
952
|
+
"live.ended": "La chat \xE8 terminata",
|
|
953
|
+
"live.ticket": "Abbiamo ricevuto il tuo messaggio e ti risponderemo presto.",
|
|
954
|
+
"live.timeout": "Nessun operatore si \xE8 liberato in tempo, quindi abbiamo salvato la chat come richiesta.",
|
|
955
|
+
"live.number": "Richiesta n. {number}",
|
|
956
|
+
"live.closed": "I nostri operatori non sono disponibili ora. Lascia un messaggio e ti ricontatteremo.",
|
|
957
|
+
"live.closedUntil": "I nostri operatori non sono disponibili ora e tornano alle {time}. Lascia un messaggio e ti ricontatteremo.",
|
|
958
|
+
"live.busy": "Tutti i nostri operatori sono occupati. Lascia un messaggio e ti ricontatteremo.",
|
|
959
|
+
"live.failed": "Messaggio non inviato. Tocca per riprovare.",
|
|
960
|
+
"live.back": "Torna al bot",
|
|
961
|
+
"live.reconnecting": "Riconnessione...",
|
|
962
|
+
"live.tooLong": "I messaggi possono avere al massimo 2000 caratteri.",
|
|
963
|
+
"live.elsewhere": "Hai gi\xE0 una chat aperta in un\u2019altra finestra.",
|
|
964
|
+
"live.replaced": "Questa chat continua in un\u2019altra finestra.",
|
|
965
|
+
"live.placeholder": "Scrivi un messaggio..."
|
|
695
966
|
};
|
|
696
967
|
|
|
697
968
|
// i18n/tr.json
|
|
@@ -732,7 +1003,35 @@ var tr_default = {
|
|
|
732
1003
|
"form.required": "Zorunlu",
|
|
733
1004
|
"form.contactRequired": "Size d\xF6n\xFC\u015F yapabilmemiz i\xE7in bir e-posta veya telefon numaras\u0131 b\u0131rak\u0131n",
|
|
734
1005
|
"form.emailInvalid": "Ge\xE7ersiz e-posta adresi",
|
|
735
|
-
"form.backToChat": "Sohbete d\xF6n"
|
|
1006
|
+
"form.backToChat": "Sohbete d\xF6n",
|
|
1007
|
+
"live.talk": "Bir temsilciyle konu\u015F",
|
|
1008
|
+
"live.intro": "Birazdan bir temsilci kat\u0131lacak. Size d\xF6nmemiz gerekirse diye bir e-posta veya telefon numaras\u0131 b\u0131rak\u0131n.",
|
|
1009
|
+
"live.department": "Departman",
|
|
1010
|
+
"live.message": "Mesaj\u0131n\u0131z (iste\u011Fe ba\u011Fl\u0131)",
|
|
1011
|
+
"live.start": "Sohbeti ba\u015Flat",
|
|
1012
|
+
"live.connecting": "Ba\u011Flan\u0131yor...",
|
|
1013
|
+
"live.waiting": "Temsilci bekleniyor",
|
|
1014
|
+
"live.waitingLeft": "Temsilci bekleniyor ({time})",
|
|
1015
|
+
"live.leave": "Bunun yerine mesaj b\u0131rak",
|
|
1016
|
+
"live.end": "Sohbeti bitir",
|
|
1017
|
+
"live.joined": "{name} sohbete kat\u0131ld\u0131",
|
|
1018
|
+
"live.with": "G\xF6r\xFC\u015Ft\xFC\u011F\xFCn\xFCz ki\u015Fi: {name}",
|
|
1019
|
+
"live.agent": "Temsilci",
|
|
1020
|
+
"live.typing": "Yan\u0131t yaz\u0131yor...",
|
|
1021
|
+
"live.ended": "Sohbet sona erdi",
|
|
1022
|
+
"live.ticket": "Mesaj\u0131n\u0131z\u0131 ald\u0131k, en k\u0131sa s\xFCrede size d\xF6nece\u011Fiz.",
|
|
1023
|
+
"live.timeout": "Zaman\u0131nda m\xFCsait temsilci olmad\u0131, bu y\xFCzden sohbetinizi talep olarak kaydettik.",
|
|
1024
|
+
"live.number": "Talep no. {number}",
|
|
1025
|
+
"live.closed": "Temsilcilerimiz \u015Fu anda m\xFCsait de\u011Fil. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
1026
|
+
"live.closedUntil": "Temsilcilerimiz \u015Fu anda m\xFCsait de\u011Fil, {time} itibar\u0131yla d\xF6necekler. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
1027
|
+
"live.busy": "T\xFCm temsilcilerimiz \u015Fu anda me\u015Fgul. Mesaj b\u0131rak\u0131n, size d\xF6nelim.",
|
|
1028
|
+
"live.failed": "Mesaj g\xF6nderilemedi. Tekrar denemek i\xE7in dokunun.",
|
|
1029
|
+
"live.back": "Bota d\xF6n",
|
|
1030
|
+
"live.reconnecting": "Yeniden ba\u011Flan\u0131yor...",
|
|
1031
|
+
"live.tooLong": "Mesajlar en fazla 2000 karakter olabilir.",
|
|
1032
|
+
"live.elsewhere": "Ba\u015Fka bir pencerede zaten a\xE7\u0131k bir sohbetiniz var.",
|
|
1033
|
+
"live.replaced": "Bu sohbet ba\u015Fka bir pencerede devam ediyor.",
|
|
1034
|
+
"live.placeholder": "Bir mesaj yaz\u0131n..."
|
|
736
1035
|
};
|
|
737
1036
|
|
|
738
1037
|
// i18n/th.json
|
|
@@ -773,7 +1072,35 @@ var th_default = {
|
|
|
773
1072
|
"form.required": "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E23\u0E2D\u0E01",
|
|
774
1073
|
"form.contactRequired": "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E14\u0E49",
|
|
775
1074
|
"form.emailInvalid": "\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
776
|
-
"form.backToChat": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E0A\u0E15"
|
|
1075
|
+
"form.backToChat": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E0A\u0E15",
|
|
1076
|
+
"live.talk": "\u0E04\u0E38\u0E22\u0E01\u0E31\u0E1A\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1077
|
+
"live.intro": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E1D\u0E32\u0E01\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E44\u0E27\u0E49 \u0E40\u0E1C\u0E37\u0E48\u0E2D\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1078
|
+
"live.department": "\u0E41\u0E1C\u0E19\u0E01",
|
|
1079
|
+
"live.message": "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 (\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",
|
|
1080
|
+
"live.start": "\u0E40\u0E23\u0E34\u0E48\u0E21\u0E41\u0E0A\u0E17",
|
|
1081
|
+
"live.connecting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D...",
|
|
1082
|
+
"live.waiting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1083
|
+
"live.waitingLeft": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E23\u0E2D\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48 ({time})",
|
|
1084
|
+
"live.leave": "\u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E17\u0E19",
|
|
1085
|
+
"live.end": "\u0E08\u0E1A\u0E01\u0E32\u0E23\u0E41\u0E0A\u0E17",
|
|
1086
|
+
"live.joined": "{name} \u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E41\u0E0A\u0E17\u0E41\u0E25\u0E49\u0E27",
|
|
1087
|
+
"live.with": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E38\u0E22\u0E01\u0E31\u0E1A {name}",
|
|
1088
|
+
"live.agent": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48",
|
|
1089
|
+
"live.typing": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E15\u0E2D\u0E1A...",
|
|
1090
|
+
"live.ended": "\u0E01\u0E32\u0E23\u0E41\u0E0A\u0E17\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14\u0E41\u0E25\u0E49\u0E27",
|
|
1091
|
+
"live.ticket": "\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E41\u0E25\u0E49\u0E27 \u0E41\u0E25\u0E30\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A\u0E42\u0E14\u0E22\u0E40\u0E23\u0E47\u0E27",
|
|
1092
|
+
"live.timeout": "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E27\u0E48\u0E32\u0E07\u0E17\u0E31\u0E19\u0E40\u0E27\u0E25\u0E32 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E0A\u0E17\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E33\u0E02\u0E2D",
|
|
1093
|
+
"live.number": "\u0E04\u0E33\u0E02\u0E2D\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02 {number}",
|
|
1094
|
+
"live.closed": "\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23 \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1095
|
+
"live.closedUntil": "\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E43\u0E2B\u0E49\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E08\u0E30\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E40\u0E27\u0E25\u0E32 {time} \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1096
|
+
"live.busy": "\u0E40\u0E08\u0E49\u0E32\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E17\u0E38\u0E01\u0E04\u0E19\u0E44\u0E21\u0E48\u0E27\u0E48\u0E32\u0E07\u0E43\u0E19\u0E02\u0E13\u0E30\u0E19\u0E35\u0E49 \u0E1D\u0E32\u0E01\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E27\u0E49 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E01\u0E25\u0E31\u0E1A",
|
|
1097
|
+
"live.failed": "\u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E44\u0E21\u0E48\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E41\u0E15\u0E30\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
1098
|
+
"live.back": "\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E1A\u0E2D\u0E17",
|
|
1099
|
+
"live.reconnecting": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E43\u0E2B\u0E21\u0E48...",
|
|
1100
|
+
"live.tooLong": "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 2000 \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
1101
|
+
"live.elsewhere": "\u0E04\u0E38\u0E13\u0E21\u0E35\u0E41\u0E0A\u0E17\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E15\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19",
|
|
1102
|
+
"live.replaced": "\u0E41\u0E0A\u0E17\u0E19\u0E35\u0E49\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E15\u0E48\u0E2D\u0E43\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E15\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19",
|
|
1103
|
+
"live.placeholder": "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21..."
|
|
777
1104
|
};
|
|
778
1105
|
|
|
779
1106
|
// src/i18n.ts
|
|
@@ -883,15 +1210,16 @@ function transcriptOf(state) {
|
|
|
883
1210
|
at: new Date(m.at).toISOString()
|
|
884
1211
|
}));
|
|
885
1212
|
}
|
|
886
|
-
function toContact(state, prefill) {
|
|
1213
|
+
function toContact(state, prefill, live) {
|
|
887
1214
|
const script = state.lastScriptId ? state.scripts[state.lastScriptId] : null;
|
|
888
1215
|
const effect = {
|
|
889
|
-
type: "contact",
|
|
1216
|
+
type: live ? "live" : "contact",
|
|
890
1217
|
contactTopicId: (script == null ? void 0 : script.content.contactTopicId) || null,
|
|
891
1218
|
scriptId: state.lastScriptId,
|
|
892
1219
|
prefill: prefill || "",
|
|
893
1220
|
transcript: transcriptOf(state)
|
|
894
1221
|
};
|
|
1222
|
+
if (live) return { state: { ...state, outcome: "contact", chips: [homeChip(state)] }, effect };
|
|
895
1223
|
const next = say({ ...state, outcome: "contact" }, "bot", T(state)["chat.openingContact"]);
|
|
896
1224
|
return { state: { ...next, chips: [homeChip(next)] }, effect };
|
|
897
1225
|
}
|
|
@@ -955,6 +1283,8 @@ function pressChip(state, chip) {
|
|
|
955
1283
|
case "no":
|
|
956
1284
|
case "contact":
|
|
957
1285
|
return toContact(next, chip.prefill);
|
|
1286
|
+
case "live":
|
|
1287
|
+
return toContact(next, chip.prefill, true);
|
|
958
1288
|
case "pick":
|
|
959
1289
|
return chip.target ? { state: goToStep(next, chip.target.scriptId, chip.target.stepId, "text") } : { state: showMenu(next, "home") };
|
|
960
1290
|
case "button":
|
|
@@ -1047,10 +1377,139 @@ function eventsPayload(state, sessionId, releaseVersion, startedAt) {
|
|
|
1047
1377
|
unmatched: state.unmatched.slice(-20)
|
|
1048
1378
|
};
|
|
1049
1379
|
}
|
|
1380
|
+
|
|
1381
|
+
// src/live.ts
|
|
1382
|
+
var LIVE_MESSAGE_MAX = 2e3;
|
|
1383
|
+
var LIVE_TYPING_INTERVAL_MS = 3e3;
|
|
1384
|
+
var LIVE_TYPING_HIDE_MS = 6e3;
|
|
1385
|
+
var LIVE_AVAILABILITY_TTL_MS = 3e4;
|
|
1386
|
+
var BACKOFF_S = [1, 2, 4, 8, 16, 30];
|
|
1387
|
+
var ID_RE = /^[A-Za-z0-9_-]{8,64}$/;
|
|
1388
|
+
var isLiveFinal = (state) => state === "closed" || state === "ticket";
|
|
1389
|
+
var isLiveClientId = (id) => typeof id === "string" && ID_RE.test(id);
|
|
1390
|
+
function liveBackoff(attempt, random = Math.random) {
|
|
1391
|
+
const base = BACKOFF_S[Math.min(Math.max(0, Math.floor(attempt) || 0), BACKOFF_S.length - 1)] * 1e3;
|
|
1392
|
+
return Math.round(base * (0.7 + 0.6 * random()));
|
|
1393
|
+
}
|
|
1394
|
+
function liveStart(conversation) {
|
|
1395
|
+
return { conversation, events: [], lastSeq: 0, pending: [] };
|
|
1396
|
+
}
|
|
1397
|
+
function liveApplyConversation(chat, conversation) {
|
|
1398
|
+
if (!conversation || conversation.id !== chat.conversation.id) return chat;
|
|
1399
|
+
const cur = chat.conversation;
|
|
1400
|
+
if (isLiveFinal(cur.state) && !isLiveFinal(conversation.state)) return chat;
|
|
1401
|
+
const ticket = conversation.ticket || cur.ticket;
|
|
1402
|
+
const merged = ticket && cur.ticket && cur.ticket.number != null && (!conversation.ticket || conversation.ticket.number == null) ? { ...ticket, number: cur.ticket.number } : ticket;
|
|
1403
|
+
return { ...chat, conversation: { ...conversation, ticket: merged != null ? merged : null } };
|
|
1404
|
+
}
|
|
1405
|
+
function liveApplyEvent(chat, event) {
|
|
1406
|
+
if (!event || typeof event.seq !== "number" || !(event.seq > 0) || Math.floor(event.seq) !== event.seq) return chat;
|
|
1407
|
+
const seq = event.seq;
|
|
1408
|
+
const events = chat.events;
|
|
1409
|
+
if (events.some((e) => e.seq === seq)) return chat;
|
|
1410
|
+
let i = events.length;
|
|
1411
|
+
while (i > 0 && events[i - 1].seq > seq) i--;
|
|
1412
|
+
const nextEvents = [...events.slice(0, i), event, ...events.slice(i)];
|
|
1413
|
+
const pending = event.clientId ? chat.pending.filter((p) => p.clientId !== event.clientId) : chat.pending;
|
|
1414
|
+
let conversation = chat.conversation;
|
|
1415
|
+
const data = event.data || {};
|
|
1416
|
+
if (!isLiveFinal(conversation.state)) {
|
|
1417
|
+
if (event.type === "agent.joined") {
|
|
1418
|
+
const agent = data.agent || {};
|
|
1419
|
+
conversation = { ...conversation, state: "active", agent: { name: agent.name } };
|
|
1420
|
+
} else if (event.type === "conversation.closed") {
|
|
1421
|
+
conversation = { ...conversation, state: "closed", closeReason: data.reason || null };
|
|
1422
|
+
} else if (event.type === "conversation.ticket") {
|
|
1423
|
+
const number = typeof data.ticketNumber === "number" ? data.ticketNumber : null;
|
|
1424
|
+
conversation = { ...conversation, state: "ticket", ticket: { number, reason: data.reason } };
|
|
1425
|
+
}
|
|
1426
|
+
} else if (event.type === "conversation.ticket" && conversation.ticket && conversation.ticket.number == null && typeof data.ticketNumber === "number") {
|
|
1427
|
+
conversation = { ...conversation, ticket: { ...conversation.ticket, number: data.ticketNumber } };
|
|
1428
|
+
}
|
|
1429
|
+
return { conversation, events: nextEvents, lastSeq: Math.max(chat.lastSeq, seq), pending };
|
|
1430
|
+
}
|
|
1431
|
+
function liveApplySync(chat, sync) {
|
|
1432
|
+
let next = liveApplyConversation(chat, sync.conversation);
|
|
1433
|
+
for (const e of sync.events || []) next = liveApplyEvent(next, e);
|
|
1434
|
+
return next;
|
|
1435
|
+
}
|
|
1436
|
+
function liveAddPending(chat, clientId, text, at) {
|
|
1437
|
+
if (chat.pending.some((p) => p.clientId === clientId) || chat.events.some((e) => e.clientId === clientId)) return chat;
|
|
1438
|
+
return { ...chat, pending: [...chat.pending, { clientId, text, at, status: "sending" }] };
|
|
1439
|
+
}
|
|
1440
|
+
function liveSetPending(chat, clientId, status) {
|
|
1441
|
+
if (!chat.pending.some((p) => p.clientId === clientId)) return chat;
|
|
1442
|
+
const pending = status ? chat.pending.map((p) => p.clientId === clientId ? { ...p, status } : p) : chat.pending.filter((p) => p.clientId !== clientId);
|
|
1443
|
+
return { ...chat, pending };
|
|
1444
|
+
}
|
|
1445
|
+
function liveLines(chat, t) {
|
|
1446
|
+
var _a;
|
|
1447
|
+
const lines = [];
|
|
1448
|
+
for (const e of chat.events) {
|
|
1449
|
+
const key = `e${e.seq}`;
|
|
1450
|
+
const data = e.data || {};
|
|
1451
|
+
if (e.type === "message") {
|
|
1452
|
+
const kind = e.author && (e.author.kind === "visitor" || e.author.kind === "agent") ? e.author.kind : "system";
|
|
1453
|
+
const line = { key, kind, text: String((_a = e.text) != null ? _a : "") };
|
|
1454
|
+
if (kind === "agent") line.name = e.author.name || t["live.agent"];
|
|
1455
|
+
lines.push(line);
|
|
1456
|
+
} else if (e.type === "agent.joined") {
|
|
1457
|
+
const agent = data.agent || {};
|
|
1458
|
+
lines.push({ key, kind: "system", text: format(t["live.joined"], { name: agent.name || t["live.agent"] }) });
|
|
1459
|
+
} else if (e.type === "conversation.closed") {
|
|
1460
|
+
lines.push({ key, kind: "system", text: t["live.ended"] });
|
|
1461
|
+
} else if (e.type === "conversation.ticket") {
|
|
1462
|
+
const n = data.ticketNumber;
|
|
1463
|
+
lines.push({ key, kind: "system", text: typeof n === "number" ? `${t["live.ticket"]} ${format(t["live.number"], { number: n })}` : t["live.ticket"] });
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
for (const p of chat.pending) lines.push({ key: `p${p.clientId}`, kind: "visitor", text: p.text, status: p.status, clientId: p.clientId });
|
|
1467
|
+
return lines;
|
|
1468
|
+
}
|
|
1469
|
+
function liveWaitLeft(conversation, now) {
|
|
1470
|
+
if (conversation.state !== "queued" || !conversation.queueDeadline) return null;
|
|
1471
|
+
const end = Date.parse(conversation.queueDeadline);
|
|
1472
|
+
if (!isFinite(end)) return null;
|
|
1473
|
+
return Math.max(0, Math.ceil((end - now) / 1e3));
|
|
1474
|
+
}
|
|
1475
|
+
var liveClock = (seconds) => `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
|
|
1476
|
+
function liveStatus(conversation, t, now) {
|
|
1477
|
+
switch (conversation.state) {
|
|
1478
|
+
case "queued": {
|
|
1479
|
+
const left = liveWaitLeft(conversation, now);
|
|
1480
|
+
return left === null ? t["live.waiting"] : format(t["live.waitingLeft"], { time: liveClock(left) });
|
|
1481
|
+
}
|
|
1482
|
+
case "active":
|
|
1483
|
+
return format(t["live.with"], { name: conversation.agent && conversation.agent.name || t["live.agent"] });
|
|
1484
|
+
case "ticket": {
|
|
1485
|
+
const n = conversation.ticket ? conversation.ticket.number : null;
|
|
1486
|
+
const parts = [conversation.ticket && conversation.ticket.reason === "timeout" ? t["live.timeout"] : "", t["live.ticket"], n != null ? format(t["live.number"], { number: n }) : ""];
|
|
1487
|
+
return parts.filter(Boolean).join(" ");
|
|
1488
|
+
}
|
|
1489
|
+
default:
|
|
1490
|
+
return t["live.ended"];
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
function liveUnavailableText(reason, t, time) {
|
|
1494
|
+
if (reason === "closed") return time ? format(t["live.closedUntil"], { time }) : t["live.closed"];
|
|
1495
|
+
if (reason === "no_agents") return t["live.busy"];
|
|
1496
|
+
return "";
|
|
1497
|
+
}
|
|
1498
|
+
function withLiveChip(chips, label) {
|
|
1499
|
+
const i = chips.findIndex((c) => c.kind === "contact");
|
|
1500
|
+
if (i < 0 || chips.some((c) => c.kind === "live")) return chips;
|
|
1501
|
+
const contact = chips[i];
|
|
1502
|
+
const chip = { id: "live", label, kind: "live", ...contact.prefill ? { prefill: contact.prefill } : {} };
|
|
1503
|
+
return [...chips.slice(0, i), chip, ...chips.slice(i)];
|
|
1504
|
+
}
|
|
1050
1505
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1051
1506
|
0 && (module.exports = {
|
|
1052
1507
|
AI_ANSWER_MAX,
|
|
1053
1508
|
AI_QUESTION_MAX,
|
|
1509
|
+
LIVE_AVAILABILITY_TTL_MS,
|
|
1510
|
+
LIVE_MESSAGE_MAX,
|
|
1511
|
+
LIVE_TYPING_HIDE_MS,
|
|
1512
|
+
LIVE_TYPING_INTERVAL_MS,
|
|
1054
1513
|
RTL_LOCALES,
|
|
1055
1514
|
SUPPORTED_LOCALES,
|
|
1056
1515
|
UI_TEXTS,
|
|
@@ -1060,9 +1519,23 @@ function eventsPayload(state, sessionId, releaseVersion, startedAt) {
|
|
|
1060
1519
|
eventsPayload,
|
|
1061
1520
|
format,
|
|
1062
1521
|
groupKey,
|
|
1522
|
+
isLiveClientId,
|
|
1523
|
+
isLiveFinal,
|
|
1063
1524
|
isRtl,
|
|
1064
1525
|
isSpacelessScript,
|
|
1065
1526
|
keyTerms,
|
|
1527
|
+
liveAddPending,
|
|
1528
|
+
liveApplyConversation,
|
|
1529
|
+
liveApplyEvent,
|
|
1530
|
+
liveApplySync,
|
|
1531
|
+
liveBackoff,
|
|
1532
|
+
liveClock,
|
|
1533
|
+
liveLines,
|
|
1534
|
+
liveSetPending,
|
|
1535
|
+
liveStart,
|
|
1536
|
+
liveStatus,
|
|
1537
|
+
liveUnavailableText,
|
|
1538
|
+
liveWaitLeft,
|
|
1066
1539
|
matchQuestion,
|
|
1067
1540
|
normalizeWords,
|
|
1068
1541
|
pendingQuestion,
|
|
@@ -1073,5 +1546,6 @@ function eventsPayload(state, sessionId, releaseVersion, startedAt) {
|
|
|
1073
1546
|
toBubbles,
|
|
1074
1547
|
transcriptOf,
|
|
1075
1548
|
uiTexts,
|
|
1549
|
+
withLiveChip,
|
|
1076
1550
|
withinOneEdit
|
|
1077
1551
|
});
|