@opencxh/domain 1.233.0 → 1.234.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/planning/capacity.d.ts +69 -0
- package/dist/entities/planning/contracts.d.ts +35 -17
- package/dist/entities/planning/index.d.ts +4 -0
- package/dist/entities/planning/pattern.d.ts +67 -0
- package/dist/entities/planning/spread.d.ts +61 -0
- package/dist/entities/planning/spread.test.d.ts +1 -0
- package/dist/entities/planning/terms.d.ts +42 -0
- package/dist/index.cjs +16 -16
- package/dist/index.js +1691 -1521
- package/package.json +1 -1
- /package/dist/entities/planning/{contracts.test.d.ts → capacity.test.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const wi = 10, Mi = 10, ki = 10, vi = 5, Wt = /* @__PURE__ */ new Set([
|
|
2
2
|
"header",
|
|
3
3
|
"section",
|
|
4
4
|
"context",
|
|
@@ -8,13 +8,13 @@ const ui = 10, di = 10, pi = 10, fi = 5, Dt = /* @__PURE__ */ new Set([
|
|
|
8
8
|
"actions",
|
|
9
9
|
"attachments"
|
|
10
10
|
]);
|
|
11
|
-
function
|
|
11
|
+
function Q(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 Oi(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -25,19 +25,19 @@ function mi(e, t = () => {
|
|
|
25
25
|
}
|
|
26
26
|
if (!r || typeof r != "object") continue;
|
|
27
27
|
const o = r;
|
|
28
|
-
if (!
|
|
28
|
+
if (!Wt.has(o.type)) {
|
|
29
29
|
t(`unknown block type ${String(o.type)}`);
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
32
32
|
switch (o.type) {
|
|
33
33
|
case "header":
|
|
34
|
-
if (!
|
|
34
|
+
if (!Q(o.text)) {
|
|
35
35
|
t("a header without text");
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
break;
|
|
39
39
|
case "context":
|
|
40
|
-
if (!
|
|
40
|
+
if (!Q(o.text)) {
|
|
41
41
|
t("a context block without text");
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
@@ -59,9 +59,9 @@ function mi(e, t = () => {
|
|
|
59
59
|
o.items.length > 10 && (t("more than 10 list items"), o.items = o.items.slice(0, 10));
|
|
60
60
|
break;
|
|
61
61
|
case "actions": {
|
|
62
|
-
const i = Array.isArray(o.elements) ? o.elements : [],
|
|
63
|
-
if (
|
|
64
|
-
|
|
62
|
+
const i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && Q(a.text));
|
|
63
|
+
if (s.length !== i.length && t("an action without action_id, invoke or text"), s.length === 0) continue;
|
|
64
|
+
s.length > 5 && t("more than 5 actions"), o.elements = s.slice(0, 5);
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -69,44 +69,44 @@ function mi(e, t = () => {
|
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
function
|
|
72
|
+
const Vt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, zt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
|
|
73
|
+
function Yt(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(Vt, "$2"), t = t.replace(zt, "$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 Xt(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 j(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 ve(e) {
|
|
91
91
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ee(e) {
|
|
94
94
|
return e?.split("@")?.[0] || e || "";
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function G(e) {
|
|
97
97
|
return e.map((t) => t.name).join(", ");
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Oe(e) {
|
|
100
100
|
return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const x = {
|
|
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 — ${ee(e.payload.from)}` : `Outbound call started — ${ee(e.payload.to)}`
|
|
110
110
|
},
|
|
111
111
|
VOICE_CALL_ANSWERED: {
|
|
112
112
|
shape: "event",
|
|
@@ -133,15 +133,15 @@ const k = {
|
|
|
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 ? ` (${j(e.payload.duration)})` : ""}`,
|
|
137
|
+
timeline: (e) => `Call ended${ve(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 — ${ee(e.payload.from)}`
|
|
145
145
|
},
|
|
146
146
|
VOICE_CALL_FAILED: {
|
|
147
147
|
shape: "event",
|
|
@@ -188,7 +188,7 @@ const k = {
|
|
|
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 ? ` (${j(e.payload.duration)})` : ""}`,
|
|
192
192
|
timeline: () => "Video call ended"
|
|
193
193
|
},
|
|
194
194
|
VIDEO_CALL_MISSED: {
|
|
@@ -216,7 +216,7 @@ const k = {
|
|
|
216
216
|
replyable: !0,
|
|
217
217
|
carriesText: !0,
|
|
218
218
|
countsAs: "inbound_message",
|
|
219
|
-
snippet:
|
|
219
|
+
snippet: Ce
|
|
220
220
|
},
|
|
221
221
|
EMAIL_SENT: {
|
|
222
222
|
shape: "message",
|
|
@@ -226,7 +226,7 @@ const k = {
|
|
|
226
226
|
replyable: !0,
|
|
227
227
|
carriesText: !0,
|
|
228
228
|
countsAs: "outbound_message",
|
|
229
|
-
snippet:
|
|
229
|
+
snippet: Ce
|
|
230
230
|
},
|
|
231
231
|
/* ---- chat ---- */
|
|
232
232
|
CHAT_MESSAGE_SENT: {
|
|
@@ -255,9 +255,9 @@ const k = {
|
|
|
255
255
|
shape: "event",
|
|
256
256
|
channelKind: "chat",
|
|
257
257
|
icon: "message-circle",
|
|
258
|
-
snippet: (e) => `${
|
|
258
|
+
snippet: (e) => `${G(e.payload.members)} toegevoegd`,
|
|
259
259
|
timeline: (e) => {
|
|
260
|
-
const t =
|
|
260
|
+
const t = G(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 k = {
|
|
|
265
265
|
shape: "event",
|
|
266
266
|
channelKind: "chat",
|
|
267
267
|
icon: "message-circle",
|
|
268
|
-
snippet: (e) => `${
|
|
268
|
+
snippet: (e) => `${G(e.payload.members)} verlaten`,
|
|
269
269
|
timeline: (e) => {
|
|
270
|
-
const t =
|
|
270
|
+
const t = G(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 k = {
|
|
|
283
283
|
channelKind: "chat",
|
|
284
284
|
icon: "message-circle",
|
|
285
285
|
snippet: () => "Gesprek gestart",
|
|
286
|
-
timeline: (e) => `${
|
|
286
|
+
timeline: (e) => `${Oe(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 ? ` (${j(e.payload.duration)})` : ""}`,
|
|
294
|
+
timeline: (e) => `${Oe(e.payload.callType)} ended${ve(e.payload.duration)}`,
|
|
295
295
|
joinUrl: (e) => e.payload.joinUrl
|
|
296
296
|
},
|
|
297
297
|
CHAT_EVENT: {
|
|
@@ -380,7 +380,7 @@ const k = {
|
|
|
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 ? ` (${j(e.payload.duration)})` : ""}`,
|
|
384
384
|
timeline: () => "Meeting ended"
|
|
385
385
|
},
|
|
386
386
|
MEETING_PARTICIPANT_JOINED: {
|
|
@@ -460,63 +460,63 @@ const k = {
|
|
|
460
460
|
timeline: (e, t) => `Status changed by ${t}`
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
|
-
function
|
|
464
|
-
const t = e.payload, n =
|
|
463
|
+
function Ce(e) {
|
|
464
|
+
const t = e.payload, n = Yt(t.bodyText).trim() || t.bodySnippet?.trim() || Xt(t.body ?? "");
|
|
465
465
|
return t.subject ? `${t.subject} — ${n}` : n;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
return
|
|
467
|
+
function T(e) {
|
|
468
|
+
return x[e];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
470
|
+
function Ci(e) {
|
|
471
|
+
return T(e)?.icon ?? "circle";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
return
|
|
473
|
+
function Ni(e) {
|
|
474
|
+
return T(e)?.channelKind;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function dt(e) {
|
|
477
477
|
return e === "message" || e === "note";
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
479
|
+
function xi(e) {
|
|
480
|
+
return dt(T(e)?.shape);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function ft(e) {
|
|
483
483
|
return e === "note";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Ri(e) {
|
|
486
|
+
return ft(T(e)?.shape);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
488
|
+
function Di(e) {
|
|
489
|
+
return T(e)?.replyable === !0;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
491
|
+
function $i(e) {
|
|
492
|
+
return T(e)?.carriesText === !0;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
return
|
|
494
|
+
function qt(e) {
|
|
495
|
+
return T(e)?.countsAs;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
497
|
+
function Li(e) {
|
|
498
|
+
return T(e)?.playbookAuthored === !0;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
500
|
+
function Pi(e) {
|
|
501
|
+
return T(e)?.connected === !0;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
const t =
|
|
503
|
+
function Ui(e) {
|
|
504
|
+
const t = T(e);
|
|
505
505
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
const t =
|
|
507
|
+
function Jt(e) {
|
|
508
|
+
const t = T(e.type)?.snippet;
|
|
509
509
|
return t ? t(e) : "";
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
const n =
|
|
511
|
+
function Ki(e, t) {
|
|
512
|
+
const n = T(e.type)?.timeline;
|
|
513
513
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const t =
|
|
515
|
+
function Fi(e) {
|
|
516
|
+
const t = T(e.type)?.joinUrl;
|
|
517
517
|
return t ? t(e) : void 0;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function ce(e, t) {
|
|
520
520
|
let n = e;
|
|
521
521
|
for (const r of t.split(".")) {
|
|
522
522
|
if (n == null || typeof n != "object") return "";
|
|
@@ -524,44 +524,44 @@ function oe(e, t) {
|
|
|
524
524
|
}
|
|
525
525
|
return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function le(e, t, n) {
|
|
528
528
|
if (e === void 0) return null;
|
|
529
529
|
if (typeof e == "string") return e || null;
|
|
530
530
|
if ("value" in e)
|
|
531
|
-
return
|
|
531
|
+
return ce(t, e.value) || null;
|
|
532
532
|
const r = {};
|
|
533
|
-
for (const [i,
|
|
534
|
-
r[i] =
|
|
533
|
+
for (const [i, s] of Object.entries(e.params ?? {}))
|
|
534
|
+
r[i] = ce(t, s);
|
|
535
535
|
const o = n(e.key, r);
|
|
536
536
|
return o === e.key ? null : o;
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Zt(e, t) {
|
|
539
539
|
if (!e || typeof e == "string" || "value" in e) return null;
|
|
540
540
|
const n = {};
|
|
541
541
|
for (const [r, o] of Object.entries(e.params ?? {}))
|
|
542
|
-
n[r] =
|
|
542
|
+
n[r] = ce(t, o);
|
|
543
543
|
return { key: e.key, params: n };
|
|
544
544
|
}
|
|
545
|
-
const
|
|
546
|
-
function
|
|
545
|
+
const Ne = 140;
|
|
546
|
+
function Qt(e) {
|
|
547
547
|
const t = e.trim();
|
|
548
|
-
return t.length <=
|
|
548
|
+
return t.length <= Ne ? t : `${t.slice(0, Ne - 1).trimEnd()}…`;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
const n =
|
|
550
|
+
function Bi(e, t) {
|
|
551
|
+
const n = Zt(t?.text, e), r = t ? le(t.text, e, (o) => o) : null;
|
|
552
552
|
return {
|
|
553
553
|
activityId: e.id,
|
|
554
554
|
type: e.type,
|
|
555
|
-
snippet:
|
|
555
|
+
snippet: Qt(r ?? Jt(e)),
|
|
556
556
|
authorName: e.author?.name ?? "",
|
|
557
557
|
direction: e.direction,
|
|
558
558
|
createdAt: e.createdAt ?? Date.now(),
|
|
559
559
|
...n ? { snippetKey: n.key, snippetParams: n.params } : {}
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
const
|
|
563
|
-
function
|
|
564
|
-
const t =
|
|
562
|
+
const en = (e) => e;
|
|
563
|
+
function xe(e) {
|
|
564
|
+
const t = x[e];
|
|
565
565
|
return {
|
|
566
566
|
type: e,
|
|
567
567
|
shape: t.shape,
|
|
@@ -576,7 +576,7 @@ function Me(e) {
|
|
|
576
576
|
displayNameKey: t.displayNameKey
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Re(e) {
|
|
580
580
|
return {
|
|
581
581
|
type: e.type,
|
|
582
582
|
shape: e.shape,
|
|
@@ -591,21 +591,21 @@ function ke(e) {
|
|
|
591
591
|
displayNameKey: e.displayNameKey
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
class
|
|
595
|
-
constructor(t = [], n =
|
|
594
|
+
class tn {
|
|
595
|
+
constructor(t = [], n = en) {
|
|
596
596
|
this.translate = n;
|
|
597
597
|
for (const r of t)
|
|
598
|
-
r?.type && (r.type in
|
|
598
|
+
r?.type && (r.type in x || this.declared.has(r.type) || this.declared.set(r.type, r));
|
|
599
599
|
}
|
|
600
600
|
declared = /* @__PURE__ */ new Map();
|
|
601
601
|
get(t) {
|
|
602
|
-
if (t in
|
|
602
|
+
if (t in x) return xe(t);
|
|
603
603
|
const n = this.declared.get(t);
|
|
604
|
-
return n ?
|
|
604
|
+
return n ? Re(n) : void 0;
|
|
605
605
|
}
|
|
606
606
|
/** Everything that may be offered as a trigger, built-in and declared. */
|
|
607
607
|
triggerable() {
|
|
608
|
-
const t = Object.keys(
|
|
608
|
+
const t = Object.keys(x).filter((r) => x[r].triggerable).map(xe), n = [...this.declared.values()].map(Re).filter((r) => r.triggerable);
|
|
609
609
|
return [...t, ...n];
|
|
610
610
|
}
|
|
611
611
|
/**
|
|
@@ -614,17 +614,17 @@ class Gt {
|
|
|
614
614
|
* the feed always showed for unknown types.
|
|
615
615
|
*/
|
|
616
616
|
timelineText(t, n) {
|
|
617
|
-
const r =
|
|
617
|
+
const r = x[t.type];
|
|
618
618
|
if (r?.timeline) return r.timeline(t, n);
|
|
619
619
|
const o = this.declared.get(t.type);
|
|
620
|
-
return
|
|
620
|
+
return le(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
|
|
621
621
|
}
|
|
622
622
|
/** The line for the inbox list. Empty when the type has nothing to show. */
|
|
623
623
|
snippet(t) {
|
|
624
|
-
const n =
|
|
624
|
+
const n = x[t.type];
|
|
625
625
|
if (n?.snippet) return n.snippet(t);
|
|
626
626
|
const r = this.declared.get(t.type);
|
|
627
|
-
return
|
|
627
|
+
return le(r?.text, t, this.translate) ?? "";
|
|
628
628
|
}
|
|
629
629
|
/** The descriptor as it arrived; needed to store `text` as a key. */
|
|
630
630
|
descriptor(t) {
|
|
@@ -649,11 +649,11 @@ class Gt {
|
|
|
649
649
|
* {@link ResolvedActivityType}.
|
|
650
650
|
*/
|
|
651
651
|
isMessage(t) {
|
|
652
|
-
return
|
|
652
|
+
return dt(this.get(t)?.shape);
|
|
653
653
|
}
|
|
654
654
|
/** Folds into the list under the message it answers. See {@link isNoteShape}. */
|
|
655
655
|
nestsUnderParent(t) {
|
|
656
|
-
return
|
|
656
|
+
return ft(this.get(t)?.shape);
|
|
657
657
|
}
|
|
658
658
|
/** Can a person reply to this? Notes cannot — those go nowhere. */
|
|
659
659
|
isReplyable(t) {
|
|
@@ -681,23 +681,23 @@ class Gt {
|
|
|
681
681
|
return this.translate;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
684
|
+
const Hi = new tn();
|
|
685
|
+
function ji(e, t, n = []) {
|
|
686
686
|
const r = e.createdAt;
|
|
687
687
|
if (!r) return [];
|
|
688
688
|
const o = new Set(n);
|
|
689
|
-
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i,
|
|
689
|
+
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i, s]) => s >= r && !o.has(i)).map(([i]) => i);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function nn(e) {
|
|
692
692
|
return e.createdAt ?? 0;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function Gi(e) {
|
|
695
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Wi(e) {
|
|
698
698
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const pt = [
|
|
701
701
|
{
|
|
702
702
|
id: "openai",
|
|
703
703
|
attachmentKinds: ["image", "pdf"],
|
|
@@ -787,45 +787,45 @@ const it = [
|
|
|
787
787
|
defaultModel: "default"
|
|
788
788
|
}
|
|
789
789
|
];
|
|
790
|
-
function
|
|
791
|
-
return
|
|
790
|
+
function q(e) {
|
|
791
|
+
return pt.find((t) => t.id === e);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
793
|
+
function Vi(e) {
|
|
794
|
+
return q(e)?.label ?? e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
796
|
+
function zi(e, t = "gpt-5-mini") {
|
|
797
|
+
return q(e)?.defaultModel ?? t;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
799
|
+
function Yi(e) {
|
|
800
|
+
return pt.filter((t) => t.capabilities.includes(e));
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
const t =
|
|
802
|
+
function Xi(e) {
|
|
803
|
+
const t = q(e);
|
|
804
804
|
return !!t && !t.baseUrl;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
return t === "text" ? !0 :
|
|
806
|
+
function qi(e, t) {
|
|
807
|
+
return t === "text" ? !0 : q(e)?.attachmentKinds?.includes(t) === !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ji(e, t) {
|
|
810
810
|
if (!e.enabled) return "ok";
|
|
811
|
-
const n =
|
|
811
|
+
const n = De(e.hardLimitNanos), r = De(e.softLimitNanos);
|
|
812
812
|
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function De(e) {
|
|
815
815
|
return typeof e == "number" ? e : void 0;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function rn(e, t = "month") {
|
|
818
818
|
const n = new Date(e);
|
|
819
819
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const n = new Date(
|
|
821
|
+
function Zi(e, t = "month") {
|
|
822
|
+
const n = new Date(rn(e, t));
|
|
823
823
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Qi(e) {
|
|
826
826
|
return e?.listeningEnabled !== !1;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const es = [
|
|
829
829
|
{ id: "agent", label: "Agent", labelSource: "user" },
|
|
830
830
|
{ id: "team", label: "Team", labelSource: "team" },
|
|
831
831
|
{ id: "inbox", label: "Inbox", labelSource: "inbox" },
|
|
@@ -835,64 +835,64 @@ const Ki = [
|
|
|
835
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
836
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
837
837
|
];
|
|
838
|
-
function
|
|
838
|
+
function te(e) {
|
|
839
839
|
return e < 10 ? `0${e}` : `${e}`;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
const n = new Date(e), r = `${n.getUTCFullYear()}-${
|
|
843
|
-
return t === "day" ? r : `${r}T${
|
|
841
|
+
function K(e, t) {
|
|
842
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${te(n.getUTCMonth() + 1)}-${te(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${te(n.getUTCHours())}`;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function F(e, t) {
|
|
846
846
|
const n = new Date(e);
|
|
847
847
|
return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
|
|
848
848
|
}
|
|
849
|
-
const
|
|
850
|
-
function
|
|
851
|
-
const r = n === "hour" ?
|
|
852
|
-
for (let i =
|
|
853
|
-
o.push(
|
|
849
|
+
const on = 36e5, sn = 864e5;
|
|
850
|
+
function ts(e, t, n) {
|
|
851
|
+
const r = n === "hour" ? on : sn, o = [];
|
|
852
|
+
for (let i = F(e, n); i <= t; i += r)
|
|
853
|
+
o.push(K(i, n));
|
|
854
854
|
return o;
|
|
855
855
|
}
|
|
856
|
-
const
|
|
857
|
-
function
|
|
856
|
+
const an = /* @__PURE__ */ new Set(["time"]);
|
|
857
|
+
function ns(e, t, n) {
|
|
858
858
|
if (!e) return [];
|
|
859
859
|
const r = new Set(e.supportedDimensions ?? []);
|
|
860
|
-
return t.filter((o) => r.has(o.id) && !
|
|
860
|
+
return t.filter((o) => r.has(o.id) && !an.has(o.id)).map((o) => ({
|
|
861
861
|
id: o.id,
|
|
862
862
|
label: o.label,
|
|
863
863
|
options: o.options?.length ? o.options : n[o.id] ?? []
|
|
864
864
|
})).filter((o) => o.options.length > 0);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function rs(e, t) {
|
|
867
867
|
const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
|
|
868
868
|
return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function os(e) {
|
|
871
871
|
return { value: e.id, label: `${e.category} · ${e.label}` };
|
|
872
872
|
}
|
|
873
|
-
const
|
|
873
|
+
const cn = [
|
|
874
874
|
{ id: "resource", label: "Resource", labelSource: "raw" },
|
|
875
875
|
{ id: "origin", label: "Herkomst", labelSource: "raw" }
|
|
876
|
-
],
|
|
877
|
-
function
|
|
876
|
+
], ln = cn.map((e) => e.id);
|
|
877
|
+
function un(e, t) {
|
|
878
878
|
return `${e}.usage.${t}`;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function is(e, t) {
|
|
881
881
|
return t.map((n) => ({
|
|
882
|
-
id:
|
|
882
|
+
id: un(e, n.unit),
|
|
883
883
|
label: n.label,
|
|
884
884
|
category: "Verbruik",
|
|
885
885
|
valueType: n.valueType ?? "count",
|
|
886
886
|
aggregation: "sum",
|
|
887
887
|
supportedDimensions: [
|
|
888
888
|
"provider",
|
|
889
|
-
...
|
|
889
|
+
...ln,
|
|
890
890
|
...n.extraDimensions ?? [],
|
|
891
891
|
"time"
|
|
892
892
|
]
|
|
893
893
|
}));
|
|
894
894
|
}
|
|
895
|
-
const
|
|
895
|
+
const mt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), $e = 200, Le = 100, Pe = 200, Ue = 12, Ke = 4, ht = 4e3, ne = 500, ss = 256 * 1024, dn = /* @__PURE__ */ new Set([
|
|
896
896
|
"heading",
|
|
897
897
|
"paragraph",
|
|
898
898
|
"list",
|
|
@@ -902,15 +902,15 @@ const at = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
|
|
|
902
902
|
"table",
|
|
903
903
|
"kpi",
|
|
904
904
|
"callout"
|
|
905
|
-
]),
|
|
906
|
-
function
|
|
905
|
+
]), fn = ["http:", "https:", "mailto:", "tel:"], pn = /^[a-z][a-z0-9+.-]*:/i;
|
|
906
|
+
function gt(e) {
|
|
907
907
|
const t = e.trim().replace(/^<|>$/g, "");
|
|
908
908
|
if (!t) return !1;
|
|
909
|
-
const n =
|
|
910
|
-
return n ?
|
|
909
|
+
const n = pn.exec(t)?.[0];
|
|
910
|
+
return n ? fn.includes(n.toLowerCase()) : !t.startsWith("//");
|
|
911
911
|
}
|
|
912
|
-
const
|
|
913
|
-
function
|
|
912
|
+
const mn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
|
|
913
|
+
function hn(e) {
|
|
914
914
|
let t = "", n = 0;
|
|
915
915
|
for (; n < e.length; ) {
|
|
916
916
|
const r = e[n] === "!" && e[n + 1] === "[";
|
|
@@ -918,22 +918,22 @@ function rn(e) {
|
|
|
918
918
|
t += e[n], n += 1;
|
|
919
919
|
continue;
|
|
920
920
|
}
|
|
921
|
-
const o = n + (r ? 2 : 1), i =
|
|
921
|
+
const o = n + (r ? 2 : 1), i = Fe(e, o, "[", "]");
|
|
922
922
|
if (i < 0 || e[i + 1] !== "(") {
|
|
923
923
|
t += e[n], n += 1;
|
|
924
924
|
continue;
|
|
925
925
|
}
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
926
|
+
const s = Fe(e, i + 2, "(", ")");
|
|
927
|
+
if (s < 0) {
|
|
928
928
|
t += e[n], n += 1;
|
|
929
929
|
continue;
|
|
930
930
|
}
|
|
931
|
-
const
|
|
932
|
-
t += r || !
|
|
931
|
+
const a = e.slice(o, i), l = e.slice(i + 2, s).trim().split(/\s+/)[0] ?? "";
|
|
932
|
+
t += r || !gt(l) ? a : e.slice(n, s + 1), n = s + 1;
|
|
933
933
|
}
|
|
934
934
|
return t;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Fe(e, t, n, r) {
|
|
937
937
|
let o = 1;
|
|
938
938
|
for (let i = t; i < e.length; i += 1) {
|
|
939
939
|
if (e[i] === "\\") {
|
|
@@ -946,166 +946,166 @@ function De(e, t, n, r) {
|
|
|
946
946
|
}
|
|
947
947
|
return -1;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
return
|
|
951
|
-
|
|
952
|
-
(t, n, r) =>
|
|
949
|
+
function gn(e) {
|
|
950
|
+
return hn(e).replace(
|
|
951
|
+
mn,
|
|
952
|
+
(t, n, r) => gt(r) ? t : ""
|
|
953
953
|
);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
return typeof e == "string" ?
|
|
955
|
+
function M(e, t = ht) {
|
|
956
|
+
return typeof e == "string" ? gn(e).slice(0, t) : "";
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function yn(e, t = ht) {
|
|
959
959
|
return typeof e == "string" ? e.slice(0, t) : "";
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
return typeof e == "string" &&
|
|
961
|
+
function bn(e, t = "info") {
|
|
962
|
+
return typeof e == "string" && mt.has(e) ? e : t;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function as(e, t = () => {
|
|
965
965
|
}) {
|
|
966
966
|
if (!Array.isArray(e)) return [];
|
|
967
967
|
const n = [];
|
|
968
968
|
for (const r of e) {
|
|
969
|
-
if (n.length >=
|
|
970
|
-
t(`more than ${
|
|
969
|
+
if (n.length >= $e) {
|
|
970
|
+
t(`more than ${$e} blocks; the rest was dropped`);
|
|
971
971
|
break;
|
|
972
972
|
}
|
|
973
973
|
if (!r || typeof r != "object") continue;
|
|
974
974
|
const o = r;
|
|
975
|
-
if (!
|
|
975
|
+
if (!dn.has(o.type)) {
|
|
976
976
|
t(`unknown block type ${String(o.type)}`);
|
|
977
977
|
continue;
|
|
978
978
|
}
|
|
979
979
|
const i = typeof o.block_id == "string" ? { block_id: o.block_id } : {};
|
|
980
980
|
switch (o.type) {
|
|
981
981
|
case "heading": {
|
|
982
|
-
const
|
|
983
|
-
if (!
|
|
982
|
+
const s = M(o.text);
|
|
983
|
+
if (!s) {
|
|
984
984
|
t("a heading without text");
|
|
985
985
|
continue;
|
|
986
986
|
}
|
|
987
|
-
const
|
|
988
|
-
n.push({ ...i, type: "heading", level:
|
|
987
|
+
const a = o.level === 2 || o.level === 3 ? o.level : 1;
|
|
988
|
+
n.push({ ...i, type: "heading", level: a, text: s });
|
|
989
989
|
break;
|
|
990
990
|
}
|
|
991
991
|
case "paragraph": {
|
|
992
|
-
const
|
|
993
|
-
if (!
|
|
992
|
+
const s = M(o.text);
|
|
993
|
+
if (!s) {
|
|
994
994
|
t("a paragraph without text");
|
|
995
995
|
continue;
|
|
996
996
|
}
|
|
997
|
-
n.push({ ...i, type: "paragraph", text:
|
|
997
|
+
n.push({ ...i, type: "paragraph", text: s });
|
|
998
998
|
break;
|
|
999
999
|
}
|
|
1000
1000
|
case "quote": {
|
|
1001
|
-
const
|
|
1002
|
-
if (!
|
|
1001
|
+
const s = M(o.text);
|
|
1002
|
+
if (!s) {
|
|
1003
1003
|
t("a quote without text");
|
|
1004
1004
|
continue;
|
|
1005
1005
|
}
|
|
1006
|
-
n.push({ ...i, type: "quote", text:
|
|
1006
|
+
n.push({ ...i, type: "quote", text: s });
|
|
1007
1007
|
break;
|
|
1008
1008
|
}
|
|
1009
1009
|
case "code": {
|
|
1010
|
-
const
|
|
1011
|
-
if (!
|
|
1010
|
+
const s = yn(o.text);
|
|
1011
|
+
if (!s) {
|
|
1012
1012
|
t("a code block without text");
|
|
1013
1013
|
continue;
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1016
|
-
n.push({ ...i, type: "code", ...
|
|
1015
|
+
const a = typeof o.lang == "string" ? { lang: o.lang.slice(0, 32) } : {};
|
|
1016
|
+
n.push({ ...i, type: "code", ...a, text: s });
|
|
1017
1017
|
break;
|
|
1018
1018
|
}
|
|
1019
1019
|
case "divider":
|
|
1020
1020
|
n.push({ ...i, type: "divider" });
|
|
1021
1021
|
break;
|
|
1022
1022
|
case "list": {
|
|
1023
|
-
const
|
|
1024
|
-
for (const
|
|
1025
|
-
if (
|
|
1026
|
-
t(`more than ${
|
|
1023
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1024
|
+
for (const d of s) {
|
|
1025
|
+
if (a.length >= Le) {
|
|
1026
|
+
t(`more than ${Le} list items`);
|
|
1027
1027
|
break;
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1030
|
-
if (!
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1029
|
+
const p = M(d?.text);
|
|
1030
|
+
if (!p) continue;
|
|
1031
|
+
const c = M(d?.lead, 200);
|
|
1032
|
+
a.push(c ? { lead: c, text: p } : { text: p });
|
|
1033
1033
|
}
|
|
1034
|
-
if (
|
|
1034
|
+
if (a.length === 0) {
|
|
1035
1035
|
t("a list without usable items");
|
|
1036
1036
|
continue;
|
|
1037
1037
|
}
|
|
1038
|
-
const
|
|
1039
|
-
n.push({ ...i, type: "list", style:
|
|
1038
|
+
const l = o.style === "numbered" ? "numbered" : "bulleted";
|
|
1039
|
+
n.push({ ...i, type: "list", style: l, items: a });
|
|
1040
1040
|
break;
|
|
1041
1041
|
}
|
|
1042
1042
|
case "table": {
|
|
1043
|
-
const
|
|
1044
|
-
for (const
|
|
1045
|
-
if (
|
|
1046
|
-
t(`more than ${
|
|
1043
|
+
const s = Array.isArray(o.columns) ? o.columns : [], a = [];
|
|
1044
|
+
for (const c of s) {
|
|
1045
|
+
if (a.length >= Ue) {
|
|
1046
|
+
t(`more than ${Ue} table columns`);
|
|
1047
1047
|
break;
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1049
|
+
const g = M(c?.label, ne), y = c?.align === "right" ? "right" : void 0;
|
|
1050
|
+
a.push(y ? { label: g, align: y } : { label: g });
|
|
1051
1051
|
}
|
|
1052
|
-
if (
|
|
1052
|
+
if (a.length === 0) {
|
|
1053
1053
|
t("a table without columns");
|
|
1054
1054
|
continue;
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1057
|
-
for (const
|
|
1058
|
-
if (
|
|
1059
|
-
t(`more than ${
|
|
1056
|
+
const l = Array.isArray(o.rows) ? o.rows : [], d = [];
|
|
1057
|
+
for (const c of l) {
|
|
1058
|
+
if (d.length >= Pe) {
|
|
1059
|
+
t(`more than ${Pe} table rows`);
|
|
1060
1060
|
break;
|
|
1061
1061
|
}
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1062
|
+
const g = Array.isArray(c) ? c : [];
|
|
1063
|
+
d.push(a.map((y, _) => M(g[_], ne)));
|
|
1064
1064
|
}
|
|
1065
|
-
const
|
|
1065
|
+
const p = M(o.caption, ne);
|
|
1066
1066
|
n.push({
|
|
1067
1067
|
...i,
|
|
1068
1068
|
type: "table",
|
|
1069
|
-
columns:
|
|
1070
|
-
rows:
|
|
1071
|
-
...
|
|
1069
|
+
columns: a,
|
|
1070
|
+
rows: d,
|
|
1071
|
+
...p ? { caption: p } : {}
|
|
1072
1072
|
});
|
|
1073
1073
|
break;
|
|
1074
1074
|
}
|
|
1075
1075
|
case "kpi": {
|
|
1076
|
-
const
|
|
1077
|
-
for (const
|
|
1078
|
-
if (
|
|
1079
|
-
t(`more than ${
|
|
1076
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1077
|
+
for (const l of s) {
|
|
1078
|
+
if (a.length >= Ke) {
|
|
1079
|
+
t(`more than ${Ke} kpi items`);
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
|
-
const
|
|
1083
|
-
if (!
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
typeof
|
|
1082
|
+
const d = M(l?.value, 40), p = M(l?.label, 80);
|
|
1083
|
+
if (!d || !p) continue;
|
|
1084
|
+
const c = l?.tone;
|
|
1085
|
+
a.push(
|
|
1086
|
+
typeof c == "string" && mt.has(c) ? { value: d, label: p, tone: c } : { value: d, label: p }
|
|
1087
1087
|
);
|
|
1088
1088
|
}
|
|
1089
|
-
if (
|
|
1089
|
+
if (a.length === 0) {
|
|
1090
1090
|
t("a kpi block without usable items");
|
|
1091
1091
|
continue;
|
|
1092
1092
|
}
|
|
1093
|
-
n.push({ ...i, type: "kpi", items:
|
|
1093
|
+
n.push({ ...i, type: "kpi", items: a });
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
1096
|
case "callout": {
|
|
1097
|
-
const
|
|
1098
|
-
if (!
|
|
1097
|
+
const s = M(o.text);
|
|
1098
|
+
if (!s) {
|
|
1099
1099
|
t("a callout without text");
|
|
1100
1100
|
continue;
|
|
1101
1101
|
}
|
|
1102
|
-
const
|
|
1102
|
+
const a = M(o.title, 200);
|
|
1103
1103
|
n.push({
|
|
1104
1104
|
...i,
|
|
1105
1105
|
type: "callout",
|
|
1106
|
-
tone:
|
|
1107
|
-
...
|
|
1108
|
-
text:
|
|
1106
|
+
tone: bn(o.tone),
|
|
1107
|
+
...a ? { title: a } : {},
|
|
1108
|
+
text: s
|
|
1109
1109
|
});
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
@@ -1113,28 +1113,28 @@ function Vi(e, t = () => {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
return n;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function cs(e) {
|
|
1117
1117
|
return JSON.stringify(e).length;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function ls(e) {
|
|
1120
1120
|
return {
|
|
1121
1121
|
blocks: e.length,
|
|
1122
1122
|
types: e.map((t) => t.type),
|
|
1123
1123
|
headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
|
|
1124
1124
|
};
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function Be(e) {
|
|
1127
1127
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function He(e, t, n) {
|
|
1130
1130
|
const r = e.map((o, i) => n?.[i] === "right" ? "---:" : "---");
|
|
1131
1131
|
return [
|
|
1132
|
-
`| ${e.map(
|
|
1132
|
+
`| ${e.map(Be).join(" | ")} |`,
|
|
1133
1133
|
`| ${r.join(" | ")} |`,
|
|
1134
|
-
...t.map((o) => `| ${o.map(
|
|
1134
|
+
...t.map((o) => `| ${o.map(Be).join(" | ")} |`)
|
|
1135
1135
|
];
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function An(e) {
|
|
1138
1138
|
switch (e.type) {
|
|
1139
1139
|
case "heading":
|
|
1140
1140
|
return [`${"#".repeat(e.level)} ${e.text}`];
|
|
@@ -1152,7 +1152,7 @@ function cn(e) {
|
|
|
1152
1152
|
return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
|
|
1153
1153
|
});
|
|
1154
1154
|
case "table": {
|
|
1155
|
-
const t =
|
|
1155
|
+
const t = He(
|
|
1156
1156
|
e.columns.map((n) => n.label),
|
|
1157
1157
|
e.rows,
|
|
1158
1158
|
e.columns.map((n) => n.align ?? "left")
|
|
@@ -1160,7 +1160,7 @@ function cn(e) {
|
|
|
1160
1160
|
return e.caption ? [...t, "", `*${e.caption}*`] : t;
|
|
1161
1161
|
}
|
|
1162
1162
|
case "kpi":
|
|
1163
|
-
return
|
|
1163
|
+
return He(
|
|
1164
1164
|
e.items.map((t) => t.value),
|
|
1165
1165
|
[e.items.map((t) => t.label)]
|
|
1166
1166
|
);
|
|
@@ -1168,11 +1168,11 @@ function cn(e) {
|
|
|
1168
1168
|
return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function us(e, t) {
|
|
1172
1172
|
const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
|
|
1173
1173
|
t && !r && n.push(`# ${t}`);
|
|
1174
1174
|
for (const o of e) {
|
|
1175
|
-
const i =
|
|
1175
|
+
const i = An(o);
|
|
1176
1176
|
i.length > 0 && n.push(i.join(`
|
|
1177
1177
|
`));
|
|
1178
1178
|
}
|
|
@@ -1181,45 +1181,45 @@ function Yi(e, t) {
|
|
|
1181
1181
|
`)}
|
|
1182
1182
|
`;
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
1184
|
+
const yt = (e) => `user:${e}`, bt = (e) => `team:${e}`;
|
|
1185
|
+
function ds(e) {
|
|
1186
1186
|
const t = /* @__PURE__ */ new Set();
|
|
1187
1187
|
for (const n of e ?? [])
|
|
1188
|
-
n?.id && (n.kind === "user" && t.add(
|
|
1188
|
+
n?.id && (n.kind === "user" && t.add(yt(n.id)), n.kind === "team" && t.add(bt(n.id)));
|
|
1189
1189
|
return [...t].sort();
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return [
|
|
1191
|
+
function fs(e, t) {
|
|
1192
|
+
return [yt(e), ...t.map(bt)];
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function ps(e) {
|
|
1195
1195
|
const t = /* @__PURE__ */ new Set();
|
|
1196
1196
|
for (const n of e ?? [])
|
|
1197
1197
|
n?.kind && t.add(n.kind);
|
|
1198
1198
|
return [...t];
|
|
1199
1199
|
}
|
|
1200
|
-
const
|
|
1201
|
-
function
|
|
1202
|
-
return
|
|
1200
|
+
const En = ["done", "escalated"], ms = ["open", "waiting"];
|
|
1201
|
+
function hs(e) {
|
|
1202
|
+
return En.includes(e);
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1205
|
-
function
|
|
1206
|
-
return `${
|
|
1204
|
+
const Sn = "assignment";
|
|
1205
|
+
function gs(e) {
|
|
1206
|
+
return `${Sn}:${e}`;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function ys(e, t, n, r) {
|
|
1209
1209
|
if (e.direction === "inbound") return !0;
|
|
1210
1210
|
if (e.author?.type === "user" && e.author.id === t) return !1;
|
|
1211
1211
|
const o = e.payload?.mentions;
|
|
1212
1212
|
return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function bs(e) {
|
|
1215
1215
|
const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
|
|
1216
1216
|
return !o || !t || t !== r ? !1 : n !== r;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function As(e) {
|
|
1219
1219
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1220
1220
|
}
|
|
1221
|
-
const
|
|
1222
|
-
function
|
|
1221
|
+
const _n = 12;
|
|
1222
|
+
function Es(e, t, n = _n) {
|
|
1223
1223
|
const r = t + 1;
|
|
1224
1224
|
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 ? {
|
|
1225
1225
|
status: "escalated",
|
|
@@ -1233,39 +1233,39 @@ function ia(e, t, n = dn) {
|
|
|
1233
1233
|
reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
|
-
const
|
|
1237
|
-
function
|
|
1236
|
+
const Ss = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1237
|
+
function In(e, t) {
|
|
1238
1238
|
const n = e.settings?.signatures?.[t];
|
|
1239
1239
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1241
|
+
function _s(e, t, n, r = "html") {
|
|
1242
1242
|
if (!e) return n;
|
|
1243
|
-
const o =
|
|
1243
|
+
const o = In(e, t);
|
|
1244
1244
|
return o ? `${n}${r === "text" ? `
|
|
1245
1245
|
|
|
1246
1246
|
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function Is(e) {
|
|
1249
1249
|
return e.endpoints ?? [];
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1251
|
+
const Tn = 36e5, wn = 864e5, R = -1 / 0, Ts = (e) => e.score > R, z = {
|
|
1252
1252
|
urgent: 40,
|
|
1253
1253
|
high: 25,
|
|
1254
1254
|
normal: 10,
|
|
1255
1255
|
low: 0
|
|
1256
1256
|
};
|
|
1257
|
-
function
|
|
1257
|
+
function ws(e) {
|
|
1258
1258
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1259
1259
|
}
|
|
1260
|
-
const
|
|
1261
|
-
function
|
|
1262
|
-
return !!(e &&
|
|
1260
|
+
const Mn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, At = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
1261
|
+
function kn(e, t) {
|
|
1262
|
+
return !!(e && Mn.test(e) || t && At.test(t));
|
|
1263
1263
|
}
|
|
1264
|
-
const
|
|
1265
|
-
function
|
|
1266
|
-
return e >=
|
|
1264
|
+
const vn = 3, On = 600;
|
|
1265
|
+
function Ms(e, t) {
|
|
1266
|
+
return e >= vn || t >= On;
|
|
1267
1267
|
}
|
|
1268
|
-
const
|
|
1268
|
+
const Cn = [
|
|
1269
1269
|
"list-unsubscribe",
|
|
1270
1270
|
"list-unsubscribe-post",
|
|
1271
1271
|
"list-id",
|
|
@@ -1275,93 +1275,93 @@ const An = [
|
|
|
1275
1275
|
"feedback-id",
|
|
1276
1276
|
"x-mailer"
|
|
1277
1277
|
];
|
|
1278
|
-
function
|
|
1278
|
+
function ks(e) {
|
|
1279
1279
|
const t = {};
|
|
1280
1280
|
for (const n of e) {
|
|
1281
1281
|
const r = n.name?.toLowerCase();
|
|
1282
|
-
r && n.value !== void 0 &&
|
|
1282
|
+
r && n.value !== void 0 && Cn.includes(r) && (t[r] = n.value);
|
|
1283
1283
|
}
|
|
1284
1284
|
return t;
|
|
1285
1285
|
}
|
|
1286
|
-
const
|
|
1287
|
-
function
|
|
1286
|
+
const Nn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, xn = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1287
|
+
function vs(e) {
|
|
1288
1288
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1289
|
-
if (r && r !== "no" || t["x-auto-response-suppress"] || n &&
|
|
1289
|
+
if (r && r !== "no" || t["x-auto-response-suppress"] || n && Nn.test(n))
|
|
1290
1290
|
return "automated";
|
|
1291
1291
|
const o = t.precedence?.toLowerCase();
|
|
1292
|
-
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body &&
|
|
1292
|
+
if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && At.test(e.body) || n && xn.test(n))
|
|
1293
1293
|
return "marketing";
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Rn(e, t) {
|
|
1296
1296
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1297
1297
|
}
|
|
1298
|
-
const
|
|
1298
|
+
const Dn = ["open"], $n = 1e3, Ln = {
|
|
1299
1299
|
urgent: 1,
|
|
1300
1300
|
high: 4,
|
|
1301
1301
|
normal: 8,
|
|
1302
1302
|
low: 24
|
|
1303
|
-
},
|
|
1304
|
-
function
|
|
1305
|
-
return e.lastActivityAt ?? (e.createdAt ? new Date(
|
|
1303
|
+
}, Pn = 72;
|
|
1304
|
+
function Un(e) {
|
|
1305
|
+
return e.lastActivityAt ?? (e.createdAt ? new Date(nn(e)).getTime() : 0);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
return
|
|
1307
|
+
function Kn(e, t) {
|
|
1308
|
+
return Fn(t.remindersById?.[e.id], e, t.now);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Fn(e, t, n) {
|
|
1311
1311
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1315
|
-
return Math.max(0, (t -
|
|
1313
|
+
const Et = (e) => qt(e) === "outbound_message", St = (e) => Dn.includes(e);
|
|
1314
|
+
function Ee(e, t) {
|
|
1315
|
+
return Math.max(0, (t - Un(e)) / Tn);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Bn(e, t) {
|
|
1318
1318
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1319
|
-
return typeof n == "number" && n > 0 ? n :
|
|
1319
|
+
return typeof n == "number" && n > 0 ? n : Ln[e.priority ?? "normal"];
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Os(e) {
|
|
1322
1322
|
const t = {};
|
|
1323
1323
|
for (const n of e)
|
|
1324
1324
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1325
1325
|
return t;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return !
|
|
1327
|
+
function Cs(e, t, n) {
|
|
1328
|
+
return !St(e.status) || e.firstResponseAt ? !1 : Ee(e, t) > Bn(e, n);
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Hn(e, t) {
|
|
1331
1331
|
const n = e.lastActivityPreview;
|
|
1332
|
-
return n?.direction !== "outbound" || !
|
|
1332
|
+
return n?.direction !== "outbound" || !Et(n.type) ? !1 : Ee(e, t) < Pn;
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
if (!
|
|
1336
|
-
if (e.snoozedTill && e.snoozedTill > t.now) return { score:
|
|
1337
|
-
if (
|
|
1338
|
-
if (
|
|
1334
|
+
function Ns(e, t) {
|
|
1335
|
+
if (!St(e.status)) return { score: R, reasons: [] };
|
|
1336
|
+
if (e.snoozedTill && e.snoozedTill > t.now) return { score: R, reasons: [] };
|
|
1337
|
+
if (Hn(e, t.now)) return { score: R, reasons: [] };
|
|
1338
|
+
if (Kn(e, t)) return { score: R, reasons: [] };
|
|
1339
1339
|
let n = 0;
|
|
1340
1340
|
const r = [], o = e.priority ?? "normal";
|
|
1341
|
-
|
|
1342
|
-
const i =
|
|
1341
|
+
z[o] > 0 && (n += z[o], r.push(`priority:${o}`)), Rn(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
|
|
1342
|
+
const i = Ee(e, t.now);
|
|
1343
1343
|
if (i > 0) {
|
|
1344
|
-
const
|
|
1345
|
-
n +=
|
|
1344
|
+
const l = Math.min(i * 2, 30);
|
|
1345
|
+
n += l, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1348
|
-
return
|
|
1347
|
+
const s = e.lastActivityPreview;
|
|
1348
|
+
return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && Et(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((l) => l === "marketing" || l === "automated") || kn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= $n, r.push("bulk")), { score: n, reasons: r };
|
|
1349
1349
|
}
|
|
1350
|
-
const
|
|
1350
|
+
const xs = (e) => !!e.assignedUserId || !!e.assignedInboxId, Rs = (e) => e.status === "closed", Ds = (e) => ({
|
|
1351
1351
|
urgent: 10,
|
|
1352
1352
|
high: 5,
|
|
1353
1353
|
normal: 2,
|
|
1354
1354
|
low: 1
|
|
1355
|
-
})[e.priority] || 0,
|
|
1356
|
-
function
|
|
1355
|
+
})[e.priority] || 0, $s = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1356
|
+
function Ls(e, t) {
|
|
1357
1357
|
const n = e.labels ?? [];
|
|
1358
1358
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function Ps(e, t, n) {
|
|
1361
1361
|
const r = e.translations ?? [];
|
|
1362
1362
|
return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
|
|
1363
1363
|
}
|
|
1364
|
-
const
|
|
1364
|
+
const je = [
|
|
1365
1365
|
{ code: "nl", label: "Nederlands", english: "Dutch" },
|
|
1366
1366
|
{ code: "en", label: "English", english: "English" },
|
|
1367
1367
|
{ code: "de", label: "Deutsch", english: "German" },
|
|
@@ -1376,36 +1376,36 @@ const Pe = [
|
|
|
1376
1376
|
{ code: "fi", label: "Suomi", english: "Finnish" },
|
|
1377
1377
|
{ code: "tr", label: "Türkçe", english: "Turkish" }
|
|
1378
1378
|
];
|
|
1379
|
-
function
|
|
1379
|
+
function _t(e) {
|
|
1380
1380
|
const t = (e ?? "").toLowerCase();
|
|
1381
|
-
return
|
|
1381
|
+
return je.find((n) => n.code === t) ?? je.find((n) => n.code === t.split("-")[0]);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1383
|
+
function Us(e) {
|
|
1384
|
+
return _t(e)?.label ?? e;
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const t =
|
|
1386
|
+
function Ks(e) {
|
|
1387
|
+
const t = _t(e);
|
|
1388
1388
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1389
1389
|
}
|
|
1390
|
-
const
|
|
1391
|
-
function
|
|
1390
|
+
const It = 3;
|
|
1391
|
+
function jn(e, t) {
|
|
1392
1392
|
const n = /* @__PURE__ */ new Set();
|
|
1393
1393
|
let r = 1, o = t.get(e)?.parentId;
|
|
1394
1394
|
for (; o; ) {
|
|
1395
|
-
if (n.has(o) || (n.add(o), r++, r >
|
|
1395
|
+
if (n.has(o) || (n.add(o), r++, r > It + 1)) return 1 / 0;
|
|
1396
1396
|
o = t.get(o)?.parentId;
|
|
1397
1397
|
}
|
|
1398
1398
|
return r;
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Fs(e, t, n) {
|
|
1401
1401
|
if (!e) return !0;
|
|
1402
1402
|
if (e === t) return !1;
|
|
1403
|
-
const r = new Map(n.map((
|
|
1404
|
-
if (!r.has(e) || t &&
|
|
1405
|
-
const o =
|
|
1406
|
-
return o + i <=
|
|
1403
|
+
const r = new Map(n.map((s) => [s.id, s]));
|
|
1404
|
+
if (!r.has(e) || t && Gn(e, t, r)) return !1;
|
|
1405
|
+
const o = jn(e, r), i = t ? Tt(t, n) : 1;
|
|
1406
|
+
return o + i <= It;
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function Gn(e, t, n) {
|
|
1409
1409
|
const r = /* @__PURE__ */ new Set();
|
|
1410
1410
|
let o = n.get(e)?.parentId;
|
|
1411
1411
|
for (; o; ) {
|
|
@@ -1415,44 +1415,44 @@ function xn(e, t, n) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
return !1;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Tt(e, t, n = /* @__PURE__ */ new Set()) {
|
|
1419
1419
|
if (n.has(e)) return 1;
|
|
1420
1420
|
n.add(e);
|
|
1421
1421
|
const r = t.filter((o) => o.parentId === e);
|
|
1422
|
-
return r.length ? 1 + Math.max(...r.map((o) =>
|
|
1422
|
+
return r.length ? 1 + Math.max(...r.map((o) => Tt(o.id, t, n))) : 1;
|
|
1423
1423
|
}
|
|
1424
|
-
const
|
|
1425
|
-
function
|
|
1426
|
-
return e.defaultLocale || e.locale ||
|
|
1424
|
+
const Wn = "en";
|
|
1425
|
+
function Vn(e) {
|
|
1426
|
+
return e.defaultLocale || e.locale || Wn;
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1428
|
+
function Bs(e) {
|
|
1429
1429
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1430
|
-
for (const r of [
|
|
1430
|
+
for (const r of [Vn(e), ...e.locales ?? []])
|
|
1431
1431
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1432
1432
|
return n;
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Hs(e, t, n) {
|
|
1435
1435
|
const r = e.translations ?? [];
|
|
1436
1436
|
return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
|
|
1437
1437
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1438
|
+
const Ge = ["lookup", "condition", "parallel", "for-each"];
|
|
1439
|
+
function We(e) {
|
|
1440
1440
|
for (const t of e) {
|
|
1441
|
-
if (!
|
|
1442
|
-
return `staptype "${t.type}" mag niet meelezen (alleen ${
|
|
1441
|
+
if (!Ge.includes(t.type))
|
|
1442
|
+
return `staptype "${t.type}" mag niet meelezen (alleen ${Ge.join(", ")})`;
|
|
1443
1443
|
if (t.type === "parallel")
|
|
1444
1444
|
for (const n of t.branches ?? []) {
|
|
1445
|
-
const r =
|
|
1445
|
+
const r = We(n);
|
|
1446
1446
|
if (r) return r;
|
|
1447
1447
|
}
|
|
1448
1448
|
if (t.type === "for-each") {
|
|
1449
|
-
const n =
|
|
1449
|
+
const n = We(t.body ?? []);
|
|
1450
1450
|
if (n) return n;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
return null;
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function zn(e, t) {
|
|
1456
1456
|
switch (e.kind) {
|
|
1457
1457
|
case "org":
|
|
1458
1458
|
return !0;
|
|
@@ -1462,80 +1462,22 @@ function Ln(e, t) {
|
|
|
1462
1462
|
return e.userId === t.userId;
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return e.filter((n) => n.enabled &&
|
|
1465
|
+
function js(e, t) {
|
|
1466
|
+
return e.filter((n) => n.enabled && zn(n.ownerScope, t));
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function Gs(e) {
|
|
1469
1469
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Ws(e) {
|
|
1472
1472
|
return `mcp__${e}__`;
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1475
|
-
function
|
|
1474
|
+
const Vs = 1e3, zs = 2e3, Ys = 500, Xs = 12e3, qs = 4e3, Yn = ["contact", "company", "work_item"];
|
|
1475
|
+
function Js(e) {
|
|
1476
1476
|
if (!e) return !1;
|
|
1477
1477
|
const t = e.slice(0, e.indexOf(":"));
|
|
1478
|
-
return
|
|
1479
|
-
}
|
|
1480
|
-
const Pa = "onboarding-source", Ua = ["support", "billing", "availability", "sales", "onboarding"], Ka = ["keep", "replace"], Fa = "demand-source", Un = 36e5, Fe = 864e5;
|
|
1481
|
-
function Ha(e, t, n, r = "hour") {
|
|
1482
|
-
if (e <= 0 || n <= t) return [];
|
|
1483
|
-
const o = r === "day" ? Fe : Un, i = [];
|
|
1484
|
-
for (let c = Kn(t); c < n; c += Fe) {
|
|
1485
|
-
const l = new Date(c).getUTCDay();
|
|
1486
|
-
l !== 0 && l !== 6 && i.push(c);
|
|
1487
|
-
}
|
|
1488
|
-
if (!i.length) return [];
|
|
1489
|
-
const a = e / i.length, s = [];
|
|
1490
|
-
for (const c of i) {
|
|
1491
|
-
if (r === "day") {
|
|
1492
|
-
s.push({ period: C(c, "day"), seconds: a });
|
|
1493
|
-
continue;
|
|
1494
|
-
}
|
|
1495
|
-
const l = a / 8;
|
|
1496
|
-
for (let d = 9; d < 17; d++) {
|
|
1497
|
-
const h = c + d * o;
|
|
1498
|
-
if (h >= n) break;
|
|
1499
|
-
s.push({ period: C(h, "hour"), seconds: l });
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
return s;
|
|
1478
|
+
return Yn.includes(t);
|
|
1503
1479
|
}
|
|
1504
|
-
|
|
1505
|
-
const t = new Date(e);
|
|
1506
|
-
return t.setUTCHours(0, 0, 0, 0), t.getTime();
|
|
1507
|
-
}
|
|
1508
|
-
const He = 1e3;
|
|
1509
|
-
function Fn(e, t) {
|
|
1510
|
-
let n = 1;
|
|
1511
|
-
for (let r = 1; r <= e; r++)
|
|
1512
|
-
n = t * n / (r + t * n);
|
|
1513
|
-
return n;
|
|
1514
|
-
}
|
|
1515
|
-
function Hn(e, t) {
|
|
1516
|
-
if (e <= 0) return 1;
|
|
1517
|
-
if (t <= 0) return 0;
|
|
1518
|
-
if (e <= t) return 1;
|
|
1519
|
-
const n = Fn(e, t), r = t / e;
|
|
1520
|
-
return n / (1 - r * (1 - n));
|
|
1521
|
-
}
|
|
1522
|
-
function Bn(e, t, n, r) {
|
|
1523
|
-
return r <= 0 ? 1 : e <= t ? 0 : 1 - Hn(e, t) * Math.exp(-(e - t) * n / r);
|
|
1524
|
-
}
|
|
1525
|
-
function jn(e, t, n) {
|
|
1526
|
-
return n <= 0 ? 0 : e * t / n;
|
|
1527
|
-
}
|
|
1528
|
-
function Gn(e, t, n, r) {
|
|
1529
|
-
if (e <= 0 || t <= 0) return 0;
|
|
1530
|
-
const o = jn(e, t, n);
|
|
1531
|
-
if (o <= 0) return 0;
|
|
1532
|
-
const i = r.serviceLevelPercent / 100, a = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
1533
|
-
for (let s = Math.max(1, Math.ceil(o)); s <= He; s++)
|
|
1534
|
-
if (!(s <= o) && !(Bn(s, o, r.targetSeconds, t) < i) && !(a && o / s > a))
|
|
1535
|
-
return s;
|
|
1536
|
-
return He;
|
|
1537
|
-
}
|
|
1538
|
-
const ge = [
|
|
1480
|
+
const Zs = "onboarding-source", Qs = ["support", "billing", "availability", "sales", "onboarding"], ea = ["keep", "replace"], Se = [
|
|
1539
1481
|
{
|
|
1540
1482
|
key: "shift",
|
|
1541
1483
|
label: "kind_shift",
|
|
@@ -1609,139 +1551,357 @@ const ge = [
|
|
|
1609
1551
|
absent: !0,
|
|
1610
1552
|
icon: "party-popper"
|
|
1611
1553
|
}
|
|
1612
|
-
],
|
|
1554
|
+
], Xn = {
|
|
1613
1555
|
key: "unknown",
|
|
1614
1556
|
label: "kind_unknown",
|
|
1615
1557
|
capacity: !1,
|
|
1616
1558
|
productive: !1,
|
|
1617
1559
|
absent: !1
|
|
1618
1560
|
};
|
|
1619
|
-
function
|
|
1620
|
-
return t.find((n) => n.key === e) ?? { ...
|
|
1561
|
+
function $(e, t = Se) {
|
|
1562
|
+
return t.find((n) => n.key === e) ?? { ...Xn, key: e };
|
|
1621
1563
|
}
|
|
1622
|
-
function
|
|
1564
|
+
function Y(e) {
|
|
1623
1565
|
return e === "published" || e === "approved";
|
|
1624
1566
|
}
|
|
1625
|
-
function
|
|
1567
|
+
function qn(e, t, n = Se) {
|
|
1626
1568
|
if (e.workstreamId !== t) return !1;
|
|
1627
|
-
const r =
|
|
1569
|
+
const r = $(e.kindKey, n);
|
|
1628
1570
|
return r.absent ? !1 : r.productive || r.capacity;
|
|
1629
1571
|
}
|
|
1630
|
-
function
|
|
1631
|
-
if (!e.userId || !
|
|
1632
|
-
const n =
|
|
1572
|
+
function ta(e, t = Se) {
|
|
1573
|
+
if (!e.userId || !Y(e.status)) return !1;
|
|
1574
|
+
const n = $(e.kindKey, t);
|
|
1633
1575
|
return n.capacity || n.productive || n.absent;
|
|
1634
1576
|
}
|
|
1635
|
-
const
|
|
1636
|
-
function
|
|
1637
|
-
return
|
|
1577
|
+
const Jn = 864e5;
|
|
1578
|
+
function Zn(e, t) {
|
|
1579
|
+
return Math.round((t - e) / Jn);
|
|
1580
|
+
}
|
|
1581
|
+
function wt(e, t) {
|
|
1582
|
+
const n = e.cycleMinutes.length;
|
|
1583
|
+
return n === 0 ? 0 : (Zn(e.anchor, t) % n + n) % n;
|
|
1584
|
+
}
|
|
1585
|
+
function Mt(e, t) {
|
|
1586
|
+
return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[wt(e, t)] ?? 0;
|
|
1587
|
+
}
|
|
1588
|
+
function kt(e, t) {
|
|
1589
|
+
return e.startTimes?.[wt(e, t)];
|
|
1590
|
+
}
|
|
1591
|
+
function vt(e, t, n, r) {
|
|
1592
|
+
const o = e.filter(
|
|
1593
|
+
(a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
|
|
1594
|
+
), i = (a) => a.sort((l, d) => (d.effectiveFrom ?? 0) - (l.effectiveFrom ?? 0))[0], s = i(o.filter((a) => a.userId === t));
|
|
1595
|
+
return s || i(
|
|
1596
|
+
o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
|
|
1597
|
+
);
|
|
1598
|
+
}
|
|
1599
|
+
function Qn(e, t, n) {
|
|
1600
|
+
return e.filter(
|
|
1601
|
+
(r) => r.userId === t && (r.effectiveFrom === void 0 || r.effectiveFrom <= n)
|
|
1602
|
+
).sort((r, o) => (o.effectiveFrom ?? 0) - (r.effectiveFrom ?? 0))[0];
|
|
1603
|
+
}
|
|
1604
|
+
const ue = 864e5;
|
|
1605
|
+
function er(e) {
|
|
1606
|
+
const t = Math.max(1, Math.round((e.to - e.from) / ue));
|
|
1607
|
+
return Array.from({ length: t }, (n, r) => e.from + r * ue);
|
|
1608
|
+
}
|
|
1609
|
+
function Ve(e, t, n, r) {
|
|
1610
|
+
const o = Math.min(t, r) - Math.max(e, n);
|
|
1611
|
+
return o > 0 ? o / 1e3 : 0;
|
|
1612
|
+
}
|
|
1613
|
+
const ze = { interval: 0, day: 1, week: 2 };
|
|
1614
|
+
function na(e, t) {
|
|
1615
|
+
const { entries: n, patterns: r = [], terms: o = [] } = t, i = n.filter(
|
|
1616
|
+
(c) => c.userId && Y(c.status) && $(c.kindKey).capacity
|
|
1617
|
+
), s = n.filter(
|
|
1618
|
+
(c) => c.userId && Y(c.status) && $(c.kindKey).absent
|
|
1619
|
+
), a = t.userIds ?? [
|
|
1620
|
+
.../* @__PURE__ */ new Set([
|
|
1621
|
+
...i.map((c) => c.userId),
|
|
1622
|
+
...r.map((c) => c.userId),
|
|
1623
|
+
...o.map((c) => c.userId)
|
|
1624
|
+
])
|
|
1625
|
+
].filter((c) => !!c), l = {};
|
|
1626
|
+
let d = "interval";
|
|
1627
|
+
const p = (c) => {
|
|
1628
|
+
ze[c] > ze[d] && (d = c);
|
|
1629
|
+
};
|
|
1630
|
+
for (const c of a) {
|
|
1631
|
+
const g = t.teamIdsOf?.(c) ?? [];
|
|
1632
|
+
let y = 0, _ = 0, A = 0;
|
|
1633
|
+
for (const u of er(e)) {
|
|
1634
|
+
const E = Math.max(u, e.from), N = Math.min(u + ue, e.to);
|
|
1635
|
+
A++;
|
|
1636
|
+
const O = i.filter((w) => w.userId === c).reduce((w, ke) => w + Ve(ke.start, ke.end, E, N), 0);
|
|
1637
|
+
if (O > 0) {
|
|
1638
|
+
y += O;
|
|
1639
|
+
continue;
|
|
1640
|
+
}
|
|
1641
|
+
const k = vt(r, c, g, u), C = k ? Mt(k, u) : 0;
|
|
1642
|
+
if (k && C > 0) {
|
|
1643
|
+
y += C * 60, p(kt(k, u) ? "interval" : "day");
|
|
1644
|
+
continue;
|
|
1645
|
+
}
|
|
1646
|
+
k || _++;
|
|
1647
|
+
}
|
|
1648
|
+
if (_ > 0) {
|
|
1649
|
+
const u = Qn(o, c, e.from);
|
|
1650
|
+
u && (y += u.weeklyMinutes * 60 * (_ / 7), p("week"));
|
|
1651
|
+
}
|
|
1652
|
+
const I = s.filter((u) => u.userId === c).reduce(
|
|
1653
|
+
(u, E) => u + Ve(E.start, E.end, e.from, e.to),
|
|
1654
|
+
0
|
|
1655
|
+
), f = Math.max(0, y - I);
|
|
1656
|
+
(f > 0 || A > 0) && (l[c] = f);
|
|
1657
|
+
}
|
|
1658
|
+
return {
|
|
1659
|
+
seconds: Object.values(l).reduce((c, g) => c + g, 0),
|
|
1660
|
+
precision: d,
|
|
1661
|
+
byUser: l
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
function ra(e, t) {
|
|
1665
|
+
const n = /* @__PURE__ */ new Map();
|
|
1666
|
+
for (const s of e) {
|
|
1667
|
+
const a = s.userId ?? null;
|
|
1668
|
+
n.set(a, (n.get(a) ?? 0) + s.seconds);
|
|
1669
|
+
}
|
|
1670
|
+
const o = [.../* @__PURE__ */ new Set([
|
|
1671
|
+
...Object.keys(t.byUser),
|
|
1672
|
+
...[...n.keys()].filter((s) => s !== null)
|
|
1673
|
+
])].map((s) => {
|
|
1674
|
+
const a = n.get(s) ?? 0, l = t.byUser[s] ?? 0;
|
|
1675
|
+
return {
|
|
1676
|
+
userId: s,
|
|
1677
|
+
requiredSeconds: a,
|
|
1678
|
+
capacitySeconds: l,
|
|
1679
|
+
netSeconds: l - a
|
|
1680
|
+
};
|
|
1681
|
+
});
|
|
1682
|
+
o.sort((s, a) => s.netSeconds - a.netSeconds);
|
|
1683
|
+
const i = n.get(null) ?? 0;
|
|
1684
|
+
return i > 0 && o.push({ userId: null, requiredSeconds: i, capacitySeconds: 0, netSeconds: -i }), o;
|
|
1685
|
+
}
|
|
1686
|
+
const oa = "demand-source", Ye = 1e3;
|
|
1687
|
+
function tr(e, t) {
|
|
1688
|
+
let n = 1;
|
|
1689
|
+
for (let r = 1; r <= e; r++)
|
|
1690
|
+
n = t * n / (r + t * n);
|
|
1691
|
+
return n;
|
|
1692
|
+
}
|
|
1693
|
+
function nr(e, t) {
|
|
1694
|
+
if (e <= 0) return 1;
|
|
1695
|
+
if (t <= 0) return 0;
|
|
1696
|
+
if (e <= t) return 1;
|
|
1697
|
+
const n = tr(e, t), r = t / e;
|
|
1698
|
+
return n / (1 - r * (1 - n));
|
|
1699
|
+
}
|
|
1700
|
+
function rr(e, t, n, r) {
|
|
1701
|
+
return r <= 0 ? 1 : e <= t ? 0 : 1 - nr(e, t) * Math.exp(-(e - t) * n / r);
|
|
1638
1702
|
}
|
|
1639
|
-
function
|
|
1703
|
+
function or(e, t, n) {
|
|
1704
|
+
return n <= 0 ? 0 : e * t / n;
|
|
1705
|
+
}
|
|
1706
|
+
function ir(e, t, n, r) {
|
|
1707
|
+
if (e <= 0 || t <= 0) return 0;
|
|
1708
|
+
const o = or(e, t, n);
|
|
1709
|
+
if (o <= 0) return 0;
|
|
1710
|
+
const i = r.serviceLevelPercent / 100, s = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
1711
|
+
for (let a = Math.max(1, Math.ceil(o)); a <= Ye; a++)
|
|
1712
|
+
if (!(a <= o) && !(rr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
|
|
1713
|
+
return a;
|
|
1714
|
+
return Ye;
|
|
1715
|
+
}
|
|
1716
|
+
const sr = 36e5, ar = 864e5;
|
|
1717
|
+
function cr(e) {
|
|
1718
|
+
return e === "day" ? ar : sr;
|
|
1719
|
+
}
|
|
1720
|
+
function ia(e, t) {
|
|
1640
1721
|
return e.start < t.end && t.start < e.end;
|
|
1641
1722
|
}
|
|
1642
|
-
function
|
|
1723
|
+
function re(e, t, n) {
|
|
1643
1724
|
const r = Math.min(e.end, n) - Math.max(e.start, t);
|
|
1644
1725
|
return r > 0 ? r / 1e3 : 0;
|
|
1645
1726
|
}
|
|
1646
|
-
function
|
|
1727
|
+
function lr(e, t, n) {
|
|
1647
1728
|
const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
|
|
1648
1729
|
if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
|
|
1649
|
-
const i = (t.unplannedLossPercent ?? 0) / 100,
|
|
1730
|
+
const i = (t.unplannedLossPercent ?? 0) / 100, s = i > 0 && i < 1 ? 1 / (1 - i) : 1;
|
|
1650
1731
|
if (t.model === "queue" && e.volume !== void 0 && r > 0) {
|
|
1651
|
-
const
|
|
1652
|
-
return { seconds: o, headcount:
|
|
1732
|
+
const a = ir(e.volume, r, n, t);
|
|
1733
|
+
return { seconds: o, headcount: a * s };
|
|
1653
1734
|
}
|
|
1654
|
-
return { seconds: o, headcount: o / n *
|
|
1655
|
-
}
|
|
1656
|
-
function
|
|
1657
|
-
const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e,
|
|
1658
|
-
for (let
|
|
1659
|
-
const
|
|
1660
|
-
let
|
|
1661
|
-
for (const
|
|
1662
|
-
let
|
|
1663
|
-
for (const
|
|
1735
|
+
return { seconds: o, headcount: o / n * s };
|
|
1736
|
+
}
|
|
1737
|
+
function sa(e) {
|
|
1738
|
+
const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = cr(s), l = a / 1e3, d = e.kinds, p = t.filter((A) => Y(A.status)), c = p.filter((A) => qn(A, n, d)), g = p.filter((A) => $(A.kindKey, d).capacity), y = p.filter((A) => $(A.kindKey, d).absent), _ = [];
|
|
1739
|
+
for (let A = F(i.from, s); A < i.to; A += a) {
|
|
1740
|
+
const I = A + a, f = K(A, s);
|
|
1741
|
+
let u = 0;
|
|
1742
|
+
for (const w of c) u += re(w, A, I);
|
|
1743
|
+
let E = 0;
|
|
1744
|
+
for (const w of g) E += re(w, A, I);
|
|
1664
1745
|
let N = 0;
|
|
1665
|
-
for (const
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1668
|
-
period:
|
|
1669
|
-
forecastVolume:
|
|
1670
|
-
requiredSeconds:
|
|
1671
|
-
requiredHeadcount:
|
|
1672
|
-
scheduledSeconds:
|
|
1673
|
-
scheduledHeadcount:
|
|
1674
|
-
netHeadcount:
|
|
1675
|
-
capacitySeconds:
|
|
1746
|
+
for (const w of y) N += re(w, A, I);
|
|
1747
|
+
const O = o?.[f] ?? {}, k = lr(O, r, l), C = u / l;
|
|
1748
|
+
_.push({
|
|
1749
|
+
period: f,
|
|
1750
|
+
forecastVolume: O.volume,
|
|
1751
|
+
requiredSeconds: k.seconds,
|
|
1752
|
+
requiredHeadcount: k.headcount,
|
|
1753
|
+
scheduledSeconds: u,
|
|
1754
|
+
scheduledHeadcount: C,
|
|
1755
|
+
netHeadcount: C - k.headcount,
|
|
1756
|
+
capacitySeconds: E,
|
|
1676
1757
|
absentSeconds: N
|
|
1677
1758
|
});
|
|
1678
1759
|
}
|
|
1679
|
-
return
|
|
1760
|
+
return _;
|
|
1680
1761
|
}
|
|
1681
|
-
function
|
|
1762
|
+
function ur(e, t) {
|
|
1682
1763
|
return e.workTypeKey ?? t?.defaultWorkTypeKey;
|
|
1683
1764
|
}
|
|
1684
|
-
function
|
|
1685
|
-
const r =
|
|
1765
|
+
function aa(e, t, n) {
|
|
1766
|
+
const r = ur(e, t);
|
|
1686
1767
|
return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
|
|
1687
1768
|
}
|
|
1688
|
-
function
|
|
1769
|
+
function ca(e) {
|
|
1689
1770
|
return e.filter(
|
|
1690
1771
|
(t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
|
|
1691
1772
|
);
|
|
1692
1773
|
}
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1774
|
+
const dr = 36e5, de = 6048e5, fr = 8, pr = 0.5, mr = 2;
|
|
1775
|
+
function hr(e) {
|
|
1695
1776
|
const t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10)), o = e.length > 10 ? Number(e.slice(11, 13)) : 0;
|
|
1696
1777
|
return Date.UTC(t, n - 1, r, o);
|
|
1697
1778
|
}
|
|
1698
|
-
function
|
|
1779
|
+
function gr(e, t, n) {
|
|
1699
1780
|
const r = [];
|
|
1700
1781
|
for (let i = 0; i < n; i++) {
|
|
1701
|
-
const
|
|
1702
|
-
let
|
|
1703
|
-
for (const [
|
|
1704
|
-
|
|
1705
|
-
|
|
1782
|
+
const s = t - i * de, a = s - de;
|
|
1783
|
+
let l = 0, d = !1;
|
|
1784
|
+
for (const [p, c] of e)
|
|
1785
|
+
p >= a && p < s && (l += c, d = !0);
|
|
1786
|
+
d && r.push(l);
|
|
1706
1787
|
}
|
|
1707
1788
|
if (r.length < 2) return 1;
|
|
1708
|
-
const o = r.reduce((i,
|
|
1709
|
-
return o <= 0 ? 1 : Math.min(
|
|
1789
|
+
const o = r.reduce((i, s) => i + s, 0) / r.length;
|
|
1790
|
+
return o <= 0 ? 1 : Math.min(mr, Math.max(pr, r[0] / o));
|
|
1710
1791
|
}
|
|
1711
|
-
function
|
|
1792
|
+
function yr(e, t) {
|
|
1712
1793
|
if (!e?.length) return;
|
|
1713
1794
|
let n;
|
|
1714
1795
|
for (const r of e)
|
|
1715
1796
|
t >= r.from && t < r.to && (n = r);
|
|
1716
1797
|
return n;
|
|
1717
1798
|
}
|
|
1718
|
-
function
|
|
1719
|
-
const r = Math.max(1, n?.weeks ??
|
|
1720
|
-
for (const
|
|
1721
|
-
o.set(
|
|
1722
|
-
const
|
|
1723
|
-
for (let
|
|
1724
|
-
let
|
|
1725
|
-
for (let
|
|
1726
|
-
const
|
|
1727
|
-
if (
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1799
|
+
function la(e, t, n) {
|
|
1800
|
+
const r = Math.max(1, n?.weeks ?? fr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
1801
|
+
for (const l of e)
|
|
1802
|
+
o.set(hr(l.period), l.value), i.add(l.period.slice(0, 10));
|
|
1803
|
+
const s = gr(o, F(t.from, "hour"), r), a = [];
|
|
1804
|
+
for (let l = F(t.from, "hour"); l < t.to; l += dr) {
|
|
1805
|
+
let d = 0, p = 0;
|
|
1806
|
+
for (let y = 1; y <= r; y++) {
|
|
1807
|
+
const _ = l - y * de, I = o.get(_) ?? (i.has(K(_, "day")) ? 0 : void 0);
|
|
1808
|
+
if (I === void 0) continue;
|
|
1809
|
+
const f = r - y + 1;
|
|
1810
|
+
d += I * f, p += f;
|
|
1730
1811
|
}
|
|
1731
|
-
let
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1812
|
+
let c = p > 0 ? d / p * s : 0;
|
|
1813
|
+
const g = yr(n?.adjustments, l);
|
|
1814
|
+
g?.absoluteVolume !== void 0 ? c = g.absoluteVolume : g?.factor !== void 0 && (c *= g.factor), a.push({ period: K(l, "hour"), volume: c });
|
|
1734
1815
|
}
|
|
1735
|
-
return
|
|
1816
|
+
return a;
|
|
1736
1817
|
}
|
|
1737
|
-
const
|
|
1738
|
-
function
|
|
1739
|
-
return `${
|
|
1818
|
+
const br = "schedule_entry", Ar = "workstream";
|
|
1819
|
+
function ua(e) {
|
|
1820
|
+
return `${br}:${e}`;
|
|
1740
1821
|
}
|
|
1741
|
-
function
|
|
1742
|
-
return `${
|
|
1822
|
+
function da(e) {
|
|
1823
|
+
return `${Ar}:${e}`;
|
|
1743
1824
|
}
|
|
1744
|
-
|
|
1825
|
+
const fe = 36e5, L = 864e5;
|
|
1826
|
+
function Er(e, t) {
|
|
1827
|
+
const n = t === "day" ? L : fe, r = [];
|
|
1828
|
+
for (let o = F(e.from, t); o < e.to; o += n) r.push(o);
|
|
1829
|
+
return r;
|
|
1830
|
+
}
|
|
1831
|
+
function Xe(e) {
|
|
1832
|
+
const t = Math.max(1, Math.round((e.to - e.from) / L));
|
|
1833
|
+
return Array.from({ length: t }, (n, r) => e.from + r * L);
|
|
1834
|
+
}
|
|
1835
|
+
function oe(e, t, n, r) {
|
|
1836
|
+
const o = Math.min(t, r) - Math.max(e, n);
|
|
1837
|
+
return o > 0 ? o / 1e3 : 0;
|
|
1838
|
+
}
|
|
1839
|
+
function fa(e, t, n = {}) {
|
|
1840
|
+
const r = n.grain ?? "hour", o = Er(t, r), i = r === "day" ? L : fe, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && $(c.kindKey).capacity), l = n.userIds?.length ? new Set(n.userIds) : null, d = /* @__PURE__ */ new Set();
|
|
1841
|
+
for (const c of a)
|
|
1842
|
+
if (!(l && c.userId && !l.has(c.userId))) {
|
|
1843
|
+
for (const g of o) {
|
|
1844
|
+
const y = oe(c.start, c.end, g, g + i);
|
|
1845
|
+
y > 0 && s.set(g, (s.get(g) ?? 0) + y);
|
|
1846
|
+
}
|
|
1847
|
+
for (const g of Xe(t))
|
|
1848
|
+
oe(c.start, c.end, g, g + L) > 0 && d.add(`${c.userId}:${g}`);
|
|
1849
|
+
}
|
|
1850
|
+
const p = n.userIds ?? [
|
|
1851
|
+
.../* @__PURE__ */ new Set([
|
|
1852
|
+
...a.map((c) => c.userId),
|
|
1853
|
+
...(n.patterns ?? []).map((c) => c.userId)
|
|
1854
|
+
])
|
|
1855
|
+
].filter((c) => !!c);
|
|
1856
|
+
if (n.patterns?.length)
|
|
1857
|
+
for (const c of p) {
|
|
1858
|
+
const g = n.teamIdsOf?.(c) ?? [];
|
|
1859
|
+
for (const y of Xe(t)) {
|
|
1860
|
+
if (d.has(`${c}:${y}`)) continue;
|
|
1861
|
+
const _ = vt(n.patterns, c, g, y);
|
|
1862
|
+
if (!_) continue;
|
|
1863
|
+
const A = Mt(_, y);
|
|
1864
|
+
if (A <= 0) continue;
|
|
1865
|
+
const I = kt(_, y);
|
|
1866
|
+
if (I) {
|
|
1867
|
+
const [E, N] = I.split(":").map(Number), O = y + E * fe + (N ?? 0) * 6e4, k = O + A * 6e4;
|
|
1868
|
+
for (const C of o) {
|
|
1869
|
+
const w = oe(O, k, C, C + i);
|
|
1870
|
+
w > 0 && s.set(C, (s.get(C) ?? 0) + w);
|
|
1871
|
+
}
|
|
1872
|
+
continue;
|
|
1873
|
+
}
|
|
1874
|
+
const f = o.filter((E) => E >= y && E < y + L);
|
|
1875
|
+
if (!f.length) continue;
|
|
1876
|
+
const u = A * 60 / f.length;
|
|
1877
|
+
for (const E of f) s.set(E, (s.get(E) ?? 0) + u);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
return o.map((c) => ({ period: K(c, r), weight: s.get(c) ?? 0 }));
|
|
1881
|
+
}
|
|
1882
|
+
function Sr(e, t) {
|
|
1883
|
+
if (e <= 0 || !t.length) return [];
|
|
1884
|
+
const n = t.reduce((r, o) => r + Math.max(0, o.weight), 0);
|
|
1885
|
+
if (n <= 0) {
|
|
1886
|
+
const r = e / t.length;
|
|
1887
|
+
return t.map((o) => ({ period: o.period, seconds: r }));
|
|
1888
|
+
}
|
|
1889
|
+
return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
|
|
1890
|
+
}
|
|
1891
|
+
function pa(e, t, n) {
|
|
1892
|
+
const r = /* @__PURE__ */ new Map();
|
|
1893
|
+
for (const o of e) {
|
|
1894
|
+
const i = o.by ? t.filter((a) => n(a.period) < o.by) : t, s = i.length ? i : t;
|
|
1895
|
+
for (const a of Sr(o.seconds, s)) {
|
|
1896
|
+
const l = `${a.period}|${o.userId ?? ""}`, d = r.get(l);
|
|
1897
|
+
d ? d.seconds += a.seconds : r.set(l, { ...a, userId: o.userId });
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
return [...r.values()].sort(
|
|
1901
|
+
(o, i) => o.period.localeCompare(i.period) || (o.userId ?? "").localeCompare(i.userId ?? "")
|
|
1902
|
+
);
|
|
1903
|
+
}
|
|
1904
|
+
function _r(e) {
|
|
1745
1905
|
switch (e.kind) {
|
|
1746
1906
|
case "user":
|
|
1747
1907
|
return `user:${e.userId}`;
|
|
@@ -1751,7 +1911,7 @@ function sr(e) {
|
|
|
1751
1911
|
return "org";
|
|
1752
1912
|
}
|
|
1753
1913
|
}
|
|
1754
|
-
function
|
|
1914
|
+
function ma(e) {
|
|
1755
1915
|
if (typeof e != "string") return;
|
|
1756
1916
|
const t = e.trim();
|
|
1757
1917
|
if (t === "org") return { kind: "org" };
|
|
@@ -1763,10 +1923,10 @@ function qa(e) {
|
|
|
1763
1923
|
if (r === "team") return { kind: "team", teamId: o };
|
|
1764
1924
|
}
|
|
1765
1925
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return
|
|
1926
|
+
function Ir(e) {
|
|
1927
|
+
return _r(e);
|
|
1768
1928
|
}
|
|
1769
|
-
function
|
|
1929
|
+
function Tr(e) {
|
|
1770
1930
|
switch (e.kind) {
|
|
1771
1931
|
case "personal":
|
|
1772
1932
|
return { kind: "user", userId: e.userId };
|
|
@@ -1776,14 +1936,14 @@ function lr(e) {
|
|
|
1776
1936
|
return { kind: "org" };
|
|
1777
1937
|
}
|
|
1778
1938
|
}
|
|
1779
|
-
const
|
|
1780
|
-
function
|
|
1781
|
-
return e.agentId ? { kind: "user", userId: e.agentId } :
|
|
1939
|
+
const wr = Tr;
|
|
1940
|
+
function ha(e) {
|
|
1941
|
+
return e.agentId ? { kind: "user", userId: e.agentId } : wr(e.ownerScope);
|
|
1782
1942
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return
|
|
1943
|
+
function ga(e) {
|
|
1944
|
+
return Ir(e);
|
|
1785
1945
|
}
|
|
1786
|
-
function
|
|
1946
|
+
function ya(e, t) {
|
|
1787
1947
|
if (!t) return;
|
|
1788
1948
|
let n = e;
|
|
1789
1949
|
for (const r of t.split(".")) {
|
|
@@ -1792,24 +1952,24 @@ function Qa(e, t) {
|
|
|
1792
1952
|
}
|
|
1793
1953
|
return n;
|
|
1794
1954
|
}
|
|
1795
|
-
function
|
|
1955
|
+
function ba(e, t) {
|
|
1796
1956
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
1797
1957
|
}
|
|
1798
|
-
function
|
|
1958
|
+
function Aa(e, t) {
|
|
1799
1959
|
if (t)
|
|
1800
1960
|
return e.targets.find((n) => n.id === t);
|
|
1801
1961
|
}
|
|
1802
|
-
function
|
|
1962
|
+
function Mr(e) {
|
|
1803
1963
|
return e?.kind === "assignment";
|
|
1804
1964
|
}
|
|
1805
|
-
function
|
|
1806
|
-
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId:
|
|
1807
|
-
return
|
|
1965
|
+
function Ea(e) {
|
|
1966
|
+
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
|
|
1967
|
+
return Mr(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} 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";
|
|
1808
1968
|
}
|
|
1809
|
-
function
|
|
1969
|
+
function Sa(e) {
|
|
1810
1970
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
1811
1971
|
}
|
|
1812
|
-
const
|
|
1972
|
+
const _a = [
|
|
1813
1973
|
{ name: "text", type: "string" },
|
|
1814
1974
|
{ name: "subject", type: "string" },
|
|
1815
1975
|
{ name: "from", type: "string" },
|
|
@@ -1849,7 +2009,7 @@ const os = [
|
|
|
1849
2009
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
1850
2010
|
// the trigger filter runs — like contactId/companyId above.
|
|
1851
2011
|
{ name: "assigneeUserId", type: "string" }
|
|
1852
|
-
],
|
|
2012
|
+
], Ia = {
|
|
1853
2013
|
topics: [
|
|
1854
2014
|
{ name: "topicId", type: "string" },
|
|
1855
2015
|
{ name: "topic", type: "string" },
|
|
@@ -1863,58 +2023,58 @@ const os = [
|
|
|
1863
2023
|
// Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
|
|
1864
2024
|
extract: []
|
|
1865
2025
|
};
|
|
1866
|
-
function
|
|
2026
|
+
function kr(e) {
|
|
1867
2027
|
return `${e.type}:${e.id}`;
|
|
1868
2028
|
}
|
|
1869
|
-
const
|
|
1870
|
-
function
|
|
1871
|
-
return e?.type ===
|
|
2029
|
+
const vr = "interaction";
|
|
2030
|
+
function Or(e) {
|
|
2031
|
+
return e?.type === vr ? e.id : void 0;
|
|
1872
2032
|
}
|
|
1873
|
-
const
|
|
1874
|
-
function
|
|
2033
|
+
const Cr = 64, Nr = 8e3;
|
|
2034
|
+
function Ta(e) {
|
|
1875
2035
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
1876
2036
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
1877
|
-
return Math.min(Math.max(Math.round(t),
|
|
2037
|
+
return Math.min(Math.max(Math.round(t), Cr), Nr);
|
|
1878
2038
|
}
|
|
1879
|
-
const
|
|
1880
|
-
function
|
|
2039
|
+
const wa = { kind: "workflow", steps: [] };
|
|
2040
|
+
function Ma(e) {
|
|
1881
2041
|
return e?.kind === "workflow" ? e.steps : [];
|
|
1882
2042
|
}
|
|
1883
|
-
function
|
|
2043
|
+
function ka(e) {
|
|
1884
2044
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
1885
2045
|
}
|
|
1886
|
-
function
|
|
2046
|
+
function xr(e) {
|
|
1887
2047
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
1888
2048
|
return { total: n, rate: n ? t / n : 0 };
|
|
1889
2049
|
}
|
|
1890
|
-
const
|
|
1891
|
-
function
|
|
1892
|
-
const { total: t, rate: n } =
|
|
1893
|
-
return t >=
|
|
2050
|
+
const Rr = 10, Dr = 0.9;
|
|
2051
|
+
function va(e) {
|
|
2052
|
+
const { total: t, rate: n } = xr(e);
|
|
2053
|
+
return t >= Rr && n >= Dr;
|
|
1894
2054
|
}
|
|
1895
|
-
const
|
|
1896
|
-
function
|
|
1897
|
-
return
|
|
2055
|
+
const $r = ["done", "escalated", "failed", "stopped"];
|
|
2056
|
+
function Oa(e) {
|
|
2057
|
+
return $r.includes(e);
|
|
1898
2058
|
}
|
|
1899
|
-
function
|
|
2059
|
+
function Lr(e) {
|
|
1900
2060
|
return e === "waiting";
|
|
1901
2061
|
}
|
|
1902
|
-
function
|
|
1903
|
-
return e === "running" ||
|
|
2062
|
+
function Ca(e) {
|
|
2063
|
+
return e === "running" || Lr(e);
|
|
1904
2064
|
}
|
|
1905
|
-
function
|
|
2065
|
+
function Ot(e) {
|
|
1906
2066
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1907
2067
|
}
|
|
1908
|
-
function
|
|
1909
|
-
const t =
|
|
1910
|
-
return t ?
|
|
2068
|
+
function Na(e) {
|
|
2069
|
+
const t = Ot(e);
|
|
2070
|
+
return t ? kr(t) : void 0;
|
|
1911
2071
|
}
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
2072
|
+
function xa(e) {
|
|
2073
|
+
return Or(Ot(e));
|
|
1914
2074
|
}
|
|
1915
|
-
function
|
|
2075
|
+
function Ra(e) {
|
|
1916
2076
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
1917
|
-
for (const r of [...e].sort(
|
|
2077
|
+
for (const r of [...e].sort(Pr)) {
|
|
1918
2078
|
const o = n.get(r.emoji);
|
|
1919
2079
|
if (o) {
|
|
1920
2080
|
o.push(r.actor);
|
|
@@ -1927,243 +2087,243 @@ function gs(e) {
|
|
|
1927
2087
|
return { emoji: r, count: o.length, actors: o };
|
|
1928
2088
|
}).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
|
|
1929
2089
|
}
|
|
1930
|
-
const
|
|
1931
|
-
function
|
|
2090
|
+
const Pr = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
2091
|
+
function Da(e, t) {
|
|
1932
2092
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
1933
2093
|
}
|
|
1934
|
-
const
|
|
1935
|
-
function
|
|
2094
|
+
const pe = 6e4, Ur = 36e5, B = 864e5, Ct = 800;
|
|
2095
|
+
function qe(e, t) {
|
|
1936
2096
|
const n = Date.UTC(e, t + 1, 0);
|
|
1937
|
-
return n - new Date(n).getUTCDay() *
|
|
2097
|
+
return n - new Date(n).getUTCDay() * B + Ur;
|
|
1938
2098
|
}
|
|
1939
|
-
function
|
|
2099
|
+
function Kr(e) {
|
|
1940
2100
|
const t = new Date(e).getUTCFullYear();
|
|
1941
|
-
return e >=
|
|
2101
|
+
return e >= qe(t, 2) && e < qe(t, 9);
|
|
1942
2102
|
}
|
|
1943
|
-
function
|
|
1944
|
-
const n = t.dst === "eu" &&
|
|
1945
|
-
return (t.utcOffsetMinutes + n) *
|
|
2103
|
+
function Nt(e, t) {
|
|
2104
|
+
const n = t.dst === "eu" && Kr(e) ? 60 : 0;
|
|
2105
|
+
return (t.utcOffsetMinutes + n) * pe;
|
|
1946
2106
|
}
|
|
1947
|
-
function
|
|
2107
|
+
function Fr(e) {
|
|
1948
2108
|
return (e + 3) % 7 + 1;
|
|
1949
2109
|
}
|
|
1950
|
-
function
|
|
1951
|
-
const n =
|
|
1952
|
-
if (!t.days.includes(
|
|
1953
|
-
const i = o *
|
|
2110
|
+
function xt(e, t) {
|
|
2111
|
+
const n = Nt(e, t), r = e + n, o = Math.floor(r / B);
|
|
2112
|
+
if (!t.days.includes(Fr(o))) return null;
|
|
2113
|
+
const i = o * B;
|
|
1954
2114
|
return {
|
|
1955
|
-
open: i + t.fromMinutes *
|
|
1956
|
-
close: i + t.toMinutes *
|
|
2115
|
+
open: i + t.fromMinutes * pe - n,
|
|
2116
|
+
close: i + t.toMinutes * pe - n
|
|
1957
2117
|
};
|
|
1958
2118
|
}
|
|
1959
|
-
function
|
|
1960
|
-
const n =
|
|
1961
|
-
return (Math.floor(r /
|
|
2119
|
+
function Rt(e, t) {
|
|
2120
|
+
const n = Nt(e, t), r = e + n;
|
|
2121
|
+
return (Math.floor(r / B) + 1) * B - n;
|
|
1962
2122
|
}
|
|
1963
|
-
function
|
|
2123
|
+
function me(e, t, n) {
|
|
1964
2124
|
if (t <= e) return 0;
|
|
1965
2125
|
if (!n) return t - e;
|
|
1966
2126
|
let r = 0, o = e;
|
|
1967
|
-
for (let i = 0; i <
|
|
1968
|
-
const
|
|
1969
|
-
if (
|
|
1970
|
-
const
|
|
1971
|
-
|
|
2127
|
+
for (let i = 0; i < Ct && o < t; i++) {
|
|
2128
|
+
const s = xt(o, n);
|
|
2129
|
+
if (s) {
|
|
2130
|
+
const a = Math.max(o, s.open), l = Math.min(t, s.close);
|
|
2131
|
+
l > a && (r += l - a);
|
|
1972
2132
|
}
|
|
1973
|
-
o =
|
|
2133
|
+
o = Rt(o, n);
|
|
1974
2134
|
}
|
|
1975
2135
|
return r;
|
|
1976
2136
|
}
|
|
1977
|
-
function
|
|
2137
|
+
function _e(e, t, n) {
|
|
1978
2138
|
if (!n) return e + t;
|
|
1979
2139
|
let r = t, o = e;
|
|
1980
|
-
for (let i = 0; i <
|
|
1981
|
-
const
|
|
1982
|
-
if (
|
|
1983
|
-
const
|
|
1984
|
-
if (
|
|
1985
|
-
const
|
|
1986
|
-
if (r <=
|
|
1987
|
-
r -=
|
|
2140
|
+
for (let i = 0; i < Ct; i++) {
|
|
2141
|
+
const s = xt(o, n);
|
|
2142
|
+
if (s) {
|
|
2143
|
+
const a = Math.max(o, s.open);
|
|
2144
|
+
if (s.close > a) {
|
|
2145
|
+
const l = s.close - a;
|
|
2146
|
+
if (r <= l) return a + r;
|
|
2147
|
+
r -= l;
|
|
1988
2148
|
}
|
|
1989
2149
|
}
|
|
1990
|
-
o =
|
|
2150
|
+
o = Rt(o, n);
|
|
1991
2151
|
}
|
|
1992
2152
|
return e + t;
|
|
1993
2153
|
}
|
|
1994
|
-
function
|
|
2154
|
+
function $a(e) {
|
|
1995
2155
|
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
1996
2156
|
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
1997
2157
|
}
|
|
1998
|
-
const
|
|
1999
|
-
function
|
|
2000
|
-
return e === "snoozed" ?
|
|
2158
|
+
const he = 1, ge = 2;
|
|
2159
|
+
function La(e) {
|
|
2160
|
+
return e === "snoozed" ? he : ge;
|
|
2001
2161
|
}
|
|
2002
|
-
function
|
|
2162
|
+
function Ie(e) {
|
|
2003
2163
|
const t = e.calendar;
|
|
2004
2164
|
return t && Array.isArray(t.days) ? t : null;
|
|
2005
2165
|
}
|
|
2006
|
-
const
|
|
2166
|
+
const Pa = [
|
|
2007
2167
|
"speed_of_answer",
|
|
2008
2168
|
"first_response",
|
|
2009
2169
|
"next_response",
|
|
2010
2170
|
"resolution",
|
|
2011
2171
|
"close"
|
|
2012
|
-
],
|
|
2013
|
-
function
|
|
2172
|
+
], Ua = ["snoozed", "waiting_for_customer"], Br = 6e4, Dt = ["speed_of_answer", "first_response", "next_response"], Hr = [...Dt, "resolution", "close"];
|
|
2173
|
+
function H(e) {
|
|
2014
2174
|
return e.state === "running" || e.state === "paused";
|
|
2015
2175
|
}
|
|
2016
|
-
function
|
|
2017
|
-
return
|
|
2176
|
+
function jr(e, t) {
|
|
2177
|
+
return H(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
2018
2178
|
}
|
|
2019
|
-
function
|
|
2020
|
-
return
|
|
2179
|
+
function Je(e) {
|
|
2180
|
+
return H(e) ? { state: "void" } : null;
|
|
2021
2181
|
}
|
|
2022
|
-
function
|
|
2023
|
-
if (!
|
|
2182
|
+
function Gr(e, t, n, r) {
|
|
2183
|
+
if (!H(e) || (e.pauseBits & t) !== 0) return null;
|
|
2024
2184
|
const o = e.pauseBits | t;
|
|
2025
|
-
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs:
|
|
2185
|
+
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: me(n, e.dueAt, r) };
|
|
2026
2186
|
}
|
|
2027
|
-
function
|
|
2028
|
-
if (!
|
|
2187
|
+
function Wr(e, t, n, r) {
|
|
2188
|
+
if (!H(e) || (e.pauseBits & t) === 0) return null;
|
|
2029
2189
|
const o = e.pauseBits & ~t;
|
|
2030
|
-
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt:
|
|
2031
|
-
}
|
|
2032
|
-
function
|
|
2033
|
-
const i =
|
|
2034
|
-
|
|
2035
|
-
},
|
|
2036
|
-
for (const
|
|
2037
|
-
|
|
2038
|
-
},
|
|
2039
|
-
for (const
|
|
2040
|
-
|
|
2041
|
-
},
|
|
2042
|
-
for (const
|
|
2043
|
-
},
|
|
2044
|
-
for (const
|
|
2045
|
-
},
|
|
2046
|
-
const
|
|
2047
|
-
if (!
|
|
2048
|
-
const N =
|
|
2049
|
-
|
|
2190
|
+
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: _e(n, e.remainingMs, r) };
|
|
2191
|
+
}
|
|
2192
|
+
function Ka({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
2193
|
+
const i = Ie(o), s = Math.min(t, n), a = r.map((f) => ({ ...f })), l = [], d = (f, u) => {
|
|
2194
|
+
u && (l.push({ op: "patch", clockId: f.id, patch: u }), Object.assign(f, u));
|
|
2195
|
+
}, p = (f) => {
|
|
2196
|
+
for (const u of a)
|
|
2197
|
+
u.metric === f && d(u, jr(u, s));
|
|
2198
|
+
}, c = (f) => {
|
|
2199
|
+
for (const u of a)
|
|
2200
|
+
f.includes(u.metric) && d(u, Je(u));
|
|
2201
|
+
}, g = (f) => {
|
|
2202
|
+
for (const u of a) d(u, Gr(u, f, s, i));
|
|
2203
|
+
}, y = (f) => {
|
|
2204
|
+
for (const u of a) d(u, Wr(u, f, s, i));
|
|
2205
|
+
}, _ = (f) => a.reduce((u, E) => E.metric === f ? Math.max(u, E.attempt) : u, 0) + 1, A = (f) => a.some((u) => u.metric === f && H(u)), I = (f, u) => {
|
|
2206
|
+
const E = o.targets.find((O) => O.metric === f);
|
|
2207
|
+
if (!E) return;
|
|
2208
|
+
const N = E.minutes * Br;
|
|
2209
|
+
l.push({
|
|
2050
2210
|
op: "start",
|
|
2051
|
-
metric:
|
|
2052
|
-
attempt:
|
|
2053
|
-
startedAt:
|
|
2211
|
+
metric: f,
|
|
2212
|
+
attempt: _(f),
|
|
2213
|
+
startedAt: u,
|
|
2054
2214
|
targetMs: N,
|
|
2055
|
-
dueAt:
|
|
2215
|
+
dueAt: _e(u, N, i)
|
|
2056
2216
|
});
|
|
2057
2217
|
};
|
|
2058
2218
|
switch (e) {
|
|
2059
2219
|
case "apply": {
|
|
2060
|
-
for (const
|
|
2061
|
-
|
|
2062
|
-
for (const
|
|
2063
|
-
if (
|
|
2064
|
-
|
|
2065
|
-
(
|
|
2066
|
-
) ||
|
|
2220
|
+
for (const f of a)
|
|
2221
|
+
f.profileId !== o.id && d(f, Je(f));
|
|
2222
|
+
for (const f of o.targets) {
|
|
2223
|
+
if (f.metric === "next_response") continue;
|
|
2224
|
+
a.some(
|
|
2225
|
+
(E) => E.metric === f.metric && E.profileId === o.id
|
|
2226
|
+
) || I(f.metric, s);
|
|
2067
2227
|
}
|
|
2068
2228
|
break;
|
|
2069
2229
|
}
|
|
2070
2230
|
case "answered":
|
|
2071
|
-
|
|
2231
|
+
p("speed_of_answer");
|
|
2072
2232
|
break;
|
|
2073
2233
|
case "outbound": {
|
|
2074
|
-
|
|
2234
|
+
p("first_response"), p("next_response"), o.pauseOn.includes("waiting_for_customer") && g(ge);
|
|
2075
2235
|
break;
|
|
2076
2236
|
}
|
|
2077
2237
|
case "inbound": {
|
|
2078
|
-
|
|
2238
|
+
y(ge), !A("first_response") && !A("next_response") && I("next_response", s);
|
|
2079
2239
|
break;
|
|
2080
2240
|
}
|
|
2081
2241
|
case "resolved":
|
|
2082
|
-
|
|
2242
|
+
p("resolution");
|
|
2083
2243
|
break;
|
|
2084
2244
|
case "closed":
|
|
2085
|
-
|
|
2245
|
+
p("close"), p("resolution"), c(Dt);
|
|
2086
2246
|
break;
|
|
2087
2247
|
case "reopened":
|
|
2088
|
-
|
|
2248
|
+
A("resolution") || I("resolution", s), A("close") || I("close", s);
|
|
2089
2249
|
break;
|
|
2090
2250
|
case "snoozed":
|
|
2091
|
-
o.pauseOn.includes("snoozed") &&
|
|
2251
|
+
o.pauseOn.includes("snoozed") && g(he);
|
|
2092
2252
|
break;
|
|
2093
2253
|
case "unsnoozed":
|
|
2094
|
-
|
|
2254
|
+
y(he);
|
|
2095
2255
|
break;
|
|
2096
2256
|
case "discarded":
|
|
2097
|
-
|
|
2257
|
+
c(Hr);
|
|
2098
2258
|
break;
|
|
2099
2259
|
}
|
|
2100
|
-
return
|
|
2260
|
+
return l;
|
|
2101
2261
|
}
|
|
2102
|
-
function
|
|
2262
|
+
function Vr(e) {
|
|
2103
2263
|
return e.state === "running" || e.state === "paused";
|
|
2104
2264
|
}
|
|
2105
|
-
function
|
|
2106
|
-
const n =
|
|
2107
|
-
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -
|
|
2265
|
+
function ye(e, t) {
|
|
2266
|
+
const n = Ie(e);
|
|
2267
|
+
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -me(e.dueAt, t, n) : me(t, e.dueAt, n);
|
|
2108
2268
|
}
|
|
2109
|
-
function
|
|
2110
|
-
return e.state === "paused" ?
|
|
2269
|
+
function Fa(e, t) {
|
|
2270
|
+
return e.state === "paused" ? _e(t, e.remainingMs, Ie(e)) : e.dueAt;
|
|
2111
2271
|
}
|
|
2112
|
-
function
|
|
2113
|
-
const n = e.filter(
|
|
2272
|
+
function Ba(e, t) {
|
|
2273
|
+
const n = e.filter(Vr);
|
|
2114
2274
|
if (!n.length) return;
|
|
2115
2275
|
const r = n.filter((i) => i.state === "running");
|
|
2116
2276
|
return (r.length ? r : n).reduce(
|
|
2117
|
-
(i,
|
|
2277
|
+
(i, s) => ye(s, t) < ye(i, t) ? s : i
|
|
2118
2278
|
);
|
|
2119
2279
|
}
|
|
2120
|
-
function
|
|
2280
|
+
function Ha(e, t) {
|
|
2121
2281
|
if (e.state === "missed") return "breached";
|
|
2122
2282
|
if (e.state === "hit") return "met";
|
|
2123
2283
|
if (e.state === "paused") return "paused";
|
|
2124
2284
|
if (e.state === "void") return "met";
|
|
2125
|
-
const n =
|
|
2285
|
+
const n = ye(e, t);
|
|
2126
2286
|
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
2127
2287
|
}
|
|
2128
|
-
function
|
|
2288
|
+
function ja(e) {
|
|
2129
2289
|
const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), o = Math.floor(t % 3600 / 60);
|
|
2130
2290
|
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
|
|
2131
2291
|
}
|
|
2132
|
-
const
|
|
2133
|
-
function
|
|
2134
|
-
return `${
|
|
2292
|
+
const zr = "strategy_item";
|
|
2293
|
+
function $t(e) {
|
|
2294
|
+
return `${zr}:${e}`;
|
|
2135
2295
|
}
|
|
2136
|
-
function
|
|
2137
|
-
const n = /* @__PURE__ */ new Set([
|
|
2296
|
+
function Ga(e, t = 25) {
|
|
2297
|
+
const n = /* @__PURE__ */ new Set([$t(e.id)]);
|
|
2138
2298
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2139
2299
|
return Array.from(n).slice(0, t);
|
|
2140
2300
|
}
|
|
2141
|
-
function
|
|
2142
|
-
return e ? [...e.ancestorKeys ?? [],
|
|
2301
|
+
function Wa(e) {
|
|
2302
|
+
return e ? [...e.ancestorKeys ?? [], $t(e.id)] : [];
|
|
2143
2303
|
}
|
|
2144
|
-
const
|
|
2304
|
+
const J = [
|
|
2145
2305
|
{ key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
|
|
2146
2306
|
{ key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
|
|
2147
2307
|
{ key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
|
|
2148
|
-
],
|
|
2149
|
-
function
|
|
2308
|
+
], Yr = 999, Xr = 7;
|
|
2309
|
+
function qr(e, t = J) {
|
|
2150
2310
|
return t.find((n) => n.key === e);
|
|
2151
2311
|
}
|
|
2152
|
-
function
|
|
2153
|
-
return
|
|
2312
|
+
function be(e, t = J) {
|
|
2313
|
+
return qr(e, t)?.order ?? Yr;
|
|
2154
2314
|
}
|
|
2155
|
-
function
|
|
2156
|
-
return
|
|
2315
|
+
function Va(e, t, n = J) {
|
|
2316
|
+
return be(t, n) <= be(e, n);
|
|
2157
2317
|
}
|
|
2158
|
-
function
|
|
2159
|
-
const n =
|
|
2318
|
+
function za(e, t = J) {
|
|
2319
|
+
const n = be(e, t);
|
|
2160
2320
|
return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
|
|
2161
2321
|
}
|
|
2162
|
-
function
|
|
2322
|
+
function Ya(e) {
|
|
2163
2323
|
const t = e.trim().toLowerCase();
|
|
2164
2324
|
return t ? t.includes("key result") || t.includes("keyresult") || t === "kr" ? "key_result" : t.includes("objective") || t.includes("goal") || t.includes("doel") ? "objective" : t.includes("focus") || t.includes("area") || t.includes("theme") ? "area" : null : null;
|
|
2165
2325
|
}
|
|
2166
|
-
const
|
|
2326
|
+
const Ae = {
|
|
2167
2327
|
pending: "open",
|
|
2168
2328
|
on_track: "open",
|
|
2169
2329
|
at_risk: "open",
|
|
@@ -2172,74 +2332,74 @@ const fe = {
|
|
|
2172
2332
|
achieved: "closed",
|
|
2173
2333
|
missed: "closed"
|
|
2174
2334
|
};
|
|
2175
|
-
function
|
|
2176
|
-
return
|
|
2335
|
+
function Xa(e) {
|
|
2336
|
+
return Ae[e] ?? "open";
|
|
2177
2337
|
}
|
|
2178
|
-
function
|
|
2179
|
-
return Object.keys(
|
|
2180
|
-
(t) => e.includes(
|
|
2338
|
+
function qa(e) {
|
|
2339
|
+
return Object.keys(Ae).filter(
|
|
2340
|
+
(t) => e.includes(Ae[t])
|
|
2181
2341
|
);
|
|
2182
2342
|
}
|
|
2183
|
-
const
|
|
2184
|
-
function
|
|
2343
|
+
const Jr = 864e5, Z = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
|
|
2344
|
+
function Ja(e, t) {
|
|
2185
2345
|
const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
|
|
2186
2346
|
if (!Number.isFinite(t)) return 0;
|
|
2187
|
-
const i = n === "down" ? t <= o : t >= o,
|
|
2188
|
-
return (n === "down" ?
|
|
2347
|
+
const i = n === "down" ? t <= o : t >= o, s = o - r;
|
|
2348
|
+
return (n === "down" ? s < 0 : s > 0) ? Z((t - r) / s) : i ? 1 : 0;
|
|
2189
2349
|
}
|
|
2190
|
-
function
|
|
2350
|
+
function Za(e, t) {
|
|
2191
2351
|
const { startDate: n, targetDate: r } = e;
|
|
2192
2352
|
if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
|
|
2193
|
-
return
|
|
2353
|
+
return Z((t - n) / (r - n));
|
|
2194
2354
|
}
|
|
2195
|
-
const
|
|
2196
|
-
function
|
|
2355
|
+
const Zr = 0.1, Qr = 0.25;
|
|
2356
|
+
function Qa(e, t) {
|
|
2197
2357
|
if (typeof e != "number" || typeof t != "number") return;
|
|
2198
2358
|
if (e >= 1) return "achieved";
|
|
2199
2359
|
const n = t - e;
|
|
2200
|
-
return n >=
|
|
2360
|
+
return n >= Qr ? "off_track" : n >= Zr ? "at_risk" : "on_track";
|
|
2201
2361
|
}
|
|
2202
|
-
function
|
|
2362
|
+
function ec(e, t) {
|
|
2203
2363
|
if (t)
|
|
2204
|
-
return
|
|
2364
|
+
return Z(e / t);
|
|
2205
2365
|
}
|
|
2206
|
-
function
|
|
2366
|
+
function tc(e) {
|
|
2207
2367
|
const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
|
|
2208
2368
|
if (t.length)
|
|
2209
|
-
return
|
|
2369
|
+
return Z(t.reduce((n, r) => n + r, 0) / t.length);
|
|
2210
2370
|
}
|
|
2211
|
-
function
|
|
2371
|
+
function nc(e, t) {
|
|
2212
2372
|
const n = e.lastCheckInAt ?? e.createdAt;
|
|
2213
2373
|
if (typeof n != "number") return 0;
|
|
2214
|
-
const r = (e.checkInEveryDays ??
|
|
2374
|
+
const r = (e.checkInEveryDays ?? Xr) * Jr, o = t - n - r;
|
|
2215
2375
|
return o > 0 ? o : 0;
|
|
2216
2376
|
}
|
|
2217
|
-
function
|
|
2377
|
+
function rc(e) {
|
|
2218
2378
|
return e.targetDate ?? Number.MAX_SAFE_INTEGER;
|
|
2219
2379
|
}
|
|
2220
|
-
function
|
|
2380
|
+
function oc(e, t) {
|
|
2221
2381
|
const n = e.accumulatedSeconds || 0;
|
|
2222
2382
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
2223
2383
|
}
|
|
2224
|
-
function
|
|
2384
|
+
function ic(e, t) {
|
|
2225
2385
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
2226
2386
|
if (!t || t === "exact") return n * 60;
|
|
2227
2387
|
const r = Number(t);
|
|
2228
2388
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
2229
2389
|
}
|
|
2230
|
-
function
|
|
2390
|
+
function sc(e) {
|
|
2231
2391
|
const t = Math.max(0, Math.round(e / 60));
|
|
2232
2392
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
2233
2393
|
}
|
|
2234
|
-
function
|
|
2394
|
+
function ac(e) {
|
|
2235
2395
|
const t = Math.max(0, Math.floor(e)), n = (i) => String(i).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
|
|
2236
2396
|
return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
2237
2397
|
}
|
|
2238
|
-
function
|
|
2398
|
+
function eo(e) {
|
|
2239
2399
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2240
2400
|
}
|
|
2241
|
-
function
|
|
2242
|
-
const n =
|
|
2401
|
+
function cc(e, t) {
|
|
2402
|
+
const n = eo(e) || "werksoort", r = new Set(t);
|
|
2243
2403
|
if (!r.has(n)) return n;
|
|
2244
2404
|
for (let o = 2; o < 500; o++) {
|
|
2245
2405
|
const i = `${n}-${o}`;
|
|
@@ -2247,82 +2407,82 @@ function Gs(e, t) {
|
|
|
2247
2407
|
}
|
|
2248
2408
|
return `${n}-${r.size + 1}`;
|
|
2249
2409
|
}
|
|
2250
|
-
function
|
|
2410
|
+
function lc(e, t) {
|
|
2251
2411
|
const n = e.ownerScope;
|
|
2252
2412
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
2253
2413
|
}
|
|
2254
|
-
function
|
|
2255
|
-
return e.filter((t) => !t.archived).sort(
|
|
2414
|
+
function uc(e) {
|
|
2415
|
+
return e.filter((t) => !t.archived).sort(to);
|
|
2256
2416
|
}
|
|
2257
|
-
function
|
|
2417
|
+
function to(e, t) {
|
|
2258
2418
|
const n = (e.order ?? 0) - (t.order ?? 0);
|
|
2259
2419
|
return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
|
|
2260
2420
|
}
|
|
2261
|
-
const
|
|
2262
|
-
function
|
|
2421
|
+
const no = 20, ro = 20, ie = 300;
|
|
2422
|
+
function D(e) {
|
|
2263
2423
|
return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
|
|
2264
2424
|
}
|
|
2265
|
-
function
|
|
2425
|
+
function oo(e) {
|
|
2266
2426
|
const t = e.replace(/\s+/g, " ").trim();
|
|
2267
|
-
if (t.length <=
|
|
2268
|
-
const n = t.slice(0,
|
|
2269
|
-
return r >
|
|
2270
|
-
}
|
|
2271
|
-
function
|
|
2272
|
-
const n =
|
|
2273
|
-
if (!r || (e.examples ?? []).some((
|
|
2274
|
-
const o = e.exampleCandidates ?? [], i = o.findIndex((
|
|
2427
|
+
if (t.length <= ie) return t;
|
|
2428
|
+
const n = t.slice(0, ie), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
2429
|
+
return r > ie * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
2430
|
+
}
|
|
2431
|
+
function dc(e, t) {
|
|
2432
|
+
const n = oo(t.text), r = D(n);
|
|
2433
|
+
if (!r || (e.examples ?? []).some((s) => D(s) === r)) return null;
|
|
2434
|
+
const o = e.exampleCandidates ?? [], i = o.findIndex((s) => D(s.text) === r);
|
|
2275
2435
|
if (i >= 0) {
|
|
2276
2436
|
if (o[i].corrected || !t.corrected) return null;
|
|
2277
|
-
const
|
|
2278
|
-
return
|
|
2437
|
+
const s = [...o];
|
|
2438
|
+
return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, Ze(s);
|
|
2279
2439
|
}
|
|
2280
|
-
return
|
|
2440
|
+
return Ze([{ ...t, text: n }, ...o]).slice(0, ro);
|
|
2281
2441
|
}
|
|
2282
|
-
function
|
|
2442
|
+
function Ze(e) {
|
|
2283
2443
|
return [...e].sort(
|
|
2284
2444
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
2285
2445
|
);
|
|
2286
2446
|
}
|
|
2287
|
-
function
|
|
2288
|
-
const n =
|
|
2289
|
-
return { examples: r.some((i) =>
|
|
2447
|
+
function fc(e, t) {
|
|
2448
|
+
const n = D(t), r = (e.examples ?? []).filter((i) => i.trim());
|
|
2449
|
+
return { examples: r.some((i) => D(i) === n) ? r : [...r, t].slice(-no), exampleCandidates: io(e, t) };
|
|
2290
2450
|
}
|
|
2291
|
-
function
|
|
2292
|
-
const n =
|
|
2293
|
-
return (e.exampleCandidates ?? []).filter((r) =>
|
|
2451
|
+
function io(e, t) {
|
|
2452
|
+
const n = D(t);
|
|
2453
|
+
return (e.exampleCandidates ?? []).filter((r) => D(r.text) !== n);
|
|
2294
2454
|
}
|
|
2295
|
-
function
|
|
2455
|
+
function so(e, t) {
|
|
2296
2456
|
const n = e.ownerScope;
|
|
2297
2457
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
2298
2458
|
}
|
|
2299
|
-
function
|
|
2300
|
-
return e.filter((n) =>
|
|
2459
|
+
function pc(e, t) {
|
|
2460
|
+
return e.filter((n) => so(n, t));
|
|
2301
2461
|
}
|
|
2302
|
-
function
|
|
2462
|
+
function mc(e) {
|
|
2303
2463
|
return e.type === "agent";
|
|
2304
2464
|
}
|
|
2305
|
-
const
|
|
2306
|
-
function
|
|
2465
|
+
const hc = "WORK_COMMENT_ADDED", gc = "WORK_ITEM_ASSIGNED", yc = "WORK_ITEM_STATUS_CHANGED";
|
|
2466
|
+
function ao(e, t) {
|
|
2307
2467
|
const n = (r) => {
|
|
2308
2468
|
const o = new Date(r);
|
|
2309
2469
|
return o.setHours(0, 0, 0, 0), o.getTime();
|
|
2310
2470
|
};
|
|
2311
|
-
return Math.round((n(e) - n(t)) /
|
|
2471
|
+
return Math.round((n(e) - n(t)) / wn);
|
|
2312
2472
|
}
|
|
2313
|
-
function
|
|
2314
|
-
if (e.closedAt != null) return { score:
|
|
2473
|
+
function bc(e, t) {
|
|
2474
|
+
if (e.closedAt != null) return { score: R, reasons: [] };
|
|
2315
2475
|
const n = t.remindersById?.[e.id];
|
|
2316
|
-
if (n && n.remindAt > t.now) return { score:
|
|
2476
|
+
if (n && n.remindAt > t.now) return { score: R, reasons: [] };
|
|
2317
2477
|
let r = 0;
|
|
2318
2478
|
const o = [], i = e.priority ?? "normal";
|
|
2319
|
-
if (
|
|
2320
|
-
const
|
|
2321
|
-
|
|
2479
|
+
if (z[i] > 0 && (r += z[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
|
|
2480
|
+
const s = ao(e.dueDate, t.now);
|
|
2481
|
+
s < 0 ? (r += 35, o.push("overdue")) : s === 0 && (r += 20, o.push("due-today"));
|
|
2322
2482
|
}
|
|
2323
2483
|
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
|
|
2324
2484
|
}
|
|
2325
|
-
const
|
|
2485
|
+
const Te = [
|
|
2326
2486
|
{ key: "task", label: "type_task" },
|
|
2327
2487
|
{ key: "bug", label: "type_bug" },
|
|
2328
2488
|
{ key: "story", label: "type_story" },
|
|
@@ -2330,35 +2490,35 @@ const be = [
|
|
|
2330
2490
|
{ key: "subtask", label: "type_subtask" },
|
|
2331
2491
|
{ key: "case", label: "type_case" },
|
|
2332
2492
|
{ key: "deal", label: "type_deal" }
|
|
2333
|
-
],
|
|
2334
|
-
function
|
|
2335
|
-
return e?.types?.length ? e.types :
|
|
2493
|
+
], Ac = Te.map((e) => e.key);
|
|
2494
|
+
function Ec(e) {
|
|
2495
|
+
return e?.types?.length ? e.types : Te;
|
|
2336
2496
|
}
|
|
2337
|
-
function
|
|
2497
|
+
function Sc(e, t) {
|
|
2338
2498
|
return t.find((n) => n.key === e);
|
|
2339
2499
|
}
|
|
2340
|
-
function
|
|
2500
|
+
function _c(e) {
|
|
2341
2501
|
const t = e.trim().toLowerCase();
|
|
2342
2502
|
return t ? t.includes("sub-task") || t.includes("subtask") || t.includes("sub task") ? "subtask" : t.includes("bug") || t.includes("defect") ? "bug" : t.includes("epic") ? "epic" : t.includes("story") ? "story" : t.includes("incident") || t.includes("problem") || t.includes("service request") || t.includes("change") ? "case" : t.includes("task") ? "task" : null : null;
|
|
2343
2503
|
}
|
|
2344
|
-
function
|
|
2345
|
-
return e.map((t) =>
|
|
2504
|
+
function Ic(...e) {
|
|
2505
|
+
return e.map((t) => Te.find((n) => n.key === t)).filter((t) => !!t);
|
|
2346
2506
|
}
|
|
2347
|
-
const
|
|
2348
|
-
function
|
|
2349
|
-
return `${
|
|
2507
|
+
const co = "work_item", lo = "work_project", uo = "work_activity", Tc = "work_cycle";
|
|
2508
|
+
function fo(e) {
|
|
2509
|
+
return `${co}:${e}`;
|
|
2350
2510
|
}
|
|
2351
|
-
function
|
|
2352
|
-
return `${
|
|
2511
|
+
function Lt(e) {
|
|
2512
|
+
return `${lo}:${e}`;
|
|
2353
2513
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return `${
|
|
2514
|
+
function wc(e) {
|
|
2515
|
+
return `${uo}:${e}`;
|
|
2356
2516
|
}
|
|
2357
|
-
function
|
|
2517
|
+
function Mc(e, t, n) {
|
|
2358
2518
|
const r = `${e}-${t}`;
|
|
2359
2519
|
return n ? `${r}-${n}` : r;
|
|
2360
2520
|
}
|
|
2361
|
-
function
|
|
2521
|
+
function kc(e) {
|
|
2362
2522
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
2363
2523
|
return t ? {
|
|
2364
2524
|
projectKey: t[1].toUpperCase(),
|
|
@@ -2366,52 +2526,52 @@ function lc(e) {
|
|
|
2366
2526
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
2367
2527
|
} : null;
|
|
2368
2528
|
}
|
|
2369
|
-
function
|
|
2529
|
+
function vc(e) {
|
|
2370
2530
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
2371
2531
|
}
|
|
2372
|
-
function
|
|
2373
|
-
const n = /* @__PURE__ */ new Set([
|
|
2374
|
-
e.projectId && n.add(
|
|
2532
|
+
function Oc(e, t = 25) {
|
|
2533
|
+
const n = /* @__PURE__ */ new Set([fo(e.id)]);
|
|
2534
|
+
e.projectId && n.add(Lt(e.projectId));
|
|
2375
2535
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2376
2536
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
2377
2537
|
return Array.from(n).slice(0, t);
|
|
2378
2538
|
}
|
|
2379
|
-
function
|
|
2380
|
-
return [
|
|
2539
|
+
function Cc(e) {
|
|
2540
|
+
return [Lt(e.id)];
|
|
2381
2541
|
}
|
|
2382
|
-
const
|
|
2542
|
+
const we = [
|
|
2383
2543
|
{ key: "open", label: "status_open", category: "todo", order: 0 },
|
|
2384
2544
|
{ key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
|
|
2385
2545
|
{ key: "done", label: "status_done", category: "done", order: 2 },
|
|
2386
2546
|
{ key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
|
|
2387
|
-
],
|
|
2388
|
-
function
|
|
2389
|
-
return e?.statuses?.length ? e.statuses :
|
|
2547
|
+
], Pt = we.map((e) => e.key);
|
|
2548
|
+
function po(e) {
|
|
2549
|
+
return e?.statuses?.length ? e.statuses : we;
|
|
2390
2550
|
}
|
|
2391
|
-
function
|
|
2551
|
+
function mo(e, t) {
|
|
2392
2552
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
2393
2553
|
}
|
|
2394
|
-
function
|
|
2554
|
+
function Nc(e, t) {
|
|
2395
2555
|
return t.find((n) => n.key === e);
|
|
2396
2556
|
}
|
|
2397
|
-
function
|
|
2398
|
-
const t =
|
|
2399
|
-
return n && t.some((r) => r.key === n) ? n :
|
|
2557
|
+
function xc(e) {
|
|
2558
|
+
const t = po(e), n = e?.defaultStatusKey;
|
|
2559
|
+
return n && t.some((r) => r.key === n) ? n : ho(t)[0]?.key ?? we[0].key;
|
|
2400
2560
|
}
|
|
2401
|
-
function
|
|
2561
|
+
function ho(e) {
|
|
2402
2562
|
return [...e].sort((t, n) => {
|
|
2403
2563
|
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
2404
2564
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
2405
2565
|
});
|
|
2406
2566
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return
|
|
2567
|
+
function Rc(e, t) {
|
|
2568
|
+
return mo(e, t) === "done";
|
|
2409
2569
|
}
|
|
2410
|
-
function
|
|
2570
|
+
function go(e) {
|
|
2411
2571
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2412
2572
|
}
|
|
2413
|
-
function
|
|
2414
|
-
const n =
|
|
2573
|
+
function Dc(e, t) {
|
|
2574
|
+
const n = go(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Pt]);
|
|
2415
2575
|
if (!r.has(n)) return n;
|
|
2416
2576
|
for (let o = 2; o < 500; o++) {
|
|
2417
2577
|
const i = `${n}-${o}`;
|
|
@@ -2419,7 +2579,7 @@ function hc(e, t) {
|
|
|
2419
2579
|
}
|
|
2420
2580
|
return `${n}-${r.size + 1}`;
|
|
2421
2581
|
}
|
|
2422
|
-
function
|
|
2582
|
+
function $c(e) {
|
|
2423
2583
|
const t = [];
|
|
2424
2584
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
2425
2585
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -2428,16 +2588,16 @@ function yc(e) {
|
|
|
2428
2588
|
t.push({ index: o, reason: "missing_key" });
|
|
2429
2589
|
return;
|
|
2430
2590
|
}
|
|
2431
|
-
|
|
2591
|
+
Pt.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
|
|
2432
2592
|
}), 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;
|
|
2433
2593
|
}
|
|
2434
|
-
function
|
|
2594
|
+
function Lc(e) {
|
|
2435
2595
|
return e.startDate ?? Number.MAX_SAFE_INTEGER;
|
|
2436
2596
|
}
|
|
2437
|
-
function
|
|
2597
|
+
function Pc(e) {
|
|
2438
2598
|
return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
|
|
2439
2599
|
}
|
|
2440
|
-
const
|
|
2600
|
+
const yo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), bo = /* @__PURE__ */ new Set([
|
|
2441
2601
|
"text/plain",
|
|
2442
2602
|
"text/markdown",
|
|
2443
2603
|
"text/csv",
|
|
@@ -2446,67 +2606,67 @@ const to = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
2446
2606
|
"application/xml",
|
|
2447
2607
|
"text/xml"
|
|
2448
2608
|
]);
|
|
2449
|
-
function
|
|
2609
|
+
function Ao(e) {
|
|
2450
2610
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
2451
|
-
return t ?
|
|
2452
|
-
}
|
|
2453
|
-
const
|
|
2454
|
-
image: 5 *
|
|
2455
|
-
pdf: 20 *
|
|
2456
|
-
text: 1 *
|
|
2457
|
-
audio: 20 *
|
|
2458
|
-
},
|
|
2459
|
-
function
|
|
2460
|
-
const n =
|
|
2461
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
2462
|
-
}
|
|
2463
|
-
function
|
|
2611
|
+
return t ? yo.has(t) ? "image" : t === "application/pdf" ? "pdf" : bo.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
2612
|
+
}
|
|
2613
|
+
const P = 1024 * 1024, Eo = {
|
|
2614
|
+
image: 5 * P,
|
|
2615
|
+
pdf: 20 * P,
|
|
2616
|
+
text: 1 * P,
|
|
2617
|
+
audio: 20 * P
|
|
2618
|
+
}, Uc = 25 * P, Kc = 5;
|
|
2619
|
+
function Fc(e, t) {
|
|
2620
|
+
const n = Ao(e);
|
|
2621
|
+
return n === "unsupported" ? "unsupported" : t > Eo[n] ? "too-large" : null;
|
|
2622
|
+
}
|
|
2623
|
+
function Bc(e) {
|
|
2464
2624
|
return e.access !== "read" && e.effect !== "internal";
|
|
2465
2625
|
}
|
|
2466
|
-
function
|
|
2626
|
+
function So(e) {
|
|
2467
2627
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
2468
2628
|
}
|
|
2469
|
-
function
|
|
2629
|
+
function Hc(e, t = []) {
|
|
2470
2630
|
const n = new Set(t), r = [], o = [];
|
|
2471
2631
|
for (const i of e) {
|
|
2472
|
-
const
|
|
2473
|
-
n.has(
|
|
2632
|
+
const s = So(i);
|
|
2633
|
+
n.has(s) || (n.add(s), r.push(i), o.push(s));
|
|
2474
2634
|
}
|
|
2475
2635
|
return { sources: r, keys: o };
|
|
2476
2636
|
}
|
|
2477
|
-
const
|
|
2478
|
-
function
|
|
2637
|
+
const jc = "assist-source", Gc = ["blocking", "due", "open"];
|
|
2638
|
+
function Wc(e, t) {
|
|
2479
2639
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
2480
2640
|
return n === t && r ? r : void 0;
|
|
2481
2641
|
}
|
|
2482
|
-
const
|
|
2483
|
-
function
|
|
2484
|
-
return
|
|
2642
|
+
const Qe = { blocking: 0, due: 1, open: 2 };
|
|
2643
|
+
function Vc(e, t) {
|
|
2644
|
+
return Qe[e.band ?? "open"] - Qe[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
2485
2645
|
}
|
|
2486
|
-
function
|
|
2646
|
+
function zc(e) {
|
|
2487
2647
|
return e.sessions.filter(
|
|
2488
2648
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
2489
2649
|
);
|
|
2490
2650
|
}
|
|
2491
|
-
function
|
|
2651
|
+
function Yc(e) {
|
|
2492
2652
|
return e.sessions.filter(
|
|
2493
2653
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
2494
2654
|
);
|
|
2495
2655
|
}
|
|
2496
|
-
function
|
|
2656
|
+
function Xc(e) {
|
|
2497
2657
|
return e.sessions.some(
|
|
2498
2658
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
2499
2659
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
2500
2660
|
}
|
|
2501
|
-
function
|
|
2502
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((
|
|
2661
|
+
function _o(e, t) {
|
|
2662
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => To(s, r[s.intent]));
|
|
2503
2663
|
if (!e.extraIntents || e.extraIntents.length === 0) return o;
|
|
2504
|
-
const i = new Set(o.map((
|
|
2505
|
-
for (const
|
|
2506
|
-
i.has(
|
|
2664
|
+
const i = new Set(o.map((s) => s.intent));
|
|
2665
|
+
for (const s of e.extraIntents)
|
|
2666
|
+
i.has(s.intent) || (o.push(s), i.add(s.intent));
|
|
2507
2667
|
return o;
|
|
2508
2668
|
}
|
|
2509
|
-
function
|
|
2669
|
+
function Io(e, t) {
|
|
2510
2670
|
const n = {};
|
|
2511
2671
|
for (const r of e.intents) {
|
|
2512
2672
|
if (!r.togglable) continue;
|
|
@@ -2515,46 +2675,46 @@ function so(e, t) {
|
|
|
2515
2675
|
}
|
|
2516
2676
|
return n;
|
|
2517
2677
|
}
|
|
2518
|
-
function
|
|
2519
|
-
const n =
|
|
2678
|
+
function qc(e, t) {
|
|
2679
|
+
const n = Io(e, t);
|
|
2520
2680
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
2521
2681
|
}
|
|
2522
|
-
function
|
|
2682
|
+
function To(e, t) {
|
|
2523
2683
|
return t ? {
|
|
2524
2684
|
intent: t.intent ?? e.intent,
|
|
2525
2685
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
2526
2686
|
transport: t.transport ?? e.transport
|
|
2527
2687
|
} : e;
|
|
2528
2688
|
}
|
|
2529
|
-
function
|
|
2689
|
+
function Jc(e, t) {
|
|
2530
2690
|
const n = [];
|
|
2531
2691
|
for (const r of e) {
|
|
2532
2692
|
if (!r.enabled) continue;
|
|
2533
2693
|
const o = t[r.providerId];
|
|
2534
2694
|
if (o)
|
|
2535
|
-
for (const i of
|
|
2695
|
+
for (const i of _o(r, o))
|
|
2536
2696
|
n.push({ channel: r, description: o, capability: i });
|
|
2537
2697
|
}
|
|
2538
2698
|
return n;
|
|
2539
2699
|
}
|
|
2540
|
-
function
|
|
2700
|
+
function Zc(e, t) {
|
|
2541
2701
|
return t.filter((n) => n.capability.intent === e);
|
|
2542
2702
|
}
|
|
2543
|
-
function
|
|
2703
|
+
function wo(e, t) {
|
|
2544
2704
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
2545
2705
|
}
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2706
|
+
function Qc(e, t) {
|
|
2707
|
+
return wo(e.scheme, t);
|
|
2548
2708
|
}
|
|
2549
|
-
function
|
|
2709
|
+
function el(e, t, n) {
|
|
2550
2710
|
const r = [];
|
|
2551
2711
|
for (const o of e)
|
|
2552
2712
|
for (const i of n)
|
|
2553
2713
|
i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
|
|
2554
2714
|
return r;
|
|
2555
2715
|
}
|
|
2556
|
-
var
|
|
2557
|
-
const
|
|
2716
|
+
var Mo = /* @__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))(Mo || {});
|
|
2717
|
+
const ko = {
|
|
2558
2718
|
mailto: "mail",
|
|
2559
2719
|
sip: "tel",
|
|
2560
2720
|
tel: "tel",
|
|
@@ -2575,10 +2735,10 @@ const po = {
|
|
|
2575
2735
|
id: "note",
|
|
2576
2736
|
custom: "note"
|
|
2577
2737
|
};
|
|
2578
|
-
function
|
|
2579
|
-
return e ?
|
|
2738
|
+
function tl(e) {
|
|
2739
|
+
return e ? ko[e] ?? "note" : "note";
|
|
2580
2740
|
}
|
|
2581
|
-
const
|
|
2741
|
+
const nl = "message_window", rl = "message_templates", ol = {
|
|
2582
2742
|
// E-mail
|
|
2583
2743
|
FROM: "from",
|
|
2584
2744
|
TO: "to",
|
|
@@ -2595,12 +2755,12 @@ const Uc = "message_window", Kc = "message_templates", Fc = {
|
|
|
2595
2755
|
// Voice/conference
|
|
2596
2756
|
HOST: "host",
|
|
2597
2757
|
PARTICIPANT: "participant"
|
|
2598
|
-
},
|
|
2758
|
+
}, il = (e, t) => ({ intent: e, ...t }), sl = "folder_management", al = "remote_search", cl = "message_reactions", ll = {
|
|
2599
2759
|
ok: !1,
|
|
2600
2760
|
code: "UNSUPPORTED",
|
|
2601
2761
|
message: "Provider does not support this op"
|
|
2602
|
-
},
|
|
2603
|
-
function
|
|
2762
|
+
}, ul = "connector", dl = "context.collect", b = (e) => ({ type: "string", description: e }), h = (e) => ({ type: "number", description: e }), W = (e) => ({ type: "boolean", description: e }), v = b("Sheet name. Omit for the sheet the user is looking at."), et = b("Slide id, as `inspect` reports it.");
|
|
2763
|
+
function m(e, t, n, r, o, i) {
|
|
2604
2764
|
return {
|
|
2605
2765
|
op: e,
|
|
2606
2766
|
kinds: t,
|
|
@@ -2610,24 +2770,24 @@ function f(e, t, n, r, o, i) {
|
|
|
2610
2770
|
visible: i.visible
|
|
2611
2771
|
};
|
|
2612
2772
|
}
|
|
2613
|
-
const
|
|
2614
|
-
|
|
2773
|
+
const U = { undoable: !1, visible: !0 }, S = { undoable: !0, visible: !0 }, tt = { undoable: !1, visible: !0 }, X = { undoable: !1, visible: !1 }, vo = [
|
|
2774
|
+
m(
|
|
2615
2775
|
"pdf.goToPage",
|
|
2616
2776
|
["pdf"],
|
|
2617
2777
|
"Scroll the viewer to a page.",
|
|
2618
|
-
{ page:
|
|
2778
|
+
{ page: h("1-based page number.") },
|
|
2619
2779
|
["page"],
|
|
2620
|
-
|
|
2780
|
+
U
|
|
2621
2781
|
),
|
|
2622
|
-
|
|
2782
|
+
m(
|
|
2623
2783
|
"pdf.search",
|
|
2624
2784
|
["pdf"],
|
|
2625
2785
|
"Search the document and highlight the matches, as the find bar does.",
|
|
2626
|
-
{ query:
|
|
2786
|
+
{ query: b("Text to find."), next: W("Jump to the next match instead of the first.") },
|
|
2627
2787
|
["query"],
|
|
2628
|
-
|
|
2788
|
+
U
|
|
2629
2789
|
),
|
|
2630
|
-
|
|
2790
|
+
m(
|
|
2631
2791
|
"pdf.setTool",
|
|
2632
2792
|
["pdf"],
|
|
2633
2793
|
"Select a markup tool for the user, so their next click draws it.",
|
|
@@ -2639,23 +2799,23 @@ const D = { undoable: !1, visible: !0 }, b = { undoable: !0, visible: !0 }, ze =
|
|
|
2639
2799
|
}
|
|
2640
2800
|
},
|
|
2641
2801
|
["tool"],
|
|
2642
|
-
|
|
2802
|
+
U
|
|
2643
2803
|
),
|
|
2644
|
-
|
|
2804
|
+
m(
|
|
2645
2805
|
"pdf.fillField",
|
|
2646
2806
|
["pdf"],
|
|
2647
2807
|
"Fill one form field of a fillable PDF.",
|
|
2648
2808
|
{
|
|
2649
|
-
field:
|
|
2809
|
+
field: b("Field name, exactly as `inspect` reports it under `fields`."),
|
|
2650
2810
|
value: {
|
|
2651
2811
|
type: ["string", "boolean"],
|
|
2652
2812
|
description: "Text for a text field, true/false for a checkbox or radio."
|
|
2653
2813
|
}
|
|
2654
2814
|
},
|
|
2655
2815
|
["field", "value"],
|
|
2656
|
-
|
|
2816
|
+
S
|
|
2657
2817
|
),
|
|
2658
|
-
|
|
2818
|
+
m(
|
|
2659
2819
|
"pdf.reorderPages",
|
|
2660
2820
|
["pdf"],
|
|
2661
2821
|
"Put the pages in a different order. Pages left out are deleted.",
|
|
@@ -2667,52 +2827,52 @@ const D = { undoable: !1, visible: !0 }, b = { undoable: !0, visible: !0 }, ze =
|
|
|
2667
2827
|
}
|
|
2668
2828
|
},
|
|
2669
2829
|
["order"],
|
|
2670
|
-
|
|
2830
|
+
tt
|
|
2671
2831
|
),
|
|
2672
|
-
|
|
2832
|
+
m(
|
|
2673
2833
|
"pdf.deletePages",
|
|
2674
2834
|
["pdf"],
|
|
2675
2835
|
"Remove pages, keeping the rest in order.",
|
|
2676
2836
|
{ pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
|
|
2677
2837
|
["pages"],
|
|
2678
|
-
|
|
2838
|
+
tt
|
|
2679
2839
|
),
|
|
2680
|
-
|
|
2840
|
+
m(
|
|
2681
2841
|
"pdf.addNote",
|
|
2682
2842
|
["pdf"],
|
|
2683
2843
|
"Place a text note on a page. Written on save; not visible before that.",
|
|
2684
2844
|
{
|
|
2685
|
-
page:
|
|
2686
|
-
text:
|
|
2687
|
-
left:
|
|
2688
|
-
top:
|
|
2689
|
-
width:
|
|
2690
|
-
height:
|
|
2691
|
-
fontSize:
|
|
2845
|
+
page: h("1-based page number."),
|
|
2846
|
+
text: b("The note's text."),
|
|
2847
|
+
left: h("Distance from the left edge, in PDF points (72 per inch)."),
|
|
2848
|
+
top: h("Distance from the top edge, in PDF points."),
|
|
2849
|
+
width: h("Box width in points. Omit for a sensible default."),
|
|
2850
|
+
height: h("Box height in points. Omit for a sensible default."),
|
|
2851
|
+
fontSize: h("Font size in points. Omit for 12.")
|
|
2692
2852
|
},
|
|
2693
2853
|
["page", "text", "left", "top"],
|
|
2694
|
-
|
|
2854
|
+
X
|
|
2695
2855
|
),
|
|
2696
|
-
|
|
2856
|
+
m(
|
|
2697
2857
|
"pdf.highlightText",
|
|
2698
2858
|
["pdf"],
|
|
2699
2859
|
"Highlight a phrase on a page. Written on save; not visible before that.",
|
|
2700
2860
|
{
|
|
2701
|
-
page:
|
|
2702
|
-
text:
|
|
2703
|
-
occurrence:
|
|
2861
|
+
page: h("1-based page number."),
|
|
2862
|
+
text: b("The exact phrase to highlight, as it appears in the page's text."),
|
|
2863
|
+
occurrence: h("Which occurrence on that page, 1-based. Omit for the first.")
|
|
2704
2864
|
},
|
|
2705
2865
|
["page", "text"],
|
|
2706
|
-
|
|
2866
|
+
X
|
|
2707
2867
|
)
|
|
2708
|
-
],
|
|
2709
|
-
|
|
2868
|
+
], Oo = [
|
|
2869
|
+
m(
|
|
2710
2870
|
"sheet.setValues",
|
|
2711
2871
|
["sheet"],
|
|
2712
2872
|
"Write a block of values. The block's shape must match the range.",
|
|
2713
2873
|
{
|
|
2714
|
-
sheet:
|
|
2715
|
-
range:
|
|
2874
|
+
sheet: v,
|
|
2875
|
+
range: b("A1 notation, e.g. `B2:D5` or a single `A1`."),
|
|
2716
2876
|
values: {
|
|
2717
2877
|
type: "array",
|
|
2718
2878
|
items: { type: "array", items: { type: ["string", "number", "boolean", "null"] } },
|
|
@@ -2720,261 +2880,261 @@ const D = { undoable: !1, visible: !0 }, b = { undoable: !0, visible: !0 }, ze =
|
|
|
2720
2880
|
}
|
|
2721
2881
|
},
|
|
2722
2882
|
["range", "values"],
|
|
2723
|
-
|
|
2883
|
+
S
|
|
2724
2884
|
),
|
|
2725
|
-
|
|
2885
|
+
m(
|
|
2726
2886
|
"sheet.setFormula",
|
|
2727
2887
|
["sheet"],
|
|
2728
2888
|
"Put a formula in every cell of a range.",
|
|
2729
|
-
{ sheet:
|
|
2889
|
+
{ sheet: v, range: b("A1 notation."), formula: b("Including the leading `=`.") },
|
|
2730
2890
|
["range", "formula"],
|
|
2731
|
-
|
|
2891
|
+
S
|
|
2732
2892
|
),
|
|
2733
|
-
|
|
2893
|
+
m(
|
|
2734
2894
|
"sheet.setStyle",
|
|
2735
2895
|
["sheet"],
|
|
2736
2896
|
"Change the look of a range. Only the properties you pass are touched.",
|
|
2737
2897
|
{
|
|
2738
|
-
sheet:
|
|
2739
|
-
range:
|
|
2740
|
-
bold:
|
|
2741
|
-
italic:
|
|
2742
|
-
fontSize:
|
|
2743
|
-
fontColor:
|
|
2744
|
-
background:
|
|
2898
|
+
sheet: v,
|
|
2899
|
+
range: b("A1 notation."),
|
|
2900
|
+
bold: W("Bold on or off."),
|
|
2901
|
+
italic: W("Italic on or off."),
|
|
2902
|
+
fontSize: h("Point size."),
|
|
2903
|
+
fontColor: b("CSS colour, e.g. `#b91c1c`."),
|
|
2904
|
+
background: b("CSS colour for the cell fill."),
|
|
2745
2905
|
horizontalAlignment: {
|
|
2746
2906
|
type: "string",
|
|
2747
2907
|
enum: ["left", "center", "right"],
|
|
2748
2908
|
description: "Horizontal alignment."
|
|
2749
2909
|
},
|
|
2750
|
-
numberFormat:
|
|
2910
|
+
numberFormat: b("Number format pattern, e.g. `#,##0.00` or `0%`.")
|
|
2751
2911
|
},
|
|
2752
2912
|
["range"],
|
|
2753
|
-
|
|
2913
|
+
S
|
|
2754
2914
|
),
|
|
2755
|
-
|
|
2915
|
+
m(
|
|
2756
2916
|
"sheet.insertRows",
|
|
2757
2917
|
["sheet"],
|
|
2758
2918
|
"Insert empty rows, pushing the rest down.",
|
|
2759
2919
|
{
|
|
2760
|
-
sheet:
|
|
2761
|
-
at:
|
|
2762
|
-
count:
|
|
2920
|
+
sheet: v,
|
|
2921
|
+
at: h("1-based row number to insert before."),
|
|
2922
|
+
count: h("How many. Omit for 1.")
|
|
2763
2923
|
},
|
|
2764
2924
|
["at"],
|
|
2765
|
-
|
|
2925
|
+
S
|
|
2766
2926
|
),
|
|
2767
|
-
|
|
2927
|
+
m(
|
|
2768
2928
|
"sheet.deleteRows",
|
|
2769
2929
|
["sheet"],
|
|
2770
2930
|
"Delete rows, pulling the rest up.",
|
|
2771
|
-
{ sheet:
|
|
2931
|
+
{ sheet: v, at: h("1-based first row to delete."), count: h("How many. Omit for 1.") },
|
|
2772
2932
|
["at"],
|
|
2773
|
-
|
|
2933
|
+
S
|
|
2774
2934
|
),
|
|
2775
|
-
|
|
2935
|
+
m(
|
|
2776
2936
|
"sheet.insertColumns",
|
|
2777
2937
|
["sheet"],
|
|
2778
2938
|
"Insert empty columns, pushing the rest right.",
|
|
2779
2939
|
{
|
|
2780
|
-
sheet:
|
|
2781
|
-
at:
|
|
2782
|
-
count:
|
|
2940
|
+
sheet: v,
|
|
2941
|
+
at: h("1-based column number to insert before."),
|
|
2942
|
+
count: h("How many. Omit for 1.")
|
|
2783
2943
|
},
|
|
2784
2944
|
["at"],
|
|
2785
|
-
|
|
2945
|
+
S
|
|
2786
2946
|
),
|
|
2787
|
-
|
|
2947
|
+
m(
|
|
2788
2948
|
"sheet.deleteColumns",
|
|
2789
2949
|
["sheet"],
|
|
2790
2950
|
"Delete columns, pulling the rest left.",
|
|
2791
2951
|
{
|
|
2792
|
-
sheet:
|
|
2793
|
-
at:
|
|
2794
|
-
count:
|
|
2952
|
+
sheet: v,
|
|
2953
|
+
at: h("1-based first column to delete."),
|
|
2954
|
+
count: h("How many. Omit for 1.")
|
|
2795
2955
|
},
|
|
2796
2956
|
["at"],
|
|
2797
|
-
|
|
2957
|
+
S
|
|
2798
2958
|
),
|
|
2799
|
-
|
|
2959
|
+
m(
|
|
2800
2960
|
"sheet.merge",
|
|
2801
2961
|
["sheet"],
|
|
2802
2962
|
"Merge a range into one cell.",
|
|
2803
|
-
{ sheet:
|
|
2963
|
+
{ sheet: v, range: b("A1 notation.") },
|
|
2804
2964
|
["range"],
|
|
2805
|
-
|
|
2965
|
+
S
|
|
2806
2966
|
),
|
|
2807
|
-
|
|
2967
|
+
m(
|
|
2808
2968
|
"sheet.unmerge",
|
|
2809
2969
|
["sheet"],
|
|
2810
2970
|
"Break merged cells in a range apart.",
|
|
2811
|
-
{ sheet:
|
|
2971
|
+
{ sheet: v, range: b("A1 notation.") },
|
|
2812
2972
|
["range"],
|
|
2813
|
-
|
|
2973
|
+
S
|
|
2814
2974
|
),
|
|
2815
|
-
|
|
2975
|
+
m(
|
|
2816
2976
|
"sheet.sort",
|
|
2817
2977
|
["sheet"],
|
|
2818
2978
|
"Sort a range on one of its columns.",
|
|
2819
2979
|
{
|
|
2820
|
-
sheet:
|
|
2821
|
-
range:
|
|
2822
|
-
column:
|
|
2823
|
-
ascending:
|
|
2980
|
+
sheet: v,
|
|
2981
|
+
range: b("A1 notation covering the rows to sort, header excluded."),
|
|
2982
|
+
column: h("1-based column *within the range*, not within the sheet."),
|
|
2983
|
+
ascending: W("Ascending. Omit for ascending.")
|
|
2824
2984
|
},
|
|
2825
2985
|
["range", "column"],
|
|
2826
|
-
|
|
2986
|
+
S
|
|
2827
2987
|
),
|
|
2828
|
-
|
|
2988
|
+
m(
|
|
2829
2989
|
"sheet.insertSheet",
|
|
2830
2990
|
["sheet"],
|
|
2831
2991
|
"Add a new sheet.",
|
|
2832
|
-
{ name:
|
|
2992
|
+
{ name: b("Name for the new sheet.") },
|
|
2833
2993
|
["name"],
|
|
2834
|
-
|
|
2994
|
+
S
|
|
2835
2995
|
),
|
|
2836
|
-
|
|
2996
|
+
m(
|
|
2837
2997
|
"sheet.renameSheet",
|
|
2838
2998
|
["sheet"],
|
|
2839
2999
|
"Rename a sheet.",
|
|
2840
|
-
{ sheet:
|
|
3000
|
+
{ sheet: b("Current name."), name: b("New name.") },
|
|
2841
3001
|
["sheet", "name"],
|
|
2842
|
-
|
|
3002
|
+
S
|
|
2843
3003
|
),
|
|
2844
|
-
|
|
3004
|
+
m(
|
|
2845
3005
|
"sheet.deleteSheet",
|
|
2846
3006
|
["sheet"],
|
|
2847
3007
|
"Remove a sheet and everything on it.",
|
|
2848
|
-
{ sheet:
|
|
3008
|
+
{ sheet: b("Name of the sheet to delete.") },
|
|
2849
3009
|
["sheet"],
|
|
2850
|
-
|
|
3010
|
+
S
|
|
2851
3011
|
),
|
|
2852
|
-
|
|
3012
|
+
m(
|
|
2853
3013
|
"sheet.activate",
|
|
2854
3014
|
["sheet"],
|
|
2855
3015
|
"Show the user a sheet and select a range on it.",
|
|
2856
|
-
{ sheet:
|
|
3016
|
+
{ sheet: v, range: b("A1 notation to select. Omit to only switch sheets.") },
|
|
2857
3017
|
[],
|
|
2858
|
-
|
|
3018
|
+
U
|
|
2859
3019
|
)
|
|
2860
|
-
],
|
|
2861
|
-
|
|
3020
|
+
], Co = [
|
|
3021
|
+
m(
|
|
2862
3022
|
"word.replaceParagraph",
|
|
2863
3023
|
["word"],
|
|
2864
3024
|
"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",
|
|
2865
3025
|
{
|
|
2866
|
-
at:
|
|
2867
|
-
text:
|
|
3026
|
+
at: h("The offset the paragraph starts at, exactly as `inspect` prints it."),
|
|
3027
|
+
text: b("The new text for that paragraph. A newline starts a further paragraph.")
|
|
2868
3028
|
},
|
|
2869
3029
|
["at", "text"],
|
|
2870
|
-
|
|
3030
|
+
S
|
|
2871
3031
|
),
|
|
2872
|
-
|
|
3032
|
+
m(
|
|
2873
3033
|
"word.replaceRange",
|
|
2874
3034
|
["word"],
|
|
2875
3035
|
"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.",
|
|
2876
3036
|
{
|
|
2877
|
-
start:
|
|
2878
|
-
end:
|
|
2879
|
-
text:
|
|
3037
|
+
start: h("Character offset where the replaced text starts, as `inspect` reports offsets."),
|
|
3038
|
+
end: h("Character offset just past the last character to replace."),
|
|
3039
|
+
text: b("The replacement text. A newline starts a new paragraph.")
|
|
2880
3040
|
},
|
|
2881
3041
|
["start", "end", "text"],
|
|
2882
|
-
|
|
3042
|
+
S
|
|
2883
3043
|
),
|
|
2884
|
-
|
|
3044
|
+
m(
|
|
2885
3045
|
"word.insertText",
|
|
2886
3046
|
["word"],
|
|
2887
3047
|
"Insert text at a character offset, without removing anything.",
|
|
2888
3048
|
{
|
|
2889
|
-
index:
|
|
2890
|
-
text:
|
|
3049
|
+
index: h("Character offset, as `inspect` reports offsets."),
|
|
3050
|
+
text: b("The text to insert.")
|
|
2891
3051
|
},
|
|
2892
3052
|
["index", "text"],
|
|
2893
|
-
|
|
3053
|
+
S
|
|
2894
3054
|
),
|
|
2895
|
-
|
|
3055
|
+
m(
|
|
2896
3056
|
"word.appendText",
|
|
2897
3057
|
["word"],
|
|
2898
3058
|
"Add text at the end of the document.",
|
|
2899
|
-
{ text:
|
|
3059
|
+
{ text: b("The text to append.") },
|
|
2900
3060
|
["text"],
|
|
2901
|
-
|
|
3061
|
+
S
|
|
2902
3062
|
),
|
|
2903
|
-
|
|
3063
|
+
m(
|
|
2904
3064
|
"word.insertParagraph",
|
|
2905
3065
|
["word"],
|
|
2906
3066
|
"Start a new paragraph, optionally with text in it.",
|
|
2907
3067
|
{
|
|
2908
|
-
text:
|
|
2909
|
-
index:
|
|
3068
|
+
text: b("Paragraph text. Newlines start further paragraphs."),
|
|
3069
|
+
index: h("Character offset to insert at. Omit for the end of the document.")
|
|
2910
3070
|
},
|
|
2911
3071
|
[],
|
|
2912
|
-
|
|
3072
|
+
S
|
|
2913
3073
|
),
|
|
2914
|
-
|
|
3074
|
+
m(
|
|
2915
3075
|
"word.setSelection",
|
|
2916
3076
|
["word"],
|
|
2917
3077
|
"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.",
|
|
2918
|
-
{ start:
|
|
3078
|
+
{ start: h("Start character offset."), end: h("End character offset. Omit for a caret.") },
|
|
2919
3079
|
["start"],
|
|
2920
|
-
|
|
3080
|
+
U
|
|
2921
3081
|
)
|
|
2922
|
-
],
|
|
2923
|
-
|
|
3082
|
+
], No = [
|
|
3083
|
+
m(
|
|
2924
3084
|
"slides.setText",
|
|
2925
3085
|
["slides"],
|
|
2926
3086
|
"Replace the text of one shape. Written on save; not visible before that, and not undoable.",
|
|
2927
3087
|
{
|
|
2928
|
-
slide:
|
|
2929
|
-
element:
|
|
2930
|
-
text:
|
|
3088
|
+
slide: et,
|
|
3089
|
+
element: b("Element id, as `inspect` reports it."),
|
|
3090
|
+
text: b("The new text.")
|
|
2931
3091
|
},
|
|
2932
3092
|
["slide", "element", "text"],
|
|
2933
|
-
|
|
3093
|
+
X
|
|
2934
3094
|
),
|
|
2935
|
-
|
|
3095
|
+
m(
|
|
2936
3096
|
"slides.setTransform",
|
|
2937
3097
|
["slides"],
|
|
2938
3098
|
"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
|
|
2939
3099
|
{
|
|
2940
|
-
slide:
|
|
2941
|
-
element:
|
|
2942
|
-
left:
|
|
2943
|
-
top:
|
|
2944
|
-
width:
|
|
2945
|
-
height:
|
|
3100
|
+
slide: et,
|
|
3101
|
+
element: b("Element id."),
|
|
3102
|
+
left: h("Distance from the left edge, in pixels."),
|
|
3103
|
+
top: h("Distance from the top edge, in pixels."),
|
|
3104
|
+
width: h("Width in pixels."),
|
|
3105
|
+
height: h("Height in pixels.")
|
|
2946
3106
|
},
|
|
2947
3107
|
["slide", "element"],
|
|
2948
|
-
|
|
3108
|
+
X
|
|
2949
3109
|
)
|
|
2950
|
-
],
|
|
2951
|
-
...
|
|
2952
|
-
...
|
|
2953
|
-
...
|
|
2954
|
-
...
|
|
3110
|
+
], Ut = [
|
|
3111
|
+
...vo,
|
|
3112
|
+
...Oo,
|
|
3113
|
+
...Co,
|
|
3114
|
+
...No
|
|
2955
3115
|
];
|
|
2956
|
-
function
|
|
2957
|
-
return
|
|
3116
|
+
function fl(e) {
|
|
3117
|
+
return Ut.filter((t) => t.kinds.includes(e));
|
|
2958
3118
|
}
|
|
2959
|
-
function
|
|
2960
|
-
return
|
|
3119
|
+
function pl(e) {
|
|
3120
|
+
return Ut.find((t) => t.op === e);
|
|
2961
3121
|
}
|
|
2962
|
-
const
|
|
2963
|
-
function
|
|
3122
|
+
const ml = "documents.describe", hl = "documents.inspect", gl = "documents.apply";
|
|
3123
|
+
function yl(e) {
|
|
2964
3124
|
const t = e.indexOf(":");
|
|
2965
3125
|
if (t !== -1) return e.slice(0, t);
|
|
2966
3126
|
const n = e.indexOf(".");
|
|
2967
3127
|
return n === -1 ? e : e.slice(0, n);
|
|
2968
3128
|
}
|
|
2969
|
-
const
|
|
2970
|
-
function
|
|
3129
|
+
const bl = "installation-id";
|
|
3130
|
+
function Al(e) {
|
|
2971
3131
|
const t = [];
|
|
2972
3132
|
for (const n of Object.keys(e))
|
|
2973
3133
|
for (const r of Object.keys(e[n]))
|
|
2974
3134
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
2975
3135
|
return t;
|
|
2976
3136
|
}
|
|
2977
|
-
const
|
|
3137
|
+
const El = "notification-source", Sl = (e, t) => `${e}.pref.${t}`, _l = {
|
|
2978
3138
|
ai: [
|
|
2979
3139
|
"account.read",
|
|
2980
3140
|
"account.write",
|
|
@@ -3109,64 +3269,64 @@ const nl = "notification-source", rl = (e, t) => `${e}.pref.${t}`, ol = {
|
|
|
3109
3269
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
3110
3270
|
user: ["user.read", "user.write"],
|
|
3111
3271
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
3112
|
-
},
|
|
3113
|
-
function
|
|
3114
|
-
const r = n - e <
|
|
3272
|
+
}, Kt = 9e4, xo = ["out_of_office"], Ft = (e) => xo.includes(e);
|
|
3273
|
+
function Il(e, t, n) {
|
|
3274
|
+
const r = n - e < Kt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
3115
3275
|
if (!o?.status) return { online: r, status: r ? "available" : "offline" };
|
|
3116
3276
|
const i = o.status;
|
|
3117
|
-
return !r && !
|
|
3277
|
+
return !r && !Ft(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
|
|
3118
3278
|
}
|
|
3119
|
-
function
|
|
3120
|
-
const n = t - e.lastSeenAt <
|
|
3279
|
+
function Tl(e, t) {
|
|
3280
|
+
const n = t - e.lastSeenAt < Kt, r = n || Ft(e.status) ? e.status : "offline";
|
|
3121
3281
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
3122
3282
|
}
|
|
3123
|
-
function
|
|
3283
|
+
function wl(e, t) {
|
|
3124
3284
|
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 };
|
|
3125
3285
|
}
|
|
3126
|
-
function
|
|
3286
|
+
function Ml(e) {
|
|
3127
3287
|
return e.providerAvailable && e.allowed;
|
|
3128
3288
|
}
|
|
3129
|
-
const
|
|
3130
|
-
function
|
|
3289
|
+
const kl = "resources.describe", vl = "resources.search", Ol = "resources.resolve", Cl = "resources.attached";
|
|
3290
|
+
function Nl(e) {
|
|
3131
3291
|
const t = e.indexOf(":");
|
|
3132
3292
|
return t === -1 ? e : e.slice(0, t);
|
|
3133
3293
|
}
|
|
3134
|
-
const
|
|
3135
|
-
function
|
|
3294
|
+
const xl = "/provider/scope/related", Rl = "/provider/scope/read", Bt = "auth";
|
|
3295
|
+
function Ht(e) {
|
|
3136
3296
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
3137
3297
|
return t ? t[1] : null;
|
|
3138
3298
|
}
|
|
3139
|
-
function
|
|
3140
|
-
const t =
|
|
3141
|
-
return t ? t !==
|
|
3299
|
+
function Dl(e) {
|
|
3300
|
+
const t = Ht(e);
|
|
3301
|
+
return t ? t !== Bt : typeof e == "string" && e.startsWith("/wake");
|
|
3142
3302
|
}
|
|
3143
|
-
function
|
|
3144
|
-
return typeof e != "string" || e === "" || e === "/" ? !0 :
|
|
3303
|
+
function $l(e) {
|
|
3304
|
+
return typeof e != "string" || e === "" || e === "/" ? !0 : Ht(e) === Bt;
|
|
3145
3305
|
}
|
|
3146
|
-
function
|
|
3306
|
+
function Ro(e) {
|
|
3147
3307
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3148
3308
|
}
|
|
3149
|
-
function
|
|
3150
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
3309
|
+
function Do(e) {
|
|
3310
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Ro(r)}`).join("");
|
|
3151
3311
|
return new RegExp(`^${n}\\/?$`);
|
|
3152
3312
|
}
|
|
3153
|
-
function
|
|
3313
|
+
function $o(e, t) {
|
|
3154
3314
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
|
|
3155
|
-
return n.forEach((i,
|
|
3315
|
+
return n.forEach((i, s) => {
|
|
3156
3316
|
if (i.startsWith(":")) {
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3317
|
+
const a = i.endsWith("?") ? i.slice(1, -1) : i.slice(1), l = r[s];
|
|
3318
|
+
l && (o[a] = l);
|
|
3159
3319
|
}
|
|
3160
3320
|
}), o;
|
|
3161
3321
|
}
|
|
3162
|
-
function
|
|
3322
|
+
function Lo(e) {
|
|
3163
3323
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
3164
3324
|
}
|
|
3165
|
-
function
|
|
3325
|
+
function Ll(e) {
|
|
3166
3326
|
const t = [];
|
|
3167
3327
|
for (const n of e) {
|
|
3168
3328
|
if (!n?.name) continue;
|
|
3169
|
-
const r =
|
|
3329
|
+
const r = Lo(n);
|
|
3170
3330
|
for (const o of n.routes ?? []) {
|
|
3171
3331
|
if (!o.public) continue;
|
|
3172
3332
|
const i = o.path === "/" ? "" : o.path;
|
|
@@ -3180,25 +3340,25 @@ function bl(e) {
|
|
|
3180
3340
|
}
|
|
3181
3341
|
return t;
|
|
3182
3342
|
}
|
|
3183
|
-
function
|
|
3343
|
+
function Po(e, t) {
|
|
3184
3344
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
3185
3345
|
for (let o = 0; o < Math.min(n.length, r.length); o++) {
|
|
3186
|
-
const i = n[o].startsWith(":"),
|
|
3187
|
-
if (i !==
|
|
3346
|
+
const i = n[o].startsWith(":"), s = r[o].startsWith(":");
|
|
3347
|
+
if (i !== s) return s;
|
|
3188
3348
|
}
|
|
3189
3349
|
return n.length > r.length;
|
|
3190
3350
|
}
|
|
3191
|
-
function
|
|
3351
|
+
function Uo(e, t) {
|
|
3192
3352
|
if (typeof e != "string") return null;
|
|
3193
3353
|
let n = null;
|
|
3194
3354
|
for (const r of t)
|
|
3195
|
-
|
|
3196
|
-
return n ? { ...n, params: { ...n.props,
|
|
3355
|
+
Do(r.pattern).test(e) && (!n || Po(r.pattern, n.pattern)) && (n = r);
|
|
3356
|
+
return n ? { ...n, params: { ...n.props, ...$o(n.pattern, e) } } : null;
|
|
3197
3357
|
}
|
|
3198
|
-
function
|
|
3199
|
-
return
|
|
3358
|
+
function Pl(e, t) {
|
|
3359
|
+
return Uo(e, t) !== null;
|
|
3200
3360
|
}
|
|
3201
|
-
const
|
|
3361
|
+
const Ul = 10 * 1024 * 1024, Kl = 25 * 1024 * 1024, Fl = "sync-target", Bl = 20, Ko = {
|
|
3202
3362
|
afrikaans: [
|
|
3203
3363
|
"[Muziek]",
|
|
3204
3364
|
"(C) TV GELDERLAND 2021",
|
|
@@ -3348,14 +3508,14 @@ const El = 10 * 1024 * 1024, Sl = 25 * 1024 * 1024, _l = "sync-target", Tl = 20,
|
|
|
3348
3508
|
"[MÚSICA]",
|
|
3349
3509
|
"[Music cuts in British]"
|
|
3350
3510
|
]
|
|
3351
|
-
},
|
|
3511
|
+
}, Fo = (e) => {
|
|
3352
3512
|
let t = e;
|
|
3353
|
-
return Object.values(
|
|
3513
|
+
return Object.values(Ko).forEach((n) => {
|
|
3354
3514
|
n.forEach((r) => {
|
|
3355
3515
|
t = t.replaceAll(r, "");
|
|
3356
3516
|
});
|
|
3357
3517
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
3358
|
-
},
|
|
3518
|
+
}, Bo = 6e4, Ho = 8e3, jo = 2, Go = 0.4, Wo = 3, Vo = /* @__PURE__ */ new Set([
|
|
3359
3519
|
"aan",
|
|
3360
3520
|
"als",
|
|
3361
3521
|
"ben",
|
|
@@ -3468,13 +3628,13 @@ const El = 10 * 1024 * 1024, Sl = 25 * 1024 * 1024, _l = "sync-target", Tl = 20,
|
|
|
3468
3628
|
"you",
|
|
3469
3629
|
"your"
|
|
3470
3630
|
]);
|
|
3471
|
-
function
|
|
3631
|
+
function zo(e) {
|
|
3472
3632
|
const t = /* @__PURE__ */ new Set();
|
|
3473
3633
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
3474
|
-
n.length <
|
|
3634
|
+
n.length < Wo || Vo.has(n) || t.add(n);
|
|
3475
3635
|
return [...t];
|
|
3476
3636
|
}
|
|
3477
|
-
function
|
|
3637
|
+
function Yo(e, t) {
|
|
3478
3638
|
if (!e.length) return 0;
|
|
3479
3639
|
if (!t.length) return 1;
|
|
3480
3640
|
const n = new Set(t), r = new Set(e);
|
|
@@ -3482,38 +3642,38 @@ function xo(e, t) {
|
|
|
3482
3642
|
for (const i of r) n.has(i) || (o += 1);
|
|
3483
3643
|
return o / r.size;
|
|
3484
3644
|
}
|
|
3485
|
-
function
|
|
3486
|
-
const n = e.filter((
|
|
3645
|
+
function Xo(e, t = Bo) {
|
|
3646
|
+
const n = e.filter((s) => !s.partial && typeof s.text == "string");
|
|
3487
3647
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
3488
|
-
const o = n.reduce((
|
|
3489
|
-
return { text: n.filter((
|
|
3648
|
+
const o = n.reduce((s, a) => Math.max(s, a.endedAt ?? 0), 0) - t;
|
|
3649
|
+
return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Fo(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
3490
3650
|
}
|
|
3491
|
-
const
|
|
3492
|
-
function
|
|
3651
|
+
const qo = 60;
|
|
3652
|
+
function Hl(e, t, n = qo) {
|
|
3493
3653
|
const r = new Set(e), o = [...e];
|
|
3494
3654
|
for (const i of t)
|
|
3495
3655
|
!i || r.has(i) || (r.add(i), o.push(i));
|
|
3496
3656
|
return o.slice(-n);
|
|
3497
3657
|
}
|
|
3498
|
-
function
|
|
3658
|
+
function jl(e) {
|
|
3499
3659
|
const { segments: t, now: n, state: r } = e;
|
|
3500
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
3660
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Ho)
|
|
3501
3661
|
return { trigger: !1, reason: "too_soon" };
|
|
3502
|
-
const o =
|
|
3662
|
+
const o = Xo(t, e.windowMs);
|
|
3503
3663
|
if (!o.text) return { trigger: !1, reason: "no_speech" };
|
|
3504
3664
|
const i = o.segmentCount - (r.lastSegmentCount ?? 0);
|
|
3505
|
-
if (r.lastQueryTerms && i <
|
|
3665
|
+
if (r.lastQueryTerms && i < jo)
|
|
3506
3666
|
return { trigger: !1, reason: "too_few_new" };
|
|
3507
|
-
const
|
|
3508
|
-
return
|
|
3667
|
+
const s = zo(o.text);
|
|
3668
|
+
return s.length ? r.lastQueryTerms?.length && Yo(s, r.lastQueryTerms) < Go ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
3509
3669
|
}
|
|
3510
|
-
const
|
|
3670
|
+
const Gl = [
|
|
3511
3671
|
"personal",
|
|
3512
3672
|
"workspace",
|
|
3513
3673
|
"connections",
|
|
3514
3674
|
"work",
|
|
3515
3675
|
"ai"
|
|
3516
|
-
],
|
|
3676
|
+
], Wl = "navNotice", Me = {
|
|
3517
3677
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
3518
3678
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
3519
3679
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -3536,81 +3696,81 @@ const Ml = [
|
|
|
3536
3696
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
3537
3697
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
3538
3698
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
3539
|
-
},
|
|
3540
|
-
new Set(Object.values(
|
|
3699
|
+
}, Jo = "NL", Zo = 15, Qo = 8, ei = Array.from(
|
|
3700
|
+
new Set(Object.values(Me).map((e) => e.callingCode))
|
|
3541
3701
|
).sort((e, t) => t.length - e.length);
|
|
3542
|
-
function
|
|
3702
|
+
function nt(e) {
|
|
3543
3703
|
if (e)
|
|
3544
|
-
return
|
|
3704
|
+
return Me[e.trim().toUpperCase()];
|
|
3545
3705
|
}
|
|
3546
|
-
function
|
|
3706
|
+
function V(e, t) {
|
|
3547
3707
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
3548
3708
|
}
|
|
3549
|
-
function
|
|
3550
|
-
if (e.length >
|
|
3551
|
-
for (const t of
|
|
3709
|
+
function rt(e) {
|
|
3710
|
+
if (e.length > Zo) return null;
|
|
3711
|
+
for (const t of ei) {
|
|
3552
3712
|
if (!e.startsWith(t)) continue;
|
|
3553
3713
|
const n = e.slice(t.length);
|
|
3554
|
-
for (const r of Object.values(
|
|
3714
|
+
for (const r of Object.values(Me)) {
|
|
3555
3715
|
if (r.callingCode !== t) continue;
|
|
3556
3716
|
const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
|
|
3557
|
-
if (
|
|
3717
|
+
if (V(i, r)) return `+${t}${i}`;
|
|
3558
3718
|
}
|
|
3559
3719
|
return null;
|
|
3560
3720
|
}
|
|
3561
|
-
return e.length <
|
|
3721
|
+
return e.length < Qo ? null : `+${e}`;
|
|
3562
3722
|
}
|
|
3563
|
-
function
|
|
3723
|
+
function ti(e) {
|
|
3564
3724
|
let t = e.trim();
|
|
3565
3725
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
3566
3726
|
n && (t = t.slice(n[0].length));
|
|
3567
3727
|
const r = t.indexOf("@");
|
|
3568
3728
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
3569
3729
|
}
|
|
3570
|
-
function
|
|
3730
|
+
function Vl(e) {
|
|
3571
3731
|
if (!e) return !1;
|
|
3572
3732
|
const t = e.indexOf("@");
|
|
3573
3733
|
if (t <= 0) return !1;
|
|
3574
3734
|
const n = e.slice(0, t).trim();
|
|
3575
3735
|
return !/^[+\d\s().-]+$/.test(n);
|
|
3576
3736
|
}
|
|
3577
|
-
function
|
|
3737
|
+
function ot(e, t) {
|
|
3578
3738
|
if (!e) return null;
|
|
3579
|
-
const n =
|
|
3739
|
+
const n = ti(e);
|
|
3580
3740
|
if (!n) return null;
|
|
3581
3741
|
const r = n.startsWith("+"), o = n.replace(/\D/g, "");
|
|
3582
3742
|
if (!o) return null;
|
|
3583
|
-
if (r) return
|
|
3584
|
-
if (o.startsWith("00")) return
|
|
3585
|
-
const i =
|
|
3743
|
+
if (r) return rt(o);
|
|
3744
|
+
if (o.startsWith("00")) return rt(o.slice(2));
|
|
3745
|
+
const i = nt(t) ?? nt(Jo);
|
|
3586
3746
|
if (!i) return null;
|
|
3587
|
-
const
|
|
3588
|
-
if (
|
|
3589
|
-
const
|
|
3590
|
-
return
|
|
3747
|
+
const s = i.trunkPrefix;
|
|
3748
|
+
if (s && o.startsWith(s)) {
|
|
3749
|
+
const a = o.slice(s.length);
|
|
3750
|
+
return V(a, i) ? `+${i.callingCode}${a}` : null;
|
|
3591
3751
|
}
|
|
3592
3752
|
if (o.startsWith(i.callingCode)) {
|
|
3593
|
-
const
|
|
3594
|
-
if (
|
|
3753
|
+
const a = o.slice(i.callingCode.length);
|
|
3754
|
+
if (V(a, i)) return `+${i.callingCode}${a}`;
|
|
3595
3755
|
}
|
|
3596
|
-
return !
|
|
3756
|
+
return !s && V(o, i) ? `+${i.callingCode}${o}` : null;
|
|
3597
3757
|
}
|
|
3598
|
-
function
|
|
3758
|
+
function zl(e, t = 9) {
|
|
3599
3759
|
const n = (e ?? "").replace(/\D/g, "");
|
|
3600
3760
|
return n.length < t ? null : n.slice(-t);
|
|
3601
3761
|
}
|
|
3602
|
-
function
|
|
3762
|
+
function jt(e) {
|
|
3603
3763
|
if (!e) return null;
|
|
3604
3764
|
const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
|
|
3605
3765
|
if (n <= 0 || n === t.length - 1) return null;
|
|
3606
3766
|
const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
|
|
3607
3767
|
return !r || !o.includes(".") ? null : `${r}@${o}`;
|
|
3608
3768
|
}
|
|
3609
|
-
function
|
|
3610
|
-
const t =
|
|
3769
|
+
function Yl(e) {
|
|
3770
|
+
const t = jt(e);
|
|
3611
3771
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
3612
3772
|
}
|
|
3613
|
-
const
|
|
3773
|
+
const ni = /* @__PURE__ */ new Set([
|
|
3614
3774
|
"co.uk",
|
|
3615
3775
|
"org.uk",
|
|
3616
3776
|
"gov.uk",
|
|
@@ -3620,14 +3780,14 @@ const Ho = /* @__PURE__ */ new Set([
|
|
|
3620
3780
|
"com.br",
|
|
3621
3781
|
"co.za"
|
|
3622
3782
|
]);
|
|
3623
|
-
function
|
|
3783
|
+
function ri(e) {
|
|
3624
3784
|
if (!e) return null;
|
|
3625
3785
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
3626
3786
|
if (t.length < 2) return null;
|
|
3627
3787
|
const n = t.slice(-2).join(".");
|
|
3628
|
-
return
|
|
3788
|
+
return ni.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
3629
3789
|
}
|
|
3630
|
-
const
|
|
3790
|
+
const oi = /* @__PURE__ */ new Set([
|
|
3631
3791
|
"gmail.com",
|
|
3632
3792
|
"googlemail.com",
|
|
3633
3793
|
"outlook.com",
|
|
@@ -3672,34 +3832,34 @@ const jo = /* @__PURE__ */ new Set([
|
|
|
3672
3832
|
"proximus.be",
|
|
3673
3833
|
"scarlet.be"
|
|
3674
3834
|
]);
|
|
3675
|
-
function
|
|
3676
|
-
const t =
|
|
3677
|
-
return t ?
|
|
3835
|
+
function Xl(e) {
|
|
3836
|
+
const t = ri(e);
|
|
3837
|
+
return t ? oi.has(t) : !1;
|
|
3678
3838
|
}
|
|
3679
|
-
function
|
|
3839
|
+
function ql(e) {
|
|
3680
3840
|
if (!e) return !1;
|
|
3681
3841
|
const t = e.trim().toLowerCase();
|
|
3682
3842
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
3683
3843
|
}
|
|
3684
|
-
function
|
|
3844
|
+
function Jl(e, t, n) {
|
|
3685
3845
|
if (!e || !t) return null;
|
|
3686
3846
|
const r = e.trim().toLowerCase();
|
|
3687
3847
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
3688
|
-
const i =
|
|
3848
|
+
const i = ot(t, n);
|
|
3689
3849
|
return i ? `tel:${i}` : null;
|
|
3690
3850
|
}
|
|
3691
3851
|
if (r === "fax") {
|
|
3692
|
-
const i =
|
|
3852
|
+
const i = ot(t, n);
|
|
3693
3853
|
return i ? `fax:${i}` : null;
|
|
3694
3854
|
}
|
|
3695
3855
|
if (r === "mailto" || r === "email") {
|
|
3696
|
-
const i =
|
|
3856
|
+
const i = jt(t);
|
|
3697
3857
|
return i ? `mailto:${i}` : null;
|
|
3698
3858
|
}
|
|
3699
3859
|
const o = t.trim().toLowerCase();
|
|
3700
3860
|
return o ? `${r}:${o}` : null;
|
|
3701
3861
|
}
|
|
3702
|
-
const
|
|
3862
|
+
const ii = [
|
|
3703
3863
|
/<blockquote/i,
|
|
3704
3864
|
/class="?gmail_quote/i,
|
|
3705
3865
|
// Gmail quote container
|
|
@@ -3712,72 +3872,72 @@ const Go = [
|
|
|
3712
3872
|
// Outlook underscore separator before "From:"
|
|
3713
3873
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
3714
3874
|
// Gmail "On <date> <name> wrote:"
|
|
3715
|
-
],
|
|
3716
|
-
function
|
|
3875
|
+
], it = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, si = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
3876
|
+
function ai(e) {
|
|
3717
3877
|
const t = e.split(`
|
|
3718
3878
|
`);
|
|
3719
3879
|
for (let n = 0; n < t.length; n++)
|
|
3720
|
-
if (
|
|
3880
|
+
if (si.test(t[n]) || it.test(t[n]) && t.slice(n + 1, n + 4).some((r) => it.test(r)))
|
|
3721
3881
|
return t.slice(0, n).join(`
|
|
3722
3882
|
`).trim();
|
|
3723
3883
|
return e;
|
|
3724
3884
|
}
|
|
3725
|
-
const
|
|
3726
|
-
function
|
|
3885
|
+
const ci = /^(?:https?:|mailto:|tel:)/i, li = /^(?:https?:|cid:|data:image\/)/i;
|
|
3886
|
+
function se(e, t) {
|
|
3727
3887
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
3728
3888
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
3729
3889
|
}
|
|
3730
|
-
const
|
|
3731
|
-
function
|
|
3732
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
3890
|
+
const ui = /(!\[[^\]]*\]\([^)]*\))/;
|
|
3891
|
+
function st(e) {
|
|
3892
|
+
return e.replace(/\s+/g, " ").trim().split(ui).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
3733
3893
|
}
|
|
3734
|
-
function
|
|
3894
|
+
function ae(e) {
|
|
3735
3895
|
return e.replace(
|
|
3736
3896
|
/[()\s<>"]/g,
|
|
3737
3897
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
3738
3898
|
);
|
|
3739
3899
|
}
|
|
3740
|
-
function
|
|
3900
|
+
function di(e) {
|
|
3741
3901
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
3742
|
-
const o =
|
|
3743
|
-
return
|
|
3902
|
+
const o = se(r, "src");
|
|
3903
|
+
return li.test(o) ? `})` : "";
|
|
3744
3904
|
}).replace(
|
|
3745
3905
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
3746
3906
|
(n, r, o) => {
|
|
3747
|
-
const i =
|
|
3748
|
-
return
|
|
3907
|
+
const i = st(o.replace(/<[^>]*>/g, "")), s = se(r, "href");
|
|
3908
|
+
return ci.test(s) ? `[${i || ae(s)}](${ae(s)})` : i;
|
|
3749
3909
|
}
|
|
3750
3910
|
);
|
|
3751
3911
|
}
|
|
3752
|
-
const
|
|
3753
|
-
function
|
|
3912
|
+
const fi = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, pi = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, mi = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
3913
|
+
function hi(e, t) {
|
|
3754
3914
|
return /<table\b/i.test(e) || e.includes(`
|
|
3755
3915
|
|
|
3756
3916
|
|`) || t.includes("![") || t.length > 200;
|
|
3757
3917
|
}
|
|
3758
|
-
const
|
|
3759
|
-
function
|
|
3918
|
+
const gi = 40, yi = { left: "---", center: ":---:", right: "---:" };
|
|
3919
|
+
function bi(e) {
|
|
3760
3920
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
3761
3921
|
return t ? t[1].toLowerCase() : "left";
|
|
3762
3922
|
}
|
|
3763
|
-
function
|
|
3923
|
+
function Ai(e) {
|
|
3764
3924
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
3765
3925
|
}
|
|
3766
|
-
function
|
|
3926
|
+
function Ei(e) {
|
|
3767
3927
|
const t = [];
|
|
3768
|
-
for (const
|
|
3769
|
-
const
|
|
3770
|
-
for (const
|
|
3771
|
-
const
|
|
3772
|
-
if (
|
|
3773
|
-
|
|
3928
|
+
for (const s of e.matchAll(pi)) {
|
|
3929
|
+
const a = [];
|
|
3930
|
+
for (const l of s[1].matchAll(mi)) {
|
|
3931
|
+
const d = Ai(l[3]);
|
|
3932
|
+
if (hi(l[3], d)) return null;
|
|
3933
|
+
a.push({ text: d, align: bi(l[2]) });
|
|
3774
3934
|
}
|
|
3775
|
-
if (
|
|
3776
|
-
|
|
3935
|
+
if (a.length === 0) return null;
|
|
3936
|
+
a.some((l) => l.text !== "") && t.push(a);
|
|
3777
3937
|
}
|
|
3778
3938
|
const n = t[0]?.length ?? 0;
|
|
3779
|
-
if (t.length < 2 || n < 2 || t.some((
|
|
3780
|
-
const r = (
|
|
3939
|
+
if (t.length < 2 || n < 2 || t.some((s) => s.length !== n)) return null;
|
|
3940
|
+
const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => yi[s.align]).join(" | "), i = t.slice(1).map(r).join(`
|
|
3781
3941
|
`);
|
|
3782
3942
|
return `
|
|
3783
3943
|
|
|
@@ -3787,36 +3947,36 @@ ${i}
|
|
|
3787
3947
|
|
|
3788
3948
|
`;
|
|
3789
3949
|
}
|
|
3790
|
-
function
|
|
3950
|
+
function Si(e) {
|
|
3791
3951
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
3792
3952
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
3793
3953
|
}
|
|
3794
|
-
function
|
|
3954
|
+
function _i(e) {
|
|
3795
3955
|
let t = e;
|
|
3796
|
-
for (let n = 0; n <
|
|
3797
|
-
const r =
|
|
3956
|
+
for (let n = 0; n < gi; n++) {
|
|
3957
|
+
const r = fi.exec(t);
|
|
3798
3958
|
if (!r || r.index === void 0) break;
|
|
3799
|
-
const i =
|
|
3959
|
+
const i = Ei(r[1]) ?? `
|
|
3800
3960
|
|
|
3801
|
-
${
|
|
3961
|
+
${Si(r[1])}
|
|
3802
3962
|
|
|
3803
3963
|
`;
|
|
3804
3964
|
t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
|
|
3805
3965
|
}
|
|
3806
3966
|
return t;
|
|
3807
3967
|
}
|
|
3808
|
-
function
|
|
3968
|
+
function at(e, t) {
|
|
3809
3969
|
let n = e;
|
|
3810
3970
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
3811
|
-
`), t && (n =
|
|
3971
|
+
`), t && (n = _i(di(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
3812
3972
|
|
|
3813
3973
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
3814
3974
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
3815
3975
|
}
|
|
3816
|
-
function
|
|
3976
|
+
function ct(e) {
|
|
3817
3977
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
3818
3978
|
}
|
|
3819
|
-
const
|
|
3979
|
+
const Ii = {
|
|
3820
3980
|
euro: "€",
|
|
3821
3981
|
pound: "£",
|
|
3822
3982
|
yen: "¥",
|
|
@@ -3838,445 +3998,455 @@ const ci = {
|
|
|
3838
3998
|
rdquo: "”",
|
|
3839
3999
|
apos: "'"
|
|
3840
4000
|
};
|
|
3841
|
-
function
|
|
3842
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
4001
|
+
function lt(e) {
|
|
4002
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => Ii[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => ct(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ct(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
3843
4003
|
}
|
|
3844
|
-
function
|
|
4004
|
+
function ut(e) {
|
|
3845
4005
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
3846
4006
|
`).replace(/\n{3,}/g, `
|
|
3847
4007
|
|
|
3848
4008
|
`).trim();
|
|
3849
4009
|
}
|
|
3850
|
-
const
|
|
3851
|
-
function
|
|
3852
|
-
return
|
|
4010
|
+
const Ti = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
4011
|
+
function Zl(e) {
|
|
4012
|
+
return Ti.test(e);
|
|
3853
4013
|
}
|
|
3854
|
-
function
|
|
3855
|
-
return
|
|
4014
|
+
function Ql(e) {
|
|
4015
|
+
return Gt(e, !1);
|
|
3856
4016
|
}
|
|
3857
|
-
function
|
|
3858
|
-
return
|
|
4017
|
+
function eu(e) {
|
|
4018
|
+
return Gt(e, !0);
|
|
3859
4019
|
}
|
|
3860
|
-
function
|
|
4020
|
+
function Gt(e, t) {
|
|
3861
4021
|
if (typeof e != "string" || !e) return "";
|
|
3862
4022
|
let n = e.length;
|
|
3863
|
-
for (const
|
|
3864
|
-
const
|
|
3865
|
-
|
|
4023
|
+
for (const s of ii) {
|
|
4024
|
+
const a = e.search(s);
|
|
4025
|
+
a >= 0 && a < n && (n = a);
|
|
3866
4026
|
}
|
|
3867
4027
|
const r = e.slice(0, n);
|
|
3868
|
-
let o =
|
|
3869
|
-
return o || (o =
|
|
4028
|
+
let o = ut(lt(at(r, t)));
|
|
4029
|
+
return o || (o = ut(lt(at(e, t)))), ai(o) || o;
|
|
3870
4030
|
}
|
|
3871
4031
|
export {
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4032
|
+
ms as ACTIVE_ASSIGNMENT_STATUSES,
|
|
4033
|
+
x as ACTIVITY_CATALOG,
|
|
4034
|
+
Eo as AI_ATTACHMENT_LIMITS,
|
|
4035
|
+
Kc as AI_ATTACHMENT_MAX_PER_TURN,
|
|
4036
|
+
Uc as AI_ATTACHMENT_TURN_BUDGET,
|
|
4037
|
+
pt as AI_VENDORS,
|
|
4038
|
+
fn as ALLOWED_LINK_SCHEMES,
|
|
4039
|
+
_l as APP_PERMISSIONS,
|
|
4040
|
+
$e as ARTIFACT_MAX_BLOCKS,
|
|
4041
|
+
ss as ARTIFACT_MAX_BODY_BYTES,
|
|
4042
|
+
ne as ARTIFACT_MAX_CELL_LEN,
|
|
4043
|
+
Ke as ARTIFACT_MAX_KPI_ITEMS,
|
|
4044
|
+
Le as ARTIFACT_MAX_LIST_ITEMS,
|
|
4045
|
+
Ue as ARTIFACT_MAX_TABLE_COLUMNS,
|
|
4046
|
+
Pe as ARTIFACT_MAX_TABLE_ROWS,
|
|
4047
|
+
ht as ARTIFACT_MAX_TEXT_LEN,
|
|
4048
|
+
Sn as ASSIGNMENT_SCOPE_KIND,
|
|
4049
|
+
Gc as ASSIST_BANDS,
|
|
4050
|
+
jc as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
4051
|
+
Dn as ATTENTION_STATUSES,
|
|
4052
|
+
Zr as AT_RISK_GAP,
|
|
4053
|
+
Bt as AUTH_APP_NAME,
|
|
4054
|
+
Rr as AUTO_READY_MIN_PROPOSALS,
|
|
4055
|
+
Dr as AUTO_READY_RATE,
|
|
4056
|
+
tn as ActivityTypeRegistry,
|
|
4057
|
+
Hi as BUILT_IN_ONLY,
|
|
4058
|
+
$n as BULK_PENALTY,
|
|
4059
|
+
Ho as CADENCE_FLOOR_MS,
|
|
4060
|
+
jo as CADENCE_MIN_NEW_SEGMENTS,
|
|
4061
|
+
Go as CADENCE_MIN_NOVELTY,
|
|
4062
|
+
Bo as CADENCE_WINDOW_MS,
|
|
4063
|
+
Ia as CLASSIFY_VARS,
|
|
4064
|
+
ul as CONNECTOR_PROVIDER_GROUP,
|
|
4065
|
+
dl as CONTEXT_COLLECT_SERVICE,
|
|
4066
|
+
es as CORE_DIMENSIONS,
|
|
4067
|
+
Mo as CommunicationScheme,
|
|
4068
|
+
wn as DAY_MS,
|
|
4069
|
+
Xr as DEFAULT_CHECK_IN_DAYS,
|
|
4070
|
+
fr as DEFAULT_FORECAST_WEEKS,
|
|
4071
|
+
qs as DEFAULT_MEMORY_BUDGET,
|
|
4072
|
+
Jo as DEFAULT_PHONE_REGION,
|
|
4073
|
+
oa as DEMAND_SOURCE_PROVIDER_GROUP,
|
|
4074
|
+
gl as DOCUMENT_APPLY_SERVICE,
|
|
4075
|
+
ml as DOCUMENT_DESCRIBE_SERVICE,
|
|
4076
|
+
hl as DOCUMENT_INSPECT_SERVICE,
|
|
4077
|
+
Ut as DOCUMENT_OPERATIONS,
|
|
4078
|
+
wa as EMPTY_WORKFLOW,
|
|
4079
|
+
sl as FEATURE_FOLDER_MANAGEMENT,
|
|
4080
|
+
cl as FEATURE_MESSAGE_REACTIONS,
|
|
4081
|
+
al as FEATURE_REMOTE_SEARCH,
|
|
4082
|
+
Se as FIXED_KINDS,
|
|
4083
|
+
J as FIXED_LEVELS,
|
|
4084
|
+
Te as FIXED_TYPES,
|
|
4085
|
+
Pn as FOLLOW_UP_HOURS,
|
|
4086
|
+
Tn as HOUR_MS,
|
|
4087
|
+
Ti as HTML_BODY_RE,
|
|
4088
|
+
R as INELIGIBLE,
|
|
4089
|
+
bl as INSTALLATION_HEADER,
|
|
4090
|
+
vr as INTERACTION_KIND,
|
|
4091
|
+
ol as InteractionParticipantRole,
|
|
4092
|
+
Wn as KB_FALLBACK_LOCALE,
|
|
4093
|
+
je as KB_LOCALES,
|
|
4094
|
+
we as LOOSE_STATUSES,
|
|
4095
|
+
Cn as MAIL_HINT_HEADERS,
|
|
4096
|
+
vi as MAX_ACTIONS,
|
|
4097
|
+
_n as MAX_ASSIGNMENT_TURNS,
|
|
4098
|
+
wi as MAX_BLOCKS,
|
|
4099
|
+
It as MAX_COLLECTION_DEPTH,
|
|
4100
|
+
Ul as MAX_EDITABLE_FILE_BYTES,
|
|
4101
|
+
Mi as MAX_FIELDS,
|
|
4102
|
+
ki as MAX_LIST_ITEMS,
|
|
4103
|
+
Vs as MAX_MEMORY_BROWSE,
|
|
4104
|
+
Xs as MAX_MEMORY_BUDGET,
|
|
4105
|
+
zs as MAX_MEMORY_CHARS,
|
|
4106
|
+
qo as MAX_SHOWN_KEYS,
|
|
4107
|
+
ro as MAX_TOPIC_CANDIDATES,
|
|
4108
|
+
no as MAX_TOPIC_EXAMPLES,
|
|
4109
|
+
ie as MAX_TOPIC_EXAMPLE_CHARS,
|
|
4110
|
+
Kl as MAX_VIEWABLE_FILE_BYTES,
|
|
4111
|
+
Ys as MIN_MEMORY_BUDGET,
|
|
4112
|
+
Wl as NAV_NOTICE_SLOT,
|
|
4113
|
+
El as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
4114
|
+
Qr as OFF_TRACK_GAP,
|
|
4115
|
+
Zs as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
4116
|
+
he as PAUSE_SNOOZED,
|
|
4117
|
+
ge as PAUSE_WAITING_FOR_CUSTOMER,
|
|
4118
|
+
Me as PHONE_REGIONS,
|
|
4119
|
+
Kt as PRESENCE_ONLINE_WINDOW_MS,
|
|
4120
|
+
xo as PRESENCE_SURVIVES_OFFLINE,
|
|
4121
|
+
ea as PROFILE_TOOL_DISPOSITIONS,
|
|
4122
|
+
rl as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
4123
|
+
nl as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
4124
|
+
oi as PUBLIC_EMAIL_DOMAINS,
|
|
4125
|
+
Ge as READ_STEP_TYPES,
|
|
4126
|
+
Yn as RELATED_SUBJECT_KINDS,
|
|
4127
|
+
Pt as RESERVED_STATUS_KEYS,
|
|
4128
|
+
Ac as RESERVED_TYPE_KEYS,
|
|
4129
|
+
Cl as RESOURCE_ATTACHED_SERVICE,
|
|
4130
|
+
kl as RESOURCE_DESCRIBE_SERVICE,
|
|
4131
|
+
Ol as RESOURCE_RESOLVE_SERVICE,
|
|
4132
|
+
vl as RESOURCE_SEARCH_SERVICE,
|
|
4133
|
+
br as SCHEDULE_ENTRY_SCOPE_KIND,
|
|
4134
|
+
Rl as SCOPE_READ_ROUTE,
|
|
4135
|
+
xl as SCOPE_RELATED_ROUTE,
|
|
4136
|
+
Gl as SETTINGS_CATEGORIES,
|
|
4137
|
+
Ss as SIGNATURE_INTENTS,
|
|
4138
|
+
Ln as SLA_HOURS_BY_PRIORITY,
|
|
4139
|
+
Pa as SLA_METRICS,
|
|
4140
|
+
Ua as SLA_PAUSE_REASONS,
|
|
4141
|
+
Nr as STEP_MAX_TOKENS_MAX,
|
|
4142
|
+
Cr as STEP_MAX_TOKENS_MIN,
|
|
4143
|
+
zr as STRATEGY_ITEM_SCOPE_KIND,
|
|
4144
|
+
On as SUMMARY_MIN_LAST_CHARS,
|
|
4145
|
+
vn as SUMMARY_MIN_MESSAGES,
|
|
4146
|
+
Bl as SYNC_RUN_MAX_ERRORS,
|
|
4147
|
+
Fl as SYNC_TARGET_PROVIDER_GROUP,
|
|
4148
|
+
En as TERMINAL_ASSIGNMENT_STATUSES,
|
|
4149
|
+
$r as TERMINAL_RUN_STATUSES,
|
|
4150
|
+
_a as TRIGGER_VARS,
|
|
4151
|
+
Xn as UNKNOWN_KIND,
|
|
4152
|
+
Yr as UNKNOWN_LEVEL_ORDER,
|
|
4153
|
+
ll as UNSUPPORTED,
|
|
4154
|
+
cn as USAGE_DIMENSIONS,
|
|
4155
|
+
ln as USAGE_DIMENSION_IDS,
|
|
4156
|
+
Ar as WORKSTREAM_SCOPE_KIND,
|
|
4157
|
+
uo as WORK_ACTIVITY_SCOPE_KIND,
|
|
4158
|
+
Qs as WORK_AREAS,
|
|
4159
|
+
hc as WORK_COMMENT_ADDED,
|
|
4160
|
+
Tc as WORK_CYCLE_SYNC_KIND,
|
|
4161
|
+
gc as WORK_ITEM_ASSIGNED,
|
|
4162
|
+
co as WORK_ITEM_SCOPE_KIND,
|
|
4163
|
+
yc as WORK_ITEM_STATUS_CHANGED,
|
|
4164
|
+
lo as WORK_PROJECT_SCOPE_KIND,
|
|
4165
|
+
z as W_PRIORITY,
|
|
4166
|
+
fc as acceptExampleCandidate,
|
|
4167
|
+
Ir as actingIdentityKey,
|
|
4168
|
+
uc as activeWorkTypes,
|
|
4169
|
+
Ci as activityIconOf,
|
|
4170
|
+
Fi as activityJoinUrl,
|
|
4171
|
+
Jt as activitySnippet,
|
|
4172
|
+
Zt as activityTextParams,
|
|
4173
|
+
Ki as activityTimelineText,
|
|
4174
|
+
nn as activityTimestamp,
|
|
4175
|
+
T as activityTypeInfo,
|
|
4176
|
+
ga as actorKey,
|
|
4177
|
+
dc as addExampleCandidate,
|
|
4178
|
+
_e as addWorkingMs,
|
|
4179
|
+
Tl as agePresenceEntry,
|
|
4180
|
+
Ao as aiAttachmentKind,
|
|
4181
|
+
Fc as aiAttachmentRejection,
|
|
4182
|
+
De as aiBudgetLimit,
|
|
4183
|
+
Zi as aiBudgetPeriodKey,
|
|
4184
|
+
rn as aiBudgetPeriodStart,
|
|
4185
|
+
Ji as aiBudgetState,
|
|
4186
|
+
qi as aiVendorAcceptsAttachment,
|
|
4187
|
+
zi as aiVendorDefaultModel,
|
|
4188
|
+
Vi as aiVendorLabel,
|
|
4189
|
+
Xi as aiVendorNeedsBaseUrl,
|
|
4190
|
+
Yi as aiVendorsWith,
|
|
4191
|
+
Ht as appNameFromPath,
|
|
4192
|
+
ic as applyRounding,
|
|
4193
|
+
_s as applySignature,
|
|
4194
|
+
xr as approvalRate,
|
|
4195
|
+
cs as artifactBodyBytes,
|
|
4196
|
+
ls as artifactOutline,
|
|
4197
|
+
us as artifactToMarkdown,
|
|
4198
|
+
Ea as assignmentMismatch,
|
|
4199
|
+
gs as assignmentScopeKey,
|
|
4200
|
+
As as assignmentSubject,
|
|
4201
|
+
ta as belongsOnCalendar,
|
|
4202
|
+
Bi as buildActivityPreview,
|
|
4203
|
+
Jc as buildChannelIntents,
|
|
4204
|
+
ds as buildShareKeys,
|
|
4205
|
+
Xo as buildWindow,
|
|
4206
|
+
Zn as calendarDaysBetween,
|
|
4207
|
+
Ie as calendarOf,
|
|
4208
|
+
Fs as canNestUnder,
|
|
4209
|
+
Va as canParent,
|
|
4210
|
+
na as capacityTotal,
|
|
4211
|
+
fa as capacityWeights,
|
|
4212
|
+
$i as carriesText,
|
|
4213
|
+
Hs as categoryLabel,
|
|
4214
|
+
mo as categoryOf,
|
|
4215
|
+
tl as channelKindForScheme,
|
|
4216
|
+
Ni as channelKindOf,
|
|
4217
|
+
nc as checkInOverdueMs,
|
|
4218
|
+
Ta as clampStepMaxTokens,
|
|
4219
|
+
vs as classifyMail,
|
|
4220
|
+
eu as cleanMessageMarkdown,
|
|
4221
|
+
Ql as cleanMessageText,
|
|
4222
|
+
Vc as compareAssistRank,
|
|
4223
|
+
to as compareWorkTypes,
|
|
4224
|
+
Y as countsAsPlanned,
|
|
4225
|
+
ra as coverageByPerson,
|
|
4226
|
+
sa as coverageFor,
|
|
4227
|
+
qn as coversWorkstream,
|
|
4228
|
+
wt as cycleDayIndex,
|
|
4229
|
+
Lc as cycleOrder,
|
|
4230
|
+
Pc as cycleState,
|
|
4231
|
+
Es as decideAssignmentState,
|
|
4232
|
+
jl as decideCadence,
|
|
4233
|
+
Xc as decideIncomingCall,
|
|
4234
|
+
Vn as defaultLocaleOf,
|
|
4235
|
+
xc as defaultStatusKey,
|
|
4236
|
+
il as defineIntent,
|
|
4237
|
+
jn as depthOf,
|
|
4238
|
+
Il as derivePresence,
|
|
4239
|
+
rs as describeClause,
|
|
4240
|
+
qc as disabledIntentsFromCapabilities,
|
|
4241
|
+
yl as documentKindOf,
|
|
4242
|
+
Fa as dueAtOf,
|
|
4243
|
+
oc as elapsedSeconds,
|
|
4244
|
+
Yl as emailDomain,
|
|
4245
|
+
Jl as endpointKey,
|
|
4246
|
+
nr as erlangC,
|
|
4247
|
+
$o as extractParams,
|
|
4248
|
+
zo as extractTerms,
|
|
4249
|
+
Qc as filterByEndpoint,
|
|
4250
|
+
Zc as filterByIntent,
|
|
4251
|
+
wo as filterByTargetScheme,
|
|
4252
|
+
ns as filterableDimensions,
|
|
4253
|
+
q as findAiVendor,
|
|
4254
|
+
Ya as fixedLevelForName,
|
|
4255
|
+
_c as fixedTypeForName,
|
|
4256
|
+
Ic as fixedTypes,
|
|
4257
|
+
Al as flattenLocales,
|
|
4258
|
+
F as floorToPeriod,
|
|
4259
|
+
la as forecastIntervals,
|
|
4260
|
+
_r as formatActingIdentity,
|
|
4261
|
+
ac as formatClock,
|
|
4262
|
+
sc as formatHm,
|
|
4263
|
+
Mc as formatItemKey,
|
|
4264
|
+
K as formatPeriod,
|
|
4265
|
+
ja as formatSlaDuration,
|
|
4266
|
+
Hc as freshSources,
|
|
4267
|
+
ji as getActivitySeenUserIds,
|
|
4268
|
+
Is as getContactEndpoints,
|
|
4269
|
+
$s as getShortTitle,
|
|
4270
|
+
Ds as getUrgencyScore,
|
|
4271
|
+
Da as hasReacted,
|
|
4272
|
+
Xa as healthCategory,
|
|
4273
|
+
qa as healthsInCategory,
|
|
4274
|
+
Tt as heightOf,
|
|
4275
|
+
Ps as helpCenterText,
|
|
4276
|
+
Sa as humanizeAction,
|
|
4277
|
+
Or as interactionIdOf,
|
|
4278
|
+
mc as isAgentUser,
|
|
4279
|
+
xs as isAssigned,
|
|
4280
|
+
hs as isAssignmentTerminal,
|
|
4281
|
+
Mr as isAssignmentTrigger,
|
|
4282
|
+
va as isAutoReady,
|
|
4283
|
+
Hn as isAwaitingThem,
|
|
4284
|
+
Wi as isChatMessageActivity,
|
|
4285
|
+
Rs as isClosed,
|
|
4286
|
+
Pi as isConnectedType,
|
|
4287
|
+
Dl as isDeepLink,
|
|
4288
|
+
Gn as isDescendant,
|
|
4289
|
+
Ts as isEligible,
|
|
4290
|
+
Gi as isEmailActivity,
|
|
4291
|
+
Zl as isHtmlBody,
|
|
4292
|
+
Ca as isInFlight,
|
|
4293
|
+
Rn as isInteractionUnseen,
|
|
4294
|
+
$l as isLandingPath,
|
|
4295
|
+
kn as isLikelyBulk,
|
|
4296
|
+
dt as isMessageShape,
|
|
4297
|
+
xi as isMessageType,
|
|
4298
|
+
Po as isMoreSpecificPattern,
|
|
4299
|
+
ft as isNoteShape,
|
|
4300
|
+
Vr as isOpenClock,
|
|
4301
|
+
Bc as isOutwardTool,
|
|
4302
|
+
Kn as isParked,
|
|
4303
|
+
Lr as isPaused,
|
|
4304
|
+
Li as isPlaybookAuthoredType,
|
|
4305
|
+
Xl as isPublicEmailDomain,
|
|
4306
|
+
Pl as isPublicPath,
|
|
4307
|
+
Fn as isReminderActive,
|
|
4308
|
+
Di as isReplyableType,
|
|
4309
|
+
Cs as isSlaAtRisk,
|
|
4310
|
+
Oa as isTerminal,
|
|
4311
|
+
Ms as isThreadLongEnough,
|
|
4312
|
+
Ui as isTranscriptType,
|
|
4313
|
+
Rc as isWorkClosed,
|
|
4314
|
+
lc as isWorkTypeVisible,
|
|
4315
|
+
Oc as itemDossierKeys,
|
|
4316
|
+
$ as kindFor,
|
|
4317
|
+
po as ladderFor,
|
|
4318
|
+
qr as levelIn,
|
|
4319
|
+
be as levelOrder,
|
|
4320
|
+
Ls as linkLabel,
|
|
4321
|
+
Qi as listeningAllowed,
|
|
4322
|
+
Ks as localeInstruction,
|
|
4323
|
+
Us as localeName,
|
|
4324
|
+
Bs as localesOf,
|
|
4325
|
+
Vl as looksLikeEmail,
|
|
4326
|
+
el as matchContactToIntents,
|
|
4327
|
+
Uo as matchPublicRoute,
|
|
4328
|
+
Gs as mcpCredentialScope,
|
|
4329
|
+
Ws as mcpToolPrefix,
|
|
4330
|
+
Ja as measureRatio,
|
|
4331
|
+
Hl as mergeShownKeys,
|
|
4332
|
+
qt as messageCountsAs,
|
|
4333
|
+
os as metricOption,
|
|
4334
|
+
Mt as minutesOn,
|
|
4335
|
+
ql as needsPhoneRegion,
|
|
4336
|
+
Ri as nestsUnderParent,
|
|
4337
|
+
za as nextLevelBelow,
|
|
4338
|
+
Ba as nextSlaClock,
|
|
4339
|
+
as as normalizeArtifactBlocks,
|
|
4340
|
+
Oi as normalizeBlocks,
|
|
4341
|
+
jt as normalizeEmail,
|
|
4342
|
+
D as normalizeExample,
|
|
4343
|
+
Sl as notificationPrefKey,
|
|
4344
|
+
Yo as novelty,
|
|
4345
|
+
pl as operationDescriptor,
|
|
4346
|
+
fl as operationsForKind,
|
|
4347
|
+
re as overlapSeconds,
|
|
4348
|
+
ia as overlaps,
|
|
4349
|
+
Za as paceRatio,
|
|
4350
|
+
ws as parkMarksById,
|
|
4351
|
+
ma as parseActingIdentity,
|
|
4352
|
+
$a as parseClockMinutes,
|
|
4353
|
+
kc as parseItemKey,
|
|
4354
|
+
Do as pathToRegex,
|
|
4355
|
+
vt as patternFor,
|
|
4356
|
+
kt as patternStartTime,
|
|
4357
|
+
La as pauseBitFor,
|
|
4358
|
+
ts as periodsInRange,
|
|
4359
|
+
zl as phoneSuffix,
|
|
4360
|
+
ks as pickMailHeaders,
|
|
4361
|
+
pa as placeLumps,
|
|
4362
|
+
Yt as plainTextFromMarkdown,
|
|
4363
|
+
Ka as planSlaEvent,
|
|
4364
|
+
aa as plannedBillable,
|
|
4365
|
+
ur as plannedWorkTypeKey,
|
|
4366
|
+
wr as playbookActor,
|
|
4367
|
+
ka as procedureOf,
|
|
4368
|
+
Cc as projectDossierKeys,
|
|
4369
|
+
Lo as publicBasePathFor,
|
|
4370
|
+
Ll as publicRoutePatterns,
|
|
4371
|
+
bs as reactionWakesAssignment,
|
|
4372
|
+
ce as readPath,
|
|
4373
|
+
We as readStepError,
|
|
4374
|
+
Un as recencyOf,
|
|
4375
|
+
kr as refKey,
|
|
4376
|
+
ri as registrableDomain,
|
|
4377
|
+
io as rejectExampleCandidate,
|
|
4378
|
+
Js as relatedByDefault,
|
|
4379
|
+
ye as remainingMsOf,
|
|
4380
|
+
ir as requiredAgents,
|
|
4381
|
+
lr as requirementFor,
|
|
4382
|
+
Io as resolveAccountCapabilities,
|
|
4383
|
+
le as resolveActivityText,
|
|
4384
|
+
_o as resolveChannelIntents,
|
|
4385
|
+
In as resolveSignature,
|
|
4386
|
+
wl as resolveWorkMode,
|
|
4387
|
+
Nl as resourceKindOf,
|
|
4388
|
+
tc as rollupChildren,
|
|
4389
|
+
ha as runActor,
|
|
4390
|
+
xa as runInteractionId,
|
|
4391
|
+
gn as sanitizeInline,
|
|
4392
|
+
Fo as sanitizeTranscript,
|
|
4393
|
+
ua as scheduleEntryScopeKey,
|
|
4394
|
+
Ns as scoreInteraction,
|
|
4395
|
+
bc as scoreWorkItem,
|
|
4396
|
+
js as selectLenses,
|
|
4397
|
+
rr as serviceLevel,
|
|
4398
|
+
Yc as sessionsHoldCannotReach,
|
|
4399
|
+
zc as sessionsToHold,
|
|
4400
|
+
bt as shareKeyForTeam,
|
|
4401
|
+
yt as shareKeyForUser,
|
|
4402
|
+
fs as shareKeysForViewer,
|
|
4403
|
+
ca as shortfalls,
|
|
4404
|
+
Ml as shouldRunAudioPipeline,
|
|
4405
|
+
Ha as slaBadgeTone,
|
|
4406
|
+
Os as slaHoursByInbox,
|
|
4407
|
+
Bn as slaHoursFor,
|
|
4408
|
+
ho as sortStatuses,
|
|
4409
|
+
So as sourceKey,
|
|
4410
|
+
Sr as spreadOverWeights,
|
|
4411
|
+
Nc as statusIn,
|
|
4412
|
+
Ma as stepsOf,
|
|
4413
|
+
Wa as strategyAncestorKeysFor,
|
|
4414
|
+
Ga as strategyDossierKeys,
|
|
4415
|
+
$t as strategyItemScopeKey,
|
|
4416
|
+
Xt as stripHtml,
|
|
4417
|
+
Na as subjectKeyOf,
|
|
4418
|
+
Ot as subjectOf,
|
|
4419
|
+
Wc as subjectRef,
|
|
4420
|
+
vc as suggestProjectKey,
|
|
4421
|
+
Qa as suggestedHealth,
|
|
4422
|
+
Ra as summarizeReactions,
|
|
4423
|
+
Aa as targetById,
|
|
4424
|
+
ba as targetForActivityType,
|
|
4425
|
+
rc as targetOrder,
|
|
4426
|
+
Qn as termsFor,
|
|
4427
|
+
Tr as toActingIdentity,
|
|
4428
|
+
ot as toE164,
|
|
4429
|
+
ps as toolSourceKinds,
|
|
4430
|
+
so as topicOfferedForTeam,
|
|
4431
|
+
pc as topicsForTeam,
|
|
4432
|
+
or as trafficIntensity,
|
|
4433
|
+
oo as truncateExample,
|
|
4434
|
+
Sc as typeIn,
|
|
4435
|
+
Ec as typesFor,
|
|
4436
|
+
Dc as uniqueWorkStatusKey,
|
|
4437
|
+
cc as uniqueWorkTypeKey,
|
|
4438
|
+
un as usageMetricId,
|
|
4439
|
+
is as usageMetrics,
|
|
4440
|
+
$c as validateStatuses,
|
|
4441
|
+
ya as valueAtPath,
|
|
4442
|
+
Ee as waitHoursOf,
|
|
4443
|
+
ys as wakesAssignment,
|
|
4444
|
+
wc as workActivityScopeKey,
|
|
4445
|
+
fo as workItemScopeKey,
|
|
4446
|
+
Lt as workProjectScopeKey,
|
|
4447
|
+
ec as workRatio,
|
|
4448
|
+
go as workStatusKey,
|
|
4449
|
+
eo as workTypeKey,
|
|
4450
|
+
me as workingMsBetween,
|
|
4451
|
+
da as workstreamScopeKey
|
|
4282
4452
|
};
|