@opencxh/domain 1.172.2 → 1.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ function A(e) {
77
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
78
78
  return `${t}:${n.toString().padStart(2, "0")}`;
79
79
  }
80
- function O(e) {
80
+ function x(e) {
81
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
82
82
  }
83
83
  function I(e) {
@@ -124,7 +124,7 @@ const m = {
124
124
  channelKind: "voice",
125
125
  icon: "phone",
126
126
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
127
- timeline: (e) => `Call ended${O(e.payload.duration)}`
127
+ timeline: (e) => `Call ended${x(e.payload.duration)}`
128
128
  },
129
129
  VOICE_CALL_MISSED: {
130
130
  shape: "event",
@@ -281,7 +281,7 @@ const m = {
281
281
  channelKind: "chat",
282
282
  icon: "message-circle",
283
283
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
284
- timeline: (e) => `${$(e.payload.callType)} ended${O(e.payload.duration)}`,
284
+ timeline: (e) => `${$(e.payload.callType)} ended${x(e.payload.duration)}`,
285
285
  joinUrl: (e) => e.payload.joinUrl
286
286
  },
287
287
  CHAT_EVENT: {
@@ -405,6 +405,24 @@ const m = {
405
405
  icon: "user",
406
406
  snippet: () => "Interactie toegewezen",
407
407
  timeline: (e, t) => `Assigned by ${t}`
408
+ },
409
+ /* ---- work items ---- */
410
+ /**
411
+ * `shape: "note"` is load-bearing: it makes `isMessageShape` → `isMessageType` →
412
+ * `isReplySignal` accept a work comment as an answer, so the AI wake path needs no
413
+ * type list of its own.
414
+ */
415
+ WORK_COMMENT_ADDED: {
416
+ shape: "note",
417
+ icon: "sticky-note",
418
+ carriesText: !0,
419
+ snippet: () => "Reactie"
420
+ },
421
+ WORK_ITEM_ASSIGNED: {
422
+ shape: "event",
423
+ icon: "user",
424
+ snippet: () => "Taak toegewezen",
425
+ timeline: (e, t) => `Assigned by ${t}`
408
426
  }
409
427
  };
410
428
  function R(e) {
@@ -414,19 +432,19 @@ function R(e) {
414
432
  function d(e) {
415
433
  return m[e];
416
434
  }
417
- function vn(e) {
435
+ function Nn(e) {
418
436
  return d(e)?.icon ?? "circle";
419
437
  }
420
- function Nn(e) {
438
+ function vn(e) {
421
439
  return d(e)?.channelKind;
422
440
  }
423
441
  function ae(e) {
424
442
  return e === "message" || e === "note";
425
443
  }
426
- function xn(e) {
444
+ function On(e) {
427
445
  return ae(d(e)?.shape);
428
446
  }
429
- function On(e) {
447
+ function xn(e) {
430
448
  return d(e)?.replyable === !0;
431
449
  }
432
450
  function $n(e) {
@@ -465,7 +483,7 @@ function C(e, t) {
465
483
  }
466
484
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
467
485
  }
468
- function v(e, t, n) {
486
+ function N(e, t, n) {
469
487
  if (e === void 0) return null;
470
488
  if (typeof e == "string") return e || null;
471
489
  if ("value" in e)
@@ -489,7 +507,7 @@ function Ce(e) {
489
507
  return t.length <= L ? t : t.slice(0, L - 1).trimEnd() + "…";
490
508
  }
491
509
  function jn(e, t) {
492
- const n = ke(t?.text, e), r = t ? v(t.text, e, (i) => i) : null;
510
+ const n = ke(t?.text, e), r = t ? N(t.text, e, (i) => i) : null;
493
511
  return {
494
512
  activityId: e.id,
495
513
  type: e.type,
@@ -500,7 +518,7 @@ function jn(e, t) {
500
518
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
501
519
  };
502
520
  }
503
- const ve = (e) => e;
521
+ const Ne = (e) => e;
504
522
  function D(e) {
505
523
  const t = m[e];
506
524
  return {
@@ -532,8 +550,8 @@ function P(e) {
532
550
  displayNameKey: e.displayNameKey
533
551
  };
534
552
  }
535
- class Ne {
536
- constructor(t = [], n = ve) {
553
+ class ve {
554
+ constructor(t = [], n = Ne) {
537
555
  this.translate = n;
538
556
  for (const r of t)
539
557
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
@@ -558,14 +576,14 @@ class Ne {
558
576
  const r = m[t.type];
559
577
  if (r?.timeline) return r.timeline(t, n);
560
578
  const i = this.declared.get(t.type);
561
- return v(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
579
+ return N(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
562
580
  }
563
581
  /** The line for the inbox list. Empty when the type has nothing to show. */
564
582
  snippet(t) {
565
583
  const n = m[t.type];
566
584
  if (n?.snippet) return n.snippet(t);
567
585
  const r = this.declared.get(t.type);
568
- return v(r?.text, t, this.translate) ?? "";
586
+ return N(r?.text, t, this.translate) ?? "";
569
587
  }
570
588
  /** The descriptor as it arrived; needed to store `text` as a key. */
571
589
  descriptor(t) {
@@ -618,7 +636,7 @@ class Ne {
618
636
  return this.translate;
619
637
  }
620
638
  }
621
- const Gn = new Ne();
639
+ const Gn = new ve();
622
640
  function Bn(e, t, n = []) {
623
641
  const r = e.createdAt;
624
642
  if (!r) return [];
@@ -751,12 +769,12 @@ function Jn(e, t) {
751
769
  function K(e) {
752
770
  return typeof e == "number" ? e : void 0;
753
771
  }
754
- function xe(e, t = "month") {
772
+ function Oe(e, t = "month") {
755
773
  const n = new Date(e);
756
774
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
757
775
  }
758
776
  function Zn(e, t = "month") {
759
- const n = new Date(xe(e, t));
777
+ const n = new Date(Oe(e, t));
760
778
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
761
779
  }
762
780
  function Qn(e) {
@@ -782,7 +800,7 @@ const tr = [
782
800
  function w(e) {
783
801
  return e < 10 ? `0${e}` : `${e}`;
784
802
  }
785
- function Oe(e, t) {
803
+ function xe(e, t) {
786
804
  const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
787
805
  return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
788
806
  }
@@ -794,7 +812,7 @@ const Re = 36e5, Le = 864e5;
794
812
  function nr(e, t, n) {
795
813
  const r = n === "hour" ? Re : Le, i = [];
796
814
  for (let a = $e(e, n); a <= t; a += r)
797
- i.push(Oe(a, n));
815
+ i.push(xe(a, n));
798
816
  return i;
799
817
  }
800
818
  const De = [
@@ -1224,7 +1242,7 @@ function Ze(e, t) {
1224
1242
  }
1225
1243
  return r;
1226
1244
  }
1227
- function vr(e, t, n) {
1245
+ function Nr(e, t, n) {
1228
1246
  if (!e) return !0;
1229
1247
  if (e === t) return !1;
1230
1248
  const r = new Map(n.map((o) => [o.id, o]));
@@ -1252,13 +1270,13 @@ const et = "en";
1252
1270
  function tt(e) {
1253
1271
  return e.defaultLocale || e.locale || et;
1254
1272
  }
1255
- function Nr(e) {
1273
+ function vr(e) {
1256
1274
  const t = /* @__PURE__ */ new Set(), n = [];
1257
1275
  for (const r of [tt(e), ...e.locales ?? []])
1258
1276
  !r || t.has(r) || (t.add(r), n.push(r));
1259
1277
  return n;
1260
1278
  }
1261
- function xr(e, t, n) {
1279
+ function Or(e, t, n) {
1262
1280
  const r = e.translations ?? [];
1263
1281
  return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1264
1282
  }
@@ -1289,7 +1307,7 @@ function nt(e, t) {
1289
1307
  return e.userId === t.userId;
1290
1308
  }
1291
1309
  }
1292
- function Or(e, t) {
1310
+ function xr(e, t) {
1293
1311
  return e.filter((n) => n.enabled && nt(n.ownerScope, t));
1294
1312
  }
1295
1313
  function $r(e) {
@@ -1380,6 +1398,9 @@ const Yr = [
1380
1398
  { name: "direction", type: "string" },
1381
1399
  { name: "channelId", type: "string" },
1382
1400
  { name: "interactionId", type: "string" },
1401
+ // The work item this activity hangs off, for a playbook triggering on work instead of a
1402
+ // conversation. Exactly one of interactionId/itemId is filled.
1403
+ { name: "itemId", type: "string" },
1383
1404
  { name: "activityId", type: "string" },
1384
1405
  { name: "authorType", type: "string" },
1385
1406
  { name: "authorName", type: "string" },
@@ -1538,18 +1559,18 @@ function mi(e, t) {
1538
1559
  function gi(e) {
1539
1560
  return e.type === "agent";
1540
1561
  }
1541
- const Tt = "work_item", It = "work_project";
1562
+ const hi = "WORK_COMMENT_ADDED", yi = "WORK_ITEM_ASSIGNED", Tt = "work_item", It = "work_project";
1542
1563
  function wt(e) {
1543
1564
  return `${Tt}:${e}`;
1544
1565
  }
1545
1566
  function he(e) {
1546
1567
  return `${It}:${e}`;
1547
1568
  }
1548
- function hi(e, t, n) {
1569
+ function Ai(e, t, n) {
1549
1570
  const r = `${e}-${t}`;
1550
1571
  return n ? `${r}-${n}` : r;
1551
1572
  }
1552
- function yi(e) {
1573
+ function bi(e) {
1553
1574
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1554
1575
  return t ? {
1555
1576
  projectKey: t[1].toUpperCase(),
@@ -1557,36 +1578,36 @@ function yi(e) {
1557
1578
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1558
1579
  } : null;
1559
1580
  }
1560
- function Ai(e) {
1581
+ function Ei(e) {
1561
1582
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1562
1583
  }
1563
- function bi(e, t = 25) {
1584
+ function Si(e, t = 25) {
1564
1585
  const n = /* @__PURE__ */ new Set([wt(e.id)]);
1565
1586
  e.projectId && n.add(he(e.projectId));
1566
1587
  for (const r of e.ancestorKeys ?? []) n.add(r);
1567
1588
  for (const r of e.partyKeys ?? []) n.add(r);
1568
1589
  return Array.from(n).slice(0, t);
1569
1590
  }
1570
- function Ei(e) {
1591
+ function _i(e) {
1571
1592
  return [he(e.id)];
1572
1593
  }
1573
- const N = [
1594
+ const v = [
1574
1595
  { key: "open", label: "status_open", category: "todo", order: 0 },
1575
1596
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1576
1597
  { key: "done", label: "status_done", category: "done", order: 2 }
1577
- ], ye = N.map((e) => e.key);
1598
+ ], ye = v.map((e) => e.key);
1578
1599
  function Mt(e) {
1579
- return e?.statuses?.length ? e.statuses : N;
1600
+ return e?.statuses?.length ? e.statuses : v;
1580
1601
  }
1581
1602
  function kt(e, t) {
1582
1603
  return t.find((n) => n.key === e)?.category ?? "todo";
1583
1604
  }
1584
- function Si(e, t) {
1605
+ function Ti(e, t) {
1585
1606
  return t.find((n) => n.key === e);
1586
1607
  }
1587
- function _i(e) {
1608
+ function Ii(e) {
1588
1609
  const t = Mt(e), n = e?.defaultStatusKey;
1589
- return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? N[0].key;
1610
+ return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? v[0].key;
1590
1611
  }
1591
1612
  function Ct(e) {
1592
1613
  return [...e].sort((t, n) => {
@@ -1594,14 +1615,14 @@ function Ct(e) {
1594
1615
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1595
1616
  });
1596
1617
  }
1597
- function Ti(e, t) {
1618
+ function wi(e, t) {
1598
1619
  return kt(e, t) === "done";
1599
1620
  }
1600
- function vt(e) {
1621
+ function Nt(e) {
1601
1622
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1602
1623
  }
1603
- function Ii(e, t) {
1604
- const n = vt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1624
+ function Mi(e, t) {
1625
+ const n = Nt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1605
1626
  if (!r.has(n)) return n;
1606
1627
  for (let i = 2; i < 500; i++) {
1607
1628
  const a = `${n}-${i}`;
@@ -1609,7 +1630,7 @@ function Ii(e, t) {
1609
1630
  }
1610
1631
  return `${n}-${r.size + 1}`;
1611
1632
  }
1612
- function wi(e) {
1633
+ function ki(e) {
1613
1634
  const t = [];
1614
1635
  if (!e.length) return [{ index: -1, reason: "empty" }];
1615
1636
  const n = /* @__PURE__ */ new Set();
@@ -1621,7 +1642,7 @@ function wi(e) {
1621
1642
  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
1643
  }), 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;
1623
1644
  }
1624
- const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), xt = /* @__PURE__ */ new Set([
1645
+ const vt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Ot = /* @__PURE__ */ new Set([
1625
1646
  "text/plain",
1626
1647
  "text/markdown",
1627
1648
  "text/csv",
@@ -1630,24 +1651,24 @@ const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1630
1651
  "application/xml",
1631
1652
  "text/xml"
1632
1653
  ]);
1633
- function Ot(e) {
1654
+ function xt(e) {
1634
1655
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1635
- return t ? Nt.has(t) ? "image" : t === "application/pdf" ? "pdf" : xt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1656
+ return t ? vt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Ot.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1636
1657
  }
1637
1658
  const h = 1024 * 1024, $t = {
1638
1659
  image: 5 * h,
1639
1660
  pdf: 20 * h,
1640
1661
  text: 1 * h,
1641
1662
  audio: 20 * h
1642
- }, Mi = 25 * h, ki = 5;
1643
- function Ci(e, t) {
1644
- const n = Ot(e);
1663
+ }, Ci = 25 * h, Ni = 5;
1664
+ function vi(e, t) {
1665
+ const n = xt(e);
1645
1666
  return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1646
1667
  }
1647
1668
  function Rt(e) {
1648
1669
  return `${e.kind}:${e.id || e.url || e.title}`;
1649
1670
  }
1650
- function vi(e, t = []) {
1671
+ function Oi(e, t = []) {
1651
1672
  const n = new Set(t), r = [], i = [];
1652
1673
  for (const a of e) {
1653
1674
  const o = Rt(a);
@@ -1655,17 +1676,17 @@ function vi(e, t = []) {
1655
1676
  }
1656
1677
  return { sources: r, keys: i };
1657
1678
  }
1658
- function Ni(e) {
1679
+ function xi(e) {
1659
1680
  return e.sessions.filter(
1660
1681
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1661
1682
  );
1662
1683
  }
1663
- function xi(e) {
1684
+ function $i(e) {
1664
1685
  return e.sessions.filter(
1665
1686
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1666
1687
  );
1667
1688
  }
1668
- function Oi(e) {
1689
+ function Ri(e) {
1669
1690
  return e.sessions.some(
1670
1691
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1671
1692
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
@@ -1687,7 +1708,7 @@ function Dt(e, t) {
1687
1708
  }
1688
1709
  return n;
1689
1710
  }
1690
- function $i(e, t) {
1711
+ function Li(e, t) {
1691
1712
  const n = Dt(e, t);
1692
1713
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1693
1714
  }
@@ -1698,7 +1719,7 @@ function Pt(e, t) {
1698
1719
  transport: t.transport ?? e.transport
1699
1720
  } : e;
1700
1721
  }
1701
- function Ri(e, t) {
1722
+ function Di(e, t) {
1702
1723
  const n = [];
1703
1724
  for (const r of e) {
1704
1725
  if (!r.enabled) continue;
@@ -1709,16 +1730,16 @@ function Ri(e, t) {
1709
1730
  }
1710
1731
  return n;
1711
1732
  }
1712
- function Li(e, t) {
1733
+ function Pi(e, t) {
1713
1734
  return t.filter((n) => n.capability.intent === e);
1714
1735
  }
1715
1736
  function Kt(e, t) {
1716
1737
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1717
1738
  }
1718
- function Di(e, t) {
1739
+ function Ki(e, t) {
1719
1740
  return Kt(e.scheme, t);
1720
1741
  }
1721
- function Pi(e, t, n) {
1742
+ function Ui(e, t, n) {
1722
1743
  const r = [];
1723
1744
  for (const i of e)
1724
1745
  for (const a of n)
@@ -1747,10 +1768,10 @@ const jt = {
1747
1768
  id: "note",
1748
1769
  custom: "note"
1749
1770
  };
1750
- function Ki(e) {
1771
+ function ji(e) {
1751
1772
  return e ? jt[e] ?? "note" : "note";
1752
1773
  }
1753
- const Ui = "message_window", ji = "message_templates", Gi = {
1774
+ const Gi = "message_window", Bi = "message_templates", Fi = {
1754
1775
  // E-mail
1755
1776
  FROM: "from",
1756
1777
  TO: "to",
@@ -1767,11 +1788,11 @@ const Ui = "message_window", ji = "message_templates", Gi = {
1767
1788
  // Voice/conference
1768
1789
  HOST: "host",
1769
1790
  PARTICIPANT: "participant"
1770
- }, Bi = (e, t) => ({ intent: e, ...t }), Fi = "folder_management", Vi = "remote_search", Hi = {
1791
+ }, Vi = (e, t) => ({ intent: e, ...t }), Hi = "folder_management", Wi = "remote_search", zi = {
1771
1792
  ok: !1,
1772
1793
  code: "UNSUPPORTED",
1773
1794
  message: "Provider does not support this op"
1774
- }, Wi = "installation-id", zi = {
1795
+ }, Xi = "installation-id", Yi = {
1775
1796
  ai: [
1776
1797
  "account.read",
1777
1798
  "account.write",
@@ -1905,24 +1926,24 @@ const Ui = "message_window", ji = "message_templates", Gi = {
1905
1926
  user: ["user.read", "user.write"],
1906
1927
  work: ["item.read", "item.write", "project.read", "project.write"]
1907
1928
  }, Ae = 9e4, Gt = ["out_of_office"], be = (e) => Gt.includes(e);
1908
- function Xi(e, t, n) {
1929
+ function qi(e, t, n) {
1909
1930
  const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1910
1931
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1911
1932
  const a = i.status;
1912
1933
  return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1913
1934
  }
1914
- function Yi(e, t) {
1935
+ function Ji(e, t) {
1915
1936
  const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
1916
1937
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1917
1938
  }
1918
- function qi(e, t) {
1939
+ function Zi(e, t) {
1919
1940
  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
1941
  }
1921
- function Ji(e) {
1942
+ function Qi(e) {
1922
1943
  return e.providerAvailable && e.allowed;
1923
1944
  }
1924
- const Zi = "resources.describe", Qi = "resources.search", ea = "resources.resolve";
1925
- function ta(e) {
1945
+ const ea = "resources.describe", ta = "resources.search", na = "resources.resolve";
1946
+ function ra(e) {
1926
1947
  const t = e.indexOf(":");
1927
1948
  return t === -1 ? e : e.slice(0, t);
1928
1949
  }
@@ -1931,11 +1952,11 @@ function Se(e) {
1931
1952
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1932
1953
  return t ? t[1] : null;
1933
1954
  }
1934
- function na(e) {
1955
+ function ia(e) {
1935
1956
  const t = Se(e);
1936
1957
  return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
1937
1958
  }
1938
- function ra(e) {
1959
+ function aa(e) {
1939
1960
  return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
1940
1961
  }
1941
1962
  function Bt(e) {
@@ -1957,7 +1978,7 @@ function Vt(e, t) {
1957
1978
  function Ht(e) {
1958
1979
  return e.publicBasePath ?? `/apps/${e.name}`;
1959
1980
  }
1960
- function ia(e) {
1981
+ function oa(e) {
1961
1982
  const t = [];
1962
1983
  for (const n of e) {
1963
1984
  if (!n?.name) continue;
@@ -1990,10 +2011,10 @@ function zt(e, t) {
1990
2011
  Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
1991
2012
  return n ? { ...n, params: { ...n.props, ...Vt(n.pattern, e) } } : null;
1992
2013
  }
1993
- function aa(e, t) {
2014
+ function sa(e, t) {
1994
2015
  return zt(e, t) !== null;
1995
2016
  }
1996
- const oa = "sync-source", sa = "sync-target", ca = 20, Xt = {
2017
+ const ca = "sync-source", la = "sync-target", ua = 20, Xt = {
1997
2018
  afrikaans: [
1998
2019
  "[Muziek]",
1999
2020
  "(C) TV GELDERLAND 2021",
@@ -2284,13 +2305,13 @@ function an(e, t = qt) {
2284
2305
  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 };
2285
2306
  }
2286
2307
  const on = 60;
2287
- function la(e, t, n = on) {
2308
+ function da(e, t, n = on) {
2288
2309
  const r = new Set(e), i = [...e];
2289
2310
  for (const a of t)
2290
2311
  !a || r.has(a) || (r.add(a), i.push(a));
2291
2312
  return i.slice(-n);
2292
2313
  }
2293
- function ua(e) {
2314
+ function pa(e) {
2294
2315
  const { segments: t, now: n, state: r } = e;
2295
2316
  if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2296
2317
  return { trigger: !1, reason: "too_soon" };
@@ -2302,7 +2323,7 @@ function ua(e) {
2302
2323
  const o = nn(i.text);
2303
2324
  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" };
2304
2325
  }
2305
- const x = {
2326
+ const O = {
2306
2327
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
2307
2328
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
2308
2329
  // An over-permissive key is harmless — it simply matches nothing.
@@ -2326,11 +2347,11 @@ const x = {
2326
2347
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2327
2348
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2328
2349
  }, sn = "NL", cn = 15, ln = 8, un = Array.from(
2329
- new Set(Object.values(x).map((e) => e.callingCode))
2350
+ new Set(Object.values(O).map((e) => e.callingCode))
2330
2351
  ).sort((e, t) => t.length - e.length);
2331
2352
  function J(e) {
2332
2353
  if (e)
2333
- return x[e.trim().toUpperCase()];
2354
+ return O[e.trim().toUpperCase()];
2334
2355
  }
2335
2356
  function E(e, t) {
2336
2357
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
@@ -2340,7 +2361,7 @@ function Z(e) {
2340
2361
  for (const t of un) {
2341
2362
  if (!e.startsWith(t)) continue;
2342
2363
  const n = e.slice(t.length);
2343
- for (const r of Object.values(x)) {
2364
+ for (const r of Object.values(O)) {
2344
2365
  if (r.callingCode !== t) continue;
2345
2366
  const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
2346
2367
  if (E(a, r)) return `+${t}${a}`;
@@ -2356,7 +2377,7 @@ function dn(e) {
2356
2377
  const r = t.indexOf("@");
2357
2378
  return r >= 0 && (t = t.slice(0, r)), t.trim();
2358
2379
  }
2359
- function da(e) {
2380
+ function fa(e) {
2360
2381
  if (!e) return !1;
2361
2382
  const t = e.indexOf("@");
2362
2383
  if (t <= 0) return !1;
@@ -2384,7 +2405,7 @@ function Q(e, t) {
2384
2405
  }
2385
2406
  return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2386
2407
  }
2387
- function pa(e, t = 9) {
2408
+ function ma(e, t = 9) {
2388
2409
  const n = (e ?? "").replace(/\D/g, "");
2389
2410
  return n.length < t ? null : n.slice(-t);
2390
2411
  }
@@ -2395,7 +2416,7 @@ function _e(e) {
2395
2416
  const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2396
2417
  return !r || !i.includes(".") ? null : `${r}@${i}`;
2397
2418
  }
2398
- function fa(e) {
2419
+ function ga(e) {
2399
2420
  const t = _e(e);
2400
2421
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2401
2422
  }
@@ -2461,16 +2482,16 @@ const mn = /* @__PURE__ */ new Set([
2461
2482
  "proximus.be",
2462
2483
  "scarlet.be"
2463
2484
  ]);
2464
- function ma(e) {
2485
+ function ha(e) {
2465
2486
  const t = fn(e);
2466
2487
  return t ? mn.has(t) : !1;
2467
2488
  }
2468
- function ga(e) {
2489
+ function ya(e) {
2469
2490
  if (!e) return !1;
2470
2491
  const t = e.trim().toLowerCase();
2471
2492
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2472
2493
  }
2473
- function ha(e, t, n) {
2494
+ function Aa(e, t, n) {
2474
2495
  if (!e || !t) return null;
2475
2496
  const r = e.trim().toLowerCase();
2476
2497
  if (r === "tel" || r === "sms" || r === "whatsapp") {
@@ -2489,7 +2510,7 @@ function ha(e, t, n) {
2489
2510
  return i ? `${r}:${i}` : null;
2490
2511
  }
2491
2512
  const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2492
- function ya(e) {
2513
+ function ba(e) {
2493
2514
  if (typeof e != "string" || !e) return "";
2494
2515
  let t = e;
2495
2516
  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(`
@@ -2541,7 +2562,7 @@ function ie(e) {
2541
2562
 
2542
2563
  `).trim();
2543
2564
  }
2544
- function Aa(e) {
2565
+ function Ea(e) {
2545
2566
  if (typeof e != "string" || !e) return "";
2546
2567
  let t = e.length;
2547
2568
  for (const a of yn) {
@@ -2553,21 +2574,21 @@ function Aa(e) {
2553
2574
  return r || (r = ie(re(te(e)))), bn(r) || r;
2554
2575
  }
2555
2576
  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) {
2577
+ function Sa(e, t) {
2557
2578
  return !!(e && En.test(e) || t && Sn.test(t));
2558
2579
  }
2559
2580
  const _n = 3, Tn = 600;
2560
- function Ea(e, t) {
2581
+ function _a(e, t) {
2561
2582
  return e >= _n || t >= Tn;
2562
2583
  }
2563
2584
  export {
2564
2585
  m as ACTIVITY_CATALOG,
2565
2586
  $t as AI_ATTACHMENT_LIMITS,
2566
- ki as AI_ATTACHMENT_MAX_PER_TURN,
2567
- Mi as AI_ATTACHMENT_TURN_BUDGET,
2587
+ Ni as AI_ATTACHMENT_MAX_PER_TURN,
2588
+ Ci as AI_ATTACHMENT_TURN_BUDGET,
2568
2589
  oe as AI_VENDORS,
2569
2590
  je as ALLOWED_LINK_SCHEMES,
2570
- zi as APP_PERMISSIONS,
2591
+ Yi as APP_PERMISSIONS,
2571
2592
  U as ARTIFACT_MAX_BLOCKS,
2572
2593
  ir as ARTIFACT_MAX_BODY_BYTES,
2573
2594
  M as ARTIFACT_MAX_CELL_LEN,
@@ -2578,7 +2599,7 @@ export {
2578
2599
  ce as ARTIFACT_MAX_TEXT_LEN,
2579
2600
  Ye as ASSIGNMENT_SCOPE_KIND,
2580
2601
  Ee as AUTH_APP_NAME,
2581
- Ne as ActivityTypeRegistry,
2602
+ ve as ActivityTypeRegistry,
2582
2603
  Gn as BUILT_IN_ONLY,
2583
2604
  Jt as CADENCE_FLOOR_MS,
2584
2605
  Zt as CADENCE_MIN_NEW_SEGMENTS,
@@ -2590,14 +2611,14 @@ export {
2590
2611
  Ur as DEFAULT_MEMORY_BUDGET,
2591
2612
  sn as DEFAULT_PHONE_REGION,
2592
2613
  Zr as EMPTY_WORKFLOW,
2593
- Fi as FEATURE_FOLDER_MANAGEMENT,
2594
- Vi as FEATURE_REMOTE_SEARCH,
2595
- Wi as INSTALLATION_HEADER,
2614
+ Hi as FEATURE_FOLDER_MANAGEMENT,
2615
+ Wi as FEATURE_REMOTE_SEARCH,
2616
+ Xi as INSTALLATION_HEADER,
2596
2617
  ut as INTERACTION_KIND,
2597
- Gi as InteractionParticipantRole,
2618
+ Fi as InteractionParticipantRole,
2598
2619
  et as KB_FALLBACK_LOCALE,
2599
2620
  z as KB_LOCALES,
2600
- N as LOOSE_STATUSES,
2621
+ v as LOOSE_STATUSES,
2601
2622
  kn as MAX_ACTIONS,
2602
2623
  qe as MAX_ASSIGNMENT_TURNS,
2603
2624
  In as MAX_BLOCKS,
@@ -2612,38 +2633,40 @@ export {
2612
2633
  At as MAX_TOPIC_EXAMPLES,
2613
2634
  k as MAX_TOPIC_EXAMPLE_CHARS,
2614
2635
  Pr as MIN_MEMORY_BUDGET,
2615
- x as PHONE_REGIONS,
2636
+ O as PHONE_REGIONS,
2616
2637
  Ae as PRESENCE_ONLINE_WINDOW_MS,
2617
2638
  Gt as PRESENCE_SURVIVES_OFFLINE,
2618
- ji as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2619
- Ui as PROVIDER_FEATURE_MESSAGE_WINDOW,
2639
+ Bi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2640
+ Gi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2620
2641
  mn as PUBLIC_EMAIL_DOMAINS,
2621
2642
  X as READ_STEP_TYPES,
2622
2643
  rt as RELATED_SUBJECT_KINDS,
2623
2644
  ye as RESERVED_STATUS_KEYS,
2624
- Zi as RESOURCE_DESCRIBE_SERVICE,
2625
- ea as RESOURCE_RESOLVE_SERVICE,
2626
- Qi as RESOURCE_SEARCH_SERVICE,
2645
+ ea as RESOURCE_DESCRIBE_SERVICE,
2646
+ na as RESOURCE_RESOLVE_SERVICE,
2647
+ ta as RESOURCE_SEARCH_SERVICE,
2627
2648
  yr as SIGNATURE_INTENTS,
2628
2649
  ft as STEP_MAX_TOKENS_MAX,
2629
2650
  pt as STEP_MAX_TOKENS_MIN,
2630
2651
  Tn as SUMMARY_MIN_LAST_CHARS,
2631
2652
  _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,
2653
+ ua as SYNC_RUN_MAX_ERRORS,
2654
+ ca as SYNC_SOURCE_PROVIDER_GROUP,
2655
+ la as SYNC_TARGET_PROVIDER_GROUP,
2635
2656
  Xe as TERMINAL_ASSIGNMENT_STATUSES,
2636
2657
  mt as TERMINAL_RUN_STATUSES,
2637
2658
  Yr as TRIGGER_VARS,
2638
- Hi as UNSUPPORTED,
2659
+ zi as UNSUPPORTED,
2639
2660
  De as USAGE_DIMENSIONS,
2640
2661
  Pe as USAGE_DIMENSION_IDS,
2662
+ hi as WORK_COMMENT_ADDED,
2663
+ yi as WORK_ITEM_ASSIGNED,
2641
2664
  Tt as WORK_ITEM_SCOPE_KIND,
2642
2665
  It as WORK_PROJECT_SCOPE_KIND,
2643
2666
  fi as acceptExampleCandidate,
2644
2667
  at as actingIdentityKey,
2645
2668
  di as activeWorkTypes,
2646
- vn as activityIconOf,
2669
+ Nn as activityIconOf,
2647
2670
  Un as activityJoinUrl,
2648
2671
  Me as activitySnippet,
2649
2672
  ke as activityTextParams,
@@ -2652,12 +2675,12 @@ export {
2652
2675
  d as activityTypeInfo,
2653
2676
  Fr as actorKey,
2654
2677
  pi as addExampleCandidate,
2655
- Yi as agePresenceEntry,
2656
- Ot as aiAttachmentKind,
2657
- Ci as aiAttachmentRejection,
2678
+ Ji as agePresenceEntry,
2679
+ xt as aiAttachmentKind,
2680
+ vi as aiAttachmentRejection,
2658
2681
  K as aiBudgetLimit,
2659
2682
  Zn as aiBudgetPeriodKey,
2660
- xe as aiBudgetPeriodStart,
2683
+ Oe as aiBudgetPeriodStart,
2661
2684
  Jn as aiBudgetState,
2662
2685
  qn as aiVendorAcceptsAttachment,
2663
2686
  zn as aiVendorDefaultModel,
@@ -2674,34 +2697,34 @@ export {
2674
2697
  fr as assignmentScopeKey,
2675
2698
  gr as assignmentSubject,
2676
2699
  jn as buildActivityPreview,
2677
- Ri as buildChannelIntents,
2700
+ Di as buildChannelIntents,
2678
2701
  lr as buildShareKeys,
2679
2702
  an as buildWindow,
2680
- vr as canNestUnder,
2703
+ Nr as canNestUnder,
2681
2704
  $n as carriesText,
2682
- xr as categoryLabel,
2705
+ Or as categoryLabel,
2683
2706
  kt as categoryOf,
2684
- Ki as channelKindForScheme,
2685
- Nn as channelKindOf,
2707
+ ji as channelKindForScheme,
2708
+ vn as channelKindOf,
2686
2709
  Jr as clampStepMaxTokens,
2687
- Aa as cleanMessageText,
2710
+ Ea as cleanMessageText,
2688
2711
  yt as compareWorkTypes,
2689
2712
  hr as decideAssignmentState,
2690
- ua as decideCadence,
2691
- Oi as decideIncomingCall,
2713
+ pa as decideCadence,
2714
+ Ri as decideIncomingCall,
2692
2715
  tt as defaultLocaleOf,
2693
- _i as defaultStatusKey,
2694
- Bi as defineIntent,
2716
+ Ii as defaultStatusKey,
2717
+ Vi as defineIntent,
2695
2718
  Ze as depthOf,
2696
- Xi as derivePresence,
2697
- $i as disabledIntentsFromCapabilities,
2719
+ qi as derivePresence,
2720
+ Li as disabledIntentsFromCapabilities,
2698
2721
  ai as elapsedSeconds,
2699
- fa as emailDomain,
2700
- ha as endpointKey,
2722
+ ga as emailDomain,
2723
+ Aa as endpointKey,
2701
2724
  Vt as extractParams,
2702
2725
  nn as extractTerms,
2703
- Di as filterByEndpoint,
2704
- Li as filterByIntent,
2726
+ Ki as filterByEndpoint,
2727
+ Pi as filterByIntent,
2705
2728
  Kt as filterByTargetScheme,
2706
2729
  S as findAiVendor,
2707
2730
  er as flattenLocales,
@@ -2709,9 +2732,9 @@ export {
2709
2732
  it as formatActingIdentity,
2710
2733
  ci as formatClock,
2711
2734
  si as formatHm,
2712
- hi as formatItemKey,
2713
- Oe as formatPeriod,
2714
- vi as freshSources,
2735
+ Ai as formatItemKey,
2736
+ xe as formatPeriod,
2737
+ Oi as freshSources,
2715
2738
  Bn as getActivitySeenUserIds,
2716
2739
  br as getContactEndpoints,
2717
2740
  Tr as getShortTitle,
@@ -2727,57 +2750,57 @@ export {
2727
2750
  Hn as isChatMessageActivity,
2728
2751
  Sr as isClosed,
2729
2752
  Dn as isConnectedType,
2730
- na as isDeepLink,
2753
+ ia as isDeepLink,
2731
2754
  Qe as isDescendant,
2732
2755
  Vn as isEmailActivity,
2733
2756
  ni as isInFlight,
2734
2757
  Ir as isInteractionUnseen,
2735
- ra as isLandingPath,
2736
- ba as isLikelyBulk,
2758
+ aa as isLandingPath,
2759
+ Sa as isLikelyBulk,
2737
2760
  ae as isMessageShape,
2738
- xn as isMessageType,
2761
+ On as isMessageType,
2739
2762
  Wt as isMoreSpecificPattern,
2740
2763
  gt as isPaused,
2741
2764
  Ln as isPlaybookAuthoredType,
2742
- ma as isPublicEmailDomain,
2743
- aa as isPublicPath,
2744
- On as isReplyableType,
2765
+ ha as isPublicEmailDomain,
2766
+ sa as isPublicPath,
2767
+ xn as isReplyableType,
2745
2768
  ti as isTerminal,
2746
- Ea as isThreadLongEnough,
2769
+ _a as isThreadLongEnough,
2747
2770
  Pn as isTranscriptType,
2748
- Ti as isWorkClosed,
2771
+ wi as isWorkClosed,
2749
2772
  ui as isWorkTypeVisible,
2750
- bi as itemDossierKeys,
2773
+ Si as itemDossierKeys,
2751
2774
  Mt as ladderFor,
2752
2775
  wr as linkLabel,
2753
2776
  Qn as listeningAllowed,
2754
2777
  Cr as localeInstruction,
2755
2778
  kr as localeName,
2756
- Nr as localesOf,
2757
- da as looksLikeEmail,
2758
- Pi as matchContactToIntents,
2779
+ vr as localesOf,
2780
+ fa as looksLikeEmail,
2781
+ Ui as matchContactToIntents,
2759
2782
  zt as matchPublicRoute,
2760
2783
  $r as mcpCredentialScope,
2761
2784
  Rr as mcpToolPrefix,
2762
- la as mergeShownKeys,
2785
+ da as mergeShownKeys,
2763
2786
  Rn as messageCountsAs,
2764
- ga as needsPhoneRegion,
2787
+ ya as needsPhoneRegion,
2765
2788
  ar as normalizeArtifactBlocks,
2766
2789
  Cn as normalizeBlocks,
2767
2790
  _e as normalizeEmail,
2768
2791
  g as normalizeExample,
2769
2792
  rn as novelty,
2770
2793
  Gr as parseActingIdentity,
2771
- yi as parseItemKey,
2794
+ bi as parseItemKey,
2772
2795
  Ft as pathToRegex,
2773
2796
  nr as periodsInRange,
2774
- pa as phoneSuffix,
2775
- ya as plainTextFromMarkdown,
2797
+ ma as phoneSuffix,
2798
+ ba as plainTextFromMarkdown,
2776
2799
  st as playbookActor,
2777
2800
  ei as procedureOf,
2778
- Ei as projectDossierKeys,
2801
+ _i as projectDossierKeys,
2779
2802
  Ht as publicBasePathFor,
2780
- ia as publicRoutePatterns,
2803
+ oa as publicRoutePatterns,
2781
2804
  C as readPath,
2782
2805
  Y as readStepError,
2783
2806
  lt as refKey,
@@ -2785,30 +2808,30 @@ export {
2785
2808
  St as rejectExampleCandidate,
2786
2809
  jr as relatedByDefault,
2787
2810
  Dt as resolveAccountCapabilities,
2788
- v as resolveActivityText,
2811
+ N as resolveActivityText,
2789
2812
  Lt as resolveChannelIntents,
2790
2813
  Je as resolveSignature,
2791
- qi as resolveWorkMode,
2792
- ta as resourceKindOf,
2814
+ Zi as resolveWorkMode,
2815
+ ra as resourceKindOf,
2793
2816
  Br as runActor,
2794
2817
  ii as runInteractionId,
2795
2818
  Ve as sanitizeInline,
2796
2819
  Yt as sanitizeTranscript,
2797
- Or as selectLenses,
2798
- xi as sessionsHoldCannotReach,
2799
- Ni as sessionsToHold,
2820
+ xr as selectLenses,
2821
+ $i as sessionsHoldCannotReach,
2822
+ xi as sessionsToHold,
2800
2823
  de as shareKeyForTeam,
2801
2824
  ue as shareKeyForUser,
2802
2825
  ur as shareKeysForViewer,
2803
- Ji as shouldRunAudioPipeline,
2826
+ Qi as shouldRunAudioPipeline,
2804
2827
  Ct as sortStatuses,
2805
2828
  Rt as sourceKey,
2806
- Si as statusIn,
2829
+ Ti as statusIn,
2807
2830
  Qr as stepsOf,
2808
2831
  we as stripHtml,
2809
2832
  ri as subjectKeyOf,
2810
2833
  ge as subjectOf,
2811
- Ai as suggestProjectKey,
2834
+ Ei as suggestProjectKey,
2812
2835
  Wr as targetById,
2813
2836
  Hr as targetForActivityType,
2814
2837
  ot as toActingIdentity,
@@ -2817,15 +2840,15 @@ export {
2817
2840
  _t as topicOfferedForTeam,
2818
2841
  mi as topicsForTeam,
2819
2842
  Et as truncateExample,
2820
- Ii as uniqueWorkStatusKey,
2843
+ Mi as uniqueWorkStatusKey,
2821
2844
  li as uniqueWorkTypeKey,
2822
2845
  Ke as usageMetricId,
2823
2846
  rr as usageMetrics,
2824
- wi as validateStatuses,
2847
+ ki as validateStatuses,
2825
2848
  Vr as valueAtPath,
2826
2849
  mr as wakesAssignment,
2827
2850
  wt as workItemScopeKey,
2828
2851
  he as workProjectScopeKey,
2829
- vt as workStatusKey,
2852
+ Nt as workStatusKey,
2830
2853
  ht as workTypeKey
2831
2854
  };