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