@opencxh/domain 1.252.0 → 1.254.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
@@ -1,4 +1,4 @@
1
- const ps = 10, fs = 10, ms = 10, hs = 5, an = /* @__PURE__ */ new Set([
1
+ const hs = 10, gs = 10, ys = 10, bs = 5, ln = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -8,13 +8,13 @@ const ps = 10, fs = 10, ms = 10, hs = 5, an = /* @__PURE__ */ new Set([
8
8
  "actions",
9
9
  "attachments"
10
10
  ]);
11
- function se(e) {
11
+ function ae(e) {
12
12
  if (typeof e == "string") return e.length > 0;
13
13
  if (!e || typeof e != "object") return !1;
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function gs(e, t = () => {
17
+ function _s(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
@@ -25,19 +25,19 @@ function gs(e, t = () => {
25
25
  }
26
26
  if (!r || typeof r != "object") continue;
27
27
  const o = r;
28
- if (!an.has(o.type)) {
28
+ if (!ln.has(o.type)) {
29
29
  t(`unknown block type ${String(o.type)}`);
30
30
  continue;
31
31
  }
32
32
  switch (o.type) {
33
33
  case "header":
34
- if (!se(o.text)) {
34
+ if (!ae(o.text)) {
35
35
  t("a header without text");
36
36
  continue;
37
37
  }
38
38
  break;
39
39
  case "context":
40
- if (!se(o.text)) {
40
+ if (!ae(o.text)) {
41
41
  t("a context block without text");
42
42
  continue;
43
43
  }
@@ -59,7 +59,7 @@ function gs(e, t = () => {
59
59
  o.items.length > 10 && (t("more than 10 list items"), o.items = o.items.slice(0, 10));
60
60
  break;
61
61
  case "actions": {
62
- const i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && se(a.text));
62
+ const i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && ae(a.text));
63
63
  if (s.length !== i.length && t("an action without action_id, invoke or text"), s.length === 0) continue;
64
64
  s.length > 5 && t("more than 5 actions"), o.elements = s.slice(0, 5);
65
65
  break;
@@ -69,17 +69,17 @@ function gs(e, t = () => {
69
69
  }
70
70
  return n;
71
71
  }
72
- const cn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, ln = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
- function un(e) {
72
+ const un = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, dn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
+ function pn(e) {
74
74
  if (typeof e != "string" || !e) return "";
75
75
  let t = e;
76
76
  return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
77
77
  `).map(
78
78
  (n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
79
79
  ).join(`
80
- `), t = t.replace(cn, "$2"), t = t.replace(ln, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
80
+ `), t = t.replace(un, "$2"), t = t.replace(dn, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
81
81
  }
82
- function dn(e) {
82
+ function fn(e) {
83
83
  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();
84
84
  }
85
85
  function q(e) {
@@ -87,16 +87,16 @@ function q(e) {
87
87
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
88
88
  return `${t}:${n.toString().padStart(2, "0")}`;
89
89
  }
90
- function Ke(e) {
90
+ function Be(e) {
91
91
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
92
92
  }
93
- function ae(e) {
93
+ function ce(e) {
94
94
  return e?.split("@")?.[0] || e || "";
95
95
  }
96
96
  function Q(e) {
97
97
  return e.map((t) => t.name).join(", ");
98
98
  }
99
- function Ue(e) {
99
+ function je(e) {
100
100
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
101
101
  }
102
102
  const R = {
@@ -106,7 +106,7 @@ const R = {
106
106
  channelKind: "voice",
107
107
  icon: "phone",
108
108
  snippet: () => "Gesprek gestart",
109
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${ae(e.payload.from)}` : `Outbound call started — ${ae(e.payload.to)}`
109
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${ce(e.payload.from)}` : `Outbound call started — ${ce(e.payload.to)}`
110
110
  },
111
111
  VOICE_CALL_ANSWERED: {
112
112
  shape: "event",
@@ -134,14 +134,14 @@ const R = {
134
134
  channelKind: "voice",
135
135
  icon: "phone",
136
136
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${q(e.payload.duration)})` : ""}`,
137
- timeline: (e) => `Call ended${Ke(e.payload.duration)}`
137
+ timeline: (e) => `Call ended${Be(e.payload.duration)}`
138
138
  },
139
139
  VOICE_CALL_MISSED: {
140
140
  shape: "event",
141
141
  channelKind: "voice",
142
142
  icon: "phone",
143
143
  snippet: () => "Gemiste oproep",
144
- timeline: (e) => `Missed call — ${ae(e.payload.from)}`
144
+ timeline: (e) => `Missed call — ${ce(e.payload.from)}`
145
145
  },
146
146
  VOICE_CALL_FAILED: {
147
147
  shape: "event",
@@ -216,7 +216,7 @@ const R = {
216
216
  replyable: !0,
217
217
  carriesText: !0,
218
218
  countsAs: "inbound_message",
219
- snippet: Fe
219
+ snippet: He
220
220
  },
221
221
  EMAIL_SENT: {
222
222
  shape: "message",
@@ -226,7 +226,7 @@ const R = {
226
226
  replyable: !0,
227
227
  carriesText: !0,
228
228
  countsAs: "outbound_message",
229
- snippet: Fe
229
+ snippet: He
230
230
  },
231
231
  /* ---- chat ---- */
232
232
  CHAT_MESSAGE_SENT: {
@@ -283,7 +283,7 @@ const R = {
283
283
  channelKind: "chat",
284
284
  icon: "message-circle",
285
285
  snippet: () => "Gesprek gestart",
286
- timeline: (e) => `${Ue(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
286
+ timeline: (e) => `${je(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
287
287
  joinUrl: (e) => e.payload.joinUrl
288
288
  },
289
289
  CHAT_CALL_ENDED: {
@@ -291,7 +291,7 @@ const R = {
291
291
  channelKind: "chat",
292
292
  icon: "message-circle",
293
293
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${q(e.payload.duration)})` : ""}`,
294
- timeline: (e) => `${Ue(e.payload.callType)} ended${Ke(e.payload.duration)}`,
294
+ timeline: (e) => `${je(e.payload.callType)} ended${Be(e.payload.duration)}`,
295
295
  joinUrl: (e) => e.payload.joinUrl
296
296
  },
297
297
  CHAT_EVENT: {
@@ -460,63 +460,63 @@ const R = {
460
460
  timeline: (e, t) => `Status changed by ${t}`
461
461
  }
462
462
  };
463
- function Fe(e) {
464
- const t = e.payload, n = un(t.bodyText).trim() || t.bodySnippet?.trim() || dn(t.body ?? "");
463
+ function He(e) {
464
+ const t = e.payload, n = pn(t.bodyText).trim() || t.bodySnippet?.trim() || fn(t.body ?? "");
465
465
  return t.subject ? `${t.subject} — ${n}` : n;
466
466
  }
467
467
  function k(e) {
468
468
  return R[e];
469
469
  }
470
- function ys(e) {
470
+ function As(e) {
471
471
  return k(e)?.icon ?? "circle";
472
472
  }
473
- function bs(e) {
473
+ function Ss(e) {
474
474
  return k(e)?.channelKind;
475
475
  }
476
- function kt(e) {
476
+ function vt(e) {
477
477
  return e === "message" || e === "note";
478
478
  }
479
- function _s(e) {
480
- return kt(k(e)?.shape);
479
+ function Es(e) {
480
+ return vt(k(e)?.shape);
481
481
  }
482
- function wt(e) {
482
+ function Mt(e) {
483
483
  return e === "note";
484
484
  }
485
- function As(e) {
486
- return wt(k(e)?.shape);
485
+ function Ts(e) {
486
+ return Mt(k(e)?.shape);
487
487
  }
488
- function Ss(e) {
488
+ function Is(e) {
489
489
  return k(e)?.replyable === !0;
490
490
  }
491
- function Es(e) {
491
+ function ks(e) {
492
492
  return k(e)?.carriesText === !0;
493
493
  }
494
- function pn(e) {
494
+ function mn(e) {
495
495
  return k(e)?.countsAs;
496
496
  }
497
- function Ts(e) {
497
+ function ws(e) {
498
498
  return k(e)?.playbookAuthored === !0;
499
499
  }
500
- function Is(e) {
500
+ function vs(e) {
501
501
  return k(e)?.connected === !0;
502
502
  }
503
- function ks(e) {
503
+ function Ms(e) {
504
504
  const t = k(e);
505
505
  return t?.shape === "artifact" && t?.carriesText === !0;
506
506
  }
507
- function fn(e) {
507
+ function hn(e) {
508
508
  const t = k(e.type)?.snippet;
509
509
  return t ? t(e) : "";
510
510
  }
511
- function ws(e, t) {
511
+ function Cs(e, t) {
512
512
  const n = k(e.type)?.timeline;
513
513
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
514
514
  }
515
- function vs(e) {
515
+ function Os(e) {
516
516
  const t = k(e.type)?.joinUrl;
517
517
  return t ? t(e) : void 0;
518
518
  }
519
- function he(e, t) {
519
+ function ye(e, t) {
520
520
  let n = e;
521
521
  for (const r of t.split(".")) {
522
522
  if (n == null || typeof n != "object") return "";
@@ -524,43 +524,43 @@ function he(e, t) {
524
524
  }
525
525
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
526
526
  }
527
- function ge(e, t, n) {
527
+ function be(e, t, n) {
528
528
  if (e === void 0) return null;
529
529
  if (typeof e == "string") return e || null;
530
530
  if ("value" in e)
531
- return he(t, e.value) || null;
531
+ return ye(t, e.value) || null;
532
532
  const r = {};
533
533
  for (const [i, s] of Object.entries(e.params ?? {}))
534
- r[i] = he(t, s);
534
+ r[i] = ye(t, s);
535
535
  const o = n(e.key, r);
536
536
  return o === e.key ? null : o;
537
537
  }
538
- function mn(e, t) {
538
+ function gn(e, t) {
539
539
  if (!e || typeof e == "string" || "value" in e) return null;
540
540
  const n = {};
541
541
  for (const [r, o] of Object.entries(e.params ?? {}))
542
- n[r] = he(t, o);
542
+ n[r] = ye(t, o);
543
543
  return { key: e.key, params: n };
544
544
  }
545
- const Be = 140;
546
- function hn(e) {
545
+ const Ge = 140;
546
+ function yn(e) {
547
547
  const t = e.trim();
548
- return t.length <= Be ? t : `${t.slice(0, Be - 1).trimEnd()}…`;
548
+ return t.length <= Ge ? t : `${t.slice(0, Ge - 1).trimEnd()}…`;
549
549
  }
550
- function Ms(e, t) {
551
- const n = mn(t?.text, e), r = t ? ge(t.text, e, (o) => o) : null;
550
+ function xs(e, t) {
551
+ const n = gn(t?.text, e), r = t ? be(t.text, e, (o) => o) : null;
552
552
  return {
553
553
  activityId: e.id,
554
554
  type: e.type,
555
- snippet: hn(r ?? fn(e)),
555
+ snippet: yn(r ?? hn(e)),
556
556
  authorName: e.author?.name ?? "",
557
557
  direction: e.direction,
558
558
  createdAt: e.createdAt ?? Date.now(),
559
559
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
560
560
  };
561
561
  }
562
- const gn = (e) => e;
563
- function je(e) {
562
+ const bn = (e) => e;
563
+ function We(e) {
564
564
  const t = R[e];
565
565
  return {
566
566
  type: e,
@@ -576,7 +576,7 @@ function je(e) {
576
576
  displayNameKey: t.displayNameKey
577
577
  };
578
578
  }
579
- function He(e) {
579
+ function Ve(e) {
580
580
  return {
581
581
  type: e.type,
582
582
  shape: e.shape,
@@ -591,21 +591,21 @@ function He(e) {
591
591
  displayNameKey: e.displayNameKey
592
592
  };
593
593
  }
594
- class yn {
595
- constructor(t = [], n = gn) {
594
+ class _n {
595
+ constructor(t = [], n = bn) {
596
596
  this.translate = n;
597
597
  for (const r of t)
598
598
  r?.type && (r.type in R || this.declared.has(r.type) || this.declared.set(r.type, r));
599
599
  }
600
600
  declared = /* @__PURE__ */ new Map();
601
601
  get(t) {
602
- if (t in R) return je(t);
602
+ if (t in R) return We(t);
603
603
  const n = this.declared.get(t);
604
- return n ? He(n) : void 0;
604
+ return n ? Ve(n) : void 0;
605
605
  }
606
606
  /** Everything that may be offered as a trigger, built-in and declared. */
607
607
  triggerable() {
608
- const t = Object.keys(R).filter((r) => R[r].triggerable).map(je), n = [...this.declared.values()].map(He).filter((r) => r.triggerable);
608
+ const t = Object.keys(R).filter((r) => R[r].triggerable).map(We), n = [...this.declared.values()].map(Ve).filter((r) => r.triggerable);
609
609
  return [...t, ...n];
610
610
  }
611
611
  /**
@@ -617,14 +617,14 @@ class yn {
617
617
  const r = R[t.type];
618
618
  if (r?.timeline) return r.timeline(t, n);
619
619
  const o = this.declared.get(t.type);
620
- return ge(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
620
+ return be(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
621
621
  }
622
622
  /** The line for the inbox list. Empty when the type has nothing to show. */
623
623
  snippet(t) {
624
624
  const n = R[t.type];
625
625
  if (n?.snippet) return n.snippet(t);
626
626
  const r = this.declared.get(t.type);
627
- return ge(r?.text, t, this.translate) ?? "";
627
+ return be(r?.text, t, this.translate) ?? "";
628
628
  }
629
629
  /** The descriptor as it arrived; needed to store `text` as a key. */
630
630
  descriptor(t) {
@@ -649,11 +649,11 @@ class yn {
649
649
  * {@link ResolvedActivityType}.
650
650
  */
651
651
  isMessage(t) {
652
- return kt(this.get(t)?.shape);
652
+ return vt(this.get(t)?.shape);
653
653
  }
654
654
  /** Folds into the list under the message it answers. See {@link isNoteShape}. */
655
655
  nestsUnderParent(t) {
656
- return wt(this.get(t)?.shape);
656
+ return Mt(this.get(t)?.shape);
657
657
  }
658
658
  /** Can a person reply to this? Notes cannot — those go nowhere. */
659
659
  isReplyable(t) {
@@ -681,23 +681,23 @@ class yn {
681
681
  return this.translate;
682
682
  }
683
683
  }
684
- const Cs = new yn();
685
- function xs(e, t, n = []) {
684
+ const Ns = new _n();
685
+ function Rs(e, t, n = []) {
686
686
  const r = e.createdAt;
687
687
  if (!r) return [];
688
688
  const o = new Set(n);
689
689
  return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i, s]) => s >= r && !o.has(i)).map(([i]) => i);
690
690
  }
691
- function bn(e) {
691
+ function An(e) {
692
692
  return e.createdAt ?? 0;
693
693
  }
694
- function Os(e) {
694
+ function Ds(e) {
695
695
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
696
696
  }
697
- function Ns(e) {
697
+ function $s(e) {
698
698
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
699
699
  }
700
- const vt = [
700
+ const Ct = [
701
701
  {
702
702
  id: "openai",
703
703
  attachmentKinds: ["image", "pdf"],
@@ -787,45 +787,45 @@ const vt = [
787
787
  defaultModel: "default"
788
788
  }
789
789
  ];
790
- function re(e) {
791
- return vt.find((t) => t.id === e);
790
+ function oe(e) {
791
+ return Ct.find((t) => t.id === e);
792
792
  }
793
- function Rs(e) {
794
- return re(e)?.label ?? e;
793
+ function Ls(e) {
794
+ return oe(e)?.label ?? e;
795
795
  }
796
- function Ds(e, t = "gpt-5-mini") {
797
- return re(e)?.defaultModel ?? t;
796
+ function Ps(e, t = "gpt-5-mini") {
797
+ return oe(e)?.defaultModel ?? t;
798
798
  }
799
- function $s(e) {
800
- return vt.filter((t) => t.capabilities.includes(e));
799
+ function Ks(e) {
800
+ return Ct.filter((t) => t.capabilities.includes(e));
801
801
  }
802
- function Ls(e) {
803
- const t = re(e);
802
+ function Us(e) {
803
+ const t = oe(e);
804
804
  return !!t && !t.baseUrl;
805
805
  }
806
- function Ps(e, t) {
807
- return t === "text" ? !0 : re(e)?.attachmentKinds?.includes(t) === !0;
806
+ function Fs(e, t) {
807
+ return t === "text" ? !0 : oe(e)?.attachmentKinds?.includes(t) === !0;
808
808
  }
809
- function Ks(e, t) {
809
+ function Bs(e, t) {
810
810
  if (!e.enabled) return "ok";
811
- const n = Ge(e.hardLimitNanos), r = Ge(e.softLimitNanos);
811
+ const n = ze(e.hardLimitNanos), r = ze(e.softLimitNanos);
812
812
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
813
813
  }
814
- function Ge(e) {
814
+ function ze(e) {
815
815
  return typeof e == "number" ? e : void 0;
816
816
  }
817
- function _n(e, t = "month") {
817
+ function Sn(e, t = "month") {
818
818
  const n = new Date(e);
819
819
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
820
820
  }
821
- function Us(e, t = "month") {
822
- const n = new Date(_n(e, t));
821
+ function js(e, t = "month") {
822
+ const n = new Date(Sn(e, t));
823
823
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
824
824
  }
825
- function Fs(e) {
825
+ function Hs(e) {
826
826
  return e?.listeningEnabled !== !1;
827
827
  }
828
- const Bs = [
828
+ const Gs = [
829
829
  { id: "agent", label: "Agent", labelSource: "user" },
830
830
  { id: "team", label: "Team", labelSource: "team" },
831
831
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -835,64 +835,64 @@ const Bs = [
835
835
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
836
836
  { id: "time", label: "Tijd", labelSource: "raw" }
837
837
  ];
838
- function ce(e) {
838
+ function le(e) {
839
839
  return e < 10 ? `0${e}` : `${e}`;
840
840
  }
841
841
  function G(e, t) {
842
- const n = new Date(e), r = `${n.getUTCFullYear()}-${ce(n.getUTCMonth() + 1)}-${ce(n.getUTCDate())}`;
843
- return t === "day" ? r : `${r}T${ce(n.getUTCHours())}`;
842
+ const n = new Date(e), r = `${n.getUTCFullYear()}-${le(n.getUTCMonth() + 1)}-${le(n.getUTCDate())}`;
843
+ return t === "day" ? r : `${r}T${le(n.getUTCHours())}`;
844
844
  }
845
845
  function W(e, t) {
846
846
  const n = new Date(e);
847
847
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
848
848
  }
849
- const An = 36e5, Sn = 864e5;
850
- function js(e, t, n) {
851
- const r = n === "hour" ? An : Sn, o = [];
849
+ const En = 36e5, Tn = 864e5;
850
+ function Ws(e, t, n) {
851
+ const r = n === "hour" ? En : Tn, o = [];
852
852
  for (let i = W(e, n); i <= t; i += r)
853
853
  o.push(G(i, n));
854
854
  return o;
855
855
  }
856
- const En = /* @__PURE__ */ new Set(["time"]);
857
- function Hs(e, t, n) {
856
+ const In = /* @__PURE__ */ new Set(["time"]);
857
+ function Vs(e, t, n) {
858
858
  if (!e) return [];
859
859
  const r = new Set(e.supportedDimensions ?? []);
860
- return t.filter((o) => r.has(o.id) && !En.has(o.id)).map((o) => ({
860
+ return t.filter((o) => r.has(o.id) && !In.has(o.id)).map((o) => ({
861
861
  id: o.id,
862
862
  label: o.label,
863
863
  options: o.options?.length ? o.options : n[o.id] ?? []
864
864
  })).filter((o) => o.options.length > 0);
865
865
  }
866
- function Gs(e, t) {
866
+ function zs(e, t) {
867
867
  const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
868
868
  return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
869
869
  }
870
- function Ws(e) {
870
+ function Xs(e) {
871
871
  return { value: e.id, label: `${e.category} · ${e.label}` };
872
872
  }
873
- const Tn = [
873
+ const kn = [
874
874
  { id: "resource", label: "Resource", labelSource: "raw" },
875
875
  { id: "origin", label: "Herkomst", labelSource: "raw" }
876
- ], In = Tn.map((e) => e.id);
877
- function kn(e, t) {
876
+ ], wn = kn.map((e) => e.id);
877
+ function vn(e, t) {
878
878
  return `${e}.usage.${t}`;
879
879
  }
880
- function Vs(e, t) {
880
+ function Ys(e, t) {
881
881
  return t.map((n) => ({
882
- id: kn(e, n.unit),
882
+ id: vn(e, n.unit),
883
883
  label: n.label,
884
884
  category: "Verbruik",
885
885
  valueType: n.valueType ?? "count",
886
886
  aggregation: "sum",
887
887
  supportedDimensions: [
888
888
  "provider",
889
- ...In,
889
+ ...wn,
890
890
  ...n.extraDimensions ?? [],
891
891
  "time"
892
892
  ]
893
893
  }));
894
894
  }
895
- const Mt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), We = 200, Ve = 100, ze = 200, Xe = 12, Ye = 4, qe = 10, wn = 8, Qe = 12, Ct = 4e3, Z = 500, zs = 1024 * 1024, vn = /* @__PURE__ */ new Set([
895
+ const Ot = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), Xe = 200, Ye = 100, qe = 200, Qe = 12, Ze = 4, Je = 10, Mn = 8, et = 12, xt = 4e3, Z = 500, qs = 1024 * 1024, Cn = /* @__PURE__ */ new Set([
896
896
  "heading",
897
897
  "paragraph",
898
898
  "list",
@@ -906,15 +906,15 @@ const Mt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
906
906
  "letterhead",
907
907
  "totals",
908
908
  "pagebreak"
909
- ]), Mn = ["http:", "https:", "mailto:", "tel:"], Cn = /^[a-z][a-z0-9+.-]*:/i;
910
- function Me(e) {
909
+ ]), On = ["http:", "https:", "mailto:", "tel:"], xn = /^[a-z][a-z0-9+.-]*:/i;
910
+ function xe(e) {
911
911
  const t = e.trim().replace(/^<|>$/g, "");
912
912
  if (!t) return !1;
913
- const n = Cn.exec(t)?.[0];
914
- return n ? Mn.includes(n.toLowerCase()) : !t.startsWith("//");
913
+ const n = xn.exec(t)?.[0];
914
+ return n ? On.includes(n.toLowerCase()) : !t.startsWith("//");
915
915
  }
916
- const xn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
917
- function On(e) {
916
+ const Nn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
917
+ function Rn(e) {
918
918
  let t = "", n = 0;
919
919
  for (; n < e.length; ) {
920
920
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -922,22 +922,22 @@ function On(e) {
922
922
  t += e[n], n += 1;
923
923
  continue;
924
924
  }
925
- const o = n + (r ? 2 : 1), i = Ze(e, o, "[", "]");
925
+ const o = n + (r ? 2 : 1), i = tt(e, o, "[", "]");
926
926
  if (i < 0 || e[i + 1] !== "(") {
927
927
  t += e[n], n += 1;
928
928
  continue;
929
929
  }
930
- const s = Ze(e, i + 2, "(", ")");
930
+ const s = tt(e, i + 2, "(", ")");
931
931
  if (s < 0) {
932
932
  t += e[n], n += 1;
933
933
  continue;
934
934
  }
935
935
  const a = e.slice(o, i), u = e.slice(i + 2, s).trim().split(/\s+/)[0] ?? "";
936
- t += r || !Me(u) ? a : e.slice(n, s + 1), n = s + 1;
936
+ t += r || !xe(u) ? a : e.slice(n, s + 1), n = s + 1;
937
937
  }
938
938
  return t;
939
939
  }
940
- function Ze(e, t, n, r) {
940
+ function tt(e, t, n, r) {
941
941
  let o = 1;
942
942
  for (let i = t; i < e.length; i += 1) {
943
943
  if (e[i] === "\\") {
@@ -950,36 +950,36 @@ function Ze(e, t, n, r) {
950
950
  }
951
951
  return -1;
952
952
  }
953
- function Nn(e) {
954
- return On(e).replace(
955
- xn,
956
- (t, n, r) => Me(r) ? t : ""
953
+ function Dn(e) {
954
+ return Rn(e).replace(
955
+ Nn,
956
+ (t, n, r) => xe(r) ? t : ""
957
957
  );
958
958
  }
959
- function I(e, t = Ct) {
960
- return typeof e == "string" ? Nn(e).slice(0, t) : "";
959
+ function I(e, t = xt) {
960
+ return typeof e == "string" ? Dn(e).slice(0, t) : "";
961
961
  }
962
- function Rn(e, t = Ct) {
962
+ function $n(e, t = xt) {
963
963
  return typeof e == "string" ? e.slice(0, t) : "";
964
964
  }
965
965
  function B(e, t = 200) {
966
966
  return I(e, t);
967
967
  }
968
- function Dn(e, t = "info") {
969
- return typeof e == "string" && Mt.has(e) ? e : t;
968
+ function Ln(e, t = "info") {
969
+ return typeof e == "string" && Ot.has(e) ? e : t;
970
970
  }
971
- function Xs(e, t = () => {
971
+ function Qs(e, t = () => {
972
972
  }) {
973
973
  if (!Array.isArray(e)) return [];
974
974
  const n = [];
975
975
  for (const r of e) {
976
- if (n.length >= We) {
977
- t(`more than ${We} blocks; the rest was dropped`);
976
+ if (n.length >= Xe) {
977
+ t(`more than ${Xe} blocks; the rest was dropped`);
978
978
  break;
979
979
  }
980
980
  if (!r || typeof r != "object") continue;
981
981
  const o = r;
982
- if (!vn.has(o.type)) {
982
+ if (!Cn.has(o.type)) {
983
983
  t(`unknown block type ${String(o.type)}`);
984
984
  continue;
985
985
  }
@@ -1014,7 +1014,7 @@ function Xs(e, t = () => {
1014
1014
  break;
1015
1015
  }
1016
1016
  case "code": {
1017
- const s = Rn(o.text);
1017
+ const s = $n(o.text);
1018
1018
  if (!s) {
1019
1019
  t("a code block without text");
1020
1020
  continue;
@@ -1029,8 +1029,8 @@ function Xs(e, t = () => {
1029
1029
  case "list": {
1030
1030
  const s = Array.isArray(o.items) ? o.items : [], a = [];
1031
1031
  for (const l of s) {
1032
- if (a.length >= Ve) {
1033
- t(`more than ${Ve} list items`);
1032
+ if (a.length >= Ye) {
1033
+ t(`more than ${Ye} list items`);
1034
1034
  break;
1035
1035
  }
1036
1036
  const d = I(l?.text);
@@ -1049,8 +1049,8 @@ function Xs(e, t = () => {
1049
1049
  case "table": {
1050
1050
  const s = Array.isArray(o.columns) ? o.columns : [], a = [];
1051
1051
  for (const c of s) {
1052
- if (a.length >= Xe) {
1053
- t(`more than ${Xe} table columns`);
1052
+ if (a.length >= Qe) {
1053
+ t(`more than ${Qe} table columns`);
1054
1054
  break;
1055
1055
  }
1056
1056
  const p = I(c?.label, Z), f = c?.align === "right" ? "right" : void 0;
@@ -1062,8 +1062,8 @@ function Xs(e, t = () => {
1062
1062
  }
1063
1063
  const u = Array.isArray(o.rows) ? o.rows : [], l = [];
1064
1064
  for (const c of u) {
1065
- if (l.length >= ze) {
1066
- t(`more than ${ze} table rows`);
1065
+ if (l.length >= qe) {
1066
+ t(`more than ${qe} table rows`);
1067
1067
  break;
1068
1068
  }
1069
1069
  const p = Array.isArray(c) ? c : [];
@@ -1082,15 +1082,15 @@ function Xs(e, t = () => {
1082
1082
  case "kpi": {
1083
1083
  const s = Array.isArray(o.items) ? o.items : [], a = [];
1084
1084
  for (const u of s) {
1085
- if (a.length >= Ye) {
1086
- t(`more than ${Ye} kpi items`);
1085
+ if (a.length >= Ze) {
1086
+ t(`more than ${Ze} kpi items`);
1087
1087
  break;
1088
1088
  }
1089
1089
  const l = I(u?.value, 40), d = I(u?.label, 80);
1090
1090
  if (!l || !d) continue;
1091
1091
  const c = u?.tone;
1092
1092
  a.push(
1093
- typeof c == "string" && Mt.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
1093
+ typeof c == "string" && Ot.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
1094
1094
  );
1095
1095
  }
1096
1096
  if (a.length === 0) {
@@ -1102,7 +1102,7 @@ function Xs(e, t = () => {
1102
1102
  }
1103
1103
  case "image": {
1104
1104
  const s = typeof o.url == "string" ? o.url.trim() : "";
1105
- if (!s || !Me(s)) {
1105
+ if (!s || !xe(s)) {
1106
1106
  t("an image without a usable url");
1107
1107
  continue;
1108
1108
  }
@@ -1119,8 +1119,8 @@ function Xs(e, t = () => {
1119
1119
  case "letterhead": {
1120
1120
  const s = Array.isArray(o.fields) ? o.fields : [], a = [];
1121
1121
  for (const d of s) {
1122
- if (a.length >= qe) {
1123
- t(`more than ${qe} letterhead fields`);
1122
+ if (a.length >= Je) {
1123
+ t(`more than ${Je} letterhead fields`);
1124
1124
  break;
1125
1125
  }
1126
1126
  const c = d, p = typeof c?.key == "string" ? c.key.slice(0, 48) : "", f = B(c?.value);
@@ -1128,7 +1128,7 @@ function Xs(e, t = () => {
1128
1128
  const y = B(c?.label, 80);
1129
1129
  a.push(y ? { key: p, label: y, value: f } : { key: p, value: f });
1130
1130
  }
1131
- const l = (Array.isArray(o.recipient) ? o.recipient : []).slice(0, wn).map((d) => B(d)).filter(Boolean);
1131
+ const l = (Array.isArray(o.recipient) ? o.recipient : []).slice(0, Mn).map((d) => B(d)).filter(Boolean);
1132
1132
  if (a.length === 0 && l.length === 0) {
1133
1133
  t("a letterhead without fields or recipient");
1134
1134
  continue;
@@ -1145,8 +1145,8 @@ function Xs(e, t = () => {
1145
1145
  const s = (l) => {
1146
1146
  const d = Array.isArray(l) ? l : [], c = [];
1147
1147
  for (const p of d) {
1148
- if (c.length >= Qe) {
1149
- t(`more than ${Qe} totals rows`);
1148
+ if (c.length >= et) {
1149
+ t(`more than ${et} totals rows`);
1150
1150
  break;
1151
1151
  }
1152
1152
  const f = p, y = B(f?.label), m = B(f?.amount, 40);
@@ -1177,7 +1177,7 @@ function Xs(e, t = () => {
1177
1177
  n.push({
1178
1178
  ...i,
1179
1179
  type: "callout",
1180
- tone: Dn(o.tone),
1180
+ tone: Ln(o.tone),
1181
1181
  ...a ? { title: a } : {},
1182
1182
  text: s
1183
1183
  });
@@ -1187,28 +1187,28 @@ function Xs(e, t = () => {
1187
1187
  }
1188
1188
  return n;
1189
1189
  }
1190
- function Ys(e) {
1190
+ function Zs(e) {
1191
1191
  return JSON.stringify(e).length;
1192
1192
  }
1193
- function qs(e) {
1193
+ function Js(e) {
1194
1194
  return {
1195
1195
  blocks: e.length,
1196
1196
  types: e.map((t) => t.type),
1197
1197
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
1198
1198
  };
1199
1199
  }
1200
- function Je(e) {
1200
+ function nt(e) {
1201
1201
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
1202
1202
  }
1203
- function le(e, t, n) {
1203
+ function ue(e, t, n) {
1204
1204
  const r = e.map((o, i) => n?.[i] === "right" ? "---:" : "---");
1205
1205
  return [
1206
- `| ${e.map(Je).join(" | ")} |`,
1206
+ `| ${e.map(nt).join(" | ")} |`,
1207
1207
  `| ${r.join(" | ")} |`,
1208
- ...t.map((o) => `| ${o.map(Je).join(" | ")} |`)
1208
+ ...t.map((o) => `| ${o.map(nt).join(" | ")} |`)
1209
1209
  ];
1210
1210
  }
1211
- function $n(e) {
1211
+ function Pn(e) {
1212
1212
  switch (e.type) {
1213
1213
  case "heading":
1214
1214
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -1226,7 +1226,7 @@ function $n(e) {
1226
1226
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
1227
1227
  });
1228
1228
  case "table": {
1229
- const t = le(
1229
+ const t = ue(
1230
1230
  e.columns.map((n) => n.label),
1231
1231
  e.rows,
1232
1232
  e.columns.map((n) => n.align ?? "left")
@@ -1234,7 +1234,7 @@ function $n(e) {
1234
1234
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
1235
1235
  }
1236
1236
  case "kpi":
1237
- return le(
1237
+ return ue(
1238
1238
  e.items.map((t) => t.value),
1239
1239
  [e.items.map((t) => t.label)]
1240
1240
  );
@@ -1252,7 +1252,7 @@ function $n(e) {
1252
1252
  return t.map((n, r) => r < t.length - 1 ? `${n} ` : n);
1253
1253
  }
1254
1254
  case "totals":
1255
- return le(
1255
+ return ue(
1256
1256
  ["", ""],
1257
1257
  [...e.rows, ...e.taxRows ?? []].map((t) => [
1258
1258
  t.emphasis ? `**${t.label}**` : t.label,
@@ -1264,11 +1264,11 @@ function $n(e) {
1264
1264
  return ["---"];
1265
1265
  }
1266
1266
  }
1267
- function Ln(e, t) {
1267
+ function Kn(e, t) {
1268
1268
  const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
1269
1269
  t && !r && n.push(`# ${t}`);
1270
1270
  for (const o of e) {
1271
- const i = $n(o);
1271
+ const i = Pn(o);
1272
1272
  i.length > 0 && n.push(i.join(`
1273
1273
  `));
1274
1274
  }
@@ -1277,45 +1277,45 @@ function Ln(e, t) {
1277
1277
  `)}
1278
1278
  `;
1279
1279
  }
1280
- const xt = (e) => `user:${e}`, Ot = (e) => `team:${e}`;
1281
- function Qs(e) {
1280
+ const Nt = (e) => `user:${e}`, Rt = (e) => `team:${e}`;
1281
+ function ea(e) {
1282
1282
  const t = /* @__PURE__ */ new Set();
1283
1283
  for (const n of e ?? [])
1284
- n?.id && (n.kind === "user" && t.add(xt(n.id)), n.kind === "team" && t.add(Ot(n.id)));
1284
+ n?.id && (n.kind === "user" && t.add(Nt(n.id)), n.kind === "team" && t.add(Rt(n.id)));
1285
1285
  return [...t].sort();
1286
1286
  }
1287
- function Zs(e, t) {
1288
- return [xt(e), ...t.map(Ot)];
1287
+ function ta(e, t) {
1288
+ return [Nt(e), ...t.map(Rt)];
1289
1289
  }
1290
- function Js(e) {
1290
+ function na(e) {
1291
1291
  const t = /* @__PURE__ */ new Set();
1292
1292
  for (const n of e ?? [])
1293
1293
  n?.kind && t.add(n.kind);
1294
1294
  return [...t];
1295
1295
  }
1296
- const Pn = ["done", "escalated"], ea = ["open", "waiting"];
1297
- function ta(e) {
1298
- return Pn.includes(e);
1296
+ const Un = ["done", "escalated"], ra = ["open", "waiting"];
1297
+ function oa(e) {
1298
+ return Un.includes(e);
1299
1299
  }
1300
- const Kn = "assignment";
1301
- function na(e) {
1302
- return `${Kn}:${e}`;
1300
+ const Fn = "assignment";
1301
+ function ia(e) {
1302
+ return `${Fn}:${e}`;
1303
1303
  }
1304
- function ra(e, t, n, r) {
1304
+ function sa(e, t, n, r) {
1305
1305
  if (e.direction === "inbound") return !0;
1306
1306
  if (e.author?.type === "user" && e.author.id === t) return !1;
1307
1307
  const o = e.payload?.mentions;
1308
1308
  return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
1309
1309
  }
1310
- function oa(e) {
1310
+ function aa(e) {
1311
1311
  const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
1312
1312
  return !o || !t || t !== r ? !1 : n !== r;
1313
1313
  }
1314
- function ia(e) {
1314
+ function ca(e) {
1315
1315
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1316
1316
  }
1317
- const Un = 12;
1318
- function sa(e, t, n = Un) {
1317
+ const Bn = 12;
1318
+ function la(e, t, n = Bn) {
1319
1319
  const r = t + 1;
1320
1320
  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 ? {
1321
1321
  status: "escalated",
@@ -1329,30 +1329,30 @@ function sa(e, t, n = Un) {
1329
1329
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1330
1330
  };
1331
1331
  }
1332
- const aa = "organization.business-entities.list";
1333
- function ca(e, t, n) {
1332
+ const ua = "organization.business-entities.list";
1333
+ function da(e, t, n) {
1334
1334
  return e ? e === t : n;
1335
1335
  }
1336
- function Fn(e) {
1336
+ function jn(e) {
1337
1337
  const t = e.trim().replace(/[\s-]/g, "");
1338
1338
  if (!/^\d+$/.test(t) || ![8, 12, 13, 14].includes(t.length)) return;
1339
1339
  const n = t.padStart(14, "0");
1340
- return Bn(n.slice(0, 13)) === Number(n[13]) ? n : void 0;
1340
+ return Hn(n.slice(0, 13)) === Number(n[13]) ? n : void 0;
1341
1341
  }
1342
- function Bn(e) {
1342
+ function Hn(e) {
1343
1343
  let t = 0;
1344
1344
  for (let n = 0; n < e.length; n++)
1345
1345
  t += Number(e[n]) * (n % 2 === 0 ? 3 : 1);
1346
1346
  return (10 - t % 10) % 10;
1347
1347
  }
1348
- function la(e, t) {
1349
- const n = t.trim(), r = Fn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
1348
+ function pa(e, t) {
1349
+ const n = t.trim(), r = jn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
1350
1350
  return r && o.push({ gtin: r }), { organizationId: e, $or: o };
1351
1351
  }
1352
1352
  function V(e) {
1353
1353
  return e < 0 ? -Math.round(-e) : Math.round(e);
1354
1354
  }
1355
- function jn(e, t) {
1355
+ function Gn(e, t) {
1356
1356
  if (t.length === 0) return [];
1357
1357
  const n = t.reduce((u, l) => u + l, 0);
1358
1358
  if (n === 0) return t.map((u, l) => l === 0 ? e : 0);
@@ -1370,25 +1370,25 @@ function D(e, t = {}) {
1370
1370
  l > 0 && (s.length - l) % 3 === 0 && (u += r), u += s[l];
1371
1371
  return `${o ? "-" : ""}${u}${n}${a}`;
1372
1372
  }
1373
- function ua(e) {
1373
+ function fa(e) {
1374
1374
  const t = e.trim().replace(/[\s ]/g, "");
1375
1375
  if (!t) return;
1376
1376
  const n = t.replace(/^[-+]?[^\d.,-]*/, "").replace(/[^\d.,-]+$/, ""), r = /^-/.test(t) || /-$/.test(t), o = n.replace(/-/g, "");
1377
1377
  if (!o || !/^[\d.,]+$/.test(o)) return;
1378
1378
  const i = o.lastIndexOf(","), s = o.lastIndexOf("."), a = Math.max(i, s), u = a === -1 ? "" : o.slice(a + 1), l = a !== -1 && u.length >= 1 && u.length <= 2, d = l ? o.slice(0, a) : o;
1379
- if (!Hn(d)) return;
1379
+ if (!Wn(d)) return;
1380
1380
  const c = d.replace(/[.,]/g, ""), p = l ? u.padEnd(2, "0") : "00";
1381
1381
  if (c === "") return;
1382
1382
  const f = Number(c) * 100 + Number(p);
1383
1383
  return r ? -f : f;
1384
1384
  }
1385
- function Hn(e) {
1385
+ function Wn(e) {
1386
1386
  return /^\d+$/.test(e) ? !0 : e.includes(".") && e.includes(",") ? !1 : /^\d{1,3}([.,]\d{3})*$/.test(e);
1387
1387
  }
1388
- function da(e) {
1388
+ function ma(e) {
1389
1389
  return e.costPriceCents == null ? e.netCents : e.netCents - V(e.costPriceCents * e.quantity);
1390
1390
  }
1391
- const Gn = [
1391
+ const Vn = [
1392
1392
  {
1393
1393
  key: "contract",
1394
1394
  matches: (e, t) => !!e.contractId && e.contractId === t.contractId && !!e.productId
@@ -1410,40 +1410,40 @@ const Gn = [
1410
1410
  matches: (e, t) => !e.contractId && !e.companyId && !!e.segmentKey && e.segmentKey === t.segmentKey && !!e.categoryKey
1411
1411
  }
1412
1412
  ];
1413
- function pa(e, t, n) {
1413
+ function ha(e, t, n) {
1414
1414
  const r = n.filter(
1415
1415
  (o) => o.currency === e.currency && (o.validFrom == null || o.validFrom <= t.at) && (o.validTo == null || o.validTo >= t.at) && (o.minQuantity == null || t.quantity >= o.minQuantity) && (o.productId == null || o.productId === e.id) && (o.categoryKey == null || o.categoryKey === e.categoryKey) && (o.productId != null || o.categoryKey != null)
1416
1416
  );
1417
- for (const o of Gn) {
1417
+ for (const o of Vn) {
1418
1418
  const i = r.filter((a) => o.matches(a, t));
1419
1419
  if (i.length === 0) continue;
1420
1420
  const s = i.reduce(
1421
1421
  (a, u) => (u.minQuantity ?? 0) >= (a.minQuantity ?? 0) ? u : a
1422
1422
  );
1423
1423
  return {
1424
- unitPriceCents: Wn(s, e.listPriceCents),
1424
+ unitPriceCents: zn(s, e.listPriceCents),
1425
1425
  sourceKey: (s.minQuantity ?? 0) > 1 ? "tier" : o.key,
1426
1426
  ruleId: s.id
1427
1427
  };
1428
1428
  }
1429
1429
  return { unitPriceCents: e.listPriceCents, sourceKey: "list" };
1430
1430
  }
1431
- function Wn(e, t) {
1431
+ function zn(e, t) {
1432
1432
  return e.unitPriceCents != null ? e.unitPriceCents : e.discountPercent != null ? V(t * (1 - e.discountPercent / 100)) : t;
1433
1433
  }
1434
- const fa = ["piece", "hour", "day", "month", "km", "license"], ma = /* @__PURE__ */ new Set(["mail", "message"]);
1435
- function Vn(e, t) {
1434
+ const ga = ["piece", "hour", "day", "month", "km", "license"], ya = /* @__PURE__ */ new Set(["mail", "message"]);
1435
+ function Xn(e, t) {
1436
1436
  const n = e.settings?.signatures?.[t];
1437
1437
  return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
1438
1438
  }
1439
- function ha(e, t, n, r = "html") {
1439
+ function ba(e, t, n, r = "html") {
1440
1440
  if (!e) return n;
1441
- const o = Vn(e, t);
1441
+ const o = Xn(e, t);
1442
1442
  return o ? `${n}${r === "text" ? `
1443
1443
 
1444
1444
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
1445
1445
  }
1446
- function ga(e) {
1446
+ function _a(e) {
1447
1447
  return e.endpoints ?? [];
1448
1448
  }
1449
1449
  function $(e) {
@@ -1451,18 +1451,18 @@ function $(e) {
1451
1451
  if (t)
1452
1452
  return t.split(/[-_]/)[0] || void 0;
1453
1453
  }
1454
- function ya(e) {
1454
+ function Aa(e) {
1455
1455
  return $(e.contactLocale) ?? $(e.companyLocale) ?? $(e.organizationLocale);
1456
1456
  }
1457
- function ba(e, t, n, r) {
1457
+ function Sa(e, t, n, r) {
1458
1458
  const o = e.filter((a) => a.key === t && !a.archived);
1459
1459
  if (o.length === 0) return;
1460
1460
  const i = $(n), s = $(r);
1461
1461
  return o.find((a) => $(a.locale) === i) ?? o.find((a) => $(a.locale) === s) ?? // A row with no language at all is the single-language case: it is for everybody.
1462
1462
  o.find((a) => !a.locale) ?? o[0];
1463
1463
  }
1464
- const zn = /\{([a-zA-Z0-9_.]+)\}/g;
1465
- function Nt(e, t) {
1464
+ const Yn = /\{([a-zA-Z0-9_.]+)\}/g;
1465
+ function Dt(e, t) {
1466
1466
  let n = e;
1467
1467
  for (const r of t.split(".")) {
1468
1468
  if (n == null || typeof n != "object") return;
@@ -1470,33 +1470,33 @@ function Nt(e, t) {
1470
1470
  }
1471
1471
  return n;
1472
1472
  }
1473
- function Xn(e) {
1473
+ function qn(e) {
1474
1474
  return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
1475
1475
  }
1476
- function Yn(e, t, n) {
1476
+ function Qn(e, t, n) {
1477
1477
  const r = [];
1478
- return { text: e.replace(zn, (i, s) => {
1479
- const a = Nt(t, s);
1480
- return a == null || a === "" ? (r.includes(s) || r.push(s), n ?? `{${s}}`) : Xn(a);
1478
+ return { text: e.replace(Yn, (i, s) => {
1479
+ const a = Dt(t, s);
1480
+ return a == null || a === "" ? (r.includes(s) || r.push(s), n ?? `{${s}}`) : qn(a);
1481
1481
  }), unresolved: r };
1482
1482
  }
1483
- function qn(e, t) {
1483
+ function Zn(e, t) {
1484
1484
  if (!e) return !0;
1485
- const n = Nt(t, e.key);
1485
+ const n = Dt(t, e.key);
1486
1486
  if (e.exists !== void 0) {
1487
1487
  const r = n != null && n !== "" && n !== !1;
1488
1488
  return e.exists ? r : !r;
1489
1489
  }
1490
1490
  return e.equals !== void 0 ? n === e.equals : !0;
1491
1491
  }
1492
- function _a(e, t, n, r, o) {
1492
+ function Ea(e, t, n, r, o) {
1493
1493
  const i = [], s = [], a = /* @__PURE__ */ new Set(), u = (l) => {
1494
- const d = Yn(l, t, o);
1494
+ const d = Qn(l, t, o);
1495
1495
  for (const c of d.unresolved) i.includes(c) || i.push(c);
1496
1496
  return d.text;
1497
1497
  };
1498
1498
  for (const l of e) {
1499
- if (l.block_id && !qn(n?.[l.block_id], t)) continue;
1499
+ if (l.block_id && !Zn(n?.[l.block_id], t)) continue;
1500
1500
  const d = l.block_id ? r?.[l.block_id] : void 0;
1501
1501
  if (d && l.block_id) {
1502
1502
  a.add(l.block_id), s.push(...d);
@@ -1586,7 +1586,7 @@ function _a(e, t, n, r, o) {
1586
1586
  unusedSlots: Object.keys(r ?? {}).filter((l) => !a.has(l))
1587
1587
  };
1588
1588
  }
1589
- function Qn(e) {
1589
+ function Jn(e) {
1590
1590
  const t = e?.address, n = [t?.street, t?.houseNumber].filter(Boolean).join(" "), r = [t?.postalCode, t?.city].filter(Boolean).join(" ");
1591
1591
  return {
1592
1592
  name: e?.name ?? "",
@@ -1600,8 +1600,8 @@ function Qn(e) {
1600
1600
  ...e?.logo ? { logo: e.logo } : {}
1601
1601
  };
1602
1602
  }
1603
- function Aa(e) {
1604
- return Qn({
1603
+ function Ta(e) {
1604
+ return Jn({
1605
1605
  name: e?.billing?.companyName || e?.name || e?.displayName || "",
1606
1606
  address: e?.address,
1607
1607
  kvkNumber: e?.billing?.kvkNumber,
@@ -1611,24 +1611,24 @@ function Aa(e) {
1611
1611
  logo: e?.logo
1612
1612
  });
1613
1613
  }
1614
- const Zn = 36e5, Jn = 864e5, L = -1 / 0, Sa = (e) => e.score > L, te = {
1614
+ const er = 36e5, tr = 864e5, L = -1 / 0, Ia = (e) => e.score > L, te = {
1615
1615
  urgent: 40,
1616
1616
  high: 25,
1617
1617
  normal: 10,
1618
1618
  low: 0
1619
1619
  };
1620
- function Ea(e) {
1620
+ function ka(e) {
1621
1621
  return Object.fromEntries(e.map((t) => [t.resourceId, t]));
1622
1622
  }
1623
- const er = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Rt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1624
- function tr(e, t) {
1625
- return !!(e && er.test(e) || t && Rt.test(t));
1623
+ const nr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, $t = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1624
+ function rr(e, t) {
1625
+ return !!(e && nr.test(e) || t && $t.test(t));
1626
1626
  }
1627
- const nr = 3, rr = 600;
1628
- function Ta(e, t) {
1629
- return e >= nr || t >= rr;
1627
+ const or = 3, ir = 600;
1628
+ function wa(e, t) {
1629
+ return e >= or || t >= ir;
1630
1630
  }
1631
- const or = [
1631
+ const sr = [
1632
1632
  "list-unsubscribe",
1633
1633
  "list-unsubscribe-post",
1634
1634
  "list-id",
@@ -1638,93 +1638,93 @@ const or = [
1638
1638
  "feedback-id",
1639
1639
  "x-mailer"
1640
1640
  ];
1641
- function Ia(e) {
1641
+ function va(e) {
1642
1642
  const t = {};
1643
1643
  for (const n of e) {
1644
1644
  const r = n.name?.toLowerCase();
1645
- r && n.value !== void 0 && or.includes(r) && (t[r] = n.value);
1645
+ r && n.value !== void 0 && sr.includes(r) && (t[r] = n.value);
1646
1646
  }
1647
1647
  return t;
1648
1648
  }
1649
- const ir = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, sr = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1650
- function ka(e) {
1649
+ const ar = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, cr = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1650
+ function Ma(e) {
1651
1651
  const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
1652
- if (r && r !== "no" || t["x-auto-response-suppress"] || n && ir.test(n))
1652
+ if (r && r !== "no" || t["x-auto-response-suppress"] || n && ar.test(n))
1653
1653
  return "automated";
1654
1654
  const o = t.precedence?.toLowerCase();
1655
- if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && Rt.test(e.body) || n && sr.test(n))
1655
+ if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && $t.test(e.body) || n && cr.test(n))
1656
1656
  return "marketing";
1657
1657
  }
1658
- function ar(e, t) {
1658
+ function lr(e, t) {
1659
1659
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1660
1660
  }
1661
- const cr = ["open"], lr = 1e3, ur = {
1661
+ const ur = ["open"], dr = 1e3, pr = {
1662
1662
  urgent: 1,
1663
1663
  high: 4,
1664
1664
  normal: 8,
1665
1665
  low: 24
1666
- }, dr = 72;
1667
- function pr(e) {
1668
- return e.lastActivityAt ?? (e.createdAt ? new Date(bn(e)).getTime() : 0);
1666
+ }, fr = 72;
1667
+ function mr(e) {
1668
+ return e.lastActivityAt ?? (e.createdAt ? new Date(An(e)).getTime() : 0);
1669
1669
  }
1670
- function fr(e, t) {
1671
- return mr(t.remindersById?.[e.id], e, t.now);
1670
+ function hr(e, t) {
1671
+ return gr(t.remindersById?.[e.id], e, t.now);
1672
1672
  }
1673
- function mr(e, t, n) {
1673
+ function gr(e, t, n) {
1674
1674
  return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
1675
1675
  }
1676
- const Dt = (e) => pn(e) === "outbound_message", $t = (e) => cr.includes(e);
1677
- function Ce(e, t) {
1678
- return Math.max(0, (t - pr(e)) / Zn);
1676
+ const Lt = (e) => mn(e) === "outbound_message", Pt = (e) => ur.includes(e);
1677
+ function Ne(e, t) {
1678
+ return Math.max(0, (t - mr(e)) / er);
1679
1679
  }
1680
- function hr(e, t) {
1680
+ function yr(e, t) {
1681
1681
  const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
1682
- return typeof n == "number" && n > 0 ? n : ur[e.priority ?? "normal"];
1682
+ return typeof n == "number" && n > 0 ? n : pr[e.priority ?? "normal"];
1683
1683
  }
1684
- function wa(e) {
1684
+ function Ca(e) {
1685
1685
  const t = {};
1686
1686
  for (const n of e)
1687
1687
  typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
1688
1688
  return t;
1689
1689
  }
1690
- function va(e, t, n) {
1691
- return !$t(e.status) || e.firstResponseAt ? !1 : Ce(e, t) > hr(e, n);
1690
+ function Oa(e, t, n) {
1691
+ return !Pt(e.status) || e.firstResponseAt ? !1 : Ne(e, t) > yr(e, n);
1692
1692
  }
1693
- function gr(e, t) {
1693
+ function br(e, t) {
1694
1694
  const n = e.lastActivityPreview;
1695
- return n?.direction !== "outbound" || !Dt(n.type) ? !1 : Ce(e, t) < dr;
1695
+ return n?.direction !== "outbound" || !Lt(n.type) ? !1 : Ne(e, t) < fr;
1696
1696
  }
1697
- function Ma(e, t) {
1698
- if (!$t(e.status)) return { score: L, reasons: [] };
1697
+ function xa(e, t) {
1698
+ if (!Pt(e.status)) return { score: L, reasons: [] };
1699
1699
  if (e.snoozedTill && e.snoozedTill > t.now) return { score: L, reasons: [] };
1700
- if (gr(e, t.now)) return { score: L, reasons: [] };
1701
- if (fr(e, t)) return { score: L, reasons: [] };
1700
+ if (br(e, t.now)) return { score: L, reasons: [] };
1701
+ if (hr(e, t)) return { score: L, reasons: [] };
1702
1702
  let n = 0;
1703
1703
  const r = [], o = e.priority ?? "normal";
1704
- te[o] > 0 && (n += te[o], r.push(`priority:${o}`)), ar(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1705
- const i = Ce(e, t.now);
1704
+ te[o] > 0 && (n += te[o], r.push(`priority:${o}`)), lr(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1705
+ const i = Ne(e, t.now);
1706
1706
  if (i > 0) {
1707
1707
  const u = Math.min(i * 2, 30);
1708
1708
  n += u, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
1709
1709
  }
1710
1710
  const s = e.lastActivityPreview;
1711
- return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && Dt(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || tr(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= lr, r.push("bulk")), { score: n, reasons: r };
1711
+ return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && Lt(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || rr(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= dr, r.push("bulk")), { score: n, reasons: r };
1712
1712
  }
1713
- const Ca = (e) => !!e.assignedUserId || !!e.assignedInboxId, xa = (e) => e.status === "closed", Oa = (e) => ({
1713
+ const Na = (e) => !!e.assignedUserId || !!e.assignedInboxId, Ra = (e) => e.status === "closed", Da = (e) => ({
1714
1714
  urgent: 10,
1715
1715
  high: 5,
1716
1716
  normal: 2,
1717
1717
  low: 1
1718
- })[e.priority] || 0, Na = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1719
- function Ra(e, t) {
1718
+ })[e.priority] || 0, $a = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1719
+ function La(e, t) {
1720
1720
  const n = e.labels ?? [];
1721
1721
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1722
1722
  }
1723
- function Da(e, t, n) {
1723
+ function Pa(e, t, n) {
1724
1724
  const r = e.translations ?? [];
1725
1725
  return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
1726
1726
  }
1727
- const et = [
1727
+ const rt = [
1728
1728
  { code: "nl", label: "Nederlands", english: "Dutch" },
1729
1729
  { code: "en", label: "English", english: "English" },
1730
1730
  { code: "de", label: "Deutsch", english: "German" },
@@ -1739,36 +1739,36 @@ const et = [
1739
1739
  { code: "fi", label: "Suomi", english: "Finnish" },
1740
1740
  { code: "tr", label: "Türkçe", english: "Turkish" }
1741
1741
  ];
1742
- function Lt(e) {
1742
+ function Kt(e) {
1743
1743
  const t = (e ?? "").toLowerCase();
1744
- return et.find((n) => n.code === t) ?? et.find((n) => n.code === t.split("-")[0]);
1744
+ return rt.find((n) => n.code === t) ?? rt.find((n) => n.code === t.split("-")[0]);
1745
1745
  }
1746
- function $a(e) {
1747
- return Lt(e)?.label ?? e;
1746
+ function Ka(e) {
1747
+ return Kt(e)?.label ?? e;
1748
1748
  }
1749
- function La(e) {
1750
- const t = Lt(e);
1749
+ function Ua(e) {
1750
+ const t = Kt(e);
1751
1751
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1752
1752
  }
1753
- const Pt = 3;
1754
- function yr(e, t) {
1753
+ const Ut = 3;
1754
+ function _r(e, t) {
1755
1755
  const n = /* @__PURE__ */ new Set();
1756
1756
  let r = 1, o = t.get(e)?.parentId;
1757
1757
  for (; o; ) {
1758
- if (n.has(o) || (n.add(o), r++, r > Pt + 1)) return 1 / 0;
1758
+ if (n.has(o) || (n.add(o), r++, r > Ut + 1)) return 1 / 0;
1759
1759
  o = t.get(o)?.parentId;
1760
1760
  }
1761
1761
  return r;
1762
1762
  }
1763
- function Pa(e, t, n) {
1763
+ function Fa(e, t, n) {
1764
1764
  if (!e) return !0;
1765
1765
  if (e === t) return !1;
1766
1766
  const r = new Map(n.map((s) => [s.id, s]));
1767
- if (!r.has(e) || t && br(e, t, r)) return !1;
1768
- const o = yr(e, r), i = t ? Kt(t, n) : 1;
1769
- return o + i <= Pt;
1767
+ if (!r.has(e) || t && Ar(e, t, r)) return !1;
1768
+ const o = _r(e, r), i = t ? Ft(t, n) : 1;
1769
+ return o + i <= Ut;
1770
1770
  }
1771
- function br(e, t, n) {
1771
+ function Ar(e, t, n) {
1772
1772
  const r = /* @__PURE__ */ new Set();
1773
1773
  let o = n.get(e)?.parentId;
1774
1774
  for (; o; ) {
@@ -1778,44 +1778,48 @@ function br(e, t, n) {
1778
1778
  }
1779
1779
  return !1;
1780
1780
  }
1781
- function Kt(e, t, n = /* @__PURE__ */ new Set()) {
1781
+ function Ft(e, t, n = /* @__PURE__ */ new Set()) {
1782
1782
  if (n.has(e)) return 1;
1783
1783
  n.add(e);
1784
1784
  const r = t.filter((o) => o.parentId === e);
1785
- return r.length ? 1 + Math.max(...r.map((o) => Kt(o.id, t, n))) : 1;
1785
+ return r.length ? 1 + Math.max(...r.map((o) => Ft(o.id, t, n))) : 1;
1786
1786
  }
1787
- const _r = "en";
1788
- function Ar(e) {
1789
- return e.defaultLocale || e.locale || _r;
1787
+ const Sr = "en";
1788
+ function Er(e) {
1789
+ return e.defaultLocale || e.locale || Sr;
1790
1790
  }
1791
- function Ka(e) {
1791
+ function Ba(e) {
1792
1792
  const t = /* @__PURE__ */ new Set(), n = [];
1793
- for (const r of [Ar(e), ...e.locales ?? []])
1793
+ for (const r of [Er(e), ...e.locales ?? []])
1794
1794
  !r || t.has(r) || (t.add(r), n.push(r));
1795
1795
  return n;
1796
1796
  }
1797
- function Ua(e, t, n) {
1797
+ function ja(e, t, n) {
1798
1798
  const r = e.translations ?? [];
1799
1799
  return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
1800
1800
  }
1801
- const tt = ["lookup", "condition", "parallel", "for-each"];
1802
- function nt(e) {
1801
+ const ot = ["lookup", "condition", "parallel", "for-each"];
1802
+ function de(e) {
1803
1803
  for (const t of e) {
1804
- if (!tt.includes(t.type))
1805
- return `staptype "${t.type}" mag niet meelezen (alleen ${tt.join(", ")})`;
1804
+ if (!ot.includes(t.type))
1805
+ return `staptype "${t.type}" mag niet meelezen (alleen ${ot.join(", ")})`;
1806
1806
  if (t.type === "parallel")
1807
1807
  for (const n of t.branches ?? []) {
1808
- const r = nt(n);
1808
+ const r = de(n);
1809
1809
  if (r) return r;
1810
1810
  }
1811
1811
  if (t.type === "for-each") {
1812
- const n = nt(t.body ?? []);
1812
+ const n = de(t.body ?? []);
1813
+ if (n) return n;
1814
+ }
1815
+ if (t.type === "condition") {
1816
+ const n = de(t.else ?? []);
1813
1817
  if (n) return n;
1814
1818
  }
1815
1819
  }
1816
1820
  return null;
1817
1821
  }
1818
- function Sr(e, t) {
1822
+ function Tr(e, t) {
1819
1823
  switch (e.kind) {
1820
1824
  case "org":
1821
1825
  return !0;
@@ -1825,29 +1829,29 @@ function Sr(e, t) {
1825
1829
  return e.userId === t.userId;
1826
1830
  }
1827
1831
  }
1828
- function Fa(e, t) {
1829
- return e.filter((n) => n.enabled && Sr(n.ownerScope, t));
1832
+ function Ha(e, t) {
1833
+ return e.filter((n) => n.enabled && Tr(n.ownerScope, t));
1830
1834
  }
1831
- function Ba(e) {
1835
+ function Ga(e) {
1832
1836
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1833
1837
  }
1834
- function ja(e) {
1838
+ function Wa(e) {
1835
1839
  return `mcp__${e}__`;
1836
1840
  }
1837
- const Ha = 1e3, Ga = 2e3, Wa = 500, Va = 12e3, za = 4e3, Er = ["contact", "company", "work_item"];
1838
- function Xa(e) {
1841
+ const Va = 1e3, za = 2e3, Xa = 500, Ya = 12e3, qa = 4e3, Ir = ["contact", "company", "work_item"];
1842
+ function Qa(e) {
1839
1843
  if (!e) return !1;
1840
1844
  const t = e.slice(0, e.indexOf(":"));
1841
- return Er.includes(t);
1845
+ return Ir.includes(t);
1842
1846
  }
1843
- const Ya = [
1847
+ const Za = [
1844
1848
  { key: "high", label: "tax_high", percent: 21, kind: "standard" },
1845
1849
  { key: "low", label: "tax_low", percent: 9, kind: "reduced" },
1846
1850
  { key: "zero", label: "tax_zero", percent: 0, kind: "zero" },
1847
1851
  { key: "reverse_charge", label: "tax_reverse_charge", percent: 0, kind: "reverse_charge" },
1848
1852
  { key: "exempt", label: "tax_exempt", percent: 0, kind: "exempt" }
1849
1853
  ];
1850
- function Tr(e, t) {
1854
+ function kr(e, t) {
1851
1855
  return t.find((n) => n.key === e) ?? {
1852
1856
  key: e,
1853
1857
  label: e,
@@ -1855,13 +1859,13 @@ function Tr(e, t) {
1855
1859
  kind: "zero"
1856
1860
  };
1857
1861
  }
1858
- function Ir(e) {
1862
+ function wr(e) {
1859
1863
  if (e.kind !== "product") return 0;
1860
1864
  const t = 1 - (e.discountPercent ?? 0) / 100;
1861
1865
  return V(e.quantity * e.unitPriceCents * t);
1862
1866
  }
1863
- function qa(e, t, n) {
1864
- const r = e.map((l) => ({ ...l, netCents: Ir(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
1867
+ function Ja(e, t, n) {
1868
+ const r = e.map((l) => ({ ...l, netCents: wr(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
1865
1869
  for (let l = 0; l < r.length; l++) {
1866
1870
  if (r[l].kind !== "product" || r[l].optional) continue;
1867
1871
  const d = n ?? r[l].taxRateKey, c = o.get(d);
@@ -1870,7 +1874,7 @@ function qa(e, t, n) {
1870
1874
  const i = [];
1871
1875
  let s = 0, a = 0;
1872
1876
  for (const [l, d] of o) {
1873
- const c = Tr(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = V(p * c.percent / 100), y = jn(
1877
+ const c = kr(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = V(p * c.percent / 100), y = Gn(
1874
1878
  f,
1875
1879
  d.map((m) => r[m].netCents)
1876
1880
  );
@@ -1892,7 +1896,7 @@ function qa(e, t, n) {
1892
1896
  }
1893
1897
  };
1894
1898
  }
1895
- const Qa = "onboarding-source", Za = ["support", "billing", "availability", "sales", "onboarding"], Ja = ["keep", "replace"], xe = [
1899
+ const ec = "onboarding-source", tc = ["support", "billing", "availability", "sales", "onboarding"], nc = ["keep", "replace"], Re = [
1896
1900
  {
1897
1901
  key: "shift",
1898
1902
  label: "kind_shift",
@@ -1966,44 +1970,44 @@ const Qa = "onboarding-source", Za = ["support", "billing", "availability", "sal
1966
1970
  absent: !0,
1967
1971
  icon: "party-popper"
1968
1972
  }
1969
- ], kr = {
1973
+ ], vr = {
1970
1974
  key: "unknown",
1971
1975
  label: "kind_unknown",
1972
1976
  capacity: !1,
1973
1977
  productive: !1,
1974
1978
  absent: !1
1975
1979
  };
1976
- function N(e, t = xe) {
1977
- return t.find((n) => n.key === e) ?? { ...kr, key: e };
1980
+ function N(e, t = Re) {
1981
+ return t.find((n) => n.key === e) ?? { ...vr, key: e };
1978
1982
  }
1979
1983
  function z(e) {
1980
1984
  return e === "published" || e === "approved";
1981
1985
  }
1982
- function Ut(e, t, n = xe) {
1986
+ function Bt(e, t, n = Re) {
1983
1987
  if (e.workstreamId !== t) return !1;
1984
1988
  const r = N(e.kindKey, n);
1985
1989
  return r.absent ? !1 : r.productive || r.capacity;
1986
1990
  }
1987
- function ec(e, t = xe) {
1991
+ function rc(e, t = Re) {
1988
1992
  if (!e.userId || !z(e.status)) return !1;
1989
1993
  const n = N(e.kindKey, t);
1990
1994
  return n.capacity || n.productive || n.absent;
1991
1995
  }
1992
- const wr = 864e5;
1993
- function vr(e, t) {
1994
- return Math.round((t - e) / wr);
1996
+ const Mr = 864e5;
1997
+ function Cr(e, t) {
1998
+ return Math.round((t - e) / Mr);
1995
1999
  }
1996
- function Ft(e, t) {
2000
+ function jt(e, t) {
1997
2001
  const n = e.cycleMinutes.length;
1998
- return n === 0 ? 0 : (vr(e.anchor, t) % n + n) % n;
2002
+ return n === 0 ? 0 : (Cr(e.anchor, t) % n + n) % n;
1999
2003
  }
2000
- function Bt(e, t) {
2001
- return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[Ft(e, t)] ?? 0;
2004
+ function Ht(e, t) {
2005
+ return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[jt(e, t)] ?? 0;
2002
2006
  }
2003
- function jt(e, t) {
2004
- return e.startTimes?.[Ft(e, t)];
2007
+ function Gt(e, t) {
2008
+ return e.startTimes?.[jt(e, t)];
2005
2009
  }
2006
- function Ht(e, t, n, r) {
2010
+ function Wt(e, t, n, r) {
2007
2011
  const o = e.filter(
2008
2012
  (a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
2009
2013
  ), i = (a) => a.sort((u, l) => (l.effectiveFrom ?? 0) - (u.effectiveFrom ?? 0))[0], s = i(o.filter((a) => a.userId === t));
@@ -2011,22 +2015,22 @@ function Ht(e, t, n, r) {
2011
2015
  o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
2012
2016
  );
2013
2017
  }
2014
- function Mr(e, t, n) {
2018
+ function Or(e, t, n) {
2015
2019
  return e.filter(
2016
2020
  (r) => r.userId === t && (r.effectiveFrom === void 0 || r.effectiveFrom <= n)
2017
2021
  ).sort((r, o) => (o.effectiveFrom ?? 0) - (r.effectiveFrom ?? 0))[0];
2018
2022
  }
2019
- const ye = 864e5;
2020
- function Cr(e) {
2021
- const t = Math.max(1, Math.round((e.to - e.from) / ye));
2022
- return Array.from({ length: t }, (n, r) => e.from + r * ye);
2023
+ const _e = 864e5;
2024
+ function xr(e) {
2025
+ const t = Math.max(1, Math.round((e.to - e.from) / _e));
2026
+ return Array.from({ length: t }, (n, r) => e.from + r * _e);
2023
2027
  }
2024
- function be(e, t, n, r) {
2028
+ function Ae(e, t, n, r) {
2025
2029
  const o = Math.min(t, r) - Math.max(e, n);
2026
2030
  return o > 0 ? o / 1e3 : 0;
2027
2031
  }
2028
- const rt = { interval: 0, day: 1, week: 2 };
2029
- function tc(e, t) {
2032
+ const it = { interval: 0, day: 1, week: 2 };
2033
+ function oc(e, t) {
2030
2034
  const { entries: n, patterns: r = [], terms: o = [] } = t, i = n.filter(
2031
2035
  (c) => c.userId && z(c.status) && N(c.kindKey).capacity
2032
2036
  ), s = n.filter(
@@ -2040,32 +2044,32 @@ function tc(e, t) {
2040
2044
  ].filter((c) => !!c), u = {};
2041
2045
  let l = "interval";
2042
2046
  const d = (c) => {
2043
- rt[c] > rt[l] && (l = c);
2047
+ it[c] > it[l] && (l = c);
2044
2048
  };
2045
2049
  for (const c of a) {
2046
2050
  const p = t.teamIdsOf?.(c) ?? [];
2047
2051
  let f = 0, y = 0, m = 0;
2048
- for (const h of Cr(e)) {
2049
- const S = Math.max(h, e.from), O = Math.min(h + ye, e.to);
2052
+ for (const h of xr(e)) {
2053
+ const S = Math.max(h, e.from), x = Math.min(h + _e, e.to);
2050
2054
  m++;
2051
- const C = i.filter((w) => w.userId === c).reduce((w, Pe) => w + be(Pe.start, Pe.end, S, O), 0);
2055
+ const C = i.filter((w) => w.userId === c).reduce((w, Fe) => w + Ae(Fe.start, Fe.end, S, x), 0);
2052
2056
  if (C > 0) {
2053
2057
  f += C;
2054
2058
  continue;
2055
2059
  }
2056
- const v = Ht(r, c, p, h), x = v ? Bt(v, h) : 0;
2057
- if (v && x > 0) {
2058
- f += x * 60, d(jt(v, h) ? "interval" : "day");
2060
+ const v = Wt(r, c, p, h), O = v ? Ht(v, h) : 0;
2061
+ if (v && O > 0) {
2062
+ f += O * 60, d(Gt(v, h) ? "interval" : "day");
2059
2063
  continue;
2060
2064
  }
2061
2065
  v || y++;
2062
2066
  }
2063
2067
  if (y > 0) {
2064
- const h = Mr(o, c, e.from);
2068
+ const h = Or(o, c, e.from);
2065
2069
  h && (f += h.weeklyMinutes * 60 * (y / 7), d("week"));
2066
2070
  }
2067
2071
  const E = s.filter((h) => h.userId === c).reduce(
2068
- (h, S) => h + be(S.start, S.end, e.from, e.to),
2072
+ (h, S) => h + Ae(S.start, S.end, e.from, e.to),
2069
2073
  0
2070
2074
  ), g = Math.max(0, f - E);
2071
2075
  (g > 0 || m > 0) && (u[c] = g);
@@ -2076,7 +2080,7 @@ function tc(e, t) {
2076
2080
  byUser: u
2077
2081
  };
2078
2082
  }
2079
- function nc(e, t) {
2083
+ function ic(e, t) {
2080
2084
  if (!e.some((a) => a.userId)) return [];
2081
2085
  const n = "", r = /* @__PURE__ */ new Map();
2082
2086
  for (const a of e) {
@@ -2099,7 +2103,7 @@ function nc(e, t) {
2099
2103
  const s = r.get(n) ?? 0;
2100
2104
  return s > 0 && i.push({ requiredSeconds: s, capacitySeconds: 0, netSeconds: -s }), i;
2101
2105
  }
2102
- function rc(e, t, n, r) {
2106
+ function sc(e, t, n, r) {
2103
2107
  const o = e.filter(
2104
2108
  (s) => s.userId && z(s.status) && !N(s.kindKey).absent
2105
2109
  ), i = Object.entries(r.byUser).map(
@@ -2107,8 +2111,8 @@ function rc(e, t, n, r) {
2107
2111
  let u = 0, l = 0;
2108
2112
  for (const d of o) {
2109
2113
  if (d.userId !== s || N(d.kindKey).capacity && !d.workstreamId) continue;
2110
- const c = be(d.start, d.end, n.from, n.to);
2111
- c <= 0 || (Ut(d, t) ? u += c : l += c);
2114
+ const c = Ae(d.start, d.end, n.from, n.to);
2115
+ c <= 0 || (Bt(d, t) ? u += c : l += c);
2112
2116
  }
2113
2117
  return {
2114
2118
  userId: s,
@@ -2121,103 +2125,103 @@ function rc(e, t, n, r) {
2121
2125
  );
2122
2126
  return i.sort((s, a) => a.freeSeconds - s.freeSeconds), i;
2123
2127
  }
2124
- const oc = "demand-source", ot = 1e3;
2125
- function xr(e, t) {
2128
+ const ac = "demand-source", st = 1e3;
2129
+ function Nr(e, t) {
2126
2130
  let n = 1;
2127
2131
  for (let r = 1; r <= e; r++)
2128
2132
  n = t * n / (r + t * n);
2129
2133
  return n;
2130
2134
  }
2131
- function Or(e, t) {
2135
+ function Rr(e, t) {
2132
2136
  if (e <= 0) return 1;
2133
2137
  if (t <= 0) return 0;
2134
2138
  if (e <= t) return 1;
2135
- const n = xr(e, t), r = t / e;
2139
+ const n = Nr(e, t), r = t / e;
2136
2140
  return n / (1 - r * (1 - n));
2137
2141
  }
2138
- function Nr(e, t, n, r) {
2139
- return r <= 0 ? 1 : e <= t ? 0 : 1 - Or(e, t) * Math.exp(-(e - t) * n / r);
2142
+ function Dr(e, t, n, r) {
2143
+ return r <= 0 ? 1 : e <= t ? 0 : 1 - Rr(e, t) * Math.exp(-(e - t) * n / r);
2140
2144
  }
2141
- function Rr(e, t, n) {
2145
+ function $r(e, t, n) {
2142
2146
  return n <= 0 ? 0 : e * t / n;
2143
2147
  }
2144
- function Dr(e, t, n, r) {
2148
+ function Lr(e, t, n, r) {
2145
2149
  if (e <= 0 || t <= 0) return 0;
2146
- const o = Rr(e, t, n);
2150
+ const o = $r(e, t, n);
2147
2151
  if (o <= 0) return 0;
2148
2152
  const i = r.serviceLevelPercent / 100, s = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
2149
- for (let a = Math.max(1, Math.ceil(o)); a <= ot; a++)
2150
- if (!(a <= o) && !(Nr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
2153
+ for (let a = Math.max(1, Math.ceil(o)); a <= st; a++)
2154
+ if (!(a <= o) && !(Dr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
2151
2155
  return a;
2152
- return ot;
2156
+ return st;
2153
2157
  }
2154
- const $r = 36e5, Lr = 864e5;
2155
- function Pr(e) {
2156
- return e === "day" ? Lr : $r;
2158
+ const Pr = 36e5, Kr = 864e5;
2159
+ function Ur(e) {
2160
+ return e === "day" ? Kr : Pr;
2157
2161
  }
2158
- function ic(e, t) {
2162
+ function cc(e, t) {
2159
2163
  return e.start < t.end && t.start < e.end;
2160
2164
  }
2161
- function ue(e, t, n) {
2165
+ function pe(e, t, n) {
2162
2166
  const r = Math.min(e.end, n) - Math.max(e.start, t);
2163
2167
  return r > 0 ? r / 1e3 : 0;
2164
2168
  }
2165
- function Kr(e, t, n) {
2169
+ function Fr(e, t, n) {
2166
2170
  const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
2167
2171
  if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
2168
2172
  const i = (t.unplannedLossPercent ?? 0) / 100, s = i > 0 && i < 1 ? 1 / (1 - i) : 1;
2169
2173
  if (t.model === "queue" && e.volume !== void 0 && r > 0) {
2170
- const a = Dr(e.volume, r, n, t);
2174
+ const a = Lr(e.volume, r, n, t);
2171
2175
  return { seconds: o, headcount: a * s };
2172
2176
  }
2173
2177
  return { seconds: o, headcount: o / n * s };
2174
2178
  }
2175
- function sc(e) {
2176
- const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = Pr(s), u = a / 1e3, l = e.kinds, d = t.filter((m) => z(m.status)), c = d.filter((m) => Ut(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
2179
+ function lc(e) {
2180
+ const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = Ur(s), u = a / 1e3, l = e.kinds, d = t.filter((m) => z(m.status)), c = d.filter((m) => Bt(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
2177
2181
  for (let m = W(i.from, s); m < i.to; m += a) {
2178
2182
  const E = m + a, g = G(m, s);
2179
2183
  let h = 0;
2180
- for (const w of c) h += ue(w, m, E);
2184
+ for (const w of c) h += pe(w, m, E);
2181
2185
  let S = 0;
2182
- for (const w of p) S += ue(w, m, E);
2183
- let O = 0;
2184
- for (const w of f) O += ue(w, m, E);
2185
- const C = o?.[g] ?? {}, v = Kr(C, r, u), x = h / u;
2186
+ for (const w of p) S += pe(w, m, E);
2187
+ let x = 0;
2188
+ for (const w of f) x += pe(w, m, E);
2189
+ const C = o?.[g] ?? {}, v = Fr(C, r, u), O = h / u;
2186
2190
  y.push({
2187
2191
  period: g,
2188
2192
  forecastVolume: C.volume,
2189
2193
  requiredSeconds: v.seconds,
2190
2194
  requiredHeadcount: v.headcount,
2191
2195
  scheduledSeconds: h,
2192
- scheduledHeadcount: x,
2193
- netHeadcount: x - v.headcount,
2196
+ scheduledHeadcount: O,
2197
+ netHeadcount: O - v.headcount,
2194
2198
  capacitySeconds: S,
2195
- absentSeconds: O
2199
+ absentSeconds: x
2196
2200
  });
2197
2201
  }
2198
2202
  return y;
2199
2203
  }
2200
- function Ur(e, t) {
2204
+ function Br(e, t) {
2201
2205
  return e.workTypeKey ?? t?.defaultWorkTypeKey;
2202
2206
  }
2203
- function ac(e, t, n) {
2204
- const r = Ur(e, t);
2207
+ function uc(e, t, n) {
2208
+ const r = Br(e, t);
2205
2209
  return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
2206
2210
  }
2207
- function cc(e) {
2211
+ function dc(e) {
2208
2212
  return e.filter(
2209
2213
  (t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
2210
2214
  );
2211
2215
  }
2212
- const Fr = 36e5, _e = 6048e5, Br = 8, jr = 0.5, Hr = 2;
2213
- function Gr(e) {
2216
+ const jr = 36e5, Se = 6048e5, Hr = 8, Gr = 0.5, Wr = 2;
2217
+ function Vr(e) {
2214
2218
  const t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10)), o = e.length > 10 ? Number(e.slice(11, 13)) : 0;
2215
2219
  return Date.UTC(t, n - 1, r, o);
2216
2220
  }
2217
- function Wr(e, t, n) {
2221
+ function zr(e, t, n) {
2218
2222
  const r = [];
2219
2223
  for (let i = 0; i < n; i++) {
2220
- const s = t - i * _e, a = s - _e;
2224
+ const s = t - i * Se, a = s - Se;
2221
2225
  let u = 0, l = !1;
2222
2226
  for (const [d, c] of e)
2223
2227
  d >= a && d < s && (u += c, l = !0);
@@ -2225,65 +2229,65 @@ function Wr(e, t, n) {
2225
2229
  }
2226
2230
  if (r.length < 2) return 1;
2227
2231
  const o = r.reduce((i, s) => i + s, 0) / r.length;
2228
- return o <= 0 ? 1 : Math.min(Hr, Math.max(jr, r[0] / o));
2232
+ return o <= 0 ? 1 : Math.min(Wr, Math.max(Gr, r[0] / o));
2229
2233
  }
2230
- function Vr(e, t) {
2234
+ function Xr(e, t) {
2231
2235
  if (!e?.length) return;
2232
2236
  let n;
2233
2237
  for (const r of e)
2234
2238
  t >= r.from && t < r.to && (n = r);
2235
2239
  return n;
2236
2240
  }
2237
- function lc(e, t, n) {
2238
- const r = Math.max(1, n?.weeks ?? Br), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
2241
+ function pc(e, t, n) {
2242
+ const r = Math.max(1, n?.weeks ?? Hr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
2239
2243
  for (const u of e)
2240
- o.set(Gr(u.period), u.value), i.add(u.period.slice(0, 10));
2241
- const s = Wr(o, W(t.from, "hour"), r), a = [];
2242
- for (let u = W(t.from, "hour"); u < t.to; u += Fr) {
2244
+ o.set(Vr(u.period), u.value), i.add(u.period.slice(0, 10));
2245
+ const s = zr(o, W(t.from, "hour"), r), a = [];
2246
+ for (let u = W(t.from, "hour"); u < t.to; u += jr) {
2243
2247
  let l = 0, d = 0;
2244
2248
  for (let f = 1; f <= r; f++) {
2245
- const y = u - f * _e, E = o.get(y) ?? (i.has(G(y, "day")) ? 0 : void 0);
2249
+ const y = u - f * Se, E = o.get(y) ?? (i.has(G(y, "day")) ? 0 : void 0);
2246
2250
  if (E === void 0) continue;
2247
2251
  const g = r - f + 1;
2248
2252
  l += E * g, d += g;
2249
2253
  }
2250
2254
  let c = d > 0 ? l / d * s : 0;
2251
- const p = Vr(n?.adjustments, u);
2255
+ const p = Xr(n?.adjustments, u);
2252
2256
  p?.absoluteVolume !== void 0 ? c = p.absoluteVolume : p?.factor !== void 0 && (c *= p.factor), a.push({ period: G(u, "hour"), volume: c });
2253
2257
  }
2254
2258
  return a;
2255
2259
  }
2256
- const zr = "schedule_entry", Xr = "workstream";
2257
- function uc(e) {
2258
- return `${zr}:${e}`;
2260
+ const Yr = "schedule_entry", qr = "workstream";
2261
+ function fc(e) {
2262
+ return `${Yr}:${e}`;
2259
2263
  }
2260
- function dc(e) {
2261
- return `${Xr}:${e}`;
2264
+ function mc(e) {
2265
+ return `${qr}:${e}`;
2262
2266
  }
2263
- const Ae = 36e5, U = 864e5;
2264
- function Yr(e, t) {
2265
- const n = t === "day" ? U : Ae, r = [];
2267
+ const Ee = 36e5, U = 864e5;
2268
+ function Qr(e, t) {
2269
+ const n = t === "day" ? U : Ee, r = [];
2266
2270
  for (let o = W(e.from, t); o < e.to; o += n) r.push(o);
2267
2271
  return r;
2268
2272
  }
2269
- function it(e) {
2273
+ function at(e) {
2270
2274
  const t = Math.max(1, Math.round((e.to - e.from) / U));
2271
2275
  return Array.from({ length: t }, (n, r) => e.from + r * U);
2272
2276
  }
2273
- function de(e, t, n, r) {
2277
+ function fe(e, t, n, r) {
2274
2278
  const o = Math.min(t, r) - Math.max(e, n);
2275
2279
  return o > 0 ? o / 1e3 : 0;
2276
2280
  }
2277
- function pc(e, t, n = {}) {
2278
- const r = n.grain ?? "hour", o = Yr(t, r), i = r === "day" ? U : Ae, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
2281
+ function hc(e, t, n = {}) {
2282
+ const r = n.grain ?? "hour", o = Qr(t, r), i = r === "day" ? U : Ee, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
2279
2283
  for (const c of a)
2280
2284
  if (!(u && c.userId && !u.has(c.userId))) {
2281
2285
  for (const p of o) {
2282
- const f = de(c.start, c.end, p, p + i);
2286
+ const f = fe(c.start, c.end, p, p + i);
2283
2287
  f > 0 && s.set(p, (s.get(p) ?? 0) + f);
2284
2288
  }
2285
- for (const p of it(t))
2286
- de(c.start, c.end, p, p + U) > 0 && l.add(`${c.userId}:${p}`);
2289
+ for (const p of at(t))
2290
+ fe(c.start, c.end, p, p + U) > 0 && l.add(`${c.userId}:${p}`);
2287
2291
  }
2288
2292
  const d = n.userIds ?? [
2289
2293
  .../* @__PURE__ */ new Set([
@@ -2294,18 +2298,18 @@ function pc(e, t, n = {}) {
2294
2298
  if (n.patterns?.length)
2295
2299
  for (const c of d) {
2296
2300
  const p = n.teamIdsOf?.(c) ?? [];
2297
- for (const f of it(t)) {
2301
+ for (const f of at(t)) {
2298
2302
  if (l.has(`${c}:${f}`)) continue;
2299
- const y = Ht(n.patterns, c, p, f);
2303
+ const y = Wt(n.patterns, c, p, f);
2300
2304
  if (!y) continue;
2301
- const m = Bt(y, f);
2305
+ const m = Ht(y, f);
2302
2306
  if (m <= 0) continue;
2303
- const E = jt(y, f);
2307
+ const E = Gt(y, f);
2304
2308
  if (E) {
2305
- const [S, O] = E.split(":").map(Number), C = f + S * Ae + (O ?? 0) * 6e4, v = C + m * 6e4;
2306
- for (const x of o) {
2307
- const w = de(C, v, x, x + i);
2308
- w > 0 && s.set(x, (s.get(x) ?? 0) + w);
2309
+ const [S, x] = E.split(":").map(Number), C = f + S * Ee + (x ?? 0) * 6e4, v = C + m * 6e4;
2310
+ for (const O of o) {
2311
+ const w = fe(C, v, O, O + i);
2312
+ w > 0 && s.set(O, (s.get(O) ?? 0) + w);
2309
2313
  }
2310
2314
  continue;
2311
2315
  }
@@ -2317,7 +2321,7 @@ function pc(e, t, n = {}) {
2317
2321
  }
2318
2322
  return o.map((c) => ({ period: G(c, r), weight: s.get(c) ?? 0 }));
2319
2323
  }
2320
- function qr(e, t) {
2324
+ function Zr(e, t) {
2321
2325
  if (e <= 0 || !t.length) return [];
2322
2326
  const n = t.reduce((r, o) => r + Math.max(0, o.weight), 0);
2323
2327
  if (n <= 0) {
@@ -2326,11 +2330,11 @@ function qr(e, t) {
2326
2330
  }
2327
2331
  return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
2328
2332
  }
2329
- function fc(e, t, n) {
2333
+ function gc(e, t, n) {
2330
2334
  const r = /* @__PURE__ */ new Map();
2331
2335
  for (const o of e) {
2332
2336
  const i = o.by ? t.filter((a) => n(a.period) < o.by) : t, s = i.length ? i : t;
2333
- for (const a of qr(o.seconds, s)) {
2337
+ for (const a of Zr(o.seconds, s)) {
2334
2338
  const u = `${a.period}|${o.userId ?? ""}`, l = r.get(u);
2335
2339
  l ? l.seconds += a.seconds : r.set(u, { ...a, userId: o.userId });
2336
2340
  }
@@ -2339,7 +2343,7 @@ function fc(e, t, n) {
2339
2343
  (o, i) => o.period.localeCompare(i.period) || (o.userId ?? "").localeCompare(i.userId ?? "")
2340
2344
  );
2341
2345
  }
2342
- function Qr(e) {
2346
+ function Jr(e) {
2343
2347
  switch (e.kind) {
2344
2348
  case "user":
2345
2349
  return `user:${e.userId}`;
@@ -2349,7 +2353,7 @@ function Qr(e) {
2349
2353
  return "org";
2350
2354
  }
2351
2355
  }
2352
- function mc(e) {
2356
+ function yc(e) {
2353
2357
  if (typeof e != "string") return;
2354
2358
  const t = e.trim();
2355
2359
  if (t === "org") return { kind: "org" };
@@ -2361,10 +2365,10 @@ function mc(e) {
2361
2365
  if (r === "team") return { kind: "team", teamId: o };
2362
2366
  }
2363
2367
  }
2364
- function Zr(e) {
2365
- return Qr(e);
2368
+ function eo(e) {
2369
+ return Jr(e);
2366
2370
  }
2367
- function Jr(e) {
2371
+ function to(e) {
2368
2372
  switch (e.kind) {
2369
2373
  case "personal":
2370
2374
  return { kind: "user", userId: e.userId };
@@ -2374,14 +2378,14 @@ function Jr(e) {
2374
2378
  return { kind: "org" };
2375
2379
  }
2376
2380
  }
2377
- const eo = Jr;
2378
- function hc(e) {
2379
- return e.agentId ? { kind: "user", userId: e.agentId } : eo(e.ownerScope);
2381
+ const no = to;
2382
+ function bc(e) {
2383
+ return e.agentId ? { kind: "user", userId: e.agentId } : no(e.ownerScope);
2380
2384
  }
2381
- function gc(e) {
2382
- return Zr(e);
2385
+ function _c(e) {
2386
+ return eo(e);
2383
2387
  }
2384
- function yc(e, t) {
2388
+ function Ac(e, t) {
2385
2389
  if (!t) return;
2386
2390
  let n = e;
2387
2391
  for (const r of t.split(".")) {
@@ -2390,24 +2394,35 @@ function yc(e, t) {
2390
2394
  }
2391
2395
  return n;
2392
2396
  }
2393
- function bc(e, t) {
2397
+ function Sc(e, t) {
2394
2398
  return e.targets.find((n) => n.activityTypes.includes(t));
2395
2399
  }
2396
- function _c(e, t) {
2400
+ function Ec(e, t) {
2397
2401
  if (t)
2398
2402
  return e.targets.find((n) => n.id === t);
2399
2403
  }
2400
- function to(e) {
2404
+ function ro(e) {
2401
2405
  return e?.kind === "assignment";
2402
2406
  }
2403
- function Ac(e) {
2407
+ function Tc(e) {
2404
2408
  const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
2405
- return to(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
2409
+ return ro(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
2406
2410
  }
2407
- function Sc(e) {
2408
- return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
2411
+ function Ic(e) {
2412
+ return ne(e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
2413
+ }
2414
+ function ne(e) {
2415
+ return e.startsWith("tool:") ? e.slice(5) : e;
2409
2416
  }
2410
- const Ec = [
2417
+ function oo(e) {
2418
+ const t = ne(e).split("__");
2419
+ return t[t.length - 1] || ne(e);
2420
+ }
2421
+ function kc(e) {
2422
+ const t = oo(e).replace(/[_.]+/g, " ").trim();
2423
+ return t ? t.charAt(0).toUpperCase() + t.slice(1) : ne(e);
2424
+ }
2425
+ const wc = [
2411
2426
  { name: "text", type: "string" },
2412
2427
  { name: "subject", type: "string" },
2413
2428
  { name: "from", type: "string" },
@@ -2447,7 +2462,7 @@ const Ec = [
2447
2462
  // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
2448
2463
  // the trigger filter runs — like contactId/companyId above.
2449
2464
  { name: "assigneeUserId", type: "string" }
2450
- ], Tc = {
2465
+ ], vc = {
2451
2466
  topics: [
2452
2467
  { name: "topicId", type: "string" },
2453
2468
  { name: "topic", type: "string" },
@@ -2461,58 +2476,58 @@ const Ec = [
2461
2476
  // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
2462
2477
  extract: []
2463
2478
  };
2464
- function no(e) {
2479
+ function io(e) {
2465
2480
  return `${e.type}:${e.id}`;
2466
2481
  }
2467
- const ro = "interaction";
2468
- function oo(e) {
2469
- return e?.type === ro ? e.id : void 0;
2482
+ const so = "interaction";
2483
+ function ao(e) {
2484
+ return e?.type === so ? e.id : void 0;
2470
2485
  }
2471
- const io = 64, so = 8e3;
2472
- function Ic(e) {
2486
+ const co = 64, lo = 8e3;
2487
+ function Mc(e) {
2473
2488
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
2474
2489
  if (!(!Number.isFinite(t) || t <= 0))
2475
- return Math.min(Math.max(Math.round(t), io), so);
2490
+ return Math.min(Math.max(Math.round(t), co), lo);
2476
2491
  }
2477
- const kc = { kind: "workflow", steps: [] };
2478
- function wc(e) {
2492
+ const Cc = { kind: "workflow", steps: [] };
2493
+ function Oc(e) {
2479
2494
  return e?.kind === "workflow" ? e.steps : [];
2480
2495
  }
2481
- function vc(e) {
2496
+ function xc(e) {
2482
2497
  return e?.kind === "procedure" ? e.procedure : void 0;
2483
2498
  }
2484
- function ao(e) {
2499
+ function uo(e) {
2485
2500
  const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
2486
2501
  return { total: n, rate: n ? t / n : 0 };
2487
2502
  }
2488
- const co = 10, lo = 0.9;
2489
- function Mc(e) {
2490
- const { total: t, rate: n } = ao(e);
2491
- return t >= co && n >= lo;
2503
+ const po = 10, fo = 0.9;
2504
+ function Nc(e) {
2505
+ const { total: t, rate: n } = uo(e);
2506
+ return t >= po && n >= fo;
2492
2507
  }
2493
- const uo = ["done", "escalated", "failed", "stopped"];
2494
- function Cc(e) {
2495
- return uo.includes(e);
2508
+ const mo = ["done", "escalated", "failed", "stopped"];
2509
+ function Rc(e) {
2510
+ return mo.includes(e);
2496
2511
  }
2497
- function po(e) {
2512
+ function ho(e) {
2498
2513
  return e === "waiting";
2499
2514
  }
2500
- function xc(e) {
2501
- return e === "running" || po(e);
2515
+ function Dc(e) {
2516
+ return e === "running" || ho(e);
2502
2517
  }
2503
- function Gt(e) {
2518
+ function Vt(e) {
2504
2519
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
2505
2520
  }
2506
- function Oc(e) {
2507
- const t = Gt(e);
2508
- return t ? no(t) : void 0;
2521
+ function $c(e) {
2522
+ const t = Vt(e);
2523
+ return t ? io(t) : void 0;
2509
2524
  }
2510
- function Nc(e) {
2511
- return oo(Gt(e));
2525
+ function Lc(e) {
2526
+ return ao(Vt(e));
2512
2527
  }
2513
- function Rc(e) {
2528
+ function Pc(e) {
2514
2529
  const t = [], n = /* @__PURE__ */ new Map();
2515
- for (const r of [...e].sort(fo)) {
2530
+ for (const r of [...e].sort(go)) {
2516
2531
  const o = n.get(r.emoji);
2517
2532
  if (o) {
2518
2533
  o.push(r.actor);
@@ -2525,58 +2540,58 @@ function Rc(e) {
2525
2540
  return { emoji: r, count: o.length, actors: o };
2526
2541
  }).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
2527
2542
  }
2528
- const fo = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
2529
- function Dc(e, t) {
2543
+ const go = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
2544
+ function Kc(e, t) {
2530
2545
  return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
2531
2546
  }
2532
- const Se = 6e4, mo = 36e5, X = 864e5, Wt = 800;
2533
- function st(e, t) {
2547
+ const Te = 6e4, yo = 36e5, X = 864e5, zt = 800;
2548
+ function ct(e, t) {
2534
2549
  const n = Date.UTC(e, t + 1, 0);
2535
- return n - new Date(n).getUTCDay() * X + mo;
2550
+ return n - new Date(n).getUTCDay() * X + yo;
2536
2551
  }
2537
- function ho(e) {
2552
+ function bo(e) {
2538
2553
  const t = new Date(e).getUTCFullYear();
2539
- return e >= st(t, 2) && e < st(t, 9);
2554
+ return e >= ct(t, 2) && e < ct(t, 9);
2540
2555
  }
2541
- function Vt(e, t) {
2542
- const n = t.dst === "eu" && ho(e) ? 60 : 0;
2543
- return (t.utcOffsetMinutes + n) * Se;
2556
+ function Xt(e, t) {
2557
+ const n = t.dst === "eu" && bo(e) ? 60 : 0;
2558
+ return (t.utcOffsetMinutes + n) * Te;
2544
2559
  }
2545
- function go(e) {
2560
+ function _o(e) {
2546
2561
  return (e + 3) % 7 + 1;
2547
2562
  }
2548
- function zt(e, t) {
2549
- const n = Vt(e, t), r = e + n, o = Math.floor(r / X);
2550
- if (!t.days.includes(go(o))) return null;
2563
+ function Yt(e, t) {
2564
+ const n = Xt(e, t), r = e + n, o = Math.floor(r / X);
2565
+ if (!t.days.includes(_o(o))) return null;
2551
2566
  const i = o * X;
2552
2567
  return {
2553
- open: i + t.fromMinutes * Se - n,
2554
- close: i + t.toMinutes * Se - n
2568
+ open: i + t.fromMinutes * Te - n,
2569
+ close: i + t.toMinutes * Te - n
2555
2570
  };
2556
2571
  }
2557
- function Xt(e, t) {
2558
- const n = Vt(e, t), r = e + n;
2572
+ function qt(e, t) {
2573
+ const n = Xt(e, t), r = e + n;
2559
2574
  return (Math.floor(r / X) + 1) * X - n;
2560
2575
  }
2561
- function Ee(e, t, n) {
2576
+ function Ie(e, t, n) {
2562
2577
  if (t <= e) return 0;
2563
2578
  if (!n) return t - e;
2564
2579
  let r = 0, o = e;
2565
- for (let i = 0; i < Wt && o < t; i++) {
2566
- const s = zt(o, n);
2580
+ for (let i = 0; i < zt && o < t; i++) {
2581
+ const s = Yt(o, n);
2567
2582
  if (s) {
2568
2583
  const a = Math.max(o, s.open), u = Math.min(t, s.close);
2569
2584
  u > a && (r += u - a);
2570
2585
  }
2571
- o = Xt(o, n);
2586
+ o = qt(o, n);
2572
2587
  }
2573
2588
  return r;
2574
2589
  }
2575
- function Oe(e, t, n) {
2590
+ function De(e, t, n) {
2576
2591
  if (!n) return e + t;
2577
2592
  let r = t, o = e;
2578
- for (let i = 0; i < Wt; i++) {
2579
- const s = zt(o, n);
2593
+ for (let i = 0; i < zt; i++) {
2594
+ const s = Yt(o, n);
2580
2595
  if (s) {
2581
2596
  const a = Math.max(o, s.open);
2582
2597
  if (s.close > a) {
@@ -2585,78 +2600,78 @@ function Oe(e, t, n) {
2585
2600
  r -= u;
2586
2601
  }
2587
2602
  }
2588
- o = Xt(o, n);
2603
+ o = qt(o, n);
2589
2604
  }
2590
2605
  return e + t;
2591
2606
  }
2592
- function $c(e) {
2607
+ function Uc(e) {
2593
2608
  const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
2594
2609
  return t ? Number(t[1]) * 60 + Number(t[2]) : null;
2595
2610
  }
2596
- const Te = 1, Ie = 2;
2597
- function Lc(e) {
2598
- return e === "snoozed" ? Te : Ie;
2611
+ const ke = 1, we = 2, ve = 4;
2612
+ function Fc(e) {
2613
+ return e === "snoozed" ? ke : we;
2599
2614
  }
2600
- function Ne(e) {
2615
+ function $e(e) {
2601
2616
  const t = e.calendar;
2602
2617
  return t && Array.isArray(t.days) ? t : null;
2603
2618
  }
2604
- const Pc = [
2619
+ const Bc = [
2605
2620
  "speed_of_answer",
2606
2621
  "first_response",
2607
2622
  "next_response",
2608
2623
  "resolution",
2609
2624
  "close"
2610
- ], Kc = ["snoozed", "waiting_for_customer"], yo = 6e4, Yt = ["speed_of_answer", "first_response", "next_response"], bo = [...Yt, "resolution", "close"];
2625
+ ], jc = ["snoozed", "waiting_for_customer"], Ao = 6e4, Qt = ["speed_of_answer", "first_response", "next_response"], So = [...Qt, "resolution", "close"];
2611
2626
  function Y(e) {
2612
2627
  return e.state === "running" || e.state === "paused";
2613
2628
  }
2614
- function _o(e, t) {
2629
+ function Eo(e, t) {
2615
2630
  return Y(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
2616
2631
  }
2617
- function at(e) {
2632
+ function lt(e) {
2618
2633
  return Y(e) ? { state: "void" } : null;
2619
2634
  }
2620
- function Ao(e, t, n, r) {
2635
+ function To(e, t, n, r) {
2621
2636
  if (!Y(e) || (e.pauseBits & t) !== 0) return null;
2622
2637
  const o = e.pauseBits | t;
2623
- return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Ee(n, e.dueAt, r) };
2638
+ return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Ie(n, e.dueAt, r) };
2624
2639
  }
2625
- function So(e, t, n, r) {
2640
+ function Io(e, t, n, r) {
2626
2641
  if (!Y(e) || (e.pauseBits & t) === 0) return null;
2627
2642
  const o = e.pauseBits & ~t;
2628
- return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: Oe(n, e.remainingMs, r) };
2643
+ return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: De(n, e.remainingMs, r) };
2629
2644
  }
2630
- function Uc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2631
- const i = Ne(o), s = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
2645
+ function Hc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2646
+ const i = $e(o), s = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
2632
2647
  h && (u.push({ op: "patch", clockId: g.id, patch: h }), Object.assign(g, h));
2633
2648
  }, d = (g) => {
2634
2649
  for (const h of a)
2635
- h.metric === g && l(h, _o(h, s));
2650
+ h.metric === g && l(h, Eo(h, s));
2636
2651
  }, c = (g) => {
2637
2652
  for (const h of a)
2638
- g.includes(h.metric) && l(h, at(h));
2653
+ g.includes(h.metric) && l(h, lt(h));
2639
2654
  }, p = (g) => {
2640
- for (const h of a) l(h, Ao(h, g, s, i));
2655
+ for (const h of a) l(h, To(h, g, s, i));
2641
2656
  }, f = (g) => {
2642
- for (const h of a) l(h, So(h, g, s, i));
2657
+ for (const h of a) l(h, Io(h, g, s, i));
2643
2658
  }, y = (g) => a.reduce((h, S) => S.metric === g ? Math.max(h, S.attempt) : h, 0) + 1, m = (g) => a.some((h) => h.metric === g && Y(h)), E = (g, h) => {
2644
2659
  const S = o.targets.find((C) => C.metric === g);
2645
2660
  if (!S) return;
2646
- const O = S.minutes * yo;
2661
+ const x = S.minutes * Ao;
2647
2662
  u.push({
2648
2663
  op: "start",
2649
2664
  metric: g,
2650
2665
  attempt: y(g),
2651
2666
  startedAt: h,
2652
- targetMs: O,
2653
- dueAt: Oe(h, O, i)
2667
+ targetMs: x,
2668
+ dueAt: De(h, x, i)
2654
2669
  });
2655
2670
  };
2656
2671
  switch (e) {
2657
2672
  case "apply": {
2658
2673
  for (const g of a)
2659
- g.profileId !== o.id && l(g, at(g));
2674
+ g.profileId !== o.id && l(g, lt(g));
2660
2675
  for (const g of o.targets) {
2661
2676
  if (g.metric === "next_response") continue;
2662
2677
  a.some(
@@ -2669,99 +2684,111 @@ function Uc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2669
2684
  d("speed_of_answer");
2670
2685
  break;
2671
2686
  case "outbound": {
2672
- d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(Ie);
2687
+ d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(we);
2673
2688
  break;
2674
2689
  }
2675
2690
  case "inbound": {
2676
- f(Ie), !m("first_response") && !m("next_response") && E("next_response", s);
2691
+ f(we), !m("first_response") && !m("next_response") && E("next_response", s);
2677
2692
  break;
2678
2693
  }
2679
2694
  case "resolved":
2680
2695
  d("resolution");
2681
2696
  break;
2682
2697
  case "closed":
2683
- d("close"), d("resolution"), c(Yt);
2698
+ d("close"), d("resolution"), c(Qt);
2684
2699
  break;
2685
2700
  case "reopened":
2686
2701
  m("resolution") || E("resolution", s), m("close") || E("close", s);
2687
2702
  break;
2688
2703
  case "snoozed":
2689
- o.pauseOn.includes("snoozed") && p(Te);
2704
+ o.pauseOn.includes("snoozed") && p(ke);
2690
2705
  break;
2691
2706
  case "unsnoozed":
2692
- f(Te);
2707
+ f(ke);
2708
+ break;
2709
+ // Not gated on `profile.pauseOn`, unlike the two above: this is a person deciding about
2710
+ // one conversation, not a profile setting. `resumeAll` only lifts the bit it is given, so
2711
+ // an `inbound` arriving meanwhile clears `waiting_for_customer` and the clock stays held.
2712
+ case "hold":
2713
+ p(ve);
2714
+ break;
2715
+ case "unhold":
2716
+ f(ve);
2693
2717
  break;
2694
2718
  case "discarded":
2695
- c(bo);
2719
+ c(So);
2696
2720
  break;
2697
2721
  }
2698
2722
  return u;
2699
2723
  }
2700
- function Eo(e) {
2724
+ function ko(e) {
2701
2725
  return e.state === "running" || e.state === "paused";
2702
2726
  }
2703
- function ke(e, t) {
2704
- const n = Ne(e);
2705
- return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Ee(e.dueAt, t, n) : Ee(t, e.dueAt, n);
2727
+ function Gc(e) {
2728
+ return (e.pauseBits & ve) !== 0;
2706
2729
  }
2707
- function Fc(e, t) {
2708
- return e.state === "paused" ? Oe(t, e.remainingMs, Ne(e)) : e.dueAt;
2730
+ function Me(e, t) {
2731
+ const n = $e(e);
2732
+ return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Ie(e.dueAt, t, n) : Ie(t, e.dueAt, n);
2709
2733
  }
2710
- function Bc(e, t) {
2711
- const n = e.filter(Eo);
2734
+ function Wc(e, t) {
2735
+ return e.state === "paused" ? De(t, e.remainingMs, $e(e)) : e.dueAt;
2736
+ }
2737
+ function Vc(e, t) {
2738
+ const n = e.filter(ko);
2712
2739
  if (!n.length) return;
2713
2740
  const r = n.filter((i) => i.state === "running");
2714
2741
  return (r.length ? r : n).reduce(
2715
- (i, s) => ke(s, t) < ke(i, t) ? s : i
2742
+ (i, s) => Me(s, t) < Me(i, t) ? s : i
2716
2743
  );
2717
2744
  }
2718
- function jc(e, t) {
2745
+ function zc(e, t) {
2719
2746
  if (e.state === "missed") return "breached";
2720
2747
  if (e.state === "hit") return "met";
2721
2748
  if (e.state === "paused") return "paused";
2722
2749
  if (e.state === "void") return "met";
2723
- const n = ke(e, t);
2750
+ const n = Me(e, t);
2724
2751
  return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
2725
2752
  }
2726
- function Hc(e) {
2753
+ function Xc(e) {
2727
2754
  const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), o = Math.floor(t % 3600 / 60);
2728
2755
  return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
2729
2756
  }
2730
- const To = "strategy_item";
2731
- function qt(e) {
2732
- return `${To}:${e}`;
2757
+ const wo = "strategy_item";
2758
+ function Zt(e) {
2759
+ return `${wo}:${e}`;
2733
2760
  }
2734
- function Gc(e, t = 25) {
2735
- const n = /* @__PURE__ */ new Set([qt(e.id)]);
2761
+ function Yc(e, t = 25) {
2762
+ const n = /* @__PURE__ */ new Set([Zt(e.id)]);
2736
2763
  for (const r of e.ancestorKeys ?? []) n.add(r);
2737
2764
  return Array.from(n).slice(0, t);
2738
2765
  }
2739
- function Wc(e) {
2740
- return e ? [...e.ancestorKeys ?? [], qt(e.id)] : [];
2766
+ function qc(e) {
2767
+ return e ? [...e.ancestorKeys ?? [], Zt(e.id)] : [];
2741
2768
  }
2742
- const oe = [
2769
+ const ie = [
2743
2770
  { key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
2744
2771
  { key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
2745
2772
  { key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
2746
- ], Io = 999, ko = 7;
2747
- function wo(e, t = oe) {
2773
+ ], vo = 999, Mo = 7;
2774
+ function Co(e, t = ie) {
2748
2775
  return t.find((n) => n.key === e);
2749
2776
  }
2750
- function we(e, t = oe) {
2751
- return wo(e, t)?.order ?? Io;
2777
+ function Ce(e, t = ie) {
2778
+ return Co(e, t)?.order ?? vo;
2752
2779
  }
2753
- function Vc(e, t, n = oe) {
2754
- return we(t, n) <= we(e, n);
2780
+ function Qc(e, t, n = ie) {
2781
+ return Ce(t, n) <= Ce(e, n);
2755
2782
  }
2756
- function zc(e, t = oe) {
2757
- const n = we(e, t);
2783
+ function Zc(e, t = ie) {
2784
+ const n = Ce(e, t);
2758
2785
  return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
2759
2786
  }
2760
- function Xc(e) {
2787
+ function Jc(e) {
2761
2788
  const t = e.trim().toLowerCase();
2762
2789
  return t ? t.includes("key result") || t.includes("keyresult") || t === "kr" ? "key_result" : t.includes("objective") || t.includes("goal") || t.includes("doel") ? "objective" : t.includes("focus") || t.includes("area") || t.includes("theme") ? "area" : null : null;
2763
2790
  }
2764
- const ve = {
2791
+ const Oe = {
2765
2792
  pending: "open",
2766
2793
  on_track: "open",
2767
2794
  at_risk: "open",
@@ -2770,74 +2797,74 @@ const ve = {
2770
2797
  achieved: "closed",
2771
2798
  missed: "closed"
2772
2799
  };
2773
- function Yc(e) {
2774
- return ve[e] ?? "open";
2800
+ function el(e) {
2801
+ return Oe[e] ?? "open";
2775
2802
  }
2776
- function qc(e) {
2777
- return Object.keys(ve).filter(
2778
- (t) => e.includes(ve[t])
2803
+ function tl(e) {
2804
+ return Object.keys(Oe).filter(
2805
+ (t) => e.includes(Oe[t])
2779
2806
  );
2780
2807
  }
2781
- const vo = 864e5, ie = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
2782
- function Qc(e, t) {
2808
+ const Oo = 864e5, se = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
2809
+ function nl(e, t) {
2783
2810
  const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
2784
2811
  if (!Number.isFinite(t)) return 0;
2785
2812
  const i = n === "down" ? t <= o : t >= o, s = o - r;
2786
- return (n === "down" ? s < 0 : s > 0) ? ie((t - r) / s) : i ? 1 : 0;
2813
+ return (n === "down" ? s < 0 : s > 0) ? se((t - r) / s) : i ? 1 : 0;
2787
2814
  }
2788
- function Zc(e, t) {
2815
+ function rl(e, t) {
2789
2816
  const { startDate: n, targetDate: r } = e;
2790
2817
  if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
2791
- return ie((t - n) / (r - n));
2818
+ return se((t - n) / (r - n));
2792
2819
  }
2793
- const Mo = 0.1, Co = 0.25;
2794
- function Jc(e, t) {
2820
+ const xo = 0.1, No = 0.25;
2821
+ function ol(e, t) {
2795
2822
  if (typeof e != "number" || typeof t != "number") return;
2796
2823
  if (e >= 1) return "achieved";
2797
2824
  const n = t - e;
2798
- return n >= Co ? "off_track" : n >= Mo ? "at_risk" : "on_track";
2825
+ return n >= No ? "off_track" : n >= xo ? "at_risk" : "on_track";
2799
2826
  }
2800
- function el(e, t) {
2827
+ function il(e, t) {
2801
2828
  if (t)
2802
- return ie(e / t);
2829
+ return se(e / t);
2803
2830
  }
2804
- function tl(e) {
2831
+ function sl(e) {
2805
2832
  const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
2806
2833
  if (t.length)
2807
- return ie(t.reduce((n, r) => n + r, 0) / t.length);
2834
+ return se(t.reduce((n, r) => n + r, 0) / t.length);
2808
2835
  }
2809
- function nl(e, t) {
2836
+ function al(e, t) {
2810
2837
  const n = e.lastCheckInAt ?? e.createdAt;
2811
2838
  if (typeof n != "number") return 0;
2812
- const r = (e.checkInEveryDays ?? ko) * vo, o = t - n - r;
2839
+ const r = (e.checkInEveryDays ?? Mo) * Oo, o = t - n - r;
2813
2840
  return o > 0 ? o : 0;
2814
2841
  }
2815
- function rl(e) {
2842
+ function cl(e) {
2816
2843
  return e.targetDate ?? Number.MAX_SAFE_INTEGER;
2817
2844
  }
2818
- function ol(e, t) {
2845
+ function ll(e, t) {
2819
2846
  const n = e.accumulatedSeconds || 0;
2820
2847
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
2821
2848
  }
2822
- function il(e, t) {
2849
+ function ul(e, t) {
2823
2850
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
2824
2851
  if (!t || t === "exact") return n * 60;
2825
2852
  const r = Number(t);
2826
2853
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
2827
2854
  }
2828
- function sl(e) {
2855
+ function dl(e) {
2829
2856
  const t = Math.max(0, Math.round(e / 60));
2830
2857
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
2831
2858
  }
2832
- function al(e) {
2859
+ function pl(e) {
2833
2860
  const t = Math.max(0, Math.floor(e)), n = (i) => String(i).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
2834
2861
  return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
2835
2862
  }
2836
- function xo(e) {
2863
+ function Ro(e) {
2837
2864
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
2838
2865
  }
2839
- function cl(e, t) {
2840
- const n = xo(e) || "werksoort", r = new Set(t);
2866
+ function fl(e, t) {
2867
+ const n = Ro(e) || "werksoort", r = new Set(t);
2841
2868
  if (!r.has(n)) return n;
2842
2869
  for (let o = 2; o < 500; o++) {
2843
2870
  const i = `${n}-${o}`;
@@ -2845,59 +2872,59 @@ function cl(e, t) {
2845
2872
  }
2846
2873
  return `${n}-${r.size + 1}`;
2847
2874
  }
2848
- function ll(e, t) {
2875
+ function ml(e, t) {
2849
2876
  const n = e.ownerScope;
2850
2877
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
2851
2878
  }
2852
- function ul(e) {
2853
- return e.filter((t) => !t.archived).sort(Oo);
2879
+ function hl(e) {
2880
+ return e.filter((t) => !t.archived).sort(Do);
2854
2881
  }
2855
- function Oo(e, t) {
2882
+ function Do(e, t) {
2856
2883
  const n = (e.order ?? 0) - (t.order ?? 0);
2857
2884
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
2858
2885
  }
2859
- const No = 20, Ro = 20, pe = 300;
2886
+ const $o = 20, Lo = 20, me = 300;
2860
2887
  function P(e) {
2861
2888
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
2862
2889
  }
2863
- function Do(e) {
2890
+ function Po(e) {
2864
2891
  const t = e.replace(/\s+/g, " ").trim();
2865
- if (t.length <= pe) return t;
2866
- const n = t.slice(0, pe), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
2867
- return r > pe * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
2892
+ if (t.length <= me) return t;
2893
+ const n = t.slice(0, me), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
2894
+ return r > me * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
2868
2895
  }
2869
- function dl(e, t) {
2870
- const n = Do(t.text), r = P(n);
2896
+ function gl(e, t) {
2897
+ const n = Po(t.text), r = P(n);
2871
2898
  if (!r || (e.examples ?? []).some((s) => P(s) === r)) return null;
2872
2899
  const o = e.exampleCandidates ?? [], i = o.findIndex((s) => P(s.text) === r);
2873
2900
  if (i >= 0) {
2874
2901
  if (o[i].corrected || !t.corrected) return null;
2875
2902
  const s = [...o];
2876
- return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, ct(s);
2903
+ return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, ut(s);
2877
2904
  }
2878
- return ct([{ ...t, text: n }, ...o]).slice(0, Ro);
2905
+ return ut([{ ...t, text: n }, ...o]).slice(0, Lo);
2879
2906
  }
2880
- function ct(e) {
2907
+ function ut(e) {
2881
2908
  return [...e].sort(
2882
2909
  (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
2883
2910
  );
2884
2911
  }
2885
- function pl(e, t) {
2912
+ function yl(e, t) {
2886
2913
  const n = P(t), r = (e.examples ?? []).filter((i) => i.trim());
2887
- return { examples: r.some((i) => P(i) === n) ? r : [...r, t].slice(-No), exampleCandidates: $o(e, t) };
2914
+ return { examples: r.some((i) => P(i) === n) ? r : [...r, t].slice(-$o), exampleCandidates: Ko(e, t) };
2888
2915
  }
2889
- function $o(e, t) {
2916
+ function Ko(e, t) {
2890
2917
  const n = P(t);
2891
2918
  return (e.exampleCandidates ?? []).filter((r) => P(r.text) !== n);
2892
2919
  }
2893
- function Lo(e, t) {
2920
+ function Uo(e, t) {
2894
2921
  const n = e.ownerScope;
2895
2922
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
2896
2923
  }
2897
- function fl(e, t) {
2898
- return e.filter((n) => Lo(n, t));
2924
+ function bl(e, t) {
2925
+ return e.filter((n) => Uo(n, t));
2899
2926
  }
2900
- const Re = [
2927
+ const Le = [
2901
2928
  {
2902
2929
  key: "quote",
2903
2930
  label: "kind_quote",
@@ -2936,15 +2963,15 @@ const Re = [
2936
2963
  path: "invoices",
2937
2964
  issuedStatus: "open"
2938
2965
  }
2939
- ], Po = ["quote", "order", "invoice"];
2940
- function ml() {
2966
+ ], Fo = ["quote", "order", "invoice"];
2967
+ function _l() {
2941
2968
  const e = /* @__PURE__ */ new Map();
2942
- for (const t of Re)
2943
- Po.includes(t.key) && (e.has(t.path) || e.set(t.path, t));
2969
+ for (const t of Le)
2970
+ Fo.includes(t.key) && (e.has(t.path) || e.set(t.path, t));
2944
2971
  return [...e.values()];
2945
2972
  }
2946
2973
  function F(e) {
2947
- return Re.find((t) => t.key === e) ?? {
2974
+ return Le.find((t) => t.key === e) ?? {
2948
2975
  key: e,
2949
2976
  label: e,
2950
2977
  numbered: !1,
@@ -2954,10 +2981,10 @@ function F(e) {
2954
2981
  issuedStatus: "draft"
2955
2982
  };
2956
2983
  }
2957
- function hl(e) {
2984
+ function Al(e) {
2958
2985
  return e.issuedAt != null;
2959
2986
  }
2960
- const gl = [
2987
+ const Sl = [
2961
2988
  "status",
2962
2989
  "fileRef",
2963
2990
  "number",
@@ -2966,7 +2993,7 @@ const gl = [
2966
2993
  "dunning",
2967
2994
  "updatedAt"
2968
2995
  ];
2969
- function Ko(e, t) {
2996
+ function Bo(e, t) {
2970
2997
  const n = F(t).signFlip !== F(e.kindKey).signFlip, r = e.lines.map((o) => ({
2971
2998
  ...o,
2972
2999
  quantity: n ? -o.quantity : o.quantity,
@@ -3005,9 +3032,9 @@ function Ko(e, t) {
3005
3032
  source: e.source
3006
3033
  };
3007
3034
  }
3008
- function yl(e) {
3035
+ function El(e) {
3009
3036
  return {
3010
- ...Ko(e, e.kindKey),
3037
+ ...Bo(e, e.kindKey),
3011
3038
  sourceTransactionId: e.sourceTransactionId,
3012
3039
  previousVersionId: e.id,
3013
3040
  version: e.version + 1,
@@ -3015,7 +3042,7 @@ function yl(e) {
3015
3042
  totals: e.totals
3016
3043
  };
3017
3044
  }
3018
- function bl(e, t = {}) {
3045
+ function Tl(e, t = {}) {
3019
3046
  const n = F(e.kindKey), r = e.totals ?? { netCents: 0, taxCents: 0, grossCents: 0 };
3020
3047
  return {
3021
3048
  customer: {
@@ -3024,7 +3051,7 @@ function bl(e, t = {}) {
3024
3051
  // One token per line of the address, plus `street` on its own for a template that wants
3025
3052
  // the house number elsewhere. Empty stays empty: `fillText` reports it as a hole, and a
3026
3053
  // recipient block missing its street is exactly what the issue gate has to refuse.
3027
- address: Bo(t.companyAddress),
3054
+ address: Go(t.companyAddress),
3028
3055
  street: t.companyAddress?.street ?? "",
3029
3056
  house_number: t.companyAddress?.houseNumber ?? "",
3030
3057
  postal_code: t.companyAddress?.postalCode ?? "",
@@ -3061,7 +3088,7 @@ function bl(e, t = {}) {
3061
3088
  }
3062
3089
  };
3063
3090
  }
3064
- function _l(e, t = [], n = Uo) {
3091
+ function Il(e, t = [], n = jo) {
3065
3092
  const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((u) => u.key === a)?.percent ?? 0, i = {
3066
3093
  block_id: "lines",
3067
3094
  type: "table",
@@ -3076,8 +3103,8 @@ function _l(e, t = [], n = Uo) {
3076
3103
  // A text line spans as a heading: empty money cells would read as "free".
3077
3104
  [a.name, "", "", ""]
3078
3105
  ) : [
3079
- Fo(a.name, a.description, a.optional, n.optional),
3080
- jo(a.quantity),
3106
+ Ho(a.name, a.description, a.optional, n.optional),
3107
+ Wo(a.quantity),
3081
3108
  D(a.unitPriceCents),
3082
3109
  D(a.netCents)
3083
3110
  ]
@@ -3096,7 +3123,7 @@ function _l(e, t = [], n = Uo) {
3096
3123
  };
3097
3124
  return { lines: [i], totals: [s] };
3098
3125
  }
3099
- const Uo = {
3126
+ const jo = {
3100
3127
  description: "Omschrijving",
3101
3128
  optional: "optioneel",
3102
3129
  quantity: "Aantal",
@@ -3105,14 +3132,14 @@ const Uo = {
3105
3132
  tax: "Btw",
3106
3133
  gross: "Totaal"
3107
3134
  };
3108
- function Fo(e, t, n, r) {
3135
+ function Ho(e, t, n, r) {
3109
3136
  const o = t ? `${e} — ${t}` : e;
3110
3137
  return n ? `${o} (${r})` : o;
3111
3138
  }
3112
- function Bo(e) {
3139
+ function Go(e) {
3113
3140
  return e?.street ? [e.street, e.houseNumber].filter(Boolean).join(" ") : "";
3114
3141
  }
3115
- function jo(e) {
3142
+ function Wo(e) {
3116
3143
  return Number.isInteger(e) ? String(e) : String(e).replace(".", ",");
3117
3144
  }
3118
3145
  function K(e) {
@@ -3120,14 +3147,14 @@ function K(e) {
3120
3147
  const t = new Date(e), n = (r) => String(r).padStart(2, "0");
3121
3148
  return `${n(t.getDate())}-${n(t.getMonth() + 1)}-${t.getFullYear()}`;
3122
3149
  }
3123
- function Ho(e) {
3150
+ function Vo(e) {
3124
3151
  const t = F(e), n = t.key, r = t.numbered;
3125
3152
  return [
3126
3153
  {
3127
3154
  block_id: "head",
3128
3155
  type: "letterhead",
3129
3156
  fields: [
3130
- ...r ? [{ key: "number", label: Go[n]?.number ?? "Nummer", value: `{${n}.number}` }] : [],
3157
+ ...r ? [{ key: "number", label: zo[n]?.number ?? "Nummer", value: `{${n}.number}` }] : [],
3131
3158
  { key: "date", label: "Datum", value: `{${n}.date}` },
3132
3159
  ...r ? [{ key: "due_date", label: "Vervaldatum", value: `{${n}.due_date}` }] : [{ key: "valid_until", label: "Geldig tot", value: `{${n}.valid_until}` }],
3133
3160
  { key: "reference", label: "Referentie", value: `{${n}.reference}` }
@@ -3140,7 +3167,7 @@ function Ho(e) {
3140
3167
  ]
3141
3168
  },
3142
3169
  { block_id: "title", type: "heading", level: 1, text: `{${n}.title}` },
3143
- { block_id: "intro", type: "paragraph", text: lt[n] ?? lt.quote },
3170
+ { block_id: "intro", type: "paragraph", text: dt[n] ?? dt.quote },
3144
3171
  /**
3145
3172
  * The service period, when there is one — a subscription invoice says which quarter it bills.
3146
3173
  *
@@ -3165,17 +3192,17 @@ function Ho(e) {
3165
3192
  text: `Betaling: {${n}.payment_term}. Wij verzoeken u het bedrag vóór {${n}.due_date} over te maken onder vermelding van {${n}.number}.`
3166
3193
  }
3167
3194
  ] : [],
3168
- { block_id: "terms", type: "paragraph", text: ut[n] ?? ut.quote }
3195
+ { block_id: "terms", type: "paragraph", text: pt[n] ?? pt.quote }
3169
3196
  ];
3170
3197
  }
3171
- const Al = (e) => ({
3198
+ const kl = (e) => ({
3172
3199
  note: { key: `${F(e).key}.note`, exists: !0 },
3173
3200
  // Keyed on the start: a range without one is not a range, and `period_to` alone says nothing.
3174
3201
  period: { key: `${F(e).key}.period_from`, exists: !0 }
3175
- }), Go = {
3202
+ }), zo = {
3176
3203
  invoice: { number: "Factuurnummer" },
3177
3204
  credit_note: { number: "Creditnotanummer" }
3178
- }, lt = {
3205
+ }, dt = {
3179
3206
  quote: `Beste {customer.contact},
3180
3207
 
3181
3208
  Hierbij onze offerte. Hieronder vindt u de specificatie.`,
@@ -3188,47 +3215,47 @@ Hierbij onze factuur. Hieronder vindt u de specificatie.`,
3188
3215
  credit_note: `Beste {customer.contact},
3189
3216
 
3190
3217
  Hierbij onze creditnota. De onderstaande bedragen worden met u verrekend.`
3191
- }, ut = {
3218
+ }, pt = {
3192
3219
  quote: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld. Deze offerte is geldig tot {quote.valid_until}.",
3193
3220
  order: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld.",
3194
3221
  invoice: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld.",
3195
3222
  credit_note: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld."
3196
- }, Sl = Ho("quote"), Wo = Re.map((e) => e.key), Vo = "product";
3197
- function zo(e, t) {
3223
+ }, wl = Vo("quote"), Xo = Le.map((e) => e.key), Yo = "product";
3224
+ function qo(e, t) {
3198
3225
  return `${e}:${t}`;
3199
3226
  }
3200
- function El(e) {
3201
- return `${Vo}:${e}`;
3227
+ function vl(e) {
3228
+ return `${Yo}:${e}`;
3202
3229
  }
3203
- function Tl(e) {
3230
+ function Ml(e) {
3204
3231
  const t = e.indexOf(":");
3205
3232
  if (t < 0) return;
3206
3233
  const n = e.slice(0, t);
3207
- return Wo.includes(n) ? e.slice(t + 1) : void 0;
3234
+ return Xo.includes(n) ? e.slice(t + 1) : void 0;
3208
3235
  }
3209
- function Il(e) {
3210
- const t = /* @__PURE__ */ new Set([zo(e.kindKey, e.id)]);
3236
+ function Cl(e) {
3237
+ const t = /* @__PURE__ */ new Set([qo(e.kindKey, e.id)]);
3211
3238
  return e.companyId && t.add(`company:${e.companyId}`), e.contactId && t.add(`contact:${e.contactId}`), e.dealItemId && t.add(`work_item:${e.dealItemId}`), Array.from(t);
3212
3239
  }
3213
- const kl = 4;
3214
- function wl(e, t) {
3240
+ const Ol = 4;
3241
+ function xl(e, t) {
3215
3242
  const n = String(t).padStart(Math.max(1, e.padding), "0");
3216
3243
  return `${e.prefix}${e.period ? `${e.period}-` : ""}${n}`;
3217
3244
  }
3218
- function vl(e, t = Date.now()) {
3245
+ function Nl(e, t = Date.now()) {
3219
3246
  return e === "year" ? String(new Date(t).getFullYear()) : "";
3220
3247
  }
3221
- const Ml = [
3248
+ const Rl = [
3222
3249
  "cash",
3223
3250
  "credit",
3224
3251
  "direct_debit",
3225
3252
  "card",
3226
3253
  "other"
3227
3254
  ];
3228
- function Cl(e, t) {
3255
+ function Dl(e, t) {
3229
3256
  return e + Math.max(0, Math.round(t)) * 24 * 60 * 60 * 1e3;
3230
3257
  }
3231
- function xl(e, t) {
3258
+ function $l(e, t) {
3232
3259
  const n = /* @__PURE__ */ new Map();
3233
3260
  for (const r of e) r.businessEntityId || n.set(r.code, r);
3234
3261
  if (t)
@@ -3236,10 +3263,10 @@ function xl(e, t) {
3236
3263
  r.businessEntityId === t && n.set(r.code, r);
3237
3264
  return [...n.values()];
3238
3265
  }
3239
- function Ol(e) {
3266
+ function Ll(e) {
3240
3267
  return { code: e.code, label: e.label, method: e.method, dueDays: e.dueDays };
3241
3268
  }
3242
- const Nl = [
3269
+ const Pl = [
3243
3270
  {
3244
3271
  code: "14D",
3245
3272
  label: "Binnen 14 dagen",
@@ -3251,30 +3278,30 @@ const Nl = [
3251
3278
  { code: "30D", label: "Binnen 30 dagen", method: "credit", dueDays: 30, order: 1 },
3252
3279
  { code: "CONTANT", label: "Contant", method: "cash", dueDays: 0, order: 2 }
3253
3280
  ];
3254
- function Rl(e) {
3281
+ function Kl(e) {
3255
3282
  return e.type === "agent";
3256
3283
  }
3257
- const Dl = "WORK_COMMENT_ADDED", $l = "WORK_ITEM_ASSIGNED", Ll = "WORK_ITEM_STATUS_CHANGED";
3258
- function Xo(e, t) {
3284
+ const Ul = "WORK_COMMENT_ADDED", Fl = "WORK_ITEM_ASSIGNED", Bl = "WORK_ITEM_STATUS_CHANGED";
3285
+ function Qo(e, t) {
3259
3286
  const n = (r) => {
3260
3287
  const o = new Date(r);
3261
3288
  return o.setHours(0, 0, 0, 0), o.getTime();
3262
3289
  };
3263
- return Math.round((n(e) - n(t)) / Jn);
3290
+ return Math.round((n(e) - n(t)) / tr);
3264
3291
  }
3265
- function Pl(e, t) {
3292
+ function jl(e, t) {
3266
3293
  if (e.closedAt != null) return { score: L, reasons: [] };
3267
3294
  const n = t.remindersById?.[e.id];
3268
3295
  if (n && n.remindAt > t.now) return { score: L, reasons: [] };
3269
3296
  let r = 0;
3270
3297
  const o = [], i = e.priority ?? "normal";
3271
3298
  if (te[i] > 0 && (r += te[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
3272
- const s = Xo(e.dueDate, t.now);
3299
+ const s = Qo(e.dueDate, t.now);
3273
3300
  s < 0 ? (r += 35, o.push("overdue")) : s === 0 && (r += 20, o.push("due-today"));
3274
3301
  }
3275
3302
  return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
3276
3303
  }
3277
- const De = [
3304
+ const Pe = [
3278
3305
  { key: "task", label: "type_task" },
3279
3306
  { key: "bug", label: "type_bug" },
3280
3307
  { key: "story", label: "type_story" },
@@ -3282,35 +3309,35 @@ const De = [
3282
3309
  { key: "subtask", label: "type_subtask" },
3283
3310
  { key: "case", label: "type_case" },
3284
3311
  { key: "deal", label: "type_deal" }
3285
- ], Kl = De.map((e) => e.key);
3286
- function Ul(e) {
3287
- return e?.types?.length ? e.types : De;
3312
+ ], Hl = Pe.map((e) => e.key);
3313
+ function Gl(e) {
3314
+ return e?.types?.length ? e.types : Pe;
3288
3315
  }
3289
- function Fl(e, t) {
3316
+ function Wl(e, t) {
3290
3317
  return t.find((n) => n.key === e);
3291
3318
  }
3292
- function Bl(e) {
3319
+ function Vl(e) {
3293
3320
  const t = e.trim().toLowerCase();
3294
3321
  return t ? t.includes("sub-task") || t.includes("subtask") || t.includes("sub task") ? "subtask" : t.includes("bug") || t.includes("defect") ? "bug" : t.includes("epic") ? "epic" : t.includes("story") ? "story" : t.includes("incident") || t.includes("problem") || t.includes("service request") || t.includes("change") ? "case" : t.includes("task") ? "task" : null : null;
3295
3322
  }
3296
- function jl(...e) {
3297
- return e.map((t) => De.find((n) => n.key === t)).filter((t) => !!t);
3323
+ function zl(...e) {
3324
+ return e.map((t) => Pe.find((n) => n.key === t)).filter((t) => !!t);
3298
3325
  }
3299
- const Yo = "work_item", qo = "work_project", Qo = "work_activity", Hl = "work_cycle";
3300
- function Zo(e) {
3301
- return `${Yo}:${e}`;
3326
+ const Zo = "work_item", Jo = "work_project", ei = "work_activity", Xl = "work_cycle";
3327
+ function ti(e) {
3328
+ return `${Zo}:${e}`;
3302
3329
  }
3303
- function Qt(e) {
3304
- return `${qo}:${e}`;
3330
+ function Jt(e) {
3331
+ return `${Jo}:${e}`;
3305
3332
  }
3306
- function Gl(e) {
3307
- return `${Qo}:${e}`;
3333
+ function Yl(e) {
3334
+ return `${ei}:${e}`;
3308
3335
  }
3309
- function Wl(e, t, n) {
3336
+ function ql(e, t, n) {
3310
3337
  const r = `${e}-${t}`;
3311
3338
  return n ? `${r}-${n}` : r;
3312
3339
  }
3313
- function Vl(e) {
3340
+ function Ql(e) {
3314
3341
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
3315
3342
  return t ? {
3316
3343
  projectKey: t[1].toUpperCase(),
@@ -3318,52 +3345,52 @@ function Vl(e) {
3318
3345
  ...t[3] ? { subSequence: Number(t[3]) } : {}
3319
3346
  } : null;
3320
3347
  }
3321
- function zl(e) {
3348
+ function Zl(e) {
3322
3349
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
3323
3350
  }
3324
- function Xl(e, t = 25) {
3325
- const n = /* @__PURE__ */ new Set([Zo(e.id)]);
3326
- e.projectId && n.add(Qt(e.projectId));
3351
+ function Jl(e, t = 25) {
3352
+ const n = /* @__PURE__ */ new Set([ti(e.id)]);
3353
+ e.projectId && n.add(Jt(e.projectId));
3327
3354
  for (const r of e.ancestorKeys ?? []) n.add(r);
3328
3355
  for (const r of e.partyKeys ?? []) n.add(r);
3329
3356
  return Array.from(n).slice(0, t);
3330
3357
  }
3331
- function Yl(e) {
3332
- return [Qt(e.id)];
3358
+ function eu(e) {
3359
+ return [Jt(e.id)];
3333
3360
  }
3334
- const $e = [
3361
+ const Ke = [
3335
3362
  { key: "open", label: "status_open", category: "todo", order: 0 },
3336
3363
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
3337
3364
  { key: "done", label: "status_done", category: "done", order: 2 },
3338
3365
  { key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
3339
- ], Zt = $e.map((e) => e.key);
3340
- function Jo(e) {
3341
- return e?.statuses?.length ? e.statuses : $e;
3366
+ ], en = Ke.map((e) => e.key);
3367
+ function ni(e) {
3368
+ return e?.statuses?.length ? e.statuses : Ke;
3342
3369
  }
3343
- function ei(e, t) {
3370
+ function ri(e, t) {
3344
3371
  return t.find((n) => n.key === e)?.category ?? "todo";
3345
3372
  }
3346
- function ql(e, t) {
3373
+ function tu(e, t) {
3347
3374
  return t.find((n) => n.key === e);
3348
3375
  }
3349
- function Ql(e) {
3350
- const t = Jo(e), n = e?.defaultStatusKey;
3351
- return n && t.some((r) => r.key === n) ? n : ti(t)[0]?.key ?? $e[0].key;
3376
+ function nu(e) {
3377
+ const t = ni(e), n = e?.defaultStatusKey;
3378
+ return n && t.some((r) => r.key === n) ? n : oi(t)[0]?.key ?? Ke[0].key;
3352
3379
  }
3353
- function ti(e) {
3380
+ function oi(e) {
3354
3381
  return [...e].sort((t, n) => {
3355
3382
  const r = (t.order ?? 0) - (n.order ?? 0);
3356
3383
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
3357
3384
  });
3358
3385
  }
3359
- function Zl(e, t) {
3360
- return ei(e, t) === "done";
3386
+ function ru(e, t) {
3387
+ return ri(e, t) === "done";
3361
3388
  }
3362
- function ni(e) {
3389
+ function ii(e) {
3363
3390
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
3364
3391
  }
3365
- function Jl(e, t) {
3366
- const n = ni(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Zt]);
3392
+ function ou(e, t) {
3393
+ const n = ii(e) || "status", r = /* @__PURE__ */ new Set([...t, ...en]);
3367
3394
  if (!r.has(n)) return n;
3368
3395
  for (let o = 2; o < 500; o++) {
3369
3396
  const i = `${n}-${o}`;
@@ -3371,7 +3398,7 @@ function Jl(e, t) {
3371
3398
  }
3372
3399
  return `${n}-${r.size + 1}`;
3373
3400
  }
3374
- function eu(e) {
3401
+ function iu(e) {
3375
3402
  const t = [];
3376
3403
  if (!e.length) return [{ index: -1, reason: "empty" }];
3377
3404
  const n = /* @__PURE__ */ new Set();
@@ -3380,16 +3407,16 @@ function eu(e) {
3380
3407
  t.push({ index: o, reason: "missing_key" });
3381
3408
  return;
3382
3409
  }
3383
- Zt.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
3410
+ en.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
3384
3411
  }), 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;
3385
3412
  }
3386
- function tu(e) {
3413
+ function su(e) {
3387
3414
  return e.startDate ?? Number.MAX_SAFE_INTEGER;
3388
3415
  }
3389
- function nu(e) {
3416
+ function au(e) {
3390
3417
  return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
3391
3418
  }
3392
- const ri = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), oi = /* @__PURE__ */ new Set([
3419
+ const si = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), ai = /* @__PURE__ */ new Set([
3393
3420
  "text/plain",
3394
3421
  "text/markdown",
3395
3422
  "text/csv",
@@ -3398,67 +3425,67 @@ const ri = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
3398
3425
  "application/xml",
3399
3426
  "text/xml"
3400
3427
  ]);
3401
- function ii(e) {
3428
+ function ci(e) {
3402
3429
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
3403
- return t ? ri.has(t) ? "image" : t === "application/pdf" ? "pdf" : oi.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
3430
+ return t ? si.has(t) ? "image" : t === "application/pdf" ? "pdf" : ai.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
3404
3431
  }
3405
- const j = 1024 * 1024, si = {
3432
+ const j = 1024 * 1024, li = {
3406
3433
  image: 5 * j,
3407
3434
  pdf: 20 * j,
3408
3435
  text: 1 * j,
3409
3436
  audio: 20 * j
3410
- }, ru = 25 * j, ou = 5;
3411
- function iu(e, t) {
3412
- const n = ii(e);
3413
- return n === "unsupported" ? "unsupported" : t > si[n] ? "too-large" : null;
3437
+ }, cu = 25 * j, lu = 5;
3438
+ function uu(e, t) {
3439
+ const n = ci(e);
3440
+ return n === "unsupported" ? "unsupported" : t > li[n] ? "too-large" : null;
3414
3441
  }
3415
- function su(e) {
3442
+ function du(e) {
3416
3443
  return e.access !== "read" && e.effect !== "internal";
3417
3444
  }
3418
- function ai(e) {
3445
+ function ui(e) {
3419
3446
  return `${e.kind}:${e.id || e.url || e.title}`;
3420
3447
  }
3421
- function au(e, t = []) {
3448
+ function pu(e, t = []) {
3422
3449
  const n = new Set(t), r = [], o = [];
3423
3450
  for (const i of e) {
3424
- const s = ai(i);
3451
+ const s = ui(i);
3425
3452
  n.has(s) || (n.add(s), r.push(i), o.push(s));
3426
3453
  }
3427
3454
  return { sources: r, keys: o };
3428
3455
  }
3429
- const cu = "assist-source", lu = ["blocking", "due", "open"];
3430
- function uu(e, t) {
3456
+ const fu = "assist-source", mu = ["blocking", "due", "open"];
3457
+ function hu(e, t) {
3431
3458
  const [n, r] = (e.subjectKey ?? "").split(":");
3432
3459
  return n === t && r ? r : void 0;
3433
3460
  }
3434
- const dt = { blocking: 0, due: 1, open: 2 };
3435
- function du(e, t) {
3436
- return dt[e.band ?? "open"] - dt[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
3461
+ const ft = { blocking: 0, due: 1, open: 2 };
3462
+ function gu(e, t) {
3463
+ return ft[e.band ?? "open"] - ft[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
3437
3464
  }
3438
- function pu(e) {
3465
+ function yu(e) {
3439
3466
  return e.sessions.filter(
3440
3467
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
3441
3468
  );
3442
3469
  }
3443
- function fu(e) {
3470
+ function bu(e) {
3444
3471
  return e.sessions.filter(
3445
3472
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
3446
3473
  );
3447
3474
  }
3448
- function mu(e) {
3475
+ function _u(e) {
3449
3476
  return e.sessions.some(
3450
3477
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
3451
3478
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
3452
3479
  }
3453
- function ci(e, t) {
3454
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => ui(s, r[s.intent]));
3480
+ function di(e, t) {
3481
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => fi(s, r[s.intent]));
3455
3482
  if (!e.extraIntents || e.extraIntents.length === 0) return o;
3456
3483
  const i = new Set(o.map((s) => s.intent));
3457
3484
  for (const s of e.extraIntents)
3458
3485
  i.has(s.intent) || (o.push(s), i.add(s.intent));
3459
3486
  return o;
3460
3487
  }
3461
- function li(e, t) {
3488
+ function pi(e, t) {
3462
3489
  const n = {};
3463
3490
  for (const r of e.intents) {
3464
3491
  if (!r.togglable) continue;
@@ -3467,46 +3494,46 @@ function li(e, t) {
3467
3494
  }
3468
3495
  return n;
3469
3496
  }
3470
- function hu(e, t) {
3471
- const n = li(e, t);
3497
+ function Au(e, t) {
3498
+ const n = pi(e, t);
3472
3499
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
3473
3500
  }
3474
- function ui(e, t) {
3501
+ function fi(e, t) {
3475
3502
  return t ? {
3476
3503
  intent: t.intent ?? e.intent,
3477
3504
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
3478
3505
  transport: t.transport ?? e.transport
3479
3506
  } : e;
3480
3507
  }
3481
- function gu(e, t) {
3508
+ function Su(e, t) {
3482
3509
  const n = [];
3483
3510
  for (const r of e) {
3484
3511
  if (!r.enabled) continue;
3485
3512
  const o = t[r.providerId];
3486
3513
  if (o)
3487
- for (const i of ci(r, o))
3514
+ for (const i of di(r, o))
3488
3515
  n.push({ channel: r, description: o, capability: i });
3489
3516
  }
3490
3517
  return n;
3491
3518
  }
3492
- function yu(e, t) {
3519
+ function Eu(e, t) {
3493
3520
  return t.filter((n) => n.capability.intent === e);
3494
3521
  }
3495
- function di(e, t) {
3522
+ function mi(e, t) {
3496
3523
  return t.filter((n) => n.capability.targetSchemes.includes(e));
3497
3524
  }
3498
- function bu(e, t) {
3499
- return di(e.scheme, t);
3525
+ function Tu(e, t) {
3526
+ return mi(e.scheme, t);
3500
3527
  }
3501
- function _u(e, t, n) {
3528
+ function Iu(e, t, n) {
3502
3529
  const r = [];
3503
3530
  for (const o of e)
3504
3531
  for (const i of n)
3505
3532
  i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
3506
3533
  return r;
3507
3534
  }
3508
- var pi = /* @__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))(pi || {});
3509
- const fi = {
3535
+ var hi = /* @__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))(hi || {});
3536
+ const gi = {
3510
3537
  mailto: "mail",
3511
3538
  sip: "tel",
3512
3539
  tel: "tel",
@@ -3527,10 +3554,10 @@ const fi = {
3527
3554
  id: "note",
3528
3555
  custom: "note"
3529
3556
  };
3530
- function Au(e) {
3531
- return e ? fi[e] ?? "note" : "note";
3557
+ function ku(e) {
3558
+ return e ? gi[e] ?? "note" : "note";
3532
3559
  }
3533
- const Su = "message_window", Eu = "message_templates", Tu = {
3560
+ const wu = "message_window", vu = "message_templates", Mu = {
3534
3561
  // E-mail
3535
3562
  FROM: "from",
3536
3563
  TO: "to",
@@ -3547,11 +3574,11 @@ const Su = "message_window", Eu = "message_templates", Tu = {
3547
3574
  // Voice/conference
3548
3575
  HOST: "host",
3549
3576
  PARTICIPANT: "participant"
3550
- }, Iu = (e, t) => ({ intent: e, ...t }), ku = "folder_management", wu = "remote_search", vu = "message_reactions", Mu = {
3577
+ }, Cu = (e, t) => ({ intent: e, ...t }), Ou = "folder_management", xu = "remote_search", Nu = "message_reactions", Ru = {
3551
3578
  ok: !1,
3552
3579
  code: "UNSUPPORTED",
3553
3580
  message: "Provider does not support this op"
3554
- }, Cu = "connector", xu = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), J = (e) => ({ type: "boolean", description: e }), M = A("Sheet name. Omit for the sheet the user is looking at."), pt = A("Slide id, as `inspect` reports it.");
3581
+ }, Du = "connector", $u = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), J = (e) => ({ type: "boolean", description: e }), M = A("Sheet name. Omit for the sheet the user is looking at."), mt = A("Slide id, as `inspect` reports it.");
3555
3582
  function b(e, t, n, r, o, i) {
3556
3583
  return {
3557
3584
  op: e,
@@ -3562,7 +3589,7 @@ function b(e, t, n, r, o, i) {
3562
3589
  visible: i.visible
3563
3590
  };
3564
3591
  }
3565
- const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft = { undoable: !1, visible: !0 }, ne = { undoable: !1, visible: !1 }, mi = [
3592
+ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ht = { undoable: !1, visible: !0 }, re = { undoable: !1, visible: !1 }, yi = [
3566
3593
  b(
3567
3594
  "pdf.goToPage",
3568
3595
  ["pdf"],
@@ -3619,7 +3646,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3619
3646
  }
3620
3647
  },
3621
3648
  ["order"],
3622
- ft
3649
+ ht
3623
3650
  ),
3624
3651
  b(
3625
3652
  "pdf.deletePages",
@@ -3627,7 +3654,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3627
3654
  "Remove pages, keeping the rest in order.",
3628
3655
  { pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
3629
3656
  ["pages"],
3630
- ft
3657
+ ht
3631
3658
  ),
3632
3659
  b(
3633
3660
  "pdf.addNote",
@@ -3643,7 +3670,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3643
3670
  fontSize: _("Font size in points. Omit for 12.")
3644
3671
  },
3645
3672
  ["page", "text", "left", "top"],
3646
- ne
3673
+ re
3647
3674
  ),
3648
3675
  b(
3649
3676
  "pdf.highlightText",
@@ -3655,9 +3682,9 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3655
3682
  occurrence: _("Which occurrence on that page, 1-based. Omit for the first.")
3656
3683
  },
3657
3684
  ["page", "text"],
3658
- ne
3685
+ re
3659
3686
  )
3660
- ], hi = [
3687
+ ], bi = [
3661
3688
  b(
3662
3689
  "sheet.setValues",
3663
3690
  ["sheet"],
@@ -3809,7 +3836,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3809
3836
  [],
3810
3837
  H
3811
3838
  )
3812
- ], gi = [
3839
+ ], _i = [
3813
3840
  b(
3814
3841
  "word.replaceParagraph",
3815
3842
  ["word"],
@@ -3871,25 +3898,25 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3871
3898
  ["start"],
3872
3899
  H
3873
3900
  )
3874
- ], yi = [
3901
+ ], Ai = [
3875
3902
  b(
3876
3903
  "slides.setText",
3877
3904
  ["slides"],
3878
3905
  "Replace the text of one shape. Written on save; not visible before that, and not undoable.",
3879
3906
  {
3880
- slide: pt,
3907
+ slide: mt,
3881
3908
  element: A("Element id, as `inspect` reports it."),
3882
3909
  text: A("The new text.")
3883
3910
  },
3884
3911
  ["slide", "element", "text"],
3885
- ne
3912
+ re
3886
3913
  ),
3887
3914
  b(
3888
3915
  "slides.setTransform",
3889
3916
  ["slides"],
3890
3917
  "Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
3891
3918
  {
3892
- slide: pt,
3919
+ slide: mt,
3893
3920
  element: A("Element id."),
3894
3921
  left: _("Distance from the left edge, in pixels."),
3895
3922
  top: _("Distance from the top edge, in pixels."),
@@ -3897,26 +3924,26 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ft =
3897
3924
  height: _("Height in pixels.")
3898
3925
  },
3899
3926
  ["slide", "element"],
3900
- ne
3927
+ re
3901
3928
  )
3902
- ], Jt = [
3903
- ...mi,
3904
- ...hi,
3905
- ...gi,
3906
- ...yi
3929
+ ], tn = [
3930
+ ...yi,
3931
+ ...bi,
3932
+ ..._i,
3933
+ ...Ai
3907
3934
  ];
3908
- function Ou(e) {
3909
- return Jt.filter((t) => t.kinds.includes(e));
3935
+ function Lu(e) {
3936
+ return tn.filter((t) => t.kinds.includes(e));
3910
3937
  }
3911
- function Nu(e) {
3912
- return Jt.find((t) => t.op === e);
3938
+ function Pu(e) {
3939
+ return tn.find((t) => t.op === e);
3913
3940
  }
3914
- const mt = /(?: {2,}|\\)$/, bi = /^\*\*([^*]+)\*\*\s+(.*)$/;
3915
- function ht(e) {
3916
- const t = bi.exec(e);
3941
+ const gt = /(?: {2,}|\\)$/, Si = /^\*\*([^*]+)\*\*\s+(.*)$/;
3942
+ function yt(e) {
3943
+ const t = Si.exec(e);
3917
3944
  return t ? { lead: t[1], text: t[2] } : { text: e };
3918
3945
  }
3919
- function Ru(e) {
3946
+ function Ku(e) {
3920
3947
  const t = (e ?? "").replace(/\r\n/g, `
3921
3948
  `).split(`
3922
3949
  `), n = [];
@@ -3924,7 +3951,7 @@ function Ru(e) {
3924
3951
  const o = () => {
3925
3952
  r && n.push({ type: "list", style: r.style, items: r.items }), r = null;
3926
3953
  }, i = (p, f) => {
3927
- r && r.style !== p && o(), r ? r.items.push(ht(f)) : r = { style: p, items: [ht(f)] };
3954
+ r && r.style !== p && o(), r ? r.items.push(yt(f)) : r = { style: p, items: [yt(f)] };
3928
3955
  };
3929
3956
  let s = [], a = [];
3930
3957
  const u = () => {
@@ -3989,33 +4016,33 @@ function Ru(e) {
3989
4016
  continue;
3990
4017
  }
3991
4018
  l(), o();
3992
- const E = mt.test(p);
3993
- s.push(p.replace(mt, "").trim() + (E ? `
4019
+ const E = gt.test(p);
4020
+ s.push(p.replace(gt, "").trim() + (E ? `
3994
4021
  ` : " ")), c++;
3995
4022
  }
3996
4023
  return d(), n;
3997
4024
  }
3998
- function Du(e, t) {
3999
- return Ln(e, t).replace(/^```.*$/gm, "").replace(/^\|[\s:|-]*\|$/gm, "").replace(/[ \t]*\|[ \t]*/g, " ").replace(/^[ \t]*(#{1,6}|>|[-*+]|\d+\.)[ \t]+/gm, "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|\*|_|`|~~)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, `
4025
+ function Uu(e, t) {
4026
+ return Kn(e, t).replace(/^```.*$/gm, "").replace(/^\|[\s:|-]*\|$/gm, "").replace(/[ \t]*\|[ \t]*/g, " ").replace(/^[ \t]*(#{1,6}|>|[-*+]|\d+\.)[ \t]+/gm, "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|\*|_|`|~~)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, `
4000
4027
 
4001
4028
  `).trim();
4002
4029
  }
4003
- const $u = "documents.describe", Lu = "documents.inspect", Pu = "documents.apply";
4004
- function Ku(e) {
4030
+ const Fu = "documents.describe", Bu = "documents.inspect", ju = "documents.apply";
4031
+ function Hu(e) {
4005
4032
  const t = e.indexOf(":");
4006
4033
  if (t !== -1) return e.slice(0, t);
4007
4034
  const n = e.indexOf(".");
4008
4035
  return n === -1 ? e : e.slice(0, n);
4009
4036
  }
4010
- const Uu = "installation-id";
4011
- function Fu(e) {
4037
+ const Gu = "installation-id";
4038
+ function Wu(e) {
4012
4039
  const t = [];
4013
4040
  for (const n of Object.keys(e))
4014
4041
  for (const r of Object.keys(e[n]))
4015
4042
  t.push({ lang: n, key: r, value: e[n][r] });
4016
4043
  return t;
4017
4044
  }
4018
- const Bu = "notification-source", ju = (e, t) => `${e}.pref.${t}`, Hu = {
4045
+ const Vu = "notification-source", zu = (e, t) => `${e}.pref.${t}`, Xu = {
4019
4046
  ai: [
4020
4047
  "account.read",
4021
4048
  "account.write",
@@ -4150,48 +4177,48 @@ const Bu = "notification-source", ju = (e, t) => `${e}.pref.${t}`, Hu = {
4150
4177
  time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
4151
4178
  user: ["user.read", "user.write"],
4152
4179
  work: ["item.read", "item.write", "project.read", "project.write"]
4153
- }, en = 9e4, _i = ["out_of_office"], tn = (e) => _i.includes(e);
4154
- function Gu(e, t, n) {
4155
- const r = n - e < en, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
4180
+ }, nn = 9e4, Ei = ["out_of_office"], rn = (e) => Ei.includes(e);
4181
+ function Yu(e, t, n) {
4182
+ const r = n - e < nn, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
4156
4183
  if (!o?.status) return { online: r, status: r ? "available" : "offline" };
4157
4184
  const i = o.status;
4158
- return !r && !tn(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
4185
+ return !r && !rn(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
4159
4186
  }
4160
- function Wu(e, t) {
4161
- const n = t - e.lastSeenAt < en, r = n || tn(e.status) ? e.status : "offline";
4187
+ function qu(e, t) {
4188
+ const n = t - e.lastSeenAt < nn, r = n || rn(e.status) ? e.status : "offline";
4162
4189
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
4163
4190
  }
4164
- function Vu(e, t) {
4191
+ function Qu(e, t) {
4165
4192
  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 };
4166
4193
  }
4167
- function zu(e) {
4194
+ function Zu(e) {
4168
4195
  return e.providerAvailable && e.allowed;
4169
4196
  }
4170
- const Xu = "resources.describe", Yu = "resources.search", qu = "resources.resolve", Qu = "resources.attached";
4171
- function Zu(e) {
4197
+ const Ju = "resources.describe", ed = "resources.search", td = "resources.resolve", nd = "resources.attached";
4198
+ function rd(e) {
4172
4199
  const t = e.indexOf(":");
4173
4200
  return t === -1 ? e : e.slice(0, t);
4174
4201
  }
4175
- const Ju = "/provider/scope/related", ed = "/provider/scope/read", nn = "auth";
4176
- function rn(e) {
4202
+ const od = "/provider/scope/related", id = "/provider/scope/read", on = "auth";
4203
+ function sn(e) {
4177
4204
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
4178
4205
  return t ? t[1] : null;
4179
4206
  }
4180
- function td(e) {
4181
- const t = rn(e);
4182
- return t ? t !== nn : typeof e == "string" && e.startsWith("/wake");
4207
+ function sd(e) {
4208
+ const t = sn(e);
4209
+ return t ? t !== on : typeof e == "string" && e.startsWith("/wake");
4183
4210
  }
4184
- function nd(e) {
4185
- return typeof e != "string" || e === "" || e === "/" ? !0 : rn(e) === nn;
4211
+ function ad(e) {
4212
+ return typeof e != "string" || e === "" || e === "/" ? !0 : sn(e) === on;
4186
4213
  }
4187
- function Ai(e) {
4214
+ function Ti(e) {
4188
4215
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4189
4216
  }
4190
- function Si(e) {
4191
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Ai(r)}`).join("");
4217
+ function Ii(e) {
4218
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Ti(r)}`).join("");
4192
4219
  return new RegExp(`^${n}\\/?$`);
4193
4220
  }
4194
- function Ei(e, t) {
4221
+ function ki(e, t) {
4195
4222
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
4196
4223
  return n.forEach((i, s) => {
4197
4224
  if (i.startsWith(":")) {
@@ -4200,14 +4227,14 @@ function Ei(e, t) {
4200
4227
  }
4201
4228
  }), o;
4202
4229
  }
4203
- function Ti(e) {
4230
+ function wi(e) {
4204
4231
  return e.publicBasePath ?? `/apps/${e.name}`;
4205
4232
  }
4206
- function rd(e) {
4233
+ function cd(e) {
4207
4234
  const t = [];
4208
4235
  for (const n of e) {
4209
4236
  if (!n?.name) continue;
4210
- const r = Ti(n);
4237
+ const r = wi(n);
4211
4238
  for (const o of n.routes ?? []) {
4212
4239
  if (!o.public) continue;
4213
4240
  const i = o.path === "/" ? "" : o.path;
@@ -4221,7 +4248,7 @@ function rd(e) {
4221
4248
  }
4222
4249
  return t;
4223
4250
  }
4224
- function Ii(e, t) {
4251
+ function vi(e, t) {
4225
4252
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
4226
4253
  for (let o = 0; o < Math.min(n.length, r.length); o++) {
4227
4254
  const i = n[o].startsWith(":"), s = r[o].startsWith(":");
@@ -4229,17 +4256,17 @@ function Ii(e, t) {
4229
4256
  }
4230
4257
  return n.length > r.length;
4231
4258
  }
4232
- function ki(e, t) {
4259
+ function Mi(e, t) {
4233
4260
  if (typeof e != "string") return null;
4234
4261
  let n = null;
4235
4262
  for (const r of t)
4236
- Si(r.pattern).test(e) && (!n || Ii(r.pattern, n.pattern)) && (n = r);
4237
- return n ? { ...n, params: { ...n.props, ...Ei(n.pattern, e) } } : null;
4263
+ Ii(r.pattern).test(e) && (!n || vi(r.pattern, n.pattern)) && (n = r);
4264
+ return n ? { ...n, params: { ...n.props, ...ki(n.pattern, e) } } : null;
4238
4265
  }
4239
- function od(e, t) {
4240
- return ki(e, t) !== null;
4266
+ function ld(e, t) {
4267
+ return Mi(e, t) !== null;
4241
4268
  }
4242
- const id = 10 * 1024 * 1024, sd = 25 * 1024 * 1024, ad = "sync-target", cd = 20, wi = {
4269
+ const ud = 10 * 1024 * 1024, dd = 25 * 1024 * 1024, pd = "sync-target", fd = 20, Ci = {
4243
4270
  afrikaans: [
4244
4271
  "[Muziek]",
4245
4272
  "(C) TV GELDERLAND 2021",
@@ -4389,14 +4416,14 @@ const id = 10 * 1024 * 1024, sd = 25 * 1024 * 1024, ad = "sync-target", cd = 20,
4389
4416
  "[MÚSICA]",
4390
4417
  "[Music cuts in British]"
4391
4418
  ]
4392
- }, vi = (e) => {
4419
+ }, Oi = (e) => {
4393
4420
  let t = e;
4394
- return Object.values(wi).forEach((n) => {
4421
+ return Object.values(Ci).forEach((n) => {
4395
4422
  n.forEach((r) => {
4396
4423
  t = t.replaceAll(r, "");
4397
4424
  });
4398
4425
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
4399
- }, Mi = 6e4, Ci = 8e3, xi = 2, Oi = 0.4, Ni = 3, Ri = /* @__PURE__ */ new Set([
4426
+ }, xi = 6e4, Ni = 8e3, Ri = 2, Di = 0.4, $i = 3, Li = /* @__PURE__ */ new Set([
4400
4427
  "aan",
4401
4428
  "als",
4402
4429
  "ben",
@@ -4509,13 +4536,13 @@ const id = 10 * 1024 * 1024, sd = 25 * 1024 * 1024, ad = "sync-target", cd = 20,
4509
4536
  "you",
4510
4537
  "your"
4511
4538
  ]);
4512
- function Di(e) {
4539
+ function Pi(e) {
4513
4540
  const t = /* @__PURE__ */ new Set();
4514
4541
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
4515
- n.length < Ni || Ri.has(n) || t.add(n);
4542
+ n.length < $i || Li.has(n) || t.add(n);
4516
4543
  return [...t];
4517
4544
  }
4518
- function $i(e, t) {
4545
+ function Ki(e, t) {
4519
4546
  if (!e.length) return 0;
4520
4547
  if (!t.length) return 1;
4521
4548
  const n = new Set(t), r = new Set(e);
@@ -4523,32 +4550,32 @@ function $i(e, t) {
4523
4550
  for (const i of r) n.has(i) || (o += 1);
4524
4551
  return o / r.size;
4525
4552
  }
4526
- function Li(e, t = Mi) {
4553
+ function Ui(e, t = xi) {
4527
4554
  const n = e.filter((s) => !s.partial && typeof s.text == "string");
4528
4555
  if (!n.length) return { text: "", segmentCount: 0 };
4529
4556
  const o = n.reduce((s, a) => Math.max(s, a.endedAt ?? 0), 0) - t;
4530
- return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => vi(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
4557
+ return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Oi(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
4531
4558
  }
4532
- const Pi = 60;
4533
- function ld(e, t, n = Pi) {
4559
+ const Fi = 60;
4560
+ function md(e, t, n = Fi) {
4534
4561
  const r = new Set(e), o = [...e];
4535
4562
  for (const i of t)
4536
4563
  !i || r.has(i) || (r.add(i), o.push(i));
4537
4564
  return o.slice(-n);
4538
4565
  }
4539
- function ud(e) {
4566
+ function hd(e) {
4540
4567
  const { segments: t, now: n, state: r } = e;
4541
- if (r.lastTriggerAt && n - r.lastTriggerAt < Ci)
4568
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Ni)
4542
4569
  return { trigger: !1, reason: "too_soon" };
4543
- const o = Li(t, e.windowMs);
4570
+ const o = Ui(t, e.windowMs);
4544
4571
  if (!o.text) return { trigger: !1, reason: "no_speech" };
4545
4572
  const i = o.segmentCount - (r.lastSegmentCount ?? 0);
4546
- if (r.lastQueryTerms && i < xi)
4573
+ if (r.lastQueryTerms && i < Ri)
4547
4574
  return { trigger: !1, reason: "too_few_new" };
4548
- const s = Di(o.text);
4549
- return s.length ? r.lastQueryTerms?.length && $i(s, r.lastQueryTerms) < Oi ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
4575
+ const s = Pi(o.text);
4576
+ return s.length ? r.lastQueryTerms?.length && Ki(s, r.lastQueryTerms) < Di ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
4550
4577
  }
4551
- const dd = [
4578
+ const gd = [
4552
4579
  "personal",
4553
4580
  "organization",
4554
4581
  "connections",
@@ -4556,7 +4583,7 @@ const dd = [
4556
4583
  "work",
4557
4584
  "administration",
4558
4585
  "ai"
4559
- ], pd = "navNotice", Le = {
4586
+ ], yd = "navNotice", Ue = {
4560
4587
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
4561
4588
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
4562
4589
  // An over-permissive key is harmless — it simply matches nothing.
@@ -4579,53 +4606,53 @@ const dd = [
4579
4606
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
4580
4607
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
4581
4608
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
4582
- }, Ki = "NL", Ui = 15, Fi = 8, Bi = Array.from(
4583
- new Set(Object.values(Le).map((e) => e.callingCode))
4609
+ }, Bi = "NL", ji = 15, Hi = 8, Gi = Array.from(
4610
+ new Set(Object.values(Ue).map((e) => e.callingCode))
4584
4611
  ).sort((e, t) => t.length - e.length);
4585
- function gt(e) {
4612
+ function bt(e) {
4586
4613
  if (e)
4587
- return Le[e.trim().toUpperCase()];
4614
+ return Ue[e.trim().toUpperCase()];
4588
4615
  }
4589
4616
  function ee(e, t) {
4590
4617
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
4591
4618
  }
4592
- function yt(e) {
4593
- if (e.length > Ui) return null;
4594
- for (const t of Bi) {
4619
+ function _t(e) {
4620
+ if (e.length > ji) return null;
4621
+ for (const t of Gi) {
4595
4622
  if (!e.startsWith(t)) continue;
4596
4623
  const n = e.slice(t.length);
4597
- for (const r of Object.values(Le)) {
4624
+ for (const r of Object.values(Ue)) {
4598
4625
  if (r.callingCode !== t) continue;
4599
4626
  const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
4600
4627
  if (ee(i, r)) return `+${t}${i}`;
4601
4628
  }
4602
4629
  return null;
4603
4630
  }
4604
- return e.length < Fi ? null : `+${e}`;
4631
+ return e.length < Hi ? null : `+${e}`;
4605
4632
  }
4606
- function ji(e) {
4633
+ function Wi(e) {
4607
4634
  let t = e.trim();
4608
4635
  const n = t.match(/^(sips?|tel|whatsapp):/i);
4609
4636
  n && (t = t.slice(n[0].length));
4610
4637
  const r = t.indexOf("@");
4611
4638
  return r >= 0 && (t = t.slice(0, r)), t.trim();
4612
4639
  }
4613
- function fd(e) {
4640
+ function bd(e) {
4614
4641
  if (!e) return !1;
4615
4642
  const t = e.indexOf("@");
4616
4643
  if (t <= 0) return !1;
4617
4644
  const n = e.slice(0, t).trim();
4618
4645
  return !/^[+\d\s().-]+$/.test(n);
4619
4646
  }
4620
- function bt(e, t) {
4647
+ function At(e, t) {
4621
4648
  if (!e) return null;
4622
- const n = ji(e);
4649
+ const n = Wi(e);
4623
4650
  if (!n) return null;
4624
4651
  const r = n.startsWith("+"), o = n.replace(/\D/g, "");
4625
4652
  if (!o) return null;
4626
- if (r) return yt(o);
4627
- if (o.startsWith("00")) return yt(o.slice(2));
4628
- const i = gt(t) ?? gt(Ki);
4653
+ if (r) return _t(o);
4654
+ if (o.startsWith("00")) return _t(o.slice(2));
4655
+ const i = bt(t) ?? bt(Bi);
4629
4656
  if (!i) return null;
4630
4657
  const s = i.trunkPrefix;
4631
4658
  if (s && o.startsWith(s)) {
@@ -4638,22 +4665,22 @@ function bt(e, t) {
4638
4665
  }
4639
4666
  return !s && ee(o, i) ? `+${i.callingCode}${o}` : null;
4640
4667
  }
4641
- function md(e, t = 9) {
4668
+ function _d(e, t = 9) {
4642
4669
  const n = (e ?? "").replace(/\D/g, "");
4643
4670
  return n.length < t ? null : n.slice(-t);
4644
4671
  }
4645
- function on(e) {
4672
+ function an(e) {
4646
4673
  if (!e) return null;
4647
4674
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
4648
4675
  if (n <= 0 || n === t.length - 1) return null;
4649
4676
  const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
4650
4677
  return !r || !o.includes(".") ? null : `${r}@${o}`;
4651
4678
  }
4652
- function hd(e) {
4653
- const t = on(e);
4679
+ function Ad(e) {
4680
+ const t = an(e);
4654
4681
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
4655
4682
  }
4656
- const Hi = /* @__PURE__ */ new Set([
4683
+ const Vi = /* @__PURE__ */ new Set([
4657
4684
  "co.uk",
4658
4685
  "org.uk",
4659
4686
  "gov.uk",
@@ -4663,14 +4690,14 @@ const Hi = /* @__PURE__ */ new Set([
4663
4690
  "com.br",
4664
4691
  "co.za"
4665
4692
  ]);
4666
- function Gi(e) {
4693
+ function zi(e) {
4667
4694
  if (!e) return null;
4668
4695
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
4669
4696
  if (t.length < 2) return null;
4670
4697
  const n = t.slice(-2).join(".");
4671
- return Hi.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
4698
+ return Vi.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
4672
4699
  }
4673
- const Wi = /* @__PURE__ */ new Set([
4700
+ const Xi = /* @__PURE__ */ new Set([
4674
4701
  "gmail.com",
4675
4702
  "googlemail.com",
4676
4703
  "outlook.com",
@@ -4715,34 +4742,34 @@ const Wi = /* @__PURE__ */ new Set([
4715
4742
  "proximus.be",
4716
4743
  "scarlet.be"
4717
4744
  ]);
4718
- function gd(e) {
4719
- const t = Gi(e);
4720
- return t ? Wi.has(t) : !1;
4745
+ function Sd(e) {
4746
+ const t = zi(e);
4747
+ return t ? Xi.has(t) : !1;
4721
4748
  }
4722
- function yd(e) {
4749
+ function Ed(e) {
4723
4750
  if (!e) return !1;
4724
4751
  const t = e.trim().toLowerCase();
4725
4752
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
4726
4753
  }
4727
- function bd(e, t, n) {
4754
+ function Td(e, t, n) {
4728
4755
  if (!e || !t) return null;
4729
4756
  const r = e.trim().toLowerCase();
4730
4757
  if (r === "tel" || r === "sms" || r === "whatsapp") {
4731
- const i = bt(t, n);
4758
+ const i = At(t, n);
4732
4759
  return i ? `tel:${i}` : null;
4733
4760
  }
4734
4761
  if (r === "fax") {
4735
- const i = bt(t, n);
4762
+ const i = At(t, n);
4736
4763
  return i ? `fax:${i}` : null;
4737
4764
  }
4738
4765
  if (r === "mailto" || r === "email") {
4739
- const i = on(t);
4766
+ const i = an(t);
4740
4767
  return i ? `mailto:${i}` : null;
4741
4768
  }
4742
4769
  const o = t.trim().toLowerCase();
4743
4770
  return o ? `${r}:${o}` : null;
4744
4771
  }
4745
- const Vi = [
4772
+ const Yi = [
4746
4773
  /<blockquote/i,
4747
4774
  /class="?gmail_quote/i,
4748
4775
  // Gmail quote container
@@ -4755,72 +4782,72 @@ const Vi = [
4755
4782
  // Outlook underscore separator before "From:"
4756
4783
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
4757
4784
  // Gmail "On <date> <name> wrote:"
4758
- ], _t = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, zi = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
4759
- function Xi(e) {
4785
+ ], St = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, qi = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
4786
+ function Qi(e) {
4760
4787
  const t = e.split(`
4761
4788
  `);
4762
4789
  for (let n = 0; n < t.length; n++)
4763
- if (zi.test(t[n]) || _t.test(t[n]) && t.slice(n + 1, n + 4).some((r) => _t.test(r)))
4790
+ if (qi.test(t[n]) || St.test(t[n]) && t.slice(n + 1, n + 4).some((r) => St.test(r)))
4764
4791
  return t.slice(0, n).join(`
4765
4792
  `).trim();
4766
4793
  return e;
4767
4794
  }
4768
- const Yi = /^(?:https?:|mailto:|tel:)/i, qi = /^(?:https?:|cid:|data:image\/)/i;
4769
- function fe(e, t) {
4795
+ const Zi = /^(?:https?:|mailto:|tel:)/i, Ji = /^(?:https?:|cid:|data:image\/)/i;
4796
+ function he(e, t) {
4770
4797
  const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
4771
4798
  return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
4772
4799
  }
4773
- const Qi = /(!\[[^\]]*\]\([^)]*\))/;
4774
- function At(e) {
4775
- return e.replace(/\s+/g, " ").trim().split(Qi).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
4800
+ const es = /(!\[[^\]]*\]\([^)]*\))/;
4801
+ function Et(e) {
4802
+ return e.replace(/\s+/g, " ").trim().split(es).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
4776
4803
  }
4777
- function me(e) {
4804
+ function ge(e) {
4778
4805
  return e.replace(
4779
4806
  /[()\s<>"]/g,
4780
4807
  (t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
4781
4808
  );
4782
4809
  }
4783
- function Zi(e) {
4810
+ function ts(e) {
4784
4811
  return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
4785
- const o = fe(r, "src");
4786
- return qi.test(o) ? `![${At(fe(r, "alt"))}](${me(o)})` : "";
4812
+ const o = he(r, "src");
4813
+ return Ji.test(o) ? `![${Et(he(r, "alt"))}](${ge(o)})` : "";
4787
4814
  }).replace(
4788
4815
  /<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
4789
4816
  (n, r, o) => {
4790
- const i = At(o.replace(/<[^>]*>/g, "")), s = fe(r, "href");
4791
- return Yi.test(s) ? `[${i || me(s)}](${me(s)})` : i;
4817
+ const i = Et(o.replace(/<[^>]*>/g, "")), s = he(r, "href");
4818
+ return Zi.test(s) ? `[${i || ge(s)}](${ge(s)})` : i;
4792
4819
  }
4793
4820
  );
4794
4821
  }
4795
- const Ji = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, es = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, ts = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
4796
- function ns(e, t) {
4822
+ const ns = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, rs = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, os = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
4823
+ function is(e, t) {
4797
4824
  return /<table\b/i.test(e) || e.includes(`
4798
4825
 
4799
4826
  |`) || t.includes("![") || t.length > 200;
4800
4827
  }
4801
- const rs = 40, os = { left: "---", center: ":---:", right: "---:" };
4802
- function is(e) {
4828
+ const ss = 40, as = { left: "---", center: ":---:", right: "---:" };
4829
+ function cs(e) {
4803
4830
  const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
4804
4831
  return t ? t[1].toLowerCase() : "left";
4805
4832
  }
4806
- function ss(e) {
4833
+ function ls(e) {
4807
4834
  return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
4808
4835
  }
4809
- function as(e) {
4836
+ function us(e) {
4810
4837
  const t = [];
4811
- for (const s of e.matchAll(es)) {
4838
+ for (const s of e.matchAll(rs)) {
4812
4839
  const a = [];
4813
- for (const u of s[1].matchAll(ts)) {
4814
- const l = ss(u[3]);
4815
- if (ns(u[3], l)) return null;
4816
- a.push({ text: l, align: is(u[2]) });
4840
+ for (const u of s[1].matchAll(os)) {
4841
+ const l = ls(u[3]);
4842
+ if (is(u[3], l)) return null;
4843
+ a.push({ text: l, align: cs(u[2]) });
4817
4844
  }
4818
4845
  if (a.length === 0) return null;
4819
4846
  a.some((u) => u.text !== "") && t.push(a);
4820
4847
  }
4821
4848
  const n = t[0]?.length ?? 0;
4822
4849
  if (t.length < 2 || n < 2 || t.some((s) => s.length !== n)) return null;
4823
- const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => os[s.align]).join(" | "), i = t.slice(1).map(r).join(`
4850
+ const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => as[s.align]).join(" | "), i = t.slice(1).map(r).join(`
4824
4851
  `);
4825
4852
  return `
4826
4853
 
@@ -4830,36 +4857,36 @@ ${i}
4830
4857
 
4831
4858
  `;
4832
4859
  }
4833
- function cs(e) {
4860
+ function ds(e) {
4834
4861
  return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
4835
4862
  `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
4836
4863
  }
4837
- function ls(e) {
4864
+ function ps(e) {
4838
4865
  let t = e;
4839
- for (let n = 0; n < rs; n++) {
4840
- const r = Ji.exec(t);
4866
+ for (let n = 0; n < ss; n++) {
4867
+ const r = ns.exec(t);
4841
4868
  if (!r || r.index === void 0) break;
4842
- const i = as(r[1]) ?? `
4869
+ const i = us(r[1]) ?? `
4843
4870
 
4844
- ${cs(r[1])}
4871
+ ${ds(r[1])}
4845
4872
 
4846
4873
  `;
4847
4874
  t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
4848
4875
  }
4849
4876
  return t;
4850
4877
  }
4851
- function St(e, t) {
4878
+ function Tt(e, t) {
4852
4879
  let n = e;
4853
4880
  return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
4854
- `), t && (n = ls(Zi(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
4881
+ `), t && (n = ps(ts(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
4855
4882
 
4856
4883
  `), n = n.replace(/<\/(div|li|tr)>/gi, `
4857
4884
  `), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
4858
4885
  }
4859
- function Et(e) {
4886
+ function It(e) {
4860
4887
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
4861
4888
  }
4862
- const us = {
4889
+ const fs = {
4863
4890
  euro: "€",
4864
4891
  pound: "£",
4865
4892
  yen: "¥",
@@ -4881,525 +4908,530 @@ const us = {
4881
4908
  rdquo: "”",
4882
4909
  apos: "'"
4883
4910
  };
4884
- function Tt(e) {
4885
- return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => us[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => Et(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => Et(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
4911
+ function kt(e) {
4912
+ return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => fs[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => It(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => It(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
4886
4913
  }
4887
- function It(e) {
4914
+ function wt(e) {
4888
4915
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
4889
4916
  `).replace(/\n{3,}/g, `
4890
4917
 
4891
4918
  `).trim();
4892
4919
  }
4893
- const ds = /<\s*(html|body|div|p|table|br|span)\b/i;
4894
- function _d(e) {
4895
- return ds.test(e);
4920
+ const ms = /<\s*(html|body|div|p|table|br|span)\b/i;
4921
+ function Id(e) {
4922
+ return ms.test(e);
4896
4923
  }
4897
- function Ad(e) {
4898
- return sn(e, !1);
4924
+ function kd(e) {
4925
+ return cn(e, !1);
4899
4926
  }
4900
- function Sd(e) {
4901
- return sn(e, !0);
4927
+ function wd(e) {
4928
+ return cn(e, !0);
4902
4929
  }
4903
- function sn(e, t) {
4930
+ function cn(e, t) {
4904
4931
  if (typeof e != "string" || !e) return "";
4905
4932
  let n = e.length;
4906
- for (const s of Vi) {
4933
+ for (const s of Yi) {
4907
4934
  const a = e.search(s);
4908
4935
  a >= 0 && a < n && (n = a);
4909
4936
  }
4910
4937
  const r = e.slice(0, n);
4911
- let o = It(Tt(St(r, t)));
4912
- return o || (o = It(Tt(St(e, t)))), Xi(o) || o;
4938
+ let o = wt(kt(Tt(r, t)));
4939
+ return o || (o = wt(kt(Tt(e, t)))), Qi(o) || o;
4913
4940
  }
4914
4941
  export {
4915
- ea as ACTIVE_ASSIGNMENT_STATUSES,
4942
+ ra as ACTIVE_ASSIGNMENT_STATUSES,
4916
4943
  R as ACTIVITY_CATALOG,
4917
- si as AI_ATTACHMENT_LIMITS,
4918
- ou as AI_ATTACHMENT_MAX_PER_TURN,
4919
- ru as AI_ATTACHMENT_TURN_BUDGET,
4920
- vt as AI_VENDORS,
4921
- Mn as ALLOWED_LINK_SCHEMES,
4922
- Hu as APP_PERMISSIONS,
4923
- We as ARTIFACT_MAX_BLOCKS,
4924
- zs as ARTIFACT_MAX_BODY_BYTES,
4944
+ li as AI_ATTACHMENT_LIMITS,
4945
+ lu as AI_ATTACHMENT_MAX_PER_TURN,
4946
+ cu as AI_ATTACHMENT_TURN_BUDGET,
4947
+ Ct as AI_VENDORS,
4948
+ On as ALLOWED_LINK_SCHEMES,
4949
+ Xu as APP_PERMISSIONS,
4950
+ Xe as ARTIFACT_MAX_BLOCKS,
4951
+ qs as ARTIFACT_MAX_BODY_BYTES,
4925
4952
  Z as ARTIFACT_MAX_CELL_LEN,
4926
- Ye as ARTIFACT_MAX_KPI_ITEMS,
4927
- Ve as ARTIFACT_MAX_LIST_ITEMS,
4928
- Xe as ARTIFACT_MAX_TABLE_COLUMNS,
4929
- ze as ARTIFACT_MAX_TABLE_ROWS,
4930
- Ct as ARTIFACT_MAX_TEXT_LEN,
4931
- Kn as ASSIGNMENT_SCOPE_KIND,
4932
- lu as ASSIST_BANDS,
4933
- cu as ASSIST_SOURCE_PROVIDER_GROUP,
4934
- cr as ATTENTION_STATUSES,
4935
- Mo as AT_RISK_GAP,
4936
- nn as AUTH_APP_NAME,
4937
- co as AUTO_READY_MIN_PROPOSALS,
4938
- lo as AUTO_READY_RATE,
4939
- yn as ActivityTypeRegistry,
4940
- Cs as BUILT_IN_ONLY,
4941
- lr as BULK_PENALTY,
4942
- aa as BUSINESS_ENTITY_LIST_SERVICE,
4943
- Ci as CADENCE_FLOOR_MS,
4944
- xi as CADENCE_MIN_NEW_SEGMENTS,
4945
- Oi as CADENCE_MIN_NOVELTY,
4946
- Mi as CADENCE_WINDOW_MS,
4947
- Tc as CLASSIFY_VARS,
4948
- Cu as CONNECTOR_PROVIDER_GROUP,
4949
- xu as CONTEXT_COLLECT_SERVICE,
4950
- Bs as CORE_DIMENSIONS,
4951
- pi as CommunicationScheme,
4952
- Jn as DAY_MS,
4953
- ko as DEFAULT_CHECK_IN_DAYS,
4954
- Br as DEFAULT_FORECAST_WEEKS,
4955
- za as DEFAULT_MEMORY_BUDGET,
4956
- kl as DEFAULT_NUMBER_PADDING,
4957
- Ki as DEFAULT_PHONE_REGION,
4958
- Sl as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
4959
- Al as DEFAULT_TEMPLATE_CONDITIONS,
4960
- oc as DEMAND_SOURCE_PROVIDER_GROUP,
4961
- Pu as DOCUMENT_APPLY_SERVICE,
4962
- $u as DOCUMENT_DESCRIBE_SERVICE,
4963
- Lu as DOCUMENT_INSPECT_SERVICE,
4964
- We as DOCUMENT_MAX_BLOCKS,
4965
- zs as DOCUMENT_MAX_BODY_BYTES,
4953
+ Ze as ARTIFACT_MAX_KPI_ITEMS,
4954
+ Ye as ARTIFACT_MAX_LIST_ITEMS,
4955
+ Qe as ARTIFACT_MAX_TABLE_COLUMNS,
4956
+ qe as ARTIFACT_MAX_TABLE_ROWS,
4957
+ xt as ARTIFACT_MAX_TEXT_LEN,
4958
+ Fn as ASSIGNMENT_SCOPE_KIND,
4959
+ mu as ASSIST_BANDS,
4960
+ fu as ASSIST_SOURCE_PROVIDER_GROUP,
4961
+ ur as ATTENTION_STATUSES,
4962
+ xo as AT_RISK_GAP,
4963
+ on as AUTH_APP_NAME,
4964
+ po as AUTO_READY_MIN_PROPOSALS,
4965
+ fo as AUTO_READY_RATE,
4966
+ _n as ActivityTypeRegistry,
4967
+ Ns as BUILT_IN_ONLY,
4968
+ dr as BULK_PENALTY,
4969
+ ua as BUSINESS_ENTITY_LIST_SERVICE,
4970
+ Ni as CADENCE_FLOOR_MS,
4971
+ Ri as CADENCE_MIN_NEW_SEGMENTS,
4972
+ Di as CADENCE_MIN_NOVELTY,
4973
+ xi as CADENCE_WINDOW_MS,
4974
+ vc as CLASSIFY_VARS,
4975
+ Du as CONNECTOR_PROVIDER_GROUP,
4976
+ $u as CONTEXT_COLLECT_SERVICE,
4977
+ Gs as CORE_DIMENSIONS,
4978
+ hi as CommunicationScheme,
4979
+ tr as DAY_MS,
4980
+ Mo as DEFAULT_CHECK_IN_DAYS,
4981
+ Hr as DEFAULT_FORECAST_WEEKS,
4982
+ qa as DEFAULT_MEMORY_BUDGET,
4983
+ Ol as DEFAULT_NUMBER_PADDING,
4984
+ Bi as DEFAULT_PHONE_REGION,
4985
+ wl as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
4986
+ kl as DEFAULT_TEMPLATE_CONDITIONS,
4987
+ ac as DEMAND_SOURCE_PROVIDER_GROUP,
4988
+ ju as DOCUMENT_APPLY_SERVICE,
4989
+ Fu as DOCUMENT_DESCRIBE_SERVICE,
4990
+ Bu as DOCUMENT_INSPECT_SERVICE,
4991
+ Xe as DOCUMENT_MAX_BLOCKS,
4992
+ qs as DOCUMENT_MAX_BODY_BYTES,
4966
4993
  Z as DOCUMENT_MAX_CELL_LEN,
4967
- Ye as DOCUMENT_MAX_KPI_ITEMS,
4968
- qe as DOCUMENT_MAX_LETTERHEAD_FIELDS,
4969
- Ve as DOCUMENT_MAX_LIST_ITEMS,
4970
- wn as DOCUMENT_MAX_RECIPIENT_LINES,
4971
- Xe as DOCUMENT_MAX_TABLE_COLUMNS,
4972
- ze as DOCUMENT_MAX_TABLE_ROWS,
4973
- Ct as DOCUMENT_MAX_TEXT_LEN,
4974
- Qe as DOCUMENT_MAX_TOTALS_ROWS,
4975
- Jt as DOCUMENT_OPERATIONS,
4976
- Uo as DUTCH_SLOT_LABELS,
4977
- kc as EMPTY_WORKFLOW,
4978
- Po as ENABLED_TRANSACTION_KINDS,
4979
- ku as FEATURE_FOLDER_MANAGEMENT,
4980
- vu as FEATURE_MESSAGE_REACTIONS,
4981
- wu as FEATURE_REMOTE_SEARCH,
4982
- xe as FIXED_KINDS,
4983
- oe as FIXED_LEVELS,
4984
- De as FIXED_TYPES,
4985
- fa as FIXED_UNITS,
4986
- dr as FOLLOW_UP_HOURS,
4987
- gl as FROZEN_WRITABLE_FIELDS,
4988
- Zn as HOUR_MS,
4989
- ds as HTML_BODY_RE,
4994
+ Ze as DOCUMENT_MAX_KPI_ITEMS,
4995
+ Je as DOCUMENT_MAX_LETTERHEAD_FIELDS,
4996
+ Ye as DOCUMENT_MAX_LIST_ITEMS,
4997
+ Mn as DOCUMENT_MAX_RECIPIENT_LINES,
4998
+ Qe as DOCUMENT_MAX_TABLE_COLUMNS,
4999
+ qe as DOCUMENT_MAX_TABLE_ROWS,
5000
+ xt as DOCUMENT_MAX_TEXT_LEN,
5001
+ et as DOCUMENT_MAX_TOTALS_ROWS,
5002
+ tn as DOCUMENT_OPERATIONS,
5003
+ jo as DUTCH_SLOT_LABELS,
5004
+ Cc as EMPTY_WORKFLOW,
5005
+ Fo as ENABLED_TRANSACTION_KINDS,
5006
+ Ou as FEATURE_FOLDER_MANAGEMENT,
5007
+ Nu as FEATURE_MESSAGE_REACTIONS,
5008
+ xu as FEATURE_REMOTE_SEARCH,
5009
+ Re as FIXED_KINDS,
5010
+ ie as FIXED_LEVELS,
5011
+ Pe as FIXED_TYPES,
5012
+ ga as FIXED_UNITS,
5013
+ fr as FOLLOW_UP_HOURS,
5014
+ Sl as FROZEN_WRITABLE_FIELDS,
5015
+ er as HOUR_MS,
5016
+ ms as HTML_BODY_RE,
4990
5017
  L as INELIGIBLE,
4991
- Uu as INSTALLATION_HEADER,
4992
- ro as INTERACTION_KIND,
4993
- Tu as InteractionParticipantRole,
4994
- _r as KB_FALLBACK_LOCALE,
4995
- et as KB_LOCALES,
4996
- et as LOCALES,
4997
- $e as LOOSE_STATUSES,
4998
- or as MAIL_HINT_HEADERS,
4999
- hs as MAX_ACTIONS,
5000
- Un as MAX_ASSIGNMENT_TURNS,
5001
- ps as MAX_BLOCKS,
5002
- Pt as MAX_COLLECTION_DEPTH,
5003
- id as MAX_EDITABLE_FILE_BYTES,
5004
- fs as MAX_FIELDS,
5005
- ms as MAX_LIST_ITEMS,
5006
- Ha as MAX_MEMORY_BROWSE,
5007
- Va as MAX_MEMORY_BUDGET,
5008
- Ga as MAX_MEMORY_CHARS,
5009
- Pi as MAX_SHOWN_KEYS,
5010
- Ro as MAX_TOPIC_CANDIDATES,
5011
- No as MAX_TOPIC_EXAMPLES,
5012
- pe as MAX_TOPIC_EXAMPLE_CHARS,
5013
- sd as MAX_VIEWABLE_FILE_BYTES,
5014
- Wa as MIN_MEMORY_BUDGET,
5015
- pd as NAV_NOTICE_SLOT,
5016
- Nl as NL_PAYMENT_TERMS,
5017
- Ya as NL_TAX_RATES,
5018
- Bu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
5019
- Co as OFF_TRACK_GAP,
5020
- Qa as ONBOARDING_SOURCE_PROVIDER_GROUP,
5021
- Te as PAUSE_SNOOZED,
5022
- Ie as PAUSE_WAITING_FOR_CUSTOMER,
5023
- Ml as PAYMENT_TERM_METHODS,
5024
- Le as PHONE_REGIONS,
5025
- en as PRESENCE_ONLINE_WINDOW_MS,
5026
- _i as PRESENCE_SURVIVES_OFFLINE,
5027
- Vo as PRODUCT_SCOPE_KIND,
5028
- Ja as PROFILE_TOOL_DISPOSITIONS,
5029
- Eu as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
5030
- Su as PROVIDER_FEATURE_MESSAGE_WINDOW,
5031
- Wi as PUBLIC_EMAIL_DOMAINS,
5032
- tt as READ_STEP_TYPES,
5033
- Er as RELATED_SUBJECT_KINDS,
5034
- Zt as RESERVED_STATUS_KEYS,
5035
- Kl as RESERVED_TYPE_KEYS,
5036
- Qu as RESOURCE_ATTACHED_SERVICE,
5037
- Xu as RESOURCE_DESCRIBE_SERVICE,
5038
- qu as RESOURCE_RESOLVE_SERVICE,
5039
- Yu as RESOURCE_SEARCH_SERVICE,
5040
- zr as SCHEDULE_ENTRY_SCOPE_KIND,
5041
- ed as SCOPE_READ_ROUTE,
5042
- Ju as SCOPE_RELATED_ROUTE,
5043
- dd as SETTINGS_CATEGORIES,
5044
- ma as SIGNATURE_INTENTS,
5045
- ur as SLA_HOURS_BY_PRIORITY,
5046
- Pc as SLA_METRICS,
5047
- Kc as SLA_PAUSE_REASONS,
5048
- so as STEP_MAX_TOKENS_MAX,
5049
- io as STEP_MAX_TOKENS_MIN,
5050
- To as STRATEGY_ITEM_SCOPE_KIND,
5051
- rr as SUMMARY_MIN_LAST_CHARS,
5052
- nr as SUMMARY_MIN_MESSAGES,
5053
- cd as SYNC_RUN_MAX_ERRORS,
5054
- ad as SYNC_TARGET_PROVIDER_GROUP,
5055
- Pn as TERMINAL_ASSIGNMENT_STATUSES,
5056
- uo as TERMINAL_RUN_STATUSES,
5057
- Re as TRANSACTION_KINDS,
5058
- Wo as TRANSACTION_SCOPE_KINDS,
5059
- Ec as TRIGGER_VARS,
5060
- kr as UNKNOWN_KIND,
5061
- Io as UNKNOWN_LEVEL_ORDER,
5062
- Mu as UNSUPPORTED,
5063
- Tn as USAGE_DIMENSIONS,
5064
- In as USAGE_DIMENSION_IDS,
5065
- Xr as WORKSTREAM_SCOPE_KIND,
5066
- Qo as WORK_ACTIVITY_SCOPE_KIND,
5067
- Za as WORK_AREAS,
5068
- Dl as WORK_COMMENT_ADDED,
5069
- Hl as WORK_CYCLE_SYNC_KIND,
5070
- $l as WORK_ITEM_ASSIGNED,
5071
- Yo as WORK_ITEM_SCOPE_KIND,
5072
- Ll as WORK_ITEM_STATUS_CHANGED,
5073
- qo as WORK_PROJECT_SCOPE_KIND,
5018
+ Gu as INSTALLATION_HEADER,
5019
+ so as INTERACTION_KIND,
5020
+ Mu as InteractionParticipantRole,
5021
+ Sr as KB_FALLBACK_LOCALE,
5022
+ rt as KB_LOCALES,
5023
+ rt as LOCALES,
5024
+ Ke as LOOSE_STATUSES,
5025
+ sr as MAIL_HINT_HEADERS,
5026
+ bs as MAX_ACTIONS,
5027
+ Bn as MAX_ASSIGNMENT_TURNS,
5028
+ hs as MAX_BLOCKS,
5029
+ Ut as MAX_COLLECTION_DEPTH,
5030
+ ud as MAX_EDITABLE_FILE_BYTES,
5031
+ gs as MAX_FIELDS,
5032
+ ys as MAX_LIST_ITEMS,
5033
+ Va as MAX_MEMORY_BROWSE,
5034
+ Ya as MAX_MEMORY_BUDGET,
5035
+ za as MAX_MEMORY_CHARS,
5036
+ Fi as MAX_SHOWN_KEYS,
5037
+ Lo as MAX_TOPIC_CANDIDATES,
5038
+ $o as MAX_TOPIC_EXAMPLES,
5039
+ me as MAX_TOPIC_EXAMPLE_CHARS,
5040
+ dd as MAX_VIEWABLE_FILE_BYTES,
5041
+ Xa as MIN_MEMORY_BUDGET,
5042
+ yd as NAV_NOTICE_SLOT,
5043
+ Pl as NL_PAYMENT_TERMS,
5044
+ Za as NL_TAX_RATES,
5045
+ Vu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
5046
+ No as OFF_TRACK_GAP,
5047
+ ec as ONBOARDING_SOURCE_PROVIDER_GROUP,
5048
+ ve as PAUSE_HOLD,
5049
+ ke as PAUSE_SNOOZED,
5050
+ we as PAUSE_WAITING_FOR_CUSTOMER,
5051
+ Rl as PAYMENT_TERM_METHODS,
5052
+ Ue as PHONE_REGIONS,
5053
+ nn as PRESENCE_ONLINE_WINDOW_MS,
5054
+ Ei as PRESENCE_SURVIVES_OFFLINE,
5055
+ Yo as PRODUCT_SCOPE_KIND,
5056
+ nc as PROFILE_TOOL_DISPOSITIONS,
5057
+ vu as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
5058
+ wu as PROVIDER_FEATURE_MESSAGE_WINDOW,
5059
+ Xi as PUBLIC_EMAIL_DOMAINS,
5060
+ ot as READ_STEP_TYPES,
5061
+ Ir as RELATED_SUBJECT_KINDS,
5062
+ en as RESERVED_STATUS_KEYS,
5063
+ Hl as RESERVED_TYPE_KEYS,
5064
+ nd as RESOURCE_ATTACHED_SERVICE,
5065
+ Ju as RESOURCE_DESCRIBE_SERVICE,
5066
+ td as RESOURCE_RESOLVE_SERVICE,
5067
+ ed as RESOURCE_SEARCH_SERVICE,
5068
+ Yr as SCHEDULE_ENTRY_SCOPE_KIND,
5069
+ id as SCOPE_READ_ROUTE,
5070
+ od as SCOPE_RELATED_ROUTE,
5071
+ gd as SETTINGS_CATEGORIES,
5072
+ ya as SIGNATURE_INTENTS,
5073
+ pr as SLA_HOURS_BY_PRIORITY,
5074
+ Bc as SLA_METRICS,
5075
+ jc as SLA_PAUSE_REASONS,
5076
+ lo as STEP_MAX_TOKENS_MAX,
5077
+ co as STEP_MAX_TOKENS_MIN,
5078
+ wo as STRATEGY_ITEM_SCOPE_KIND,
5079
+ ir as SUMMARY_MIN_LAST_CHARS,
5080
+ or as SUMMARY_MIN_MESSAGES,
5081
+ fd as SYNC_RUN_MAX_ERRORS,
5082
+ pd as SYNC_TARGET_PROVIDER_GROUP,
5083
+ Un as TERMINAL_ASSIGNMENT_STATUSES,
5084
+ mo as TERMINAL_RUN_STATUSES,
5085
+ Le as TRANSACTION_KINDS,
5086
+ Xo as TRANSACTION_SCOPE_KINDS,
5087
+ wc as TRIGGER_VARS,
5088
+ vr as UNKNOWN_KIND,
5089
+ vo as UNKNOWN_LEVEL_ORDER,
5090
+ Ru as UNSUPPORTED,
5091
+ kn as USAGE_DIMENSIONS,
5092
+ wn as USAGE_DIMENSION_IDS,
5093
+ qr as WORKSTREAM_SCOPE_KIND,
5094
+ ei as WORK_ACTIVITY_SCOPE_KIND,
5095
+ tc as WORK_AREAS,
5096
+ Ul as WORK_COMMENT_ADDED,
5097
+ Xl as WORK_CYCLE_SYNC_KIND,
5098
+ Fl as WORK_ITEM_ASSIGNED,
5099
+ Zo as WORK_ITEM_SCOPE_KIND,
5100
+ Bl as WORK_ITEM_STATUS_CHANGED,
5101
+ Jo as WORK_PROJECT_SCOPE_KIND,
5074
5102
  te as W_PRIORITY,
5075
- pl as acceptExampleCandidate,
5076
- Zr as actingIdentityKey,
5077
- ul as activeWorkTypes,
5078
- ys as activityIconOf,
5079
- vs as activityJoinUrl,
5080
- fn as activitySnippet,
5081
- mn as activityTextParams,
5082
- ws as activityTimelineText,
5083
- bn as activityTimestamp,
5103
+ yl as acceptExampleCandidate,
5104
+ eo as actingIdentityKey,
5105
+ hl as activeWorkTypes,
5106
+ As as activityIconOf,
5107
+ Os as activityJoinUrl,
5108
+ hn as activitySnippet,
5109
+ gn as activityTextParams,
5110
+ Cs as activityTimelineText,
5111
+ An as activityTimestamp,
5084
5112
  k as activityTypeInfo,
5085
- gc as actorKey,
5086
- dl as addExampleCandidate,
5087
- Oe as addWorkingMs,
5088
- Wu as agePresenceEntry,
5089
- ii as aiAttachmentKind,
5090
- iu as aiAttachmentRejection,
5091
- Ge as aiBudgetLimit,
5092
- Us as aiBudgetPeriodKey,
5093
- _n as aiBudgetPeriodStart,
5094
- Ks as aiBudgetState,
5095
- Ps as aiVendorAcceptsAttachment,
5096
- Ds as aiVendorDefaultModel,
5097
- Rs as aiVendorLabel,
5098
- Ls as aiVendorNeedsBaseUrl,
5099
- $s as aiVendorsWith,
5100
- jn as allocate,
5101
- rn as appNameFromPath,
5102
- il as applyRounding,
5103
- ha as applySignature,
5104
- ao as approvalRate,
5105
- Ys as artifactBodyBytes,
5106
- qs as artifactOutline,
5107
- Ln as artifactToMarkdown,
5108
- Ac as assignmentMismatch,
5109
- na as assignmentScopeKey,
5110
- ia as assignmentSubject,
5111
- rc as availabilityByPerson,
5112
- ec as belongsOnCalendar,
5113
- ca as belongsToEntity,
5114
- Ms as buildActivityPreview,
5115
- gu as buildChannelIntents,
5116
- Qs as buildShareKeys,
5117
- Li as buildWindow,
5118
- Qn as businessEntitySender,
5119
- vr as calendarDaysBetween,
5120
- Ne as calendarOf,
5121
- Pa as canNestUnder,
5122
- Vc as canParent,
5123
- tc as capacityTotal,
5124
- pc as capacityWeights,
5125
- Es as carriesText,
5126
- Ua as categoryLabel,
5127
- ei as categoryOf,
5128
- Au as channelKindForScheme,
5129
- bs as channelKindOf,
5130
- nl as checkInOverdueMs,
5131
- Ic as clampStepMaxTokens,
5132
- ka as classifyMail,
5133
- Sd as cleanMessageMarkdown,
5134
- Ad as cleanMessageText,
5135
- la as codeQuery,
5136
- du as compareAssistRank,
5137
- Oo as compareWorkTypes,
5138
- qn as conditionHolds,
5139
- Ko as copyFrom,
5113
+ _c as actorKey,
5114
+ gl as addExampleCandidate,
5115
+ De as addWorkingMs,
5116
+ qu as agePresenceEntry,
5117
+ ci as aiAttachmentKind,
5118
+ uu as aiAttachmentRejection,
5119
+ ze as aiBudgetLimit,
5120
+ js as aiBudgetPeriodKey,
5121
+ Sn as aiBudgetPeriodStart,
5122
+ Bs as aiBudgetState,
5123
+ Fs as aiVendorAcceptsAttachment,
5124
+ Ps as aiVendorDefaultModel,
5125
+ Ls as aiVendorLabel,
5126
+ Us as aiVendorNeedsBaseUrl,
5127
+ Ks as aiVendorsWith,
5128
+ Gn as allocate,
5129
+ sn as appNameFromPath,
5130
+ ul as applyRounding,
5131
+ ba as applySignature,
5132
+ uo as approvalRate,
5133
+ Zs as artifactBodyBytes,
5134
+ Js as artifactOutline,
5135
+ Kn as artifactToMarkdown,
5136
+ Tc as assignmentMismatch,
5137
+ ia as assignmentScopeKey,
5138
+ ca as assignmentSubject,
5139
+ sc as availabilityByPerson,
5140
+ rc as belongsOnCalendar,
5141
+ da as belongsToEntity,
5142
+ xs as buildActivityPreview,
5143
+ Su as buildChannelIntents,
5144
+ ea as buildShareKeys,
5145
+ Ui as buildWindow,
5146
+ Jn as businessEntitySender,
5147
+ Cr as calendarDaysBetween,
5148
+ $e as calendarOf,
5149
+ Fa as canNestUnder,
5150
+ Qc as canParent,
5151
+ oc as capacityTotal,
5152
+ hc as capacityWeights,
5153
+ ks as carriesText,
5154
+ ja as categoryLabel,
5155
+ ri as categoryOf,
5156
+ ku as channelKindForScheme,
5157
+ Ss as channelKindOf,
5158
+ al as checkInOverdueMs,
5159
+ Mc as clampStepMaxTokens,
5160
+ Ma as classifyMail,
5161
+ wd as cleanMessageMarkdown,
5162
+ kd as cleanMessageText,
5163
+ pa as codeQuery,
5164
+ gu as compareAssistRank,
5165
+ Do as compareWorkTypes,
5166
+ Zn as conditionHolds,
5167
+ Bo as copyFrom,
5140
5168
  z as countsAsPlanned,
5141
- nc as coverageByPerson,
5142
- sc as coverageFor,
5143
- Ut as coversWorkstream,
5144
- vl as currentPeriod,
5145
- Ft as cycleDayIndex,
5146
- tu as cycleOrder,
5147
- nu as cycleState,
5148
- sa as decideAssignmentState,
5149
- ud as decideCadence,
5150
- mu as decideIncomingCall,
5151
- Ar as defaultLocaleOf,
5152
- Ql as defaultStatusKey,
5153
- Ho as defaultTemplateBlocks,
5154
- Iu as defineIntent,
5155
- yr as depthOf,
5156
- Gu as derivePresence,
5157
- Gs as describeClause,
5158
- hu as disabledIntentsFromCapabilities,
5159
- Ys as documentBodyBytes,
5160
- Ku as documentKindOf,
5161
- qs as documentOutline,
5162
- Ln as documentToMarkdown,
5163
- Du as documentToText,
5164
- Fc as dueAtOf,
5165
- Cl as dueDateFrom,
5166
- ol as elapsedSeconds,
5167
- hd as emailDomain,
5168
- bd as endpointKey,
5169
- Or as erlangC,
5170
- Ei as extractParams,
5171
- Di as extractTerms,
5172
- _a as fillDocument,
5173
- Yn as fillText,
5174
- bu as filterByEndpoint,
5175
- yu as filterByIntent,
5176
- di as filterByTargetScheme,
5177
- Hs as filterableDimensions,
5178
- re as findAiVendor,
5179
- Xc as fixedLevelForName,
5180
- Bl as fixedTypeForName,
5181
- jl as fixedTypes,
5182
- Fu as flattenLocales,
5169
+ ic as coverageByPerson,
5170
+ lc as coverageFor,
5171
+ Bt as coversWorkstream,
5172
+ Nl as currentPeriod,
5173
+ jt as cycleDayIndex,
5174
+ su as cycleOrder,
5175
+ au as cycleState,
5176
+ la as decideAssignmentState,
5177
+ hd as decideCadence,
5178
+ _u as decideIncomingCall,
5179
+ Er as defaultLocaleOf,
5180
+ nu as defaultStatusKey,
5181
+ Vo as defaultTemplateBlocks,
5182
+ Cu as defineIntent,
5183
+ _r as depthOf,
5184
+ Yu as derivePresence,
5185
+ zs as describeClause,
5186
+ Au as disabledIntentsFromCapabilities,
5187
+ Zs as documentBodyBytes,
5188
+ Hu as documentKindOf,
5189
+ Js as documentOutline,
5190
+ Kn as documentToMarkdown,
5191
+ Uu as documentToText,
5192
+ Wc as dueAtOf,
5193
+ Dl as dueDateFrom,
5194
+ ll as elapsedSeconds,
5195
+ Ad as emailDomain,
5196
+ Td as endpointKey,
5197
+ Rr as erlangC,
5198
+ ki as extractParams,
5199
+ Pi as extractTerms,
5200
+ Ea as fillDocument,
5201
+ Qn as fillText,
5202
+ Tu as filterByEndpoint,
5203
+ Eu as filterByIntent,
5204
+ mi as filterByTargetScheme,
5205
+ Vs as filterableDimensions,
5206
+ oe as findAiVendor,
5207
+ Jc as fixedLevelForName,
5208
+ Vl as fixedTypeForName,
5209
+ zl as fixedTypes,
5210
+ Wu as flattenLocales,
5183
5211
  W as floorToPeriod,
5184
- lc as forecastIntervals,
5185
- Qr as formatActingIdentity,
5212
+ pc as forecastIntervals,
5213
+ Jr as formatActingIdentity,
5186
5214
  D as formatCents,
5187
- al as formatClock,
5188
- sl as formatHm,
5189
- Wl as formatItemKey,
5215
+ pl as formatClock,
5216
+ dl as formatHm,
5217
+ ql as formatItemKey,
5190
5218
  G as formatPeriod,
5191
- wl as formatSeriesNumber,
5192
- Hc as formatSlaDuration,
5193
- au as freshSources,
5194
- xs as getActivitySeenUserIds,
5195
- ga as getContactEndpoints,
5196
- Na as getShortTitle,
5197
- Oa as getUrgencyScore,
5198
- Dc as hasReacted,
5199
- Yc as healthCategory,
5200
- qc as healthsInCategory,
5201
- Kt as heightOf,
5202
- Da as helpCenterText,
5203
- Sc as humanizeAction,
5204
- oo as interactionIdOf,
5205
- Rl as isAgentUser,
5206
- Ca as isAssigned,
5207
- ta as isAssignmentTerminal,
5208
- to as isAssignmentTrigger,
5209
- Mc as isAutoReady,
5210
- gr as isAwaitingThem,
5211
- Ns as isChatMessageActivity,
5212
- xa as isClosed,
5213
- Is as isConnectedType,
5214
- td as isDeepLink,
5215
- br as isDescendant,
5216
- Sa as isEligible,
5217
- Os as isEmailActivity,
5218
- hl as isFrozen,
5219
- _d as isHtmlBody,
5220
- xc as isInFlight,
5221
- ar as isInteractionUnseen,
5222
- nd as isLandingPath,
5223
- tr as isLikelyBulk,
5224
- kt as isMessageShape,
5225
- _s as isMessageType,
5226
- Ii as isMoreSpecificPattern,
5227
- wt as isNoteShape,
5228
- Eo as isOpenClock,
5229
- su as isOutwardTool,
5230
- fr as isParked,
5231
- po as isPaused,
5232
- Ts as isPlaybookAuthoredType,
5233
- gd as isPublicEmailDomain,
5234
- od as isPublicPath,
5235
- mr as isReminderActive,
5236
- Ss as isReplyableType,
5237
- va as isSlaAtRisk,
5238
- Cc as isTerminal,
5239
- Ta as isThreadLongEnough,
5240
- ks as isTranscriptType,
5241
- Zl as isWorkClosed,
5242
- ll as isWorkTypeVisible,
5243
- Xl as itemDossierKeys,
5219
+ xl as formatSeriesNumber,
5220
+ Xc as formatSlaDuration,
5221
+ pu as freshSources,
5222
+ Rs as getActivitySeenUserIds,
5223
+ _a as getContactEndpoints,
5224
+ $a as getShortTitle,
5225
+ Da as getUrgencyScore,
5226
+ Kc as hasReacted,
5227
+ el as healthCategory,
5228
+ tl as healthsInCategory,
5229
+ Ft as heightOf,
5230
+ Pa as helpCenterText,
5231
+ Ic as humanizeAction,
5232
+ ao as interactionIdOf,
5233
+ Kl as isAgentUser,
5234
+ Na as isAssigned,
5235
+ oa as isAssignmentTerminal,
5236
+ ro as isAssignmentTrigger,
5237
+ Nc as isAutoReady,
5238
+ br as isAwaitingThem,
5239
+ $s as isChatMessageActivity,
5240
+ Ra as isClosed,
5241
+ vs as isConnectedType,
5242
+ sd as isDeepLink,
5243
+ Ar as isDescendant,
5244
+ Ia as isEligible,
5245
+ Ds as isEmailActivity,
5246
+ Al as isFrozen,
5247
+ Gc as isHeldClock,
5248
+ Id as isHtmlBody,
5249
+ Dc as isInFlight,
5250
+ lr as isInteractionUnseen,
5251
+ ad as isLandingPath,
5252
+ rr as isLikelyBulk,
5253
+ vt as isMessageShape,
5254
+ Es as isMessageType,
5255
+ vi as isMoreSpecificPattern,
5256
+ Mt as isNoteShape,
5257
+ ko as isOpenClock,
5258
+ du as isOutwardTool,
5259
+ hr as isParked,
5260
+ ho as isPaused,
5261
+ ws as isPlaybookAuthoredType,
5262
+ Sd as isPublicEmailDomain,
5263
+ ld as isPublicPath,
5264
+ gr as isReminderActive,
5265
+ Is as isReplyableType,
5266
+ Oa as isSlaAtRisk,
5267
+ Rc as isTerminal,
5268
+ wa as isThreadLongEnough,
5269
+ Ms as isTranscriptType,
5270
+ ru as isWorkClosed,
5271
+ ml as isWorkTypeVisible,
5272
+ Jl as itemDossierKeys,
5244
5273
  N as kindFor,
5245
- Jo as ladderFor,
5246
- wo as levelIn,
5247
- we as levelOrder,
5248
- Ir as lineNet,
5249
- Ra as linkLabel,
5250
- ml as listedTransactionKinds,
5251
- Fs as listeningAllowed,
5252
- La as localeInstruction,
5253
- $a as localeName,
5254
- Ka as localesOf,
5255
- fd as looksLikeEmail,
5256
- Nt as lookup,
5257
- da as marginCents,
5258
- Ru as markdownToDocument,
5259
- _u as matchContactToIntents,
5260
- ki as matchPublicRoute,
5261
- Ba as mcpCredentialScope,
5262
- ja as mcpToolPrefix,
5263
- Qc as measureRatio,
5264
- ld as mergeShownKeys,
5265
- pn as messageCountsAs,
5266
- Ws as metricOption,
5267
- Bt as minutesOn,
5268
- yd as needsPhoneRegion,
5269
- As as nestsUnderParent,
5270
- zc as nextLevelBelow,
5271
- Bc as nextSlaClock,
5272
- yl as nextVersion,
5273
- Xs as normalizeArtifactBlocks,
5274
- gs as normalizeBlocks,
5275
- Xs as normalizeDocumentBlocks,
5276
- on as normalizeEmail,
5274
+ ni as ladderFor,
5275
+ Co as levelIn,
5276
+ Ce as levelOrder,
5277
+ wr as lineNet,
5278
+ La as linkLabel,
5279
+ _l as listedTransactionKinds,
5280
+ Hs as listeningAllowed,
5281
+ Ua as localeInstruction,
5282
+ Ka as localeName,
5283
+ Ba as localesOf,
5284
+ bd as looksLikeEmail,
5285
+ Dt as lookup,
5286
+ ma as marginCents,
5287
+ Ku as markdownToDocument,
5288
+ Iu as matchContactToIntents,
5289
+ Mi as matchPublicRoute,
5290
+ Ga as mcpCredentialScope,
5291
+ Wa as mcpToolPrefix,
5292
+ nl as measureRatio,
5293
+ md as mergeShownKeys,
5294
+ mn as messageCountsAs,
5295
+ Xs as metricOption,
5296
+ Ht as minutesOn,
5297
+ Ed as needsPhoneRegion,
5298
+ Ts as nestsUnderParent,
5299
+ Zc as nextLevelBelow,
5300
+ Vc as nextSlaClock,
5301
+ El as nextVersion,
5302
+ Qs as normalizeArtifactBlocks,
5303
+ _s as normalizeBlocks,
5304
+ Qs as normalizeDocumentBlocks,
5305
+ an as normalizeEmail,
5277
5306
  P as normalizeExample,
5278
- Fn as normalizeGtin,
5279
- ju as notificationPrefKey,
5280
- $i as novelty,
5281
- Nu as operationDescriptor,
5282
- Ou as operationsForKind,
5283
- Aa as organizationSender,
5284
- ue as overlapSeconds,
5285
- ic as overlaps,
5286
- Zc as paceRatio,
5287
- Ea as parkMarksById,
5288
- mc as parseActingIdentity,
5289
- ua as parseAmount,
5290
- $c as parseClockMinutes,
5291
- Vl as parseItemKey,
5292
- Si as pathToRegex,
5293
- Ht as patternFor,
5294
- jt as patternStartTime,
5295
- Lc as pauseBitFor,
5296
- js as periodsInRange,
5297
- md as phoneSuffix,
5298
- Ia as pickMailHeaders,
5299
- ba as pickTemplate,
5300
- fc as placeLumps,
5301
- un as plainTextFromMarkdown,
5302
- Uc as planSlaEvent,
5303
- ac as plannedBillable,
5304
- Ur as plannedWorkTypeKey,
5305
- eo as playbookActor,
5306
- vc as procedureOf,
5307
- El as productScopeKey,
5308
- Yl as projectDossierKeys,
5309
- Ti as publicBasePathFor,
5310
- rd as publicRoutePatterns,
5311
- oa as reactionWakesAssignment,
5312
- he as readPath,
5313
- nt as readStepError,
5314
- pr as recencyOf,
5315
- ya as recipientLocale,
5316
- no as refKey,
5317
- Gi as registrableDomain,
5318
- $o as rejectExampleCandidate,
5319
- Xa as relatedByDefault,
5320
- ke as remainingMsOf,
5321
- Dr as requiredAgents,
5322
- Kr as requirementFor,
5323
- li as resolveAccountCapabilities,
5324
- ge as resolveActivityText,
5325
- ci as resolveChannelIntents,
5326
- pa as resolvePrice,
5327
- Vn as resolveSignature,
5328
- Vu as resolveWorkMode,
5329
- Zu as resourceKindOf,
5330
- tl as rollupChildren,
5307
+ jn as normalizeGtin,
5308
+ zu as notificationPrefKey,
5309
+ Ki as novelty,
5310
+ Pu as operationDescriptor,
5311
+ Lu as operationsForKind,
5312
+ Ta as organizationSender,
5313
+ pe as overlapSeconds,
5314
+ cc as overlaps,
5315
+ rl as paceRatio,
5316
+ ka as parkMarksById,
5317
+ yc as parseActingIdentity,
5318
+ fa as parseAmount,
5319
+ Uc as parseClockMinutes,
5320
+ Ql as parseItemKey,
5321
+ Ii as pathToRegex,
5322
+ Wt as patternFor,
5323
+ Gt as patternStartTime,
5324
+ Fc as pauseBitFor,
5325
+ Ws as periodsInRange,
5326
+ _d as phoneSuffix,
5327
+ va as pickMailHeaders,
5328
+ Sa as pickTemplate,
5329
+ gc as placeLumps,
5330
+ pn as plainTextFromMarkdown,
5331
+ Hc as planSlaEvent,
5332
+ uc as plannedBillable,
5333
+ Br as plannedWorkTypeKey,
5334
+ no as playbookActor,
5335
+ xc as procedureOf,
5336
+ vl as productScopeKey,
5337
+ eu as projectDossierKeys,
5338
+ wi as publicBasePathFor,
5339
+ cd as publicRoutePatterns,
5340
+ aa as reactionWakesAssignment,
5341
+ ye as readPath,
5342
+ de as readStepError,
5343
+ mr as recencyOf,
5344
+ Aa as recipientLocale,
5345
+ io as refKey,
5346
+ zi as registrableDomain,
5347
+ Ko as rejectExampleCandidate,
5348
+ Qa as relatedByDefault,
5349
+ Me as remainingMsOf,
5350
+ Lr as requiredAgents,
5351
+ Fr as requirementFor,
5352
+ pi as resolveAccountCapabilities,
5353
+ be as resolveActivityText,
5354
+ di as resolveChannelIntents,
5355
+ ha as resolvePrice,
5356
+ Xn as resolveSignature,
5357
+ Qu as resolveWorkMode,
5358
+ rd as resourceKindOf,
5359
+ sl as rollupChildren,
5331
5360
  V as roundHalfUp,
5332
- hc as runActor,
5333
- Nc as runInteractionId,
5334
- Nn as sanitizeInline,
5335
- vi as sanitizeTranscript,
5336
- uc as scheduleEntryScopeKey,
5337
- Ma as scoreInteraction,
5338
- Pl as scoreWorkItem,
5339
- Fa as selectLenses,
5340
- Nr as serviceLevel,
5341
- fu as sessionsHoldCannotReach,
5342
- pu as sessionsToHold,
5343
- xl as shadowTermsByCode,
5344
- Ot as shareKeyForTeam,
5345
- xt as shareKeyForUser,
5346
- Zs as shareKeysForViewer,
5347
- cc as shortfalls,
5348
- zu as shouldRunAudioPipeline,
5349
- jc as slaBadgeTone,
5350
- wa as slaHoursByInbox,
5351
- hr as slaHoursFor,
5352
- ti as sortStatuses,
5353
- ai as sourceKey,
5354
- qr as spreadOverWeights,
5355
- ql as statusIn,
5356
- wc as stepsOf,
5357
- Wc as strategyAncestorKeysFor,
5358
- Gc as strategyDossierKeys,
5359
- qt as strategyItemScopeKey,
5360
- dn as stripHtml,
5361
- Oc as subjectKeyOf,
5362
- Gt as subjectOf,
5363
- uu as subjectRef,
5364
- zl as suggestProjectKey,
5365
- Jc as suggestedHealth,
5366
- Rc as summarizeReactions,
5367
- _c as targetById,
5368
- bc as targetForActivityType,
5369
- rl as targetOrder,
5370
- Tr as taxRateFor,
5371
- Mr as termsFor,
5372
- Jr as toActingIdentity,
5373
- bt as toE164,
5374
- Ol as toTransactionTerm,
5375
- Js as toolSourceKinds,
5376
- Lo as topicOfferedForTeam,
5377
- fl as topicsForTeam,
5378
- Rr as trafficIntensity,
5379
- bl as transactionContext,
5380
- Il as transactionDossierKeys,
5381
- Tl as transactionIdFromScope,
5361
+ bc as runActor,
5362
+ Lc as runInteractionId,
5363
+ Dn as sanitizeInline,
5364
+ Oi as sanitizeTranscript,
5365
+ fc as scheduleEntryScopeKey,
5366
+ xa as scoreInteraction,
5367
+ jl as scoreWorkItem,
5368
+ Ha as selectLenses,
5369
+ Dr as serviceLevel,
5370
+ bu as sessionsHoldCannotReach,
5371
+ yu as sessionsToHold,
5372
+ $l as shadowTermsByCode,
5373
+ Rt as shareKeyForTeam,
5374
+ Nt as shareKeyForUser,
5375
+ ta as shareKeysForViewer,
5376
+ dc as shortfalls,
5377
+ Zu as shouldRunAudioPipeline,
5378
+ zc as slaBadgeTone,
5379
+ Ca as slaHoursByInbox,
5380
+ yr as slaHoursFor,
5381
+ oi as sortStatuses,
5382
+ ui as sourceKey,
5383
+ Zr as spreadOverWeights,
5384
+ tu as statusIn,
5385
+ Oc as stepsOf,
5386
+ qc as strategyAncestorKeysFor,
5387
+ Yc as strategyDossierKeys,
5388
+ Zt as strategyItemScopeKey,
5389
+ fn as stripHtml,
5390
+ $c as subjectKeyOf,
5391
+ Vt as subjectOf,
5392
+ hu as subjectRef,
5393
+ Zl as suggestProjectKey,
5394
+ ol as suggestedHealth,
5395
+ Pc as summarizeReactions,
5396
+ Ec as targetById,
5397
+ Sc as targetForActivityType,
5398
+ cl as targetOrder,
5399
+ kr as taxRateFor,
5400
+ Or as termsFor,
5401
+ to as toActingIdentity,
5402
+ At as toE164,
5403
+ Ll as toTransactionTerm,
5404
+ oo as toolBareName,
5405
+ kc as toolDisplayName,
5406
+ ne as toolName,
5407
+ na as toolSourceKinds,
5408
+ Uo as topicOfferedForTeam,
5409
+ bl as topicsForTeam,
5410
+ $r as trafficIntensity,
5411
+ Tl as transactionContext,
5412
+ Cl as transactionDossierKeys,
5413
+ Ml as transactionIdFromScope,
5382
5414
  F as transactionKind,
5383
- zo as transactionScopeKey,
5384
- _l as transactionSlots,
5385
- qa as transactionTotals,
5386
- Do as truncateExample,
5387
- Fl as typeIn,
5388
- Ul as typesFor,
5389
- Jl as uniqueWorkStatusKey,
5390
- cl as uniqueWorkTypeKey,
5391
- kn as usageMetricId,
5392
- Vs as usageMetrics,
5393
- eu as validateStatuses,
5394
- yc as valueAtPath,
5395
- Ce as waitHoursOf,
5396
- ra as wakesAssignment,
5397
- Gl as workActivityScopeKey,
5398
- Zo as workItemScopeKey,
5399
- Qt as workProjectScopeKey,
5400
- el as workRatio,
5401
- ni as workStatusKey,
5402
- xo as workTypeKey,
5403
- Ee as workingMsBetween,
5404
- dc as workstreamScopeKey
5415
+ qo as transactionScopeKey,
5416
+ Il as transactionSlots,
5417
+ Ja as transactionTotals,
5418
+ Po as truncateExample,
5419
+ Wl as typeIn,
5420
+ Gl as typesFor,
5421
+ ou as uniqueWorkStatusKey,
5422
+ fl as uniqueWorkTypeKey,
5423
+ vn as usageMetricId,
5424
+ Ys as usageMetrics,
5425
+ iu as validateStatuses,
5426
+ Ac as valueAtPath,
5427
+ Ne as waitHoursOf,
5428
+ sa as wakesAssignment,
5429
+ Yl as workActivityScopeKey,
5430
+ ti as workItemScopeKey,
5431
+ Jt as workProjectScopeKey,
5432
+ il as workRatio,
5433
+ ii as workStatusKey,
5434
+ Ro as workTypeKey,
5435
+ Ie as workingMsBetween,
5436
+ mc as workstreamScopeKey
5405
5437
  };