@opencxh/domain 1.172.1 → 1.172.2

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.
Files changed (82) hide show
  1. package/dist/entities/activity/blocks.d.ts +30 -30
  2. package/dist/entities/activity/catalog.d.ts +63 -86
  3. package/dist/entities/activity/descriptor.d.ts +31 -32
  4. package/dist/entities/activity/index.d.ts +2 -2
  5. package/dist/entities/activity/preview.d.ts +7 -7
  6. package/dist/entities/activity/resolve.d.ts +37 -38
  7. package/dist/entities/activity/types.d.ts +34 -34
  8. package/dist/entities/ai-account/types.d.ts +3 -3
  9. package/dist/entities/ai-account/vendors.d.ts +25 -32
  10. package/dist/entities/ai-budget/types.d.ts +5 -5
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +14 -21
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/index.d.ts +4 -4
  15. package/dist/entities/analytics/source.d.ts +1 -1
  16. package/dist/entities/analytics/usage.d.ts +23 -28
  17. package/dist/entities/artifact/blocks.d.ts +54 -69
  18. package/dist/entities/artifact/markdown.d.ts +2 -3
  19. package/dist/entities/artifact/types.d.ts +46 -54
  20. package/dist/entities/assignment/types.d.ts +74 -88
  21. package/dist/entities/channel/index.d.ts +1 -1
  22. package/dist/entities/channel/signature.d.ts +8 -9
  23. package/dist/entities/communication/index.d.ts +1 -1
  24. package/dist/entities/contact/index.d.ts +1 -1
  25. package/dist/entities/custom-field-def/types.d.ts +14 -14
  26. package/dist/entities/external-identity/types.d.ts +45 -50
  27. package/dist/entities/interaction/index.d.ts +1 -1
  28. package/dist/entities/interaction/types.d.ts +44 -47
  29. package/dist/entities/live-lens/types.d.ts +39 -44
  30. package/dist/entities/mcp/types.d.ts +53 -57
  31. package/dist/entities/memory/alias.d.ts +7 -7
  32. package/dist/entities/memory/browse.d.ts +21 -21
  33. package/dist/entities/memory/ingest.d.ts +24 -28
  34. package/dist/entities/memory/item.d.ts +53 -58
  35. package/dist/entities/memory/kind.d.ts +25 -25
  36. package/dist/entities/memory/query.d.ts +49 -51
  37. package/dist/entities/playbook/actor.d.ts +17 -17
  38. package/dist/entities/playbook/assignment.d.ts +54 -63
  39. package/dist/entities/playbook/index.d.ts +2 -2
  40. package/dist/entities/playbook/labels.d.ts +4 -4
  41. package/dist/entities/playbook/trigger-vars.d.ts +14 -15
  42. package/dist/entities/playbook/types.d.ts +172 -302
  43. package/dist/entities/resource-reminder/types.d.ts +8 -9
  44. package/dist/entities/time-entry/duration.d.ts +11 -11
  45. package/dist/entities/time-entry/types.d.ts +59 -59
  46. package/dist/entities/time-entry/work-type.d.ts +21 -24
  47. package/dist/entities/topic/examples.d.ts +26 -27
  48. package/dist/entities/topic/scope.d.ts +11 -12
  49. package/dist/entities/topic/types.d.ts +26 -28
  50. package/dist/entities/user/types.d.ts +24 -28
  51. package/dist/entities/webhook/types.d.ts +6 -6
  52. package/dist/entities/work/keys.d.ts +25 -26
  53. package/dist/entities/work/ladder.d.ts +48 -52
  54. package/dist/entities/work/types.d.ts +108 -114
  55. package/dist/index.cjs +6 -6
  56. package/dist/index.d.ts +29 -28
  57. package/dist/index.js +1377 -1242
  58. package/dist/platform/account.d.ts +34 -38
  59. package/dist/platform/ai-tools.d.ts +48 -52
  60. package/dist/platform/api.d.ts +9 -10
  61. package/dist/platform/author.d.ts +7 -9
  62. package/dist/platform/capabilities.d.ts +3 -3
  63. package/dist/platform/communication.d.ts +163 -204
  64. package/dist/platform/context.d.ts +8 -8
  65. package/dist/platform/identity.d.ts +16 -19
  66. package/dist/platform/kernel.d.ts +1 -1
  67. package/dist/platform/manifest.d.ts +2 -2
  68. package/dist/platform/media.d.ts +13 -15
  69. package/dist/platform/permission.d.ts +39 -0
  70. package/dist/platform/permission.test.d.ts +1 -0
  71. package/dist/platform/presence.d.ts +30 -30
  72. package/dist/platform/provider.d.ts +14 -15
  73. package/dist/platform/resource-source.d.ts +43 -45
  74. package/dist/platform/resource.d.ts +17 -23
  75. package/dist/platform/scope.d.ts +35 -61
  76. package/dist/platform/services.d.ts +4 -4
  77. package/dist/platform/storage.d.ts +1 -1
  78. package/dist/platform/sync-source.d.ts +196 -216
  79. package/dist/platform/transcript-cadence.d.ts +37 -41
  80. package/dist/platform/ui.d.ts +6 -6
  81. package/dist/text/endpoint.d.ts +11 -27
  82. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,10 +1,4 @@
1
- function wn(e) {
2
- return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
3
- }
4
- function Nn(e) {
5
- return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
- }
7
- const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
1
+ const In = 10, wn = 10, Mn = 10, kn = 5, Ie = /* @__PURE__ */ new Set([
8
2
  "header",
9
3
  "section",
10
4
  "context",
@@ -14,36 +8,36 @@ const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
14
8
  "actions",
15
9
  "attachments"
16
10
  ]);
