@opencxh/domain 1.224.0 → 1.226.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/activity/types.d.ts +21 -1
- package/dist/entities/mcp/types.d.ts +14 -0
- package/dist/entities/playbook/trigger-vars.d.ts +9 -0
- package/dist/entities/sla/hours.d.ts +7 -0
- package/dist/entities/sla/hours.test.d.ts +1 -0
- package/dist/entities/sla/index.d.ts +4 -0
- package/dist/entities/sla/machine.d.ts +47 -0
- package/dist/entities/sla/machine.test.d.ts +1 -0
- package/dist/entities/sla/types.d.ts +107 -0
- package/dist/entities/sla/view.d.ts +36 -0
- package/dist/entities/sla/view.test.d.ts +1 -0
- package/dist/entities/work/types.d.ts +5 -0
- package/dist/index.cjs +14 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1335 -1102
- package/dist/platform/provider.d.ts +11 -0
- package/dist/platform/storage.d.ts +281 -4
- package/dist/platform/sync-source.d.ts +90 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const hi = 10, yi = 10, bi = 10, Ai = 5, ht = /* @__PURE__ */ new Set([
|
|
2
2
|
"header",
|
|
3
3
|
"section",
|
|
4
4
|
"context",
|
|
@@ -8,13 +8,13 @@ const Ur = 10, Kr = 10, jr = 10, Br = 5, ze = /* @__PURE__ */ new Set([
|
|
|
8
8
|
"actions",
|
|
9
9
|
"attachments"
|
|
10
10
|
]);
|
|
11
|
-
function
|
|
11
|
+
function j(e) {
|
|
12
12
|
if (typeof e == "string") return e.length > 0;
|
|
13
13
|
if (!e || typeof e != "object") return !1;
|
|
14
14
|
const t = e;
|
|
15
15
|
return typeof t.key == "string" || typeof t.value == "string";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Ei(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -25,19 +25,19 @@ function Hr(e, t = () => {
|
|
|
25
25
|
}
|
|
26
26
|
if (!r || typeof r != "object") continue;
|
|
27
27
|
const i = r;
|
|
28
|
-
if (!
|
|
28
|
+
if (!ht.has(i.type)) {
|
|
29
29
|
t(`unknown block type ${String(i.type)}`);
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
32
|
switch (i.type) {
|
|
33
33
|
case "header":
|
|
34
|
-
if (!
|
|
34
|
+
if (!j(i.text)) {
|
|
35
35
|
t("a header without text");
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
break;
|
|
39
39
|
case "context":
|
|
40
|
-
if (!
|
|
40
|
+
if (!j(i.text)) {
|
|
41
41
|
t("a context block without text");
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
@@ -59,7 +59,7 @@ function Hr(e, t = () => {
|
|
|
59
59
|
i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
|
|
60
60
|
break;
|
|
61
61
|
case "actions": {
|
|
62
|
-
const o = Array.isArray(i.elements) ? i.elements : [], a = o.filter((s) => s?.action_id && s.invoke &&
|
|
62
|
+
const o = Array.isArray(i.elements) ? i.elements : [], a = o.filter((s) => s?.action_id && s.invoke && j(s.text));
|
|
63
63
|
if (a.length !== o.length && t("an action without action_id, invoke or text"), a.length === 0) continue;
|
|
64
64
|
a.length > 5 && t("more than 5 actions"), i.elements = a.slice(0, 5);
|
|
65
65
|
break;
|
|
@@ -69,44 +69,44 @@ function Hr(e, t = () => {
|
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
function
|
|
72
|
+
const yt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, bt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
|
|
73
|
+
function At(e) {
|
|
74
74
|
if (typeof e != "string" || !e) return "";
|
|
75
75
|
let t = e;
|
|
76
76
|
return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
|
|
77
77
|
`).map(
|
|
78
78
|
(n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
|
|
79
79
|
).join(`
|
|
80
|
-
`), t = t.replace(
|
|
80
|
+
`), t = t.replace(yt, "$2"), t = t.replace(bt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Et(e) {
|
|
83
83
|
return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/ /g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/\s+/g, " ").trim();
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function R(e) {
|
|
86
86
|
if (!e || e < 0) return "";
|
|
87
87
|
const t = Math.floor(e / 60), n = Math.floor(e % 60);
|
|
88
88
|
return `${t}:${n.toString().padStart(2, "0")}`;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function se(e) {
|
|
91
91
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function H(e) {
|
|
94
94
|
return e?.split("@")?.[0] || e || "";
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function D(e) {
|
|
97
97
|
return e.map((t) => t.name).join(", ");
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function ce(e) {
|
|
100
100
|
return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const _ = {
|
|
103
103
|
/* ---- voice ---- */
|
|
104
104
|
VOICE_CALL_STARTED: {
|
|
105
105
|
shape: "event",
|
|
106
106
|
channelKind: "voice",
|
|
107
107
|
icon: "phone",
|
|
108
108
|
snippet: () => "Gesprek gestart",
|
|
109
|
-
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${
|
|
109
|
+
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${H(e.payload.from)}` : `Outbound call started — ${H(e.payload.to)}`
|
|
110
110
|
},
|
|
111
111
|
VOICE_CALL_ANSWERED: {
|
|
112
112
|
shape: "event",
|
|
@@ -133,15 +133,15 @@ const A = {
|
|
|
133
133
|
shape: "event",
|
|
134
134
|
channelKind: "voice",
|
|
135
135
|
icon: "phone",
|
|
136
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
137
|
-
timeline: (e) => `Call ended${
|
|
136
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
|
|
137
|
+
timeline: (e) => `Call ended${se(e.payload.duration)}`
|
|
138
138
|
},
|
|
139
139
|
VOICE_CALL_MISSED: {
|
|
140
140
|
shape: "event",
|
|
141
141
|
channelKind: "voice",
|
|
142
142
|
icon: "phone",
|
|
143
143
|
snippet: () => "Gemiste oproep",
|
|
144
|
-
timeline: (e) => `Missed call — ${
|
|
144
|
+
timeline: (e) => `Missed call — ${H(e.payload.from)}`
|
|
145
145
|
},
|
|
146
146
|
VOICE_CALL_FAILED: {
|
|
147
147
|
shape: "event",
|
|
@@ -188,7 +188,7 @@ const A = {
|
|
|
188
188
|
shape: "event",
|
|
189
189
|
channelKind: "video",
|
|
190
190
|
icon: "video",
|
|
191
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
191
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
|
|
192
192
|
timeline: () => "Video call ended"
|
|
193
193
|
},
|
|
194
194
|
VIDEO_CALL_MISSED: {
|
|
@@ -216,7 +216,7 @@ const A = {
|
|
|
216
216
|
replyable: !0,
|
|
217
217
|
carriesText: !0,
|
|
218
218
|
countsAs: "inbound_message",
|
|
219
|
-
snippet:
|
|
219
|
+
snippet: le
|
|
220
220
|
},
|
|
221
221
|
EMAIL_SENT: {
|
|
222
222
|
shape: "message",
|
|
@@ -226,7 +226,7 @@ const A = {
|
|
|
226
226
|
replyable: !0,
|
|
227
227
|
carriesText: !0,
|
|
228
228
|
countsAs: "outbound_message",
|
|
229
|
-
snippet:
|
|
229
|
+
snippet: le
|
|
230
230
|
},
|
|
231
231
|
/* ---- chat ---- */
|
|
232
232
|
CHAT_MESSAGE_SENT: {
|
|
@@ -255,9 +255,9 @@ const A = {
|
|
|
255
255
|
shape: "event",
|
|
256
256
|
channelKind: "chat",
|
|
257
257
|
icon: "message-circle",
|
|
258
|
-
snippet: (e) => `${
|
|
258
|
+
snippet: (e) => `${D(e.payload.members)} toegevoegd`,
|
|
259
259
|
timeline: (e) => {
|
|
260
|
-
const t =
|
|
260
|
+
const t = D(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
|
|
261
261
|
return `${t} joined the chat${n}`;
|
|
262
262
|
}
|
|
263
263
|
},
|
|
@@ -265,9 +265,9 @@ const A = {
|
|
|
265
265
|
shape: "event",
|
|
266
266
|
channelKind: "chat",
|
|
267
267
|
icon: "message-circle",
|
|
268
|
-
snippet: (e) => `${
|
|
268
|
+
snippet: (e) => `${D(e.payload.members)} verlaten`,
|
|
269
269
|
timeline: (e) => {
|
|
270
|
-
const t =
|
|
270
|
+
const t = D(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
|
|
271
271
|
return `${t} left the chat${n}`;
|
|
272
272
|
}
|
|
273
273
|
},
|
|
@@ -283,15 +283,15 @@ const A = {
|
|
|
283
283
|
channelKind: "chat",
|
|
284
284
|
icon: "message-circle",
|
|
285
285
|
snippet: () => "Gesprek gestart",
|
|
286
|
-
timeline: (e) => `${
|
|
286
|
+
timeline: (e) => `${ce(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
|
|
287
287
|
joinUrl: (e) => e.payload.joinUrl
|
|
288
288
|
},
|
|
289
289
|
CHAT_CALL_ENDED: {
|
|
290
290
|
shape: "event",
|
|
291
291
|
channelKind: "chat",
|
|
292
292
|
icon: "message-circle",
|
|
293
|
-
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${
|
|
294
|
-
timeline: (e) => `${
|
|
293
|
+
snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
|
|
294
|
+
timeline: (e) => `${ce(e.payload.callType)} ended${se(e.payload.duration)}`,
|
|
295
295
|
joinUrl: (e) => e.payload.joinUrl
|
|
296
296
|
},
|
|
297
297
|
CHAT_EVENT: {
|
|
@@ -380,7 +380,7 @@ const A = {
|
|
|
380
380
|
MEETING_ENDED: {
|
|
381
381
|
shape: "event",
|
|
382
382
|
icon: "calendar",
|
|
383
|
-
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${
|
|
383
|
+
snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
|
|
384
384
|
timeline: () => "Meeting ended"
|
|
385
385
|
},
|
|
386
386
|
MEETING_PARTICIPANT_JOINED: {
|
|
@@ -416,6 +416,18 @@ const A = {
|
|
|
416
416
|
snippet: () => "Interactie toegewezen",
|
|
417
417
|
timeline: (e, t) => `Assigned by ${t}`
|
|
418
418
|
},
|
|
419
|
+
/**
|
|
420
|
+
* `triggerable`, and that is the point: escalation on a breach is an ordinary playbook rule
|
|
421
|
+
* on an ordinary activity trigger, so the engine needed no new trigger kind.
|
|
422
|
+
*/
|
|
423
|
+
SLA_BREACHED: {
|
|
424
|
+
shape: "event",
|
|
425
|
+
triggerable: !0,
|
|
426
|
+
displayNameKey: "communication:activity.SLA_BREACHED",
|
|
427
|
+
icon: "alarm-clock",
|
|
428
|
+
snippet: (e) => `SLA verlopen: ${e.payload.metric}`,
|
|
429
|
+
timeline: (e) => `SLA target ${e.payload.metric} passed its deadline`
|
|
430
|
+
},
|
|
419
431
|
/* ---- work items ---- */
|
|
420
432
|
/**
|
|
421
433
|
* `shape: "note"` is load-bearing: it makes `isMessageShape` → `isMessageType` →
|
|
@@ -448,63 +460,63 @@ const A = {
|
|
|
448
460
|
timeline: (e, t) => `Status changed by ${t}`
|
|
449
461
|
}
|
|
450
462
|
};
|
|
451
|
-
function
|
|
452
|
-
const t = e.payload, n =
|
|
463
|
+
function le(e) {
|
|
464
|
+
const t = e.payload, n = At(t.bodyText).trim() || t.bodySnippet?.trim() || Et(t.body ?? "");
|
|
453
465
|
return t.subject ? `${t.subject} — ${n}` : n;
|
|
454
466
|
}
|
|
455
|
-
function
|
|
456
|
-
return
|
|
467
|
+
function b(e) {
|
|
468
|
+
return _[e];
|
|
457
469
|
}
|
|
458
|
-
function
|
|
459
|
-
return
|
|
470
|
+
function Si(e) {
|
|
471
|
+
return b(e)?.icon ?? "circle";
|
|
460
472
|
}
|
|
461
|
-
function
|
|
462
|
-
return
|
|
473
|
+
function _i(e) {
|
|
474
|
+
return b(e)?.channelKind;
|
|
463
475
|
}
|
|
464
|
-
function
|
|
476
|
+
function Be(e) {
|
|
465
477
|
return e === "message" || e === "note";
|
|
466
478
|
}
|
|
467
|
-
function
|
|
468
|
-
return
|
|
479
|
+
function Ti(e) {
|
|
480
|
+
return Be(b(e)?.shape);
|
|
469
481
|
}
|
|
470
|
-
function
|
|
482
|
+
function je(e) {
|
|
471
483
|
return e === "note";
|
|
472
484
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
485
|
+
function wi(e) {
|
|
486
|
+
return je(b(e)?.shape);
|
|
475
487
|
}
|
|
476
|
-
function
|
|
477
|
-
return
|
|
488
|
+
function Ii(e) {
|
|
489
|
+
return b(e)?.replyable === !0;
|
|
478
490
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
491
|
+
function Mi(e) {
|
|
492
|
+
return b(e)?.carriesText === !0;
|
|
481
493
|
}
|
|
482
|
-
function
|
|
483
|
-
return
|
|
494
|
+
function St(e) {
|
|
495
|
+
return b(e)?.countsAs;
|
|
484
496
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
497
|
+
function Oi(e) {
|
|
498
|
+
return b(e)?.playbookAuthored === !0;
|
|
487
499
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
500
|
+
function Ci(e) {
|
|
501
|
+
return b(e)?.connected === !0;
|
|
490
502
|
}
|
|
491
|
-
function
|
|
492
|
-
const t =
|
|
503
|
+
function ki(e) {
|
|
504
|
+
const t = b(e);
|
|
493
505
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
494
506
|
}
|
|
495
|
-
function
|
|
496
|
-
const t =
|
|
507
|
+
function _t(e) {
|
|
508
|
+
const t = b(e.type)?.snippet;
|
|
497
509
|
return t ? t(e) : "";
|
|
498
510
|
}
|
|
499
|
-
function
|
|
500
|
-
const n =
|
|
511
|
+
function vi(e, t) {
|
|
512
|
+
const n = b(e.type)?.timeline;
|
|
501
513
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
502
514
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
515
|
+
function xi(e) {
|
|
516
|
+
const t = b(e.type)?.joinUrl;
|
|
505
517
|
return t ? t(e) : void 0;
|
|
506
518
|
}
|
|
507
|
-
function
|
|
519
|
+
function X(e, t) {
|
|
508
520
|
let n = e;
|
|
509
521
|
for (const r of t.split(".")) {
|
|
510
522
|
if (n == null || typeof n != "object") return "";
|
|
@@ -512,44 +524,44 @@ function j(e, t) {
|
|
|
512
524
|
}
|
|
513
525
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
514
526
|
}
|
|
515
|
-
function
|
|
527
|
+
function Y(e, t, n) {
|
|
516
528
|
if (e === void 0) return null;
|
|
517
529
|
if (typeof e == "string") return e || null;
|
|
518
530
|
if ("value" in e)
|
|
519
|
-
return
|
|
531
|
+
return X(t, e.value) || null;
|
|
520
532
|
const r = {};
|
|
521
533
|
for (const [o, a] of Object.entries(e.params ?? {}))
|
|
522
|
-
r[o] =
|
|
534
|
+
r[o] = X(t, a);
|
|
523
535
|
const i = n(e.key, r);
|
|
524
536
|
return i === e.key ? null : i;
|
|
525
537
|
}
|
|
526
|
-
function
|
|
538
|
+
function Tt(e, t) {
|
|
527
539
|
if (!e || typeof e == "string" || "value" in e) return null;
|
|
528
540
|
const n = {};
|
|
529
541
|
for (const [r, i] of Object.entries(e.params ?? {}))
|
|
530
|
-
n[r] =
|
|
542
|
+
n[r] = X(t, i);
|
|
531
543
|
return { key: e.key, params: n };
|
|
532
544
|
}
|
|
533
|
-
const
|
|
534
|
-
function
|
|
545
|
+
const ue = 140;
|
|
546
|
+
function wt(e) {
|
|
535
547
|
const t = e.trim();
|
|
536
|
-
return t.length <=
|
|
548
|
+
return t.length <= ue ? t : `${t.slice(0, ue - 1).trimEnd()}…`;
|
|
537
549
|
}
|
|
538
|
-
function
|
|
539
|
-
const n =
|
|
550
|
+
function Ni(e, t) {
|
|
551
|
+
const n = Tt(t?.text, e), r = t ? Y(t.text, e, (i) => i) : null;
|
|
540
552
|
return {
|
|
541
553
|
activityId: e.id,
|
|
542
554
|
type: e.type,
|
|
543
|
-
snippet:
|
|
555
|
+
snippet: wt(r ?? _t(e)),
|
|
544
556
|
authorName: e.author?.name ?? "",
|
|
545
557
|
direction: e.direction,
|
|
546
558
|
createdAt: e.createdAt ?? Date.now(),
|
|
547
559
|
...n ? { snippetKey: n.key, snippetParams: n.params } : {}
|
|
548
560
|
};
|
|
549
561
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
552
|
-
const t =
|
|
562
|
+
const It = (e) => e;
|
|
563
|
+
function de(e) {
|
|
564
|
+
const t = _[e];
|
|
553
565
|
return {
|
|
554
566
|
type: e,
|
|
555
567
|
shape: t.shape,
|
|
@@ -564,7 +576,7 @@ function Y(e) {
|
|
|
564
576
|
displayNameKey: t.displayNameKey
|
|
565
577
|
};
|
|
566
578
|
}
|
|
567
|
-
function
|
|
579
|
+
function pe(e) {
|
|
568
580
|
return {
|
|
569
581
|
type: e.type,
|
|
570
582
|
shape: e.shape,
|
|
@@ -579,21 +591,21 @@ function q(e) {
|
|
|
579
591
|
displayNameKey: e.displayNameKey
|
|
580
592
|
};
|
|
581
593
|
}
|
|
582
|
-
class
|
|
583
|
-
constructor(t = [], n =
|
|
594
|
+
class Mt {
|
|
595
|
+
constructor(t = [], n = It) {
|
|
584
596
|
this.translate = n;
|
|
585
597
|
for (const r of t)
|
|
586
|
-
r?.type && (r.type in
|
|
598
|
+
r?.type && (r.type in _ || this.declared.has(r.type) || this.declared.set(r.type, r));
|
|
587
599
|
}
|
|
588
600
|
declared = /* @__PURE__ */ new Map();
|
|
589
601
|
get(t) {
|
|
590
|
-
if (t in
|
|
602
|
+
if (t in _) return de(t);
|
|
591
603
|
const n = this.declared.get(t);
|
|
592
|
-
return n ?
|
|
604
|
+
return n ? pe(n) : void 0;
|
|
593
605
|
}
|
|
594
606
|
/** Everything that may be offered as a trigger, built-in and declared. */
|
|
595
607
|
triggerable() {
|
|
596
|
-
const t = Object.keys(
|
|
608
|
+
const t = Object.keys(_).filter((r) => _[r].triggerable).map(de), n = [...this.declared.values()].map(pe).filter((r) => r.triggerable);
|
|
597
609
|
return [...t, ...n];
|
|
598
610
|
}
|
|
599
611
|
/**
|
|
@@ -602,17 +614,17 @@ class rt {
|
|
|
602
614
|
* the feed always showed for unknown types.
|
|
603
615
|
*/
|
|
604
616
|
timelineText(t, n) {
|
|
605
|
-
const r =
|
|
617
|
+
const r = _[t.type];
|
|
606
618
|
if (r?.timeline) return r.timeline(t, n);
|
|
607
619
|
const i = this.declared.get(t.type);
|
|
608
|
-
return
|
|
620
|
+
return Y(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
|
|
609
621
|
}
|
|
610
622
|
/** The line for the inbox list. Empty when the type has nothing to show. */
|
|
611
623
|
snippet(t) {
|
|
612
|
-
const n =
|
|
624
|
+
const n = _[t.type];
|
|
613
625
|
if (n?.snippet) return n.snippet(t);
|
|
614
626
|
const r = this.declared.get(t.type);
|
|
615
|
-
return
|
|
627
|
+
return Y(r?.text, t, this.translate) ?? "";
|
|
616
628
|
}
|
|
617
629
|
/** The descriptor as it arrived; needed to store `text` as a key. */
|
|
618
630
|
descriptor(t) {
|
|
@@ -637,11 +649,11 @@ class rt {
|
|
|
637
649
|
* {@link ResolvedActivityType}.
|
|
638
650
|
*/
|
|
639
651
|
isMessage(t) {
|
|
640
|
-
return
|
|
652
|
+
return Be(this.get(t)?.shape);
|
|
641
653
|
}
|
|
642
654
|
/** Folds into the list under the message it answers. See {@link isNoteShape}. */
|
|
643
655
|
nestsUnderParent(t) {
|
|
644
|
-
return
|
|
656
|
+
return je(this.get(t)?.shape);
|
|
645
657
|
}
|
|
646
658
|
/** Can a person reply to this? Notes cannot — those go nowhere. */
|
|
647
659
|
isReplyable(t) {
|
|
@@ -669,23 +681,23 @@ class rt {
|
|
|
669
681
|
return this.translate;
|
|
670
682
|
}
|
|
671
683
|
}
|
|
672
|
-
const
|
|
673
|
-
function
|
|
684
|
+
const Ri = new Mt();
|
|
685
|
+
function Di(e, t, n = []) {
|
|
674
686
|
const r = e.createdAt;
|
|
675
687
|
if (!r) return [];
|
|
676
688
|
const i = new Set(n);
|
|
677
689
|
return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([o, a]) => a >= r && !i.has(o)).map(([o]) => o);
|
|
678
690
|
}
|
|
679
|
-
function
|
|
691
|
+
function Ot(e) {
|
|
680
692
|
return e.createdAt ?? 0;
|
|
681
693
|
}
|
|
682
|
-
function
|
|
694
|
+
function $i(e) {
|
|
683
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
684
696
|
}
|
|
685
|
-
function
|
|
697
|
+
function Li(e) {
|
|
686
698
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
687
699
|
}
|
|
688
|
-
const
|
|
700
|
+
const He = [
|
|
689
701
|
{
|
|
690
702
|
id: "openai",
|
|
691
703
|
attachmentKinds: ["image", "pdf"],
|
|
@@ -775,45 +787,45 @@ const we = [
|
|
|
775
787
|
defaultModel: "default"
|
|
776
788
|
}
|
|
777
789
|
];
|
|
778
|
-
function
|
|
779
|
-
return
|
|
790
|
+
function K(e) {
|
|
791
|
+
return He.find((t) => t.id === e);
|
|
780
792
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
793
|
+
function Pi(e) {
|
|
794
|
+
return K(e)?.label ?? e;
|
|
783
795
|
}
|
|
784
|
-
function
|
|
785
|
-
return
|
|
796
|
+
function Ui(e, t = "gpt-5-mini") {
|
|
797
|
+
return K(e)?.defaultModel ?? t;
|
|
786
798
|
}
|
|
787
|
-
function
|
|
788
|
-
return
|
|
799
|
+
function Ki(e) {
|
|
800
|
+
return He.filter((t) => t.capabilities.includes(e));
|
|
789
801
|
}
|
|
790
|
-
function
|
|
791
|
-
const t =
|
|
802
|
+
function Bi(e) {
|
|
803
|
+
const t = K(e);
|
|
792
804
|
return !!t && !t.baseUrl;
|
|
793
805
|
}
|
|
794
|
-
function
|
|
795
|
-
return t === "text" ? !0 :
|
|
806
|
+
function ji(e, t) {
|
|
807
|
+
return t === "text" ? !0 : K(e)?.attachmentKinds?.includes(t) === !0;
|
|
796
808
|
}
|
|
797
|
-
function
|
|
809
|
+
function Hi(e, t) {
|
|
798
810
|
if (!e.enabled) return "ok";
|
|
799
|
-
const n =
|
|
811
|
+
const n = fe(e.hardLimitNanos), r = fe(e.softLimitNanos);
|
|
800
812
|
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
801
813
|
}
|
|
802
|
-
function
|
|
814
|
+
function fe(e) {
|
|
803
815
|
return typeof e == "number" ? e : void 0;
|
|
804
816
|
}
|
|
805
|
-
function
|
|
817
|
+
function Ct(e, t = "month") {
|
|
806
818
|
const n = new Date(e);
|
|
807
819
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
808
820
|
}
|
|
809
|
-
function
|
|
810
|
-
const n = new Date(
|
|
821
|
+
function Gi(e, t = "month") {
|
|
822
|
+
const n = new Date(Ct(e, t));
|
|
811
823
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
812
824
|
}
|
|
813
|
-
function
|
|
825
|
+
function Fi(e) {
|
|
814
826
|
return e?.listeningEnabled !== !1;
|
|
815
827
|
}
|
|
816
|
-
const
|
|
828
|
+
const Wi = [
|
|
817
829
|
{ id: "agent", label: "Agent", labelSource: "user" },
|
|
818
830
|
{ id: "team", label: "Team", labelSource: "team" },
|
|
819
831
|
{ id: "inbox", label: "Inbox", labelSource: "inbox" },
|
|
@@ -823,47 +835,47 @@ const fi = [
|
|
|
823
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
824
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
825
837
|
];
|
|
826
|
-
function
|
|
838
|
+
function G(e) {
|
|
827
839
|
return e < 10 ? `0${e}` : `${e}`;
|
|
828
840
|
}
|
|
829
|
-
function
|
|
830
|
-
const n = new Date(e), r = `${n.getUTCFullYear()}-${
|
|
831
|
-
return t === "day" ? r : `${r}T${
|
|
841
|
+
function kt(e, t) {
|
|
842
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${G(n.getUTCMonth() + 1)}-${G(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${G(n.getUTCHours())}`;
|
|
832
844
|
}
|
|
833
|
-
function
|
|
845
|
+
function vt(e, t) {
|
|
834
846
|
const n = new Date(e);
|
|
835
847
|
return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
|
|
836
848
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
const r = n === "hour" ?
|
|
840
|
-
for (let o =
|
|
841
|
-
i.push(
|
|
849
|
+
const xt = 36e5, Nt = 864e5;
|
|
850
|
+
function Vi(e, t, n) {
|
|
851
|
+
const r = n === "hour" ? xt : Nt, i = [];
|
|
852
|
+
for (let o = vt(e, n); o <= t; o += r)
|
|
853
|
+
i.push(kt(o, n));
|
|
842
854
|
return i;
|
|
843
855
|
}
|
|
844
|
-
const
|
|
856
|
+
const Rt = [
|
|
845
857
|
{ id: "resource", label: "Resource", labelSource: "raw" },
|
|
846
858
|
{ id: "origin", label: "Herkomst", labelSource: "raw" }
|
|
847
|
-
],
|
|
848
|
-
function
|
|
859
|
+
], Dt = Rt.map((e) => e.id);
|
|
860
|
+
function $t(e, t) {
|
|
849
861
|
return `${e}.usage.${t}`;
|
|
850
862
|
}
|
|
851
|
-
function
|
|
863
|
+
function zi(e, t) {
|
|
852
864
|
return t.map((n) => ({
|
|
853
|
-
id:
|
|
865
|
+
id: $t(e, n.unit),
|
|
854
866
|
label: n.label,
|
|
855
867
|
category: "Verbruik",
|
|
856
868
|
valueType: n.valueType ?? "count",
|
|
857
869
|
aggregation: "sum",
|
|
858
870
|
supportedDimensions: [
|
|
859
871
|
"provider",
|
|
860
|
-
...
|
|
872
|
+
...Dt,
|
|
861
873
|
...n.extraDimensions ?? [],
|
|
862
874
|
"time"
|
|
863
875
|
]
|
|
864
876
|
}));
|
|
865
877
|
}
|
|
866
|
-
const
|
|
878
|
+
const Ge = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), me = 200, ge = 100, he = 200, ye = 12, be = 4, Fe = 4e3, F = 500, Xi = 256 * 1024, Lt = /* @__PURE__ */ new Set([
|
|
867
879
|
"heading",
|
|
868
880
|
"paragraph",
|
|
869
881
|
"list",
|
|
@@ -873,15 +885,15 @@ const Ie = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
|
|
|
873
885
|
"table",
|
|
874
886
|
"kpi",
|
|
875
887
|
"callout"
|
|
876
|
-
]),
|
|
877
|
-
function
|
|
888
|
+
]), Pt = ["http:", "https:", "mailto:", "tel:"], Ut = /^[a-z][a-z0-9+.-]*:/i;
|
|
889
|
+
function We(e) {
|
|
878
890
|
const t = e.trim().replace(/^<|>$/g, "");
|
|
879
891
|
if (!t) return !1;
|
|
880
|
-
const n =
|
|
881
|
-
return n ?
|
|
892
|
+
const n = Ut.exec(t)?.[0];
|
|
893
|
+
return n ? Pt.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
882
894
|
}
|
|
883
|
-
const
|
|
884
|
-
function
|
|
895
|
+
const Kt = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
|
|
896
|
+
function Bt(e) {
|
|
885
897
|
let t = "", n = 0;
|
|
886
898
|
for (; n < e.length; ) {
|
|
887
899
|
const r = e[n] === "!" && e[n + 1] === "[";
|
|
@@ -889,22 +901,22 @@ function yt(e) {
|
|
|
889
901
|
t += e[n], n += 1;
|
|
890
902
|
continue;
|
|
891
903
|
}
|
|
892
|
-
const i = n + (r ? 2 : 1), o =
|
|
904
|
+
const i = n + (r ? 2 : 1), o = Ae(e, i, "[", "]");
|
|
893
905
|
if (o < 0 || e[o + 1] !== "(") {
|
|
894
906
|
t += e[n], n += 1;
|
|
895
907
|
continue;
|
|
896
908
|
}
|
|
897
|
-
const a =
|
|
909
|
+
const a = Ae(e, o + 2, "(", ")");
|
|
898
910
|
if (a < 0) {
|
|
899
911
|
t += e[n], n += 1;
|
|
900
912
|
continue;
|
|
901
913
|
}
|
|
902
|
-
const s = e.slice(i, o),
|
|
903
|
-
t += r || !
|
|
914
|
+
const s = e.slice(i, o), c = e.slice(o + 2, a).trim().split(/\s+/)[0] ?? "";
|
|
915
|
+
t += r || !We(c) ? s : e.slice(n, a + 1), n = a + 1;
|
|
904
916
|
}
|
|
905
917
|
return t;
|
|
906
918
|
}
|
|
907
|
-
function
|
|
919
|
+
function Ae(e, t, n, r) {
|
|
908
920
|
let i = 1;
|
|
909
921
|
for (let o = t; o < e.length; o += 1) {
|
|
910
922
|
if (e[o] === "\\") {
|
|
@@ -917,40 +929,40 @@ function re(e, t, n, r) {
|
|
|
917
929
|
}
|
|
918
930
|
return -1;
|
|
919
931
|
}
|
|
920
|
-
function
|
|
921
|
-
return
|
|
922
|
-
|
|
923
|
-
(t, n, r) =>
|
|
932
|
+
function jt(e) {
|
|
933
|
+
return Bt(e).replace(
|
|
934
|
+
Kt,
|
|
935
|
+
(t, n, r) => We(r) ? t : ""
|
|
924
936
|
);
|
|
925
937
|
}
|
|
926
|
-
function
|
|
927
|
-
return typeof e == "string" ?
|
|
938
|
+
function A(e, t = Fe) {
|
|
939
|
+
return typeof e == "string" ? jt(e).slice(0, t) : "";
|
|
928
940
|
}
|
|
929
|
-
function
|
|
941
|
+
function Ht(e, t = Fe) {
|
|
930
942
|
return typeof e == "string" ? e.slice(0, t) : "";
|
|
931
943
|
}
|
|
932
|
-
function
|
|
933
|
-
return typeof e == "string" &&
|
|
944
|
+
function Gt(e, t = "info") {
|
|
945
|
+
return typeof e == "string" && Ge.has(e) ? e : t;
|
|
934
946
|
}
|
|
935
|
-
function
|
|
947
|
+
function Yi(e, t = () => {
|
|
936
948
|
}) {
|
|
937
949
|
if (!Array.isArray(e)) return [];
|
|
938
950
|
const n = [];
|
|
939
951
|
for (const r of e) {
|
|
940
|
-
if (n.length >=
|
|
941
|
-
t(`more than ${
|
|
952
|
+
if (n.length >= me) {
|
|
953
|
+
t(`more than ${me} blocks; the rest was dropped`);
|
|
942
954
|
break;
|
|
943
955
|
}
|
|
944
956
|
if (!r || typeof r != "object") continue;
|
|
945
957
|
const i = r;
|
|
946
|
-
if (!
|
|
958
|
+
if (!Lt.has(i.type)) {
|
|
947
959
|
t(`unknown block type ${String(i.type)}`);
|
|
948
960
|
continue;
|
|
949
961
|
}
|
|
950
962
|
const o = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
|
|
951
963
|
switch (i.type) {
|
|
952
964
|
case "heading": {
|
|
953
|
-
const a =
|
|
965
|
+
const a = A(i.text);
|
|
954
966
|
if (!a) {
|
|
955
967
|
t("a heading without text");
|
|
956
968
|
continue;
|
|
@@ -960,7 +972,7 @@ function yi(e, t = () => {
|
|
|
960
972
|
break;
|
|
961
973
|
}
|
|
962
974
|
case "paragraph": {
|
|
963
|
-
const a =
|
|
975
|
+
const a = A(i.text);
|
|
964
976
|
if (!a) {
|
|
965
977
|
t("a paragraph without text");
|
|
966
978
|
continue;
|
|
@@ -969,7 +981,7 @@ function yi(e, t = () => {
|
|
|
969
981
|
break;
|
|
970
982
|
}
|
|
971
983
|
case "quote": {
|
|
972
|
-
const a =
|
|
984
|
+
const a = A(i.text);
|
|
973
985
|
if (!a) {
|
|
974
986
|
t("a quote without text");
|
|
975
987
|
continue;
|
|
@@ -978,7 +990,7 @@ function yi(e, t = () => {
|
|
|
978
990
|
break;
|
|
979
991
|
}
|
|
980
992
|
case "code": {
|
|
981
|
-
const a =
|
|
993
|
+
const a = Ht(i.text);
|
|
982
994
|
if (!a) {
|
|
983
995
|
t("a code block without text");
|
|
984
996
|
continue;
|
|
@@ -992,69 +1004,69 @@ function yi(e, t = () => {
|
|
|
992
1004
|
break;
|
|
993
1005
|
case "list": {
|
|
994
1006
|
const a = Array.isArray(i.items) ? i.items : [], s = [];
|
|
995
|
-
for (const
|
|
996
|
-
if (s.length >=
|
|
997
|
-
t(`more than ${
|
|
1007
|
+
for (const m of a) {
|
|
1008
|
+
if (s.length >= ge) {
|
|
1009
|
+
t(`more than ${ge} list items`);
|
|
998
1010
|
break;
|
|
999
1011
|
}
|
|
1000
|
-
const
|
|
1001
|
-
if (!
|
|
1002
|
-
const
|
|
1003
|
-
s.push(
|
|
1012
|
+
const h = A(m?.text);
|
|
1013
|
+
if (!h) continue;
|
|
1014
|
+
const y = A(m?.lead, 200);
|
|
1015
|
+
s.push(y ? { lead: y, text: h } : { text: h });
|
|
1004
1016
|
}
|
|
1005
1017
|
if (s.length === 0) {
|
|
1006
1018
|
t("a list without usable items");
|
|
1007
1019
|
continue;
|
|
1008
1020
|
}
|
|
1009
|
-
const
|
|
1010
|
-
n.push({ ...o, type: "list", style:
|
|
1021
|
+
const c = i.style === "numbered" ? "numbered" : "bulleted";
|
|
1022
|
+
n.push({ ...o, type: "list", style: c, items: s });
|
|
1011
1023
|
break;
|
|
1012
1024
|
}
|
|
1013
1025
|
case "table": {
|
|
1014
1026
|
const a = Array.isArray(i.columns) ? i.columns : [], s = [];
|
|
1015
|
-
for (const
|
|
1016
|
-
if (s.length >=
|
|
1017
|
-
t(`more than ${
|
|
1027
|
+
for (const y of a) {
|
|
1028
|
+
if (s.length >= ye) {
|
|
1029
|
+
t(`more than ${ye} table columns`);
|
|
1018
1030
|
break;
|
|
1019
1031
|
}
|
|
1020
|
-
const
|
|
1021
|
-
s.push(
|
|
1032
|
+
const T = A(y?.label, F), M = y?.align === "right" ? "right" : void 0;
|
|
1033
|
+
s.push(M ? { label: T, align: M } : { label: T });
|
|
1022
1034
|
}
|
|
1023
1035
|
if (s.length === 0) {
|
|
1024
1036
|
t("a table without columns");
|
|
1025
1037
|
continue;
|
|
1026
1038
|
}
|
|
1027
|
-
const
|
|
1028
|
-
for (const
|
|
1029
|
-
if (
|
|
1030
|
-
t(`more than ${
|
|
1039
|
+
const c = Array.isArray(i.rows) ? i.rows : [], m = [];
|
|
1040
|
+
for (const y of c) {
|
|
1041
|
+
if (m.length >= he) {
|
|
1042
|
+
t(`more than ${he} table rows`);
|
|
1031
1043
|
break;
|
|
1032
1044
|
}
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1045
|
+
const T = Array.isArray(y) ? y : [];
|
|
1046
|
+
m.push(s.map((M, B) => A(T[B], F)));
|
|
1035
1047
|
}
|
|
1036
|
-
const
|
|
1048
|
+
const h = A(i.caption, F);
|
|
1037
1049
|
n.push({
|
|
1038
1050
|
...o,
|
|
1039
1051
|
type: "table",
|
|
1040
1052
|
columns: s,
|
|
1041
|
-
rows:
|
|
1042
|
-
...
|
|
1053
|
+
rows: m,
|
|
1054
|
+
...h ? { caption: h } : {}
|
|
1043
1055
|
});
|
|
1044
1056
|
break;
|
|
1045
1057
|
}
|
|
1046
1058
|
case "kpi": {
|
|
1047
1059
|
const a = Array.isArray(i.items) ? i.items : [], s = [];
|
|
1048
|
-
for (const
|
|
1049
|
-
if (s.length >=
|
|
1050
|
-
t(`more than ${
|
|
1060
|
+
for (const c of a) {
|
|
1061
|
+
if (s.length >= be) {
|
|
1062
|
+
t(`more than ${be} kpi items`);
|
|
1051
1063
|
break;
|
|
1052
1064
|
}
|
|
1053
|
-
const
|
|
1054
|
-
if (!
|
|
1055
|
-
const
|
|
1065
|
+
const m = A(c?.value, 40), h = A(c?.label, 80);
|
|
1066
|
+
if (!m || !h) continue;
|
|
1067
|
+
const y = c?.tone;
|
|
1056
1068
|
s.push(
|
|
1057
|
-
typeof
|
|
1069
|
+
typeof y == "string" && Ge.has(y) ? { value: m, label: h, tone: y } : { value: m, label: h }
|
|
1058
1070
|
);
|
|
1059
1071
|
}
|
|
1060
1072
|
if (s.length === 0) {
|
|
@@ -1065,16 +1077,16 @@ function yi(e, t = () => {
|
|
|
1065
1077
|
break;
|
|
1066
1078
|
}
|
|
1067
1079
|
case "callout": {
|
|
1068
|
-
const a =
|
|
1080
|
+
const a = A(i.text);
|
|
1069
1081
|
if (!a) {
|
|
1070
1082
|
t("a callout without text");
|
|
1071
1083
|
continue;
|
|
1072
1084
|
}
|
|
1073
|
-
const s =
|
|
1085
|
+
const s = A(i.title, 200);
|
|
1074
1086
|
n.push({
|
|
1075
1087
|
...o,
|
|
1076
1088
|
type: "callout",
|
|
1077
|
-
tone:
|
|
1089
|
+
tone: Gt(i.tone),
|
|
1078
1090
|
...s ? { title: s } : {},
|
|
1079
1091
|
text: a
|
|
1080
1092
|
});
|
|
@@ -1084,28 +1096,28 @@ function yi(e, t = () => {
|
|
|
1084
1096
|
}
|
|
1085
1097
|
return n;
|
|
1086
1098
|
}
|
|
1087
|
-
function
|
|
1099
|
+
function qi(e) {
|
|
1088
1100
|
return JSON.stringify(e).length;
|
|
1089
1101
|
}
|
|
1090
|
-
function
|
|
1102
|
+
function Ji(e) {
|
|
1091
1103
|
return {
|
|
1092
1104
|
blocks: e.length,
|
|
1093
1105
|
types: e.map((t) => t.type),
|
|
1094
1106
|
headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
|
|
1095
1107
|
};
|
|
1096
1108
|
}
|
|
1097
|
-
function
|
|
1109
|
+
function Ee(e) {
|
|
1098
1110
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
1099
1111
|
}
|
|
1100
|
-
function
|
|
1112
|
+
function Se(e, t, n) {
|
|
1101
1113
|
const r = e.map((i, o) => n?.[o] === "right" ? "---:" : "---");
|
|
1102
1114
|
return [
|
|
1103
|
-
`| ${e.map(
|
|
1115
|
+
`| ${e.map(Ee).join(" | ")} |`,
|
|
1104
1116
|
`| ${r.join(" | ")} |`,
|
|
1105
|
-
...t.map((i) => `| ${i.map(
|
|
1117
|
+
...t.map((i) => `| ${i.map(Ee).join(" | ")} |`)
|
|
1106
1118
|
];
|
|
1107
1119
|
}
|
|
1108
|
-
function
|
|
1120
|
+
function Ft(e) {
|
|
1109
1121
|
switch (e.type) {
|
|
1110
1122
|
case "heading":
|
|
1111
1123
|
return [`${"#".repeat(e.level)} ${e.text}`];
|
|
@@ -1123,7 +1135,7 @@ function St(e) {
|
|
|
1123
1135
|
return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
|
|
1124
1136
|
});
|
|
1125
1137
|
case "table": {
|
|
1126
|
-
const t =
|
|
1138
|
+
const t = Se(
|
|
1127
1139
|
e.columns.map((n) => n.label),
|
|
1128
1140
|
e.rows,
|
|
1129
1141
|
e.columns.map((n) => n.align ?? "left")
|
|
@@ -1131,7 +1143,7 @@ function St(e) {
|
|
|
1131
1143
|
return e.caption ? [...t, "", `*${e.caption}*`] : t;
|
|
1132
1144
|
}
|
|
1133
1145
|
case "kpi":
|
|
1134
|
-
return
|
|
1146
|
+
return Se(
|
|
1135
1147
|
e.items.map((t) => t.value),
|
|
1136
1148
|
[e.items.map((t) => t.label)]
|
|
1137
1149
|
);
|
|
@@ -1139,11 +1151,11 @@ function St(e) {
|
|
|
1139
1151
|
return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
|
|
1140
1152
|
}
|
|
1141
1153
|
}
|
|
1142
|
-
function
|
|
1154
|
+
function Zi(e, t) {
|
|
1143
1155
|
const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
|
|
1144
1156
|
t && !r && n.push(`# ${t}`);
|
|
1145
1157
|
for (const i of e) {
|
|
1146
|
-
const o =
|
|
1158
|
+
const o = Ft(i);
|
|
1147
1159
|
o.length > 0 && n.push(o.join(`
|
|
1148
1160
|
`));
|
|
1149
1161
|
}
|
|
@@ -1152,45 +1164,45 @@ function Ei(e, t) {
|
|
|
1152
1164
|
`)}
|
|
1153
1165
|
`;
|
|
1154
1166
|
}
|
|
1155
|
-
const
|
|
1156
|
-
function
|
|
1167
|
+
const Ve = (e) => `user:${e}`, ze = (e) => `team:${e}`;
|
|
1168
|
+
function Qi(e) {
|
|
1157
1169
|
const t = /* @__PURE__ */ new Set();
|
|
1158
1170
|
for (const n of e ?? [])
|
|
1159
|
-
n?.id && (n.kind === "user" && t.add(
|
|
1171
|
+
n?.id && (n.kind === "user" && t.add(Ve(n.id)), n.kind === "team" && t.add(ze(n.id)));
|
|
1160
1172
|
return [...t].sort();
|
|
1161
1173
|
}
|
|
1162
|
-
function
|
|
1163
|
-
return [
|
|
1174
|
+
function eo(e, t) {
|
|
1175
|
+
return [Ve(e), ...t.map(ze)];
|
|
1164
1176
|
}
|
|
1165
|
-
function
|
|
1177
|
+
function to(e) {
|
|
1166
1178
|
const t = /* @__PURE__ */ new Set();
|
|
1167
1179
|
for (const n of e ?? [])
|
|
1168
1180
|
n?.kind && t.add(n.kind);
|
|
1169
1181
|
return [...t];
|
|
1170
1182
|
}
|
|
1171
|
-
const
|
|
1172
|
-
function
|
|
1173
|
-
return
|
|
1183
|
+
const Wt = ["done", "escalated"], no = ["open", "waiting"];
|
|
1184
|
+
function ro(e) {
|
|
1185
|
+
return Wt.includes(e);
|
|
1174
1186
|
}
|
|
1175
|
-
const
|
|
1176
|
-
function
|
|
1177
|
-
return `${
|
|
1187
|
+
const Vt = "assignment";
|
|
1188
|
+
function io(e) {
|
|
1189
|
+
return `${Vt}:${e}`;
|
|
1178
1190
|
}
|
|
1179
|
-
function
|
|
1191
|
+
function oo(e, t, n, r) {
|
|
1180
1192
|
if (e.direction === "inbound") return !0;
|
|
1181
1193
|
if (e.author?.type === "user" && e.author.id === t) return !1;
|
|
1182
1194
|
const i = e.payload?.mentions;
|
|
1183
1195
|
return Array.isArray(i) && i.includes(t) || r && r === t ? !0 : n === "reply";
|
|
1184
1196
|
}
|
|
1185
|
-
function
|
|
1197
|
+
function ao(e) {
|
|
1186
1198
|
const { targetAuthorId: t, reactorId: n, agentId: r, on: i } = e;
|
|
1187
1199
|
return !i || !t || t !== r ? !1 : n !== r;
|
|
1188
1200
|
}
|
|
1189
|
-
function
|
|
1201
|
+
function so(e) {
|
|
1190
1202
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1191
1203
|
}
|
|
1192
|
-
const
|
|
1193
|
-
function
|
|
1204
|
+
const zt = 12;
|
|
1205
|
+
function co(e, t, n = zt) {
|
|
1194
1206
|
const r = t + 1;
|
|
1195
1207
|
return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: r, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: r, reason: e.reason } : r >= n ? {
|
|
1196
1208
|
status: "escalated",
|
|
@@ -1204,39 +1216,39 @@ function vi(e, t, n = wt) {
|
|
|
1204
1216
|
reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
|
|
1205
1217
|
};
|
|
1206
1218
|
}
|
|
1207
|
-
const
|
|
1208
|
-
function
|
|
1219
|
+
const lo = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1220
|
+
function Xt(e, t) {
|
|
1209
1221
|
const n = e.settings?.signatures?.[t];
|
|
1210
1222
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1211
1223
|
}
|
|
1212
|
-
function
|
|
1224
|
+
function uo(e, t, n, r = "html") {
|
|
1213
1225
|
if (!e) return n;
|
|
1214
|
-
const i =
|
|
1226
|
+
const i = Xt(e, t);
|
|
1215
1227
|
return i ? `${n}${r === "text" ? `
|
|
1216
1228
|
|
|
1217
1229
|
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
|
|
1218
1230
|
}
|
|
1219
|
-
function
|
|
1231
|
+
function po(e) {
|
|
1220
1232
|
return e.endpoints ?? [];
|
|
1221
1233
|
}
|
|
1222
|
-
const
|
|
1234
|
+
const Yt = 36e5, qt = 864e5, w = -1 / 0, fo = (e) => e.score > w, P = {
|
|
1223
1235
|
urgent: 40,
|
|
1224
1236
|
high: 25,
|
|
1225
1237
|
normal: 10,
|
|
1226
1238
|
low: 0
|
|
1227
1239
|
};
|
|
1228
|
-
function
|
|
1240
|
+
function mo(e) {
|
|
1229
1241
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1230
1242
|
}
|
|
1231
|
-
const
|
|
1232
|
-
function
|
|
1233
|
-
return !!(e &&
|
|
1243
|
+
const Jt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Xe = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
1244
|
+
function Zt(e, t) {
|
|
1245
|
+
return !!(e && Jt.test(e) || t && Xe.test(t));
|
|
1234
1246
|
}
|
|
1235
|
-
const
|
|
1236
|
-
function
|
|
1237
|
-
return e >=
|
|
1247
|
+
const Qt = 3, en = 600;
|
|
1248
|
+
function go(e, t) {
|
|
1249
|
+
return e >= Qt || t >= en;
|
|
1238
1250
|
}
|
|
1239
|
-
const
|
|
1251
|
+
const tn = [
|
|
1240
1252
|
"list-unsubscribe",
|
|
1241
1253
|
"list-unsubscribe-post",
|
|
1242
1254
|
"list-id",
|
|
@@ -1246,93 +1258,93 @@ const Nt = [
|
|
|
1246
1258
|
"feedback-id",
|
|
1247
1259
|
"x-mailer"
|
|
1248
1260
|
];
|
|
1249
|
-
function
|
|
1261
|
+
function ho(e) {
|
|
1250
1262
|
const t = {};
|
|
1251
1263
|
for (const n of e) {
|
|
1252
1264
|
const r = n.name?.toLowerCase();
|
|
1253
|
-
r && n.value !== void 0 &&
|
|
1265
|
+
r && n.value !== void 0 && tn.includes(r) && (t[r] = n.value);
|
|
1254
1266
|
}
|
|
1255
1267
|
return t;
|
|
1256
1268
|
}
|
|
1257
|
-
const
|
|
1258
|
-
function
|
|
1269
|
+
const nn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, rn = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1270
|
+
function yo(e) {
|
|
1259
1271
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1260
|
-
if (r && r !== "no" || t["x-auto-response-suppress"] || n &&
|
|
1272
|
+
if (r && r !== "no" || t["x-auto-response-suppress"] || n && nn.test(n))
|
|
1261
1273
|
return "automated";
|
|
1262
1274
|
const i = t.precedence?.toLowerCase();
|
|
1263
|
-
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || i === "bulk" || i === "list" || e.body &&
|
|
1275
|
+
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || i === "bulk" || i === "list" || e.body && Xe.test(e.body) || n && rn.test(n))
|
|
1264
1276
|
return "marketing";
|
|
1265
1277
|
}
|
|
1266
|
-
function
|
|
1278
|
+
function on(e, t) {
|
|
1267
1279
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1268
1280
|
}
|
|
1269
|
-
const
|
|
1281
|
+
const an = ["open"], sn = 1e3, cn = {
|
|
1270
1282
|
urgent: 1,
|
|
1271
1283
|
high: 4,
|
|
1272
1284
|
normal: 8,
|
|
1273
1285
|
low: 24
|
|
1274
|
-
},
|
|
1275
|
-
function
|
|
1276
|
-
return e.lastActivityAt ?? (e.createdAt ? new Date(
|
|
1286
|
+
}, ln = 72;
|
|
1287
|
+
function un(e) {
|
|
1288
|
+
return e.lastActivityAt ?? (e.createdAt ? new Date(Ot(e)).getTime() : 0);
|
|
1277
1289
|
}
|
|
1278
|
-
function
|
|
1279
|
-
return
|
|
1290
|
+
function dn(e, t) {
|
|
1291
|
+
return pn(t.remindersById?.[e.id], e, t.now);
|
|
1280
1292
|
}
|
|
1281
|
-
function
|
|
1293
|
+
function pn(e, t, n) {
|
|
1282
1294
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1283
1295
|
}
|
|
1284
|
-
const
|
|
1285
|
-
function
|
|
1286
|
-
return Math.max(0, (t -
|
|
1296
|
+
const Ye = (e) => St(e) === "outbound_message", qe = (e) => an.includes(e);
|
|
1297
|
+
function te(e, t) {
|
|
1298
|
+
return Math.max(0, (t - un(e)) / Yt);
|
|
1287
1299
|
}
|
|
1288
|
-
function
|
|
1300
|
+
function fn(e, t) {
|
|
1289
1301
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1290
|
-
return typeof n == "number" && n > 0 ? n :
|
|
1302
|
+
return typeof n == "number" && n > 0 ? n : cn[e.priority ?? "normal"];
|
|
1291
1303
|
}
|
|
1292
|
-
function
|
|
1304
|
+
function bo(e) {
|
|
1293
1305
|
const t = {};
|
|
1294
1306
|
for (const n of e)
|
|
1295
1307
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1296
1308
|
return t;
|
|
1297
1309
|
}
|
|
1298
|
-
function
|
|
1299
|
-
return !
|
|
1310
|
+
function Ao(e, t, n) {
|
|
1311
|
+
return !qe(e.status) || e.firstResponseAt ? !1 : te(e, t) > fn(e, n);
|
|
1300
1312
|
}
|
|
1301
|
-
function
|
|
1313
|
+
function mn(e, t) {
|
|
1302
1314
|
const n = e.lastActivityPreview;
|
|
1303
|
-
return n?.direction !== "outbound" || !
|
|
1315
|
+
return n?.direction !== "outbound" || !Ye(n.type) ? !1 : te(e, t) < ln;
|
|
1304
1316
|
}
|
|
1305
|
-
function
|
|
1306
|
-
if (!
|
|
1307
|
-
if (e.snoozedTill && e.snoozedTill > t.now) return { score:
|
|
1308
|
-
if (
|
|
1309
|
-
if (
|
|
1317
|
+
function Eo(e, t) {
|
|
1318
|
+
if (!qe(e.status)) return { score: w, reasons: [] };
|
|
1319
|
+
if (e.snoozedTill && e.snoozedTill > t.now) return { score: w, reasons: [] };
|
|
1320
|
+
if (mn(e, t.now)) return { score: w, reasons: [] };
|
|
1321
|
+
if (dn(e, t)) return { score: w, reasons: [] };
|
|
1310
1322
|
let n = 0;
|
|
1311
1323
|
const r = [], i = e.priority ?? "normal";
|
|
1312
|
-
|
|
1313
|
-
const o =
|
|
1324
|
+
P[i] > 0 && (n += P[i], r.push(`priority:${i}`)), on(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
|
|
1325
|
+
const o = te(e, t.now);
|
|
1314
1326
|
if (o > 0) {
|
|
1315
|
-
const
|
|
1316
|
-
n +=
|
|
1327
|
+
const c = Math.min(o * 2, 30);
|
|
1328
|
+
n += c, o >= 1 && r.push(`waiting:${Math.round(o)}h`);
|
|
1317
1329
|
}
|
|
1318
1330
|
const a = e.lastActivityPreview;
|
|
1319
|
-
return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" &&
|
|
1331
|
+
return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" && Ye(a.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((c) => c === "marketing" || c === "automated") || Zt(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= sn, r.push("bulk")), { score: n, reasons: r };
|
|
1320
1332
|
}
|
|
1321
|
-
const
|
|
1333
|
+
const So = (e) => !!e.assignedUserId || !!e.assignedInboxId, _o = (e) => e.status === "closed", To = (e) => ({
|
|
1322
1334
|
urgent: 10,
|
|
1323
1335
|
high: 5,
|
|
1324
1336
|
normal: 2,
|
|
1325
1337
|
low: 1
|
|
1326
|
-
})[e.priority] || 0,
|
|
1327
|
-
function
|
|
1338
|
+
})[e.priority] || 0, wo = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1339
|
+
function Io(e, t) {
|
|
1328
1340
|
const n = e.labels ?? [];
|
|
1329
1341
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1330
1342
|
}
|
|
1331
|
-
function
|
|
1343
|
+
function Mo(e, t, n) {
|
|
1332
1344
|
const r = e.translations ?? [];
|
|
1333
1345
|
return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
|
|
1334
1346
|
}
|
|
1335
|
-
const
|
|
1347
|
+
const _e = [
|
|
1336
1348
|
{ code: "nl", label: "Nederlands", english: "Dutch" },
|
|
1337
1349
|
{ code: "en", label: "English", english: "English" },
|
|
1338
1350
|
{ code: "de", label: "Deutsch", english: "German" },
|
|
@@ -1347,36 +1359,36 @@ const ae = [
|
|
|
1347
1359
|
{ code: "fi", label: "Suomi", english: "Finnish" },
|
|
1348
1360
|
{ code: "tr", label: "Türkçe", english: "Turkish" }
|
|
1349
1361
|
];
|
|
1350
|
-
function
|
|
1362
|
+
function Je(e) {
|
|
1351
1363
|
const t = (e ?? "").toLowerCase();
|
|
1352
|
-
return
|
|
1364
|
+
return _e.find((n) => n.code === t) ?? _e.find((n) => n.code === t.split("-")[0]);
|
|
1353
1365
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return
|
|
1366
|
+
function Oo(e) {
|
|
1367
|
+
return Je(e)?.label ?? e;
|
|
1356
1368
|
}
|
|
1357
|
-
function
|
|
1358
|
-
const t =
|
|
1369
|
+
function Co(e) {
|
|
1370
|
+
const t = Je(e);
|
|
1359
1371
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1360
1372
|
}
|
|
1361
|
-
const
|
|
1362
|
-
function
|
|
1373
|
+
const Ze = 3;
|
|
1374
|
+
function gn(e, t) {
|
|
1363
1375
|
const n = /* @__PURE__ */ new Set();
|
|
1364
1376
|
let r = 1, i = t.get(e)?.parentId;
|
|
1365
1377
|
for (; i; ) {
|
|
1366
|
-
if (n.has(i) || (n.add(i), r++, r >
|
|
1378
|
+
if (n.has(i) || (n.add(i), r++, r > Ze + 1)) return 1 / 0;
|
|
1367
1379
|
i = t.get(i)?.parentId;
|
|
1368
1380
|
}
|
|
1369
1381
|
return r;
|
|
1370
1382
|
}
|
|
1371
|
-
function
|
|
1383
|
+
function ko(e, t, n) {
|
|
1372
1384
|
if (!e) return !0;
|
|
1373
1385
|
if (e === t) return !1;
|
|
1374
1386
|
const r = new Map(n.map((a) => [a.id, a]));
|
|
1375
|
-
if (!r.has(e) || t &&
|
|
1376
|
-
const i =
|
|
1377
|
-
return i + o <=
|
|
1387
|
+
if (!r.has(e) || t && hn(e, t, r)) return !1;
|
|
1388
|
+
const i = gn(e, r), o = t ? Qe(t, n) : 1;
|
|
1389
|
+
return i + o <= Ze;
|
|
1378
1390
|
}
|
|
1379
|
-
function
|
|
1391
|
+
function hn(e, t, n) {
|
|
1380
1392
|
const r = /* @__PURE__ */ new Set();
|
|
1381
1393
|
let i = n.get(e)?.parentId;
|
|
1382
1394
|
for (; i; ) {
|
|
@@ -1386,44 +1398,44 @@ function Vt(e, t, n) {
|
|
|
1386
1398
|
}
|
|
1387
1399
|
return !1;
|
|
1388
1400
|
}
|
|
1389
|
-
function
|
|
1401
|
+
function Qe(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1390
1402
|
if (n.has(e)) return 1;
|
|
1391
1403
|
n.add(e);
|
|
1392
1404
|
const r = t.filter((i) => i.parentId === e);
|
|
1393
|
-
return r.length ? 1 + Math.max(...r.map((i) =>
|
|
1405
|
+
return r.length ? 1 + Math.max(...r.map((i) => Qe(i.id, t, n))) : 1;
|
|
1394
1406
|
}
|
|
1395
|
-
const
|
|
1396
|
-
function
|
|
1397
|
-
return e.defaultLocale || e.locale ||
|
|
1407
|
+
const yn = "en";
|
|
1408
|
+
function bn(e) {
|
|
1409
|
+
return e.defaultLocale || e.locale || yn;
|
|
1398
1410
|
}
|
|
1399
|
-
function
|
|
1411
|
+
function vo(e) {
|
|
1400
1412
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1401
|
-
for (const r of [
|
|
1413
|
+
for (const r of [bn(e), ...e.locales ?? []])
|
|
1402
1414
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1403
1415
|
return n;
|
|
1404
1416
|
}
|
|
1405
|
-
function
|
|
1417
|
+
function xo(e, t, n) {
|
|
1406
1418
|
const r = e.translations ?? [];
|
|
1407
1419
|
return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
|
|
1408
1420
|
}
|
|
1409
|
-
const
|
|
1410
|
-
function
|
|
1421
|
+
const Te = ["lookup", "condition", "parallel", "for-each"];
|
|
1422
|
+
function we(e) {
|
|
1411
1423
|
for (const t of e) {
|
|
1412
|
-
if (!
|
|
1413
|
-
return `staptype "${t.type}" mag niet meelezen (alleen ${
|
|
1424
|
+
if (!Te.includes(t.type))
|
|
1425
|
+
return `staptype "${t.type}" mag niet meelezen (alleen ${Te.join(", ")})`;
|
|
1414
1426
|
if (t.type === "parallel")
|
|
1415
1427
|
for (const n of t.branches ?? []) {
|
|
1416
|
-
const r =
|
|
1428
|
+
const r = we(n);
|
|
1417
1429
|
if (r) return r;
|
|
1418
1430
|
}
|
|
1419
1431
|
if (t.type === "for-each") {
|
|
1420
|
-
const n =
|
|
1432
|
+
const n = we(t.body ?? []);
|
|
1421
1433
|
if (n) return n;
|
|
1422
1434
|
}
|
|
1423
1435
|
}
|
|
1424
1436
|
return null;
|
|
1425
1437
|
}
|
|
1426
|
-
function
|
|
1438
|
+
function An(e, t) {
|
|
1427
1439
|
switch (e.kind) {
|
|
1428
1440
|
case "org":
|
|
1429
1441
|
return !0;
|
|
@@ -1433,23 +1445,23 @@ function Yt(e, t) {
|
|
|
1433
1445
|
return e.userId === t.userId;
|
|
1434
1446
|
}
|
|
1435
1447
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return e.filter((n) => n.enabled &&
|
|
1448
|
+
function No(e, t) {
|
|
1449
|
+
return e.filter((n) => n.enabled && An(n.ownerScope, t));
|
|
1438
1450
|
}
|
|
1439
|
-
function
|
|
1451
|
+
function Ro(e) {
|
|
1440
1452
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1441
1453
|
}
|
|
1442
|
-
function
|
|
1454
|
+
function Do(e) {
|
|
1443
1455
|
return `mcp__${e}__`;
|
|
1444
1456
|
}
|
|
1445
|
-
const
|
|
1446
|
-
function
|
|
1457
|
+
const $o = 1e3, Lo = 2e3, Po = 500, Uo = 12e3, Ko = 4e3, En = ["contact", "company", "work_item"];
|
|
1458
|
+
function Bo(e) {
|
|
1447
1459
|
if (!e) return !1;
|
|
1448
1460
|
const t = e.slice(0, e.indexOf(":"));
|
|
1449
|
-
return
|
|
1461
|
+
return En.includes(t);
|
|
1450
1462
|
}
|
|
1451
|
-
const
|
|
1452
|
-
function
|
|
1463
|
+
const jo = "onboarding-source", Ho = ["support", "billing", "availability", "sales", "onboarding"], Go = ["keep", "replace"];
|
|
1464
|
+
function Sn(e) {
|
|
1453
1465
|
switch (e.kind) {
|
|
1454
1466
|
case "user":
|
|
1455
1467
|
return `user:${e.userId}`;
|
|
@@ -1459,7 +1471,7 @@ function Jt(e) {
|
|
|
1459
1471
|
return "org";
|
|
1460
1472
|
}
|
|
1461
1473
|
}
|
|
1462
|
-
function
|
|
1474
|
+
function Fo(e) {
|
|
1463
1475
|
if (typeof e != "string") return;
|
|
1464
1476
|
const t = e.trim();
|
|
1465
1477
|
if (t === "org") return { kind: "org" };
|
|
@@ -1471,10 +1483,10 @@ function po(e) {
|
|
|
1471
1483
|
if (r === "team") return { kind: "team", teamId: i };
|
|
1472
1484
|
}
|
|
1473
1485
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1486
|
+
function _n(e) {
|
|
1487
|
+
return Sn(e);
|
|
1476
1488
|
}
|
|
1477
|
-
function
|
|
1489
|
+
function Tn(e) {
|
|
1478
1490
|
switch (e.kind) {
|
|
1479
1491
|
case "personal":
|
|
1480
1492
|
return { kind: "user", userId: e.userId };
|
|
@@ -1484,14 +1496,14 @@ function Qt(e) {
|
|
|
1484
1496
|
return { kind: "org" };
|
|
1485
1497
|
}
|
|
1486
1498
|
}
|
|
1487
|
-
const
|
|
1488
|
-
function
|
|
1489
|
-
return e.agentId ? { kind: "user", userId: e.agentId } :
|
|
1499
|
+
const wn = Tn;
|
|
1500
|
+
function Wo(e) {
|
|
1501
|
+
return e.agentId ? { kind: "user", userId: e.agentId } : wn(e.ownerScope);
|
|
1490
1502
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1503
|
+
function Vo(e) {
|
|
1504
|
+
return _n(e);
|
|
1493
1505
|
}
|
|
1494
|
-
function
|
|
1506
|
+
function zo(e, t) {
|
|
1495
1507
|
if (!t) return;
|
|
1496
1508
|
let n = e;
|
|
1497
1509
|
for (const r of t.split(".")) {
|
|
@@ -1500,24 +1512,24 @@ function go(e, t) {
|
|
|
1500
1512
|
}
|
|
1501
1513
|
return n;
|
|
1502
1514
|
}
|
|
1503
|
-
function
|
|
1515
|
+
function Xo(e, t) {
|
|
1504
1516
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
1505
1517
|
}
|
|
1506
|
-
function
|
|
1518
|
+
function Yo(e, t) {
|
|
1507
1519
|
if (t)
|
|
1508
1520
|
return e.targets.find((n) => n.id === t);
|
|
1509
1521
|
}
|
|
1510
|
-
function
|
|
1522
|
+
function In(e) {
|
|
1511
1523
|
return e?.kind === "assignment";
|
|
1512
1524
|
}
|
|
1513
|
-
function
|
|
1525
|
+
function qo(e) {
|
|
1514
1526
|
const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: o, authorUserId: a } = e;
|
|
1515
|
-
return
|
|
1527
|
+
return In(t) ? n ? r ? r.activityTypes.includes(i) ? o ? o !== n ? "assigned to someone else" : a && a === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
|
|
1516
1528
|
}
|
|
1517
|
-
function
|
|
1529
|
+
function Jo(e) {
|
|
1518
1530
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
1519
1531
|
}
|
|
1520
|
-
const
|
|
1532
|
+
const Zo = [
|
|
1521
1533
|
{ name: "text", type: "string" },
|
|
1522
1534
|
{ name: "subject", type: "string" },
|
|
1523
1535
|
{ name: "from", type: "string" },
|
|
@@ -1546,12 +1558,18 @@ const Eo = [
|
|
|
1546
1558
|
// message from a new address) — so a step leaning on this should carry a `condition`.
|
|
1547
1559
|
{ name: "contactId", type: "string" },
|
|
1548
1560
|
{ name: "companyId", type: "string" },
|
|
1561
|
+
// Properties of the conversation itself rather than of the activity, and filled from the same
|
|
1562
|
+
// read as contactId/companyId. Without these a rule like "inbox = Support and priority = high"
|
|
1563
|
+
// compares silently against `undefined` — it never fires and says nothing about why.
|
|
1564
|
+
{ name: "priority", type: "string" },
|
|
1565
|
+
{ name: "inboxId", type: "string" },
|
|
1566
|
+
{ name: "topicId", type: "string" },
|
|
1549
1567
|
// Who this work is assigned to, on an activity announcing an assignment. Where that sits on
|
|
1550
1568
|
// the activity is **declared** per source (`AssignmentTargetKind.assigneePath`), so
|
|
1551
1569
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
1552
1570
|
// the trigger filter runs — like contactId/companyId above.
|
|
1553
1571
|
{ name: "assigneeUserId", type: "string" }
|
|
1554
|
-
],
|
|
1572
|
+
], Qo = {
|
|
1555
1573
|
topics: [
|
|
1556
1574
|
{ name: "topicId", type: "string" },
|
|
1557
1575
|
{ name: "topic", type: "string" },
|
|
@@ -1565,58 +1583,58 @@ const Eo = [
|
|
|
1565
1583
|
// Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
|
|
1566
1584
|
extract: []
|
|
1567
1585
|
};
|
|
1568
|
-
function
|
|
1586
|
+
function Mn(e) {
|
|
1569
1587
|
return `${e.type}:${e.id}`;
|
|
1570
1588
|
}
|
|
1571
|
-
const
|
|
1572
|
-
function
|
|
1573
|
-
return e?.type ===
|
|
1589
|
+
const On = "interaction";
|
|
1590
|
+
function Cn(e) {
|
|
1591
|
+
return e?.type === On ? e.id : void 0;
|
|
1574
1592
|
}
|
|
1575
|
-
const
|
|
1576
|
-
function
|
|
1593
|
+
const kn = 64, vn = 8e3;
|
|
1594
|
+
function ea(e) {
|
|
1577
1595
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
1578
1596
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
1579
|
-
return Math.min(Math.max(Math.round(t),
|
|
1597
|
+
return Math.min(Math.max(Math.round(t), kn), vn);
|
|
1580
1598
|
}
|
|
1581
|
-
const
|
|
1582
|
-
function
|
|
1599
|
+
const ta = { kind: "workflow", steps: [] };
|
|
1600
|
+
function na(e) {
|
|
1583
1601
|
return e?.kind === "workflow" ? e.steps : [];
|
|
1584
1602
|
}
|
|
1585
|
-
function
|
|
1603
|
+
function ra(e) {
|
|
1586
1604
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
1587
1605
|
}
|
|
1588
|
-
function
|
|
1606
|
+
function xn(e) {
|
|
1589
1607
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
1590
1608
|
return { total: n, rate: n ? t / n : 0 };
|
|
1591
1609
|
}
|
|
1592
|
-
const
|
|
1593
|
-
function
|
|
1594
|
-
const { total: t, rate: n } =
|
|
1595
|
-
return t >=
|
|
1610
|
+
const Nn = 10, Rn = 0.9;
|
|
1611
|
+
function ia(e) {
|
|
1612
|
+
const { total: t, rate: n } = xn(e);
|
|
1613
|
+
return t >= Nn && n >= Rn;
|
|
1596
1614
|
}
|
|
1597
|
-
const
|
|
1598
|
-
function
|
|
1599
|
-
return
|
|
1615
|
+
const Dn = ["done", "escalated", "failed", "stopped"];
|
|
1616
|
+
function oa(e) {
|
|
1617
|
+
return Dn.includes(e);
|
|
1600
1618
|
}
|
|
1601
|
-
function
|
|
1619
|
+
function $n(e) {
|
|
1602
1620
|
return e === "waiting";
|
|
1603
1621
|
}
|
|
1604
|
-
function
|
|
1605
|
-
return e === "running" ||
|
|
1622
|
+
function aa(e) {
|
|
1623
|
+
return e === "running" || $n(e);
|
|
1606
1624
|
}
|
|
1607
|
-
function
|
|
1625
|
+
function et(e) {
|
|
1608
1626
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1609
1627
|
}
|
|
1610
|
-
function
|
|
1611
|
-
const t =
|
|
1612
|
-
return t ?
|
|
1628
|
+
function sa(e) {
|
|
1629
|
+
const t = et(e);
|
|
1630
|
+
return t ? Mn(t) : void 0;
|
|
1613
1631
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return
|
|
1632
|
+
function ca(e) {
|
|
1633
|
+
return Cn(et(e));
|
|
1616
1634
|
}
|
|
1617
|
-
function
|
|
1635
|
+
function la(e) {
|
|
1618
1636
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
1619
|
-
for (const r of [...e].sort(
|
|
1637
|
+
for (const r of [...e].sort(Ln)) {
|
|
1620
1638
|
const i = n.get(r.emoji);
|
|
1621
1639
|
if (i) {
|
|
1622
1640
|
i.push(r.actor);
|
|
@@ -1629,33 +1647,231 @@ function xo(e) {
|
|
|
1629
1647
|
return { emoji: r, count: i.length, actors: i };
|
|
1630
1648
|
}).sort((r, i) => i.count - r.count || t.indexOf(r.emoji) - t.indexOf(i.emoji));
|
|
1631
1649
|
}
|
|
1632
|
-
const
|
|
1633
|
-
function
|
|
1650
|
+
const Ln = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
1651
|
+
function ua(e, t) {
|
|
1634
1652
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
1635
1653
|
}
|
|
1636
|
-
|
|
1654
|
+
const q = 6e4, Pn = 36e5, k = 864e5, tt = 800;
|
|
1655
|
+
function Ie(e, t) {
|
|
1656
|
+
const n = Date.UTC(e, t + 1, 0);
|
|
1657
|
+
return n - new Date(n).getUTCDay() * k + Pn;
|
|
1658
|
+
}
|
|
1659
|
+
function Un(e) {
|
|
1660
|
+
const t = new Date(e).getUTCFullYear();
|
|
1661
|
+
return e >= Ie(t, 2) && e < Ie(t, 9);
|
|
1662
|
+
}
|
|
1663
|
+
function nt(e, t) {
|
|
1664
|
+
const n = t.dst === "eu" && Un(e) ? 60 : 0;
|
|
1665
|
+
return (t.utcOffsetMinutes + n) * q;
|
|
1666
|
+
}
|
|
1667
|
+
function Kn(e) {
|
|
1668
|
+
return (e + 3) % 7 + 1;
|
|
1669
|
+
}
|
|
1670
|
+
function rt(e, t) {
|
|
1671
|
+
const n = nt(e, t), r = e + n, i = Math.floor(r / k);
|
|
1672
|
+
if (!t.days.includes(Kn(i))) return null;
|
|
1673
|
+
const o = i * k;
|
|
1674
|
+
return {
|
|
1675
|
+
open: o + t.fromMinutes * q - n,
|
|
1676
|
+
close: o + t.toMinutes * q - n
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
function it(e, t) {
|
|
1680
|
+
const n = nt(e, t), r = e + n;
|
|
1681
|
+
return (Math.floor(r / k) + 1) * k - n;
|
|
1682
|
+
}
|
|
1683
|
+
function J(e, t, n) {
|
|
1684
|
+
if (t <= e) return 0;
|
|
1685
|
+
if (!n) return t - e;
|
|
1686
|
+
let r = 0, i = e;
|
|
1687
|
+
for (let o = 0; o < tt && i < t; o++) {
|
|
1688
|
+
const a = rt(i, n);
|
|
1689
|
+
if (a) {
|
|
1690
|
+
const s = Math.max(i, a.open), c = Math.min(t, a.close);
|
|
1691
|
+
c > s && (r += c - s);
|
|
1692
|
+
}
|
|
1693
|
+
i = it(i, n);
|
|
1694
|
+
}
|
|
1695
|
+
return r;
|
|
1696
|
+
}
|
|
1697
|
+
function ne(e, t, n) {
|
|
1698
|
+
if (!n) return e + t;
|
|
1699
|
+
let r = t, i = e;
|
|
1700
|
+
for (let o = 0; o < tt; o++) {
|
|
1701
|
+
const a = rt(i, n);
|
|
1702
|
+
if (a) {
|
|
1703
|
+
const s = Math.max(i, a.open);
|
|
1704
|
+
if (a.close > s) {
|
|
1705
|
+
const c = a.close - s;
|
|
1706
|
+
if (r <= c) return s + r;
|
|
1707
|
+
r -= c;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
i = it(i, n);
|
|
1711
|
+
}
|
|
1712
|
+
return e + t;
|
|
1713
|
+
}
|
|
1714
|
+
function da(e) {
|
|
1715
|
+
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
1716
|
+
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
1717
|
+
}
|
|
1718
|
+
const Z = 1, Q = 2;
|
|
1719
|
+
function pa(e) {
|
|
1720
|
+
return e === "snoozed" ? Z : Q;
|
|
1721
|
+
}
|
|
1722
|
+
function re(e) {
|
|
1723
|
+
const t = e.calendar;
|
|
1724
|
+
return t && Array.isArray(t.days) ? t : null;
|
|
1725
|
+
}
|
|
1726
|
+
const fa = [
|
|
1727
|
+
"speed_of_answer",
|
|
1728
|
+
"first_response",
|
|
1729
|
+
"next_response",
|
|
1730
|
+
"resolution",
|
|
1731
|
+
"close"
|
|
1732
|
+
], ma = ["snoozed", "waiting_for_customer"], Bn = 6e4, ot = ["speed_of_answer", "first_response", "next_response"], jn = [...ot, "resolution", "close"];
|
|
1733
|
+
function v(e) {
|
|
1734
|
+
return e.state === "running" || e.state === "paused";
|
|
1735
|
+
}
|
|
1736
|
+
function Hn(e, t) {
|
|
1737
|
+
return v(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
1738
|
+
}
|
|
1739
|
+
function Me(e) {
|
|
1740
|
+
return v(e) ? { state: "void" } : null;
|
|
1741
|
+
}
|
|
1742
|
+
function Gn(e, t, n, r) {
|
|
1743
|
+
if (!v(e) || (e.pauseBits & t) !== 0) return null;
|
|
1744
|
+
const i = e.pauseBits | t;
|
|
1745
|
+
return e.state === "paused" ? { pauseBits: i } : { pauseBits: i, state: "paused", remainingMs: J(n, e.dueAt, r) };
|
|
1746
|
+
}
|
|
1747
|
+
function Fn(e, t, n, r) {
|
|
1748
|
+
if (!v(e) || (e.pauseBits & t) === 0) return null;
|
|
1749
|
+
const i = e.pauseBits & ~t;
|
|
1750
|
+
return i !== 0 ? { pauseBits: i } : { pauseBits: i, state: "running", dueAt: ne(n, e.remainingMs, r) };
|
|
1751
|
+
}
|
|
1752
|
+
function ga({ event: e, at: t, now: n, clocks: r, profile: i }) {
|
|
1753
|
+
const o = re(i), a = Math.min(t, n), s = r.map((p) => ({ ...p })), c = [], m = (p, f) => {
|
|
1754
|
+
f && (c.push({ op: "patch", clockId: p.id, patch: f }), Object.assign(p, f));
|
|
1755
|
+
}, h = (p) => {
|
|
1756
|
+
for (const f of s)
|
|
1757
|
+
f.metric === p && m(f, Hn(f, a));
|
|
1758
|
+
}, y = (p) => {
|
|
1759
|
+
for (const f of s)
|
|
1760
|
+
p.includes(f.metric) && m(f, Me(f));
|
|
1761
|
+
}, T = (p) => {
|
|
1762
|
+
for (const f of s) m(f, Gn(f, p, a, o));
|
|
1763
|
+
}, M = (p) => {
|
|
1764
|
+
for (const f of s) m(f, Fn(f, p, a, o));
|
|
1765
|
+
}, B = (p) => s.reduce((f, S) => S.metric === p ? Math.max(f, S.attempt) : f, 0) + 1, x = (p) => s.some((f) => f.metric === p && v(f)), N = (p, f) => {
|
|
1766
|
+
const S = i.targets.find((gt) => gt.metric === p);
|
|
1767
|
+
if (!S) return;
|
|
1768
|
+
const ae = S.minutes * Bn;
|
|
1769
|
+
c.push({
|
|
1770
|
+
op: "start",
|
|
1771
|
+
metric: p,
|
|
1772
|
+
attempt: B(p),
|
|
1773
|
+
startedAt: f,
|
|
1774
|
+
targetMs: ae,
|
|
1775
|
+
dueAt: ne(f, ae, o)
|
|
1776
|
+
});
|
|
1777
|
+
};
|
|
1778
|
+
switch (e) {
|
|
1779
|
+
case "apply": {
|
|
1780
|
+
for (const p of s)
|
|
1781
|
+
p.profileId !== i.id && m(p, Me(p));
|
|
1782
|
+
for (const p of i.targets) {
|
|
1783
|
+
if (p.metric === "next_response") continue;
|
|
1784
|
+
s.some(
|
|
1785
|
+
(S) => S.metric === p.metric && S.profileId === i.id
|
|
1786
|
+
) || N(p.metric, a);
|
|
1787
|
+
}
|
|
1788
|
+
break;
|
|
1789
|
+
}
|
|
1790
|
+
case "answered":
|
|
1791
|
+
h("speed_of_answer");
|
|
1792
|
+
break;
|
|
1793
|
+
case "outbound": {
|
|
1794
|
+
h("first_response"), h("next_response"), i.pauseOn.includes("waiting_for_customer") && T(Q);
|
|
1795
|
+
break;
|
|
1796
|
+
}
|
|
1797
|
+
case "inbound": {
|
|
1798
|
+
M(Q), !x("first_response") && !x("next_response") && N("next_response", a);
|
|
1799
|
+
break;
|
|
1800
|
+
}
|
|
1801
|
+
case "resolved":
|
|
1802
|
+
h("resolution");
|
|
1803
|
+
break;
|
|
1804
|
+
case "closed":
|
|
1805
|
+
h("close"), h("resolution"), y(ot);
|
|
1806
|
+
break;
|
|
1807
|
+
case "reopened":
|
|
1808
|
+
x("resolution") || N("resolution", a), x("close") || N("close", a);
|
|
1809
|
+
break;
|
|
1810
|
+
case "snoozed":
|
|
1811
|
+
i.pauseOn.includes("snoozed") && T(Z);
|
|
1812
|
+
break;
|
|
1813
|
+
case "unsnoozed":
|
|
1814
|
+
M(Z);
|
|
1815
|
+
break;
|
|
1816
|
+
case "discarded":
|
|
1817
|
+
y(jn);
|
|
1818
|
+
break;
|
|
1819
|
+
}
|
|
1820
|
+
return c;
|
|
1821
|
+
}
|
|
1822
|
+
function Wn(e) {
|
|
1823
|
+
return e.state === "running" || e.state === "paused";
|
|
1824
|
+
}
|
|
1825
|
+
function ee(e, t) {
|
|
1826
|
+
const n = re(e);
|
|
1827
|
+
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -J(e.dueAt, t, n) : J(t, e.dueAt, n);
|
|
1828
|
+
}
|
|
1829
|
+
function ha(e, t) {
|
|
1830
|
+
return e.state === "paused" ? ne(t, e.remainingMs, re(e)) : e.dueAt;
|
|
1831
|
+
}
|
|
1832
|
+
function ya(e, t) {
|
|
1833
|
+
const n = e.filter(Wn);
|
|
1834
|
+
if (!n.length) return;
|
|
1835
|
+
const r = n.filter((o) => o.state === "running");
|
|
1836
|
+
return (r.length ? r : n).reduce(
|
|
1837
|
+
(o, a) => ee(a, t) < ee(o, t) ? a : o
|
|
1838
|
+
);
|
|
1839
|
+
}
|
|
1840
|
+
function ba(e, t) {
|
|
1841
|
+
if (e.state === "missed") return "breached";
|
|
1842
|
+
if (e.state === "hit") return "met";
|
|
1843
|
+
if (e.state === "paused") return "paused";
|
|
1844
|
+
if (e.state === "void") return "met";
|
|
1845
|
+
const n = ee(e, t);
|
|
1846
|
+
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
1847
|
+
}
|
|
1848
|
+
function Aa(e) {
|
|
1849
|
+
const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60);
|
|
1850
|
+
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? i ? `${r}u ${i}m` : `${r}u` : i ? `${i}m` : `${t % 60}s`;
|
|
1851
|
+
}
|
|
1852
|
+
function Ea(e, t) {
|
|
1637
1853
|
const n = e.accumulatedSeconds || 0;
|
|
1638
1854
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
1639
1855
|
}
|
|
1640
|
-
function
|
|
1856
|
+
function Sa(e, t) {
|
|
1641
1857
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
1642
1858
|
if (!t || t === "exact") return n * 60;
|
|
1643
1859
|
const r = Number(t);
|
|
1644
1860
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
1645
1861
|
}
|
|
1646
|
-
function
|
|
1862
|
+
function _a(e) {
|
|
1647
1863
|
const t = Math.max(0, Math.round(e / 60));
|
|
1648
1864
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
1649
1865
|
}
|
|
1650
|
-
function
|
|
1866
|
+
function Ta(e) {
|
|
1651
1867
|
const t = Math.max(0, Math.floor(e)), n = (o) => String(o).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
|
|
1652
1868
|
return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
1653
1869
|
}
|
|
1654
|
-
function
|
|
1870
|
+
function Vn(e) {
|
|
1655
1871
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
1656
1872
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const n =
|
|
1873
|
+
function wa(e, t) {
|
|
1874
|
+
const n = Vn(e) || "werksoort", r = new Set(t);
|
|
1659
1875
|
if (!r.has(n)) return n;
|
|
1660
1876
|
for (let i = 2; i < 500; i++) {
|
|
1661
1877
|
const o = `${n}-${i}`;
|
|
@@ -1663,96 +1879,96 @@ function Po(e, t) {
|
|
|
1663
1879
|
}
|
|
1664
1880
|
return `${n}-${r.size + 1}`;
|
|
1665
1881
|
}
|
|
1666
|
-
function
|
|
1882
|
+
function Ia(e, t) {
|
|
1667
1883
|
const n = e.ownerScope;
|
|
1668
1884
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
1669
1885
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return e.filter((t) => !t.archived).sort(
|
|
1886
|
+
function Ma(e) {
|
|
1887
|
+
return e.filter((t) => !t.archived).sort(zn);
|
|
1672
1888
|
}
|
|
1673
|
-
function
|
|
1889
|
+
function zn(e, t) {
|
|
1674
1890
|
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
1675
1891
|
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
1676
1892
|
}
|
|
1677
|
-
const
|
|
1678
|
-
function
|
|
1893
|
+
const Xn = 20, Yn = 20, W = 300;
|
|
1894
|
+
function I(e) {
|
|
1679
1895
|
return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
1680
1896
|
}
|
|
1681
|
-
function
|
|
1897
|
+
function qn(e) {
|
|
1682
1898
|
const t = e.replace(/\s+/g, " ").trim();
|
|
1683
|
-
if (t.length <=
|
|
1684
|
-
const n = t.slice(0,
|
|
1685
|
-
return r >
|
|
1686
|
-
}
|
|
1687
|
-
function
|
|
1688
|
-
const n =
|
|
1689
|
-
if (!r || (e.examples ?? []).some((a) =>
|
|
1690
|
-
const i = e.exampleCandidates ?? [], o = i.findIndex((a) =>
|
|
1899
|
+
if (t.length <= W) return t;
|
|
1900
|
+
const n = t.slice(0, W), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
1901
|
+
return r > W * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
1902
|
+
}
|
|
1903
|
+
function Oa(e, t) {
|
|
1904
|
+
const n = qn(t.text), r = I(n);
|
|
1905
|
+
if (!r || (e.examples ?? []).some((a) => I(a) === r)) return null;
|
|
1906
|
+
const i = e.exampleCandidates ?? [], o = i.findIndex((a) => I(a.text) === r);
|
|
1691
1907
|
if (o >= 0) {
|
|
1692
1908
|
if (i[o].corrected || !t.corrected) return null;
|
|
1693
1909
|
const a = [...i];
|
|
1694
|
-
return a[o] = { ...a[o], corrected: !0, addedAt: t.addedAt },
|
|
1910
|
+
return a[o] = { ...a[o], corrected: !0, addedAt: t.addedAt }, Oe(a);
|
|
1695
1911
|
}
|
|
1696
|
-
return
|
|
1912
|
+
return Oe([{ ...t, text: n }, ...i]).slice(0, Yn);
|
|
1697
1913
|
}
|
|
1698
|
-
function
|
|
1914
|
+
function Oe(e) {
|
|
1699
1915
|
return [...e].sort(
|
|
1700
1916
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
1701
1917
|
);
|
|
1702
1918
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const n =
|
|
1705
|
-
return { examples: r.some((o) =>
|
|
1919
|
+
function Ca(e, t) {
|
|
1920
|
+
const n = I(t), r = (e.examples ?? []).filter((o) => o.trim());
|
|
1921
|
+
return { examples: r.some((o) => I(o) === n) ? r : [...r, t].slice(-Xn), exampleCandidates: Jn(e, t) };
|
|
1706
1922
|
}
|
|
1707
|
-
function
|
|
1708
|
-
const n =
|
|
1709
|
-
return (e.exampleCandidates ?? []).filter((r) =>
|
|
1923
|
+
function Jn(e, t) {
|
|
1924
|
+
const n = I(t);
|
|
1925
|
+
return (e.exampleCandidates ?? []).filter((r) => I(r.text) !== n);
|
|
1710
1926
|
}
|
|
1711
|
-
function
|
|
1927
|
+
function Zn(e, t) {
|
|
1712
1928
|
const n = e.ownerScope;
|
|
1713
1929
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
1714
1930
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return e.filter((n) =>
|
|
1931
|
+
function ka(e, t) {
|
|
1932
|
+
return e.filter((n) => Zn(n, t));
|
|
1717
1933
|
}
|
|
1718
|
-
function
|
|
1934
|
+
function va(e) {
|
|
1719
1935
|
return e.type === "agent";
|
|
1720
1936
|
}
|
|
1721
|
-
const
|
|
1722
|
-
function
|
|
1937
|
+
const xa = "WORK_COMMENT_ADDED", Na = "WORK_ITEM_ASSIGNED", Ra = "WORK_ITEM_STATUS_CHANGED";
|
|
1938
|
+
function Qn(e, t) {
|
|
1723
1939
|
const n = (r) => {
|
|
1724
1940
|
const i = new Date(r);
|
|
1725
1941
|
return i.setHours(0, 0, 0, 0), i.getTime();
|
|
1726
1942
|
};
|
|
1727
|
-
return Math.round((n(e) - n(t)) /
|
|
1943
|
+
return Math.round((n(e) - n(t)) / qt);
|
|
1728
1944
|
}
|
|
1729
|
-
function
|
|
1730
|
-
if (e.closedAt != null) return { score:
|
|
1945
|
+
function Da(e, t) {
|
|
1946
|
+
if (e.closedAt != null) return { score: w, reasons: [] };
|
|
1731
1947
|
const n = t.remindersById?.[e.id];
|
|
1732
|
-
if (n && n.remindAt > t.now) return { score:
|
|
1948
|
+
if (n && n.remindAt > t.now) return { score: w, reasons: [] };
|
|
1733
1949
|
let r = 0;
|
|
1734
1950
|
const i = [], o = e.priority ?? "normal";
|
|
1735
|
-
if (
|
|
1736
|
-
const a =
|
|
1951
|
+
if (P[o] > 0 && (r += P[o], i.push(`priority:${o}`)), typeof e.dueDate == "number") {
|
|
1952
|
+
const a = Qn(e.dueDate, t.now);
|
|
1737
1953
|
a < 0 ? (r += 35, i.push("overdue")) : a === 0 && (r += 20, i.push("due-today"));
|
|
1738
1954
|
}
|
|
1739
1955
|
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, i.push(`auto:${e.source.systemReason}`)), { score: r, reasons: i };
|
|
1740
1956
|
}
|
|
1741
|
-
const
|
|
1742
|
-
function
|
|
1743
|
-
return `${
|
|
1957
|
+
const er = "work_item", tr = "work_project", nr = "work_activity";
|
|
1958
|
+
function rr(e) {
|
|
1959
|
+
return `${er}:${e}`;
|
|
1744
1960
|
}
|
|
1745
|
-
function
|
|
1746
|
-
return `${
|
|
1961
|
+
function at(e) {
|
|
1962
|
+
return `${tr}:${e}`;
|
|
1747
1963
|
}
|
|
1748
|
-
function
|
|
1749
|
-
return `${
|
|
1964
|
+
function $a(e) {
|
|
1965
|
+
return `${nr}:${e}`;
|
|
1750
1966
|
}
|
|
1751
|
-
function
|
|
1967
|
+
function La(e, t, n) {
|
|
1752
1968
|
const r = `${e}-${t}`;
|
|
1753
1969
|
return n ? `${r}-${n}` : r;
|
|
1754
1970
|
}
|
|
1755
|
-
function
|
|
1971
|
+
function Pa(e) {
|
|
1756
1972
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
1757
1973
|
return t ? {
|
|
1758
1974
|
projectKey: t[1].toUpperCase(),
|
|
@@ -1760,52 +1976,52 @@ function qo(e) {
|
|
|
1760
1976
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
1761
1977
|
} : null;
|
|
1762
1978
|
}
|
|
1763
|
-
function
|
|
1979
|
+
function Ua(e) {
|
|
1764
1980
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
1765
1981
|
}
|
|
1766
|
-
function
|
|
1767
|
-
const n = /* @__PURE__ */ new Set([
|
|
1768
|
-
e.projectId && n.add(
|
|
1982
|
+
function Ka(e, t = 25) {
|
|
1983
|
+
const n = /* @__PURE__ */ new Set([rr(e.id)]);
|
|
1984
|
+
e.projectId && n.add(at(e.projectId));
|
|
1769
1985
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
1770
1986
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
1771
1987
|
return Array.from(n).slice(0, t);
|
|
1772
1988
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return [
|
|
1989
|
+
function Ba(e) {
|
|
1990
|
+
return [at(e.id)];
|
|
1775
1991
|
}
|
|
1776
|
-
const
|
|
1992
|
+
const ie = [
|
|
1777
1993
|
{ key: "open", label: "status_open", category: "todo", order: 0 },
|
|
1778
1994
|
{ key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
|
|
1779
1995
|
{ key: "done", label: "status_done", category: "done", order: 2 },
|
|
1780
1996
|
{ key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
|
|
1781
|
-
],
|
|
1782
|
-
function
|
|
1783
|
-
return e?.statuses?.length ? e.statuses :
|
|
1997
|
+
], st = ie.map((e) => e.key);
|
|
1998
|
+
function ir(e) {
|
|
1999
|
+
return e?.statuses?.length ? e.statuses : ie;
|
|
1784
2000
|
}
|
|
1785
|
-
function
|
|
2001
|
+
function or(e, t) {
|
|
1786
2002
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
1787
2003
|
}
|
|
1788
|
-
function
|
|
2004
|
+
function ja(e, t) {
|
|
1789
2005
|
return t.find((n) => n.key === e);
|
|
1790
2006
|
}
|
|
1791
|
-
function
|
|
1792
|
-
const t =
|
|
1793
|
-
return n && t.some((r) => r.key === n) ? n :
|
|
2007
|
+
function Ha(e) {
|
|
2008
|
+
const t = ir(e), n = e?.defaultStatusKey;
|
|
2009
|
+
return n && t.some((r) => r.key === n) ? n : ar(t)[0]?.key ?? ie[0].key;
|
|
1794
2010
|
}
|
|
1795
|
-
function
|
|
2011
|
+
function ar(e) {
|
|
1796
2012
|
return [...e].sort((t, n) => {
|
|
1797
2013
|
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
1798
2014
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
1799
2015
|
});
|
|
1800
2016
|
}
|
|
1801
|
-
function
|
|
1802
|
-
return
|
|
2017
|
+
function Ga(e, t) {
|
|
2018
|
+
return or(e, t) === "done";
|
|
1803
2019
|
}
|
|
1804
|
-
function
|
|
2020
|
+
function sr(e) {
|
|
1805
2021
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
1806
2022
|
}
|
|
1807
|
-
function
|
|
1808
|
-
const n =
|
|
2023
|
+
function Fa(e, t) {
|
|
2024
|
+
const n = sr(e) || "status", r = /* @__PURE__ */ new Set([...t, ...st]);
|
|
1809
2025
|
if (!r.has(n)) return n;
|
|
1810
2026
|
for (let i = 2; i < 500; i++) {
|
|
1811
2027
|
const o = `${n}-${i}`;
|
|
@@ -1813,7 +2029,7 @@ function ra(e, t) {
|
|
|
1813
2029
|
}
|
|
1814
2030
|
return `${n}-${r.size + 1}`;
|
|
1815
2031
|
}
|
|
1816
|
-
function
|
|
2032
|
+
function Wa(e) {
|
|
1817
2033
|
const t = [];
|
|
1818
2034
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
1819
2035
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -1822,10 +2038,10 @@ function ia(e) {
|
|
|
1822
2038
|
t.push({ index: i, reason: "missing_key" });
|
|
1823
2039
|
return;
|
|
1824
2040
|
}
|
|
1825
|
-
|
|
2041
|
+
st.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
|
|
1826
2042
|
}), e.some((r) => r.category === "todo" || r.category === "in_progress") || t.push({ index: -1, reason: "no_open" }), e.some((r) => r.category === "done") || t.push({ index: -1, reason: "no_done" }), t;
|
|
1827
2043
|
}
|
|
1828
|
-
const
|
|
2044
|
+
const cr = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), lr = /* @__PURE__ */ new Set([
|
|
1829
2045
|
"text/plain",
|
|
1830
2046
|
"text/markdown",
|
|
1831
2047
|
"text/csv",
|
|
@@ -1834,67 +2050,67 @@ const vn = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
1834
2050
|
"application/xml",
|
|
1835
2051
|
"text/xml"
|
|
1836
2052
|
]);
|
|
1837
|
-
function
|
|
2053
|
+
function ur(e) {
|
|
1838
2054
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
1839
|
-
return t ?
|
|
1840
|
-
}
|
|
1841
|
-
const
|
|
1842
|
-
image: 5 *
|
|
1843
|
-
pdf: 20 *
|
|
1844
|
-
text: 1 *
|
|
1845
|
-
audio: 20 *
|
|
1846
|
-
},
|
|
1847
|
-
function
|
|
1848
|
-
const n =
|
|
1849
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
1850
|
-
}
|
|
1851
|
-
function
|
|
2055
|
+
return t ? cr.has(t) ? "image" : t === "application/pdf" ? "pdf" : lr.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
2056
|
+
}
|
|
2057
|
+
const O = 1024 * 1024, dr = {
|
|
2058
|
+
image: 5 * O,
|
|
2059
|
+
pdf: 20 * O,
|
|
2060
|
+
text: 1 * O,
|
|
2061
|
+
audio: 20 * O
|
|
2062
|
+
}, Va = 25 * O, za = 5;
|
|
2063
|
+
function Xa(e, t) {
|
|
2064
|
+
const n = ur(e);
|
|
2065
|
+
return n === "unsupported" ? "unsupported" : t > dr[n] ? "too-large" : null;
|
|
2066
|
+
}
|
|
2067
|
+
function Ya(e) {
|
|
1852
2068
|
return e.access !== "read" && e.effect !== "internal";
|
|
1853
2069
|
}
|
|
1854
|
-
function
|
|
2070
|
+
function pr(e) {
|
|
1855
2071
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
1856
2072
|
}
|
|
1857
|
-
function
|
|
2073
|
+
function qa(e, t = []) {
|
|
1858
2074
|
const n = new Set(t), r = [], i = [];
|
|
1859
2075
|
for (const o of e) {
|
|
1860
|
-
const a =
|
|
2076
|
+
const a = pr(o);
|
|
1861
2077
|
n.has(a) || (n.add(a), r.push(o), i.push(a));
|
|
1862
2078
|
}
|
|
1863
2079
|
return { sources: r, keys: i };
|
|
1864
2080
|
}
|
|
1865
|
-
const
|
|
1866
|
-
function
|
|
2081
|
+
const Ja = "assist-source", Za = ["blocking", "due", "open"];
|
|
2082
|
+
function Qa(e, t) {
|
|
1867
2083
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
1868
2084
|
return n === t && r ? r : void 0;
|
|
1869
2085
|
}
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
2086
|
+
const Ce = { blocking: 0, due: 1, open: 2 };
|
|
2087
|
+
function es(e, t) {
|
|
2088
|
+
return Ce[e.band ?? "open"] - Ce[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
1873
2089
|
}
|
|
1874
|
-
function
|
|
2090
|
+
function ts(e) {
|
|
1875
2091
|
return e.sessions.filter(
|
|
1876
2092
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
1877
2093
|
);
|
|
1878
2094
|
}
|
|
1879
|
-
function
|
|
2095
|
+
function ns(e) {
|
|
1880
2096
|
return e.sessions.filter(
|
|
1881
2097
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
1882
2098
|
);
|
|
1883
2099
|
}
|
|
1884
|
-
function
|
|
2100
|
+
function rs(e) {
|
|
1885
2101
|
return e.sessions.some(
|
|
1886
2102
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
1887
2103
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
1888
2104
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((a) => !n.has(a.intent)).map((a) =>
|
|
2105
|
+
function fr(e, t) {
|
|
2106
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((a) => !n.has(a.intent)).map((a) => gr(a, r[a.intent]));
|
|
1891
2107
|
if (!e.extraIntents || e.extraIntents.length === 0) return i;
|
|
1892
2108
|
const o = new Set(i.map((a) => a.intent));
|
|
1893
2109
|
for (const a of e.extraIntents)
|
|
1894
2110
|
o.has(a.intent) || (i.push(a), o.add(a.intent));
|
|
1895
2111
|
return i;
|
|
1896
2112
|
}
|
|
1897
|
-
function
|
|
2113
|
+
function mr(e, t) {
|
|
1898
2114
|
const n = {};
|
|
1899
2115
|
for (const r of e.intents) {
|
|
1900
2116
|
if (!r.togglable) continue;
|
|
@@ -1903,46 +2119,46 @@ function Ln(e, t) {
|
|
|
1903
2119
|
}
|
|
1904
2120
|
return n;
|
|
1905
2121
|
}
|
|
1906
|
-
function
|
|
1907
|
-
const n =
|
|
2122
|
+
function is(e, t) {
|
|
2123
|
+
const n = mr(e, t);
|
|
1908
2124
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
1909
2125
|
}
|
|
1910
|
-
function
|
|
2126
|
+
function gr(e, t) {
|
|
1911
2127
|
return t ? {
|
|
1912
2128
|
intent: t.intent ?? e.intent,
|
|
1913
2129
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
1914
2130
|
transport: t.transport ?? e.transport
|
|
1915
2131
|
} : e;
|
|
1916
2132
|
}
|
|
1917
|
-
function
|
|
2133
|
+
function os(e, t) {
|
|
1918
2134
|
const n = [];
|
|
1919
2135
|
for (const r of e) {
|
|
1920
2136
|
if (!r.enabled) continue;
|
|
1921
2137
|
const i = t[r.providerId];
|
|
1922
2138
|
if (i)
|
|
1923
|
-
for (const o of
|
|
2139
|
+
for (const o of fr(r, i))
|
|
1924
2140
|
n.push({ channel: r, description: i, capability: o });
|
|
1925
2141
|
}
|
|
1926
2142
|
return n;
|
|
1927
2143
|
}
|
|
1928
|
-
function
|
|
2144
|
+
function as(e, t) {
|
|
1929
2145
|
return t.filter((n) => n.capability.intent === e);
|
|
1930
2146
|
}
|
|
1931
|
-
function
|
|
2147
|
+
function hr(e, t) {
|
|
1932
2148
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
1933
2149
|
}
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
2150
|
+
function ss(e, t) {
|
|
2151
|
+
return hr(e.scheme, t);
|
|
1936
2152
|
}
|
|
1937
|
-
function
|
|
2153
|
+
function cs(e, t, n) {
|
|
1938
2154
|
const r = [];
|
|
1939
2155
|
for (const i of e)
|
|
1940
2156
|
for (const o of n)
|
|
1941
2157
|
o.capability.intent === t && o.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: o, endpoint: i });
|
|
1942
2158
|
return r;
|
|
1943
2159
|
}
|
|
1944
|
-
var
|
|
1945
|
-
const
|
|
2160
|
+
var yr = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(yr || {});
|
|
2161
|
+
const br = {
|
|
1946
2162
|
mailto: "mail",
|
|
1947
2163
|
sip: "tel",
|
|
1948
2164
|
tel: "tel",
|
|
@@ -1963,10 +2179,10 @@ const jn = {
|
|
|
1963
2179
|
id: "note",
|
|
1964
2180
|
custom: "note"
|
|
1965
2181
|
};
|
|
1966
|
-
function
|
|
1967
|
-
return e ?
|
|
2182
|
+
function ls(e) {
|
|
2183
|
+
return e ? br[e] ?? "note" : "note";
|
|
1968
2184
|
}
|
|
1969
|
-
const
|
|
2185
|
+
const us = "message_window", ds = "message_templates", ps = {
|
|
1970
2186
|
// E-mail
|
|
1971
2187
|
FROM: "from",
|
|
1972
2188
|
TO: "to",
|
|
@@ -1983,12 +2199,12 @@ const Ta = "message_window", wa = "message_templates", Ia = {
|
|
|
1983
2199
|
// Voice/conference
|
|
1984
2200
|
HOST: "host",
|
|
1985
2201
|
PARTICIPANT: "participant"
|
|
1986
|
-
},
|
|
2202
|
+
}, fs = (e, t) => ({ intent: e, ...t }), ms = "folder_management", gs = "remote_search", hs = "message_reactions", ys = {
|
|
1987
2203
|
ok: !1,
|
|
1988
2204
|
code: "UNSUPPORTED",
|
|
1989
2205
|
message: "Provider does not support this op"
|
|
1990
|
-
},
|
|
1991
|
-
function
|
|
2206
|
+
}, bs = "context.collect", d = (e) => ({ type: "string", description: e }), u = (e) => ({ type: "number", description: e }), $ = (e) => ({ type: "boolean", description: e }), E = d("Sheet name. Omit for the sheet the user is looking at."), ke = d("Slide id, as `inspect` reports it.");
|
|
2207
|
+
function l(e, t, n, r, i, o) {
|
|
1992
2208
|
return {
|
|
1993
2209
|
op: e,
|
|
1994
2210
|
kinds: t,
|
|
@@ -1998,24 +2214,24 @@ function c(e, t, n, r, i, o) {
|
|
|
1998
2214
|
visible: o.visible
|
|
1999
2215
|
};
|
|
2000
2216
|
}
|
|
2001
|
-
const
|
|
2002
|
-
|
|
2217
|
+
const C = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, ve = { undoable: !1, visible: !0 }, U = { undoable: !1, visible: !1 }, Ar = [
|
|
2218
|
+
l(
|
|
2003
2219
|
"pdf.goToPage",
|
|
2004
2220
|
["pdf"],
|
|
2005
2221
|
"Scroll the viewer to a page.",
|
|
2006
|
-
{ page:
|
|
2222
|
+
{ page: u("1-based page number.") },
|
|
2007
2223
|
["page"],
|
|
2008
|
-
|
|
2224
|
+
C
|
|
2009
2225
|
),
|
|
2010
|
-
|
|
2226
|
+
l(
|
|
2011
2227
|
"pdf.search",
|
|
2012
2228
|
["pdf"],
|
|
2013
2229
|
"Search the document and highlight the matches, as the find bar does.",
|
|
2014
|
-
{ query:
|
|
2230
|
+
{ query: d("Text to find."), next: $("Jump to the next match instead of the first.") },
|
|
2015
2231
|
["query"],
|
|
2016
|
-
|
|
2232
|
+
C
|
|
2017
2233
|
),
|
|
2018
|
-
|
|
2234
|
+
l(
|
|
2019
2235
|
"pdf.setTool",
|
|
2020
2236
|
["pdf"],
|
|
2021
2237
|
"Select a markup tool for the user, so their next click draws it.",
|
|
@@ -2027,23 +2243,23 @@ const T = { undoable: !1, visible: !0 }, p = { undoable: !0, visible: !0 }, pe =
|
|
|
2027
2243
|
}
|
|
2028
2244
|
},
|
|
2029
2245
|
["tool"],
|
|
2030
|
-
|
|
2246
|
+
C
|
|
2031
2247
|
),
|
|
2032
|
-
|
|
2248
|
+
l(
|
|
2033
2249
|
"pdf.fillField",
|
|
2034
2250
|
["pdf"],
|
|
2035
2251
|
"Fill one form field of a fillable PDF.",
|
|
2036
2252
|
{
|
|
2037
|
-
field:
|
|
2253
|
+
field: d("Field name, exactly as `inspect` reports it under `fields`."),
|
|
2038
2254
|
value: {
|
|
2039
2255
|
type: ["string", "boolean"],
|
|
2040
2256
|
description: "Text for a text field, true/false for a checkbox or radio."
|
|
2041
2257
|
}
|
|
2042
2258
|
},
|
|
2043
2259
|
["field", "value"],
|
|
2044
|
-
|
|
2260
|
+
g
|
|
2045
2261
|
),
|
|
2046
|
-
|
|
2262
|
+
l(
|
|
2047
2263
|
"pdf.reorderPages",
|
|
2048
2264
|
["pdf"],
|
|
2049
2265
|
"Put the pages in a different order. Pages left out are deleted.",
|
|
@@ -2055,52 +2271,52 @@ const T = { undoable: !1, visible: !0 }, p = { undoable: !0, visible: !0 }, pe =
|
|
|
2055
2271
|
}
|
|
2056
2272
|
},
|
|
2057
2273
|
["order"],
|
|
2058
|
-
|
|
2274
|
+
ve
|
|
2059
2275
|
),
|
|
2060
|
-
|
|
2276
|
+
l(
|
|
2061
2277
|
"pdf.deletePages",
|
|
2062
2278
|
["pdf"],
|
|
2063
2279
|
"Remove pages, keeping the rest in order.",
|
|
2064
2280
|
{ pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
|
|
2065
2281
|
["pages"],
|
|
2066
|
-
|
|
2282
|
+
ve
|
|
2067
2283
|
),
|
|
2068
|
-
|
|
2284
|
+
l(
|
|
2069
2285
|
"pdf.addNote",
|
|
2070
2286
|
["pdf"],
|
|
2071
2287
|
"Place a text note on a page. Written on save; not visible before that.",
|
|
2072
2288
|
{
|
|
2073
|
-
page:
|
|
2074
|
-
text:
|
|
2075
|
-
left:
|
|
2076
|
-
top:
|
|
2077
|
-
width:
|
|
2078
|
-
height:
|
|
2079
|
-
fontSize:
|
|
2289
|
+
page: u("1-based page number."),
|
|
2290
|
+
text: d("The note's text."),
|
|
2291
|
+
left: u("Distance from the left edge, in PDF points (72 per inch)."),
|
|
2292
|
+
top: u("Distance from the top edge, in PDF points."),
|
|
2293
|
+
width: u("Box width in points. Omit for a sensible default."),
|
|
2294
|
+
height: u("Box height in points. Omit for a sensible default."),
|
|
2295
|
+
fontSize: u("Font size in points. Omit for 12.")
|
|
2080
2296
|
},
|
|
2081
2297
|
["page", "text", "left", "top"],
|
|
2082
|
-
|
|
2298
|
+
U
|
|
2083
2299
|
),
|
|
2084
|
-
|
|
2300
|
+
l(
|
|
2085
2301
|
"pdf.highlightText",
|
|
2086
2302
|
["pdf"],
|
|
2087
2303
|
"Highlight a phrase on a page. Written on save; not visible before that.",
|
|
2088
2304
|
{
|
|
2089
|
-
page:
|
|
2090
|
-
text:
|
|
2091
|
-
occurrence:
|
|
2305
|
+
page: u("1-based page number."),
|
|
2306
|
+
text: d("The exact phrase to highlight, as it appears in the page's text."),
|
|
2307
|
+
occurrence: u("Which occurrence on that page, 1-based. Omit for the first.")
|
|
2092
2308
|
},
|
|
2093
2309
|
["page", "text"],
|
|
2094
|
-
|
|
2310
|
+
U
|
|
2095
2311
|
)
|
|
2096
|
-
],
|
|
2097
|
-
|
|
2312
|
+
], Er = [
|
|
2313
|
+
l(
|
|
2098
2314
|
"sheet.setValues",
|
|
2099
2315
|
["sheet"],
|
|
2100
2316
|
"Write a block of values. The block's shape must match the range.",
|
|
2101
2317
|
{
|
|
2102
|
-
sheet:
|
|
2103
|
-
range:
|
|
2318
|
+
sheet: E,
|
|
2319
|
+
range: d("A1 notation, e.g. `B2:D5` or a single `A1`."),
|
|
2104
2320
|
values: {
|
|
2105
2321
|
type: "array",
|
|
2106
2322
|
items: { type: "array", items: { type: ["string", "number", "boolean", "null"] } },
|
|
@@ -2108,261 +2324,261 @@ const T = { undoable: !1, visible: !0 }, p = { undoable: !0, visible: !0 }, pe =
|
|
|
2108
2324
|
}
|
|
2109
2325
|
},
|
|
2110
2326
|
["range", "values"],
|
|
2111
|
-
|
|
2327
|
+
g
|
|
2112
2328
|
),
|
|
2113
|
-
|
|
2329
|
+
l(
|
|
2114
2330
|
"sheet.setFormula",
|
|
2115
2331
|
["sheet"],
|
|
2116
2332
|
"Put a formula in every cell of a range.",
|
|
2117
|
-
{ sheet:
|
|
2333
|
+
{ sheet: E, range: d("A1 notation."), formula: d("Including the leading `=`.") },
|
|
2118
2334
|
["range", "formula"],
|
|
2119
|
-
|
|
2335
|
+
g
|
|
2120
2336
|
),
|
|
2121
|
-
|
|
2337
|
+
l(
|
|
2122
2338
|
"sheet.setStyle",
|
|
2123
2339
|
["sheet"],
|
|
2124
2340
|
"Change the look of a range. Only the properties you pass are touched.",
|
|
2125
2341
|
{
|
|
2126
|
-
sheet:
|
|
2127
|
-
range:
|
|
2128
|
-
bold:
|
|
2129
|
-
italic:
|
|
2130
|
-
fontSize:
|
|
2131
|
-
fontColor:
|
|
2132
|
-
background:
|
|
2342
|
+
sheet: E,
|
|
2343
|
+
range: d("A1 notation."),
|
|
2344
|
+
bold: $("Bold on or off."),
|
|
2345
|
+
italic: $("Italic on or off."),
|
|
2346
|
+
fontSize: u("Point size."),
|
|
2347
|
+
fontColor: d("CSS colour, e.g. `#b91c1c`."),
|
|
2348
|
+
background: d("CSS colour for the cell fill."),
|
|
2133
2349
|
horizontalAlignment: {
|
|
2134
2350
|
type: "string",
|
|
2135
2351
|
enum: ["left", "center", "right"],
|
|
2136
2352
|
description: "Horizontal alignment."
|
|
2137
2353
|
},
|
|
2138
|
-
numberFormat:
|
|
2354
|
+
numberFormat: d("Number format pattern, e.g. `#,##0.00` or `0%`.")
|
|
2139
2355
|
},
|
|
2140
2356
|
["range"],
|
|
2141
|
-
|
|
2357
|
+
g
|
|
2142
2358
|
),
|
|
2143
|
-
|
|
2359
|
+
l(
|
|
2144
2360
|
"sheet.insertRows",
|
|
2145
2361
|
["sheet"],
|
|
2146
2362
|
"Insert empty rows, pushing the rest down.",
|
|
2147
2363
|
{
|
|
2148
|
-
sheet:
|
|
2149
|
-
at:
|
|
2150
|
-
count:
|
|
2364
|
+
sheet: E,
|
|
2365
|
+
at: u("1-based row number to insert before."),
|
|
2366
|
+
count: u("How many. Omit for 1.")
|
|
2151
2367
|
},
|
|
2152
2368
|
["at"],
|
|
2153
|
-
|
|
2369
|
+
g
|
|
2154
2370
|
),
|
|
2155
|
-
|
|
2371
|
+
l(
|
|
2156
2372
|
"sheet.deleteRows",
|
|
2157
2373
|
["sheet"],
|
|
2158
2374
|
"Delete rows, pulling the rest up.",
|
|
2159
|
-
{ sheet:
|
|
2375
|
+
{ sheet: E, at: u("1-based first row to delete."), count: u("How many. Omit for 1.") },
|
|
2160
2376
|
["at"],
|
|
2161
|
-
|
|
2377
|
+
g
|
|
2162
2378
|
),
|
|
2163
|
-
|
|
2379
|
+
l(
|
|
2164
2380
|
"sheet.insertColumns",
|
|
2165
2381
|
["sheet"],
|
|
2166
2382
|
"Insert empty columns, pushing the rest right.",
|
|
2167
2383
|
{
|
|
2168
|
-
sheet:
|
|
2169
|
-
at:
|
|
2170
|
-
count:
|
|
2384
|
+
sheet: E,
|
|
2385
|
+
at: u("1-based column number to insert before."),
|
|
2386
|
+
count: u("How many. Omit for 1.")
|
|
2171
2387
|
},
|
|
2172
2388
|
["at"],
|
|
2173
|
-
|
|
2389
|
+
g
|
|
2174
2390
|
),
|
|
2175
|
-
|
|
2391
|
+
l(
|
|
2176
2392
|
"sheet.deleteColumns",
|
|
2177
2393
|
["sheet"],
|
|
2178
2394
|
"Delete columns, pulling the rest left.",
|
|
2179
2395
|
{
|
|
2180
|
-
sheet:
|
|
2181
|
-
at:
|
|
2182
|
-
count:
|
|
2396
|
+
sheet: E,
|
|
2397
|
+
at: u("1-based first column to delete."),
|
|
2398
|
+
count: u("How many. Omit for 1.")
|
|
2183
2399
|
},
|
|
2184
2400
|
["at"],
|
|
2185
|
-
|
|
2401
|
+
g
|
|
2186
2402
|
),
|
|
2187
|
-
|
|
2403
|
+
l(
|
|
2188
2404
|
"sheet.merge",
|
|
2189
2405
|
["sheet"],
|
|
2190
2406
|
"Merge a range into one cell.",
|
|
2191
|
-
{ sheet:
|
|
2407
|
+
{ sheet: E, range: d("A1 notation.") },
|
|
2192
2408
|
["range"],
|
|
2193
|
-
|
|
2409
|
+
g
|
|
2194
2410
|
),
|
|
2195
|
-
|
|
2411
|
+
l(
|
|
2196
2412
|
"sheet.unmerge",
|
|
2197
2413
|
["sheet"],
|
|
2198
2414
|
"Break merged cells in a range apart.",
|
|
2199
|
-
{ sheet:
|
|
2415
|
+
{ sheet: E, range: d("A1 notation.") },
|
|
2200
2416
|
["range"],
|
|
2201
|
-
|
|
2417
|
+
g
|
|
2202
2418
|
),
|
|
2203
|
-
|
|
2419
|
+
l(
|
|
2204
2420
|
"sheet.sort",
|
|
2205
2421
|
["sheet"],
|
|
2206
2422
|
"Sort a range on one of its columns.",
|
|
2207
2423
|
{
|
|
2208
|
-
sheet:
|
|
2209
|
-
range:
|
|
2210
|
-
column:
|
|
2211
|
-
ascending:
|
|
2424
|
+
sheet: E,
|
|
2425
|
+
range: d("A1 notation covering the rows to sort, header excluded."),
|
|
2426
|
+
column: u("1-based column *within the range*, not within the sheet."),
|
|
2427
|
+
ascending: $("Ascending. Omit for ascending.")
|
|
2212
2428
|
},
|
|
2213
2429
|
["range", "column"],
|
|
2214
|
-
|
|
2430
|
+
g
|
|
2215
2431
|
),
|
|
2216
|
-
|
|
2432
|
+
l(
|
|
2217
2433
|
"sheet.insertSheet",
|
|
2218
2434
|
["sheet"],
|
|
2219
2435
|
"Add a new sheet.",
|
|
2220
|
-
{ name:
|
|
2436
|
+
{ name: d("Name for the new sheet.") },
|
|
2221
2437
|
["name"],
|
|
2222
|
-
|
|
2438
|
+
g
|
|
2223
2439
|
),
|
|
2224
|
-
|
|
2440
|
+
l(
|
|
2225
2441
|
"sheet.renameSheet",
|
|
2226
2442
|
["sheet"],
|
|
2227
2443
|
"Rename a sheet.",
|
|
2228
|
-
{ sheet:
|
|
2444
|
+
{ sheet: d("Current name."), name: d("New name.") },
|
|
2229
2445
|
["sheet", "name"],
|
|
2230
|
-
|
|
2446
|
+
g
|
|
2231
2447
|
),
|
|
2232
|
-
|
|
2448
|
+
l(
|
|
2233
2449
|
"sheet.deleteSheet",
|
|
2234
2450
|
["sheet"],
|
|
2235
2451
|
"Remove a sheet and everything on it.",
|
|
2236
|
-
{ sheet:
|
|
2452
|
+
{ sheet: d("Name of the sheet to delete.") },
|
|
2237
2453
|
["sheet"],
|
|
2238
|
-
|
|
2454
|
+
g
|
|
2239
2455
|
),
|
|
2240
|
-
|
|
2456
|
+
l(
|
|
2241
2457
|
"sheet.activate",
|
|
2242
2458
|
["sheet"],
|
|
2243
2459
|
"Show the user a sheet and select a range on it.",
|
|
2244
|
-
{ sheet:
|
|
2460
|
+
{ sheet: E, range: d("A1 notation to select. Omit to only switch sheets.") },
|
|
2245
2461
|
[],
|
|
2246
|
-
|
|
2462
|
+
C
|
|
2247
2463
|
)
|
|
2248
|
-
],
|
|
2249
|
-
|
|
2464
|
+
], Sr = [
|
|
2465
|
+
l(
|
|
2250
2466
|
"word.replaceParagraph",
|
|
2251
2467
|
["word"],
|
|
2252
2468
|
"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",
|
|
2253
2469
|
{
|
|
2254
|
-
at:
|
|
2255
|
-
text:
|
|
2470
|
+
at: u("The offset the paragraph starts at, exactly as `inspect` prints it."),
|
|
2471
|
+
text: d("The new text for that paragraph. A newline starts a further paragraph.")
|
|
2256
2472
|
},
|
|
2257
2473
|
["at", "text"],
|
|
2258
|
-
|
|
2474
|
+
g
|
|
2259
2475
|
),
|
|
2260
|
-
|
|
2476
|
+
l(
|
|
2261
2477
|
"word.replaceRange",
|
|
2262
2478
|
["word"],
|
|
2263
2479
|
"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",
|
|
2264
2480
|
{
|
|
2265
|
-
start:
|
|
2266
|
-
end:
|
|
2267
|
-
text:
|
|
2481
|
+
start: u("Character offset where the replaced text starts, as `inspect` reports offsets."),
|
|
2482
|
+
end: u("Character offset just past the last character to replace."),
|
|
2483
|
+
text: d("The replacement text. A newline starts a new paragraph.")
|
|
2268
2484
|
},
|
|
2269
2485
|
["start", "end", "text"],
|
|
2270
|
-
|
|
2486
|
+
g
|
|
2271
2487
|
),
|
|
2272
|
-
|
|
2488
|
+
l(
|
|
2273
2489
|
"word.insertText",
|
|
2274
2490
|
["word"],
|
|
2275
2491
|
"Insert text at a character offset, without removing anything.",
|
|
2276
2492
|
{
|
|
2277
|
-
index:
|
|
2278
|
-
text:
|
|
2493
|
+
index: u("Character offset, as `inspect` reports offsets."),
|
|
2494
|
+
text: d("The text to insert.")
|
|
2279
2495
|
},
|
|
2280
2496
|
["index", "text"],
|
|
2281
|
-
|
|
2497
|
+
g
|
|
2282
2498
|
),
|
|
2283
|
-
|
|
2499
|
+
l(
|
|
2284
2500
|
"word.appendText",
|
|
2285
2501
|
["word"],
|
|
2286
2502
|
"Add text at the end of the document.",
|
|
2287
|
-
{ text:
|
|
2503
|
+
{ text: d("The text to append.") },
|
|
2288
2504
|
["text"],
|
|
2289
|
-
|
|
2505
|
+
g
|
|
2290
2506
|
),
|
|
2291
|
-
|
|
2507
|
+
l(
|
|
2292
2508
|
"word.insertParagraph",
|
|
2293
2509
|
["word"],
|
|
2294
2510
|
"Start a new paragraph, optionally with text in it.",
|
|
2295
2511
|
{
|
|
2296
|
-
text:
|
|
2297
|
-
index:
|
|
2512
|
+
text: d("Paragraph text. Newlines start further paragraphs."),
|
|
2513
|
+
index: u("Character offset to insert at. Omit for the end of the document.")
|
|
2298
2514
|
},
|
|
2299
2515
|
[],
|
|
2300
|
-
|
|
2516
|
+
g
|
|
2301
2517
|
),
|
|
2302
|
-
|
|
2518
|
+
l(
|
|
2303
2519
|
"word.setSelection",
|
|
2304
2520
|
["word"],
|
|
2305
2521
|
"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",
|
|
2306
|
-
{ start:
|
|
2522
|
+
{ start: u("Start character offset."), end: u("End character offset. Omit for a caret.") },
|
|
2307
2523
|
["start"],
|
|
2308
|
-
|
|
2524
|
+
C
|
|
2309
2525
|
)
|
|
2310
|
-
],
|
|
2311
|
-
|
|
2526
|
+
], _r = [
|
|
2527
|
+
l(
|
|
2312
2528
|
"slides.setText",
|
|
2313
2529
|
["slides"],
|
|
2314
2530
|
"Replace the text of one shape. Written on save; not visible before that, and not undoable.",
|
|
2315
2531
|
{
|
|
2316
|
-
slide:
|
|
2317
|
-
element:
|
|
2318
|
-
text:
|
|
2532
|
+
slide: ke,
|
|
2533
|
+
element: d("Element id, as `inspect` reports it."),
|
|
2534
|
+
text: d("The new text.")
|
|
2319
2535
|
},
|
|
2320
2536
|
["slide", "element", "text"],
|
|
2321
|
-
|
|
2537
|
+
U
|
|
2322
2538
|
),
|
|
2323
|
-
|
|
2539
|
+
l(
|
|
2324
2540
|
"slides.setTransform",
|
|
2325
2541
|
["slides"],
|
|
2326
2542
|
"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
|
|
2327
2543
|
{
|
|
2328
|
-
slide:
|
|
2329
|
-
element:
|
|
2330
|
-
left:
|
|
2331
|
-
top:
|
|
2332
|
-
width:
|
|
2333
|
-
height:
|
|
2544
|
+
slide: ke,
|
|
2545
|
+
element: d("Element id."),
|
|
2546
|
+
left: u("Distance from the left edge, in pixels."),
|
|
2547
|
+
top: u("Distance from the top edge, in pixels."),
|
|
2548
|
+
width: u("Width in pixels."),
|
|
2549
|
+
height: u("Height in pixels.")
|
|
2334
2550
|
},
|
|
2335
2551
|
["slide", "element"],
|
|
2336
|
-
|
|
2552
|
+
U
|
|
2337
2553
|
)
|
|
2338
|
-
],
|
|
2339
|
-
...
|
|
2340
|
-
...
|
|
2341
|
-
...
|
|
2342
|
-
...
|
|
2554
|
+
], ct = [
|
|
2555
|
+
...Ar,
|
|
2556
|
+
...Er,
|
|
2557
|
+
...Sr,
|
|
2558
|
+
..._r
|
|
2343
2559
|
];
|
|
2344
|
-
function
|
|
2345
|
-
return
|
|
2560
|
+
function As(e) {
|
|
2561
|
+
return ct.filter((t) => t.kinds.includes(e));
|
|
2346
2562
|
}
|
|
2347
|
-
function
|
|
2348
|
-
return
|
|
2563
|
+
function Es(e) {
|
|
2564
|
+
return ct.find((t) => t.op === e);
|
|
2349
2565
|
}
|
|
2350
|
-
const
|
|
2351
|
-
function
|
|
2566
|
+
const Ss = "documents.describe", _s = "documents.inspect", Ts = "documents.apply";
|
|
2567
|
+
function ws(e) {
|
|
2352
2568
|
const t = e.indexOf(":");
|
|
2353
2569
|
if (t !== -1) return e.slice(0, t);
|
|
2354
2570
|
const n = e.indexOf(".");
|
|
2355
2571
|
return n === -1 ? e : e.slice(0, n);
|
|
2356
2572
|
}
|
|
2357
|
-
const
|
|
2358
|
-
function
|
|
2573
|
+
const Is = "installation-id";
|
|
2574
|
+
function Ms(e) {
|
|
2359
2575
|
const t = [];
|
|
2360
2576
|
for (const n of Object.keys(e))
|
|
2361
2577
|
for (const r of Object.keys(e[n]))
|
|
2362
2578
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
2363
2579
|
return t;
|
|
2364
2580
|
}
|
|
2365
|
-
const
|
|
2581
|
+
const Os = "notification-source", Cs = (e, t) => `${e}.pref.${t}`, ks = {
|
|
2366
2582
|
ai: [
|
|
2367
2583
|
"account.read",
|
|
2368
2584
|
"account.write",
|
|
@@ -2497,64 +2713,64 @@ const ja = "notification-source", Ba = (e, t) => `${e}.pref.${t}`, Ha = {
|
|
|
2497
2713
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
2498
2714
|
user: ["user.read", "user.write"],
|
|
2499
2715
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
2500
|
-
},
|
|
2501
|
-
function
|
|
2502
|
-
const r = n - e <
|
|
2716
|
+
}, lt = 9e4, Tr = ["out_of_office"], ut = (e) => Tr.includes(e);
|
|
2717
|
+
function vs(e, t, n) {
|
|
2718
|
+
const r = n - e < lt, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
2503
2719
|
if (!i?.status) return { online: r, status: r ? "available" : "offline" };
|
|
2504
2720
|
const o = i.status;
|
|
2505
|
-
return !r && !
|
|
2721
|
+
return !r && !ut(o) ? { online: !1, status: "offline" } : { online: r, status: o, message: i.message };
|
|
2506
2722
|
}
|
|
2507
|
-
function
|
|
2508
|
-
const n = t - e.lastSeenAt <
|
|
2723
|
+
function xs(e, t) {
|
|
2724
|
+
const n = t - e.lastSeenAt < lt, r = n || ut(e.status) ? e.status : "offline";
|
|
2509
2725
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
2510
2726
|
}
|
|
2511
|
-
function
|
|
2727
|
+
function Ns(e, t) {
|
|
2512
2728
|
return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
|
|
2513
2729
|
}
|
|
2514
|
-
function
|
|
2730
|
+
function Rs(e) {
|
|
2515
2731
|
return e.providerAvailable && e.allowed;
|
|
2516
2732
|
}
|
|
2517
|
-
const
|
|
2518
|
-
function
|
|
2733
|
+
const Ds = "resources.describe", $s = "resources.search", Ls = "resources.resolve", Ps = "resources.attached";
|
|
2734
|
+
function Us(e) {
|
|
2519
2735
|
const t = e.indexOf(":");
|
|
2520
2736
|
return t === -1 ? e : e.slice(0, t);
|
|
2521
2737
|
}
|
|
2522
|
-
const
|
|
2523
|
-
function
|
|
2738
|
+
const Ks = "/provider/scope/related", Bs = "/provider/scope/read", dt = "auth";
|
|
2739
|
+
function pt(e) {
|
|
2524
2740
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
2525
2741
|
return t ? t[1] : null;
|
|
2526
2742
|
}
|
|
2527
|
-
function
|
|
2528
|
-
const t =
|
|
2529
|
-
return t ? t !==
|
|
2743
|
+
function js(e) {
|
|
2744
|
+
const t = pt(e);
|
|
2745
|
+
return t ? t !== dt : typeof e == "string" && e.startsWith("/wake");
|
|
2530
2746
|
}
|
|
2531
|
-
function
|
|
2532
|
-
return typeof e != "string" || e === "" || e === "/" ? !0 :
|
|
2747
|
+
function Hs(e) {
|
|
2748
|
+
return typeof e != "string" || e === "" || e === "/" ? !0 : pt(e) === dt;
|
|
2533
2749
|
}
|
|
2534
|
-
function
|
|
2750
|
+
function wr(e) {
|
|
2535
2751
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2536
2752
|
}
|
|
2537
|
-
function
|
|
2538
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
2753
|
+
function Ir(e) {
|
|
2754
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${wr(r)}`).join("");
|
|
2539
2755
|
return new RegExp(`^${n}\\/?$`);
|
|
2540
2756
|
}
|
|
2541
|
-
function
|
|
2757
|
+
function Mr(e, t) {
|
|
2542
2758
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
|
|
2543
2759
|
return n.forEach((o, a) => {
|
|
2544
2760
|
if (o.startsWith(":")) {
|
|
2545
|
-
const s = o.endsWith("?") ? o.slice(1, -1) : o.slice(1),
|
|
2546
|
-
|
|
2761
|
+
const s = o.endsWith("?") ? o.slice(1, -1) : o.slice(1), c = r[a];
|
|
2762
|
+
c && (i[s] = c);
|
|
2547
2763
|
}
|
|
2548
2764
|
}), i;
|
|
2549
2765
|
}
|
|
2550
|
-
function
|
|
2766
|
+
function Or(e) {
|
|
2551
2767
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
2552
2768
|
}
|
|
2553
|
-
function
|
|
2769
|
+
function Gs(e) {
|
|
2554
2770
|
const t = [];
|
|
2555
2771
|
for (const n of e) {
|
|
2556
2772
|
if (!n?.name) continue;
|
|
2557
|
-
const r =
|
|
2773
|
+
const r = Or(n);
|
|
2558
2774
|
for (const i of n.routes ?? []) {
|
|
2559
2775
|
if (!i.public) continue;
|
|
2560
2776
|
const o = i.path === "/" ? "" : i.path;
|
|
@@ -2568,7 +2784,7 @@ function ns(e) {
|
|
|
2568
2784
|
}
|
|
2569
2785
|
return t;
|
|
2570
2786
|
}
|
|
2571
|
-
function
|
|
2787
|
+
function Cr(e, t) {
|
|
2572
2788
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
2573
2789
|
for (let i = 0; i < Math.min(n.length, r.length); i++) {
|
|
2574
2790
|
const o = n[i].startsWith(":"), a = r[i].startsWith(":");
|
|
@@ -2576,17 +2792,17 @@ function qn(e, t) {
|
|
|
2576
2792
|
}
|
|
2577
2793
|
return n.length > r.length;
|
|
2578
2794
|
}
|
|
2579
|
-
function
|
|
2795
|
+
function kr(e, t) {
|
|
2580
2796
|
if (typeof e != "string") return null;
|
|
2581
2797
|
let n = null;
|
|
2582
2798
|
for (const r of t)
|
|
2583
|
-
|
|
2584
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
2799
|
+
Ir(r.pattern).test(e) && (!n || Cr(r.pattern, n.pattern)) && (n = r);
|
|
2800
|
+
return n ? { ...n, params: { ...n.props, ...Mr(n.pattern, e) } } : null;
|
|
2585
2801
|
}
|
|
2586
|
-
function
|
|
2587
|
-
return
|
|
2802
|
+
function Fs(e, t) {
|
|
2803
|
+
return kr(e, t) !== null;
|
|
2588
2804
|
}
|
|
2589
|
-
const
|
|
2805
|
+
const Ws = 10 * 1024 * 1024, Vs = 25 * 1024 * 1024, zs = "sync-source", Xs = "sync-target", Ys = "externalId", qs = 20, vr = {
|
|
2590
2806
|
afrikaans: [
|
|
2591
2807
|
"[Muziek]",
|
|
2592
2808
|
"(C) TV GELDERLAND 2021",
|
|
@@ -2736,14 +2952,14 @@ const is = 10 * 1024 * 1024, os = 25 * 1024 * 1024, as = "sync-source", ss = "sy
|
|
|
2736
2952
|
"[MÚSICA]",
|
|
2737
2953
|
"[Music cuts in British]"
|
|
2738
2954
|
]
|
|
2739
|
-
},
|
|
2955
|
+
}, xr = (e) => {
|
|
2740
2956
|
let t = e;
|
|
2741
|
-
return Object.values(
|
|
2957
|
+
return Object.values(vr).forEach((n) => {
|
|
2742
2958
|
n.forEach((r) => {
|
|
2743
2959
|
t = t.replaceAll(r, "");
|
|
2744
2960
|
});
|
|
2745
2961
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
2746
|
-
},
|
|
2962
|
+
}, Nr = 6e4, Rr = 8e3, Dr = 2, $r = 0.4, Lr = 3, Pr = /* @__PURE__ */ new Set([
|
|
2747
2963
|
"aan",
|
|
2748
2964
|
"als",
|
|
2749
2965
|
"ben",
|
|
@@ -2856,13 +3072,13 @@ const is = 10 * 1024 * 1024, os = 25 * 1024 * 1024, as = "sync-source", ss = "sy
|
|
|
2856
3072
|
"you",
|
|
2857
3073
|
"your"
|
|
2858
3074
|
]);
|
|
2859
|
-
function
|
|
3075
|
+
function Ur(e) {
|
|
2860
3076
|
const t = /* @__PURE__ */ new Set();
|
|
2861
3077
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
2862
|
-
n.length <
|
|
3078
|
+
n.length < Lr || Pr.has(n) || t.add(n);
|
|
2863
3079
|
return [...t];
|
|
2864
3080
|
}
|
|
2865
|
-
function
|
|
3081
|
+
function Kr(e, t) {
|
|
2866
3082
|
if (!e.length) return 0;
|
|
2867
3083
|
if (!t.length) return 1;
|
|
2868
3084
|
const n = new Set(t), r = new Set(e);
|
|
@@ -2870,38 +3086,38 @@ function sr(e, t) {
|
|
|
2870
3086
|
for (const o of r) n.has(o) || (i += 1);
|
|
2871
3087
|
return i / r.size;
|
|
2872
3088
|
}
|
|
2873
|
-
function
|
|
3089
|
+
function Br(e, t = Nr) {
|
|
2874
3090
|
const n = e.filter((a) => !a.partial && typeof a.text == "string");
|
|
2875
3091
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
2876
3092
|
const i = n.reduce((a, s) => Math.max(a, s.endedAt ?? 0), 0) - t;
|
|
2877
|
-
return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) =>
|
|
3093
|
+
return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) => xr(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
2878
3094
|
}
|
|
2879
|
-
const
|
|
2880
|
-
function
|
|
3095
|
+
const jr = 60;
|
|
3096
|
+
function Js(e, t, n = jr) {
|
|
2881
3097
|
const r = new Set(e), i = [...e];
|
|
2882
3098
|
for (const o of t)
|
|
2883
3099
|
!o || r.has(o) || (r.add(o), i.push(o));
|
|
2884
3100
|
return i.slice(-n);
|
|
2885
3101
|
}
|
|
2886
|
-
function
|
|
3102
|
+
function Zs(e) {
|
|
2887
3103
|
const { segments: t, now: n, state: r } = e;
|
|
2888
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
3104
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Rr)
|
|
2889
3105
|
return { trigger: !1, reason: "too_soon" };
|
|
2890
|
-
const i =
|
|
3106
|
+
const i = Br(t, e.windowMs);
|
|
2891
3107
|
if (!i.text) return { trigger: !1, reason: "no_speech" };
|
|
2892
3108
|
const o = i.segmentCount - (r.lastSegmentCount ?? 0);
|
|
2893
|
-
if (r.lastQueryTerms && o <
|
|
3109
|
+
if (r.lastQueryTerms && o < Dr)
|
|
2894
3110
|
return { trigger: !1, reason: "too_few_new" };
|
|
2895
|
-
const a =
|
|
2896
|
-
return a.length ? r.lastQueryTerms?.length &&
|
|
3111
|
+
const a = Ur(i.text);
|
|
3112
|
+
return a.length ? r.lastQueryTerms?.length && Kr(a, r.lastQueryTerms) < $r ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: a, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
2897
3113
|
}
|
|
2898
|
-
const
|
|
3114
|
+
const Qs = [
|
|
2899
3115
|
"personal",
|
|
2900
3116
|
"workspace",
|
|
2901
3117
|
"connections",
|
|
2902
3118
|
"work",
|
|
2903
3119
|
"ai"
|
|
2904
|
-
],
|
|
3120
|
+
], ec = "navNotice", oe = {
|
|
2905
3121
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
2906
3122
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
2907
3123
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -2924,81 +3140,81 @@ const ds = [
|
|
|
2924
3140
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
2925
3141
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
2926
3142
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
2927
|
-
},
|
|
2928
|
-
new Set(Object.values(
|
|
3143
|
+
}, Hr = "NL", Gr = 15, Fr = 8, Wr = Array.from(
|
|
3144
|
+
new Set(Object.values(oe).map((e) => e.callingCode))
|
|
2929
3145
|
).sort((e, t) => t.length - e.length);
|
|
2930
|
-
function
|
|
3146
|
+
function xe(e) {
|
|
2931
3147
|
if (e)
|
|
2932
|
-
return
|
|
3148
|
+
return oe[e.trim().toUpperCase()];
|
|
2933
3149
|
}
|
|
2934
|
-
function
|
|
3150
|
+
function L(e, t) {
|
|
2935
3151
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
2936
3152
|
}
|
|
2937
|
-
function
|
|
2938
|
-
if (e.length >
|
|
2939
|
-
for (const t of
|
|
3153
|
+
function Ne(e) {
|
|
3154
|
+
if (e.length > Gr) return null;
|
|
3155
|
+
for (const t of Wr) {
|
|
2940
3156
|
if (!e.startsWith(t)) continue;
|
|
2941
3157
|
const n = e.slice(t.length);
|
|
2942
|
-
for (const r of Object.values(
|
|
3158
|
+
for (const r of Object.values(oe)) {
|
|
2943
3159
|
if (r.callingCode !== t) continue;
|
|
2944
3160
|
const i = r.trunkPrefix, o = i && n.startsWith(i) ? n.slice(i.length) : n;
|
|
2945
|
-
if (
|
|
3161
|
+
if (L(o, r)) return `+${t}${o}`;
|
|
2946
3162
|
}
|
|
2947
3163
|
return null;
|
|
2948
3164
|
}
|
|
2949
|
-
return e.length <
|
|
3165
|
+
return e.length < Fr ? null : `+${e}`;
|
|
2950
3166
|
}
|
|
2951
|
-
function
|
|
3167
|
+
function Vr(e) {
|
|
2952
3168
|
let t = e.trim();
|
|
2953
3169
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
2954
3170
|
n && (t = t.slice(n[0].length));
|
|
2955
3171
|
const r = t.indexOf("@");
|
|
2956
3172
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
2957
3173
|
}
|
|
2958
|
-
function
|
|
3174
|
+
function tc(e) {
|
|
2959
3175
|
if (!e) return !1;
|
|
2960
3176
|
const t = e.indexOf("@");
|
|
2961
3177
|
if (t <= 0) return !1;
|
|
2962
3178
|
const n = e.slice(0, t).trim();
|
|
2963
3179
|
return !/^[+\d\s().-]+$/.test(n);
|
|
2964
3180
|
}
|
|
2965
|
-
function
|
|
3181
|
+
function Re(e, t) {
|
|
2966
3182
|
if (!e) return null;
|
|
2967
|
-
const n =
|
|
3183
|
+
const n = Vr(e);
|
|
2968
3184
|
if (!n) return null;
|
|
2969
3185
|
const r = n.startsWith("+"), i = n.replace(/\D/g, "");
|
|
2970
3186
|
if (!i) return null;
|
|
2971
|
-
if (r) return
|
|
2972
|
-
if (i.startsWith("00")) return
|
|
2973
|
-
const o =
|
|
3187
|
+
if (r) return Ne(i);
|
|
3188
|
+
if (i.startsWith("00")) return Ne(i.slice(2));
|
|
3189
|
+
const o = xe(t) ?? xe(Hr);
|
|
2974
3190
|
if (!o) return null;
|
|
2975
3191
|
const a = o.trunkPrefix;
|
|
2976
3192
|
if (a && i.startsWith(a)) {
|
|
2977
3193
|
const s = i.slice(a.length);
|
|
2978
|
-
return
|
|
3194
|
+
return L(s, o) ? `+${o.callingCode}${s}` : null;
|
|
2979
3195
|
}
|
|
2980
3196
|
if (i.startsWith(o.callingCode)) {
|
|
2981
3197
|
const s = i.slice(o.callingCode.length);
|
|
2982
|
-
if (
|
|
3198
|
+
if (L(s, o)) return `+${o.callingCode}${s}`;
|
|
2983
3199
|
}
|
|
2984
|
-
return !a &&
|
|
3200
|
+
return !a && L(i, o) ? `+${o.callingCode}${i}` : null;
|
|
2985
3201
|
}
|
|
2986
|
-
function
|
|
3202
|
+
function nc(e, t = 9) {
|
|
2987
3203
|
const n = (e ?? "").replace(/\D/g, "");
|
|
2988
3204
|
return n.length < t ? null : n.slice(-t);
|
|
2989
3205
|
}
|
|
2990
|
-
function
|
|
3206
|
+
function ft(e) {
|
|
2991
3207
|
if (!e) return null;
|
|
2992
3208
|
const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
|
|
2993
3209
|
if (n <= 0 || n === t.length - 1) return null;
|
|
2994
3210
|
const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
|
|
2995
3211
|
return !r || !i.includes(".") ? null : `${r}@${i}`;
|
|
2996
3212
|
}
|
|
2997
|
-
function
|
|
2998
|
-
const t =
|
|
3213
|
+
function rc(e) {
|
|
3214
|
+
const t = ft(e);
|
|
2999
3215
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
3000
3216
|
}
|
|
3001
|
-
const
|
|
3217
|
+
const zr = /* @__PURE__ */ new Set([
|
|
3002
3218
|
"co.uk",
|
|
3003
3219
|
"org.uk",
|
|
3004
3220
|
"gov.uk",
|
|
@@ -3008,14 +3224,14 @@ const gr = /* @__PURE__ */ new Set([
|
|
|
3008
3224
|
"com.br",
|
|
3009
3225
|
"co.za"
|
|
3010
3226
|
]);
|
|
3011
|
-
function
|
|
3227
|
+
function Xr(e) {
|
|
3012
3228
|
if (!e) return null;
|
|
3013
3229
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
3014
3230
|
if (t.length < 2) return null;
|
|
3015
3231
|
const n = t.slice(-2).join(".");
|
|
3016
|
-
return
|
|
3232
|
+
return zr.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
3017
3233
|
}
|
|
3018
|
-
const
|
|
3234
|
+
const Yr = /* @__PURE__ */ new Set([
|
|
3019
3235
|
"gmail.com",
|
|
3020
3236
|
"googlemail.com",
|
|
3021
3237
|
"outlook.com",
|
|
@@ -3060,34 +3276,34 @@ const yr = /* @__PURE__ */ new Set([
|
|
|
3060
3276
|
"proximus.be",
|
|
3061
3277
|
"scarlet.be"
|
|
3062
3278
|
]);
|
|
3063
|
-
function
|
|
3064
|
-
const t =
|
|
3065
|
-
return t ?
|
|
3279
|
+
function ic(e) {
|
|
3280
|
+
const t = Xr(e);
|
|
3281
|
+
return t ? Yr.has(t) : !1;
|
|
3066
3282
|
}
|
|
3067
|
-
function
|
|
3283
|
+
function oc(e) {
|
|
3068
3284
|
if (!e) return !1;
|
|
3069
3285
|
const t = e.trim().toLowerCase();
|
|
3070
3286
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
3071
3287
|
}
|
|
3072
|
-
function
|
|
3288
|
+
function ac(e, t, n) {
|
|
3073
3289
|
if (!e || !t) return null;
|
|
3074
3290
|
const r = e.trim().toLowerCase();
|
|
3075
3291
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
3076
|
-
const o =
|
|
3292
|
+
const o = Re(t, n);
|
|
3077
3293
|
return o ? `tel:${o}` : null;
|
|
3078
3294
|
}
|
|
3079
3295
|
if (r === "fax") {
|
|
3080
|
-
const o =
|
|
3296
|
+
const o = Re(t, n);
|
|
3081
3297
|
return o ? `fax:${o}` : null;
|
|
3082
3298
|
}
|
|
3083
3299
|
if (r === "mailto" || r === "email") {
|
|
3084
|
-
const o =
|
|
3300
|
+
const o = ft(t);
|
|
3085
3301
|
return o ? `mailto:${o}` : null;
|
|
3086
3302
|
}
|
|
3087
3303
|
const i = t.trim().toLowerCase();
|
|
3088
3304
|
return i ? `${r}:${i}` : null;
|
|
3089
3305
|
}
|
|
3090
|
-
const
|
|
3306
|
+
const qr = [
|
|
3091
3307
|
/<blockquote/i,
|
|
3092
3308
|
/class="?gmail_quote/i,
|
|
3093
3309
|
// Gmail quote container
|
|
@@ -3100,72 +3316,72 @@ const br = [
|
|
|
3100
3316
|
// Outlook underscore separator before "From:"
|
|
3101
3317
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
3102
3318
|
// Gmail "On <date> <name> wrote:"
|
|
3103
|
-
],
|
|
3104
|
-
function
|
|
3319
|
+
], De = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Jr = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
3320
|
+
function Zr(e) {
|
|
3105
3321
|
const t = e.split(`
|
|
3106
3322
|
`);
|
|
3107
3323
|
for (let n = 0; n < t.length; n++)
|
|
3108
|
-
if (
|
|
3324
|
+
if (Jr.test(t[n]) || De.test(t[n]) && t.slice(n + 1, n + 4).some((r) => De.test(r)))
|
|
3109
3325
|
return t.slice(0, n).join(`
|
|
3110
3326
|
`).trim();
|
|
3111
3327
|
return e;
|
|
3112
3328
|
}
|
|
3113
|
-
const
|
|
3114
|
-
function
|
|
3329
|
+
const Qr = /^(?:https?:|mailto:|tel:)/i, ei = /^(?:https?:|cid:|data:image\/)/i;
|
|
3330
|
+
function V(e, t) {
|
|
3115
3331
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
3116
3332
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
3117
3333
|
}
|
|
3118
|
-
const
|
|
3119
|
-
function
|
|
3120
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
3334
|
+
const ti = /(!\[[^\]]*\]\([^)]*\))/;
|
|
3335
|
+
function $e(e) {
|
|
3336
|
+
return e.replace(/\s+/g, " ").trim().split(ti).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
3121
3337
|
}
|
|
3122
|
-
function
|
|
3338
|
+
function z(e) {
|
|
3123
3339
|
return e.replace(
|
|
3124
3340
|
/[()\s<>"]/g,
|
|
3125
3341
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
3126
3342
|
);
|
|
3127
3343
|
}
|
|
3128
|
-
function
|
|
3344
|
+
function ni(e) {
|
|
3129
3345
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
3130
|
-
const i =
|
|
3131
|
-
return
|
|
3346
|
+
const i = V(r, "src");
|
|
3347
|
+
return ei.test(i) ? `})` : "";
|
|
3132
3348
|
}).replace(
|
|
3133
3349
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
3134
3350
|
(n, r, i) => {
|
|
3135
|
-
const o =
|
|
3136
|
-
return
|
|
3351
|
+
const o = $e(i.replace(/<[^>]*>/g, "")), a = V(r, "href");
|
|
3352
|
+
return Qr.test(a) ? `[${o || z(a)}](${z(a)})` : o;
|
|
3137
3353
|
}
|
|
3138
3354
|
);
|
|
3139
3355
|
}
|
|
3140
|
-
const
|
|
3141
|
-
function
|
|
3356
|
+
const ri = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, ii = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, oi = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
3357
|
+
function ai(e, t) {
|
|
3142
3358
|
return /<table\b/i.test(e) || e.includes(`
|
|
3143
3359
|
|
|
3144
3360
|
|`) || t.includes("![") || t.length > 200;
|
|
3145
3361
|
}
|
|
3146
|
-
const
|
|
3147
|
-
function
|
|
3362
|
+
const si = 40, ci = { left: "---", center: ":---:", right: "---:" };
|
|
3363
|
+
function li(e) {
|
|
3148
3364
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
3149
3365
|
return t ? t[1].toLowerCase() : "left";
|
|
3150
3366
|
}
|
|
3151
|
-
function
|
|
3367
|
+
function ui(e) {
|
|
3152
3368
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
3153
3369
|
}
|
|
3154
|
-
function
|
|
3370
|
+
function di(e) {
|
|
3155
3371
|
const t = [];
|
|
3156
|
-
for (const a of e.matchAll(
|
|
3372
|
+
for (const a of e.matchAll(ii)) {
|
|
3157
3373
|
const s = [];
|
|
3158
|
-
for (const
|
|
3159
|
-
const
|
|
3160
|
-
if (
|
|
3161
|
-
s.push({ text:
|
|
3374
|
+
for (const c of a[1].matchAll(oi)) {
|
|
3375
|
+
const m = ui(c[3]);
|
|
3376
|
+
if (ai(c[3], m)) return null;
|
|
3377
|
+
s.push({ text: m, align: li(c[2]) });
|
|
3162
3378
|
}
|
|
3163
3379
|
if (s.length === 0) return null;
|
|
3164
|
-
s.some((
|
|
3380
|
+
s.some((c) => c.text !== "") && t.push(s);
|
|
3165
3381
|
}
|
|
3166
3382
|
const n = t[0]?.length ?? 0;
|
|
3167
3383
|
if (t.length < 2 || n < 2 || t.some((a) => a.length !== n)) return null;
|
|
3168
|
-
const r = (a) => `| ${a.map((s) => s.text).join(" | ")} |`, i = t[1].map((a) =>
|
|
3384
|
+
const r = (a) => `| ${a.map((s) => s.text).join(" | ")} |`, i = t[1].map((a) => ci[a.align]).join(" | "), o = t.slice(1).map(r).join(`
|
|
3169
3385
|
`);
|
|
3170
3386
|
return `
|
|
3171
3387
|
|
|
@@ -3175,36 +3391,36 @@ ${o}
|
|
|
3175
3391
|
|
|
3176
3392
|
`;
|
|
3177
3393
|
}
|
|
3178
|
-
function
|
|
3394
|
+
function pi(e) {
|
|
3179
3395
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
3180
3396
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
3181
3397
|
}
|
|
3182
|
-
function
|
|
3398
|
+
function fi(e) {
|
|
3183
3399
|
let t = e;
|
|
3184
|
-
for (let n = 0; n <
|
|
3185
|
-
const r =
|
|
3400
|
+
for (let n = 0; n < si; n++) {
|
|
3401
|
+
const r = ri.exec(t);
|
|
3186
3402
|
if (!r || r.index === void 0) break;
|
|
3187
|
-
const o =
|
|
3403
|
+
const o = di(r[1]) ?? `
|
|
3188
3404
|
|
|
3189
|
-
${
|
|
3405
|
+
${pi(r[1])}
|
|
3190
3406
|
|
|
3191
3407
|
`;
|
|
3192
3408
|
t = t.slice(0, r.index) + o + t.slice(r.index + r[0].length);
|
|
3193
3409
|
}
|
|
3194
3410
|
return t;
|
|
3195
3411
|
}
|
|
3196
|
-
function
|
|
3412
|
+
function Le(e, t) {
|
|
3197
3413
|
let n = e;
|
|
3198
3414
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
3199
|
-
`), t && (n =
|
|
3415
|
+
`), t && (n = fi(ni(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
3200
3416
|
|
|
3201
3417
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
3202
3418
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
3203
3419
|
}
|
|
3204
|
-
function
|
|
3420
|
+
function Pe(e) {
|
|
3205
3421
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
3206
3422
|
}
|
|
3207
|
-
const
|
|
3423
|
+
const mi = {
|
|
3208
3424
|
euro: "€",
|
|
3209
3425
|
pound: "£",
|
|
3210
3426
|
yen: "¥",
|
|
@@ -3226,369 +3442,386 @@ const Lr = {
|
|
|
3226
3442
|
rdquo: "”",
|
|
3227
3443
|
apos: "'"
|
|
3228
3444
|
};
|
|
3229
|
-
function
|
|
3230
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
3445
|
+
function Ue(e) {
|
|
3446
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => mi[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => Pe(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => Pe(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
3231
3447
|
}
|
|
3232
|
-
function
|
|
3448
|
+
function Ke(e) {
|
|
3233
3449
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
3234
3450
|
`).replace(/\n{3,}/g, `
|
|
3235
3451
|
|
|
3236
3452
|
`).trim();
|
|
3237
3453
|
}
|
|
3238
|
-
const
|
|
3239
|
-
function
|
|
3240
|
-
return
|
|
3454
|
+
const gi = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
3455
|
+
function sc(e) {
|
|
3456
|
+
return gi.test(e);
|
|
3241
3457
|
}
|
|
3242
|
-
function
|
|
3243
|
-
return
|
|
3458
|
+
function cc(e) {
|
|
3459
|
+
return mt(e, !1);
|
|
3244
3460
|
}
|
|
3245
|
-
function
|
|
3246
|
-
return
|
|
3461
|
+
function lc(e) {
|
|
3462
|
+
return mt(e, !0);
|
|
3247
3463
|
}
|
|
3248
|
-
function
|
|
3464
|
+
function mt(e, t) {
|
|
3249
3465
|
if (typeof e != "string" || !e) return "";
|
|
3250
3466
|
let n = e.length;
|
|
3251
|
-
for (const a of
|
|
3467
|
+
for (const a of qr) {
|
|
3252
3468
|
const s = e.search(a);
|
|
3253
3469
|
s >= 0 && s < n && (n = s);
|
|
3254
3470
|
}
|
|
3255
3471
|
const r = e.slice(0, n);
|
|
3256
|
-
let i =
|
|
3257
|
-
return i || (i =
|
|
3472
|
+
let i = Ke(Ue(Le(r, t)));
|
|
3473
|
+
return i || (i = Ke(Ue(Le(e, t)))), Zr(i) || i;
|
|
3258
3474
|
}
|
|
3259
3475
|
export {
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3476
|
+
no as ACTIVE_ASSIGNMENT_STATUSES,
|
|
3477
|
+
_ as ACTIVITY_CATALOG,
|
|
3478
|
+
dr as AI_ATTACHMENT_LIMITS,
|
|
3479
|
+
za as AI_ATTACHMENT_MAX_PER_TURN,
|
|
3480
|
+
Va as AI_ATTACHMENT_TURN_BUDGET,
|
|
3481
|
+
He as AI_VENDORS,
|
|
3482
|
+
Pt as ALLOWED_LINK_SCHEMES,
|
|
3483
|
+
ks as APP_PERMISSIONS,
|
|
3484
|
+
me as ARTIFACT_MAX_BLOCKS,
|
|
3485
|
+
Xi as ARTIFACT_MAX_BODY_BYTES,
|
|
3486
|
+
F as ARTIFACT_MAX_CELL_LEN,
|
|
3487
|
+
be as ARTIFACT_MAX_KPI_ITEMS,
|
|
3488
|
+
ge as ARTIFACT_MAX_LIST_ITEMS,
|
|
3489
|
+
ye as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
3490
|
+
he as ARTIFACT_MAX_TABLE_ROWS,
|
|
3491
|
+
Fe as ARTIFACT_MAX_TEXT_LEN,
|
|
3492
|
+
Vt as ASSIGNMENT_SCOPE_KIND,
|
|
3493
|
+
Za as ASSIST_BANDS,
|
|
3494
|
+
Ja as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
3495
|
+
an as ATTENTION_STATUSES,
|
|
3496
|
+
dt as AUTH_APP_NAME,
|
|
3497
|
+
Nn as AUTO_READY_MIN_PROPOSALS,
|
|
3498
|
+
Rn as AUTO_READY_RATE,
|
|
3499
|
+
Mt as ActivityTypeRegistry,
|
|
3500
|
+
Ri as BUILT_IN_ONLY,
|
|
3501
|
+
sn as BULK_PENALTY,
|
|
3502
|
+
Rr as CADENCE_FLOOR_MS,
|
|
3503
|
+
Dr as CADENCE_MIN_NEW_SEGMENTS,
|
|
3504
|
+
$r as CADENCE_MIN_NOVELTY,
|
|
3505
|
+
Nr as CADENCE_WINDOW_MS,
|
|
3506
|
+
Qo as CLASSIFY_VARS,
|
|
3507
|
+
bs as CONTEXT_COLLECT_SERVICE,
|
|
3508
|
+
Wi as CORE_DIMENSIONS,
|
|
3509
|
+
yr as CommunicationScheme,
|
|
3510
|
+
qt as DAY_MS,
|
|
3511
|
+
Ko as DEFAULT_MEMORY_BUDGET,
|
|
3512
|
+
Hr as DEFAULT_PHONE_REGION,
|
|
3513
|
+
Ts as DOCUMENT_APPLY_SERVICE,
|
|
3514
|
+
Ss as DOCUMENT_DESCRIBE_SERVICE,
|
|
3515
|
+
_s as DOCUMENT_INSPECT_SERVICE,
|
|
3516
|
+
ct as DOCUMENT_OPERATIONS,
|
|
3517
|
+
ta as EMPTY_WORKFLOW,
|
|
3518
|
+
ms as FEATURE_FOLDER_MANAGEMENT,
|
|
3519
|
+
hs as FEATURE_MESSAGE_REACTIONS,
|
|
3520
|
+
gs as FEATURE_REMOTE_SEARCH,
|
|
3521
|
+
ln as FOLLOW_UP_HOURS,
|
|
3522
|
+
Yt as HOUR_MS,
|
|
3523
|
+
gi as HTML_BODY_RE,
|
|
3524
|
+
w as INELIGIBLE,
|
|
3525
|
+
Is as INSTALLATION_HEADER,
|
|
3526
|
+
On as INTERACTION_KIND,
|
|
3527
|
+
ps as InteractionParticipantRole,
|
|
3528
|
+
yn as KB_FALLBACK_LOCALE,
|
|
3529
|
+
_e as KB_LOCALES,
|
|
3530
|
+
ie as LOOSE_STATUSES,
|
|
3531
|
+
tn as MAIL_HINT_HEADERS,
|
|
3532
|
+
Ai as MAX_ACTIONS,
|
|
3533
|
+
zt as MAX_ASSIGNMENT_TURNS,
|
|
3534
|
+
hi as MAX_BLOCKS,
|
|
3535
|
+
Ze as MAX_COLLECTION_DEPTH,
|
|
3536
|
+
Ws as MAX_EDITABLE_FILE_BYTES,
|
|
3537
|
+
yi as MAX_FIELDS,
|
|
3538
|
+
bi as MAX_LIST_ITEMS,
|
|
3539
|
+
$o as MAX_MEMORY_BROWSE,
|
|
3540
|
+
Uo as MAX_MEMORY_BUDGET,
|
|
3541
|
+
Lo as MAX_MEMORY_CHARS,
|
|
3542
|
+
jr as MAX_SHOWN_KEYS,
|
|
3543
|
+
Yn as MAX_TOPIC_CANDIDATES,
|
|
3544
|
+
Xn as MAX_TOPIC_EXAMPLES,
|
|
3545
|
+
W as MAX_TOPIC_EXAMPLE_CHARS,
|
|
3546
|
+
Vs as MAX_VIEWABLE_FILE_BYTES,
|
|
3547
|
+
Po as MIN_MEMORY_BUDGET,
|
|
3548
|
+
ec as NAV_NOTICE_SLOT,
|
|
3549
|
+
Os as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
3550
|
+
jo as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
3551
|
+
Z as PAUSE_SNOOZED,
|
|
3552
|
+
Q as PAUSE_WAITING_FOR_CUSTOMER,
|
|
3553
|
+
oe as PHONE_REGIONS,
|
|
3554
|
+
lt as PRESENCE_ONLINE_WINDOW_MS,
|
|
3555
|
+
Tr as PRESENCE_SURVIVES_OFFLINE,
|
|
3556
|
+
Go as PROFILE_TOOL_DISPOSITIONS,
|
|
3557
|
+
ds as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
3558
|
+
us as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
3559
|
+
Yr as PUBLIC_EMAIL_DOMAINS,
|
|
3560
|
+
Te as READ_STEP_TYPES,
|
|
3561
|
+
En as RELATED_SUBJECT_KINDS,
|
|
3562
|
+
st as RESERVED_STATUS_KEYS,
|
|
3563
|
+
Ps as RESOURCE_ATTACHED_SERVICE,
|
|
3564
|
+
Ds as RESOURCE_DESCRIBE_SERVICE,
|
|
3565
|
+
Ls as RESOURCE_RESOLVE_SERVICE,
|
|
3566
|
+
$s as RESOURCE_SEARCH_SERVICE,
|
|
3567
|
+
Bs as SCOPE_READ_ROUTE,
|
|
3568
|
+
Ks as SCOPE_RELATED_ROUTE,
|
|
3569
|
+
Qs as SETTINGS_CATEGORIES,
|
|
3570
|
+
lo as SIGNATURE_INTENTS,
|
|
3571
|
+
cn as SLA_HOURS_BY_PRIORITY,
|
|
3572
|
+
fa as SLA_METRICS,
|
|
3573
|
+
ma as SLA_PAUSE_REASONS,
|
|
3574
|
+
vn as STEP_MAX_TOKENS_MAX,
|
|
3575
|
+
kn as STEP_MAX_TOKENS_MIN,
|
|
3576
|
+
en as SUMMARY_MIN_LAST_CHARS,
|
|
3577
|
+
Qt as SUMMARY_MIN_MESSAGES,
|
|
3578
|
+
Ys as SYNC_MAPPING_EXTERNAL_ID,
|
|
3579
|
+
qs as SYNC_RUN_MAX_ERRORS,
|
|
3580
|
+
zs as SYNC_SOURCE_PROVIDER_GROUP,
|
|
3581
|
+
Xs as SYNC_TARGET_PROVIDER_GROUP,
|
|
3582
|
+
Wt as TERMINAL_ASSIGNMENT_STATUSES,
|
|
3583
|
+
Dn as TERMINAL_RUN_STATUSES,
|
|
3584
|
+
Zo as TRIGGER_VARS,
|
|
3585
|
+
ys as UNSUPPORTED,
|
|
3586
|
+
Rt as USAGE_DIMENSIONS,
|
|
3587
|
+
Dt as USAGE_DIMENSION_IDS,
|
|
3588
|
+
nr as WORK_ACTIVITY_SCOPE_KIND,
|
|
3589
|
+
Ho as WORK_AREAS,
|
|
3590
|
+
xa as WORK_COMMENT_ADDED,
|
|
3591
|
+
Na as WORK_ITEM_ASSIGNED,
|
|
3592
|
+
er as WORK_ITEM_SCOPE_KIND,
|
|
3593
|
+
Ra as WORK_ITEM_STATUS_CHANGED,
|
|
3594
|
+
tr as WORK_PROJECT_SCOPE_KIND,
|
|
3595
|
+
P as W_PRIORITY,
|
|
3596
|
+
Ca as acceptExampleCandidate,
|
|
3597
|
+
_n as actingIdentityKey,
|
|
3598
|
+
Ma as activeWorkTypes,
|
|
3599
|
+
Si as activityIconOf,
|
|
3600
|
+
xi as activityJoinUrl,
|
|
3601
|
+
_t as activitySnippet,
|
|
3602
|
+
Tt as activityTextParams,
|
|
3603
|
+
vi as activityTimelineText,
|
|
3604
|
+
Ot as activityTimestamp,
|
|
3605
|
+
b as activityTypeInfo,
|
|
3606
|
+
Vo as actorKey,
|
|
3607
|
+
Oa as addExampleCandidate,
|
|
3608
|
+
ne as addWorkingMs,
|
|
3609
|
+
xs as agePresenceEntry,
|
|
3610
|
+
ur as aiAttachmentKind,
|
|
3611
|
+
Xa as aiAttachmentRejection,
|
|
3612
|
+
fe as aiBudgetLimit,
|
|
3613
|
+
Gi as aiBudgetPeriodKey,
|
|
3614
|
+
Ct as aiBudgetPeriodStart,
|
|
3615
|
+
Hi as aiBudgetState,
|
|
3616
|
+
ji as aiVendorAcceptsAttachment,
|
|
3617
|
+
Ui as aiVendorDefaultModel,
|
|
3618
|
+
Pi as aiVendorLabel,
|
|
3619
|
+
Bi as aiVendorNeedsBaseUrl,
|
|
3620
|
+
Ki as aiVendorsWith,
|
|
3621
|
+
pt as appNameFromPath,
|
|
3622
|
+
Sa as applyRounding,
|
|
3623
|
+
uo as applySignature,
|
|
3624
|
+
xn as approvalRate,
|
|
3625
|
+
qi as artifactBodyBytes,
|
|
3626
|
+
Ji as artifactOutline,
|
|
3627
|
+
Zi as artifactToMarkdown,
|
|
3628
|
+
qo as assignmentMismatch,
|
|
3629
|
+
io as assignmentScopeKey,
|
|
3630
|
+
so as assignmentSubject,
|
|
3631
|
+
Ni as buildActivityPreview,
|
|
3632
|
+
os as buildChannelIntents,
|
|
3633
|
+
Qi as buildShareKeys,
|
|
3634
|
+
Br as buildWindow,
|
|
3635
|
+
re as calendarOf,
|
|
3636
|
+
ko as canNestUnder,
|
|
3637
|
+
Mi as carriesText,
|
|
3638
|
+
xo as categoryLabel,
|
|
3639
|
+
or as categoryOf,
|
|
3640
|
+
ls as channelKindForScheme,
|
|
3641
|
+
_i as channelKindOf,
|
|
3642
|
+
ea as clampStepMaxTokens,
|
|
3643
|
+
yo as classifyMail,
|
|
3644
|
+
lc as cleanMessageMarkdown,
|
|
3645
|
+
cc as cleanMessageText,
|
|
3646
|
+
es as compareAssistRank,
|
|
3647
|
+
zn as compareWorkTypes,
|
|
3648
|
+
co as decideAssignmentState,
|
|
3649
|
+
Zs as decideCadence,
|
|
3650
|
+
rs as decideIncomingCall,
|
|
3651
|
+
bn as defaultLocaleOf,
|
|
3652
|
+
Ha as defaultStatusKey,
|
|
3653
|
+
fs as defineIntent,
|
|
3654
|
+
gn as depthOf,
|
|
3655
|
+
vs as derivePresence,
|
|
3656
|
+
is as disabledIntentsFromCapabilities,
|
|
3657
|
+
ws as documentKindOf,
|
|
3658
|
+
ha as dueAtOf,
|
|
3659
|
+
Ea as elapsedSeconds,
|
|
3660
|
+
rc as emailDomain,
|
|
3661
|
+
ac as endpointKey,
|
|
3662
|
+
Mr as extractParams,
|
|
3663
|
+
Ur as extractTerms,
|
|
3664
|
+
ss as filterByEndpoint,
|
|
3665
|
+
as as filterByIntent,
|
|
3666
|
+
hr as filterByTargetScheme,
|
|
3667
|
+
K as findAiVendor,
|
|
3668
|
+
Ms as flattenLocales,
|
|
3669
|
+
vt as floorToPeriod,
|
|
3670
|
+
Sn as formatActingIdentity,
|
|
3671
|
+
Ta as formatClock,
|
|
3672
|
+
_a as formatHm,
|
|
3673
|
+
La as formatItemKey,
|
|
3674
|
+
kt as formatPeriod,
|
|
3675
|
+
Aa as formatSlaDuration,
|
|
3676
|
+
qa as freshSources,
|
|
3677
|
+
Di as getActivitySeenUserIds,
|
|
3678
|
+
po as getContactEndpoints,
|
|
3679
|
+
wo as getShortTitle,
|
|
3680
|
+
To as getUrgencyScore,
|
|
3681
|
+
ua as hasReacted,
|
|
3682
|
+
Qe as heightOf,
|
|
3683
|
+
Mo as helpCenterText,
|
|
3684
|
+
Jo as humanizeAction,
|
|
3685
|
+
Cn as interactionIdOf,
|
|
3686
|
+
va as isAgentUser,
|
|
3687
|
+
So as isAssigned,
|
|
3688
|
+
ro as isAssignmentTerminal,
|
|
3689
|
+
In as isAssignmentTrigger,
|
|
3690
|
+
ia as isAutoReady,
|
|
3691
|
+
mn as isAwaitingThem,
|
|
3692
|
+
Li as isChatMessageActivity,
|
|
3693
|
+
_o as isClosed,
|
|
3694
|
+
Ci as isConnectedType,
|
|
3695
|
+
js as isDeepLink,
|
|
3696
|
+
hn as isDescendant,
|
|
3697
|
+
fo as isEligible,
|
|
3698
|
+
$i as isEmailActivity,
|
|
3699
|
+
sc as isHtmlBody,
|
|
3700
|
+
aa as isInFlight,
|
|
3701
|
+
on as isInteractionUnseen,
|
|
3702
|
+
Hs as isLandingPath,
|
|
3703
|
+
Zt as isLikelyBulk,
|
|
3704
|
+
Be as isMessageShape,
|
|
3705
|
+
Ti as isMessageType,
|
|
3706
|
+
Cr as isMoreSpecificPattern,
|
|
3707
|
+
je as isNoteShape,
|
|
3708
|
+
Wn as isOpenClock,
|
|
3709
|
+
Ya as isOutwardTool,
|
|
3710
|
+
dn as isParked,
|
|
3711
|
+
$n as isPaused,
|
|
3712
|
+
Oi as isPlaybookAuthoredType,
|
|
3713
|
+
ic as isPublicEmailDomain,
|
|
3714
|
+
Fs as isPublicPath,
|
|
3715
|
+
pn as isReminderActive,
|
|
3716
|
+
Ii as isReplyableType,
|
|
3717
|
+
Ao as isSlaAtRisk,
|
|
3718
|
+
oa as isTerminal,
|
|
3719
|
+
go as isThreadLongEnough,
|
|
3720
|
+
ki as isTranscriptType,
|
|
3721
|
+
Ga as isWorkClosed,
|
|
3722
|
+
Ia as isWorkTypeVisible,
|
|
3723
|
+
Ka as itemDossierKeys,
|
|
3724
|
+
ir as ladderFor,
|
|
3725
|
+
Io as linkLabel,
|
|
3726
|
+
Fi as listeningAllowed,
|
|
3727
|
+
Co as localeInstruction,
|
|
3728
|
+
Oo as localeName,
|
|
3729
|
+
vo as localesOf,
|
|
3730
|
+
tc as looksLikeEmail,
|
|
3731
|
+
cs as matchContactToIntents,
|
|
3732
|
+
kr as matchPublicRoute,
|
|
3733
|
+
Ro as mcpCredentialScope,
|
|
3734
|
+
Do as mcpToolPrefix,
|
|
3735
|
+
Js as mergeShownKeys,
|
|
3736
|
+
St as messageCountsAs,
|
|
3737
|
+
oc as needsPhoneRegion,
|
|
3738
|
+
wi as nestsUnderParent,
|
|
3739
|
+
ya as nextSlaClock,
|
|
3740
|
+
Yi as normalizeArtifactBlocks,
|
|
3741
|
+
Ei as normalizeBlocks,
|
|
3742
|
+
ft as normalizeEmail,
|
|
3743
|
+
I as normalizeExample,
|
|
3744
|
+
Cs as notificationPrefKey,
|
|
3745
|
+
Kr as novelty,
|
|
3746
|
+
Es as operationDescriptor,
|
|
3747
|
+
As as operationsForKind,
|
|
3748
|
+
mo as parkMarksById,
|
|
3749
|
+
Fo as parseActingIdentity,
|
|
3750
|
+
da as parseClockMinutes,
|
|
3751
|
+
Pa as parseItemKey,
|
|
3752
|
+
Ir as pathToRegex,
|
|
3753
|
+
pa as pauseBitFor,
|
|
3754
|
+
Vi as periodsInRange,
|
|
3755
|
+
nc as phoneSuffix,
|
|
3756
|
+
ho as pickMailHeaders,
|
|
3757
|
+
At as plainTextFromMarkdown,
|
|
3758
|
+
ga as planSlaEvent,
|
|
3759
|
+
wn as playbookActor,
|
|
3760
|
+
ra as procedureOf,
|
|
3761
|
+
Ba as projectDossierKeys,
|
|
3762
|
+
Or as publicBasePathFor,
|
|
3763
|
+
Gs as publicRoutePatterns,
|
|
3764
|
+
ao as reactionWakesAssignment,
|
|
3765
|
+
X as readPath,
|
|
3766
|
+
we as readStepError,
|
|
3767
|
+
un as recencyOf,
|
|
3768
|
+
Mn as refKey,
|
|
3769
|
+
Xr as registrableDomain,
|
|
3770
|
+
Jn as rejectExampleCandidate,
|
|
3771
|
+
Bo as relatedByDefault,
|
|
3772
|
+
ee as remainingMsOf,
|
|
3773
|
+
mr as resolveAccountCapabilities,
|
|
3774
|
+
Y as resolveActivityText,
|
|
3775
|
+
fr as resolveChannelIntents,
|
|
3776
|
+
Xt as resolveSignature,
|
|
3777
|
+
Ns as resolveWorkMode,
|
|
3778
|
+
Us as resourceKindOf,
|
|
3779
|
+
Wo as runActor,
|
|
3780
|
+
ca as runInteractionId,
|
|
3781
|
+
jt as sanitizeInline,
|
|
3782
|
+
xr as sanitizeTranscript,
|
|
3783
|
+
Eo as scoreInteraction,
|
|
3784
|
+
Da as scoreWorkItem,
|
|
3785
|
+
No as selectLenses,
|
|
3786
|
+
ns as sessionsHoldCannotReach,
|
|
3787
|
+
ts as sessionsToHold,
|
|
3788
|
+
ze as shareKeyForTeam,
|
|
3789
|
+
Ve as shareKeyForUser,
|
|
3790
|
+
eo as shareKeysForViewer,
|
|
3791
|
+
Rs as shouldRunAudioPipeline,
|
|
3792
|
+
ba as slaBadgeTone,
|
|
3793
|
+
bo as slaHoursByInbox,
|
|
3794
|
+
fn as slaHoursFor,
|
|
3795
|
+
ar as sortStatuses,
|
|
3796
|
+
pr as sourceKey,
|
|
3797
|
+
ja as statusIn,
|
|
3798
|
+
na as stepsOf,
|
|
3799
|
+
Et as stripHtml,
|
|
3800
|
+
sa as subjectKeyOf,
|
|
3801
|
+
et as subjectOf,
|
|
3802
|
+
Qa as subjectRef,
|
|
3803
|
+
Ua as suggestProjectKey,
|
|
3804
|
+
la as summarizeReactions,
|
|
3805
|
+
Yo as targetById,
|
|
3806
|
+
Xo as targetForActivityType,
|
|
3807
|
+
Tn as toActingIdentity,
|
|
3808
|
+
Re as toE164,
|
|
3809
|
+
to as toolSourceKinds,
|
|
3810
|
+
Zn as topicOfferedForTeam,
|
|
3811
|
+
ka as topicsForTeam,
|
|
3812
|
+
qn as truncateExample,
|
|
3813
|
+
Fa as uniqueWorkStatusKey,
|
|
3814
|
+
wa as uniqueWorkTypeKey,
|
|
3815
|
+
$t as usageMetricId,
|
|
3816
|
+
zi as usageMetrics,
|
|
3817
|
+
Wa as validateStatuses,
|
|
3818
|
+
zo as valueAtPath,
|
|
3819
|
+
te as waitHoursOf,
|
|
3820
|
+
oo as wakesAssignment,
|
|
3821
|
+
$a as workActivityScopeKey,
|
|
3822
|
+
rr as workItemScopeKey,
|
|
3823
|
+
at as workProjectScopeKey,
|
|
3824
|
+
sr as workStatusKey,
|
|
3825
|
+
Vn as workTypeKey,
|
|
3826
|
+
J as workingMsBetween
|
|
3594
3827
|
};
|