17
- function C(e) {
11
+ function T(e) {
18
12
  if (typeof e == "string") return e.length > 0;
19
13
  if (!e || typeof e != "object") return !1;
20
14
  const t = e;
21
15
  return typeof t.key == "string" || typeof t.value == "string";
22
16
  }
23
- function vn(e, t = () => {
17
+ function Cn(e, t = () => {
24
18
  }) {
25
19
  if (!Array.isArray(e)) return [];
26
20
  const n = [];
27
21
  for (const r of e) {
28
- if (n.length >= L) {
29
- t("more than " + L + " blocks; the rest was dropped");
22
+ if (n.length >= 10) {
23
+ t("more than 10 blocks; the rest was dropped");
30
24
  break;
31
25
  }
32
26
  if (!r || typeof r != "object") continue;
33
27
  const i = r;
34
- if (!we.has(i.type)) {
28
+ if (!Ie.has(i.type)) {
35
29
  t("unknown block type " + String(i.type));
36
30
  continue;
37
31
  }
38
32
  switch (i.type) {
39
33
  case "header":
40
- if (!C(i.text)) {
34
+ if (!T(i.text)) {
41
35
  t("a header without text");
42
36
  continue;
43
37
  }
44
38
  break;
45
39
  case "context":
46
- if (!C(i.text)) {
40
+ if (!T(i.text)) {
47
41
  t("a context block without text");
48
42
  continue;
49
43
  }
@@ -55,19 +49,19 @@ function vn(e, t = () => {
55
49
  }
56
50
  break;
57
51
  case "section":
58
- Array.isArray(i.fields) && i.fields.length > T && (t("more than " + T + " fields in a section"), i.fields = i.fields.slice(0, T));
52
+ Array.isArray(i.fields) && i.fields.length > 10 && (t("more than 10 fields in a section"), i.fields = i.fields.slice(0, 10));
59
53
  break;
60
54
  case "list":
61
55
  if (!Array.isArray(i.items) || i.items.length === 0) {
62
56
  t("a list without items");
63
57
  continue;
64
58
  }
65
- i.items.length > I && (t("more than " + I + " list items"), i.items = i.items.slice(0, I));
59
+ i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
66
60
  break;
67
61
  case "actions": {
68
- const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && C(s.text));
62
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && T(s.text));
69
63
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
70
- o.length > M && t("more than " + M + " actions"), i.elements = o.slice(0, M);
64
+ o.length > 5 && t("more than 5 actions"), i.elements = o.slice(0, 5);
71
65
  break;
72
66
  }
73
67
  }
@@ -75,7 +69,7 @@ function vn(e, t = () => {
75
69
  }
76
70
  return n;
77
71
  }
78
- function Ne(e) {
72
+ function we(e) {
79
73
  return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim();
80
74
  }
81
75
  function A(e) {
@@ -83,16 +77,16 @@ function A(e) {
83
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
84
78
  return `${t}:${n.toString().padStart(2, "0")}`;
85
79
  }
86
- function D(e) {
80
+ function O(e) {
87
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
82
  }
89
- function k(e) {
83
+ function I(e) {
90
84
  return e?.split("@")?.[0] || e || "";
91
85
  }
92
86
  function b(e) {
93
87
  return e.map((t) => t.name).join(", ");
94
88
  }
95
- function P(e) {
89
+ function $(e) {
96
90
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
97
91
  }
98
92
  const m = {
@@ -102,7 +96,7 @@ const m = {
102
96
  channelKind: "voice",
103
97
  icon: "phone",
104
98
  snippet: () => "Gesprek gestart",
105
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${k(e.payload.from)}` : `Outbound call started — ${k(e.payload.to)}`
99
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
106
100
  },
107
101
  VOICE_CALL_ANSWERED: {
108
102
  shape: "event",
@@ -130,14 +124,14 @@ const m = {
130
124
  channelKind: "voice",
131
125
  icon: "phone",
132
126
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
133
- timeline: (e) => `Call ended${D(e.payload.duration)}`
127
+ timeline: (e) => `Call ended${O(e.payload.duration)}`
134
128
  },
135
129
  VOICE_CALL_MISSED: {
136
130
  shape: "event",
137
131
  channelKind: "voice",
138
132
  icon: "phone",
139
133
  snippet: () => "Gemiste oproep",
140
- timeline: (e) => `Missed call — ${k(e.payload.from)}`
134
+ timeline: (e) => `Missed call — ${I(e.payload.from)}`
141
135
  },
142
136
  VOICE_CALL_FAILED: {
143
137
  shape: "event",
@@ -212,7 +206,7 @@ const m = {
212
206
  replyable: !0,
213
207
  carriesText: !0,
214
208
  countsAs: "inbound_message",
215
- snippet: K
209
+ snippet: R
216
210
  },
217
211
  EMAIL_SENT: {
218
212
  shape: "message",
@@ -222,7 +216,7 @@ const m = {
222
216
  replyable: !0,
223
217
  carriesText: !0,
224
218
  countsAs: "outbound_message",
225
- snippet: K
219
+ snippet: R
226
220
  },
227
221
  /* ---- chat ---- */
228
222
  CHAT_MESSAGE_SENT: {
@@ -279,7 +273,7 @@ const m = {
279
273
  channelKind: "chat",
280
274
  icon: "message-circle",
281
275
  snippet: () => "Gesprek gestart",
282
- timeline: (e) => `${P(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
276
+ timeline: (e) => `${$(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
283
277
  joinUrl: (e) => e.payload.joinUrl
284
278
  },
285
279
  CHAT_CALL_ENDED: {
@@ -287,7 +281,7 @@ const m = {
287
281
  channelKind: "chat",
288
282
  icon: "message-circle",
289
283
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
290
- timeline: (e) => `${P(e.payload.callType)} ended${D(e.payload.duration)}`,
284
+ timeline: (e) => `${$(e.payload.callType)} ended${O(e.payload.duration)}`,
291
285
  joinUrl: (e) => e.payload.joinUrl
292
286
  },
293
287
  CHAT_EVENT: {
@@ -297,7 +291,7 @@ const m = {
297
291
  snippet: (e) => e.payload.text ?? e.payload.eventType,
298
292
  timeline: (e) => e.payload.text || e.payload.eventType
299
293
  },
300
- /* ---- inhoud ---- */
294
+ /* ---- content ---- */
301
295
  TRANSCRIPT_ADDED: {
302
296
  shape: "artifact",
303
297
  triggerable: !0,
@@ -391,7 +385,7 @@ const m = {
391
385
  snippet: (e) => `${e.payload.name} verlaten`,
392
386
  timeline: (e, t) => `${t} left the meeting`
393
387
  },
394
- /* ---- interactie-levenscyclus ---- */
388
+ /* ---- interaction lifecycle ---- */
395
389
  INTERACTION_CREATED: {
396
390
  shape: "event",
397
391
  icon: "circle",
@@ -413,57 +407,57 @@ const m = {
413
407
  timeline: (e, t) => `Assigned by ${t}`
414
408
  }
415
409
  };
416
- function K(e) {
417
- const t = e.payload, n = t.bodySnippet?.trim() || Ne(t.body ?? "");
410
+ function R(e) {
411
+ const t = e.payload, n = t.bodySnippet?.trim() || we(t.body ?? "");
418
412
  return t.subject ? `${t.subject} — ${n}` : n;
419
413
  }
420
414
  function d(e) {
421
415
  return m[e];
422
416
  }
423
- function xn(e) {
417
+ function vn(e) {
424
418
  return d(e)?.icon ?? "circle";
425
419
  }
426
- function On(e) {
420
+ function Nn(e) {
427
421
  return d(e)?.channelKind;
428
422
  }
429
- function ce(e) {
423
+ function ae(e) {
430
424
  return e === "message" || e === "note";
431
425
  }
432
- function $n(e) {
433
- return ce(d(e)?.shape);
426
+ function xn(e) {
427
+ return ae(d(e)?.shape);
434
428
  }
435
- function Rn(e) {
429
+ function On(e) {
436
430
  return d(e)?.replyable === !0;
437
431
  }
438
- function Ln(e) {
432
+ function $n(e) {
439
433
  return d(e)?.carriesText === !0;
440
434
  }
441
- function Dn(e) {
435
+ function Rn(e) {
442
436
  return d(e)?.countsAs;
443
437
  }
444
- function Pn(e) {
438
+ function Ln(e) {
445
439
  return d(e)?.playbookAuthored === !0;
446
440
  }
447
- function Kn(e) {
441
+ function Dn(e) {
448
442
  return d(e)?.connected === !0;
449
443
  }
450
- function Un(e) {
444
+ function Pn(e) {
451
445
  const t = d(e);
452
446
  return t?.shape === "artifact" && t?.carriesText === !0;
453
447
  }
454
- function ve(e) {
448
+ function Me(e) {
455
449
  const t = d(e.type)?.snippet;
456
450
  return t ? t(e) : "";
457
451
  }
458
- function jn(e, t) {
452
+ function Kn(e, t) {
459
453
  const n = d(e.type)?.timeline;
460
454
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
461
455
  }
462
- function Gn(e) {
456
+ function Un(e) {
463
457
  const t = d(e.type)?.joinUrl;
464
458
  return t ? t(e) : void 0;
465
459
  }
466
- function x(e, t) {
460
+ function C(e, t) {
467
461
  let n = e;
468
462
  for (const r of t.split(".")) {
469
463
  if (n == null || typeof n != "object") return "";
@@ -471,26 +465,43 @@ function x(e, t) {
471
465
  }
472
466
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
473
467
  }
474
- function O(e, t, n) {
468
+ function v(e, t, n) {
475
469
  if (e === void 0) return null;
476
470
  if (typeof e == "string") return e || null;
477
471
  if ("value" in e)
478
- return x(t, e.value) || null;
472
+ return C(t, e.value) || null;
479
473
  const r = {};
480
474
  for (const [a, o] of Object.entries(e.params ?? {}))
481
- r[a] = x(t, o);
475
+ r[a] = C(t, o);
482
476
  const i = n(e.key, r);
483
477
  return i === e.key ? null : i;
484
478
  }
485
- function xe(e, t) {
479
+ function ke(e, t) {
486
480
  if (!e || typeof e == "string" || "value" in e) return null;
487
481
  const n = {};
488
482
  for (const [r, i] of Object.entries(e.params ?? {}))
489
- n[r] = x(t, i);
483
+ n[r] = C(t, i);
490
484
  return { key: e.key, params: n };
491
485
  }
492
- const Oe = (e) => e;
493
- function U(e) {
486
+ const L = 140;
487
+ function Ce(e) {
488
+ const t = e.trim();
489
+ return t.length <= L ? t : t.slice(0, L - 1).trimEnd() + "…";
490
+ }
491
+ function jn(e, t) {
492
+ const n = ke(t?.text, e), r = t ? v(t.text, e, (i) => i) : null;
493
+ return {
494
+ activityId: e.id,
495
+ type: e.type,
496
+ snippet: Ce(r ?? Me(e)),
497
+ authorName: e.author?.name ?? "",
498
+ direction: e.direction,
499
+ createdAt: e.createdAt ?? Date.now(),
500
+ ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
501
+ };
502
+ }
503
+ const ve = (e) => e;
504
+ function D(e) {
494
505
  const t = m[e];
495
506
  return {
496
507
  type: e,
@@ -506,7 +517,7 @@ function U(e) {
506
517
  displayNameKey: t.displayNameKey
507
518
  };
508
519
  }
509
- function j(e) {
520
+ function P(e) {
510
521
  return {
511
522
  type: e.type,
512
523
  shape: e.shape,
@@ -521,119 +532,244 @@ function j(e) {
521
532
  displayNameKey: e.displayNameKey
522
533
  };
523
534
  }
524
- class $e {
525
- constructor(t = [], n = Oe) {
535
+ class Ne {
536
+ constructor(t = [], n = ve) {
526
537
  this.translate = n;
527
538
  for (const r of t)
528
539
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
529
540
  }
530
541
  declared = /* @__PURE__ */ new Map();
531
542
  get(t) {
532
- if (t in m) return U(t);
543
+ if (t in m) return D(t);
533
544
  const n = this.declared.get(t);
534
- return n ? j(n) : void 0;
545
+ return n ? P(n) : void 0;
535
546
  }
536
- /** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
547
+ /** Everything that may be offered as a trigger, built-in and declared. */
537
548
  triggerable() {
538
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(U), n = [...this.declared.values()].map(j).filter((r) => r.triggerable);
549
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(D), n = [...this.declared.values()].map(P).filter((r) => r.triggerable);
539
550
  return [...t, ...n];
540
551
  }
541
552
  /**
542
- * De tijdlijnregel. Ingebouwd komt uit de catalogus, gedeclareerd uit `text` + de
543
- * meegeleverde vertaling. Zonder bruikbare tekst valt het terug op de ontstreepte
544
- * typenaam — dezelfde regel die de feed altijd al toonde voor onbekende types.
553
+ * The timeline line. Built-in comes from the catalog, declared from `text` plus the supplied
554
+ * translation. Without usable text it falls back to the de-underscored type name — the same line
555
+ * the feed always showed for unknown types.
545
556
  */
546
557
  timelineText(t, n) {
547
558
  const r = m[t.type];
548
559
  if (r?.timeline) return r.timeline(t, n);
549
560
  const i = this.declared.get(t.type);
550
- return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
561
+ return v(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
551
562
  }
552
- /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
563
+ /** The line for the inbox list. Empty when the type has nothing to show. */
553
564
  snippet(t) {
554
565
  const n = m[t.type];
555
566
  if (n?.snippet) return n.snippet(t);
556
567
  const r = this.declared.get(t.type);
557
- return O(r?.text, t, this.translate) ?? "";
568
+ return v(r?.text, t, this.translate) ?? "";
558
569
  }
559
- /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
570
+ /** The descriptor as it arrived; needed to store `text` as a key. */
560
571
  descriptor(t) {
561
572
  return this.declared.get(t);
562
573
  }
563
- /** De declaratieve blokken van een type, als het er heeft. */
574
+ /** A type's declarative blocks, when it has any. */
564
575
  blocks(t) {
565
576
  const n = this.declared.get(t)?.render;
566
577
  return n?.length ? n : void 0;
567
578
  }
568
579
  /**
569
- * Dezelfde semantische vragen als de losse accessors in `catalog.ts`, maar dan óók voor
570
- * types die een app declareerde.
580
+ * The same semantic questions as the standalone accessors in `catalog.ts`, but for types an app
581
+ * declared as well.
571
582
  *
572
- * Dat verschil is de reden dat deze methodes bestaan. `isMessageType(type)` leest alleen
573
- * `ACTIVITY_CATALOG`, dus een gedeclareerd type met `shape: "message"` gaf daar `false` —
574
- * een helpdesk-app kon een berichtsoort meebrengen die vervolgens niet meetelde als
575
- * gesprek, niet antwoordbaar was en niet in de analytics landde. Wie een registry bij de
576
- * hand heeft, hoort deze te gebruiken; wie er geen heeft valt terug op de ingebouwde.
583
+ * That difference is why these methods exist. `isMessageType(type)` reads only
584
+ * `ACTIVITY_CATALOG`, so a declared type with `shape: "message"` returned `false` there — a
585
+ * helpdesk app could bring a message kind that then did not count as a conversation, was not
586
+ * replyable and never landed in the analytics. Anyone with a registry at hand should use these;
587
+ * anyone without falls back to the built-in ones.
577
588
  *
578
- * De regel zelf staat maar op één plek: {@link isMessageShape} en de velden van
589
+ * The rule itself lives in one place: {@link isMessageShape} and the fields of
579
590
  * {@link ResolvedActivityType}.
580
591
  */
581
592
  isMessage(t) {
582
- return ce(this.get(t)?.shape);
593
+ return ae(this.get(t)?.shape);
583
594
  }
584
- /** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
595
+ /** Can a person reply to this? Notes cannot — those go nowhere. */
585
596
  isReplyable(t) {
586
597
  return this.get(t)?.replyable === !0;
587
598
  }
588
- /** Leesbare inhoud voor een model: berichten, notities én transcripten. */
599
+ /** Readable content for a model: messages, notes and transcripts. */
589
600
  carriesText(t) {
590
601
  return this.get(t)?.carriesText === !0;
591
602
  }
592
- /** Telt mee als in- of uitgaand bericht in de analytics-rollup. */
603
+ /** Counts as an inbound or outbound message in the analytics rollup. */
593
604
  countsAs(t) {
594
605
  return this.get(t)?.countsAs;
595
606
  }
596
- /** `mail` | `chat` | `voice` | `video`, of `undefined` voor een levenscyclus-event. */
607
+ /** `mail` | `chat` | `voice` | `video`, or `undefined` for a lifecycle event. */
597
608
  channelKind(t) {
598
609
  return this.get(t)?.channelKind;
599
610
  }
600
- /** Transcript-achtig artefact: meegeleverde inhoud die leesbare tekst draagt. */
611
+ /** Transcript-like artifact: supplied content carrying readable text. */
601
612
  isTranscript(t) {
602
613
  const n = this.get(t);
603
614
  return n?.shape === "artifact" && n.carriesText;
604
615
  }
605
- /** De vertaler die bij deze registry hoort, voor het oplossen van blokteksten. */
616
+ /** The translator belonging to this registry, for resolving block texts. */
606
617
  get translator() {
607
618
  return this.translate;
608
619
  }
609
620
  }
610
- const Bn = new $e(), G = 140;
611
- function Re(e) {
612
- const t = e.trim();
613
- return t.length <= G ? t : t.slice(0, G - 1).trimEnd() + "…";
614
- }
615
- function Fn(e, t) {
616
- const n = xe(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
617
- return {
618
- activityId: e.id,
619
- type: e.type,
620
- snippet: Re(r ?? ve(e)),
621
- authorName: e.author?.name ?? "",
622
- direction: e.direction,
623
- createdAt: e.createdAt ?? Date.now(),
624
- ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
625
- };
626
- }
627
- function Vn(e, t, n = []) {
621
+ const Gn = new Ne();
622
+ function Bn(e, t, n = []) {
628
623
  const r = e.createdAt;
629
624
  if (!r) return [];
630
625
  const i = new Set(n);
631
626
  return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= r && !i.has(a)).map(([a]) => a);
632
627
  }
633
- function Hn(e) {
628
+ function Fn(e) {
634
629
  return e.createdAt ?? 0;
635
630
  }
636
- const Wn = [
631
+ function Vn(e) {
632
+ return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
633
+ }
634
+ function Hn(e) {
635
+ return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
636
+ }
637
+ const oe = [
638
+ {
639
+ id: "openai",
640
+ attachmentKinds: ["image", "pdf"],
641
+ label: "OpenAI",
642
+ capabilities: ["chat", "transcription", "embedding"],
643
+ defaultModel: "gpt-5-mini",
644
+ baseUrl: "https://api.openai.com/v1"
645
+ },
646
+ {
647
+ id: "gemini",
648
+ attachmentKinds: ["image", "pdf"],
649
+ label: "Google Gemini",
650
+ capabilities: ["chat", "transcription", "embedding"],
651
+ defaultModel: "gemini-3.5-flash",
652
+ baseUrl: "https://generativelanguage.googleapis.com/v1beta"
653
+ },
654
+ {
655
+ id: "anthropic",
656
+ attachmentKinds: ["image", "pdf"],
657
+ label: "Anthropic",
658
+ capabilities: ["chat"],
659
+ defaultModel: "claude-haiku-4-5",
660
+ baseUrl: "https://api.anthropic.com/v1"
661
+ },
662
+ {
663
+ id: "elevenlabs",
664
+ label: "ElevenLabs",
665
+ capabilities: ["transcription"],
666
+ baseUrl: "https://api.elevenlabs.io/v1"
667
+ },
668
+ // Chat Completions vendors. Everything below runs on one adapter
669
+ // (`OpenAiCompatibleProvider`); adding one is a row here plus a line in `providers/registry`.
670
+ //
671
+ // `defaultModel` is deliberately an alias where the vendor offers one (`mistral-large-latest`,
672
+ // `openrouter/auto`): individual model ids expire, aliases do not. Where that is impossible, the
673
+ // newest flagship stands.
674
+ {
675
+ id: "moonshot",
676
+ label: "Moonshot (Kimi)",
677
+ capabilities: ["chat"],
678
+ defaultModel: "kimi-k3",
679
+ baseUrl: "https://api.moonshot.ai/v1"
680
+ },
681
+ {
682
+ id: "deepseek",
683
+ label: "DeepSeek",
684
+ capabilities: ["chat"],
685
+ defaultModel: "deepseek-v4-flash",
686
+ baseUrl: "https://api.deepseek.com/v1"
687
+ },
688
+ {
689
+ id: "groq",
690
+ label: "Groq",
691
+ capabilities: ["chat"],
692
+ defaultModel: "openai/gpt-oss-120b",
693
+ baseUrl: "https://api.groq.com/openai/v1"
694
+ },
695
+ {
696
+ id: "mistral",
697
+ label: "Mistral",
698
+ capabilities: ["chat"],
699
+ defaultModel: "mistral-large-latest",
700
+ baseUrl: "https://api.mistral.ai/v1"
701
+ },
702
+ {
703
+ id: "openrouter",
704
+ label: "OpenRouter",
705
+ capabilities: ["chat"],
706
+ // The Auto Router picks a model per prompt itself, so this does not expire along with the
707
+ // weekly changing slugs in the catalog.
708
+ defaultModel: "openrouter/auto",
709
+ baseUrl: "https://openrouter.ai/api/v1"
710
+ },
711
+ // Self-hosted: no fixed host, the user fills one in on the account. They all speak Chat
712
+ // Completions, so the same adapter.
713
+ {
714
+ id: "ollama",
715
+ label: "Ollama (self-hosted)",
716
+ capabilities: ["chat"],
717
+ defaultModel: "llama3.3"
718
+ },
719
+ {
720
+ id: "openai-compatible",
721
+ label: "OpenAI-compatible (eigen endpoint)",
722
+ capabilities: ["chat"],
723
+ // vLLM, LM Studio, a custom gateway — model and host come from the user.
724
+ defaultModel: "default"
725
+ }
726
+ ];
727
+ function S(e) {
728
+ return oe.find((t) => t.id === e);
729
+ }
730
+ function Wn(e) {
731
+ return S(e)?.label ?? e;
732
+ }
733
+ function zn(e, t = "gpt-5-mini") {
734
+ return S(e)?.defaultModel ?? t;
735
+ }
736
+ function Xn(e) {
737
+ return oe.filter((t) => t.capabilities.includes(e));
738
+ }
739
+ function Yn(e) {
740
+ const t = S(e);
741
+ return !!t && !t.baseUrl;
742
+ }
743
+ function qn(e, t) {
744
+ return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
745
+ }
746
+ function Jn(e, t) {
747
+ if (!e.enabled) return "ok";
748
+ const n = K(e.hardLimitNanos), r = K(e.softLimitNanos);
749
+ return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
750
+ }
751
+ function K(e) {
752
+ return typeof e == "number" ? e : void 0;
753
+ }
754
+ function xe(e, t = "month") {
755
+ const n = new Date(e);
756
+ return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
757
+ }
758
+ function Zn(e, t = "month") {
759
+ const n = new Date(xe(e, t));
760
+ return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
761
+ }
762
+ function Qn(e) {
763
+ return e?.listeningEnabled !== !1;
764
+ }
765
+ function er(e) {
766
+ const t = [];
767
+ for (const n of Object.keys(e))
768
+ for (const r of Object.keys(e[n]))
769
+ t.push({ lang: n, key: r, value: e[n][r] });
770
+ return t;
771
+ }
772
+ const tr = [
637
773
  { id: "agent", label: "Agent", labelSource: "user" },
638
774
  { id: "team", label: "Team", labelSource: "team" },
639
775
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -643,54 +779,47 @@ const Wn = [
643
779
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
644
780
  { id: "time", label: "Tijd", labelSource: "raw" }
645
781
  ];
646
- function zn(e) {
647
- const t = [];
648
- for (const n of Object.keys(e))
649
- for (const r of Object.keys(e[n]))
650
- t.push({ lang: n, key: r, value: e[n][r] });
651
- return t;
652
- }
653
782
  function w(e) {
654
783
  return e < 10 ? `0${e}` : `${e}`;
655
784
  }
656
- function Le(e, t) {
785
+ function Oe(e, t) {
657
786
  const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
658
787
  return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
659
788
  }
660
- function De(e, t) {
789
+ function $e(e, t) {
661
790
  const n = new Date(e);
662
791
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
663
792
  }
664
- const Pe = 36e5, Ke = 864e5;
665
- function Xn(e, t, n) {
666
- const r = n === "hour" ? Pe : Ke, i = [];
667
- for (let a = De(e, n); a <= t; a += r)
668
- i.push(Le(a, n));
793
+ const Re = 36e5, Le = 864e5;
794
+ function nr(e, t, n) {
795
+ const r = n === "hour" ? Re : Le, i = [];
796
+ for (let a = $e(e, n); a <= t; a += r)
797
+ i.push(Oe(a, n));
669
798
  return i;
670
799
  }
671
- const Ue = [
800
+ const De = [
672
801
  { id: "resource", label: "Resource", labelSource: "raw" },
673
802
  { id: "origin", label: "Herkomst", labelSource: "raw" }
674
- ], je = Ue.map((e) => e.id);
675
- function Ge(e, t) {
803
+ ], Pe = De.map((e) => e.id);
804
+ function Ke(e, t) {
676
805
  return `${e}.usage.${t}`;
677
806
  }
678
- function Yn(e, t) {
807
+ function rr(e, t) {
679
808
  return t.map((n) => ({
680
- id: Ge(e, n.unit),
809
+ id: Ke(e, n.unit),
681
810
  label: n.label,
682
811
  category: "Verbruik",
683
812
  valueType: n.valueType ?? "count",
684
813
  aggregation: "sum",
685
814
  supportedDimensions: [
686
815
  "provider",
687
- ...je,
816
+ ...Pe,
688
817
  ...n.extraDimensions ?? [],
689
818
  "time"
690
819
  ]
691
820
  }));
692
821
  }
693
- const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, qn = 256 * 1024, Be = /* @__PURE__ */ new Set([
822
+ const se = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), U = 200, j = 100, G = 200, B = 12, F = 4, ce = 4e3, M = 500, ir = 256 * 1024, Ue = /* @__PURE__ */ new Set([
694
823
  "heading",
695
824
  "paragraph",
696
825
  "list",
@@ -700,15 +829,15 @@ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
700
829
  "table",
701
830
  "kpi",
702
831
  "callout"
703
- ]), Fe = ["http:", "https:", "mailto:", "tel:"], Ve = /^[a-z][a-z0-9+.-]*:/i;
704
- function pe(e) {
832
+ ]), je = ["http:", "https:", "mailto:", "tel:"], Ge = /^[a-z][a-z0-9+.-]*:/i;
833
+ function le(e) {
705
834
  const t = e.trim().replace(/^<|>$/g, "");
706
835
  if (!t) return !1;
707
- const n = Ve.exec(t)?.[0];
708
- return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
836
+ const n = Ge.exec(t)?.[0];
837
+ return n ? je.includes(n.toLowerCase()) : !t.startsWith("//");
709
838
  }
710
- const He = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
711
- function We(e) {
839
+ const Be = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
840
+ function Fe(e) {
712
841
  let t = "", n = 0;
713
842
  for (; n < e.length; ) {
714
843
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -716,22 +845,22 @@ function We(e) {
716
845
  t += e[n], n += 1;
717
846
  continue;
718
847
  }
719
- const i = n + (r ? 2 : 1), a = z(e, i, "[", "]");
848
+ const i = n + (r ? 2 : 1), a = V(e, i, "[", "]");
720
849
  if (a < 0 || e[a + 1] !== "(") {
721
850
  t += e[n], n += 1;
722
851
  continue;
723
852
  }
724
- const o = z(e, a + 2, "(", ")");
853
+ const o = V(e, a + 2, "(", ")");
725
854
  if (o < 0) {
726
855
  t += e[n], n += 1;
727
856
  continue;
728
857
  }
729
- const s = e.slice(i, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
730
- t += r || !pe(l) ? s : e.slice(n, o + 1), n = o + 1;
858
+ const s = e.slice(i, a), c = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
859
+ t += r || !le(c) ? s : e.slice(n, o + 1), n = o + 1;
731
860
  }
732
861
  return t;
733
862
  }
734
- function z(e, t, n, r) {
863
+ function V(e, t, n, r) {
735
864
  let i = 1;
736
865
  for (let a = t; a < e.length; a += 1) {
737
866
  if (e[a] === "\\") {
@@ -744,33 +873,33 @@ function z(e, t, n, r) {
744
873
  }
745
874
  return -1;
746
875
  }
747
- function ze(e) {
748
- return We(e).replace(
749
- He,
750
- (t, n, r) => pe(r) ? t : ""
876
+ function Ve(e) {
877
+ return Fe(e).replace(
878
+ Be,
879
+ (t, n, r) => le(r) ? t : ""
751
880
  );
752
881
  }
753
- function u(e, t = de) {
754
- return typeof e == "string" ? ze(e).slice(0, t) : "";
882
+ function u(e, t = ce) {
883
+ return typeof e == "string" ? Ve(e).slice(0, t) : "";
755
884
  }
756
- function Xe(e, t = de) {
885
+ function He(e, t = ce) {
757
886
  return typeof e == "string" ? e.slice(0, t) : "";
758
887
  }
759
- function Ye(e, t = "info") {
760
- return typeof e == "string" && ue.has(e) ? e : t;
888
+ function We(e, t = "info") {
889
+ return typeof e == "string" && se.has(e) ? e : t;
761
890
  }
762
- function Jn(e, t = () => {
891
+ function ar(e, t = () => {
763
892
  }) {
764
893
  if (!Array.isArray(e)) return [];
765
894
  const n = [];
766
895
  for (const r of e) {
767
- if (n.length >= B) {
768
- t("more than " + B + " blocks; the rest was dropped");
896
+ if (n.length >= U) {
897
+ t("more than " + U + " blocks; the rest was dropped");
769
898
  break;
770
899
  }
771
900
  if (!r || typeof r != "object") continue;
772
901
  const i = r;
773
- if (!Be.has(i.type)) {
902
+ if (!Ue.has(i.type)) {
774
903
  t("unknown block type " + String(i.type));
775
904
  continue;
776
905
  }
@@ -805,7 +934,7 @@ function Jn(e, t = () => {
805
934
  break;
806
935
  }
807
936
  case "code": {
808
- const o = Xe(i.text);
937
+ const o = He(i.text);
809
938
  if (!o) {
810
939
  t("a code block without text");
811
940
  continue;
@@ -820,49 +949,47 @@ function Jn(e, t = () => {
820
949
  case "list": {
821
950
  const o = Array.isArray(i.items) ? i.items : [], s = [];
822
951
  for (const p of o) {
823
- if (s.length >= F) {
824
- t("more than " + F + " list items");
952
+ if (s.length >= j) {
953
+ t("more than " + j + " list items");
825
954
  break;
826
955
  }
827
956
  const f = u(p?.text);
828
957
  if (!f) continue;
829
- const c = u(p?.lead, 200);
830
- s.push(c ? { lead: c, text: f } : { text: f });
958
+ const l = u(p?.lead, 200);
959
+ s.push(l ? { lead: l, text: f } : { text: f });
831
960
  }
832
961
  if (s.length === 0) {
833
962
  t("a list without usable items");
834
963
  continue;
835
964
  }
836
- const l = i.style === "numbered" ? "numbered" : "bulleted";
837
- n.push({ ...a, type: "list", style: l, items: s });
965
+ const c = i.style === "numbered" ? "numbered" : "bulleted";
966
+ n.push({ ...a, type: "list", style: c, items: s });
838
967
  break;
839
968
  }
840
969
  case "table": {
841
970
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
842
- for (const c of o) {
843
- if (s.length >= H) {
844
- t("more than " + H + " table columns");
971
+ for (const l of o) {
972
+ if (s.length >= B) {
973
+ t("more than " + B + " table columns");
845
974
  break;
846
975
  }
847
- const y = u(c?.label, N), _ = c?.align === "right" ? "right" : void 0;
976
+ const y = u(l?.label, M), _ = l?.align === "right" ? "right" : void 0;
848
977
  s.push(_ ? { label: y, align: _ } : { label: y });
849
978
  }
850
979
  if (s.length === 0) {
851
980
  t("a table without columns");
852
981
  continue;
853
982
  }
854
- const l = Array.isArray(i.rows) ? i.rows : [], p = [];
855
- for (const c of l) {
856
- if (p.length >= V) {
857
- t("more than " + V + " table rows");
983
+ const c = Array.isArray(i.rows) ? i.rows : [], p = [];
984
+ for (const l of c) {
985
+ if (p.length >= G) {
986
+ t("more than " + G + " table rows");
858
987
  break;
859
988
  }
860
- const y = Array.isArray(c) ? c : [];
861
- p.push(
862
- s.map((_, ke) => u(y[ke], N))
863
- );
989
+ const y = Array.isArray(l) ? l : [];
990
+ p.push(s.map((_, Te) => u(y[Te], M)));
864
991
  }
865
- const f = u(i.caption, N);
992
+ const f = u(i.caption, M);
866
993
  n.push({
867
994
  ...a,
868
995
  type: "table",
@@ -874,16 +1001,16 @@ function Jn(e, t = () => {
874
1001
  }
875
1002
  case "kpi": {
876
1003
  const o = Array.isArray(i.items) ? i.items : [], s = [];
877
- for (const l of o) {
878
- if (s.length >= W) {
879
- t("more than " + W + " kpi items");
1004
+ for (const c of o) {
1005
+ if (s.length >= F) {
1006
+ t("more than " + F + " kpi items");
880
1007
  break;
881
1008
  }
882
- const p = u(l?.value, 40), f = u(l?.label, 80);
1009
+ const p = u(c?.value, 40), f = u(c?.label, 80);
883
1010
  if (!p || !f) continue;
884
- const c = l?.tone;
1011
+ const l = c?.tone;
885
1012
  s.push(
886
- typeof c == "string" && ue.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
1013
+ typeof l == "string" && se.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
887
1014
  );
888
1015
  }
889
1016
  if (s.length === 0) {
@@ -903,7 +1030,7 @@ function Jn(e, t = () => {
903
1030
  n.push({
904
1031
  ...a,
905
1032
  type: "callout",
906
- tone: Ye(i.tone),
1033
+ tone: We(i.tone),
907
1034
  ...s ? { title: s } : {},
908
1035
  text: o
909
1036
  });
@@ -913,28 +1040,28 @@ function Jn(e, t = () => {
913
1040
  }
914
1041
  return n;
915
1042
  }
916
- function Zn(e) {
1043
+ function or(e) {
917
1044
  return JSON.stringify(e).length;
918
1045
  }
919
- function Qn(e) {
1046
+ function sr(e) {
920
1047
  return {
921
1048
  blocks: e.length,
922
1049
  types: e.map((t) => t.type),
923
1050
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
924
1051
  };
925
1052
  }
926
- function X(e) {
1053
+ function H(e) {
927
1054
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
928
1055
  }
929
- function Y(e, t, n) {
1056
+ function W(e, t, n) {
930
1057
  const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
931
1058
  return [
932
- `| ${e.map(X).join(" | ")} |`,
1059
+ `| ${e.map(H).join(" | ")} |`,
933
1060
  `| ${r.join(" | ")} |`,
934
- ...t.map((i) => `| ${i.map(X).join(" | ")} |`)
1061
+ ...t.map((i) => `| ${i.map(H).join(" | ")} |`)
935
1062
  ];
936
1063
  }
937
- function qe(e) {
1064
+ function ze(e) {
938
1065
  switch (e.type) {
939
1066
  case "heading":
940
1067
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -952,7 +1079,7 @@ function qe(e) {
952
1079
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
953
1080
  });
954
1081
  case "table": {
955
- const t = Y(
1082
+ const t = W(
956
1083
  e.columns.map((n) => n.label),
957
1084
  e.rows,
958
1085
  e.columns.map((n) => n.align ?? "left")
@@ -960,7 +1087,7 @@ function qe(e) {
960
1087
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
961
1088
  }
962
1089
  case "kpi":
963
- return Y(
1090
+ return W(
964
1091
  e.items.map((t) => t.value),
965
1092
  [e.items.map((t) => t.label)]
966
1093
  );
@@ -968,11 +1095,11 @@ function qe(e) {
968
1095
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
969
1096
  }
970
1097
  }
971
- function er(e, t) {
1098
+ function cr(e, t) {
972
1099
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
973
1100
  t && !r && n.push(`# ${t}`);
974
1101
  for (const i of e) {
975
- const a = qe(i);
1102
+ const a = ze(i);
976
1103
  a.length > 0 && n.push(a.join(`
977
1104
  `));
978
1105
  }
@@ -981,41 +1108,41 @@ function er(e, t) {
981
1108
  `)}
982
1109
  `;
983
1110
  }
984
- const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
985
- function tr(e) {
1111
+ const ue = (e) => `user:${e}`, de = (e) => `team:${e}`;
1112
+ function lr(e) {
986
1113
  const t = /* @__PURE__ */ new Set();
987
1114
  for (const n of e ?? [])
988
- n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
1115
+ n?.id && (n.kind === "user" && t.add(ue(n.id)), n.kind === "team" && t.add(de(n.id)));
989
1116
  return [...t].sort();
990
1117
  }
991
- function nr(e, t) {
992
- return [fe(e), ...t.map(me)];
1118
+ function ur(e, t) {
1119
+ return [ue(e), ...t.map(de)];
993
1120
  }
994
- function rr(e) {
1121
+ function dr(e) {
995
1122
  const t = /* @__PURE__ */ new Set();
996
1123
  for (const n of e ?? [])
997
1124
  n?.kind && t.add(n.kind);
998
1125
  return [...t];
999
1126
  }
1000
- const Je = ["done", "escalated"];
1001
- function ir(e) {
1002
- return Je.includes(e);
1127
+ const Xe = ["done", "escalated"];
1128
+ function pr(e) {
1129
+ return Xe.includes(e);
1003
1130
  }
1004
- const Ze = "assignment";
1005
- function ar(e) {
1006
- return `${Ze}:${e}`;
1131
+ const Ye = "assignment";
1132
+ function fr(e) {
1133
+ return `${Ye}:${e}`;
1007
1134
  }
1008
- function or(e, t, n) {
1135
+ function mr(e, t, n) {
1009
1136
  if (e.direction === "inbound") return !0;
1010
1137
  if (e.author?.type === "user" && e.author.id === t) return !1;
1011
1138
  const r = e.payload?.mentions;
1012
1139
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1013
1140
  }
1014
- function sr(e) {
1141
+ function gr(e) {
1015
1142
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1016
1143
  }
1017
- const Qe = 12;
1018
- function lr(e, t, n = Qe) {
1144
+ const qe = 12;
1145
+ function hr(e, t, n = qe) {
1019
1146
  const r = t + 1;
1020
1147
  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 ? {
1021
1148
  status: "escalated",
@@ -1029,83 +1156,156 @@ function lr(e, t, n = Qe) {
1029
1156
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1030
1157
  };
1031
1158
  }
1032
- const q = ["lookup", "condition", "parallel", "for-each"];
1033
- function J(e) {
1034
- for (const t of e) {
1035
- if (!q.includes(t.type))
1036
- return `staptype "${t.type}" mag niet meelezen (alleen ${q.join(", ")})`;
1037
- if (t.type === "parallel")
1038
- for (const n of t.branches ?? []) {
1039
- const r = J(n);
1040
- if (r) return r;
1041
- }
1042
- if (t.type === "for-each") {
1043
- const n = J(t.body ?? []);
1044
- if (n) return n;
1045
- }
1046
- }
1047
- return null;
1159
+ const yr = /* @__PURE__ */ new Set(["mail", "message"]);
1160
+ function Je(e, t) {
1161
+ const n = e.settings?.signatures?.[t];
1162
+ return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1048
1163
  }
1049
- function et(e, t) {
1050
- switch (e.kind) {
1051
- case "org":
1052
- return !0;
1053
- case "team":
1054
- return !!t.teamId && e.teamId === t.teamId;
1055
- case "personal":
1056
- return e.userId === t.userId;
1057
- }
1164
+ function Ar(e, t, n, r = "html") {
1165
+ if (!e) return n;
1166
+ const i = Je(e, t);
1167
+ return i ? `${n}${r === "text" ? `
1168
+
1169
+ ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1058
1170
  }
1059
- function cr(e, t) {
1060
- return e.filter((n) => n.enabled && et(n.ownerScope, t));
1171
+ function br(e) {
1172
+ return e.endpoints ?? [];
1061
1173
  }
1062
- function ur(e) {
1063
- return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1174
+ const Er = (e) => !!e.assignedUserId || !!e.assignedInboxId, Sr = (e) => e.status === "closed", _r = (e) => ({
1175
+ urgent: 10,
1176
+ high: 5,
1177
+ normal: 2,
1178
+ low: 1
1179
+ })[e.priority] || 0, Tr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1180
+ function Ir(e, t) {
1181
+ return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1064
1182
  }
1065
- const dr = [
1066
- { name: "text", type: "string" },
1067
- { name: "subject", type: "string" },
1068
- { name: "from", type: "string" },
1069
- { name: "type", type: "string" },
1070
- { name: "direction", type: "string" },
1071
- { name: "channelId", type: "string" },
1072
- { name: "interactionId", type: "string" },
1073
- { name: "activityId", type: "string" },
1074
- { name: "authorType", type: "string" },
1075
- { name: "authorName", type: "string" },
1076
- { name: "textRaw", type: "string" },
1077
- // Alleen gevuld bij INTERACTION_STATUS_CHANGED; een filter als
1078
- // `trigger.toStatus == "closed"` is de trigger voor "onthoud dit bij afsluiten".
1079
- { name: "fromStatus", type: "string" },
1080
- { name: "toStatus", type: "string" },
1081
- // Met wie is dit gesprek. Dit stond hier eerder expliciet NIET, omdat het toen een gok via
1082
- // `remoteParty` zou zijn geweest; nu legt de identiteitslaag de resolutie vast als
1083
- // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, dus dit is een vastgelegd feit.
1084
- // Leeg zolang de identiteit niet is opgelost (een onbekend nummer, een eerste bericht van
1085
- // een nieuw adres) — een stap die hierop leunt hoort dus een `condition` te hebben.
1086
- { name: "contactId", type: "string" },
1087
- { name: "companyId", type: "string" },
1088
- // Aan wie dit werk is toegewezen, bij een activity die een toewijzing aankondigt. Waar dat
1089
- // op de activity staat is per bron **gedeclareerd** (`AssignmentTargetKind.assigneePath`),
1090
- // dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
1091
- // hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
1092
- { name: "assigneeUserId", type: "string" }
1093
- ], pr = {
1094
- topics: [
1095
- { name: "topicId", type: "string" },
1096
- { name: "topic", type: "string" },
1097
- { name: "confidence", type: "number" },
1098
- { name: "reasoning", type: "string" }
1099
- ],
1100
- question: [
1101
- { name: "answer", type: "boolean" },
1102
- { name: "reasoning", type: "string" }
1103
- ],
1104
- // Leeg met opzet: de velden komen uit `ClassifyStep.fields` en zijn dus per stap anders.
1105
- extract: []
1106
- };
1107
- function tt(e) {
1108
- switch (e.kind) {
1183
+ function wr(e, t) {
1184
+ const n = e.labels ?? [];
1185
+ return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1186
+ }
1187
+ function Mr(e, t, n) {
1188
+ const r = e.translations ?? [];
1189
+ return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1190
+ }
1191
+ const z = [
1192
+ { code: "nl", label: "Nederlands", english: "Dutch" },
1193
+ { code: "en", label: "English", english: "English" },
1194
+ { code: "de", label: "Deutsch", english: "German" },
1195
+ { code: "fr", label: "Français", english: "French" },
1196
+ { code: "es", label: "Español", english: "Spanish" },
1197
+ { code: "it", label: "Italiano", english: "Italian" },
1198
+ { code: "pt", label: "Português", english: "Portuguese" },
1199
+ { code: "pl", label: "Polski", english: "Polish" },
1200
+ { code: "sv", label: "Svenska", english: "Swedish" },
1201
+ { code: "da", label: "Dansk", english: "Danish" },
1202
+ { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1203
+ { code: "fi", label: "Suomi", english: "Finnish" },
1204
+ { code: "tr", label: "Türkçe", english: "Turkish" }
1205
+ ];
1206
+ function pe(e) {
1207
+ const t = (e ?? "").toLowerCase();
1208
+ return z.find((n) => n.code === t) ?? z.find((n) => n.code === t.split("-")[0]);
1209
+ }
1210
+ function kr(e) {
1211
+ return pe(e)?.label ?? e;
1212
+ }
1213
+ function Cr(e) {
1214
+ const t = pe(e);
1215
+ return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1216
+ }
1217
+ const fe = 3;
1218
+ function Ze(e, t) {
1219
+ const n = /* @__PURE__ */ new Set();
1220
+ let r = 1, i = t.get(e)?.parentId;
1221
+ for (; i; ) {
1222
+ if (n.has(i) || (n.add(i), r++, r > fe + 1)) return 1 / 0;
1223
+ i = t.get(i)?.parentId;
1224
+ }
1225
+ return r;
1226
+ }
1227
+ function vr(e, t, n) {
1228
+ if (!e) return !0;
1229
+ if (e === t) return !1;
1230
+ const r = new Map(n.map((o) => [o.id, o]));
1231
+ if (!r.has(e) || t && Qe(e, t, r)) return !1;
1232
+ const i = Ze(e, r), a = t ? me(t, n) : 1;
1233
+ return i + a <= fe;
1234
+ }
1235
+ function Qe(e, t, n) {
1236
+ const r = /* @__PURE__ */ new Set();
1237
+ let i = n.get(e)?.parentId;
1238
+ for (; i; ) {
1239
+ if (i === t) return !0;
1240
+ if (r.has(i)) return !1;
1241
+ r.add(i), i = n.get(i)?.parentId;
1242
+ }
1243
+ return !1;
1244
+ }
1245
+ function me(e, t, n = /* @__PURE__ */ new Set()) {
1246
+ if (n.has(e)) return 1;
1247
+ n.add(e);
1248
+ const r = t.filter((i) => i.parentId === e);
1249
+ return r.length ? 1 + Math.max(...r.map((i) => me(i.id, t, n))) : 1;
1250
+ }
1251
+ const et = "en";
1252
+ function tt(e) {
1253
+ return e.defaultLocale || e.locale || et;
1254
+ }
1255
+ function Nr(e) {
1256
+ const t = /* @__PURE__ */ new Set(), n = [];
1257
+ for (const r of [tt(e), ...e.locales ?? []])
1258
+ !r || t.has(r) || (t.add(r), n.push(r));
1259
+ return n;
1260
+ }
1261
+ function xr(e, t, n) {
1262
+ const r = e.translations ?? [];
1263
+ return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1264
+ }
1265
+ const X = ["lookup", "condition", "parallel", "for-each"];
1266
+ function Y(e) {
1267
+ for (const t of e) {
1268
+ if (!X.includes(t.type))
1269
+ return `staptype "${t.type}" mag niet meelezen (alleen ${X.join(", ")})`;
1270
+ if (t.type === "parallel")
1271
+ for (const n of t.branches ?? []) {
1272
+ const r = Y(n);
1273
+ if (r) return r;
1274
+ }
1275
+ if (t.type === "for-each") {
1276
+ const n = Y(t.body ?? []);
1277
+ if (n) return n;
1278
+ }
1279
+ }
1280
+ return null;
1281
+ }
1282
+ function nt(e, t) {
1283
+ switch (e.kind) {
1284
+ case "org":
1285
+ return !0;
1286
+ case "team":
1287
+ return !!t.teamId && e.teamId === t.teamId;
1288
+ case "personal":
1289
+ return e.userId === t.userId;
1290
+ }
1291
+ }
1292
+ function Or(e, t) {
1293
+ return e.filter((n) => n.enabled && nt(n.ownerScope, t));
1294
+ }
1295
+ function $r(e) {
1296
+ return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1297
+ }
1298
+ function Rr(e) {
1299
+ return `mcp__${e}__`;
1300
+ }
1301
+ const Lr = 1e3, Dr = 2e3, Pr = 500, Kr = 12e3, Ur = 4e3, rt = ["contact", "company"];
1302
+ function jr(e) {
1303
+ if (!e) return !1;
1304
+ const t = e.slice(0, e.indexOf(":"));
1305
+ return rt.includes(t);
1306
+ }
1307
+ function it(e) {
1308
+ switch (e.kind) {
1109
1309
  case "user":
1110
1310
  return `user:${e.userId}`;
1111
1311
  case "team":
@@ -1114,7 +1314,7 @@ function tt(e) {
1114
1314
  return "org";
1115
1315
  }
1116
1316
  }
1117
- function fr(e) {
1317
+ function Gr(e) {
1118
1318
  if (typeof e != "string") return;
1119
1319
  const t = e.trim();
1120
1320
  if (t === "org") return { kind: "org" };
@@ -1126,10 +1326,10 @@ function fr(e) {
1126
1326
  if (r === "team") return { kind: "team", teamId: i };
1127
1327
  }
1128
1328
  }
1129
- function nt(e) {
1130
- return tt(e);
1329
+ function at(e) {
1330
+ return it(e);
1131
1331
  }
1132
- function rt(e) {
1332
+ function ot(e) {
1133
1333
  switch (e.kind) {
1134
1334
  case "personal":
1135
1335
  return { kind: "user", userId: e.userId };
@@ -1139,14 +1339,14 @@ function rt(e) {
1139
1339
  return { kind: "org" };
1140
1340
  }
1141
1341
  }
1142
- const it = rt;
1143
- function mr(e) {
1144
- return e.agentId ? { kind: "user", userId: e.agentId } : it(e.ownerScope);
1342
+ const st = ot;
1343
+ function Br(e) {
1344
+ return e.agentId ? { kind: "user", userId: e.agentId } : st(e.ownerScope);
1145
1345
  }
1146
- function gr(e) {
1147
- return nt(e);
1346
+ function Fr(e) {
1347
+ return at(e);
1148
1348
  }
1149
- function hr(e, t) {
1349
+ function Vr(e, t) {
1150
1350
  if (!t) return;
1151
1351
  let n = e;
1152
1352
  for (const r of t.split(".")) {
@@ -1155,396 +1355,195 @@ function hr(e, t) {
1155
1355
  }
1156
1356
  return n;
1157
1357
  }
1158
- function yr(e, t) {
1358
+ function Hr(e, t) {
1159
1359
  return e.targets.find((n) => n.activityTypes.includes(t));
1160
1360
  }
1161
- function Ar(e, t) {
1361
+ function Wr(e, t) {
1162
1362
  if (t)
1163
1363
  return e.targets.find((n) => n.id === t);
1164
1364
  }
1165
- function at(e) {
1365
+ function ct(e) {
1166
1366
  return e?.kind === "assignment";
1167
1367
  }
1168
- function br(e) {
1368
+ function zr(e) {
1169
1369
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
1170
- return at(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
1370
+ return ct(t) ? n ? r ? r.activityTypes.includes(i) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
1171
1371
  }
1172
- function ot(e) {
1173
- return `${e.type}:${e.id}`;
1372
+ function Xr(e) {
1373
+ return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1174
1374
  }
1175
- const st = "interaction";
1375
+ const Yr = [
1376
+ { name: "text", type: "string" },
1377
+ { name: "subject", type: "string" },
1378
+ { name: "from", type: "string" },
1379
+ { name: "type", type: "string" },
1380
+ { name: "direction", type: "string" },
1381
+ { name: "channelId", type: "string" },
1382
+ { name: "interactionId", type: "string" },
1383
+ { name: "activityId", type: "string" },
1384
+ { name: "authorType", type: "string" },
1385
+ { name: "authorName", type: "string" },
1386
+ { name: "textRaw", type: "string" },
1387
+ // Only filled on INTERACTION_STATUS_CHANGED; a filter like `trigger.toStatus == "closed"` is
1388
+ // the trigger for "remember this when closing".
1389
+ { name: "fromStatus", type: "string" },
1390
+ { name: "toStatus", type: "string" },
1391
+ // Who this conversation is with. The identity layer records the resolution as
1392
+ // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, so this is a recorded fact and not a
1393
+ // guess via `remoteParty`. Empty while the identity is unresolved (an unknown number, a first
1394
+ // message from a new address) — so a step leaning on this should carry a `condition`.
1395
+ { name: "contactId", type: "string" },
1396
+ { name: "companyId", type: "string" },
1397
+ // Who this work is assigned to, on an activity announcing an assignment. Where that sits on
1398
+ // the activity is **declared** per source (`AssignmentTargetKind.assigneePath`), so
1399
+ // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1400
+ // the trigger filter runs — like contactId/companyId above.
1401
+ { name: "assigneeUserId", type: "string" }
1402
+ ], qr = {
1403
+ topics: [
1404
+ { name: "topicId", type: "string" },
1405
+ { name: "topic", type: "string" },
1406
+ { name: "confidence", type: "number" },
1407
+ { name: "reasoning", type: "string" }
1408
+ ],
1409
+ question: [
1410
+ { name: "answer", type: "boolean" },
1411
+ { name: "reasoning", type: "string" }
1412
+ ],
1413
+ // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1414
+ extract: []
1415
+ };
1176
1416
  function lt(e) {
1177
- return e?.type === st ? e.id : void 0;
1417
+ return `${e.type}:${e.id}`;
1418
+ }
1419
+ const ut = "interaction";
1420
+ function dt(e) {
1421
+ return e?.type === ut ? e.id : void 0;
1178
1422
  }
1179
- const ct = 64, ut = 8e3;
1180
- function Er(e) {
1423
+ const pt = 64, ft = 8e3;
1424
+ function Jr(e) {
1181
1425
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1182
1426
  if (!(!Number.isFinite(t) || t <= 0))
1183
- return Math.min(Math.max(Math.round(t), ct), ut);
1427
+ return Math.min(Math.max(Math.round(t), pt), ft);
1184
1428
  }
1185
- const Sr = { kind: "workflow", steps: [] };
1186
- function _r(e) {
1429
+ const Zr = { kind: "workflow", steps: [] };
1430
+ function Qr(e) {
1187
1431
  return e?.kind === "workflow" ? e.steps : [];
1188
1432
  }
1189
- function Tr(e) {
1433
+ function ei(e) {
1190
1434
  return e?.kind === "procedure" ? e.procedure : void 0;
1191
1435
  }
1192
- const dt = ["done", "escalated", "failed", "stopped"];
1193
- function Ir(e) {
1194
- return dt.includes(e);
1436
+ const mt = ["done", "escalated", "failed", "stopped"];
1437
+ function ti(e) {
1438
+ return mt.includes(e);
1195
1439
  }
1196
- function pt(e) {
1440
+ function gt(e) {
1197
1441
  return e === "waiting";
1198
1442
  }
1199
- function Mr(e) {
1200
- return e === "running" || pt(e);
1443
+ function ni(e) {
1444
+ return e === "running" || gt(e);
1201
1445
  }
1202
1446
  function ge(e) {
1203
1447
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1204
1448
  }
1205
- function Cr(e) {
1449
+ function ri(e) {
1206
1450
  const t = ge(e);
1207
- return t ? ot(t) : void 0;
1208
- }
1209
- function kr(e) {
1210
- return lt(ge(e));
1211
- }
1212
- function wr(e, t) {
1213
- const n = e.labels ?? [];
1214
- return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1451
+ return t ? lt(t) : void 0;
1215
1452
  }
1216
- function Nr(e, t, n) {
1217
- const r = e.translations ?? [];
1218
- return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1453
+ function ii(e) {
1454
+ return dt(ge(e));
1219
1455
  }
1220
- const Z = [
1221
- { code: "nl", label: "Nederlands", english: "Dutch" },
1222
- { code: "en", label: "English", english: "English" },
1223
- { code: "de", label: "Deutsch", english: "German" },
1224
- { code: "fr", label: "Français", english: "French" },
1225
- { code: "es", label: "Español", english: "Spanish" },
1226
- { code: "it", label: "Italiano", english: "Italian" },
1227
- { code: "pt", label: "Português", english: "Portuguese" },
1228
- { code: "pl", label: "Polski", english: "Polish" },
1229
- { code: "sv", label: "Svenska", english: "Swedish" },
1230
- { code: "da", label: "Dansk", english: "Danish" },
1231
- { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1232
- { code: "fi", label: "Suomi", english: "Finnish" },
1233
- { code: "tr", label: "Türkçe", english: "Turkish" }
1234
- ];
1235
- function he(e) {
1236
- const t = (e ?? "").toLowerCase();
1237
- return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
1456
+ function ai(e, t) {
1457
+ const n = e.accumulatedSeconds || 0;
1458
+ return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1238
1459
  }
1239
- function vr(e) {
1240
- return he(e)?.label ?? e;
1460
+ function oi(e, t) {
1461
+ const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1462
+ if (!t || t === "exact") return n * 60;
1463
+ const r = Number(t);
1464
+ return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1241
1465
  }
1242
- function xr(e) {
1243
- const t = he(e);
1244
- return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1466
+ function si(e) {
1467
+ const t = Math.max(0, Math.round(e / 60));
1468
+ return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1245
1469
  }
1246
- const ye = 3;
1247
- function ft(e, t) {
1248
- const n = /* @__PURE__ */ new Set();
1249
- let r = 1, i = t.get(e)?.parentId;
1250
- for (; i; ) {
1251
- if (n.has(i) || (n.add(i), r++, r > ye + 1)) return 1 / 0;
1252
- i = t.get(i)?.parentId;
1253
- }
1254
- return r;
1470
+ function ci(e) {
1471
+ const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1472
+ return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1255
1473
  }
1256
- function Or(e, t, n) {
1257
- if (!e) return !0;
1258
- if (e === t) return !1;
1259
- const r = new Map(n.map((o) => [o.id, o]));
1260
- if (!r.has(e) || t && mt(e, t, r)) return !1;
1261
- const i = ft(e, r), a = t ? Ae(t, n) : 1;
1262
- return i + a <= ye;
1474
+ function ht(e) {
1475
+ return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1263
1476
  }
1264
- function mt(e, t, n) {
1265
- const r = /* @__PURE__ */ new Set();
1266
- let i = n.get(e)?.parentId;
1267
- for (; i; ) {
1268
- if (i === t) return !0;
1269
- if (r.has(i)) return !1;
1270
- r.add(i), i = n.get(i)?.parentId;
1477
+ function li(e, t) {
1478
+ const n = ht(e) || "werksoort", r = new Set(t);
1479
+ if (!r.has(n)) return n;
1480
+ for (let i = 2; i < 500; i++) {
1481
+ const a = `${n}-${i}`;
1482
+ if (!r.has(a)) return a;
1271
1483
  }
1272
- return !1;
1273
- }
1274
- function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1275
- if (n.has(e)) return 1;
1276
- n.add(e);
1277
- const r = t.filter((i) => i.parentId === e);
1278
- return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
1484
+ return `${n}-${r.size + 1}`;
1279
1485
  }
1280
- const gt = "en";
1281
- function ht(e) {
1282
- return e.defaultLocale || e.locale || gt;
1486
+ function ui(e, t) {
1487
+ const n = e.ownerScope;
1488
+ return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1283
1489
  }
1284
- function $r(e) {
1285
- const t = /* @__PURE__ */ new Set(), n = [];
1286
- for (const r of [ht(e), ...e.locales ?? []])
1287
- !r || t.has(r) || (t.add(r), n.push(r));
1288
- return n;
1490
+ function di(e) {
1491
+ return e.filter((t) => !t.archived).sort(yt);
1289
1492
  }
1290
- function Rr(e, t, n) {
1291
- const r = e.translations ?? [];
1292
- return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1493
+ function yt(e, t) {
1494
+ const n = (e.order ?? 0) - (t.order ?? 0);
1495
+ return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1293
1496
  }
1294
- const yt = 20, At = 20, v = 300;
1497
+ const At = 20, bt = 20, k = 300;
1295
1498
  function g(e) {
1296
1499
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1297
1500
  }
1298
- function bt(e) {
1501
+ function Et(e) {
1299
1502
  const t = e.replace(/\s+/g, " ").trim();
1300
- if (t.length <= v) return t;
1301
- const n = t.slice(0, v), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1302
- return r > v * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1503
+ if (t.length <= k) return t;
1504
+ const n = t.slice(0, k), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1505
+ return r > k * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1303
1506
  }
1304
- function Lr(e, t) {
1305
- const n = bt(t.text), r = g(n);
1507
+ function pi(e, t) {
1508
+ const n = Et(t.text), r = g(n);
1306
1509
  if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1307
1510
  const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1308
1511
  if (a >= 0) {
1309
1512
  if (i[a].corrected || !t.corrected) return null;
1310
1513
  const o = [...i];
1311
- return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1514
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, q(o);
1312
1515
  }
1313
- return Q([{ ...t, text: n }, ...i]).slice(0, At);
1516
+ return q([{ ...t, text: n }, ...i]).slice(0, bt);
1314
1517
  }
1315
- function Q(e) {
1316
- return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1518
+ function q(e) {
1519
+ return [...e].sort(
1520
+ (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1521
+ );
1317
1522
  }
1318
- function Dr(e, t) {
1523
+ function fi(e, t) {
1319
1524
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1320
- return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-yt), exampleCandidates: Et(e, t) };
1525
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-At), exampleCandidates: St(e, t) };
1321
1526
  }
1322
- function Et(e, t) {
1527
+ function St(e, t) {
1323
1528
  const n = g(t);
1324
1529
  return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1325
1530
  }
1326
- function St(e, t) {
1531
+ function _t(e, t) {
1327
1532
  const n = e.ownerScope;
1328
1533
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1329
1534
  }
1330
- function Pr(e, t) {
1331
- return e.filter((n) => St(n, t));
1332
- }
1333
- const be = [
1334
- {
1335
- id: "openai",
1336
- attachmentKinds: ["image", "pdf"],
1337
- label: "OpenAI",
1338
- capabilities: ["chat", "transcription", "embedding"],
1339
- defaultModel: "gpt-5-mini",
1340
- baseUrl: "https://api.openai.com/v1"
1341
- },
1342
- {
1343
- id: "gemini",
1344
- attachmentKinds: ["image", "pdf"],
1345
- label: "Google Gemini",
1346
- capabilities: ["chat", "transcription", "embedding"],
1347
- defaultModel: "gemini-3.5-flash",
1348
- baseUrl: "https://generativelanguage.googleapis.com/v1beta"
1349
- },
1350
- {
1351
- id: "anthropic",
1352
- attachmentKinds: ["image", "pdf"],
1353
- label: "Anthropic",
1354
- capabilities: ["chat"],
1355
- defaultModel: "claude-haiku-4-5",
1356
- baseUrl: "https://api.anthropic.com/v1"
1357
- },
1358
- {
1359
- id: "elevenlabs",
1360
- label: "ElevenLabs",
1361
- capabilities: ["transcription"],
1362
- baseUrl: "https://api.elevenlabs.io/v1"
1363
- },
1364
- // --- Chat Completions-vendors ------------------------------------------
1365
- // Alles hieronder draait op één adapter (`OpenAiCompatibleProvider`). Een
1366
- // nieuwe toevoegen is een rij hier + een regel in `providers/registry`.
1367
- //
1368
- // `defaultModel` is bewust een alias waar de vendor er een aanbiedt
1369
- // (`mistral-large-latest`, `openrouter/auto`): losse model-ids verlopen,
1370
- // aliassen niet. Waar dat niet kan, staat het nieuwste vlaggenschip.
1371
- {
1372
- id: "moonshot",
1373
- label: "Moonshot (Kimi)",
1374
- capabilities: ["chat"],
1375
- defaultModel: "kimi-k3",
1376
- baseUrl: "https://api.moonshot.ai/v1"
1377
- },
1378
- {
1379
- id: "deepseek",
1380
- label: "DeepSeek",
1381
- capabilities: ["chat"],
1382
- defaultModel: "deepseek-v4-flash",
1383
- baseUrl: "https://api.deepseek.com/v1"
1384
- },
1385
- {
1386
- id: "groq",
1387
- label: "Groq",
1388
- capabilities: ["chat"],
1389
- defaultModel: "openai/gpt-oss-120b",
1390
- baseUrl: "https://api.groq.com/openai/v1"
1391
- },
1392
- {
1393
- id: "mistral",
1394
- label: "Mistral",
1395
- capabilities: ["chat"],
1396
- defaultModel: "mistral-large-latest",
1397
- baseUrl: "https://api.mistral.ai/v1"
1398
- },
1399
- {
1400
- id: "openrouter",
1401
- label: "OpenRouter",
1402
- capabilities: ["chat"],
1403
- // De Auto Router kiest zelf een model per prompt, dus dit verloopt niet
1404
- // mee met de wekelijks wisselende slugs in de catalogus.
1405
- defaultModel: "openrouter/auto",
1406
- baseUrl: "https://openrouter.ai/api/v1"
1407
- },
1408
- // Self-hosted: geen vaste host, de user vult er zelf een in op het account.
1409
- // Praten allemaal Chat Completions, dus dezelfde adapter.
1410
- {
1411
- id: "ollama",
1412
- label: "Ollama (self-hosted)",
1413
- capabilities: ["chat"],
1414
- defaultModel: "llama3.3"
1415
- },
1416
- {
1417
- id: "openai-compatible",
1418
- label: "OpenAI-compatible (eigen endpoint)",
1419
- capabilities: ["chat"],
1420
- // vLLM, LM Studio, een eigen gateway — model en host komen van de user.
1421
- defaultModel: "default"
1422
- }
1423
- ];
1424
- function S(e) {
1425
- return be.find((t) => t.id === e);
1426
- }
1427
- function Kr(e) {
1428
- return S(e)?.label ?? e;
1429
- }
1430
- function Ur(e, t = "gpt-5-mini") {
1431
- return S(e)?.defaultModel ?? t;
1432
- }
1433
- function jr(e) {
1434
- return be.filter((t) => t.capabilities.includes(e));
1435
- }
1436
- function Gr(e) {
1437
- const t = S(e);
1438
- return !!t && !t.baseUrl;
1439
- }
1440
- function Br(e, t) {
1441
- return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
1442
- }
1443
- function Fr(e, t) {
1444
- if (!e.enabled) return "ok";
1445
- const n = ee(e.hardLimitNanos), r = ee(e.softLimitNanos);
1446
- return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
1447
- }
1448
- function ee(e) {
1449
- return typeof e == "number" ? e : void 0;
1450
- }
1451
- function _t(e, t = "month") {
1452
- const n = new Date(e);
1453
- return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
1454
- }
1455
- function Vr(e, t = "month") {
1456
- const n = new Date(_t(e, t));
1457
- return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1458
- }
1459
- function Hr(e) {
1460
- return e?.listeningEnabled !== !1;
1461
- }
1462
- function Wr(e) {
1463
- return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1464
- }
1465
- function zr(e) {
1466
- return `mcp__${e}__`;
1467
- }
1468
- const Xr = /* @__PURE__ */ new Set(["mail", "message"]);
1469
- function Tt(e, t) {
1470
- const n = e.settings?.signatures?.[t];
1471
- return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1472
- }
1473
- function Yr(e, t, n, r = "html") {
1474
- if (!e) return n;
1475
- const i = Tt(e, t);
1476
- return i ? `${n}${r === "text" ? `
1477
-
1478
- ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1479
- }
1480
- function qr(e) {
1481
- return e.endpoints ?? [];
1482
- }
1483
- const Jr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Zr = (e) => e.status === "closed", Qr = (e) => ({
1484
- urgent: 10,
1485
- high: 5,
1486
- normal: 2,
1487
- low: 1
1488
- })[e.priority] || 0, ei = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1489
- function ti(e, t) {
1490
- return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1491
- }
1492
- const ni = 1e3, ri = 2e3, ii = 500, ai = 12e3, oi = 4e3, It = ["contact", "company"];
1493
- function si(e) {
1494
- if (!e) return !1;
1495
- const t = e.slice(0, e.indexOf(":"));
1496
- return It.includes(t);
1497
- }
1498
- function li(e, t) {
1499
- const n = e.accumulatedSeconds || 0;
1500
- return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1501
- }
1502
- function ci(e, t) {
1503
- const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1504
- if (!t || t === "exact") return n * 60;
1505
- const r = Number(t);
1506
- return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1507
- }
1508
- function ui(e) {
1509
- const t = Math.max(0, Math.round(e / 60));
1510
- return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1511
- }
1512
- function di(e) {
1513
- const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1514
- return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1515
- }
1516
- function Mt(e) {
1517
- return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1518
- }
1519
- function pi(e, t) {
1520
- const n = Mt(e) || "werksoort", r = new Set(t);
1521
- if (!r.has(n)) return n;
1522
- for (let i = 2; i < 500; i++) {
1523
- const a = `${n}-${i}`;
1524
- if (!r.has(a)) return a;
1525
- }
1526
- return `${n}-${r.size + 1}`;
1527
- }
1528
- function fi(e, t) {
1529
- const n = e.ownerScope;
1530
- return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1531
- }
1532
- function mi(e) {
1533
- return e.filter((t) => !t.archived).sort(Ct);
1534
- }
1535
- function Ct(e, t) {
1536
- const n = (e.order ?? 0) - (t.order ?? 0);
1537
- return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1535
+ function mi(e, t) {
1536
+ return e.filter((n) => _t(n, t));
1538
1537
  }
1539
1538
  function gi(e) {
1540
1539
  return e.type === "agent";
1541
1540
  }
1542
- const kt = "work_item", wt = "work_project";
1543
- function Nt(e) {
1544
- return `${kt}:${e}`;
1541
+ const Tt = "work_item", It = "work_project";
1542
+ function wt(e) {
1543
+ return `${Tt}:${e}`;
1545
1544
  }
1546
- function Ee(e) {
1547
- return `${wt}:${e}`;
1545
+ function he(e) {
1546
+ return `${It}:${e}`;
1548
1547
  }
1549
1548
  function hi(e, t, n) {
1550
1549
  const r = `${e}-${t}`;
@@ -1562,325 +1561,67 @@ function Ai(e) {
1562
1561
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1563
1562
  }
1564
1563
  function bi(e, t = 25) {
1565
- const n = /* @__PURE__ */ new Set([Nt(e.id)]);
1566
- e.projectId && n.add(Ee(e.projectId));
1564
+ const n = /* @__PURE__ */ new Set([wt(e.id)]);
1565
+ e.projectId && n.add(he(e.projectId));
1567
1566
  for (const r of e.ancestorKeys ?? []) n.add(r);
1568
1567
  for (const r of e.partyKeys ?? []) n.add(r);
1569
1568
  return Array.from(n).slice(0, t);
1570
1569
  }
1571
1570
  function Ei(e) {
1572
- return [Ee(e.id)];
1571
+ return [he(e.id)];
1573
1572
  }
1574
- const $ = [
1573
+ const N = [
1575
1574
  { key: "open", label: "status_open", category: "todo", order: 0 },
1576
1575
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1577
1576
  { key: "done", label: "status_done", category: "done", order: 2 }
1578
- ], Se = $.map((e) => e.key);
1579
- function vt(e) {
1580
- return e?.statuses?.length ? e.statuses : $;
1577
+ ], ye = N.map((e) => e.key);
1578
+ function Mt(e) {
1579
+ return e?.statuses?.length ? e.statuses : N;
1581
1580
  }
1582
- function xt(e, t) {
1581
+ function kt(e, t) {
1583
1582
  return t.find((n) => n.key === e)?.category ?? "todo";
1584
1583
  }
1585
1584
  function Si(e, t) {
1586
1585
  return t.find((n) => n.key === e);
1587
1586
  }
1588
1587
  function _i(e) {
1589
- const t = vt(e), n = e?.defaultStatusKey;
1590
- return n && t.some((r) => r.key === n) ? n : Ot(t)[0]?.key ?? $[0].key;
1588
+ const t = Mt(e), n = e?.defaultStatusKey;
1589
+ return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? N[0].key;
1591
1590
  }
1592
- function Ot(e) {
1591
+ function Ct(e) {
1593
1592
  return [...e].sort((t, n) => {
1594
1593
  const r = (t.order ?? 0) - (n.order ?? 0);
1595
1594
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1596
1595
  });
1597
1596
  }
1598
1597
  function Ti(e, t) {
1599
- return xt(e, t) === "done";
1600
- }
1601
- function $t(e) {
1602
- return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1603
- }
1604
- function Ii(e, t) {
1605
- const n = $t(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1606
- if (!r.has(n)) return n;
1607
- for (let i = 2; i < 500; i++) {
1608
- const a = `${n}-${i}`;
1609
- if (!r.has(a)) return a;
1610
- }
1611
- return `${n}-${r.size + 1}`;
1612
- }
1613
- function Mi(e) {
1614
- const t = [];
1615
- if (!e.length) return [{ index: -1, reason: "empty" }];
1616
- const n = /* @__PURE__ */ new Set();
1617
- return e.forEach((r, i) => {
1618
- if (!r.key) {
1619
- t.push({ index: i, reason: "missing_key" });
1620
- return;
1621
- }
1622
- Se.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
1623
- }), 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;
1624
- }
1625
- const R = {
1626
- // The lower bounds are deliberately generous: service ranges (0800/0900) are
1627
- // shorter than geographic numbers, and a too-strict minimum silently drops them.
1628
- // An over-permissive key is harmless — it simply matches nothing.
1629
- NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1630
- BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
1631
- LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
1632
- DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
1633
- FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1634
- GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
1635
- IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1636
- ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
1637
- PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
1638
- IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
1639
- AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1640
- CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1641
- DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
1642
- SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1643
- NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
1644
- FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
1645
- PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1646
- US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1647
- CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1648
- }, Rt = "NL", Lt = 15, Dt = 8, Pt = Array.from(
1649
- new Set(Object.values(R).map((e) => e.callingCode))
1650
- ).sort((e, t) => t.length - e.length);
1651
- function te(e) {
1652
- if (e)
1653
- return R[e.trim().toUpperCase()];
1654
- }
1655
- function E(e, t) {
1656
- return e.length >= t.nsnMin && e.length <= t.nsnMax;
1657
- }
1658
- function ne(e) {
1659
- if (e.length > Lt) return null;
1660
- for (const t of Pt) {
1661
- if (!e.startsWith(t)) continue;
1662
- const n = e.slice(t.length);
1663
- for (const r of Object.values(R)) {
1664
- if (r.callingCode !== t) continue;
1665
- const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
1666
- if (E(a, r)) return `+${t}${a}`;
1667
- }
1668
- return null;
1669
- }
1670
- return e.length < Dt ? null : `+${e}`;
1671
- }
1672
- function Kt(e) {
1673
- let t = e.trim();
1674
- const n = t.match(/^(sips?|tel|whatsapp):/i);
1675
- n && (t = t.slice(n[0].length));
1676
- const r = t.indexOf("@");
1677
- return r >= 0 && (t = t.slice(0, r)), t.trim();
1678
- }
1679
- function Ci(e) {
1680
- if (!e) return !1;
1681
- const t = e.indexOf("@");
1682
- if (t <= 0) return !1;
1683
- const n = e.slice(0, t).trim();
1684
- return !/^[+\d\s().-]+$/.test(n);
1685
- }
1686
- function re(e, t) {
1687
- if (!e) return null;
1688
- const n = Kt(e);
1689
- if (!n) return null;
1690
- const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1691
- if (!i) return null;
1692
- if (r) return ne(i);
1693
- if (i.startsWith("00")) return ne(i.slice(2));
1694
- const a = te(t) ?? te(Rt);
1695
- if (!a) return null;
1696
- const o = a.trunkPrefix;
1697
- if (o && i.startsWith(o)) {
1698
- const s = i.slice(o.length);
1699
- return E(s, a) ? `+${a.callingCode}${s}` : null;
1700
- }
1701
- if (i.startsWith(a.callingCode)) {
1702
- const s = i.slice(a.callingCode.length);
1703
- if (E(s, a)) return `+${a.callingCode}${s}`;
1704
- }
1705
- return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
1706
- }
1707
- function ki(e, t = 9) {
1708
- const n = (e ?? "").replace(/\D/g, "");
1709
- return n.length < t ? null : n.slice(-t);
1710
- }
1711
- function _e(e) {
1712
- if (!e) return null;
1713
- const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1714
- if (n <= 0 || n === t.length - 1) return null;
1715
- const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1716
- return !r || !i.includes(".") ? null : `${r}@${i}`;
1717
- }
1718
- function wi(e) {
1719
- const t = _e(e);
1720
- return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1721
- }
1722
- const Ut = /* @__PURE__ */ new Set([
1723
- "co.uk",
1724
- "org.uk",
1725
- "gov.uk",
1726
- "ac.uk",
1727
- "com.au",
1728
- "co.nz",
1729
- "com.br",
1730
- "co.za"
1731
- ]);
1732
- function jt(e) {
1733
- if (!e) return null;
1734
- const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1735
- if (t.length < 2) return null;
1736
- const n = t.slice(-2).join(".");
1737
- return Ut.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1738
- }
1739
- const Gt = /* @__PURE__ */ new Set([
1740
- "gmail.com",
1741
- "googlemail.com",
1742
- "outlook.com",
1743
- "hotmail.com",
1744
- "hotmail.nl",
1745
- "hotmail.be",
1746
- "hotmail.co.uk",
1747
- "live.com",
1748
- "live.nl",
1749
- "live.be",
1750
- "msn.com",
1751
- "yahoo.com",
1752
- "yahoo.co.uk",
1753
- "ymail.com",
1754
- "icloud.com",
1755
- "me.com",
1756
- "mac.com",
1757
- "aol.com",
1758
- "gmx.net",
1759
- "gmx.de",
1760
- "web.de",
1761
- "protonmail.com",
1762
- "proton.me",
1763
- "pm.me",
1764
- "tutanota.com",
1765
- "zoho.com",
1766
- "mail.com",
1767
- "ziggo.nl",
1768
- "kpnmail.nl",
1769
- "planet.nl",
1770
- "home.nl",
1771
- "casema.nl",
1772
- "chello.nl",
1773
- "xs4all.nl",
1774
- "telfort.nl",
1775
- "hetnet.nl",
1776
- "zonnet.nl",
1777
- "upcmail.nl",
1778
- "quicknet.nl",
1779
- "telenet.be",
1780
- "skynet.be",
1781
- "proximus.be",
1782
- "scarlet.be"
1783
- ]);
1784
- function Ni(e) {
1785
- const t = jt(e);
1786
- return t ? Gt.has(t) : !1;
1787
- }
1788
- function vi(e) {
1789
- if (!e) return !1;
1790
- const t = e.trim().toLowerCase();
1791
- return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1792
- }
1793
- function xi(e, t, n) {
1794
- if (!e || !t) return null;
1795
- const r = e.trim().toLowerCase();
1796
- if (r === "tel" || r === "sms" || r === "whatsapp") {
1797
- const a = re(t, n);
1798
- return a ? `tel:${a}` : null;
1799
- }
1800
- if (r === "fax") {
1801
- const a = re(t, n);
1802
- return a ? `fax:${a}` : null;
1803
- }
1804
- if (r === "mailto" || r === "email") {
1805
- const a = _e(t);
1806
- return a ? `mailto:${a}` : null;
1807
- }
1808
- const i = t.trim().toLowerCase();
1809
- return i ? `${r}:${i}` : null;
1810
- }
1811
- const Bt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Ft = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1812
- function Oi(e) {
1813
- if (typeof e != "string" || !e) return "";
1814
- let t = e;
1815
- 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(`
1816
- `).map(
1817
- (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,}$/, "")
1818
- ).join(`
1819
- `), t = t.replace(Bt, "$2"), t = t.replace(Ft, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1820
- }
1821
- const Vt = [
1822
- /<blockquote/i,
1823
- /class="?gmail_quote/i,
1824
- // Gmail quote container
1825
- /id="?[^"]*divRplyFwdMsg/i,
1826
- // Outlook web reply/forward header
1827
- /id="?[^"]*mail-editor-reference-message-container/i,
1828
- // Outlook new/"mail editor" quote container
1829
- /-{3,}\s*Original Message\s*-{3,}/i,
1830
- /\n_{5,}\s*\n/,
1831
- // Outlook underscore separator before "From:"
1832
- /\bOn\b[\s\S]{0,200}?\bwrote:/i
1833
- // Gmail "On <date> <name> wrote:"
1834
- ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ht = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1835
- function Wt(e) {
1836
- const t = e.split(`
1837
- `);
1838
- for (let n = 0; n < t.length; n++)
1839
- if (Ht.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1840
- return t.slice(0, n).join(`
1841
- `).trim();
1842
- return e;
1843
- }
1844
- function ae(e) {
1845
- let t = e;
1846
- return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
1847
- `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
1848
-
1849
- `), t = t.replace(/<\/(div|li|tr)>/gi, `
1850
- `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
1851
- }
1852
- function oe(e) {
1853
- return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
1854
- }
1855
- function se(e) {
1856
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => oe(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => oe(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1857
- }
1858
- function le(e) {
1859
- return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
1860
- `).replace(/\n{3,}/g, `
1861
-
1862
- `).trim();
1863
- }
1864
- function $i(e) {
1865
- if (typeof e != "string" || !e) return "";
1866
- let t = e.length;
1867
- for (const a of Vt) {
1868
- const o = e.search(a);
1869
- o >= 0 && o < t && (t = o);
1870
- }
1871
- const n = e.slice(0, t);
1872
- let r = le(se(ae(n)));
1873
- return r || (r = le(se(ae(e)))), Wt(r) || r;
1598
+ return kt(e, t) === "done";
1874
1599
  }
1875
- const zt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Xt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1876
- function Ri(e, t) {
1877
- return !!(e && zt.test(e) || t && Xt.test(t));
1600
+ function vt(e) {
1601
+ return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1878
1602
  }
1879
- const Yt = 3, qt = 600;
1880
- function Li(e, t) {
1881
- return e >= Yt || t >= qt;
1603
+ function Ii(e, t) {
1604
+ const n = vt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1605
+ if (!r.has(n)) return n;
1606
+ for (let i = 2; i < 500; i++) {
1607
+ const a = `${n}-${i}`;
1608
+ if (!r.has(a)) return a;
1609
+ }
1610
+ return `${n}-${r.size + 1}`;
1611
+ }
1612
+ function wi(e) {
1613
+ const t = [];
1614
+ if (!e.length) return [{ index: -1, reason: "empty" }];
1615
+ const n = /* @__PURE__ */ new Set();
1616
+ return e.forEach((r, i) => {
1617
+ if (!r.key) {
1618
+ t.push({ index: i, reason: "missing_key" });
1619
+ return;
1620
+ }
1621
+ ye.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
1622
+ }), 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;
1882
1623
  }
1883
- const Jt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Zt = /* @__PURE__ */ new Set([
1624
+ const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), xt = /* @__PURE__ */ new Set([
1884
1625
  "text/plain",
1885
1626
  "text/markdown",
1886
1627
  "text/csv",
@@ -1889,55 +1630,55 @@ const Jt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1889
1630
  "application/xml",
1890
1631
  "text/xml"
1891
1632
  ]);
1892
- function Qt(e) {
1633
+ function Ot(e) {
1893
1634
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1894
- return t ? Jt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Zt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1635
+ return t ? Nt.has(t) ? "image" : t === "application/pdf" ? "pdf" : xt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1895
1636
  }
1896
- const h = 1024 * 1024, en = {
1637
+ const h = 1024 * 1024, $t = {
1897
1638
  image: 5 * h,
1898
1639
  pdf: 20 * h,
1899
1640
  text: 1 * h,
1900
1641
  audio: 20 * h
1901
- }, Di = 25 * h, Pi = 5;
1902
- function Ki(e, t) {
1903
- const n = Qt(e);
1904
- return n === "unsupported" ? "unsupported" : t > en[n] ? "too-large" : null;
1642
+ }, Mi = 25 * h, ki = 5;
1643
+ function Ci(e, t) {
1644
+ const n = Ot(e);
1645
+ return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1905
1646
  }
1906
- function tn(e) {
1647
+ function Rt(e) {
1907
1648
  return `${e.kind}:${e.id || e.url || e.title}`;
1908
1649
  }
1909
- function Ui(e, t = []) {
1650
+ function vi(e, t = []) {
1910
1651
  const n = new Set(t), r = [], i = [];
1911
1652
  for (const a of e) {
1912
- const o = tn(a);
1653
+ const o = Rt(a);
1913
1654
  n.has(o) || (n.add(o), r.push(a), i.push(o));
1914
1655
  }
1915
1656
  return { sources: r, keys: i };
1916
1657
  }
1917
- function ji(e) {
1658
+ function Ni(e) {
1918
1659
  return e.sessions.filter(
1919
1660
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1920
1661
  );
1921
1662
  }
1922
- function Gi(e) {
1663
+ function xi(e) {
1923
1664
  return e.sessions.filter(
1924
1665
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1925
1666
  );
1926
1667
  }
1927
- function Bi(e) {
1668
+ function Oi(e) {
1928
1669
  return e.sessions.some(
1929
1670
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1930
1671
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1931
1672
  }
1932
- function nn(e, t) {
1933
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => an(o, r[o.intent]));
1673
+ function Lt(e, t) {
1674
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Pt(o, r[o.intent]));
1934
1675
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1935
1676
  const a = new Set(i.map((o) => o.intent));
1936
1677
  for (const o of e.extraIntents)
1937
1678
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1938
1679
  return i;
1939
1680
  }
1940
- function rn(e, t) {
1681
+ function Dt(e, t) {
1941
1682
  const n = {};
1942
1683
  for (const r of e.intents) {
1943
1684
  if (!r.togglable) continue;
@@ -1946,46 +1687,46 @@ function rn(e, t) {
1946
1687
  }
1947
1688
  return n;
1948
1689
  }
1949
- function Fi(e, t) {
1950
- const n = rn(e, t);
1690
+ function $i(e, t) {
1691
+ const n = Dt(e, t);
1951
1692
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1952
1693
  }
1953
- function an(e, t) {
1694
+ function Pt(e, t) {
1954
1695
  return t ? {
1955
1696
  intent: t.intent ?? e.intent,
1956
1697
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1957
1698
  transport: t.transport ?? e.transport
1958
1699
  } : e;
1959
1700
  }
1960
- function Vi(e, t) {
1701
+ function Ri(e, t) {
1961
1702
  const n = [];
1962
1703
  for (const r of e) {
1963
1704
  if (!r.enabled) continue;
1964
1705
  const i = t[r.providerId];
1965
1706
  if (i)
1966
- for (const a of nn(r, i))
1707
+ for (const a of Lt(r, i))
1967
1708
  n.push({ channel: r, description: i, capability: a });
1968
1709
  }
1969
1710
  return n;
1970
1711
  }
1971
- function Hi(e, t) {
1712
+ function Li(e, t) {
1972
1713
  return t.filter((n) => n.capability.intent === e);
1973
1714
  }
1974
- function on(e, t) {
1715
+ function Kt(e, t) {
1975
1716
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1976
1717
  }
1977
- function Wi(e, t) {
1978
- return on(e.scheme, t);
1718
+ function Di(e, t) {
1719
+ return Kt(e.scheme, t);
1979
1720
  }
1980
- function zi(e, t, n) {
1721
+ function Pi(e, t, n) {
1981
1722
  const r = [];
1982
1723
  for (const i of e)
1983
1724
  for (const a of n)
1984
1725
  a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1985
1726
  return r;
1986
1727
  }
1987
- var sn = /* @__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))(sn || {});
1988
- const ln = {
1728
+ var Ut = /* @__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))(Ut || {});
1729
+ const jt = {
1989
1730
  mailto: "mail",
1990
1731
  sip: "tel",
1991
1732
  tel: "tel",
@@ -1997,9 +1738,8 @@ const ln = {
1997
1738
  instagram: "chat",
1998
1739
  viber: "chat",
1999
1740
  whatsapp: "wa",
2000
- // Not ways of reaching a person: a webhook is a machine, a URL is a page,
2001
- // a calendar entry is an appointment, and username/id/custom say nothing
2002
- // about transport on their own.
1741
+ // Not ways of reaching a person: a webhook is a machine, a URL is a page, a
1742
+ // calendar entry is an appointment; username/id/custom say nothing about transport.
2003
1743
  webhook: "note",
2004
1744
  url: "note",
2005
1745
  calendar: "note",
@@ -2007,10 +1747,10 @@ const ln = {
2007
1747
  id: "note",
2008
1748
  custom: "note"
2009
1749
  };
2010
- function Xi(e) {
2011
- return e ? ln[e] ?? "note" : "note";
1750
+ function Ki(e) {
1751
+ return e ? jt[e] ?? "note" : "note";
2012
1752
  }
2013
- const Yi = "message_window", qi = "message_templates", Ji = {
1753
+ const Ui = "message_window", ji = "message_templates", Gi = {
2014
1754
  // E-mail
2015
1755
  FROM: "from",
2016
1756
  TO: "to",
@@ -2027,47 +1767,201 @@ const Yi = "message_window", qi = "message_templates", Ji = {
2027
1767
  // Voice/conference
2028
1768
  HOST: "host",
2029
1769
  PARTICIPANT: "participant"
2030
- }, Zi = (e, t) => ({ intent: e, ...t }), Qi = "folder_management", ea = "remote_search", ta = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, na = "resources.describe", ra = "resources.search", ia = "resources.resolve";
2031
- function aa(e) {
1770
+ }, Bi = (e, t) => ({ intent: e, ...t }), Fi = "folder_management", Vi = "remote_search", Hi = {
1771
+ ok: !1,
1772
+ code: "UNSUPPORTED",
1773
+ message: "Provider does not support this op"
1774
+ }, Wi = "installation-id", zi = {
1775
+ ai: [
1776
+ "account.read",
1777
+ "account.write",
1778
+ "agent.read",
1779
+ "agent.write",
1780
+ "assignment.read",
1781
+ "budget.read",
1782
+ "budget.write",
1783
+ "connector.read",
1784
+ "connector.write",
1785
+ "context.read",
1786
+ "context.write",
1787
+ "conversation.read",
1788
+ "conversation.write",
1789
+ "lens.read",
1790
+ "lens.write",
1791
+ "message.read",
1792
+ "message.write",
1793
+ "playbook.read",
1794
+ "playbook.write",
1795
+ "profile.read",
1796
+ "profile.write",
1797
+ "run.read",
1798
+ "run.write",
1799
+ "settings.read",
1800
+ "settings.write",
1801
+ "tool.read",
1802
+ "transcript.write",
1803
+ "usage.read"
1804
+ ],
1805
+ analytics: ["report.read"],
1806
+ "app-store": ["app.publish", "app.read", "app.write", "setting.read", "setting.write"],
1807
+ automations: ["sync.read", "sync.write", "webhook.read", "webhook.write"],
1808
+ communication: [
1809
+ "account.read",
1810
+ "account.write",
1811
+ "activity-type.read",
1812
+ "activity.read",
1813
+ "activity.write",
1814
+ "attachment.read",
1815
+ "attribute.read",
1816
+ "attribute.write",
1817
+ "calendar.read",
1818
+ "calendar.write",
1819
+ "channel.read",
1820
+ "channel.write",
1821
+ "custom-field.read",
1822
+ "custom-field.write",
1823
+ "folder.read",
1824
+ "folder.write",
1825
+ "inbox.read",
1826
+ "inbox.write",
1827
+ "interaction.read",
1828
+ "interaction.write",
1829
+ "reminder.read",
1830
+ "task.read",
1831
+ "task.write",
1832
+ "template.read",
1833
+ "template.write",
1834
+ "topic.read",
1835
+ "topic.write"
1836
+ ],
1837
+ context: ["kind.read", "kind.write", "memory.read", "memory.write"],
1838
+ crm: ["company.read", "company.write", "contact.read", "contact.write"],
1839
+ "eylo-voip": [
1840
+ "account.read",
1841
+ "account.write",
1842
+ "callflow.read",
1843
+ "callflow.write",
1844
+ "channel.read",
1845
+ "channel.write",
1846
+ "contact.read",
1847
+ "contact.write",
1848
+ "device.read",
1849
+ "device.write",
1850
+ "group.read",
1851
+ "group.write",
1852
+ "interaction.read",
1853
+ "interaction.write",
1854
+ "media.read",
1855
+ "media.write",
1856
+ "menu.read",
1857
+ "menu.write",
1858
+ "phone-number.read",
1859
+ "phone-number.write",
1860
+ "recording.read",
1861
+ "recording.write",
1862
+ "sip.read",
1863
+ "temporal-rule.read",
1864
+ "temporal-rule.write",
1865
+ "user.read",
1866
+ "user.write",
1867
+ "vmbox.read",
1868
+ "vmbox.write",
1869
+ "webhook.read",
1870
+ "webhook.write"
1871
+ ],
1872
+ google: ["account.read", "account.write", "contact.read"],
1873
+ kb: [
1874
+ "article.read",
1875
+ "article.write",
1876
+ "category.read",
1877
+ "category.write",
1878
+ "help-center.read",
1879
+ "help-center.write",
1880
+ "kb.read",
1881
+ "kb.write"
1882
+ ],
1883
+ mail: ["account.write"],
1884
+ meta: ["account.read", "account.write"],
1885
+ microsoft: ["account.read", "account.write", "contact.read", "sync.write"],
1886
+ organization: [
1887
+ "billing.read",
1888
+ "billing.write",
1889
+ "settings.read",
1890
+ "settings.write",
1891
+ "team.read",
1892
+ "team.write"
1893
+ ],
1894
+ shopify: ["account.read", "account.write", "order.read"],
1895
+ slack: ["thread.read", "thread.write"],
1896
+ storage: [
1897
+ "artifact.read",
1898
+ "artifact.write",
1899
+ "file.read",
1900
+ "file.write",
1901
+ "mount.read",
1902
+ "mount.write"
1903
+ ],
1904
+ time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
1905
+ user: ["user.read", "user.write"],
1906
+ work: ["item.read", "item.write", "project.read", "project.write"]
1907
+ }, Ae = 9e4, Gt = ["out_of_office"], be = (e) => Gt.includes(e);
1908
+ function Xi(e, t, n) {
1909
+ const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1910
+ if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1911
+ const a = i.status;
1912
+ return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1913
+ }
1914
+ function Yi(e, t) {
1915
+ const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
1916
+ return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1917
+ }
1918
+ function qi(e, t) {
1919
+ 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 };
1920
+ }
1921
+ function Ji(e) {
1922
+ return e.providerAvailable && e.allowed;
1923
+ }
1924
+ const Zi = "resources.describe", Qi = "resources.search", ea = "resources.resolve";
1925
+ function ta(e) {
2032
1926
  const t = e.indexOf(":");
2033
1927
  return t === -1 ? e : e.slice(0, t);
2034
1928
  }
2035
- const Te = "auth";
2036
- function Ie(e) {
1929
+ const Ee = "auth";
1930
+ function Se(e) {
2037
1931
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2038
1932
  return t ? t[1] : null;
2039
1933
  }
2040
- function oa(e) {
2041
- const t = Ie(e);
2042
- return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
1934
+ function na(e) {
1935
+ const t = Se(e);
1936
+ return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
2043
1937
  }
2044
- function sa(e) {
2045
- return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
1938
+ function ra(e) {
1939
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
2046
1940
  }
2047
- function cn(e) {
1941
+ function Bt(e) {
2048
1942
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2049
1943
  }
2050
- function un(e) {
2051
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + cn(r)).join("");
1944
+ function Ft(e) {
1945
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Bt(r)).join("");
2052
1946
  return new RegExp(`^${n}\\/?$`);
2053
1947
  }
2054
- function dn(e, t) {
1948
+ function Vt(e, t) {
2055
1949
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2056
1950
  return n.forEach((a, o) => {
2057
1951
  if (a.startsWith(":")) {
2058
- const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
2059
- l && (i[s] = l);
1952
+ const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), c = r[o];
1953
+ c && (i[s] = c);
2060
1954
  }
2061
1955
  }), i;
2062
1956
  }
2063
- function pn(e) {
1957
+ function Ht(e) {
2064
1958
  return e.publicBasePath ?? `/apps/${e.name}`;
2065
1959
  }
2066
- function la(e) {
1960
+ function ia(e) {
2067
1961
  const t = [];
2068
1962
  for (const n of e) {
2069
1963
  if (!n?.name) continue;
2070
- const r = pn(n);
1964
+ const r = Ht(n);
2071
1965
  for (const i of n.routes ?? []) {
2072
1966
  if (!i.public) continue;
2073
1967
  const a = i.path === "/" ? "" : i.path;
@@ -2081,7 +1975,7 @@ function la(e) {
2081
1975
  }
2082
1976
  return t;
2083
1977
  }
2084
- function fn(e, t) {
1978
+ function Wt(e, t) {
2085
1979
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2086
1980
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2087
1981
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2089,17 +1983,17 @@ function fn(e, t) {
2089
1983
  }
2090
1984
  return n.length > r.length;
2091
1985
  }
2092
- function mn(e, t) {
1986
+ function zt(e, t) {
2093
1987
  if (typeof e != "string") return null;
2094
1988
  let n = null;
2095
1989
  for (const r of t)
2096
- un(r.pattern).test(e) && (!n || fn(r.pattern, n.pattern)) && (n = r);
2097
- return n ? { ...n, params: { ...n.props, ...dn(n.pattern, e) } } : null;
1990
+ Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
1991
+ return n ? { ...n, params: { ...n.props, ...Vt(n.pattern, e) } } : null;
2098
1992
  }
2099
- function ca(e, t) {
2100
- return mn(e, t) !== null;
1993
+ function aa(e, t) {
1994
+ return zt(e, t) !== null;
2101
1995
  }
2102
- const ua = "sync-source", da = "sync-target", pa = 20, gn = {
1996
+ const oa = "sync-source", sa = "sync-target", ca = 20, Xt = {
2103
1997
  afrikaans: [
2104
1998
  "[Muziek]",
2105
1999
  "(C) TV GELDERLAND 2021",
@@ -2249,14 +2143,14 @@ const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2249
2143
  "[MÚSICA]",
2250
2144
  "[Music cuts in British]"
2251
2145
  ]
2252
- }, hn = (e) => {
2146
+ }, Yt = (e) => {
2253
2147
  let t = e;
2254
- return Object.values(gn).forEach((n) => {
2148
+ return Object.values(Xt).forEach((n) => {
2255
2149
  n.forEach((r) => {
2256
2150
  t = t.replaceAll(r, "");
2257
2151
  });
2258
2152
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2259
- }, yn = 6e4, An = 8e3, bn = 2, En = 0.4, Sn = 3, _n = /* @__PURE__ */ new Set([
2153
+ }, qt = 6e4, Jt = 8e3, Zt = 2, Qt = 0.4, en = 3, tn = /* @__PURE__ */ new Set([
2260
2154
  "aan",
2261
2155
  "als",
2262
2156
  "ben",
@@ -2369,13 +2263,13 @@ const ua = "sync-source", da = "sync-target", pa = 20, gn = {
2369
2263
  "you",
2370
2264
  "your"
2371
2265
  ]);
2372
- function Tn(e) {
2266
+ function nn(e) {
2373
2267
  const t = /* @__PURE__ */ new Set();
2374
2268
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2375
- n.length < Sn || _n.has(n) || t.add(n);
2269
+ n.length < en || tn.has(n) || t.add(n);
2376
2270
  return [...t];
2377
2271
  }
2378
- function In(e, t) {
2272
+ function rn(e, t) {
2379
2273
  if (!e.length) return 0;
2380
2274
  if (!t.length) return 1;
2381
2275
  const n = new Set(t), r = new Set(e);
@@ -2383,314 +2277,555 @@ function In(e, t) {
2383
2277
  for (const a of r) n.has(a) || (i += 1);
2384
2278
  return i / r.size;
2385
2279
  }
2386
- function Mn(e, t = yn) {
2280
+ function an(e, t = qt) {
2387
2281
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2388
2282
  if (!n.length) return { text: "", segmentCount: 0 };
2389
2283
  const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2390
- return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => hn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2284
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => Yt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2391
2285
  }
2392
- const Cn = 60;
2393
- function fa(e, t, n = Cn) {
2286
+ const on = 60;
2287
+ function la(e, t, n = on) {
2394
2288
  const r = new Set(e), i = [...e];
2395
2289
  for (const a of t)
2396
2290
  !a || r.has(a) || (r.add(a), i.push(a));
2397
2291
  return i.slice(-n);
2398
2292
  }
2399
- function ma(e) {
2293
+ function ua(e) {
2400
2294
  const { segments: t, now: n, state: r } = e;
2401
- if (r.lastTriggerAt && n - r.lastTriggerAt < An)
2295
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2402
2296
  return { trigger: !1, reason: "too_soon" };
2403
- const i = Mn(t, e.windowMs);
2297
+ const i = an(t, e.windowMs);
2404
2298
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2405
2299
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2406
- if (r.lastQueryTerms && a < bn)
2300
+ if (r.lastQueryTerms && a < Zt)
2407
2301
  return { trigger: !1, reason: "too_few_new" };
2408
- const o = Tn(i.text);
2409
- return o.length ? r.lastQueryTerms?.length && In(o, r.lastQueryTerms) < En ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2302
+ const o = nn(i.text);
2303
+ return o.length ? r.lastQueryTerms?.length && rn(o, r.lastQueryTerms) < Qt ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2410
2304
  }
2411
- const Me = 9e4, kn = ["out_of_office"], Ce = (e) => kn.includes(e);
2412
- function ga(e, t, n) {
2413
- const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2414
- if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2415
- const a = i.status;
2416
- return !r && !Ce(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2305
+ const x = {
2306
+ // The lower bounds are deliberately generous: service ranges (0800/0900) are
2307
+ // shorter than geographic numbers, and a too-strict minimum silently drops them.
2308
+ // An over-permissive key is harmless — it simply matches nothing.
2309
+ NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2310
+ BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
2311
+ LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
2312
+ DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
2313
+ FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2314
+ GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
2315
+ IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2316
+ ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
2317
+ PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
2318
+ IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
2319
+ AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2320
+ CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2321
+ DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
2322
+ SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2323
+ NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
2324
+ FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
2325
+ PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
2326
+ US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2327
+ CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2328
+ }, sn = "NL", cn = 15, ln = 8, un = Array.from(
2329
+ new Set(Object.values(x).map((e) => e.callingCode))
2330
+ ).sort((e, t) => t.length - e.length);
2331
+ function J(e) {
2332
+ if (e)
2333
+ return x[e.trim().toUpperCase()];
2417
2334
  }
2418
- function ha(e, t) {
2419
- const n = t - e.lastSeenAt < Me, r = n || Ce(e.status) ? e.status : "offline";
2420
- return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2335
+ function E(e, t) {
2336
+ return e.length >= t.nsnMin && e.length <= t.nsnMax;
2421
2337
  }
2422
- function ya(e, t) {
2423
- 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 };
2338
+ function Z(e) {
2339
+ if (e.length > cn) return null;
2340
+ for (const t of un) {
2341
+ if (!e.startsWith(t)) continue;
2342
+ const n = e.slice(t.length);
2343
+ for (const r of Object.values(x)) {
2344
+ if (r.callingCode !== t) continue;
2345
+ const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
2346
+ if (E(a, r)) return `+${t}${a}`;
2347
+ }
2348
+ return null;
2349
+ }
2350
+ return e.length < ln ? null : `+${e}`;
2351
+ }
2352
+ function dn(e) {
2353
+ let t = e.trim();
2354
+ const n = t.match(/^(sips?|tel|whatsapp):/i);
2355
+ n && (t = t.slice(n[0].length));
2356
+ const r = t.indexOf("@");
2357
+ return r >= 0 && (t = t.slice(0, r)), t.trim();
2358
+ }
2359
+ function da(e) {
2360
+ if (!e) return !1;
2361
+ const t = e.indexOf("@");
2362
+ if (t <= 0) return !1;
2363
+ const n = e.slice(0, t).trim();
2364
+ return !/^[+\d\s().-]+$/.test(n);
2365
+ }
2366
+ function Q(e, t) {
2367
+ if (!e) return null;
2368
+ const n = dn(e);
2369
+ if (!n) return null;
2370
+ const r = n.startsWith("+"), i = n.replace(/\D/g, "");
2371
+ if (!i) return null;
2372
+ if (r) return Z(i);
2373
+ if (i.startsWith("00")) return Z(i.slice(2));
2374
+ const a = J(t) ?? J(sn);
2375
+ if (!a) return null;
2376
+ const o = a.trunkPrefix;
2377
+ if (o && i.startsWith(o)) {
2378
+ const s = i.slice(o.length);
2379
+ return E(s, a) ? `+${a.callingCode}${s}` : null;
2380
+ }
2381
+ if (i.startsWith(a.callingCode)) {
2382
+ const s = i.slice(a.callingCode.length);
2383
+ if (E(s, a)) return `+${a.callingCode}${s}`;
2384
+ }
2385
+ return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2386
+ }
2387
+ function pa(e, t = 9) {
2388
+ const n = (e ?? "").replace(/\D/g, "");
2389
+ return n.length < t ? null : n.slice(-t);
2390
+ }
2391
+ function _e(e) {
2392
+ if (!e) return null;
2393
+ const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
2394
+ if (n <= 0 || n === t.length - 1) return null;
2395
+ const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2396
+ return !r || !i.includes(".") ? null : `${r}@${i}`;
2397
+ }
2398
+ function fa(e) {
2399
+ const t = _e(e);
2400
+ return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2401
+ }
2402
+ const pn = /* @__PURE__ */ new Set([
2403
+ "co.uk",
2404
+ "org.uk",
2405
+ "gov.uk",
2406
+ "ac.uk",
2407
+ "com.au",
2408
+ "co.nz",
2409
+ "com.br",
2410
+ "co.za"
2411
+ ]);
2412
+ function fn(e) {
2413
+ if (!e) return null;
2414
+ const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
2415
+ if (t.length < 2) return null;
2416
+ const n = t.slice(-2).join(".");
2417
+ return pn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2418
+ }
2419
+ const mn = /* @__PURE__ */ new Set([
2420
+ "gmail.com",
2421
+ "googlemail.com",
2422
+ "outlook.com",
2423
+ "hotmail.com",
2424
+ "hotmail.nl",
2425
+ "hotmail.be",
2426
+ "hotmail.co.uk",
2427
+ "live.com",
2428
+ "live.nl",
2429
+ "live.be",
2430
+ "msn.com",
2431
+ "yahoo.com",
2432
+ "yahoo.co.uk",
2433
+ "ymail.com",
2434
+ "icloud.com",
2435
+ "me.com",
2436
+ "mac.com",
2437
+ "aol.com",
2438
+ "gmx.net",
2439
+ "gmx.de",
2440
+ "web.de",
2441
+ "protonmail.com",
2442
+ "proton.me",
2443
+ "pm.me",
2444
+ "tutanota.com",
2445
+ "zoho.com",
2446
+ "mail.com",
2447
+ "ziggo.nl",
2448
+ "kpnmail.nl",
2449
+ "planet.nl",
2450
+ "home.nl",
2451
+ "casema.nl",
2452
+ "chello.nl",
2453
+ "xs4all.nl",
2454
+ "telfort.nl",
2455
+ "hetnet.nl",
2456
+ "zonnet.nl",
2457
+ "upcmail.nl",
2458
+ "quicknet.nl",
2459
+ "telenet.be",
2460
+ "skynet.be",
2461
+ "proximus.be",
2462
+ "scarlet.be"
2463
+ ]);
2464
+ function ma(e) {
2465
+ const t = fn(e);
2466
+ return t ? mn.has(t) : !1;
2467
+ }
2468
+ function ga(e) {
2469
+ if (!e) return !1;
2470
+ const t = e.trim().toLowerCase();
2471
+ return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2472
+ }
2473
+ function ha(e, t, n) {
2474
+ if (!e || !t) return null;
2475
+ const r = e.trim().toLowerCase();
2476
+ if (r === "tel" || r === "sms" || r === "whatsapp") {
2477
+ const a = Q(t, n);
2478
+ return a ? `tel:${a}` : null;
2479
+ }
2480
+ if (r === "fax") {
2481
+ const a = Q(t, n);
2482
+ return a ? `fax:${a}` : null;
2483
+ }
2484
+ if (r === "mailto" || r === "email") {
2485
+ const a = _e(t);
2486
+ return a ? `mailto:${a}` : null;
2487
+ }
2488
+ const i = t.trim().toLowerCase();
2489
+ return i ? `${r}:${i}` : null;
2490
+ }
2491
+ const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2492
+ function ya(e) {
2493
+ if (typeof e != "string" || !e) return "";
2494
+ let t = e;
2495
+ 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(`
2496
+ `).map(
2497
+ (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,}$/, "")
2498
+ ).join(`
2499
+ `), t = t.replace(gn, "$2"), t = t.replace(hn, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
2500
+ }
2501
+ const yn = [
2502
+ /<blockquote/i,
2503
+ /class="?gmail_quote/i,
2504
+ // Gmail quote container
2505
+ /id="?[^"]*divRplyFwdMsg/i,
2506
+ // Outlook web reply/forward header
2507
+ /id="?[^"]*mail-editor-reference-message-container/i,
2508
+ // Outlook new/"mail editor" quote container
2509
+ /-{3,}\s*Original Message\s*-{3,}/i,
2510
+ /\n_{5,}\s*\n/,
2511
+ // Outlook underscore separator before "From:"
2512
+ /\bOn\b[\s\S]{0,200}?\bwrote:/i
2513
+ // Gmail "On <date> <name> wrote:"
2514
+ ], ee = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, An = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2515
+ function bn(e) {
2516
+ const t = e.split(`
2517
+ `);
2518
+ for (let n = 0; n < t.length; n++)
2519
+ if (An.test(t[n]) || ee.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ee.test(r)))
2520
+ return t.slice(0, n).join(`
2521
+ `).trim();
2522
+ return e;
2523
+ }
2524
+ function te(e) {
2525
+ let t = e;
2526
+ return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
2527
+ `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
2528
+
2529
+ `), t = t.replace(/<\/(div|li|tr)>/gi, `
2530
+ `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
2531
+ }
2532
+ function ne(e) {
2533
+ return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
2534
+ }
2535
+ function re(e) {
2536
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => ne(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ne(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2537
+ }
2538
+ function ie(e) {
2539
+ return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
2540
+ `).replace(/\n{3,}/g, `
2541
+
2542
+ `).trim();
2424
2543
  }
2425
2544
  function Aa(e) {
2426
- return e.providerAvailable && e.allowed;
2545
+ if (typeof e != "string" || !e) return "";
2546
+ let t = e.length;
2547
+ for (const a of yn) {
2548
+ const o = e.search(a);
2549
+ o >= 0 && o < t && (t = o);
2550
+ }
2551
+ const n = e.slice(0, t);
2552
+ let r = ie(re(te(n)));
2553
+ return r || (r = ie(re(te(e)))), bn(r) || r;
2554
+ }
2555
+ const En = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Sn = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
2556
+ function ba(e, t) {
2557
+ return !!(e && En.test(e) || t && Sn.test(t));
2558
+ }
2559
+ const _n = 3, Tn = 600;
2560
+ function Ea(e, t) {
2561
+ return e >= _n || t >= Tn;
2427
2562
  }
2428
- const ba = "installation-id";
2429
2563
  export {
2430
2564
  m as ACTIVITY_CATALOG,
2431
- en as AI_ATTACHMENT_LIMITS,
2432
- Pi as AI_ATTACHMENT_MAX_PER_TURN,
2433
- Di as AI_ATTACHMENT_TURN_BUDGET,
2434
- be as AI_VENDORS,
2435
- Fe as ALLOWED_LINK_SCHEMES,
2436
- B as ARTIFACT_MAX_BLOCKS,
2437
- qn as ARTIFACT_MAX_BODY_BYTES,
2438
- N as ARTIFACT_MAX_CELL_LEN,
2439
- W as ARTIFACT_MAX_KPI_ITEMS,
2440
- F as ARTIFACT_MAX_LIST_ITEMS,
2441
- H as ARTIFACT_MAX_TABLE_COLUMNS,
2442
- V as ARTIFACT_MAX_TABLE_ROWS,
2443
- de as ARTIFACT_MAX_TEXT_LEN,
2444
- Ze as ASSIGNMENT_SCOPE_KIND,
2445
- Te as AUTH_APP_NAME,
2446
- $e as ActivityTypeRegistry,
2447
- Bn as BUILT_IN_ONLY,
2448
- An as CADENCE_FLOOR_MS,
2449
- bn as CADENCE_MIN_NEW_SEGMENTS,
2450
- En as CADENCE_MIN_NOVELTY,
2451
- yn as CADENCE_WINDOW_MS,
2452
- pr as CLASSIFY_VARS,
2453
- Wn as CORE_DIMENSIONS,
2454
- sn as CommunicationScheme,
2455
- oi as DEFAULT_MEMORY_BUDGET,
2456
- Rt as DEFAULT_PHONE_REGION,
2457
- Sr as EMPTY_WORKFLOW,
2458
- Qi as FEATURE_FOLDER_MANAGEMENT,
2459
- ea as FEATURE_REMOTE_SEARCH,
2460
- ba as INSTALLATION_HEADER,
2461
- st as INTERACTION_KIND,
2462
- Ji as InteractionParticipantRole,
2463
- gt as KB_FALLBACK_LOCALE,
2464
- Z as KB_LOCALES,
2465
- $ as LOOSE_STATUSES,
2466
- M as MAX_ACTIONS,
2467
- Qe as MAX_ASSIGNMENT_TURNS,
2468
- L as MAX_BLOCKS,
2469
- ye as MAX_COLLECTION_DEPTH,
2470
- T as MAX_FIELDS,
2471
- I as MAX_LIST_ITEMS,
2472
- ni as MAX_MEMORY_BROWSE,
2473
- ai as MAX_MEMORY_BUDGET,
2474
- ri as MAX_MEMORY_CHARS,
2475
- Cn as MAX_SHOWN_KEYS,
2476
- At as MAX_TOPIC_CANDIDATES,
2477
- yt as MAX_TOPIC_EXAMPLES,
2478
- v as MAX_TOPIC_EXAMPLE_CHARS,
2479
- ii as MIN_MEMORY_BUDGET,
2480
- R as PHONE_REGIONS,
2481
- Me as PRESENCE_ONLINE_WINDOW_MS,
2482
- kn as PRESENCE_SURVIVES_OFFLINE,
2483
- qi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2484
- Yi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2485
- Gt as PUBLIC_EMAIL_DOMAINS,
2486
- q as READ_STEP_TYPES,
2487
- It as RELATED_SUBJECT_KINDS,
2488
- Se as RESERVED_STATUS_KEYS,
2489
- na as RESOURCE_DESCRIBE_SERVICE,
2490
- ia as RESOURCE_RESOLVE_SERVICE,
2491
- ra as RESOURCE_SEARCH_SERVICE,
2492
- Xr as SIGNATURE_INTENTS,
2493
- ut as STEP_MAX_TOKENS_MAX,
2494
- ct as STEP_MAX_TOKENS_MIN,
2495
- qt as SUMMARY_MIN_LAST_CHARS,
2496
- Yt as SUMMARY_MIN_MESSAGES,
2497
- pa as SYNC_RUN_MAX_ERRORS,
2498
- ua as SYNC_SOURCE_PROVIDER_GROUP,
2499
- da as SYNC_TARGET_PROVIDER_GROUP,
2500
- Je as TERMINAL_ASSIGNMENT_STATUSES,
2501
- dt as TERMINAL_RUN_STATUSES,
2502
- dr as TRIGGER_VARS,
2503
- ta as UNSUPPORTED,
2504
- Ue as USAGE_DIMENSIONS,
2505
- je as USAGE_DIMENSION_IDS,
2506
- kt as WORK_ITEM_SCOPE_KIND,
2507
- wt as WORK_PROJECT_SCOPE_KIND,
2508
- Dr as acceptExampleCandidate,
2509
- nt as actingIdentityKey,
2510
- mi as activeWorkTypes,
2511
- xn as activityIconOf,
2512
- Gn as activityJoinUrl,
2513
- ve as activitySnippet,
2514
- xe as activityTextParams,
2515
- jn as activityTimelineText,
2516
- Hn as activityTimestamp,
2565
+ $t as AI_ATTACHMENT_LIMITS,
2566
+ ki as AI_ATTACHMENT_MAX_PER_TURN,
2567
+ Mi as AI_ATTACHMENT_TURN_BUDGET,
2568
+ oe as AI_VENDORS,
2569
+ je as ALLOWED_LINK_SCHEMES,
2570
+ zi as APP_PERMISSIONS,
2571
+ U as ARTIFACT_MAX_BLOCKS,
2572
+ ir as ARTIFACT_MAX_BODY_BYTES,
2573
+ M as ARTIFACT_MAX_CELL_LEN,
2574
+ F as ARTIFACT_MAX_KPI_ITEMS,
2575
+ j as ARTIFACT_MAX_LIST_ITEMS,
2576
+ B as ARTIFACT_MAX_TABLE_COLUMNS,
2577
+ G as ARTIFACT_MAX_TABLE_ROWS,
2578
+ ce as ARTIFACT_MAX_TEXT_LEN,
2579
+ Ye as ASSIGNMENT_SCOPE_KIND,
2580
+ Ee as AUTH_APP_NAME,
2581
+ Ne as ActivityTypeRegistry,
2582
+ Gn as BUILT_IN_ONLY,
2583
+ Jt as CADENCE_FLOOR_MS,
2584
+ Zt as CADENCE_MIN_NEW_SEGMENTS,
2585
+ Qt as CADENCE_MIN_NOVELTY,
2586
+ qt as CADENCE_WINDOW_MS,
2587
+ qr as CLASSIFY_VARS,
2588
+ tr as CORE_DIMENSIONS,
2589
+ Ut as CommunicationScheme,
2590
+ Ur as DEFAULT_MEMORY_BUDGET,
2591
+ sn as DEFAULT_PHONE_REGION,
2592
+ Zr as EMPTY_WORKFLOW,
2593
+ Fi as FEATURE_FOLDER_MANAGEMENT,
2594
+ Vi as FEATURE_REMOTE_SEARCH,
2595
+ Wi as INSTALLATION_HEADER,
2596
+ ut as INTERACTION_KIND,
2597
+ Gi as InteractionParticipantRole,
2598
+ et as KB_FALLBACK_LOCALE,
2599
+ z as KB_LOCALES,
2600
+ N as LOOSE_STATUSES,
2601
+ kn as MAX_ACTIONS,
2602
+ qe as MAX_ASSIGNMENT_TURNS,
2603
+ In as MAX_BLOCKS,
2604
+ fe as MAX_COLLECTION_DEPTH,
2605
+ wn as MAX_FIELDS,
2606
+ Mn as MAX_LIST_ITEMS,
2607
+ Lr as MAX_MEMORY_BROWSE,
2608
+ Kr as MAX_MEMORY_BUDGET,
2609
+ Dr as MAX_MEMORY_CHARS,
2610
+ on as MAX_SHOWN_KEYS,
2611
+ bt as MAX_TOPIC_CANDIDATES,
2612
+ At as MAX_TOPIC_EXAMPLES,
2613
+ k as MAX_TOPIC_EXAMPLE_CHARS,
2614
+ Pr as MIN_MEMORY_BUDGET,
2615
+ x as PHONE_REGIONS,
2616
+ Ae as PRESENCE_ONLINE_WINDOW_MS,
2617
+ Gt as PRESENCE_SURVIVES_OFFLINE,
2618
+ ji as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2619
+ Ui as PROVIDER_FEATURE_MESSAGE_WINDOW,
2620
+ mn as PUBLIC_EMAIL_DOMAINS,
2621
+ X as READ_STEP_TYPES,
2622
+ rt as RELATED_SUBJECT_KINDS,
2623
+ ye as RESERVED_STATUS_KEYS,
2624
+ Zi as RESOURCE_DESCRIBE_SERVICE,
2625
+ ea as RESOURCE_RESOLVE_SERVICE,
2626
+ Qi as RESOURCE_SEARCH_SERVICE,
2627
+ yr as SIGNATURE_INTENTS,
2628
+ ft as STEP_MAX_TOKENS_MAX,
2629
+ pt as STEP_MAX_TOKENS_MIN,
2630
+ Tn as SUMMARY_MIN_LAST_CHARS,
2631
+ _n as SUMMARY_MIN_MESSAGES,
2632
+ ca as SYNC_RUN_MAX_ERRORS,
2633
+ oa as SYNC_SOURCE_PROVIDER_GROUP,
2634
+ sa as SYNC_TARGET_PROVIDER_GROUP,
2635
+ Xe as TERMINAL_ASSIGNMENT_STATUSES,
2636
+ mt as TERMINAL_RUN_STATUSES,
2637
+ Yr as TRIGGER_VARS,
2638
+ Hi as UNSUPPORTED,
2639
+ De as USAGE_DIMENSIONS,
2640
+ Pe as USAGE_DIMENSION_IDS,
2641
+ Tt as WORK_ITEM_SCOPE_KIND,
2642
+ It as WORK_PROJECT_SCOPE_KIND,
2643
+ fi as acceptExampleCandidate,
2644
+ at as actingIdentityKey,
2645
+ di as activeWorkTypes,
2646
+ vn as activityIconOf,
2647
+ Un as activityJoinUrl,
2648
+ Me as activitySnippet,
2649
+ ke as activityTextParams,
2650
+ Kn as activityTimelineText,
2651
+ Fn as activityTimestamp,
2517
2652
  d as activityTypeInfo,
2518
- gr as actorKey,
2519
- Lr as addExampleCandidate,
2520
- ha as agePresenceEntry,
2521
- Qt as aiAttachmentKind,
2522
- Ki as aiAttachmentRejection,
2523
- ee as aiBudgetLimit,
2524
- Vr as aiBudgetPeriodKey,
2525
- _t as aiBudgetPeriodStart,
2526
- Fr as aiBudgetState,
2527
- Br as aiVendorAcceptsAttachment,
2528
- Ur as aiVendorDefaultModel,
2529
- Kr as aiVendorLabel,
2530
- Gr as aiVendorNeedsBaseUrl,
2531
- jr as aiVendorsWith,
2532
- Ie as appNameFromPath,
2533
- ci as applyRounding,
2534
- Yr as applySignature,
2535
- Zn as artifactBodyBytes,
2536
- Qn as artifactOutline,
2537
- er as artifactToMarkdown,
2538
- br as assignmentMismatch,
2539
- ar as assignmentScopeKey,
2540
- sr as assignmentSubject,
2541
- Fn as buildActivityPreview,
2542
- Vi as buildChannelIntents,
2543
- tr as buildShareKeys,
2544
- Mn as buildWindow,
2545
- Or as canNestUnder,
2546
- Ln as carriesText,
2547
- Rr as categoryLabel,
2548
- xt as categoryOf,
2549
- Xi as channelKindForScheme,
2550
- On as channelKindOf,
2551
- Er as clampStepMaxTokens,
2552
- $i as cleanMessageText,
2553
- Ct as compareWorkTypes,
2554
- lr as decideAssignmentState,
2555
- ma as decideCadence,
2556
- Bi as decideIncomingCall,
2557
- ht as defaultLocaleOf,
2653
+ Fr as actorKey,
2654
+ pi as addExampleCandidate,
2655
+ Yi as agePresenceEntry,
2656
+ Ot as aiAttachmentKind,
2657
+ Ci as aiAttachmentRejection,
2658
+ K as aiBudgetLimit,
2659
+ Zn as aiBudgetPeriodKey,
2660
+ xe as aiBudgetPeriodStart,
2661
+ Jn as aiBudgetState,
2662
+ qn as aiVendorAcceptsAttachment,
2663
+ zn as aiVendorDefaultModel,
2664
+ Wn as aiVendorLabel,
2665
+ Yn as aiVendorNeedsBaseUrl,
2666
+ Xn as aiVendorsWith,
2667
+ Se as appNameFromPath,
2668
+ oi as applyRounding,
2669
+ Ar as applySignature,
2670
+ or as artifactBodyBytes,
2671
+ sr as artifactOutline,
2672
+ cr as artifactToMarkdown,
2673
+ zr as assignmentMismatch,
2674
+ fr as assignmentScopeKey,
2675
+ gr as assignmentSubject,
2676
+ jn as buildActivityPreview,
2677
+ Ri as buildChannelIntents,
2678
+ lr as buildShareKeys,
2679
+ an as buildWindow,
2680
+ vr as canNestUnder,
2681
+ $n as carriesText,
2682
+ xr as categoryLabel,
2683
+ kt as categoryOf,
2684
+ Ki as channelKindForScheme,
2685
+ Nn as channelKindOf,
2686
+ Jr as clampStepMaxTokens,
2687
+ Aa as cleanMessageText,
2688
+ yt as compareWorkTypes,
2689
+ hr as decideAssignmentState,
2690
+ ua as decideCadence,
2691
+ Oi as decideIncomingCall,
2692
+ tt as defaultLocaleOf,
2558
2693
  _i as defaultStatusKey,
2559
- Zi as defineIntent,
2560
- ft as depthOf,
2561
- ga as derivePresence,
2562
- Fi as disabledIntentsFromCapabilities,
2563
- li as elapsedSeconds,
2564
- wi as emailDomain,
2565
- xi as endpointKey,
2566
- dn as extractParams,
2567
- Tn as extractTerms,
2568
- Wi as filterByEndpoint,
2569
- Hi as filterByIntent,
2570
- on as filterByTargetScheme,
2694
+ Bi as defineIntent,
2695
+ Ze as depthOf,
2696
+ Xi as derivePresence,
2697
+ $i as disabledIntentsFromCapabilities,
2698
+ ai as elapsedSeconds,
2699
+ fa as emailDomain,
2700
+ ha as endpointKey,
2701
+ Vt as extractParams,
2702
+ nn as extractTerms,
2703
+ Di as filterByEndpoint,
2704
+ Li as filterByIntent,
2705
+ Kt as filterByTargetScheme,
2571
2706
  S as findAiVendor,
2572
- zn as flattenLocales,
2573
- De as floorToPeriod,
2574
- tt as formatActingIdentity,
2575
- di as formatClock,
2576
- ui as formatHm,
2707
+ er as flattenLocales,
2708
+ $e as floorToPeriod,
2709
+ it as formatActingIdentity,
2710
+ ci as formatClock,
2711
+ si as formatHm,
2577
2712
  hi as formatItemKey,
2578
- Le as formatPeriod,
2579
- Ui as freshSources,
2580
- Vn as getActivitySeenUserIds,
2581
- qr as getContactEndpoints,
2582
- ei as getShortTitle,
2583
- Qr as getUrgencyScore,
2584
- Ae as heightOf,
2585
- Nr as helpCenterText,
2586
- ur as humanizeAction,
2587
- lt as interactionIdOf,
2713
+ Oe as formatPeriod,
2714
+ vi as freshSources,
2715
+ Bn as getActivitySeenUserIds,
2716
+ br as getContactEndpoints,
2717
+ Tr as getShortTitle,
2718
+ _r as getUrgencyScore,
2719
+ me as heightOf,
2720
+ Mr as helpCenterText,
2721
+ Xr as humanizeAction,
2722
+ dt as interactionIdOf,
2588
2723
  gi as isAgentUser,
2589
- Jr as isAssigned,
2590
- ir as isAssignmentTerminal,
2591
- at as isAssignmentTrigger,
2592
- Nn as isChatMessageActivity,
2593
- Zr as isClosed,
2594
- Kn as isConnectedType,
2595
- oa as isDeepLink,
2596
- mt as isDescendant,
2597
- wn as isEmailActivity,
2598
- Mr as isInFlight,
2599
- ti as isInteractionUnseen,
2600
- sa as isLandingPath,
2601
- Ri as isLikelyBulk,
2602
- ce as isMessageShape,
2603
- $n as isMessageType,
2604
- fn as isMoreSpecificPattern,
2605
- pt as isPaused,
2606
- Pn as isPlaybookAuthoredType,
2607
- Ni as isPublicEmailDomain,
2608
- ca as isPublicPath,
2609
- Rn as isReplyableType,
2610
- Ir as isTerminal,
2611
- Li as isThreadLongEnough,
2612
- Un as isTranscriptType,
2724
+ Er as isAssigned,
2725
+ pr as isAssignmentTerminal,
2726
+ ct as isAssignmentTrigger,
2727
+ Hn as isChatMessageActivity,
2728
+ Sr as isClosed,
2729
+ Dn as isConnectedType,
2730
+ na as isDeepLink,
2731
+ Qe as isDescendant,
2732
+ Vn as isEmailActivity,
2733
+ ni as isInFlight,
2734
+ Ir as isInteractionUnseen,
2735
+ ra as isLandingPath,
2736
+ ba as isLikelyBulk,
2737
+ ae as isMessageShape,
2738
+ xn as isMessageType,
2739
+ Wt as isMoreSpecificPattern,
2740
+ gt as isPaused,
2741
+ Ln as isPlaybookAuthoredType,
2742
+ ma as isPublicEmailDomain,
2743
+ aa as isPublicPath,
2744
+ On as isReplyableType,
2745
+ ti as isTerminal,
2746
+ Ea as isThreadLongEnough,
2747
+ Pn as isTranscriptType,
2613
2748
  Ti as isWorkClosed,
2614
- fi as isWorkTypeVisible,
2749
+ ui as isWorkTypeVisible,
2615
2750
  bi as itemDossierKeys,
2616
- vt as ladderFor,
2751
+ Mt as ladderFor,
2617
2752
  wr as linkLabel,
2618
- Hr as listeningAllowed,
2619
- xr as localeInstruction,
2620
- vr as localeName,
2621
- $r as localesOf,
2622
- Ci as looksLikeEmail,
2623
- zi as matchContactToIntents,
2624
- mn as matchPublicRoute,
2625
- Wr as mcpCredentialScope,
2626
- zr as mcpToolPrefix,
2627
- fa as mergeShownKeys,
2628
- Dn as messageCountsAs,
2629
- vi as needsPhoneRegion,
2630
- Jn as normalizeArtifactBlocks,
2631
- vn as normalizeBlocks,
2753
+ Qn as listeningAllowed,
2754
+ Cr as localeInstruction,
2755
+ kr as localeName,
2756
+ Nr as localesOf,
2757
+ da as looksLikeEmail,
2758
+ Pi as matchContactToIntents,
2759
+ zt as matchPublicRoute,
2760
+ $r as mcpCredentialScope,
2761
+ Rr as mcpToolPrefix,
2762
+ la as mergeShownKeys,
2763
+ Rn as messageCountsAs,
2764
+ ga as needsPhoneRegion,
2765
+ ar as normalizeArtifactBlocks,
2766
+ Cn as normalizeBlocks,
2632
2767
  _e as normalizeEmail,
2633
2768
  g as normalizeExample,
2634
- In as novelty,
2635
- fr as parseActingIdentity,
2769
+ rn as novelty,
2770
+ Gr as parseActingIdentity,
2636
2771
  yi as parseItemKey,
2637
- un as pathToRegex,
2638
- Xn as periodsInRange,
2639
- ki as phoneSuffix,
2640
- Oi as plainTextFromMarkdown,
2641
- it as playbookActor,
2642
- Tr as procedureOf,
2772
+ Ft as pathToRegex,
2773
+ nr as periodsInRange,
2774
+ pa as phoneSuffix,
2775
+ ya as plainTextFromMarkdown,
2776
+ st as playbookActor,
2777
+ ei as procedureOf,
2643
2778
  Ei as projectDossierKeys,
2644
- pn as publicBasePathFor,
2645
- la as publicRoutePatterns,
2646
- x as readPath,
2647
- J as readStepError,
2648
- ot as refKey,
2649
- jt as registrableDomain,
2650
- Et as rejectExampleCandidate,
2651
- si as relatedByDefault,
2652
- rn as resolveAccountCapabilities,
2653
- O as resolveActivityText,
2654
- nn as resolveChannelIntents,
2655
- Tt as resolveSignature,
2656
- ya as resolveWorkMode,
2657
- aa as resourceKindOf,
2658
- mr as runActor,
2659
- kr as runInteractionId,
2660
- ze as sanitizeInline,
2661
- hn as sanitizeTranscript,
2662
- cr as selectLenses,
2663
- Gi as sessionsHoldCannotReach,
2664
- ji as sessionsToHold,
2665
- me as shareKeyForTeam,
2666
- fe as shareKeyForUser,
2667
- nr as shareKeysForViewer,
2668
- Aa as shouldRunAudioPipeline,
2669
- Ot as sortStatuses,
2670
- tn as sourceKey,
2779
+ Ht as publicBasePathFor,
2780
+ ia as publicRoutePatterns,
2781
+ C as readPath,
2782
+ Y as readStepError,
2783
+ lt as refKey,
2784
+ fn as registrableDomain,
2785
+ St as rejectExampleCandidate,
2786
+ jr as relatedByDefault,
2787
+ Dt as resolveAccountCapabilities,
2788
+ v as resolveActivityText,
2789
+ Lt as resolveChannelIntents,
2790
+ Je as resolveSignature,
2791
+ qi as resolveWorkMode,
2792
+ ta as resourceKindOf,
2793
+ Br as runActor,
2794
+ ii as runInteractionId,
2795
+ Ve as sanitizeInline,
2796
+ Yt as sanitizeTranscript,
2797
+ Or as selectLenses,
2798
+ xi as sessionsHoldCannotReach,
2799
+ Ni as sessionsToHold,
2800
+ de as shareKeyForTeam,
2801
+ ue as shareKeyForUser,
2802
+ ur as shareKeysForViewer,
2803
+ Ji as shouldRunAudioPipeline,
2804
+ Ct as sortStatuses,
2805
+ Rt as sourceKey,
2671
2806
  Si as statusIn,
2672
- _r as stepsOf,
2673
- Ne as stripHtml,
2674
- Cr as subjectKeyOf,
2807
+ Qr as stepsOf,
2808
+ we as stripHtml,
2809
+ ri as subjectKeyOf,
2675
2810
  ge as subjectOf,
2676
2811
  Ai as suggestProjectKey,
2677
- Ar as targetById,
2678
- yr as targetForActivityType,
2679
- rt as toActingIdentity,
2680
- re as toE164,
2681
- rr as toolSourceKinds,
2682
- St as topicOfferedForTeam,
2683
- Pr as topicsForTeam,
2684
- bt as truncateExample,
2812
+ Wr as targetById,
2813
+ Hr as targetForActivityType,
2814
+ ot as toActingIdentity,
2815
+ Q as toE164,
2816
+ dr as toolSourceKinds,
2817
+ _t as topicOfferedForTeam,
2818
+ mi as topicsForTeam,
2819
+ Et as truncateExample,
2685
2820
  Ii as uniqueWorkStatusKey,
2686
- pi as uniqueWorkTypeKey,
2687
- Ge as usageMetricId,
2688
- Yn as usageMetrics,
2689
- Mi as validateStatuses,
2690
- hr as valueAtPath,
2691
- or as wakesAssignment,
2692
- Nt as workItemScopeKey,
2693
- Ee as workProjectScopeKey,
2694
- $t as workStatusKey,
2695
- Mt as workTypeKey
2821
+ li as uniqueWorkTypeKey,
2822
+ Ke as usageMetricId,
2823
+ rr as usageMetrics,
2824
+ wi as validateStatuses,
2825
+ Vr as valueAtPath,
2826
+ mr as wakesAssignment,
2827
+ wt as workItemScopeKey,
2828
+ he as workProjectScopeKey,
2829
+ vt as workStatusKey,
2830
+ ht as workTypeKey
2696
2831
  };