@opencxh/domain 1.243.0 → 1.244.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
|
|
1
|
+
const oi = 10, si = 10, ii = 10, ai = 5, on = /* @__PURE__ */ new Set([
|
|
2
2
|
"header",
|
|
3
3
|
"section",
|
|
4
4
|
"context",
|
|
@@ -14,7 +14,7 @@ function oe(e) {
|
|
|
14
14
|
const t = e;
|
|
15
15
|
return typeof t.key == "string" || typeof t.value == "string";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ci(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -59,9 +59,9 @@ function cs(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
|
|
63
|
-
if (
|
|
64
|
-
|
|
62
|
+
const s = Array.isArray(o.elements) ? o.elements : [], i = s.filter((a) => a?.action_id && a.invoke && oe(a.text));
|
|
63
|
+
if (i.length !== s.length && t("an action without action_id, invoke or text"), i.length === 0) continue;
|
|
64
|
+
i.length > 5 && t("more than 5 actions"), o.elements = i.slice(0, 5);
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -90,7 +90,7 @@ function X(e) {
|
|
|
90
90
|
function Le(e) {
|
|
91
91
|
return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function se(e) {
|
|
94
94
|
return e?.split("@")?.[0] || e || "";
|
|
95
95
|
}
|
|
96
96
|
function Y(e) {
|
|
@@ -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 — ${
|
|
109
|
+
timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${se(e.payload.from)}` : `Outbound call started — ${se(e.payload.to)}`
|
|
110
110
|
},
|
|
111
111
|
VOICE_CALL_ANSWERED: {
|
|
112
112
|
shape: "event",
|
|
@@ -141,7 +141,7 @@ const R = {
|
|
|
141
141
|
channelKind: "voice",
|
|
142
142
|
icon: "phone",
|
|
143
143
|
snippet: () => "Gemiste oproep",
|
|
144
|
-
timeline: (e) => `Missed call — ${
|
|
144
|
+
timeline: (e) => `Missed call — ${se(e.payload.from)}`
|
|
145
145
|
},
|
|
146
146
|
VOICE_CALL_FAILED: {
|
|
147
147
|
shape: "event",
|
|
@@ -467,40 +467,40 @@ function Ke(e) {
|
|
|
467
467
|
function w(e) {
|
|
468
468
|
return R[e];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function li(e) {
|
|
471
471
|
return w(e)?.icon ?? "circle";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function ui(e) {
|
|
474
474
|
return w(e)?.channelKind;
|
|
475
475
|
}
|
|
476
476
|
function St(e) {
|
|
477
477
|
return e === "message" || e === "note";
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function di(e) {
|
|
480
480
|
return St(w(e)?.shape);
|
|
481
481
|
}
|
|
482
482
|
function It(e) {
|
|
483
483
|
return e === "note";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function pi(e) {
|
|
486
486
|
return It(w(e)?.shape);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function fi(e) {
|
|
489
489
|
return w(e)?.replyable === !0;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function mi(e) {
|
|
492
492
|
return w(e)?.carriesText === !0;
|
|
493
493
|
}
|
|
494
494
|
function un(e) {
|
|
495
495
|
return w(e)?.countsAs;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function hi(e) {
|
|
498
498
|
return w(e)?.playbookAuthored === !0;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function gi(e) {
|
|
501
501
|
return w(e)?.connected === !0;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function yi(e) {
|
|
504
504
|
const t = w(e);
|
|
505
505
|
return t?.shape === "artifact" && t?.carriesText === !0;
|
|
506
506
|
}
|
|
@@ -508,11 +508,11 @@ function dn(e) {
|
|
|
508
508
|
const t = w(e.type)?.snippet;
|
|
509
509
|
return t ? t(e) : "";
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function bi(e, t) {
|
|
512
512
|
const n = w(e.type)?.timeline;
|
|
513
513
|
return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ai(e) {
|
|
516
516
|
const t = w(e.type)?.joinUrl;
|
|
517
517
|
return t ? t(e) : void 0;
|
|
518
518
|
}
|
|
@@ -530,8 +530,8 @@ function me(e, t, n) {
|
|
|
530
530
|
if ("value" in e)
|
|
531
531
|
return fe(t, e.value) || null;
|
|
532
532
|
const r = {};
|
|
533
|
-
for (const [
|
|
534
|
-
r[
|
|
533
|
+
for (const [s, i] of Object.entries(e.params ?? {}))
|
|
534
|
+
r[s] = fe(t, i);
|
|
535
535
|
const o = n(e.key, r);
|
|
536
536
|
return o === e.key ? null : o;
|
|
537
537
|
}
|
|
@@ -547,7 +547,7 @@ function fn(e) {
|
|
|
547
547
|
const t = e.trim();
|
|
548
548
|
return t.length <= Ue ? t : `${t.slice(0, Ue - 1).trimEnd()}…`;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function _i(e, t) {
|
|
551
551
|
const n = pn(t?.text, e), r = t ? me(t.text, e, (o) => o) : null;
|
|
552
552
|
return {
|
|
553
553
|
activityId: e.id,
|
|
@@ -681,20 +681,20 @@ class hn {
|
|
|
681
681
|
return this.translate;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
684
|
+
const Ei = new hn();
|
|
685
|
+
function Si(e, t, n = []) {
|
|
686
686
|
const r = e.createdAt;
|
|
687
687
|
if (!r) return [];
|
|
688
688
|
const o = new Set(n);
|
|
689
|
-
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([
|
|
689
|
+
return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([s, i]) => i >= r && !o.has(s)).map(([s]) => s);
|
|
690
690
|
}
|
|
691
691
|
function gn(e) {
|
|
692
692
|
return e.createdAt ?? 0;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function Ii(e) {
|
|
695
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Ti(e) {
|
|
698
698
|
return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
|
|
699
699
|
}
|
|
700
700
|
const Tt = [
|
|
@@ -790,23 +790,23 @@ const Tt = [
|
|
|
790
790
|
function te(e) {
|
|
791
791
|
return Tt.find((t) => t.id === e);
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function wi(e) {
|
|
794
794
|
return te(e)?.label ?? e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function ki(e, t = "gpt-5-mini") {
|
|
797
797
|
return te(e)?.defaultModel ?? t;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Mi(e) {
|
|
800
800
|
return Tt.filter((t) => t.capabilities.includes(e));
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function vi(e) {
|
|
803
803
|
const t = te(e);
|
|
804
804
|
return !!t && !t.baseUrl;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Ci(e, t) {
|
|
807
807
|
return t === "text" ? !0 : te(e)?.attachmentKinds?.includes(t) === !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Oi(e, t) {
|
|
810
810
|
if (!e.enabled) return "ok";
|
|
811
811
|
const n = je(e.hardLimitNanos), r = je(e.softLimitNanos);
|
|
812
812
|
return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
|
|
@@ -818,14 +818,14 @@ function yn(e, t = "month") {
|
|
|
818
818
|
const n = new Date(e);
|
|
819
819
|
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function xi(e, t = "month") {
|
|
822
822
|
const n = new Date(yn(e, t));
|
|
823
823
|
return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Ni(e) {
|
|
826
826
|
return e?.listeningEnabled !== !1;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Ri = [
|
|
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,26 +835,26 @@ const Rs = [
|
|
|
835
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
836
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
837
837
|
];
|
|
838
|
-
function
|
|
838
|
+
function ie(e) {
|
|
839
839
|
return e < 10 ? `0${e}` : `${e}`;
|
|
840
840
|
}
|
|
841
841
|
function j(e, t) {
|
|
842
|
-
const n = new Date(e), r = `${n.getUTCFullYear()}-${
|
|
843
|
-
return t === "day" ? r : `${r}T${
|
|
842
|
+
const n = new Date(e), r = `${n.getUTCFullYear()}-${ie(n.getUTCMonth() + 1)}-${ie(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${ie(n.getUTCHours())}`;
|
|
844
844
|
}
|
|
845
845
|
function H(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
849
|
const bn = 36e5, An = 864e5;
|
|
850
|
-
function
|
|
850
|
+
function Di(e, t, n) {
|
|
851
851
|
const r = n === "hour" ? bn : An, o = [];
|
|
852
|
-
for (let
|
|
853
|
-
o.push(j(
|
|
852
|
+
for (let s = H(e, n); s <= t; s += r)
|
|
853
|
+
o.push(j(s, n));
|
|
854
854
|
return o;
|
|
855
855
|
}
|
|
856
856
|
const _n = /* @__PURE__ */ new Set(["time"]);
|
|
857
|
-
function $
|
|
857
|
+
function $i(e, t, n) {
|
|
858
858
|
if (!e) return [];
|
|
859
859
|
const r = new Set(e.supportedDimensions ?? []);
|
|
860
860
|
return t.filter((o) => r.has(o.id) && !_n.has(o.id)).map((o) => ({
|
|
@@ -863,11 +863,11 @@ function $s(e, t, n) {
|
|
|
863
863
|
options: o.options?.length ? o.options : n[o.id] ?? []
|
|
864
864
|
})).filter((o) => o.options.length > 0);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Li(e, t) {
|
|
867
867
|
const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
|
|
868
868
|
return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Pi(e) {
|
|
871
871
|
return { value: e.id, label: `${e.category} · ${e.label}` };
|
|
872
872
|
}
|
|
873
873
|
const En = [
|
|
@@ -877,7 +877,7 @@ const En = [
|
|
|
877
877
|
function In(e, t) {
|
|
878
878
|
return `${e}.usage.${t}`;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Ki(e, t) {
|
|
881
881
|
return t.map((n) => ({
|
|
882
882
|
id: In(e, n.unit),
|
|
883
883
|
label: n.label,
|
|
@@ -892,7 +892,7 @@ function Ks(e, t) {
|
|
|
892
892
|
]
|
|
893
893
|
}));
|
|
894
894
|
}
|
|
895
|
-
const wt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), He = 200, Ge = 100, We = 200, Ve = 12, ze = 4, Xe = 10, Tn = 8, Ye = 12, kt = 4e3, q = 500,
|
|
895
|
+
const wt = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), He = 200, Ge = 100, We = 200, Ve = 12, ze = 4, Xe = 10, Tn = 8, Ye = 12, kt = 4e3, q = 500, Ui = 1024 * 1024, wn = /* @__PURE__ */ new Set([
|
|
896
896
|
"heading",
|
|
897
897
|
"paragraph",
|
|
898
898
|
"list",
|
|
@@ -922,31 +922,31 @@ function Cn(e) {
|
|
|
922
922
|
t += e[n], n += 1;
|
|
923
923
|
continue;
|
|
924
924
|
}
|
|
925
|
-
const o = n + (r ? 2 : 1),
|
|
926
|
-
if (
|
|
925
|
+
const o = n + (r ? 2 : 1), s = qe(e, o, "[", "]");
|
|
926
|
+
if (s < 0 || e[s + 1] !== "(") {
|
|
927
927
|
t += e[n], n += 1;
|
|
928
928
|
continue;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
931
|
-
if (
|
|
930
|
+
const i = qe(e, s + 2, "(", ")");
|
|
931
|
+
if (i < 0) {
|
|
932
932
|
t += e[n], n += 1;
|
|
933
933
|
continue;
|
|
934
934
|
}
|
|
935
|
-
const a = e.slice(o,
|
|
936
|
-
t += r || !Me(c) ? a : e.slice(n,
|
|
935
|
+
const a = e.slice(o, s), c = e.slice(s + 2, i).trim().split(/\s+/)[0] ?? "";
|
|
936
|
+
t += r || !Me(c) ? a : e.slice(n, i + 1), n = i + 1;
|
|
937
937
|
}
|
|
938
938
|
return t;
|
|
939
939
|
}
|
|
940
940
|
function qe(e, t, n, r) {
|
|
941
941
|
let o = 1;
|
|
942
|
-
for (let
|
|
943
|
-
if (e[
|
|
944
|
-
|
|
942
|
+
for (let s = t; s < e.length; s += 1) {
|
|
943
|
+
if (e[s] === "\\") {
|
|
944
|
+
s += 1;
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
if (e[
|
|
948
|
-
else if (e[
|
|
949
|
-
return
|
|
947
|
+
if (e[s] === n) o += 1;
|
|
948
|
+
else if (e[s] === r && (o -= 1, o === 0))
|
|
949
|
+
return s;
|
|
950
950
|
}
|
|
951
951
|
return -1;
|
|
952
952
|
}
|
|
@@ -968,7 +968,7 @@ function U(e, t = 200) {
|
|
|
968
968
|
function Nn(e, t = "info") {
|
|
969
969
|
return typeof e == "string" && wt.has(e) ? e : t;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Fi(e, t = () => {
|
|
972
972
|
}) {
|
|
973
973
|
if (!Array.isArray(e)) return [];
|
|
974
974
|
const n = [];
|
|
@@ -983,52 +983,52 @@ function Fs(e, t = () => {
|
|
|
983
983
|
t(`unknown block type ${String(o.type)}`);
|
|
984
984
|
continue;
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const s = typeof o.block_id == "string" ? { block_id: o.block_id } : {};
|
|
987
987
|
switch (o.type) {
|
|
988
988
|
case "heading": {
|
|
989
|
-
const
|
|
990
|
-
if (!
|
|
989
|
+
const i = T(o.text);
|
|
990
|
+
if (!i) {
|
|
991
991
|
t("a heading without text");
|
|
992
992
|
continue;
|
|
993
993
|
}
|
|
994
994
|
const a = o.level === 2 || o.level === 3 ? o.level : 1;
|
|
995
|
-
n.push({ ...
|
|
995
|
+
n.push({ ...s, type: "heading", level: a, text: i });
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
998
|
case "paragraph": {
|
|
999
|
-
const
|
|
1000
|
-
if (!
|
|
999
|
+
const i = T(o.text);
|
|
1000
|
+
if (!i) {
|
|
1001
1001
|
t("a paragraph without text");
|
|
1002
1002
|
continue;
|
|
1003
1003
|
}
|
|
1004
|
-
n.push({ ...
|
|
1004
|
+
n.push({ ...s, type: "paragraph", text: i });
|
|
1005
1005
|
break;
|
|
1006
1006
|
}
|
|
1007
1007
|
case "quote": {
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1008
|
+
const i = T(o.text);
|
|
1009
|
+
if (!i) {
|
|
1010
1010
|
t("a quote without text");
|
|
1011
1011
|
continue;
|
|
1012
1012
|
}
|
|
1013
|
-
n.push({ ...
|
|
1013
|
+
n.push({ ...s, type: "quote", text: i });
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
1016
|
case "code": {
|
|
1017
|
-
const
|
|
1018
|
-
if (!
|
|
1017
|
+
const i = xn(o.text);
|
|
1018
|
+
if (!i) {
|
|
1019
1019
|
t("a code block without text");
|
|
1020
1020
|
continue;
|
|
1021
1021
|
}
|
|
1022
1022
|
const a = typeof o.lang == "string" ? { lang: o.lang.slice(0, 32) } : {};
|
|
1023
|
-
n.push({ ...
|
|
1023
|
+
n.push({ ...s, type: "code", ...a, text: i });
|
|
1024
1024
|
break;
|
|
1025
1025
|
}
|
|
1026
1026
|
case "divider":
|
|
1027
|
-
n.push({ ...
|
|
1027
|
+
n.push({ ...s, type: "divider" });
|
|
1028
1028
|
break;
|
|
1029
1029
|
case "list": {
|
|
1030
|
-
const
|
|
1031
|
-
for (const l of
|
|
1030
|
+
const i = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1031
|
+
for (const l of i) {
|
|
1032
1032
|
if (a.length >= Ge) {
|
|
1033
1033
|
t(`more than ${Ge} list items`);
|
|
1034
1034
|
break;
|
|
@@ -1043,12 +1043,12 @@ function Fs(e, t = () => {
|
|
|
1043
1043
|
continue;
|
|
1044
1044
|
}
|
|
1045
1045
|
const c = o.style === "numbered" ? "numbered" : "bulleted";
|
|
1046
|
-
n.push({ ...
|
|
1046
|
+
n.push({ ...s, type: "list", style: c, items: a });
|
|
1047
1047
|
break;
|
|
1048
1048
|
}
|
|
1049
1049
|
case "table": {
|
|
1050
|
-
const
|
|
1051
|
-
for (const u of
|
|
1050
|
+
const i = Array.isArray(o.columns) ? o.columns : [], a = [];
|
|
1051
|
+
for (const u of i) {
|
|
1052
1052
|
if (a.length >= Ve) {
|
|
1053
1053
|
t(`more than ${Ve} table columns`);
|
|
1054
1054
|
break;
|
|
@@ -1071,7 +1071,7 @@ function Fs(e, t = () => {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
const d = T(o.caption, q);
|
|
1073
1073
|
n.push({
|
|
1074
|
-
...
|
|
1074
|
+
...s,
|
|
1075
1075
|
type: "table",
|
|
1076
1076
|
columns: a,
|
|
1077
1077
|
rows: l,
|
|
@@ -1080,8 +1080,8 @@ function Fs(e, t = () => {
|
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
1082
|
case "kpi": {
|
|
1083
|
-
const
|
|
1084
|
-
for (const c of
|
|
1083
|
+
const i = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1084
|
+
for (const c of i) {
|
|
1085
1085
|
if (a.length >= ze) {
|
|
1086
1086
|
t(`more than ${ze} kpi items`);
|
|
1087
1087
|
break;
|
|
@@ -1097,28 +1097,28 @@ function Fs(e, t = () => {
|
|
|
1097
1097
|
t("a kpi block without usable items");
|
|
1098
1098
|
continue;
|
|
1099
1099
|
}
|
|
1100
|
-
n.push({ ...
|
|
1100
|
+
n.push({ ...s, type: "kpi", items: a });
|
|
1101
1101
|
break;
|
|
1102
1102
|
}
|
|
1103
1103
|
case "image": {
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1104
|
+
const i = typeof o.url == "string" ? o.url.trim() : "";
|
|
1105
|
+
if (!i || !Me(i)) {
|
|
1106
1106
|
t("an image without a usable url");
|
|
1107
1107
|
continue;
|
|
1108
1108
|
}
|
|
1109
1109
|
const a = T(o.alt, 200), c = T(o.caption, q);
|
|
1110
1110
|
n.push({
|
|
1111
|
-
...
|
|
1111
|
+
...s,
|
|
1112
1112
|
type: "image",
|
|
1113
|
-
url:
|
|
1113
|
+
url: i,
|
|
1114
1114
|
...a ? { alt: a } : {},
|
|
1115
1115
|
...c ? { caption: c } : {}
|
|
1116
1116
|
});
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
1119
1119
|
case "letterhead": {
|
|
1120
|
-
const
|
|
1121
|
-
for (const d of
|
|
1120
|
+
const i = Array.isArray(o.fields) ? o.fields : [], a = [];
|
|
1121
|
+
for (const d of i) {
|
|
1122
1122
|
if (a.length >= Xe) {
|
|
1123
1123
|
t(`more than ${Xe} letterhead fields`);
|
|
1124
1124
|
break;
|
|
@@ -1134,7 +1134,7 @@ function Fs(e, t = () => {
|
|
|
1134
1134
|
continue;
|
|
1135
1135
|
}
|
|
1136
1136
|
n.push({
|
|
1137
|
-
...
|
|
1137
|
+
...s,
|
|
1138
1138
|
type: "letterhead",
|
|
1139
1139
|
fields: a,
|
|
1140
1140
|
...l.length > 0 ? { recipient: l } : {}
|
|
@@ -1142,7 +1142,7 @@ function Fs(e, t = () => {
|
|
|
1142
1142
|
break;
|
|
1143
1143
|
}
|
|
1144
1144
|
case "totals": {
|
|
1145
|
-
const
|
|
1145
|
+
const i = (l) => {
|
|
1146
1146
|
const d = Array.isArray(l) ? l : [], u = [];
|
|
1147
1147
|
for (const p of d) {
|
|
1148
1148
|
if (u.length >= Ye) {
|
|
@@ -1155,31 +1155,31 @@ function Fs(e, t = () => {
|
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
1157
1157
|
return u;
|
|
1158
|
-
}, a =
|
|
1158
|
+
}, a = i(o.rows);
|
|
1159
1159
|
if (a.length === 0) {
|
|
1160
1160
|
t("a totals block without usable rows");
|
|
1161
1161
|
continue;
|
|
1162
1162
|
}
|
|
1163
|
-
const c =
|
|
1164
|
-
n.push({ ...
|
|
1163
|
+
const c = i(o.taxRows);
|
|
1164
|
+
n.push({ ...s, type: "totals", rows: a, ...c.length > 0 ? { taxRows: c } : {} });
|
|
1165
1165
|
break;
|
|
1166
1166
|
}
|
|
1167
1167
|
case "pagebreak":
|
|
1168
|
-
n.push({ ...
|
|
1168
|
+
n.push({ ...s, type: "pagebreak" });
|
|
1169
1169
|
break;
|
|
1170
1170
|
case "callout": {
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1171
|
+
const i = T(o.text);
|
|
1172
|
+
if (!i) {
|
|
1173
1173
|
t("a callout without text");
|
|
1174
1174
|
continue;
|
|
1175
1175
|
}
|
|
1176
1176
|
const a = T(o.title, 200);
|
|
1177
1177
|
n.push({
|
|
1178
|
-
...
|
|
1178
|
+
...s,
|
|
1179
1179
|
type: "callout",
|
|
1180
1180
|
tone: Nn(o.tone),
|
|
1181
1181
|
...a ? { title: a } : {},
|
|
1182
|
-
text:
|
|
1182
|
+
text: i
|
|
1183
1183
|
});
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
@@ -1187,10 +1187,10 @@ function Fs(e, t = () => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
return n;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function Bi(e) {
|
|
1191
1191
|
return JSON.stringify(e).length;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function ji(e) {
|
|
1194
1194
|
return {
|
|
1195
1195
|
blocks: e.length,
|
|
1196
1196
|
types: e.map((t) => t.type),
|
|
@@ -1201,7 +1201,7 @@ function Qe(e) {
|
|
|
1201
1201
|
return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
|
|
1202
1202
|
}
|
|
1203
1203
|
function ae(e, t, n) {
|
|
1204
|
-
const r = e.map((o,
|
|
1204
|
+
const r = e.map((o, s) => n?.[s] === "right" ? "---:" : "---");
|
|
1205
1205
|
return [
|
|
1206
1206
|
`| ${e.map(Qe).join(" | ")} |`,
|
|
1207
1207
|
`| ${r.join(" | ")} |`,
|
|
@@ -1268,8 +1268,8 @@ function Dn(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
|
|
1272
|
-
|
|
1271
|
+
const s = Rn(o);
|
|
1272
|
+
s.length > 0 && n.push(s.join(`
|
|
1273
1273
|
`));
|
|
1274
1274
|
}
|
|
1275
1275
|
return `${n.join(`
|
|
@@ -1278,44 +1278,44 @@ function Dn(e, t) {
|
|
|
1278
1278
|
`;
|
|
1279
1279
|
}
|
|
1280
1280
|
const Mt = (e) => `user:${e}`, vt = (e) => `team:${e}`;
|
|
1281
|
-
function
|
|
1281
|
+
function Hi(e) {
|
|
1282
1282
|
const t = /* @__PURE__ */ new Set();
|
|
1283
1283
|
for (const n of e ?? [])
|
|
1284
1284
|
n?.id && (n.kind === "user" && t.add(Mt(n.id)), n.kind === "team" && t.add(vt(n.id)));
|
|
1285
1285
|
return [...t].sort();
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Gi(e, t) {
|
|
1288
1288
|
return [Mt(e), ...t.map(vt)];
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Wi(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 $n = ["done", "escalated"],
|
|
1297
|
-
function
|
|
1296
|
+
const $n = ["done", "escalated"], Vi = ["open", "waiting"];
|
|
1297
|
+
function zi(e) {
|
|
1298
1298
|
return $n.includes(e);
|
|
1299
1299
|
}
|
|
1300
1300
|
const Ln = "assignment";
|
|
1301
|
-
function
|
|
1301
|
+
function Xi(e) {
|
|
1302
1302
|
return `${Ln}:${e}`;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Yi(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
|
|
1310
|
+
function qi(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
|
|
1314
|
+
function Qi(e) {
|
|
1315
1315
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
1316
1316
|
}
|
|
1317
1317
|
const Pn = 12;
|
|
1318
|
-
function
|
|
1318
|
+
function Zi(e, t, n = Pn) {
|
|
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",
|
|
@@ -1341,7 +1341,7 @@ function Un(e) {
|
|
|
1341
1341
|
t += Number(e[n]) * (n % 2 === 0 ? 3 : 1);
|
|
1342
1342
|
return (10 - t % 10) % 10;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function Ji(e, t) {
|
|
1345
1345
|
const n = t.trim(), r = Kn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
|
|
1346
1346
|
return r && o.push({ gtin: r }), { organizationId: e, $or: o };
|
|
1347
1347
|
}
|
|
@@ -1353,17 +1353,17 @@ function Fn(e, t) {
|
|
|
1353
1353
|
const n = t.reduce((c, l) => c + l, 0);
|
|
1354
1354
|
if (n === 0) return t.map((c, l) => l === 0 ? e : 0);
|
|
1355
1355
|
const r = t.map((c) => e * c / n), o = r.map((c) => Math.trunc(c));
|
|
1356
|
-
let
|
|
1357
|
-
const
|
|
1358
|
-
for (let c = 0;
|
|
1359
|
-
o[
|
|
1356
|
+
let s = e - o.reduce((c, l) => c + l, 0);
|
|
1357
|
+
const i = r.map((c, l) => ({ index: l, fraction: Math.abs(c - o[l]) })).sort((c, l) => l.fraction - c.fraction), a = s < 0 ? -1 : 1;
|
|
1358
|
+
for (let c = 0; s !== 0 && c < i.length; c++)
|
|
1359
|
+
o[i[c].index] += a, s -= a;
|
|
1360
1360
|
return o;
|
|
1361
1361
|
}
|
|
1362
1362
|
function D(e, t = {}) {
|
|
1363
|
-
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0,
|
|
1363
|
+
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0, s = Math.abs(Math.trunc(e)).toString().padStart(3, "0"), i = s.slice(0, -2), a = s.slice(-2);
|
|
1364
1364
|
let c = "";
|
|
1365
|
-
for (let l = 0; l <
|
|
1366
|
-
l > 0 && (
|
|
1365
|
+
for (let l = 0; l < i.length; l++)
|
|
1366
|
+
l > 0 && (i.length - l) % 3 === 0 && (c += r), c += i[l];
|
|
1367
1367
|
return `${o ? "-" : ""}${c}${n}${a}`;
|
|
1368
1368
|
}
|
|
1369
1369
|
function ea(e) {
|
|
@@ -1371,7 +1371,7 @@ function ea(e) {
|
|
|
1371
1371
|
if (!t) return;
|
|
1372
1372
|
const n = t.replace(/^[-+]?[^\d.,-]*/, "").replace(/[^\d.,-]+$/, ""), r = /^-/.test(t) || /-$/.test(t), o = n.replace(/-/g, "");
|
|
1373
1373
|
if (!o || !/^[\d.,]+$/.test(o)) return;
|
|
1374
|
-
const
|
|
1374
|
+
const s = o.lastIndexOf(","), i = o.lastIndexOf("."), a = Math.max(s, i), c = a === -1 ? "" : o.slice(a + 1), l = a !== -1 && c.length >= 1 && c.length <= 2, d = l ? o.slice(0, a) : o;
|
|
1375
1375
|
if (!Bn(d)) return;
|
|
1376
1376
|
const u = d.replace(/[.,]/g, ""), p = l ? c.padEnd(2, "0") : "00";
|
|
1377
1377
|
if (u === "") return;
|
|
@@ -1411,15 +1411,15 @@ function na(e, t, n) {
|
|
|
1411
1411
|
(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)
|
|
1412
1412
|
);
|
|
1413
1413
|
for (const o of jn) {
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1414
|
+
const s = r.filter((a) => o.matches(a, t));
|
|
1415
|
+
if (s.length === 0) continue;
|
|
1416
|
+
const i = s.reduce(
|
|
1417
1417
|
(a, c) => (c.minQuantity ?? 0) >= (a.minQuantity ?? 0) ? c : a
|
|
1418
1418
|
);
|
|
1419
1419
|
return {
|
|
1420
|
-
unitPriceCents: Hn(
|
|
1421
|
-
sourceKey: (
|
|
1422
|
-
ruleId:
|
|
1420
|
+
unitPriceCents: Hn(i, e.listPriceCents),
|
|
1421
|
+
sourceKey: (i.minQuantity ?? 0) > 1 ? "tier" : o.key,
|
|
1422
|
+
ruleId: i.id
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
1425
|
return { unitPriceCents: e.listPriceCents, sourceKey: "list" };
|
|
@@ -1432,14 +1432,14 @@ function Gn(e, t) {
|
|
|
1432
1432
|
const n = e.settings?.signatures?.[t];
|
|
1433
1433
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function sa(e, t, n, r = "html") {
|
|
1436
1436
|
if (!e) return n;
|
|
1437
1437
|
const o = Gn(e, t);
|
|
1438
1438
|
return o ? `${n}${r === "text" ? `
|
|
1439
1439
|
|
|
1440
1440
|
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function ia(e) {
|
|
1443
1443
|
return e.endpoints ?? [];
|
|
1444
1444
|
}
|
|
1445
1445
|
function $(e) {
|
|
@@ -1453,8 +1453,8 @@ function aa(e) {
|
|
|
1453
1453
|
function ca(e, t, n, r) {
|
|
1454
1454
|
const o = e.filter((a) => a.key === t && !a.archived);
|
|
1455
1455
|
if (o.length === 0) return;
|
|
1456
|
-
const
|
|
1457
|
-
return o.find((a) => $(a.locale) ===
|
|
1456
|
+
const s = $(n), i = $(r);
|
|
1457
|
+
return o.find((a) => $(a.locale) === s) ?? o.find((a) => $(a.locale) === i) ?? // A row with no language at all is the single-language case: it is for everybody.
|
|
1458
1458
|
o.find((a) => !a.locale) ?? o[0];
|
|
1459
1459
|
}
|
|
1460
1460
|
const Wn = /\{([a-zA-Z0-9_.]+)\}/g;
|
|
@@ -1471,9 +1471,9 @@ function Vn(e) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
function zn(e, t) {
|
|
1473
1473
|
const n = [];
|
|
1474
|
-
return { text: e.replace(Wn, (o,
|
|
1475
|
-
const
|
|
1476
|
-
return
|
|
1474
|
+
return { text: e.replace(Wn, (o, s) => {
|
|
1475
|
+
const i = Ct(t, s);
|
|
1476
|
+
return i == null || i === "" ? (n.includes(s) || n.push(s), `{${s}}`) : Vn(i);
|
|
1477
1477
|
}), unresolved: n };
|
|
1478
1478
|
}
|
|
1479
1479
|
function Xn(e, t) {
|
|
@@ -1486,7 +1486,7 @@ function Xn(e, t) {
|
|
|
1486
1486
|
return e.equals !== void 0 ? n === e.equals : !0;
|
|
1487
1487
|
}
|
|
1488
1488
|
function la(e, t, n, r) {
|
|
1489
|
-
const o = [],
|
|
1489
|
+
const o = [], s = [], i = (a) => {
|
|
1490
1490
|
const c = zn(a, t);
|
|
1491
1491
|
for (const l of c.unresolved) o.includes(l) || o.push(l);
|
|
1492
1492
|
return c.text;
|
|
@@ -1495,96 +1495,110 @@ function la(e, t, n, r) {
|
|
|
1495
1495
|
if (a.block_id && !Xn(n?.[a.block_id], t)) continue;
|
|
1496
1496
|
const c = a.block_id ? r?.[a.block_id] : void 0;
|
|
1497
1497
|
if (c) {
|
|
1498
|
-
|
|
1498
|
+
s.push(...c);
|
|
1499
1499
|
continue;
|
|
1500
1500
|
}
|
|
1501
1501
|
switch (a.type) {
|
|
1502
1502
|
case "heading":
|
|
1503
1503
|
case "paragraph":
|
|
1504
1504
|
case "quote":
|
|
1505
|
-
|
|
1505
|
+
s.push({ ...a, text: i(a.text) });
|
|
1506
1506
|
break;
|
|
1507
1507
|
case "callout":
|
|
1508
|
-
|
|
1508
|
+
s.push({
|
|
1509
1509
|
...a,
|
|
1510
|
-
...a.title ? { title:
|
|
1511
|
-
text:
|
|
1510
|
+
...a.title ? { title: i(a.title) } : {},
|
|
1511
|
+
text: i(a.text)
|
|
1512
1512
|
});
|
|
1513
1513
|
break;
|
|
1514
1514
|
case "code":
|
|
1515
|
-
|
|
1515
|
+
s.push(a);
|
|
1516
1516
|
break;
|
|
1517
1517
|
case "list":
|
|
1518
|
-
|
|
1518
|
+
s.push({
|
|
1519
1519
|
...a,
|
|
1520
1520
|
items: a.items.map((l) => ({
|
|
1521
|
-
...l.lead ? { lead:
|
|
1522
|
-
text:
|
|
1521
|
+
...l.lead ? { lead: i(l.lead) } : {},
|
|
1522
|
+
text: i(l.text)
|
|
1523
1523
|
}))
|
|
1524
1524
|
});
|
|
1525
1525
|
break;
|
|
1526
1526
|
case "table":
|
|
1527
|
-
|
|
1527
|
+
s.push({
|
|
1528
1528
|
...a,
|
|
1529
|
-
columns: a.columns.map((l) => ({ ...l, label:
|
|
1530
|
-
rows: a.rows.map((l) => l.map(
|
|
1531
|
-
...a.caption ? { caption:
|
|
1529
|
+
columns: a.columns.map((l) => ({ ...l, label: i(l.label) })),
|
|
1530
|
+
rows: a.rows.map((l) => l.map(i)),
|
|
1531
|
+
...a.caption ? { caption: i(a.caption) } : {}
|
|
1532
1532
|
});
|
|
1533
1533
|
break;
|
|
1534
1534
|
case "kpi":
|
|
1535
|
-
|
|
1535
|
+
s.push({
|
|
1536
1536
|
...a,
|
|
1537
1537
|
items: a.items.map((l) => ({
|
|
1538
1538
|
...l,
|
|
1539
|
-
value:
|
|
1540
|
-
label:
|
|
1539
|
+
value: i(l.value),
|
|
1540
|
+
label: i(l.label)
|
|
1541
1541
|
}))
|
|
1542
1542
|
});
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "letterhead":
|
|
1545
|
-
|
|
1545
|
+
s.push({
|
|
1546
1546
|
...a,
|
|
1547
|
-
fields: a.fields.map((l) => ({ ...l, value:
|
|
1548
|
-
...a.recipient ? { recipient: a.recipient.map(
|
|
1547
|
+
fields: a.fields.map((l) => ({ ...l, value: i(l.value) })),
|
|
1548
|
+
...a.recipient ? { recipient: a.recipient.map(i) } : {}
|
|
1549
1549
|
});
|
|
1550
1550
|
break;
|
|
1551
1551
|
case "totals":
|
|
1552
|
-
|
|
1552
|
+
s.push({
|
|
1553
1553
|
...a,
|
|
1554
1554
|
rows: a.rows.map((l) => ({
|
|
1555
1555
|
...l,
|
|
1556
|
-
label:
|
|
1557
|
-
amount:
|
|
1556
|
+
label: i(l.label),
|
|
1557
|
+
amount: i(l.amount)
|
|
1558
1558
|
})),
|
|
1559
1559
|
...a.taxRows ? {
|
|
1560
1560
|
taxRows: a.taxRows.map((l) => ({
|
|
1561
1561
|
...l,
|
|
1562
|
-
label:
|
|
1563
|
-
amount:
|
|
1562
|
+
label: i(l.label),
|
|
1563
|
+
amount: i(l.amount)
|
|
1564
1564
|
}))
|
|
1565
1565
|
} : {}
|
|
1566
1566
|
});
|
|
1567
1567
|
break;
|
|
1568
1568
|
case "image":
|
|
1569
|
-
|
|
1569
|
+
s.push({
|
|
1570
1570
|
...a,
|
|
1571
|
-
url:
|
|
1572
|
-
...a.alt ? { alt:
|
|
1571
|
+
url: i(a.url),
|
|
1572
|
+
...a.alt ? { alt: i(a.alt) } : {}
|
|
1573
1573
|
});
|
|
1574
1574
|
break;
|
|
1575
1575
|
default:
|
|
1576
|
-
|
|
1576
|
+
s.push(a);
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
return { blocks:
|
|
1579
|
+
return { blocks: s, unresolved: o };
|
|
1580
|
+
}
|
|
1581
|
+
function ua(e) {
|
|
1582
|
+
const t = e?.billing, n = e?.address, r = e?.houseStyle, o = [n?.street, n?.houseNumber].filter(Boolean).join(" "), s = [n?.postalCode, n?.city].filter(Boolean).join(" ");
|
|
1583
|
+
return {
|
|
1584
|
+
name: t?.companyName || e?.name || e?.displayName || "",
|
|
1585
|
+
addressLines: [o, s, n?.country ?? ""].filter(Boolean),
|
|
1586
|
+
footerLines: [
|
|
1587
|
+
r?.footerText ?? "",
|
|
1588
|
+
t?.kvkNumber ? `KvK ${t.kvkNumber}` : "",
|
|
1589
|
+
t?.vatNumber ? `Btw ${t.vatNumber}` : "",
|
|
1590
|
+
r?.iban ? `IBAN ${r.iban}` : ""
|
|
1591
|
+
].filter(Boolean),
|
|
1592
|
+
...e?.logo ? { logo: e.logo } : {}
|
|
1593
|
+
};
|
|
1580
1594
|
}
|
|
1581
|
-
const Yn = 36e5, qn = 864e5, L = -1 / 0,
|
|
1595
|
+
const Yn = 36e5, qn = 864e5, L = -1 / 0, da = (e) => e.score > L, J = {
|
|
1582
1596
|
urgent: 40,
|
|
1583
1597
|
high: 25,
|
|
1584
1598
|
normal: 10,
|
|
1585
1599
|
low: 0
|
|
1586
1600
|
};
|
|
1587
|
-
function
|
|
1601
|
+
function pa(e) {
|
|
1588
1602
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1589
1603
|
}
|
|
1590
1604
|
const Qn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Ot = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
|
|
@@ -1592,7 +1606,7 @@ function Zn(e, t) {
|
|
|
1592
1606
|
return !!(e && Qn.test(e) || t && Ot.test(t));
|
|
1593
1607
|
}
|
|
1594
1608
|
const Jn = 3, er = 600;
|
|
1595
|
-
function
|
|
1609
|
+
function fa(e, t) {
|
|
1596
1610
|
return e >= Jn || t >= er;
|
|
1597
1611
|
}
|
|
1598
1612
|
const tr = [
|
|
@@ -1605,7 +1619,7 @@ const tr = [
|
|
|
1605
1619
|
"feedback-id",
|
|
1606
1620
|
"x-mailer"
|
|
1607
1621
|
];
|
|
1608
|
-
function
|
|
1622
|
+
function ma(e) {
|
|
1609
1623
|
const t = {};
|
|
1610
1624
|
for (const n of e) {
|
|
1611
1625
|
const r = n.name?.toLowerCase();
|
|
@@ -1614,7 +1628,7 @@ function fa(e) {
|
|
|
1614
1628
|
return t;
|
|
1615
1629
|
}
|
|
1616
1630
|
const nr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, rr = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1617
|
-
function
|
|
1631
|
+
function ha(e) {
|
|
1618
1632
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1619
1633
|
if (r && r !== "no" || t["x-auto-response-suppress"] || n && nr.test(n))
|
|
1620
1634
|
return "automated";
|
|
@@ -1625,7 +1639,7 @@ function ma(e) {
|
|
|
1625
1639
|
function or(e, t) {
|
|
1626
1640
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1627
1641
|
}
|
|
1628
|
-
const
|
|
1642
|
+
const sr = ["open"], ir = 1e3, ar = {
|
|
1629
1643
|
urgent: 1,
|
|
1630
1644
|
high: 4,
|
|
1631
1645
|
normal: 8,
|
|
@@ -1640,7 +1654,7 @@ function ur(e, t) {
|
|
|
1640
1654
|
function dr(e, t, n) {
|
|
1641
1655
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1642
1656
|
}
|
|
1643
|
-
const xt = (e) => un(e) === "outbound_message", Nt = (e) =>
|
|
1657
|
+
const xt = (e) => un(e) === "outbound_message", Nt = (e) => sr.includes(e);
|
|
1644
1658
|
function ve(e, t) {
|
|
1645
1659
|
return Math.max(0, (t - lr(e)) / Yn);
|
|
1646
1660
|
}
|
|
@@ -1648,20 +1662,20 @@ function pr(e, t) {
|
|
|
1648
1662
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1649
1663
|
return typeof n == "number" && n > 0 ? n : ar[e.priority ?? "normal"];
|
|
1650
1664
|
}
|
|
1651
|
-
function
|
|
1665
|
+
function ga(e) {
|
|
1652
1666
|
const t = {};
|
|
1653
1667
|
for (const n of e)
|
|
1654
1668
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1655
1669
|
return t;
|
|
1656
1670
|
}
|
|
1657
|
-
function
|
|
1671
|
+
function ya(e, t, n) {
|
|
1658
1672
|
return !Nt(e.status) || e.firstResponseAt ? !1 : ve(e, t) > pr(e, n);
|
|
1659
1673
|
}
|
|
1660
1674
|
function fr(e, t) {
|
|
1661
1675
|
const n = e.lastActivityPreview;
|
|
1662
1676
|
return n?.direction !== "outbound" || !xt(n.type) ? !1 : ve(e, t) < cr;
|
|
1663
1677
|
}
|
|
1664
|
-
function
|
|
1678
|
+
function ba(e, t) {
|
|
1665
1679
|
if (!Nt(e.status)) return { score: L, reasons: [] };
|
|
1666
1680
|
if (e.snoozedTill && e.snoozedTill > t.now) return { score: L, reasons: [] };
|
|
1667
1681
|
if (fr(e, t.now)) return { score: L, reasons: [] };
|
|
@@ -1669,25 +1683,25 @@ function ya(e, t) {
|
|
|
1669
1683
|
let n = 0;
|
|
1670
1684
|
const r = [], o = e.priority ?? "normal";
|
|
1671
1685
|
J[o] > 0 && (n += J[o], r.push(`priority:${o}`)), or(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1674
|
-
const c = Math.min(
|
|
1675
|
-
n += c,
|
|
1686
|
+
const s = ve(e, t.now);
|
|
1687
|
+
if (s > 0) {
|
|
1688
|
+
const c = Math.min(s * 2, 30);
|
|
1689
|
+
n += c, s >= 1 && r.push(`waiting:${Math.round(s)}h`);
|
|
1676
1690
|
}
|
|
1677
|
-
const
|
|
1678
|
-
return
|
|
1691
|
+
const i = e.lastActivityPreview;
|
|
1692
|
+
return i?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), i?.direction === "outbound" && xt(i.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((c) => c === "marketing" || c === "automated") || Zn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= ir, r.push("bulk")), { score: n, reasons: r };
|
|
1679
1693
|
}
|
|
1680
|
-
const
|
|
1694
|
+
const Aa = (e) => !!e.assignedUserId || !!e.assignedInboxId, _a = (e) => e.status === "closed", Ea = (e) => ({
|
|
1681
1695
|
urgent: 10,
|
|
1682
1696
|
high: 5,
|
|
1683
1697
|
normal: 2,
|
|
1684
1698
|
low: 1
|
|
1685
|
-
})[e.priority] || 0,
|
|
1686
|
-
function
|
|
1699
|
+
})[e.priority] || 0, Sa = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1700
|
+
function Ia(e, t) {
|
|
1687
1701
|
const n = e.labels ?? [];
|
|
1688
1702
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1689
1703
|
}
|
|
1690
|
-
function
|
|
1704
|
+
function Ta(e, t, n) {
|
|
1691
1705
|
const r = e.translations ?? [];
|
|
1692
1706
|
return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
|
|
1693
1707
|
}
|
|
@@ -1710,10 +1724,10 @@ function Rt(e) {
|
|
|
1710
1724
|
const t = (e ?? "").toLowerCase();
|
|
1711
1725
|
return Ze.find((n) => n.code === t) ?? Ze.find((n) => n.code === t.split("-")[0]);
|
|
1712
1726
|
}
|
|
1713
|
-
function
|
|
1727
|
+
function wa(e) {
|
|
1714
1728
|
return Rt(e)?.label ?? e;
|
|
1715
1729
|
}
|
|
1716
|
-
function
|
|
1730
|
+
function ka(e) {
|
|
1717
1731
|
const t = Rt(e);
|
|
1718
1732
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1719
1733
|
}
|
|
@@ -1727,13 +1741,13 @@ function mr(e, t) {
|
|
|
1727
1741
|
}
|
|
1728
1742
|
return r;
|
|
1729
1743
|
}
|
|
1730
|
-
function
|
|
1744
|
+
function Ma(e, t, n) {
|
|
1731
1745
|
if (!e) return !0;
|
|
1732
1746
|
if (e === t) return !1;
|
|
1733
|
-
const r = new Map(n.map((
|
|
1747
|
+
const r = new Map(n.map((i) => [i.id, i]));
|
|
1734
1748
|
if (!r.has(e) || t && hr(e, t, r)) return !1;
|
|
1735
|
-
const o = mr(e, r),
|
|
1736
|
-
return o +
|
|
1749
|
+
const o = mr(e, r), s = t ? $t(t, n) : 1;
|
|
1750
|
+
return o + s <= Dt;
|
|
1737
1751
|
}
|
|
1738
1752
|
function hr(e, t, n) {
|
|
1739
1753
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -1755,13 +1769,13 @@ const gr = "en";
|
|
|
1755
1769
|
function yr(e) {
|
|
1756
1770
|
return e.defaultLocale || e.locale || gr;
|
|
1757
1771
|
}
|
|
1758
|
-
function
|
|
1772
|
+
function va(e) {
|
|
1759
1773
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1760
1774
|
for (const r of [yr(e), ...e.locales ?? []])
|
|
1761
1775
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1762
1776
|
return n;
|
|
1763
1777
|
}
|
|
1764
|
-
function
|
|
1778
|
+
function Ca(e, t, n) {
|
|
1765
1779
|
const r = e.translations ?? [];
|
|
1766
1780
|
return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
|
|
1767
1781
|
}
|
|
@@ -1792,22 +1806,22 @@ function br(e, t) {
|
|
|
1792
1806
|
return e.userId === t.userId;
|
|
1793
1807
|
}
|
|
1794
1808
|
}
|
|
1795
|
-
function
|
|
1809
|
+
function Oa(e, t) {
|
|
1796
1810
|
return e.filter((n) => n.enabled && br(n.ownerScope, t));
|
|
1797
1811
|
}
|
|
1798
|
-
function
|
|
1812
|
+
function xa(e) {
|
|
1799
1813
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1800
1814
|
}
|
|
1801
|
-
function
|
|
1815
|
+
function Na(e) {
|
|
1802
1816
|
return `mcp__${e}__`;
|
|
1803
1817
|
}
|
|
1804
|
-
const
|
|
1805
|
-
function
|
|
1818
|
+
const Ra = 1e3, Da = 2e3, $a = 500, La = 12e3, Pa = 4e3, Ar = ["contact", "company", "work_item"];
|
|
1819
|
+
function Ka(e) {
|
|
1806
1820
|
if (!e) return !1;
|
|
1807
1821
|
const t = e.slice(0, e.indexOf(":"));
|
|
1808
1822
|
return Ar.includes(t);
|
|
1809
1823
|
}
|
|
1810
|
-
const
|
|
1824
|
+
const Ua = [
|
|
1811
1825
|
{ key: "high", label: "tax_high", percent: 21, kind: "standard" },
|
|
1812
1826
|
{ key: "low", label: "tax_low", percent: 9, kind: "reduced" },
|
|
1813
1827
|
{ key: "zero", label: "tax_zero", percent: 0, kind: "zero" },
|
|
@@ -1827,22 +1841,22 @@ function Er(e) {
|
|
|
1827
1841
|
const t = 1 - (e.discountPercent ?? 0) / 100;
|
|
1828
1842
|
return G(e.quantity * e.unitPriceCents * t);
|
|
1829
1843
|
}
|
|
1830
|
-
function
|
|
1844
|
+
function Fa(e, t, n) {
|
|
1831
1845
|
const r = e.map((l) => ({ ...l, netCents: Er(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
|
|
1832
1846
|
for (let l = 0; l < r.length; l++) {
|
|
1833
1847
|
if (r[l].kind !== "product") continue;
|
|
1834
1848
|
const d = n ?? r[l].taxRateKey, u = o.get(d);
|
|
1835
1849
|
u ? u.push(l) : o.set(d, [l]);
|
|
1836
1850
|
}
|
|
1837
|
-
const
|
|
1838
|
-
let
|
|
1851
|
+
const s = [];
|
|
1852
|
+
let i = 0, a = 0;
|
|
1839
1853
|
for (const [l, d] of o) {
|
|
1840
1854
|
const u = _r(l, t), p = d.reduce((m, S) => m + r[S].netCents, 0), f = G(p * u.percent / 100), y = Fn(
|
|
1841
1855
|
f,
|
|
1842
1856
|
d.map((m) => r[m].netCents)
|
|
1843
1857
|
);
|
|
1844
1858
|
for (let m = 0; m < d.length; m++) r[d[m]].taxCents = y[m];
|
|
1845
|
-
|
|
1859
|
+
s.push({ taxRateKey: l, netCents: p, taxCents: f }), i += p, a += f;
|
|
1846
1860
|
}
|
|
1847
1861
|
const c = r.reduce(
|
|
1848
1862
|
(l, d) => d.costPriceCents == null ? l : l + G(d.costPriceCents * d.quantity),
|
|
@@ -1851,15 +1865,15 @@ function Ua(e, t, n) {
|
|
|
1851
1865
|
return {
|
|
1852
1866
|
lines: r,
|
|
1853
1867
|
totals: {
|
|
1854
|
-
netCents:
|
|
1868
|
+
netCents: i,
|
|
1855
1869
|
taxCents: a,
|
|
1856
|
-
grossCents:
|
|
1870
|
+
grossCents: i + a,
|
|
1857
1871
|
costCents: c,
|
|
1858
|
-
byRate:
|
|
1872
|
+
byRate: s
|
|
1859
1873
|
}
|
|
1860
1874
|
};
|
|
1861
1875
|
}
|
|
1862
|
-
const
|
|
1876
|
+
const Ba = "onboarding-source", ja = ["support", "billing", "availability", "sales", "onboarding"], Ha = ["keep", "replace"], Ce = [
|
|
1863
1877
|
{
|
|
1864
1878
|
key: "shift",
|
|
1865
1879
|
label: "kind_shift",
|
|
@@ -1951,7 +1965,7 @@ function Lt(e, t, n = Ce) {
|
|
|
1951
1965
|
const r = N(e.kindKey, n);
|
|
1952
1966
|
return r.absent ? !1 : r.productive || r.capacity;
|
|
1953
1967
|
}
|
|
1954
|
-
function
|
|
1968
|
+
function Ga(e, t = Ce) {
|
|
1955
1969
|
if (!e.userId || !W(e.status)) return !1;
|
|
1956
1970
|
const n = N(e.kindKey, t);
|
|
1957
1971
|
return n.capacity || n.productive || n.absent;
|
|
@@ -1973,8 +1987,8 @@ function Ut(e, t) {
|
|
|
1973
1987
|
function Ft(e, t, n, r) {
|
|
1974
1988
|
const o = e.filter(
|
|
1975
1989
|
(a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
|
|
1976
|
-
),
|
|
1977
|
-
return
|
|
1990
|
+
), s = (a) => a.sort((c, l) => (l.effectiveFrom ?? 0) - (c.effectiveFrom ?? 0))[0], i = s(o.filter((a) => a.userId === t));
|
|
1991
|
+
return i || s(
|
|
1978
1992
|
o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
|
|
1979
1993
|
);
|
|
1980
1994
|
}
|
|
@@ -1993,14 +2007,14 @@ function ge(e, t, n, r) {
|
|
|
1993
2007
|
return o > 0 ? o / 1e3 : 0;
|
|
1994
2008
|
}
|
|
1995
2009
|
const tt = { interval: 0, day: 1, week: 2 };
|
|
1996
|
-
function
|
|
1997
|
-
const { entries: n, patterns: r = [], terms: o = [] } = t,
|
|
2010
|
+
function Wa(e, t) {
|
|
2011
|
+
const { entries: n, patterns: r = [], terms: o = [] } = t, s = n.filter(
|
|
1998
2012
|
(u) => u.userId && W(u.status) && N(u.kindKey).capacity
|
|
1999
|
-
),
|
|
2013
|
+
), i = n.filter(
|
|
2000
2014
|
(u) => u.userId && W(u.status) && N(u.kindKey).absent
|
|
2001
2015
|
), a = t.userIds ?? [
|
|
2002
2016
|
.../* @__PURE__ */ new Set([
|
|
2003
|
-
...
|
|
2017
|
+
...s.map((u) => u.userId),
|
|
2004
2018
|
...r.map((u) => u.userId),
|
|
2005
2019
|
...o.map((u) => u.userId)
|
|
2006
2020
|
])
|
|
@@ -2015,7 +2029,7 @@ function Ga(e, t) {
|
|
|
2015
2029
|
for (const h of kr(e)) {
|
|
2016
2030
|
const E = Math.max(h, e.from), x = Math.min(h + he, e.to);
|
|
2017
2031
|
m++;
|
|
2018
|
-
const C =
|
|
2032
|
+
const C = s.filter((k) => k.userId === u).reduce((k, $e) => k + ge($e.start, $e.end, E, x), 0);
|
|
2019
2033
|
if (C > 0) {
|
|
2020
2034
|
f += C;
|
|
2021
2035
|
continue;
|
|
@@ -2031,7 +2045,7 @@ function Ga(e, t) {
|
|
|
2031
2045
|
const h = wr(o, u, e.from);
|
|
2032
2046
|
h && (f += h.weeklyMinutes * 60 * (y / 7), d("week"));
|
|
2033
2047
|
}
|
|
2034
|
-
const S =
|
|
2048
|
+
const S = i.filter((h) => h.userId === u).reduce(
|
|
2035
2049
|
(h, E) => h + ge(E.start, E.end, e.from, e.to),
|
|
2036
2050
|
0
|
|
2037
2051
|
), g = Math.max(0, f - S);
|
|
@@ -2043,14 +2057,14 @@ function Ga(e, t) {
|
|
|
2043
2057
|
byUser: c
|
|
2044
2058
|
};
|
|
2045
2059
|
}
|
|
2046
|
-
function
|
|
2060
|
+
function Va(e, t) {
|
|
2047
2061
|
if (!e.some((a) => a.userId)) return [];
|
|
2048
2062
|
const n = "", r = /* @__PURE__ */ new Map();
|
|
2049
2063
|
for (const a of e) {
|
|
2050
2064
|
const c = a.userId ?? n;
|
|
2051
2065
|
r.set(c, (r.get(c) ?? 0) + a.seconds);
|
|
2052
2066
|
}
|
|
2053
|
-
const
|
|
2067
|
+
const s = [.../* @__PURE__ */ new Set([
|
|
2054
2068
|
...Object.keys(t.byUser),
|
|
2055
2069
|
...[...r.keys()].filter((a) => a !== n)
|
|
2056
2070
|
])].map((a) => {
|
|
@@ -2062,23 +2076,23 @@ function Wa(e, t) {
|
|
|
2062
2076
|
netSeconds: l - c
|
|
2063
2077
|
};
|
|
2064
2078
|
});
|
|
2065
|
-
|
|
2066
|
-
const
|
|
2067
|
-
return
|
|
2079
|
+
s.sort((a, c) => a.netSeconds - c.netSeconds);
|
|
2080
|
+
const i = r.get(n) ?? 0;
|
|
2081
|
+
return i > 0 && s.push({ requiredSeconds: i, capacitySeconds: 0, netSeconds: -i }), s;
|
|
2068
2082
|
}
|
|
2069
|
-
function
|
|
2083
|
+
function za(e, t, n, r) {
|
|
2070
2084
|
const o = e.filter(
|
|
2071
|
-
(
|
|
2072
|
-
),
|
|
2073
|
-
([
|
|
2085
|
+
(i) => i.userId && W(i.status) && !N(i.kindKey).absent
|
|
2086
|
+
), s = Object.entries(r.byUser).map(
|
|
2087
|
+
([i, a]) => {
|
|
2074
2088
|
let c = 0, l = 0;
|
|
2075
2089
|
for (const d of o) {
|
|
2076
|
-
if (d.userId !==
|
|
2090
|
+
if (d.userId !== i || N(d.kindKey).capacity && !d.workstreamId) continue;
|
|
2077
2091
|
const u = ge(d.start, d.end, n.from, n.to);
|
|
2078
2092
|
u <= 0 || (Lt(d, t) ? c += u : l += u);
|
|
2079
2093
|
}
|
|
2080
2094
|
return {
|
|
2081
|
-
userId:
|
|
2095
|
+
userId: i,
|
|
2082
2096
|
capacitySeconds: a,
|
|
2083
2097
|
onThisSeconds: c,
|
|
2084
2098
|
elsewhereSeconds: l,
|
|
@@ -2086,9 +2100,9 @@ function Va(e, t, n, r) {
|
|
|
2086
2100
|
};
|
|
2087
2101
|
}
|
|
2088
2102
|
);
|
|
2089
|
-
return
|
|
2103
|
+
return s.sort((i, a) => a.freeSeconds - i.freeSeconds), s;
|
|
2090
2104
|
}
|
|
2091
|
-
const
|
|
2105
|
+
const Xa = "demand-source", nt = 1e3;
|
|
2092
2106
|
function Mr(e, t) {
|
|
2093
2107
|
let n = 1;
|
|
2094
2108
|
for (let r = 1; r <= e; r++)
|
|
@@ -2112,9 +2126,9 @@ function xr(e, t, n, r) {
|
|
|
2112
2126
|
if (e <= 0 || t <= 0) return 0;
|
|
2113
2127
|
const o = Or(e, t, n);
|
|
2114
2128
|
if (o <= 0) return 0;
|
|
2115
|
-
const
|
|
2129
|
+
const s = r.serviceLevelPercent / 100, i = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
2116
2130
|
for (let a = Math.max(1, Math.ceil(o)); a <= nt; a++)
|
|
2117
|
-
if (!(a <= o) && !(Cr(a, o, r.targetSeconds, t) <
|
|
2131
|
+
if (!(a <= o) && !(Cr(a, o, r.targetSeconds, t) < s) && !(i && o / a > i))
|
|
2118
2132
|
return a;
|
|
2119
2133
|
return nt;
|
|
2120
2134
|
}
|
|
@@ -2122,7 +2136,7 @@ const Nr = 36e5, Rr = 864e5;
|
|
|
2122
2136
|
function Dr(e) {
|
|
2123
2137
|
return e === "day" ? Rr : Nr;
|
|
2124
2138
|
}
|
|
2125
|
-
function
|
|
2139
|
+
function Ya(e, t) {
|
|
2126
2140
|
return e.start < t.end && t.start < e.end;
|
|
2127
2141
|
}
|
|
2128
2142
|
function ce(e, t, n) {
|
|
@@ -2132,17 +2146,17 @@ function ce(e, t, n) {
|
|
|
2132
2146
|
function $r(e, t, n) {
|
|
2133
2147
|
const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
|
|
2134
2148
|
if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
|
|
2135
|
-
const
|
|
2149
|
+
const s = (t.unplannedLossPercent ?? 0) / 100, i = s > 0 && s < 1 ? 1 / (1 - s) : 1;
|
|
2136
2150
|
if (t.model === "queue" && e.volume !== void 0 && r > 0) {
|
|
2137
2151
|
const a = xr(e.volume, r, n, t);
|
|
2138
|
-
return { seconds: o, headcount: a *
|
|
2152
|
+
return { seconds: o, headcount: a * i };
|
|
2139
2153
|
}
|
|
2140
|
-
return { seconds: o, headcount: o / n *
|
|
2154
|
+
return { seconds: o, headcount: o / n * i };
|
|
2141
2155
|
}
|
|
2142
|
-
function
|
|
2143
|
-
const { entries: t, workstreamId: n, staffing: r, demand: o, range:
|
|
2144
|
-
for (let m = H(
|
|
2145
|
-
const S = m + a, g = j(m,
|
|
2156
|
+
function qa(e) {
|
|
2157
|
+
const { entries: t, workstreamId: n, staffing: r, demand: o, range: s } = e, i = e.grain ?? "hour", a = Dr(i), c = a / 1e3, l = e.kinds, d = t.filter((m) => W(m.status)), u = d.filter((m) => Lt(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
|
|
2158
|
+
for (let m = H(s.from, i); m < s.to; m += a) {
|
|
2159
|
+
const S = m + a, g = j(m, i);
|
|
2146
2160
|
let h = 0;
|
|
2147
2161
|
for (const k of u) h += ce(k, m, S);
|
|
2148
2162
|
let E = 0;
|
|
@@ -2167,11 +2181,11 @@ function Ya(e) {
|
|
|
2167
2181
|
function Lr(e, t) {
|
|
2168
2182
|
return e.workTypeKey ?? t?.defaultWorkTypeKey;
|
|
2169
2183
|
}
|
|
2170
|
-
function
|
|
2184
|
+
function Qa(e, t, n) {
|
|
2171
2185
|
const r = Lr(e, t);
|
|
2172
2186
|
return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
|
|
2173
2187
|
}
|
|
2174
|
-
function
|
|
2188
|
+
function Za(e) {
|
|
2175
2189
|
return e.filter(
|
|
2176
2190
|
(t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
|
|
2177
2191
|
);
|
|
@@ -2183,15 +2197,15 @@ function Br(e) {
|
|
|
2183
2197
|
}
|
|
2184
2198
|
function jr(e, t, n) {
|
|
2185
2199
|
const r = [];
|
|
2186
|
-
for (let
|
|
2187
|
-
const
|
|
2200
|
+
for (let s = 0; s < n; s++) {
|
|
2201
|
+
const i = t - s * ye, a = i - ye;
|
|
2188
2202
|
let c = 0, l = !1;
|
|
2189
2203
|
for (const [d, u] of e)
|
|
2190
|
-
d >= a && d <
|
|
2204
|
+
d >= a && d < i && (c += u, l = !0);
|
|
2191
2205
|
l && r.push(c);
|
|
2192
2206
|
}
|
|
2193
2207
|
if (r.length < 2) return 1;
|
|
2194
|
-
const o = r.reduce((
|
|
2208
|
+
const o = r.reduce((s, i) => s + i, 0) / r.length;
|
|
2195
2209
|
return o <= 0 ? 1 : Math.min(Fr, Math.max(Ur, r[0] / o));
|
|
2196
2210
|
}
|
|
2197
2211
|
function Hr(e, t) {
|
|
@@ -2201,30 +2215,30 @@ function Hr(e, t) {
|
|
|
2201
2215
|
t >= r.from && t < r.to && (n = r);
|
|
2202
2216
|
return n;
|
|
2203
2217
|
}
|
|
2204
|
-
function
|
|
2205
|
-
const r = Math.max(1, n?.weeks ?? Kr), o = /* @__PURE__ */ new Map(),
|
|
2218
|
+
function Ja(e, t, n) {
|
|
2219
|
+
const r = Math.max(1, n?.weeks ?? Kr), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
|
|
2206
2220
|
for (const c of e)
|
|
2207
|
-
o.set(Br(c.period), c.value),
|
|
2208
|
-
const
|
|
2221
|
+
o.set(Br(c.period), c.value), s.add(c.period.slice(0, 10));
|
|
2222
|
+
const i = jr(o, H(t.from, "hour"), r), a = [];
|
|
2209
2223
|
for (let c = H(t.from, "hour"); c < t.to; c += Pr) {
|
|
2210
2224
|
let l = 0, d = 0;
|
|
2211
2225
|
for (let f = 1; f <= r; f++) {
|
|
2212
|
-
const y = c - f * ye, S = o.get(y) ?? (
|
|
2226
|
+
const y = c - f * ye, S = o.get(y) ?? (s.has(j(y, "day")) ? 0 : void 0);
|
|
2213
2227
|
if (S === void 0) continue;
|
|
2214
2228
|
const g = r - f + 1;
|
|
2215
2229
|
l += S * g, d += g;
|
|
2216
2230
|
}
|
|
2217
|
-
let u = d > 0 ? l / d *
|
|
2231
|
+
let u = d > 0 ? l / d * i : 0;
|
|
2218
2232
|
const p = Hr(n?.adjustments, c);
|
|
2219
2233
|
p?.absoluteVolume !== void 0 ? u = p.absoluteVolume : p?.factor !== void 0 && (u *= p.factor), a.push({ period: j(c, "hour"), volume: u });
|
|
2220
2234
|
}
|
|
2221
2235
|
return a;
|
|
2222
2236
|
}
|
|
2223
2237
|
const Gr = "schedule_entry", Wr = "workstream";
|
|
2224
|
-
function
|
|
2238
|
+
function ec(e) {
|
|
2225
2239
|
return `${Gr}:${e}`;
|
|
2226
2240
|
}
|
|
2227
|
-
function
|
|
2241
|
+
function tc(e) {
|
|
2228
2242
|
return `${Wr}:${e}`;
|
|
2229
2243
|
}
|
|
2230
2244
|
const be = 36e5, K = 864e5;
|
|
@@ -2241,13 +2255,13 @@ function le(e, t, n, r) {
|
|
|
2241
2255
|
const o = Math.min(t, r) - Math.max(e, n);
|
|
2242
2256
|
return o > 0 ? o / 1e3 : 0;
|
|
2243
2257
|
}
|
|
2244
|
-
function
|
|
2245
|
-
const r = n.grain ?? "hour", o = Vr(t, r),
|
|
2258
|
+
function nc(e, t, n = {}) {
|
|
2259
|
+
const r = n.grain ?? "hour", o = Vr(t, r), s = r === "day" ? K : be, i = new Map(o.map((u) => [u, 0])), a = e.filter((u) => u.userId && N(u.kindKey).capacity), c = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
|
|
2246
2260
|
for (const u of a)
|
|
2247
2261
|
if (!(c && u.userId && !c.has(u.userId))) {
|
|
2248
2262
|
for (const p of o) {
|
|
2249
|
-
const f = le(u.start, u.end, p, p +
|
|
2250
|
-
f > 0 &&
|
|
2263
|
+
const f = le(u.start, u.end, p, p + s);
|
|
2264
|
+
f > 0 && i.set(p, (i.get(p) ?? 0) + f);
|
|
2251
2265
|
}
|
|
2252
2266
|
for (const p of rt(t))
|
|
2253
2267
|
le(u.start, u.end, p, p + K) > 0 && l.add(`${u.userId}:${p}`);
|
|
@@ -2271,18 +2285,18 @@ function tc(e, t, n = {}) {
|
|
|
2271
2285
|
if (S) {
|
|
2272
2286
|
const [E, x] = S.split(":").map(Number), C = f + E * be + (x ?? 0) * 6e4, M = C + m * 6e4;
|
|
2273
2287
|
for (const O of o) {
|
|
2274
|
-
const k = le(C, M, O, O +
|
|
2275
|
-
k > 0 &&
|
|
2288
|
+
const k = le(C, M, O, O + s);
|
|
2289
|
+
k > 0 && i.set(O, (i.get(O) ?? 0) + k);
|
|
2276
2290
|
}
|
|
2277
2291
|
continue;
|
|
2278
2292
|
}
|
|
2279
2293
|
const g = o.filter((E) => E >= f && E < f + K);
|
|
2280
2294
|
if (!g.length) continue;
|
|
2281
2295
|
const h = m * 60 / g.length;
|
|
2282
|
-
for (const E of g)
|
|
2296
|
+
for (const E of g) i.set(E, (i.get(E) ?? 0) + h);
|
|
2283
2297
|
}
|
|
2284
2298
|
}
|
|
2285
|
-
return o.map((u) => ({ period: j(u, r), weight:
|
|
2299
|
+
return o.map((u) => ({ period: j(u, r), weight: i.get(u) ?? 0 }));
|
|
2286
2300
|
}
|
|
2287
2301
|
function zr(e, t) {
|
|
2288
2302
|
if (e <= 0 || !t.length) return [];
|
|
@@ -2293,17 +2307,17 @@ function zr(e, t) {
|
|
|
2293
2307
|
}
|
|
2294
2308
|
return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
|
|
2295
2309
|
}
|
|
2296
|
-
function
|
|
2310
|
+
function rc(e, t, n) {
|
|
2297
2311
|
const r = /* @__PURE__ */ new Map();
|
|
2298
2312
|
for (const o of e) {
|
|
2299
|
-
const
|
|
2300
|
-
for (const a of zr(o.seconds,
|
|
2313
|
+
const s = o.by ? t.filter((a) => n(a.period) < o.by) : t, i = s.length ? s : t;
|
|
2314
|
+
for (const a of zr(o.seconds, i)) {
|
|
2301
2315
|
const c = `${a.period}|${o.userId ?? ""}`, l = r.get(c);
|
|
2302
2316
|
l ? l.seconds += a.seconds : r.set(c, { ...a, userId: o.userId });
|
|
2303
2317
|
}
|
|
2304
2318
|
}
|
|
2305
2319
|
return [...r.values()].sort(
|
|
2306
|
-
(o,
|
|
2320
|
+
(o, s) => o.period.localeCompare(s.period) || (o.userId ?? "").localeCompare(s.userId ?? "")
|
|
2307
2321
|
);
|
|
2308
2322
|
}
|
|
2309
2323
|
function Xr(e) {
|
|
@@ -2316,7 +2330,7 @@ function Xr(e) {
|
|
|
2316
2330
|
return "org";
|
|
2317
2331
|
}
|
|
2318
2332
|
}
|
|
2319
|
-
function
|
|
2333
|
+
function oc(e) {
|
|
2320
2334
|
if (typeof e != "string") return;
|
|
2321
2335
|
const t = e.trim();
|
|
2322
2336
|
if (t === "org") return { kind: "org" };
|
|
@@ -2342,13 +2356,13 @@ function qr(e) {
|
|
|
2342
2356
|
}
|
|
2343
2357
|
}
|
|
2344
2358
|
const Qr = qr;
|
|
2345
|
-
function
|
|
2359
|
+
function sc(e) {
|
|
2346
2360
|
return e.agentId ? { kind: "user", userId: e.agentId } : Qr(e.ownerScope);
|
|
2347
2361
|
}
|
|
2348
2362
|
function ic(e) {
|
|
2349
2363
|
return Yr(e);
|
|
2350
2364
|
}
|
|
2351
|
-
function
|
|
2365
|
+
function ac(e, t) {
|
|
2352
2366
|
if (!t) return;
|
|
2353
2367
|
let n = e;
|
|
2354
2368
|
for (const r of t.split(".")) {
|
|
@@ -2357,24 +2371,24 @@ function sc(e, t) {
|
|
|
2357
2371
|
}
|
|
2358
2372
|
return n;
|
|
2359
2373
|
}
|
|
2360
|
-
function
|
|
2374
|
+
function cc(e, t) {
|
|
2361
2375
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
2362
2376
|
}
|
|
2363
|
-
function
|
|
2377
|
+
function lc(e, t) {
|
|
2364
2378
|
if (t)
|
|
2365
2379
|
return e.targets.find((n) => n.id === t);
|
|
2366
2380
|
}
|
|
2367
2381
|
function Zr(e) {
|
|
2368
2382
|
return e?.kind === "assignment";
|
|
2369
2383
|
}
|
|
2370
|
-
function lc(e) {
|
|
2371
|
-
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
|
|
2372
|
-
return Zr(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";
|
|
2373
|
-
}
|
|
2374
2384
|
function uc(e) {
|
|
2385
|
+
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: s, authorUserId: i } = e;
|
|
2386
|
+
return Zr(t) ? n ? r ? r.activityTypes.includes(o) ? s ? s !== n ? "assigned to someone else" : i && i === 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";
|
|
2387
|
+
}
|
|
2388
|
+
function dc(e) {
|
|
2375
2389
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
2376
2390
|
}
|
|
2377
|
-
const
|
|
2391
|
+
const pc = [
|
|
2378
2392
|
{ name: "text", type: "string" },
|
|
2379
2393
|
{ name: "subject", type: "string" },
|
|
2380
2394
|
{ name: "from", type: "string" },
|
|
@@ -2414,7 +2428,7 @@ const dc = [
|
|
|
2414
2428
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
2415
2429
|
// the trigger filter runs — like contactId/companyId above.
|
|
2416
2430
|
{ name: "assigneeUserId", type: "string" }
|
|
2417
|
-
],
|
|
2431
|
+
], fc = {
|
|
2418
2432
|
topics: [
|
|
2419
2433
|
{ name: "topicId", type: "string" },
|
|
2420
2434
|
{ name: "topic", type: "string" },
|
|
@@ -2436,48 +2450,48 @@ function to(e) {
|
|
|
2436
2450
|
return e?.type === eo ? e.id : void 0;
|
|
2437
2451
|
}
|
|
2438
2452
|
const no = 64, ro = 8e3;
|
|
2439
|
-
function
|
|
2453
|
+
function mc(e) {
|
|
2440
2454
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
2441
2455
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
2442
2456
|
return Math.min(Math.max(Math.round(t), no), ro);
|
|
2443
2457
|
}
|
|
2444
|
-
const
|
|
2445
|
-
function
|
|
2458
|
+
const hc = { kind: "workflow", steps: [] };
|
|
2459
|
+
function gc(e) {
|
|
2446
2460
|
return e?.kind === "workflow" ? e.steps : [];
|
|
2447
2461
|
}
|
|
2448
|
-
function
|
|
2462
|
+
function yc(e) {
|
|
2449
2463
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
2450
2464
|
}
|
|
2451
2465
|
function oo(e) {
|
|
2452
2466
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
2453
2467
|
return { total: n, rate: n ? t / n : 0 };
|
|
2454
2468
|
}
|
|
2455
|
-
const
|
|
2456
|
-
function
|
|
2469
|
+
const so = 10, io = 0.9;
|
|
2470
|
+
function bc(e) {
|
|
2457
2471
|
const { total: t, rate: n } = oo(e);
|
|
2458
|
-
return t >=
|
|
2472
|
+
return t >= so && n >= io;
|
|
2459
2473
|
}
|
|
2460
2474
|
const ao = ["done", "escalated", "failed", "stopped"];
|
|
2461
|
-
function
|
|
2475
|
+
function Ac(e) {
|
|
2462
2476
|
return ao.includes(e);
|
|
2463
2477
|
}
|
|
2464
2478
|
function co(e) {
|
|
2465
2479
|
return e === "waiting";
|
|
2466
2480
|
}
|
|
2467
|
-
function
|
|
2481
|
+
function _c(e) {
|
|
2468
2482
|
return e === "running" || co(e);
|
|
2469
2483
|
}
|
|
2470
2484
|
function Bt(e) {
|
|
2471
2485
|
return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
|
|
2472
2486
|
}
|
|
2473
|
-
function
|
|
2487
|
+
function Ec(e) {
|
|
2474
2488
|
const t = Bt(e);
|
|
2475
2489
|
return t ? Jr(t) : void 0;
|
|
2476
2490
|
}
|
|
2477
|
-
function
|
|
2491
|
+
function Sc(e) {
|
|
2478
2492
|
return to(Bt(e));
|
|
2479
2493
|
}
|
|
2480
|
-
function
|
|
2494
|
+
function Ic(e) {
|
|
2481
2495
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
2482
2496
|
for (const r of [...e].sort(lo)) {
|
|
2483
2497
|
const o = n.get(r.emoji);
|
|
@@ -2493,7 +2507,7 @@ function Sc(e) {
|
|
|
2493
2507
|
}).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
|
|
2494
2508
|
}
|
|
2495
2509
|
const lo = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
2496
|
-
function
|
|
2510
|
+
function Tc(e, t) {
|
|
2497
2511
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
2498
2512
|
}
|
|
2499
2513
|
const Ae = 6e4, uo = 36e5, V = 864e5, jt = 800;
|
|
@@ -2515,10 +2529,10 @@ function fo(e) {
|
|
|
2515
2529
|
function Gt(e, t) {
|
|
2516
2530
|
const n = Ht(e, t), r = e + n, o = Math.floor(r / V);
|
|
2517
2531
|
if (!t.days.includes(fo(o))) return null;
|
|
2518
|
-
const
|
|
2532
|
+
const s = o * V;
|
|
2519
2533
|
return {
|
|
2520
|
-
open:
|
|
2521
|
-
close:
|
|
2534
|
+
open: s + t.fromMinutes * Ae - n,
|
|
2535
|
+
close: s + t.toMinutes * Ae - n
|
|
2522
2536
|
};
|
|
2523
2537
|
}
|
|
2524
2538
|
function Wt(e, t) {
|
|
@@ -2529,10 +2543,10 @@ function _e(e, t, n) {
|
|
|
2529
2543
|
if (t <= e) return 0;
|
|
2530
2544
|
if (!n) return t - e;
|
|
2531
2545
|
let r = 0, o = e;
|
|
2532
|
-
for (let
|
|
2533
|
-
const
|
|
2534
|
-
if (
|
|
2535
|
-
const a = Math.max(o,
|
|
2546
|
+
for (let s = 0; s < jt && o < t; s++) {
|
|
2547
|
+
const i = Gt(o, n);
|
|
2548
|
+
if (i) {
|
|
2549
|
+
const a = Math.max(o, i.open), c = Math.min(t, i.close);
|
|
2536
2550
|
c > a && (r += c - a);
|
|
2537
2551
|
}
|
|
2538
2552
|
o = Wt(o, n);
|
|
@@ -2542,12 +2556,12 @@ function _e(e, t, n) {
|
|
|
2542
2556
|
function Oe(e, t, n) {
|
|
2543
2557
|
if (!n) return e + t;
|
|
2544
2558
|
let r = t, o = e;
|
|
2545
|
-
for (let
|
|
2546
|
-
const
|
|
2547
|
-
if (
|
|
2548
|
-
const a = Math.max(o,
|
|
2549
|
-
if (
|
|
2550
|
-
const c =
|
|
2559
|
+
for (let s = 0; s < jt; s++) {
|
|
2560
|
+
const i = Gt(o, n);
|
|
2561
|
+
if (i) {
|
|
2562
|
+
const a = Math.max(o, i.open);
|
|
2563
|
+
if (i.close > a) {
|
|
2564
|
+
const c = i.close - a;
|
|
2551
2565
|
if (r <= c) return a + r;
|
|
2552
2566
|
r -= c;
|
|
2553
2567
|
}
|
|
@@ -2556,32 +2570,32 @@ function Oe(e, t, n) {
|
|
|
2556
2570
|
}
|
|
2557
2571
|
return e + t;
|
|
2558
2572
|
}
|
|
2559
|
-
function
|
|
2573
|
+
function wc(e) {
|
|
2560
2574
|
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
2561
2575
|
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
2562
2576
|
}
|
|
2563
2577
|
const Ee = 1, Se = 2;
|
|
2564
|
-
function
|
|
2578
|
+
function kc(e) {
|
|
2565
2579
|
return e === "snoozed" ? Ee : Se;
|
|
2566
2580
|
}
|
|
2567
2581
|
function xe(e) {
|
|
2568
2582
|
const t = e.calendar;
|
|
2569
2583
|
return t && Array.isArray(t.days) ? t : null;
|
|
2570
2584
|
}
|
|
2571
|
-
const
|
|
2585
|
+
const Mc = [
|
|
2572
2586
|
"speed_of_answer",
|
|
2573
2587
|
"first_response",
|
|
2574
2588
|
"next_response",
|
|
2575
2589
|
"resolution",
|
|
2576
2590
|
"close"
|
|
2577
|
-
],
|
|
2591
|
+
], vc = ["snoozed", "waiting_for_customer"], mo = 6e4, Vt = ["speed_of_answer", "first_response", "next_response"], ho = [...Vt, "resolution", "close"];
|
|
2578
2592
|
function z(e) {
|
|
2579
2593
|
return e.state === "running" || e.state === "paused";
|
|
2580
2594
|
}
|
|
2581
2595
|
function go(e, t) {
|
|
2582
2596
|
return z(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
2583
2597
|
}
|
|
2584
|
-
function
|
|
2598
|
+
function st(e) {
|
|
2585
2599
|
return z(e) ? { state: "void" } : null;
|
|
2586
2600
|
}
|
|
2587
2601
|
function yo(e, t, n, r) {
|
|
@@ -2594,19 +2608,19 @@ function bo(e, t, n, r) {
|
|
|
2594
2608
|
const o = e.pauseBits & ~t;
|
|
2595
2609
|
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: Oe(n, e.remainingMs, r) };
|
|
2596
2610
|
}
|
|
2597
|
-
function
|
|
2598
|
-
const
|
|
2611
|
+
function Cc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
2612
|
+
const s = xe(o), i = Math.min(t, n), a = r.map((g) => ({ ...g })), c = [], l = (g, h) => {
|
|
2599
2613
|
h && (c.push({ op: "patch", clockId: g.id, patch: h }), Object.assign(g, h));
|
|
2600
2614
|
}, d = (g) => {
|
|
2601
2615
|
for (const h of a)
|
|
2602
|
-
h.metric === g && l(h, go(h,
|
|
2616
|
+
h.metric === g && l(h, go(h, i));
|
|
2603
2617
|
}, u = (g) => {
|
|
2604
2618
|
for (const h of a)
|
|
2605
|
-
g.includes(h.metric) && l(h,
|
|
2619
|
+
g.includes(h.metric) && l(h, st(h));
|
|
2606
2620
|
}, p = (g) => {
|
|
2607
|
-
for (const h of a) l(h, yo(h, g,
|
|
2621
|
+
for (const h of a) l(h, yo(h, g, i, s));
|
|
2608
2622
|
}, f = (g) => {
|
|
2609
|
-
for (const h of a) l(h, bo(h, g,
|
|
2623
|
+
for (const h of a) l(h, bo(h, g, i, s));
|
|
2610
2624
|
}, y = (g) => a.reduce((h, E) => E.metric === g ? Math.max(h, E.attempt) : h, 0) + 1, m = (g) => a.some((h) => h.metric === g && z(h)), S = (g, h) => {
|
|
2611
2625
|
const E = o.targets.find((C) => C.metric === g);
|
|
2612
2626
|
if (!E) return;
|
|
@@ -2617,18 +2631,18 @@ function vc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2617
2631
|
attempt: y(g),
|
|
2618
2632
|
startedAt: h,
|
|
2619
2633
|
targetMs: x,
|
|
2620
|
-
dueAt: Oe(h, x,
|
|
2634
|
+
dueAt: Oe(h, x, s)
|
|
2621
2635
|
});
|
|
2622
2636
|
};
|
|
2623
2637
|
switch (e) {
|
|
2624
2638
|
case "apply": {
|
|
2625
2639
|
for (const g of a)
|
|
2626
|
-
g.profileId !== o.id && l(g,
|
|
2640
|
+
g.profileId !== o.id && l(g, st(g));
|
|
2627
2641
|
for (const g of o.targets) {
|
|
2628
2642
|
if (g.metric === "next_response") continue;
|
|
2629
2643
|
a.some(
|
|
2630
2644
|
(E) => E.metric === g.metric && E.profileId === o.id
|
|
2631
|
-
) || S(g.metric,
|
|
2645
|
+
) || S(g.metric, i);
|
|
2632
2646
|
}
|
|
2633
2647
|
break;
|
|
2634
2648
|
}
|
|
@@ -2640,7 +2654,7 @@ function vc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2640
2654
|
break;
|
|
2641
2655
|
}
|
|
2642
2656
|
case "inbound": {
|
|
2643
|
-
f(Se), !m("first_response") && !m("next_response") && S("next_response",
|
|
2657
|
+
f(Se), !m("first_response") && !m("next_response") && S("next_response", i);
|
|
2644
2658
|
break;
|
|
2645
2659
|
}
|
|
2646
2660
|
case "resolved":
|
|
@@ -2650,7 +2664,7 @@ function vc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2650
2664
|
d("close"), d("resolution"), u(Vt);
|
|
2651
2665
|
break;
|
|
2652
2666
|
case "reopened":
|
|
2653
|
-
m("resolution") || S("resolution",
|
|
2667
|
+
m("resolution") || S("resolution", i), m("close") || S("close", i);
|
|
2654
2668
|
break;
|
|
2655
2669
|
case "snoozed":
|
|
2656
2670
|
o.pauseOn.includes("snoozed") && p(Ee);
|
|
@@ -2671,18 +2685,18 @@ function Ie(e, t) {
|
|
|
2671
2685
|
const n = xe(e);
|
|
2672
2686
|
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -_e(e.dueAt, t, n) : _e(t, e.dueAt, n);
|
|
2673
2687
|
}
|
|
2674
|
-
function
|
|
2688
|
+
function Oc(e, t) {
|
|
2675
2689
|
return e.state === "paused" ? Oe(t, e.remainingMs, xe(e)) : e.dueAt;
|
|
2676
2690
|
}
|
|
2677
|
-
function
|
|
2691
|
+
function xc(e, t) {
|
|
2678
2692
|
const n = e.filter(Ao);
|
|
2679
2693
|
if (!n.length) return;
|
|
2680
|
-
const r = n.filter((
|
|
2694
|
+
const r = n.filter((s) => s.state === "running");
|
|
2681
2695
|
return (r.length ? r : n).reduce(
|
|
2682
|
-
(
|
|
2696
|
+
(s, i) => Ie(i, t) < Ie(s, t) ? i : s
|
|
2683
2697
|
);
|
|
2684
2698
|
}
|
|
2685
|
-
function
|
|
2699
|
+
function Nc(e, t) {
|
|
2686
2700
|
if (e.state === "missed") return "breached";
|
|
2687
2701
|
if (e.state === "hit") return "met";
|
|
2688
2702
|
if (e.state === "paused") return "paused";
|
|
@@ -2690,7 +2704,7 @@ function xc(e, t) {
|
|
|
2690
2704
|
const n = Ie(e, t);
|
|
2691
2705
|
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
2692
2706
|
}
|
|
2693
|
-
function
|
|
2707
|
+
function Rc(e) {
|
|
2694
2708
|
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);
|
|
2695
2709
|
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
|
|
2696
2710
|
}
|
|
@@ -2698,12 +2712,12 @@ const _o = "strategy_item";
|
|
|
2698
2712
|
function zt(e) {
|
|
2699
2713
|
return `${_o}:${e}`;
|
|
2700
2714
|
}
|
|
2701
|
-
function
|
|
2715
|
+
function Dc(e, t = 25) {
|
|
2702
2716
|
const n = /* @__PURE__ */ new Set([zt(e.id)]);
|
|
2703
2717
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2704
2718
|
return Array.from(n).slice(0, t);
|
|
2705
2719
|
}
|
|
2706
|
-
function
|
|
2720
|
+
function $c(e) {
|
|
2707
2721
|
return e ? [...e.ancestorKeys ?? [], zt(e.id)] : [];
|
|
2708
2722
|
}
|
|
2709
2723
|
const ne = [
|
|
@@ -2717,14 +2731,14 @@ function Io(e, t = ne) {
|
|
|
2717
2731
|
function Te(e, t = ne) {
|
|
2718
2732
|
return Io(e, t)?.order ?? Eo;
|
|
2719
2733
|
}
|
|
2720
|
-
function
|
|
2734
|
+
function Lc(e, t, n = ne) {
|
|
2721
2735
|
return Te(t, n) <= Te(e, n);
|
|
2722
2736
|
}
|
|
2723
|
-
function
|
|
2737
|
+
function Pc(e, t = ne) {
|
|
2724
2738
|
const n = Te(e, t);
|
|
2725
|
-
return t.filter((o) => o.order > n).sort((o,
|
|
2739
|
+
return t.filter((o) => o.order > n).sort((o, s) => o.order - s.order)[0]?.key ?? e;
|
|
2726
2740
|
}
|
|
2727
|
-
function
|
|
2741
|
+
function Kc(e) {
|
|
2728
2742
|
const t = e.trim().toLowerCase();
|
|
2729
2743
|
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;
|
|
2730
2744
|
}
|
|
@@ -2737,86 +2751,86 @@ const we = {
|
|
|
2737
2751
|
achieved: "closed",
|
|
2738
2752
|
missed: "closed"
|
|
2739
2753
|
};
|
|
2740
|
-
function
|
|
2754
|
+
function Uc(e) {
|
|
2741
2755
|
return we[e] ?? "open";
|
|
2742
2756
|
}
|
|
2743
|
-
function
|
|
2757
|
+
function Fc(e) {
|
|
2744
2758
|
return Object.keys(we).filter(
|
|
2745
2759
|
(t) => e.includes(we[t])
|
|
2746
2760
|
);
|
|
2747
2761
|
}
|
|
2748
2762
|
const To = 864e5, re = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
|
|
2749
|
-
function
|
|
2763
|
+
function Bc(e, t) {
|
|
2750
2764
|
const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
|
|
2751
2765
|
if (!Number.isFinite(t)) return 0;
|
|
2752
|
-
const
|
|
2753
|
-
return (n === "down" ?
|
|
2766
|
+
const s = n === "down" ? t <= o : t >= o, i = o - r;
|
|
2767
|
+
return (n === "down" ? i < 0 : i > 0) ? re((t - r) / i) : s ? 1 : 0;
|
|
2754
2768
|
}
|
|
2755
|
-
function
|
|
2769
|
+
function jc(e, t) {
|
|
2756
2770
|
const { startDate: n, targetDate: r } = e;
|
|
2757
2771
|
if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
|
|
2758
2772
|
return re((t - n) / (r - n));
|
|
2759
2773
|
}
|
|
2760
2774
|
const wo = 0.1, ko = 0.25;
|
|
2761
|
-
function
|
|
2775
|
+
function Hc(e, t) {
|
|
2762
2776
|
if (typeof e != "number" || typeof t != "number") return;
|
|
2763
2777
|
if (e >= 1) return "achieved";
|
|
2764
2778
|
const n = t - e;
|
|
2765
2779
|
return n >= ko ? "off_track" : n >= wo ? "at_risk" : "on_track";
|
|
2766
2780
|
}
|
|
2767
|
-
function
|
|
2781
|
+
function Gc(e, t) {
|
|
2768
2782
|
if (t)
|
|
2769
2783
|
return re(e / t);
|
|
2770
2784
|
}
|
|
2771
|
-
function
|
|
2785
|
+
function Wc(e) {
|
|
2772
2786
|
const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
|
|
2773
2787
|
if (t.length)
|
|
2774
2788
|
return re(t.reduce((n, r) => n + r, 0) / t.length);
|
|
2775
2789
|
}
|
|
2776
|
-
function
|
|
2790
|
+
function Vc(e, t) {
|
|
2777
2791
|
const n = e.lastCheckInAt ?? e.createdAt;
|
|
2778
2792
|
if (typeof n != "number") return 0;
|
|
2779
2793
|
const r = (e.checkInEveryDays ?? So) * To, o = t - n - r;
|
|
2780
2794
|
return o > 0 ? o : 0;
|
|
2781
2795
|
}
|
|
2782
|
-
function
|
|
2796
|
+
function zc(e) {
|
|
2783
2797
|
return e.targetDate ?? Number.MAX_SAFE_INTEGER;
|
|
2784
2798
|
}
|
|
2785
|
-
function
|
|
2799
|
+
function Xc(e, t) {
|
|
2786
2800
|
const n = e.accumulatedSeconds || 0;
|
|
2787
2801
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
2788
2802
|
}
|
|
2789
|
-
function
|
|
2803
|
+
function Yc(e, t) {
|
|
2790
2804
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
2791
2805
|
if (!t || t === "exact") return n * 60;
|
|
2792
2806
|
const r = Number(t);
|
|
2793
2807
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
2794
2808
|
}
|
|
2795
|
-
function
|
|
2809
|
+
function qc(e) {
|
|
2796
2810
|
const t = Math.max(0, Math.round(e / 60));
|
|
2797
2811
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
2798
2812
|
}
|
|
2799
|
-
function
|
|
2800
|
-
const t = Math.max(0, Math.floor(e)), n = (
|
|
2813
|
+
function Qc(e) {
|
|
2814
|
+
const t = Math.max(0, Math.floor(e)), n = (s) => String(s).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
|
|
2801
2815
|
return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
2802
2816
|
}
|
|
2803
2817
|
function Mo(e) {
|
|
2804
2818
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2805
2819
|
}
|
|
2806
|
-
function
|
|
2820
|
+
function Zc(e, t) {
|
|
2807
2821
|
const n = Mo(e) || "werksoort", r = new Set(t);
|
|
2808
2822
|
if (!r.has(n)) return n;
|
|
2809
2823
|
for (let o = 2; o < 500; o++) {
|
|
2810
|
-
const
|
|
2811
|
-
if (!r.has(
|
|
2824
|
+
const s = `${n}-${o}`;
|
|
2825
|
+
if (!r.has(s)) return s;
|
|
2812
2826
|
}
|
|
2813
2827
|
return `${n}-${r.size + 1}`;
|
|
2814
2828
|
}
|
|
2815
|
-
function
|
|
2829
|
+
function Jc(e, t) {
|
|
2816
2830
|
const n = e.ownerScope;
|
|
2817
2831
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
2818
2832
|
}
|
|
2819
|
-
function
|
|
2833
|
+
function el(e) {
|
|
2820
2834
|
return e.filter((t) => !t.archived).sort(vo);
|
|
2821
2835
|
}
|
|
2822
2836
|
function vo(e, t) {
|
|
@@ -2833,25 +2847,25 @@ function xo(e) {
|
|
|
2833
2847
|
const n = t.slice(0, ue), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
2834
2848
|
return r > ue * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
2835
2849
|
}
|
|
2836
|
-
function
|
|
2850
|
+
function tl(e, t) {
|
|
2837
2851
|
const n = xo(t.text), r = P(n);
|
|
2838
|
-
if (!r || (e.examples ?? []).some((
|
|
2839
|
-
const o = e.exampleCandidates ?? [],
|
|
2840
|
-
if (
|
|
2841
|
-
if (o[
|
|
2842
|
-
const
|
|
2843
|
-
return s
|
|
2852
|
+
if (!r || (e.examples ?? []).some((i) => P(i) === r)) return null;
|
|
2853
|
+
const o = e.exampleCandidates ?? [], s = o.findIndex((i) => P(i.text) === r);
|
|
2854
|
+
if (s >= 0) {
|
|
2855
|
+
if (o[s].corrected || !t.corrected) return null;
|
|
2856
|
+
const i = [...o];
|
|
2857
|
+
return i[s] = { ...i[s], corrected: !0, addedAt: t.addedAt }, it(i);
|
|
2844
2858
|
}
|
|
2845
|
-
return
|
|
2859
|
+
return it([{ ...t, text: n }, ...o]).slice(0, Oo);
|
|
2846
2860
|
}
|
|
2847
|
-
function
|
|
2861
|
+
function it(e) {
|
|
2848
2862
|
return [...e].sort(
|
|
2849
2863
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
2850
2864
|
);
|
|
2851
2865
|
}
|
|
2852
|
-
function
|
|
2853
|
-
const n = P(t), r = (e.examples ?? []).filter((
|
|
2854
|
-
return { examples: r.some((
|
|
2866
|
+
function nl(e, t) {
|
|
2867
|
+
const n = P(t), r = (e.examples ?? []).filter((s) => s.trim());
|
|
2868
|
+
return { examples: r.some((s) => P(s) === n) ? r : [...r, t].slice(-Co), exampleCandidates: No(e, t) };
|
|
2855
2869
|
}
|
|
2856
2870
|
function No(e, t) {
|
|
2857
2871
|
const n = P(t);
|
|
@@ -2861,7 +2875,7 @@ function Ro(e, t) {
|
|
|
2861
2875
|
const n = e.ownerScope;
|
|
2862
2876
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
2863
2877
|
}
|
|
2864
|
-
function
|
|
2878
|
+
function rl(e, t) {
|
|
2865
2879
|
return e.filter((n) => Ro(n, t));
|
|
2866
2880
|
}
|
|
2867
2881
|
const Xt = [
|
|
@@ -2903,10 +2917,10 @@ function ke(e) {
|
|
|
2903
2917
|
statuses: ["draft"]
|
|
2904
2918
|
};
|
|
2905
2919
|
}
|
|
2906
|
-
function
|
|
2920
|
+
function ol(e) {
|
|
2907
2921
|
return e.issuedAt != null;
|
|
2908
2922
|
}
|
|
2909
|
-
const
|
|
2923
|
+
const sl = [
|
|
2910
2924
|
"status",
|
|
2911
2925
|
"fileRef",
|
|
2912
2926
|
"number",
|
|
@@ -2954,7 +2968,7 @@ function il(e) {
|
|
|
2954
2968
|
totals: e.totals
|
|
2955
2969
|
};
|
|
2956
2970
|
}
|
|
2957
|
-
function
|
|
2971
|
+
function al(e, t = {}) {
|
|
2958
2972
|
const n = ke(e.kindKey), r = e.totals ?? { netCents: 0, taxCents: 0, grossCents: 0 };
|
|
2959
2973
|
return {
|
|
2960
2974
|
customer: {
|
|
@@ -2988,8 +3002,8 @@ function sl(e, t = {}) {
|
|
|
2988
3002
|
}
|
|
2989
3003
|
};
|
|
2990
3004
|
}
|
|
2991
|
-
function
|
|
2992
|
-
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((c) => c.key === a)?.percent ?? 0,
|
|
3005
|
+
function cl(e, t = [], n = $o) {
|
|
3006
|
+
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((c) => c.key === a)?.percent ?? 0, s = {
|
|
2993
3007
|
block_id: "lines",
|
|
2994
3008
|
type: "table",
|
|
2995
3009
|
columns: [
|
|
@@ -3009,7 +3023,7 @@ function al(e, t = [], n = $o) {
|
|
|
3009
3023
|
D(a.netCents)
|
|
3010
3024
|
]
|
|
3011
3025
|
)
|
|
3012
|
-
},
|
|
3026
|
+
}, i = {
|
|
3013
3027
|
block_id: "totals",
|
|
3014
3028
|
type: "totals",
|
|
3015
3029
|
rows: [
|
|
@@ -3021,7 +3035,7 @@ function al(e, t = [], n = $o) {
|
|
|
3021
3035
|
amount: D(a.taxCents)
|
|
3022
3036
|
}))
|
|
3023
3037
|
};
|
|
3024
|
-
return { lines: [
|
|
3038
|
+
return { lines: [s], totals: [i] };
|
|
3025
3039
|
}
|
|
3026
3040
|
const $o = {
|
|
3027
3041
|
description: "Omschrijving",
|
|
@@ -3042,7 +3056,7 @@ function at(e) {
|
|
|
3042
3056
|
const t = new Date(e), n = (r) => String(r).padStart(2, "0");
|
|
3043
3057
|
return `${n(t.getDate())}-${n(t.getMonth() + 1)}-${t.getFullYear()}`;
|
|
3044
3058
|
}
|
|
3045
|
-
const
|
|
3059
|
+
const ll = [
|
|
3046
3060
|
{
|
|
3047
3061
|
block_id: "head",
|
|
3048
3062
|
type: "letterhead",
|
|
@@ -3076,22 +3090,22 @@ Hierbij onze offerte. Hieronder vindt u de specificatie.`
|
|
|
3076
3090
|
text: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld. Deze offerte is geldig tot {quote.valid_until}."
|
|
3077
3091
|
}
|
|
3078
3092
|
], Ko = Xt.map((e) => e.key), Uo = "product";
|
|
3079
|
-
function
|
|
3093
|
+
function ul(e, t) {
|
|
3080
3094
|
return `${e}:${t}`;
|
|
3081
3095
|
}
|
|
3082
|
-
function
|
|
3096
|
+
function dl(e) {
|
|
3083
3097
|
return `${Uo}:${e}`;
|
|
3084
3098
|
}
|
|
3085
|
-
function
|
|
3099
|
+
function pl(e) {
|
|
3086
3100
|
const t = e.indexOf(":");
|
|
3087
3101
|
if (t < 0) return;
|
|
3088
3102
|
const n = e.slice(0, t);
|
|
3089
3103
|
return Ko.includes(n) ? e.slice(t + 1) : void 0;
|
|
3090
3104
|
}
|
|
3091
|
-
function
|
|
3105
|
+
function fl(e) {
|
|
3092
3106
|
return e.type === "agent";
|
|
3093
3107
|
}
|
|
3094
|
-
const
|
|
3108
|
+
const ml = "WORK_COMMENT_ADDED", hl = "WORK_ITEM_ASSIGNED", gl = "WORK_ITEM_STATUS_CHANGED";
|
|
3095
3109
|
function Fo(e, t) {
|
|
3096
3110
|
const n = (r) => {
|
|
3097
3111
|
const o = new Date(r);
|
|
@@ -3099,15 +3113,15 @@ function Fo(e, t) {
|
|
|
3099
3113
|
};
|
|
3100
3114
|
return Math.round((n(e) - n(t)) / qn);
|
|
3101
3115
|
}
|
|
3102
|
-
function
|
|
3116
|
+
function yl(e, t) {
|
|
3103
3117
|
if (e.closedAt != null) return { score: L, reasons: [] };
|
|
3104
3118
|
const n = t.remindersById?.[e.id];
|
|
3105
3119
|
if (n && n.remindAt > t.now) return { score: L, reasons: [] };
|
|
3106
3120
|
let r = 0;
|
|
3107
|
-
const o = [],
|
|
3108
|
-
if (J[
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3121
|
+
const o = [], s = e.priority ?? "normal";
|
|
3122
|
+
if (J[s] > 0 && (r += J[s], o.push(`priority:${s}`)), typeof e.dueDate == "number") {
|
|
3123
|
+
const i = Fo(e.dueDate, t.now);
|
|
3124
|
+
i < 0 ? (r += 35, o.push("overdue")) : i === 0 && (r += 20, o.push("due-today"));
|
|
3111
3125
|
}
|
|
3112
3126
|
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
|
|
3113
3127
|
}
|
|
@@ -3119,35 +3133,35 @@ const Ne = [
|
|
|
3119
3133
|
{ key: "subtask", label: "type_subtask" },
|
|
3120
3134
|
{ key: "case", label: "type_case" },
|
|
3121
3135
|
{ key: "deal", label: "type_deal" }
|
|
3122
|
-
],
|
|
3123
|
-
function
|
|
3136
|
+
], bl = Ne.map((e) => e.key);
|
|
3137
|
+
function Al(e) {
|
|
3124
3138
|
return e?.types?.length ? e.types : Ne;
|
|
3125
3139
|
}
|
|
3126
|
-
function
|
|
3140
|
+
function _l(e, t) {
|
|
3127
3141
|
return t.find((n) => n.key === e);
|
|
3128
3142
|
}
|
|
3129
|
-
function
|
|
3143
|
+
function El(e) {
|
|
3130
3144
|
const t = e.trim().toLowerCase();
|
|
3131
3145
|
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;
|
|
3132
3146
|
}
|
|
3133
|
-
function
|
|
3147
|
+
function Sl(...e) {
|
|
3134
3148
|
return e.map((t) => Ne.find((n) => n.key === t)).filter((t) => !!t);
|
|
3135
3149
|
}
|
|
3136
|
-
const Bo = "work_item", jo = "work_project", Ho = "work_activity",
|
|
3150
|
+
const Bo = "work_item", jo = "work_project", Ho = "work_activity", Il = "work_cycle";
|
|
3137
3151
|
function Go(e) {
|
|
3138
3152
|
return `${Bo}:${e}`;
|
|
3139
3153
|
}
|
|
3140
3154
|
function Yt(e) {
|
|
3141
3155
|
return `${jo}:${e}`;
|
|
3142
3156
|
}
|
|
3143
|
-
function
|
|
3157
|
+
function Tl(e) {
|
|
3144
3158
|
return `${Ho}:${e}`;
|
|
3145
3159
|
}
|
|
3146
|
-
function
|
|
3160
|
+
function wl(e, t, n) {
|
|
3147
3161
|
const r = `${e}-${t}`;
|
|
3148
3162
|
return n ? `${r}-${n}` : r;
|
|
3149
3163
|
}
|
|
3150
|
-
function
|
|
3164
|
+
function kl(e) {
|
|
3151
3165
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
3152
3166
|
return t ? {
|
|
3153
3167
|
projectKey: t[1].toUpperCase(),
|
|
@@ -3155,17 +3169,17 @@ function wl(e) {
|
|
|
3155
3169
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
3156
3170
|
} : null;
|
|
3157
3171
|
}
|
|
3158
|
-
function
|
|
3172
|
+
function Ml(e) {
|
|
3159
3173
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
3160
3174
|
}
|
|
3161
|
-
function
|
|
3175
|
+
function vl(e, t = 25) {
|
|
3162
3176
|
const n = /* @__PURE__ */ new Set([Go(e.id)]);
|
|
3163
3177
|
e.projectId && n.add(Yt(e.projectId));
|
|
3164
3178
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
3165
3179
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
3166
3180
|
return Array.from(n).slice(0, t);
|
|
3167
3181
|
}
|
|
3168
|
-
function
|
|
3182
|
+
function Cl(e) {
|
|
3169
3183
|
return [Yt(e.id)];
|
|
3170
3184
|
}
|
|
3171
3185
|
const Re = [
|
|
@@ -3180,10 +3194,10 @@ function Wo(e) {
|
|
|
3180
3194
|
function Vo(e, t) {
|
|
3181
3195
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
3182
3196
|
}
|
|
3183
|
-
function
|
|
3197
|
+
function Ol(e, t) {
|
|
3184
3198
|
return t.find((n) => n.key === e);
|
|
3185
3199
|
}
|
|
3186
|
-
function
|
|
3200
|
+
function xl(e) {
|
|
3187
3201
|
const t = Wo(e), n = e?.defaultStatusKey;
|
|
3188
3202
|
return n && t.some((r) => r.key === n) ? n : zo(t)[0]?.key ?? Re[0].key;
|
|
3189
3203
|
}
|
|
@@ -3193,22 +3207,22 @@ function zo(e) {
|
|
|
3193
3207
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
3194
3208
|
});
|
|
3195
3209
|
}
|
|
3196
|
-
function
|
|
3210
|
+
function Nl(e, t) {
|
|
3197
3211
|
return Vo(e, t) === "done";
|
|
3198
3212
|
}
|
|
3199
3213
|
function Xo(e) {
|
|
3200
3214
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
3201
3215
|
}
|
|
3202
|
-
function
|
|
3216
|
+
function Rl(e, t) {
|
|
3203
3217
|
const n = Xo(e) || "status", r = /* @__PURE__ */ new Set([...t, ...qt]);
|
|
3204
3218
|
if (!r.has(n)) return n;
|
|
3205
3219
|
for (let o = 2; o < 500; o++) {
|
|
3206
|
-
const
|
|
3207
|
-
if (!r.has(
|
|
3220
|
+
const s = `${n}-${o}`;
|
|
3221
|
+
if (!r.has(s)) return s;
|
|
3208
3222
|
}
|
|
3209
3223
|
return `${n}-${r.size + 1}`;
|
|
3210
3224
|
}
|
|
3211
|
-
function
|
|
3225
|
+
function Dl(e) {
|
|
3212
3226
|
const t = [];
|
|
3213
3227
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
3214
3228
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -3220,10 +3234,10 @@ function Rl(e) {
|
|
|
3220
3234
|
qt.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);
|
|
3221
3235
|
}), 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;
|
|
3222
3236
|
}
|
|
3223
|
-
function
|
|
3237
|
+
function $l(e) {
|
|
3224
3238
|
return e.startDate ?? Number.MAX_SAFE_INTEGER;
|
|
3225
3239
|
}
|
|
3226
|
-
function
|
|
3240
|
+
function Ll(e) {
|
|
3227
3241
|
return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
|
|
3228
3242
|
}
|
|
3229
3243
|
const Yo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), qo = /* @__PURE__ */ new Set([
|
|
@@ -3244,58 +3258,58 @@ const F = 1024 * 1024, Zo = {
|
|
|
3244
3258
|
pdf: 20 * F,
|
|
3245
3259
|
text: 1 * F,
|
|
3246
3260
|
audio: 20 * F
|
|
3247
|
-
},
|
|
3248
|
-
function
|
|
3261
|
+
}, Pl = 25 * F, Kl = 5;
|
|
3262
|
+
function Ul(e, t) {
|
|
3249
3263
|
const n = Qo(e);
|
|
3250
3264
|
return n === "unsupported" ? "unsupported" : t > Zo[n] ? "too-large" : null;
|
|
3251
3265
|
}
|
|
3252
|
-
function
|
|
3266
|
+
function Fl(e) {
|
|
3253
3267
|
return e.access !== "read" && e.effect !== "internal";
|
|
3254
3268
|
}
|
|
3255
3269
|
function Jo(e) {
|
|
3256
3270
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
3257
3271
|
}
|
|
3258
|
-
function
|
|
3272
|
+
function Bl(e, t = []) {
|
|
3259
3273
|
const n = new Set(t), r = [], o = [];
|
|
3260
|
-
for (const
|
|
3261
|
-
const
|
|
3262
|
-
n.has(
|
|
3274
|
+
for (const s of e) {
|
|
3275
|
+
const i = Jo(s);
|
|
3276
|
+
n.has(i) || (n.add(i), r.push(s), o.push(i));
|
|
3263
3277
|
}
|
|
3264
3278
|
return { sources: r, keys: o };
|
|
3265
3279
|
}
|
|
3266
|
-
const
|
|
3267
|
-
function
|
|
3280
|
+
const jl = "assist-source", Hl = ["blocking", "due", "open"];
|
|
3281
|
+
function Gl(e, t) {
|
|
3268
3282
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
3269
3283
|
return n === t && r ? r : void 0;
|
|
3270
3284
|
}
|
|
3271
3285
|
const ct = { blocking: 0, due: 1, open: 2 };
|
|
3272
|
-
function
|
|
3286
|
+
function Wl(e, t) {
|
|
3273
3287
|
return ct[e.band ?? "open"] - ct[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
3274
3288
|
}
|
|
3275
|
-
function
|
|
3289
|
+
function Vl(e) {
|
|
3276
3290
|
return e.sessions.filter(
|
|
3277
3291
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
3278
3292
|
);
|
|
3279
3293
|
}
|
|
3280
|
-
function
|
|
3294
|
+
function zl(e) {
|
|
3281
3295
|
return e.sessions.filter(
|
|
3282
3296
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
3283
3297
|
);
|
|
3284
3298
|
}
|
|
3285
|
-
function
|
|
3299
|
+
function Xl(e) {
|
|
3286
3300
|
return e.sessions.some(
|
|
3287
3301
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
3288
3302
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
3289
3303
|
}
|
|
3290
|
-
function
|
|
3291
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((
|
|
3304
|
+
function es(e, t) {
|
|
3305
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((i) => !n.has(i.intent)).map((i) => ns(i, r[i.intent]));
|
|
3292
3306
|
if (!e.extraIntents || e.extraIntents.length === 0) return o;
|
|
3293
|
-
const
|
|
3294
|
-
for (const
|
|
3295
|
-
|
|
3307
|
+
const s = new Set(o.map((i) => i.intent));
|
|
3308
|
+
for (const i of e.extraIntents)
|
|
3309
|
+
s.has(i.intent) || (o.push(i), s.add(i.intent));
|
|
3296
3310
|
return o;
|
|
3297
3311
|
}
|
|
3298
|
-
function
|
|
3312
|
+
function ts(e, t) {
|
|
3299
3313
|
const n = {};
|
|
3300
3314
|
for (const r of e.intents) {
|
|
3301
3315
|
if (!r.togglable) continue;
|
|
@@ -3304,46 +3318,46 @@ function ti(e, t) {
|
|
|
3304
3318
|
}
|
|
3305
3319
|
return n;
|
|
3306
3320
|
}
|
|
3307
|
-
function
|
|
3308
|
-
const n =
|
|
3321
|
+
function Yl(e, t) {
|
|
3322
|
+
const n = ts(e, t);
|
|
3309
3323
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
3310
3324
|
}
|
|
3311
|
-
function
|
|
3325
|
+
function ns(e, t) {
|
|
3312
3326
|
return t ? {
|
|
3313
3327
|
intent: t.intent ?? e.intent,
|
|
3314
3328
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
3315
3329
|
transport: t.transport ?? e.transport
|
|
3316
3330
|
} : e;
|
|
3317
3331
|
}
|
|
3318
|
-
function
|
|
3332
|
+
function ql(e, t) {
|
|
3319
3333
|
const n = [];
|
|
3320
3334
|
for (const r of e) {
|
|
3321
3335
|
if (!r.enabled) continue;
|
|
3322
3336
|
const o = t[r.providerId];
|
|
3323
3337
|
if (o)
|
|
3324
|
-
for (const
|
|
3325
|
-
n.push({ channel: r, description: o, capability:
|
|
3338
|
+
for (const s of es(r, o))
|
|
3339
|
+
n.push({ channel: r, description: o, capability: s });
|
|
3326
3340
|
}
|
|
3327
3341
|
return n;
|
|
3328
3342
|
}
|
|
3329
|
-
function
|
|
3343
|
+
function Ql(e, t) {
|
|
3330
3344
|
return t.filter((n) => n.capability.intent === e);
|
|
3331
3345
|
}
|
|
3332
|
-
function
|
|
3346
|
+
function rs(e, t) {
|
|
3333
3347
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
3334
3348
|
}
|
|
3335
|
-
function
|
|
3336
|
-
return
|
|
3349
|
+
function Zl(e, t) {
|
|
3350
|
+
return rs(e.scheme, t);
|
|
3337
3351
|
}
|
|
3338
|
-
function
|
|
3352
|
+
function Jl(e, t, n) {
|
|
3339
3353
|
const r = [];
|
|
3340
3354
|
for (const o of e)
|
|
3341
|
-
for (const
|
|
3342
|
-
|
|
3355
|
+
for (const s of n)
|
|
3356
|
+
s.capability.intent === t && s.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: s, endpoint: o });
|
|
3343
3357
|
return r;
|
|
3344
3358
|
}
|
|
3345
|
-
var
|
|
3346
|
-
const
|
|
3359
|
+
var os = /* @__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))(os || {});
|
|
3360
|
+
const ss = {
|
|
3347
3361
|
mailto: "mail",
|
|
3348
3362
|
sip: "tel",
|
|
3349
3363
|
tel: "tel",
|
|
@@ -3364,10 +3378,10 @@ const ii = {
|
|
|
3364
3378
|
id: "note",
|
|
3365
3379
|
custom: "note"
|
|
3366
3380
|
};
|
|
3367
|
-
function
|
|
3368
|
-
return e ?
|
|
3381
|
+
function eu(e) {
|
|
3382
|
+
return e ? ss[e] ?? "note" : "note";
|
|
3369
3383
|
}
|
|
3370
|
-
const
|
|
3384
|
+
const tu = "message_window", nu = "message_templates", ru = {
|
|
3371
3385
|
// E-mail
|
|
3372
3386
|
FROM: "from",
|
|
3373
3387
|
TO: "to",
|
|
@@ -3384,22 +3398,22 @@ const eu = "message_window", tu = "message_templates", nu = {
|
|
|
3384
3398
|
// Voice/conference
|
|
3385
3399
|
HOST: "host",
|
|
3386
3400
|
PARTICIPANT: "participant"
|
|
3387
|
-
},
|
|
3401
|
+
}, ou = (e, t) => ({ intent: e, ...t }), su = "folder_management", iu = "remote_search", au = "message_reactions", cu = {
|
|
3388
3402
|
ok: !1,
|
|
3389
3403
|
code: "UNSUPPORTED",
|
|
3390
3404
|
message: "Provider does not support this op"
|
|
3391
|
-
},
|
|
3392
|
-
function b(e, t, n, r, o,
|
|
3405
|
+
}, lu = "connector", uu = "context.collect", _ = (e) => ({ type: "string", description: e }), A = (e) => ({ type: "number", description: e }), Q = (e) => ({ type: "boolean", description: e }), v = _("Sheet name. Omit for the sheet the user is looking at."), lt = _("Slide id, as `inspect` reports it.");
|
|
3406
|
+
function b(e, t, n, r, o, s) {
|
|
3393
3407
|
return {
|
|
3394
3408
|
op: e,
|
|
3395
3409
|
kinds: t,
|
|
3396
3410
|
summary: n,
|
|
3397
3411
|
parameters: { type: "object", properties: r, required: o },
|
|
3398
|
-
undoable:
|
|
3399
|
-
visible:
|
|
3412
|
+
undoable: s.undoable,
|
|
3413
|
+
visible: s.visible
|
|
3400
3414
|
};
|
|
3401
3415
|
}
|
|
3402
|
-
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 },
|
|
3416
|
+
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 }, is = [
|
|
3403
3417
|
b(
|
|
3404
3418
|
"pdf.goToPage",
|
|
3405
3419
|
["pdf"],
|
|
@@ -3494,7 +3508,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3494
3508
|
["page", "text"],
|
|
3495
3509
|
ee
|
|
3496
3510
|
)
|
|
3497
|
-
],
|
|
3511
|
+
], as = [
|
|
3498
3512
|
b(
|
|
3499
3513
|
"sheet.setValues",
|
|
3500
3514
|
["sheet"],
|
|
@@ -3646,7 +3660,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3646
3660
|
[],
|
|
3647
3661
|
B
|
|
3648
3662
|
)
|
|
3649
|
-
],
|
|
3663
|
+
], cs = [
|
|
3650
3664
|
b(
|
|
3651
3665
|
"word.replaceParagraph",
|
|
3652
3666
|
["word"],
|
|
@@ -3708,7 +3722,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3708
3722
|
["start"],
|
|
3709
3723
|
B
|
|
3710
3724
|
)
|
|
3711
|
-
],
|
|
3725
|
+
], ls = [
|
|
3712
3726
|
b(
|
|
3713
3727
|
"slides.setText",
|
|
3714
3728
|
["slides"],
|
|
@@ -3737,37 +3751,37 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3737
3751
|
ee
|
|
3738
3752
|
)
|
|
3739
3753
|
], Qt = [
|
|
3740
|
-
...
|
|
3741
|
-
...
|
|
3742
|
-
...
|
|
3743
|
-
...
|
|
3754
|
+
...is,
|
|
3755
|
+
...as,
|
|
3756
|
+
...cs,
|
|
3757
|
+
...ls
|
|
3744
3758
|
];
|
|
3745
|
-
function
|
|
3759
|
+
function du(e) {
|
|
3746
3760
|
return Qt.filter((t) => t.kinds.includes(e));
|
|
3747
3761
|
}
|
|
3748
|
-
function
|
|
3762
|
+
function pu(e) {
|
|
3749
3763
|
return Qt.find((t) => t.op === e);
|
|
3750
3764
|
}
|
|
3751
|
-
const dt = /(?: {2,}|\\)$/,
|
|
3765
|
+
const dt = /(?: {2,}|\\)$/, us = /^\*\*([^*]+)\*\*\s+(.*)$/;
|
|
3752
3766
|
function pt(e) {
|
|
3753
|
-
const t =
|
|
3767
|
+
const t = us.exec(e);
|
|
3754
3768
|
return t ? { lead: t[1], text: t[2] } : { text: e };
|
|
3755
3769
|
}
|
|
3756
|
-
function
|
|
3770
|
+
function fu(e) {
|
|
3757
3771
|
const t = (e ?? "").replace(/\r\n/g, `
|
|
3758
3772
|
`).split(`
|
|
3759
3773
|
`), n = [];
|
|
3760
3774
|
let r = null;
|
|
3761
3775
|
const o = () => {
|
|
3762
3776
|
r && n.push({ type: "list", style: r.style, items: r.items }), r = null;
|
|
3763
|
-
},
|
|
3777
|
+
}, s = (p, f) => {
|
|
3764
3778
|
r && r.style !== p && o(), r ? r.items.push(pt(f)) : r = { style: p, items: [pt(f)] };
|
|
3765
3779
|
};
|
|
3766
|
-
let
|
|
3780
|
+
let i = [], a = [];
|
|
3767
3781
|
const c = () => {
|
|
3768
|
-
if (
|
|
3769
|
-
const p =
|
|
3770
|
-
p && n.push({ type: "paragraph", text: p }),
|
|
3782
|
+
if (i.length) {
|
|
3783
|
+
const p = i.join("").trim();
|
|
3784
|
+
p && n.push({ type: "paragraph", text: p }), i = [];
|
|
3771
3785
|
}
|
|
3772
3786
|
}, l = () => {
|
|
3773
3787
|
a.length && (n.push({ type: "quote", text: a.join(`
|
|
@@ -3806,11 +3820,11 @@ function pu(e) {
|
|
|
3806
3820
|
continue;
|
|
3807
3821
|
}
|
|
3808
3822
|
if (/^\s*[-*]\s+/.test(p)) {
|
|
3809
|
-
c(), l(),
|
|
3823
|
+
c(), l(), s("bulleted", p.replace(/^\s*[-*]\s+/, "")), u++;
|
|
3810
3824
|
continue;
|
|
3811
3825
|
}
|
|
3812
3826
|
if (/^\s*\d+\.\s+/.test(p)) {
|
|
3813
|
-
c(), l(),
|
|
3827
|
+
c(), l(), s("numbered", p.replace(/^\s*\d+\.\s+/, "")), u++;
|
|
3814
3828
|
continue;
|
|
3815
3829
|
}
|
|
3816
3830
|
if (/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(p)) {
|
|
@@ -3827,32 +3841,32 @@ function pu(e) {
|
|
|
3827
3841
|
}
|
|
3828
3842
|
l(), o();
|
|
3829
3843
|
const S = dt.test(p);
|
|
3830
|
-
|
|
3844
|
+
i.push(p.replace(dt, "").trim() + (S ? `
|
|
3831
3845
|
` : " ")), u++;
|
|
3832
3846
|
}
|
|
3833
3847
|
return d(), n;
|
|
3834
3848
|
}
|
|
3835
|
-
function
|
|
3849
|
+
function mu(e, t) {
|
|
3836
3850
|
return Dn(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, `
|
|
3837
3851
|
|
|
3838
3852
|
`).trim();
|
|
3839
3853
|
}
|
|
3840
|
-
const
|
|
3841
|
-
function
|
|
3854
|
+
const hu = "documents.describe", gu = "documents.inspect", yu = "documents.apply";
|
|
3855
|
+
function bu(e) {
|
|
3842
3856
|
const t = e.indexOf(":");
|
|
3843
3857
|
if (t !== -1) return e.slice(0, t);
|
|
3844
3858
|
const n = e.indexOf(".");
|
|
3845
3859
|
return n === -1 ? e : e.slice(0, n);
|
|
3846
3860
|
}
|
|
3847
|
-
const
|
|
3848
|
-
function
|
|
3861
|
+
const Au = "installation-id";
|
|
3862
|
+
function _u(e) {
|
|
3849
3863
|
const t = [];
|
|
3850
3864
|
for (const n of Object.keys(e))
|
|
3851
3865
|
for (const r of Object.keys(e[n]))
|
|
3852
3866
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
3853
3867
|
return t;
|
|
3854
3868
|
}
|
|
3855
|
-
const
|
|
3869
|
+
const Eu = "notification-source", Su = (e, t) => `${e}.pref.${t}`, Iu = {
|
|
3856
3870
|
ai: [
|
|
3857
3871
|
"account.read",
|
|
3858
3872
|
"account.write",
|
|
@@ -3987,96 +4001,96 @@ const _u = "notification-source", Eu = (e, t) => `${e}.pref.${t}`, Su = {
|
|
|
3987
4001
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
3988
4002
|
user: ["user.read", "user.write"],
|
|
3989
4003
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
3990
|
-
}, Zt = 9e4,
|
|
3991
|
-
function
|
|
4004
|
+
}, Zt = 9e4, ds = ["out_of_office"], Jt = (e) => ds.includes(e);
|
|
4005
|
+
function Tu(e, t, n) {
|
|
3992
4006
|
const r = n - e < Zt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
3993
4007
|
if (!o?.status) return { online: r, status: r ? "available" : "offline" };
|
|
3994
|
-
const
|
|
3995
|
-
return !r && !Jt(
|
|
4008
|
+
const s = o.status;
|
|
4009
|
+
return !r && !Jt(s) ? { online: !1, status: "offline" } : { online: r, status: s, message: o.message };
|
|
3996
4010
|
}
|
|
3997
|
-
function
|
|
4011
|
+
function wu(e, t) {
|
|
3998
4012
|
const n = t - e.lastSeenAt < Zt, r = n || Jt(e.status) ? e.status : "offline";
|
|
3999
4013
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
4000
4014
|
}
|
|
4001
|
-
function
|
|
4015
|
+
function ku(e, t) {
|
|
4002
4016
|
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 };
|
|
4003
4017
|
}
|
|
4004
|
-
function
|
|
4018
|
+
function Mu(e) {
|
|
4005
4019
|
return e.providerAvailable && e.allowed;
|
|
4006
4020
|
}
|
|
4007
|
-
const
|
|
4008
|
-
function
|
|
4021
|
+
const vu = "resources.describe", Cu = "resources.search", Ou = "resources.resolve", xu = "resources.attached";
|
|
4022
|
+
function Nu(e) {
|
|
4009
4023
|
const t = e.indexOf(":");
|
|
4010
4024
|
return t === -1 ? e : e.slice(0, t);
|
|
4011
4025
|
}
|
|
4012
|
-
const
|
|
4026
|
+
const Ru = "/provider/scope/related", Du = "/provider/scope/read", en = "auth";
|
|
4013
4027
|
function tn(e) {
|
|
4014
4028
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
4015
4029
|
return t ? t[1] : null;
|
|
4016
4030
|
}
|
|
4017
|
-
function
|
|
4031
|
+
function $u(e) {
|
|
4018
4032
|
const t = tn(e);
|
|
4019
4033
|
return t ? t !== en : typeof e == "string" && e.startsWith("/wake");
|
|
4020
4034
|
}
|
|
4021
|
-
function
|
|
4035
|
+
function Lu(e) {
|
|
4022
4036
|
return typeof e != "string" || e === "" || e === "/" ? !0 : tn(e) === en;
|
|
4023
4037
|
}
|
|
4024
|
-
function
|
|
4038
|
+
function ps(e) {
|
|
4025
4039
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4026
4040
|
}
|
|
4027
|
-
function
|
|
4028
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
4041
|
+
function fs(e) {
|
|
4042
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${ps(r)}`).join("");
|
|
4029
4043
|
return new RegExp(`^${n}\\/?$`);
|
|
4030
4044
|
}
|
|
4031
|
-
function
|
|
4045
|
+
function ms(e, t) {
|
|
4032
4046
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
|
|
4033
|
-
return n.forEach((
|
|
4034
|
-
if (
|
|
4035
|
-
const a =
|
|
4047
|
+
return n.forEach((s, i) => {
|
|
4048
|
+
if (s.startsWith(":")) {
|
|
4049
|
+
const a = s.endsWith("?") ? s.slice(1, -1) : s.slice(1), c = r[i];
|
|
4036
4050
|
c && (o[a] = c);
|
|
4037
4051
|
}
|
|
4038
4052
|
}), o;
|
|
4039
4053
|
}
|
|
4040
|
-
function
|
|
4054
|
+
function hs(e) {
|
|
4041
4055
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
4042
4056
|
}
|
|
4043
|
-
function
|
|
4057
|
+
function Pu(e) {
|
|
4044
4058
|
const t = [];
|
|
4045
4059
|
for (const n of e) {
|
|
4046
4060
|
if (!n?.name) continue;
|
|
4047
|
-
const r =
|
|
4061
|
+
const r = hs(n);
|
|
4048
4062
|
for (const o of n.routes ?? []) {
|
|
4049
4063
|
if (!o.public) continue;
|
|
4050
|
-
const
|
|
4064
|
+
const s = o.path === "/" ? "" : o.path;
|
|
4051
4065
|
t.push({
|
|
4052
4066
|
appName: n.name,
|
|
4053
4067
|
resource: o.resource,
|
|
4054
|
-
pattern: `${r}${
|
|
4068
|
+
pattern: `${r}${s}`,
|
|
4055
4069
|
props: o.props
|
|
4056
4070
|
});
|
|
4057
4071
|
}
|
|
4058
4072
|
}
|
|
4059
4073
|
return t;
|
|
4060
4074
|
}
|
|
4061
|
-
function
|
|
4075
|
+
function gs(e, t) {
|
|
4062
4076
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
4063
4077
|
for (let o = 0; o < Math.min(n.length, r.length); o++) {
|
|
4064
|
-
const
|
|
4065
|
-
if (
|
|
4078
|
+
const s = n[o].startsWith(":"), i = r[o].startsWith(":");
|
|
4079
|
+
if (s !== i) return i;
|
|
4066
4080
|
}
|
|
4067
4081
|
return n.length > r.length;
|
|
4068
4082
|
}
|
|
4069
|
-
function
|
|
4083
|
+
function ys(e, t) {
|
|
4070
4084
|
if (typeof e != "string") return null;
|
|
4071
4085
|
let n = null;
|
|
4072
4086
|
for (const r of t)
|
|
4073
|
-
|
|
4074
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
4087
|
+
fs(r.pattern).test(e) && (!n || gs(r.pattern, n.pattern)) && (n = r);
|
|
4088
|
+
return n ? { ...n, params: { ...n.props, ...ms(n.pattern, e) } } : null;
|
|
4075
4089
|
}
|
|
4076
|
-
function
|
|
4077
|
-
return
|
|
4090
|
+
function Ku(e, t) {
|
|
4091
|
+
return ys(e, t) !== null;
|
|
4078
4092
|
}
|
|
4079
|
-
const
|
|
4093
|
+
const Uu = 10 * 1024 * 1024, Fu = 25 * 1024 * 1024, Bu = "sync-target", ju = 20, bs = {
|
|
4080
4094
|
afrikaans: [
|
|
4081
4095
|
"[Muziek]",
|
|
4082
4096
|
"(C) TV GELDERLAND 2021",
|
|
@@ -4226,14 +4240,14 @@ const Ku = 10 * 1024 * 1024, Uu = 25 * 1024 * 1024, Fu = "sync-target", Bu = 20,
|
|
|
4226
4240
|
"[MÚSICA]",
|
|
4227
4241
|
"[Music cuts in British]"
|
|
4228
4242
|
]
|
|
4229
|
-
},
|
|
4243
|
+
}, As = (e) => {
|
|
4230
4244
|
let t = e;
|
|
4231
|
-
return Object.values(
|
|
4245
|
+
return Object.values(bs).forEach((n) => {
|
|
4232
4246
|
n.forEach((r) => {
|
|
4233
4247
|
t = t.replaceAll(r, "");
|
|
4234
4248
|
});
|
|
4235
4249
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
4236
|
-
},
|
|
4250
|
+
}, _s = 6e4, Es = 8e3, Ss = 2, Is = 0.4, Ts = 3, ws = /* @__PURE__ */ new Set([
|
|
4237
4251
|
"aan",
|
|
4238
4252
|
"als",
|
|
4239
4253
|
"ben",
|
|
@@ -4346,52 +4360,52 @@ const Ku = 10 * 1024 * 1024, Uu = 25 * 1024 * 1024, Fu = "sync-target", Bu = 20,
|
|
|
4346
4360
|
"you",
|
|
4347
4361
|
"your"
|
|
4348
4362
|
]);
|
|
4349
|
-
function
|
|
4363
|
+
function ks(e) {
|
|
4350
4364
|
const t = /* @__PURE__ */ new Set();
|
|
4351
4365
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
4352
|
-
n.length <
|
|
4366
|
+
n.length < Ts || ws.has(n) || t.add(n);
|
|
4353
4367
|
return [...t];
|
|
4354
4368
|
}
|
|
4355
|
-
function
|
|
4369
|
+
function Ms(e, t) {
|
|
4356
4370
|
if (!e.length) return 0;
|
|
4357
4371
|
if (!t.length) return 1;
|
|
4358
4372
|
const n = new Set(t), r = new Set(e);
|
|
4359
4373
|
let o = 0;
|
|
4360
|
-
for (const
|
|
4374
|
+
for (const s of r) n.has(s) || (o += 1);
|
|
4361
4375
|
return o / r.size;
|
|
4362
4376
|
}
|
|
4363
|
-
function
|
|
4364
|
-
const n = e.filter((
|
|
4377
|
+
function vs(e, t = _s) {
|
|
4378
|
+
const n = e.filter((i) => !i.partial && typeof i.text == "string");
|
|
4365
4379
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
4366
|
-
const o = n.reduce((
|
|
4367
|
-
return { text: n.filter((
|
|
4380
|
+
const o = n.reduce((i, a) => Math.max(i, a.endedAt ?? 0), 0) - t;
|
|
4381
|
+
return { text: n.filter((i) => (i.endedAt ?? 0) >= o).map((i) => As(i.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
4368
4382
|
}
|
|
4369
|
-
const
|
|
4370
|
-
function
|
|
4383
|
+
const Cs = 60;
|
|
4384
|
+
function Hu(e, t, n = Cs) {
|
|
4371
4385
|
const r = new Set(e), o = [...e];
|
|
4372
|
-
for (const
|
|
4373
|
-
!
|
|
4386
|
+
for (const s of t)
|
|
4387
|
+
!s || r.has(s) || (r.add(s), o.push(s));
|
|
4374
4388
|
return o.slice(-n);
|
|
4375
4389
|
}
|
|
4376
|
-
function
|
|
4390
|
+
function Gu(e) {
|
|
4377
4391
|
const { segments: t, now: n, state: r } = e;
|
|
4378
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
4392
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Es)
|
|
4379
4393
|
return { trigger: !1, reason: "too_soon" };
|
|
4380
|
-
const o =
|
|
4394
|
+
const o = vs(t, e.windowMs);
|
|
4381
4395
|
if (!o.text) return { trigger: !1, reason: "no_speech" };
|
|
4382
|
-
const
|
|
4383
|
-
if (r.lastQueryTerms &&
|
|
4396
|
+
const s = o.segmentCount - (r.lastSegmentCount ?? 0);
|
|
4397
|
+
if (r.lastQueryTerms && s < Ss)
|
|
4384
4398
|
return { trigger: !1, reason: "too_few_new" };
|
|
4385
|
-
const
|
|
4386
|
-
return
|
|
4399
|
+
const i = ks(o.text);
|
|
4400
|
+
return i.length ? r.lastQueryTerms?.length && Ms(i, r.lastQueryTerms) < Is ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: i, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
4387
4401
|
}
|
|
4388
|
-
const
|
|
4402
|
+
const Wu = [
|
|
4389
4403
|
"personal",
|
|
4390
4404
|
"workspace",
|
|
4391
4405
|
"connections",
|
|
4392
4406
|
"work",
|
|
4393
4407
|
"ai"
|
|
4394
|
-
],
|
|
4408
|
+
], Vu = "navNotice", De = {
|
|
4395
4409
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
4396
4410
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
4397
4411
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -4414,7 +4428,7 @@ const Gu = [
|
|
|
4414
4428
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
4415
4429
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
4416
4430
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
4417
|
-
},
|
|
4431
|
+
}, Os = "NL", xs = 15, Ns = 8, Rs = Array.from(
|
|
4418
4432
|
new Set(Object.values(De).map((e) => e.callingCode))
|
|
4419
4433
|
).sort((e, t) => t.length - e.length);
|
|
4420
4434
|
function ft(e) {
|
|
@@ -4425,27 +4439,27 @@ function Z(e, t) {
|
|
|
4425
4439
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
4426
4440
|
}
|
|
4427
4441
|
function mt(e) {
|
|
4428
|
-
if (e.length >
|
|
4429
|
-
for (const t of
|
|
4442
|
+
if (e.length > xs) return null;
|
|
4443
|
+
for (const t of Rs) {
|
|
4430
4444
|
if (!e.startsWith(t)) continue;
|
|
4431
4445
|
const n = e.slice(t.length);
|
|
4432
4446
|
for (const r of Object.values(De)) {
|
|
4433
4447
|
if (r.callingCode !== t) continue;
|
|
4434
|
-
const o = r.trunkPrefix,
|
|
4435
|
-
if (Z(
|
|
4448
|
+
const o = r.trunkPrefix, s = o && n.startsWith(o) ? n.slice(o.length) : n;
|
|
4449
|
+
if (Z(s, r)) return `+${t}${s}`;
|
|
4436
4450
|
}
|
|
4437
4451
|
return null;
|
|
4438
4452
|
}
|
|
4439
|
-
return e.length <
|
|
4453
|
+
return e.length < Ns ? null : `+${e}`;
|
|
4440
4454
|
}
|
|
4441
|
-
function
|
|
4455
|
+
function Ds(e) {
|
|
4442
4456
|
let t = e.trim();
|
|
4443
4457
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
4444
4458
|
n && (t = t.slice(n[0].length));
|
|
4445
4459
|
const r = t.indexOf("@");
|
|
4446
4460
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
4447
4461
|
}
|
|
4448
|
-
function
|
|
4462
|
+
function zu(e) {
|
|
4449
4463
|
if (!e) return !1;
|
|
4450
4464
|
const t = e.indexOf("@");
|
|
4451
4465
|
if (t <= 0) return !1;
|
|
@@ -4454,26 +4468,26 @@ function Vu(e) {
|
|
|
4454
4468
|
}
|
|
4455
4469
|
function ht(e, t) {
|
|
4456
4470
|
if (!e) return null;
|
|
4457
|
-
const n =
|
|
4471
|
+
const n = Ds(e);
|
|
4458
4472
|
if (!n) return null;
|
|
4459
4473
|
const r = n.startsWith("+"), o = n.replace(/\D/g, "");
|
|
4460
4474
|
if (!o) return null;
|
|
4461
4475
|
if (r) return mt(o);
|
|
4462
4476
|
if (o.startsWith("00")) return mt(o.slice(2));
|
|
4463
|
-
const
|
|
4464
|
-
if (!
|
|
4465
|
-
const
|
|
4466
|
-
if (
|
|
4467
|
-
const a = o.slice(
|
|
4468
|
-
return Z(a,
|
|
4477
|
+
const s = ft(t) ?? ft(Os);
|
|
4478
|
+
if (!s) return null;
|
|
4479
|
+
const i = s.trunkPrefix;
|
|
4480
|
+
if (i && o.startsWith(i)) {
|
|
4481
|
+
const a = o.slice(i.length);
|
|
4482
|
+
return Z(a, s) ? `+${s.callingCode}${a}` : null;
|
|
4469
4483
|
}
|
|
4470
|
-
if (o.startsWith(
|
|
4471
|
-
const a = o.slice(
|
|
4472
|
-
if (Z(a,
|
|
4484
|
+
if (o.startsWith(s.callingCode)) {
|
|
4485
|
+
const a = o.slice(s.callingCode.length);
|
|
4486
|
+
if (Z(a, s)) return `+${s.callingCode}${a}`;
|
|
4473
4487
|
}
|
|
4474
|
-
return !
|
|
4488
|
+
return !i && Z(o, s) ? `+${s.callingCode}${o}` : null;
|
|
4475
4489
|
}
|
|
4476
|
-
function
|
|
4490
|
+
function Xu(e, t = 9) {
|
|
4477
4491
|
const n = (e ?? "").replace(/\D/g, "");
|
|
4478
4492
|
return n.length < t ? null : n.slice(-t);
|
|
4479
4493
|
}
|
|
@@ -4484,11 +4498,11 @@ function nn(e) {
|
|
|
4484
4498
|
const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
|
|
4485
4499
|
return !r || !o.includes(".") ? null : `${r}@${o}`;
|
|
4486
4500
|
}
|
|
4487
|
-
function
|
|
4501
|
+
function Yu(e) {
|
|
4488
4502
|
const t = nn(e);
|
|
4489
4503
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
4490
4504
|
}
|
|
4491
|
-
const $
|
|
4505
|
+
const $s = /* @__PURE__ */ new Set([
|
|
4492
4506
|
"co.uk",
|
|
4493
4507
|
"org.uk",
|
|
4494
4508
|
"gov.uk",
|
|
@@ -4498,14 +4512,14 @@ const $i = /* @__PURE__ */ new Set([
|
|
|
4498
4512
|
"com.br",
|
|
4499
4513
|
"co.za"
|
|
4500
4514
|
]);
|
|
4501
|
-
function
|
|
4515
|
+
function Ls(e) {
|
|
4502
4516
|
if (!e) return null;
|
|
4503
4517
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
4504
4518
|
if (t.length < 2) return null;
|
|
4505
4519
|
const n = t.slice(-2).join(".");
|
|
4506
|
-
return $
|
|
4520
|
+
return $s.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
4507
4521
|
}
|
|
4508
|
-
const
|
|
4522
|
+
const Ps = /* @__PURE__ */ new Set([
|
|
4509
4523
|
"gmail.com",
|
|
4510
4524
|
"googlemail.com",
|
|
4511
4525
|
"outlook.com",
|
|
@@ -4550,34 +4564,34 @@ const Pi = /* @__PURE__ */ new Set([
|
|
|
4550
4564
|
"proximus.be",
|
|
4551
4565
|
"scarlet.be"
|
|
4552
4566
|
]);
|
|
4553
|
-
function Yu(e) {
|
|
4554
|
-
const t = Li(e);
|
|
4555
|
-
return t ? Pi.has(t) : !1;
|
|
4556
|
-
}
|
|
4557
4567
|
function qu(e) {
|
|
4568
|
+
const t = Ls(e);
|
|
4569
|
+
return t ? Ps.has(t) : !1;
|
|
4570
|
+
}
|
|
4571
|
+
function Qu(e) {
|
|
4558
4572
|
if (!e) return !1;
|
|
4559
4573
|
const t = e.trim().toLowerCase();
|
|
4560
4574
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
4561
4575
|
}
|
|
4562
|
-
function
|
|
4576
|
+
function Zu(e, t, n) {
|
|
4563
4577
|
if (!e || !t) return null;
|
|
4564
4578
|
const r = e.trim().toLowerCase();
|
|
4565
4579
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
4566
|
-
const
|
|
4567
|
-
return
|
|
4580
|
+
const s = ht(t, n);
|
|
4581
|
+
return s ? `tel:${s}` : null;
|
|
4568
4582
|
}
|
|
4569
4583
|
if (r === "fax") {
|
|
4570
|
-
const
|
|
4571
|
-
return
|
|
4584
|
+
const s = ht(t, n);
|
|
4585
|
+
return s ? `fax:${s}` : null;
|
|
4572
4586
|
}
|
|
4573
4587
|
if (r === "mailto" || r === "email") {
|
|
4574
|
-
const
|
|
4575
|
-
return
|
|
4588
|
+
const s = nn(t);
|
|
4589
|
+
return s ? `mailto:${s}` : null;
|
|
4576
4590
|
}
|
|
4577
4591
|
const o = t.trim().toLowerCase();
|
|
4578
4592
|
return o ? `${r}:${o}` : null;
|
|
4579
4593
|
}
|
|
4580
|
-
const
|
|
4594
|
+
const Ks = [
|
|
4581
4595
|
/<blockquote/i,
|
|
4582
4596
|
/class="?gmail_quote/i,
|
|
4583
4597
|
// Gmail quote container
|
|
@@ -4590,24 +4604,24 @@ const Ki = [
|
|
|
4590
4604
|
// Outlook underscore separator before "From:"
|
|
4591
4605
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
4592
4606
|
// Gmail "On <date> <name> wrote:"
|
|
4593
|
-
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,
|
|
4594
|
-
function
|
|
4607
|
+
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Us = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
4608
|
+
function Fs(e) {
|
|
4595
4609
|
const t = e.split(`
|
|
4596
4610
|
`);
|
|
4597
4611
|
for (let n = 0; n < t.length; n++)
|
|
4598
|
-
if (
|
|
4612
|
+
if (Us.test(t[n]) || gt.test(t[n]) && t.slice(n + 1, n + 4).some((r) => gt.test(r)))
|
|
4599
4613
|
return t.slice(0, n).join(`
|
|
4600
4614
|
`).trim();
|
|
4601
4615
|
return e;
|
|
4602
4616
|
}
|
|
4603
|
-
const
|
|
4617
|
+
const Bs = /^(?:https?:|mailto:|tel:)/i, js = /^(?:https?:|cid:|data:image\/)/i;
|
|
4604
4618
|
function de(e, t) {
|
|
4605
4619
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
4606
4620
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
4607
4621
|
}
|
|
4608
|
-
const
|
|
4622
|
+
const Hs = /(!\[[^\]]*\]\([^)]*\))/;
|
|
4609
4623
|
function yt(e) {
|
|
4610
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
4624
|
+
return e.replace(/\s+/g, " ").trim().split(Hs).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
4611
4625
|
}
|
|
4612
4626
|
function pe(e) {
|
|
4613
4627
|
return e.replace(
|
|
@@ -4615,78 +4629,78 @@ function pe(e) {
|
|
|
4615
4629
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
4616
4630
|
);
|
|
4617
4631
|
}
|
|
4618
|
-
function
|
|
4632
|
+
function Gs(e) {
|
|
4619
4633
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
4620
4634
|
const o = de(r, "src");
|
|
4621
|
-
return
|
|
4635
|
+
return js.test(o) ? `})` : "";
|
|
4622
4636
|
}).replace(
|
|
4623
4637
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
4624
4638
|
(n, r, o) => {
|
|
4625
|
-
const
|
|
4626
|
-
return
|
|
4639
|
+
const s = yt(o.replace(/<[^>]*>/g, "")), i = de(r, "href");
|
|
4640
|
+
return Bs.test(i) ? `[${s || pe(i)}](${pe(i)})` : s;
|
|
4627
4641
|
}
|
|
4628
4642
|
);
|
|
4629
4643
|
}
|
|
4630
|
-
const
|
|
4631
|
-
function
|
|
4644
|
+
const Ws = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, Vs = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, zs = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
4645
|
+
function Xs(e, t) {
|
|
4632
4646
|
return /<table\b/i.test(e) || e.includes(`
|
|
4633
4647
|
|
|
4634
4648
|
|`) || t.includes("![") || t.length > 200;
|
|
4635
4649
|
}
|
|
4636
|
-
const
|
|
4637
|
-
function
|
|
4650
|
+
const Ys = 40, qs = { left: "---", center: ":---:", right: "---:" };
|
|
4651
|
+
function Qs(e) {
|
|
4638
4652
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
4639
4653
|
return t ? t[1].toLowerCase() : "left";
|
|
4640
4654
|
}
|
|
4641
|
-
function
|
|
4655
|
+
function Zs(e) {
|
|
4642
4656
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
4643
4657
|
}
|
|
4644
|
-
function
|
|
4658
|
+
function Js(e) {
|
|
4645
4659
|
const t = [];
|
|
4646
|
-
for (const
|
|
4660
|
+
for (const i of e.matchAll(Vs)) {
|
|
4647
4661
|
const a = [];
|
|
4648
|
-
for (const c of
|
|
4649
|
-
const l =
|
|
4650
|
-
if (
|
|
4651
|
-
a.push({ text: l, align:
|
|
4662
|
+
for (const c of i[1].matchAll(zs)) {
|
|
4663
|
+
const l = Zs(c[3]);
|
|
4664
|
+
if (Xs(c[3], l)) return null;
|
|
4665
|
+
a.push({ text: l, align: Qs(c[2]) });
|
|
4652
4666
|
}
|
|
4653
4667
|
if (a.length === 0) return null;
|
|
4654
4668
|
a.some((c) => c.text !== "") && t.push(a);
|
|
4655
4669
|
}
|
|
4656
4670
|
const n = t[0]?.length ?? 0;
|
|
4657
|
-
if (t.length < 2 || n < 2 || t.some((
|
|
4658
|
-
const r = (
|
|
4671
|
+
if (t.length < 2 || n < 2 || t.some((i) => i.length !== n)) return null;
|
|
4672
|
+
const r = (i) => `| ${i.map((a) => a.text).join(" | ")} |`, o = t[1].map((i) => qs[i.align]).join(" | "), s = t.slice(1).map(r).join(`
|
|
4659
4673
|
`);
|
|
4660
4674
|
return `
|
|
4661
4675
|
|
|
4662
4676
|
${r(t[0])}
|
|
4663
4677
|
| ${o} |
|
|
4664
|
-
${
|
|
4678
|
+
${s}
|
|
4665
4679
|
|
|
4666
4680
|
`;
|
|
4667
4681
|
}
|
|
4668
|
-
function
|
|
4682
|
+
function ei(e) {
|
|
4669
4683
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
4670
4684
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
4671
4685
|
}
|
|
4672
|
-
function
|
|
4686
|
+
function ti(e) {
|
|
4673
4687
|
let t = e;
|
|
4674
|
-
for (let n = 0; n <
|
|
4675
|
-
const r =
|
|
4688
|
+
for (let n = 0; n < Ys; n++) {
|
|
4689
|
+
const r = Ws.exec(t);
|
|
4676
4690
|
if (!r || r.index === void 0) break;
|
|
4677
|
-
const
|
|
4691
|
+
const s = Js(r[1]) ?? `
|
|
4678
4692
|
|
|
4679
|
-
${
|
|
4693
|
+
${ei(r[1])}
|
|
4680
4694
|
|
|
4681
4695
|
`;
|
|
4682
|
-
t = t.slice(0, r.index) +
|
|
4696
|
+
t = t.slice(0, r.index) + s + t.slice(r.index + r[0].length);
|
|
4683
4697
|
}
|
|
4684
4698
|
return t;
|
|
4685
4699
|
}
|
|
4686
4700
|
function bt(e, t) {
|
|
4687
4701
|
let n = e;
|
|
4688
4702
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
4689
|
-
`), t && (n =
|
|
4703
|
+
`), t && (n = ti(Gs(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
4690
4704
|
|
|
4691
4705
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
4692
4706
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
@@ -4694,7 +4708,7 @@ function bt(e, t) {
|
|
|
4694
4708
|
function At(e) {
|
|
4695
4709
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
4696
4710
|
}
|
|
4697
|
-
const
|
|
4711
|
+
const ni = {
|
|
4698
4712
|
euro: "€",
|
|
4699
4713
|
pound: "£",
|
|
4700
4714
|
yen: "¥",
|
|
@@ -4717,7 +4731,7 @@ const ns = {
|
|
|
4717
4731
|
apos: "'"
|
|
4718
4732
|
};
|
|
4719
4733
|
function _t(e) {
|
|
4720
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
4734
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => ni[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => At(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => At(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
4721
4735
|
}
|
|
4722
4736
|
function Et(e) {
|
|
4723
4737
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
@@ -4725,38 +4739,38 @@ function Et(e) {
|
|
|
4725
4739
|
|
|
4726
4740
|
`).trim();
|
|
4727
4741
|
}
|
|
4728
|
-
const
|
|
4729
|
-
function Zu(e) {
|
|
4730
|
-
return rs.test(e);
|
|
4731
|
-
}
|
|
4742
|
+
const ri = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
4732
4743
|
function Ju(e) {
|
|
4733
|
-
return
|
|
4744
|
+
return ri.test(e);
|
|
4734
4745
|
}
|
|
4735
4746
|
function ed(e) {
|
|
4747
|
+
return rn(e, !1);
|
|
4748
|
+
}
|
|
4749
|
+
function td(e) {
|
|
4736
4750
|
return rn(e, !0);
|
|
4737
4751
|
}
|
|
4738
4752
|
function rn(e, t) {
|
|
4739
4753
|
if (typeof e != "string" || !e) return "";
|
|
4740
4754
|
let n = e.length;
|
|
4741
|
-
for (const
|
|
4742
|
-
const a = e.search(
|
|
4755
|
+
for (const i of Ks) {
|
|
4756
|
+
const a = e.search(i);
|
|
4743
4757
|
a >= 0 && a < n && (n = a);
|
|
4744
4758
|
}
|
|
4745
4759
|
const r = e.slice(0, n);
|
|
4746
4760
|
let o = Et(_t(bt(r, t)));
|
|
4747
|
-
return o || (o = Et(_t(bt(e, t)))),
|
|
4761
|
+
return o || (o = Et(_t(bt(e, t)))), Fs(o) || o;
|
|
4748
4762
|
}
|
|
4749
4763
|
export {
|
|
4750
|
-
|
|
4764
|
+
Vi as ACTIVE_ASSIGNMENT_STATUSES,
|
|
4751
4765
|
R as ACTIVITY_CATALOG,
|
|
4752
4766
|
Zo as AI_ATTACHMENT_LIMITS,
|
|
4753
|
-
|
|
4754
|
-
|
|
4767
|
+
Kl as AI_ATTACHMENT_MAX_PER_TURN,
|
|
4768
|
+
Pl as AI_ATTACHMENT_TURN_BUDGET,
|
|
4755
4769
|
Tt as AI_VENDORS,
|
|
4756
4770
|
kn as ALLOWED_LINK_SCHEMES,
|
|
4757
|
-
|
|
4771
|
+
Iu as APP_PERMISSIONS,
|
|
4758
4772
|
He as ARTIFACT_MAX_BLOCKS,
|
|
4759
|
-
|
|
4773
|
+
Ui as ARTIFACT_MAX_BODY_BYTES,
|
|
4760
4774
|
q as ARTIFACT_MAX_CELL_LEN,
|
|
4761
4775
|
ze as ARTIFACT_MAX_KPI_ITEMS,
|
|
4762
4776
|
Ge as ARTIFACT_MAX_LIST_ITEMS,
|
|
@@ -4764,37 +4778,37 @@ export {
|
|
|
4764
4778
|
We as ARTIFACT_MAX_TABLE_ROWS,
|
|
4765
4779
|
kt as ARTIFACT_MAX_TEXT_LEN,
|
|
4766
4780
|
Ln as ASSIGNMENT_SCOPE_KIND,
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4781
|
+
Hl as ASSIST_BANDS,
|
|
4782
|
+
jl as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
4783
|
+
sr as ATTENTION_STATUSES,
|
|
4770
4784
|
wo as AT_RISK_GAP,
|
|
4771
4785
|
en as AUTH_APP_NAME,
|
|
4772
|
-
|
|
4773
|
-
|
|
4786
|
+
so as AUTO_READY_MIN_PROPOSALS,
|
|
4787
|
+
io as AUTO_READY_RATE,
|
|
4774
4788
|
hn as ActivityTypeRegistry,
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4789
|
+
Ei as BUILT_IN_ONLY,
|
|
4790
|
+
ir as BULK_PENALTY,
|
|
4791
|
+
Es as CADENCE_FLOOR_MS,
|
|
4792
|
+
Ss as CADENCE_MIN_NEW_SEGMENTS,
|
|
4793
|
+
Is as CADENCE_MIN_NOVELTY,
|
|
4794
|
+
_s as CADENCE_WINDOW_MS,
|
|
4795
|
+
fc as CLASSIFY_VARS,
|
|
4796
|
+
lu as CONNECTOR_PROVIDER_GROUP,
|
|
4797
|
+
uu as CONTEXT_COLLECT_SERVICE,
|
|
4798
|
+
Ri as CORE_DIMENSIONS,
|
|
4799
|
+
os as CommunicationScheme,
|
|
4786
4800
|
qn as DAY_MS,
|
|
4787
4801
|
So as DEFAULT_CHECK_IN_DAYS,
|
|
4788
4802
|
Kr as DEFAULT_FORECAST_WEEKS,
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4803
|
+
Pa as DEFAULT_MEMORY_BUDGET,
|
|
4804
|
+
Os as DEFAULT_PHONE_REGION,
|
|
4805
|
+
ll as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
|
|
4806
|
+
Xa as DEMAND_SOURCE_PROVIDER_GROUP,
|
|
4807
|
+
yu as DOCUMENT_APPLY_SERVICE,
|
|
4808
|
+
hu as DOCUMENT_DESCRIBE_SERVICE,
|
|
4809
|
+
gu as DOCUMENT_INSPECT_SERVICE,
|
|
4796
4810
|
He as DOCUMENT_MAX_BLOCKS,
|
|
4797
|
-
|
|
4811
|
+
Ui as DOCUMENT_MAX_BODY_BYTES,
|
|
4798
4812
|
q as DOCUMENT_MAX_CELL_LEN,
|
|
4799
4813
|
ze as DOCUMENT_MAX_KPI_ITEMS,
|
|
4800
4814
|
Xe as DOCUMENT_MAX_LETTERHEAD_FIELDS,
|
|
@@ -4806,418 +4820,419 @@ export {
|
|
|
4806
4820
|
Ye as DOCUMENT_MAX_TOTALS_ROWS,
|
|
4807
4821
|
Qt as DOCUMENT_OPERATIONS,
|
|
4808
4822
|
$o as DUTCH_SLOT_LABELS,
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4823
|
+
hc as EMPTY_WORKFLOW,
|
|
4824
|
+
su as FEATURE_FOLDER_MANAGEMENT,
|
|
4825
|
+
au as FEATURE_MESSAGE_REACTIONS,
|
|
4812
4826
|
iu as FEATURE_REMOTE_SEARCH,
|
|
4813
4827
|
Ce as FIXED_KINDS,
|
|
4814
4828
|
ne as FIXED_LEVELS,
|
|
4815
4829
|
Ne as FIXED_TYPES,
|
|
4816
4830
|
ra as FIXED_UNITS,
|
|
4817
4831
|
cr as FOLLOW_UP_HOURS,
|
|
4818
|
-
|
|
4832
|
+
sl as FROZEN_WRITABLE_FIELDS,
|
|
4819
4833
|
Yn as HOUR_MS,
|
|
4820
|
-
|
|
4834
|
+
ri as HTML_BODY_RE,
|
|
4821
4835
|
L as INELIGIBLE,
|
|
4822
|
-
|
|
4836
|
+
Au as INSTALLATION_HEADER,
|
|
4823
4837
|
eo as INTERACTION_KIND,
|
|
4824
|
-
|
|
4838
|
+
ru as InteractionParticipantRole,
|
|
4825
4839
|
gr as KB_FALLBACK_LOCALE,
|
|
4826
4840
|
Ze as KB_LOCALES,
|
|
4827
4841
|
Ze as LOCALES,
|
|
4828
4842
|
Re as LOOSE_STATUSES,
|
|
4829
4843
|
tr as MAIL_HINT_HEADERS,
|
|
4830
|
-
|
|
4844
|
+
ai as MAX_ACTIONS,
|
|
4831
4845
|
Pn as MAX_ASSIGNMENT_TURNS,
|
|
4832
|
-
|
|
4846
|
+
oi as MAX_BLOCKS,
|
|
4833
4847
|
Dt as MAX_COLLECTION_DEPTH,
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4848
|
+
Uu as MAX_EDITABLE_FILE_BYTES,
|
|
4849
|
+
si as MAX_FIELDS,
|
|
4850
|
+
ii as MAX_LIST_ITEMS,
|
|
4851
|
+
Ra as MAX_MEMORY_BROWSE,
|
|
4852
|
+
La as MAX_MEMORY_BUDGET,
|
|
4853
|
+
Da as MAX_MEMORY_CHARS,
|
|
4854
|
+
Cs as MAX_SHOWN_KEYS,
|
|
4841
4855
|
Oo as MAX_TOPIC_CANDIDATES,
|
|
4842
4856
|
Co as MAX_TOPIC_EXAMPLES,
|
|
4843
4857
|
ue as MAX_TOPIC_EXAMPLE_CHARS,
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4858
|
+
Fu as MAX_VIEWABLE_FILE_BYTES,
|
|
4859
|
+
$a as MIN_MEMORY_BUDGET,
|
|
4860
|
+
Vu as NAV_NOTICE_SLOT,
|
|
4861
|
+
Ua as NL_TAX_RATES,
|
|
4862
|
+
Eu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
4849
4863
|
ko as OFF_TRACK_GAP,
|
|
4850
|
-
|
|
4864
|
+
Ba as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
4851
4865
|
Ee as PAUSE_SNOOZED,
|
|
4852
4866
|
Se as PAUSE_WAITING_FOR_CUSTOMER,
|
|
4853
4867
|
De as PHONE_REGIONS,
|
|
4854
4868
|
Zt as PRESENCE_ONLINE_WINDOW_MS,
|
|
4855
|
-
|
|
4869
|
+
ds as PRESENCE_SURVIVES_OFFLINE,
|
|
4856
4870
|
Uo as PRODUCT_SCOPE_KIND,
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4871
|
+
Ha as PROFILE_TOOL_DISPOSITIONS,
|
|
4872
|
+
nu as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
4873
|
+
tu as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
4874
|
+
Ps as PUBLIC_EMAIL_DOMAINS,
|
|
4861
4875
|
Je as READ_STEP_TYPES,
|
|
4862
4876
|
Ar as RELATED_SUBJECT_KINDS,
|
|
4863
4877
|
qt as RESERVED_STATUS_KEYS,
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4878
|
+
bl as RESERVED_TYPE_KEYS,
|
|
4879
|
+
xu as RESOURCE_ATTACHED_SERVICE,
|
|
4880
|
+
vu as RESOURCE_DESCRIBE_SERVICE,
|
|
4881
|
+
Ou as RESOURCE_RESOLVE_SERVICE,
|
|
4882
|
+
Cu as RESOURCE_SEARCH_SERVICE,
|
|
4869
4883
|
Gr as SCHEDULE_ENTRY_SCOPE_KIND,
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4884
|
+
Du as SCOPE_READ_ROUTE,
|
|
4885
|
+
Ru as SCOPE_RELATED_ROUTE,
|
|
4886
|
+
Wu as SETTINGS_CATEGORIES,
|
|
4873
4887
|
oa as SIGNATURE_INTENTS,
|
|
4874
4888
|
ar as SLA_HOURS_BY_PRIORITY,
|
|
4875
|
-
|
|
4876
|
-
|
|
4889
|
+
Mc as SLA_METRICS,
|
|
4890
|
+
vc as SLA_PAUSE_REASONS,
|
|
4877
4891
|
ro as STEP_MAX_TOKENS_MAX,
|
|
4878
4892
|
no as STEP_MAX_TOKENS_MIN,
|
|
4879
4893
|
_o as STRATEGY_ITEM_SCOPE_KIND,
|
|
4880
4894
|
er as SUMMARY_MIN_LAST_CHARS,
|
|
4881
4895
|
Jn as SUMMARY_MIN_MESSAGES,
|
|
4882
|
-
|
|
4883
|
-
|
|
4896
|
+
ju as SYNC_RUN_MAX_ERRORS,
|
|
4897
|
+
Bu as SYNC_TARGET_PROVIDER_GROUP,
|
|
4884
4898
|
$n as TERMINAL_ASSIGNMENT_STATUSES,
|
|
4885
4899
|
ao as TERMINAL_RUN_STATUSES,
|
|
4886
4900
|
Xt as TRANSACTION_KINDS,
|
|
4887
4901
|
Ko as TRANSACTION_SCOPE_KINDS,
|
|
4888
|
-
|
|
4902
|
+
pc as TRIGGER_VARS,
|
|
4889
4903
|
Sr as UNKNOWN_KIND,
|
|
4890
4904
|
Eo as UNKNOWN_LEVEL_ORDER,
|
|
4891
|
-
|
|
4905
|
+
cu as UNSUPPORTED,
|
|
4892
4906
|
En as USAGE_DIMENSIONS,
|
|
4893
4907
|
Sn as USAGE_DIMENSION_IDS,
|
|
4894
4908
|
Wr as WORKSTREAM_SCOPE_KIND,
|
|
4895
4909
|
Ho as WORK_ACTIVITY_SCOPE_KIND,
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4910
|
+
ja as WORK_AREAS,
|
|
4911
|
+
ml as WORK_COMMENT_ADDED,
|
|
4912
|
+
Il as WORK_CYCLE_SYNC_KIND,
|
|
4913
|
+
hl as WORK_ITEM_ASSIGNED,
|
|
4900
4914
|
Bo as WORK_ITEM_SCOPE_KIND,
|
|
4901
|
-
|
|
4915
|
+
gl as WORK_ITEM_STATUS_CHANGED,
|
|
4902
4916
|
jo as WORK_PROJECT_SCOPE_KIND,
|
|
4903
4917
|
J as W_PRIORITY,
|
|
4904
|
-
|
|
4918
|
+
nl as acceptExampleCandidate,
|
|
4905
4919
|
Yr as actingIdentityKey,
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4920
|
+
el as activeWorkTypes,
|
|
4921
|
+
li as activityIconOf,
|
|
4922
|
+
Ai as activityJoinUrl,
|
|
4909
4923
|
dn as activitySnippet,
|
|
4910
4924
|
pn as activityTextParams,
|
|
4911
|
-
|
|
4925
|
+
bi as activityTimelineText,
|
|
4912
4926
|
gn as activityTimestamp,
|
|
4913
4927
|
w as activityTypeInfo,
|
|
4914
4928
|
ic as actorKey,
|
|
4915
|
-
|
|
4929
|
+
tl as addExampleCandidate,
|
|
4916
4930
|
Oe as addWorkingMs,
|
|
4917
|
-
|
|
4931
|
+
wu as agePresenceEntry,
|
|
4918
4932
|
Qo as aiAttachmentKind,
|
|
4919
|
-
|
|
4933
|
+
Ul as aiAttachmentRejection,
|
|
4920
4934
|
je as aiBudgetLimit,
|
|
4921
|
-
|
|
4935
|
+
xi as aiBudgetPeriodKey,
|
|
4922
4936
|
yn as aiBudgetPeriodStart,
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4937
|
+
Oi as aiBudgetState,
|
|
4938
|
+
Ci as aiVendorAcceptsAttachment,
|
|
4939
|
+
ki as aiVendorDefaultModel,
|
|
4940
|
+
wi as aiVendorLabel,
|
|
4941
|
+
vi as aiVendorNeedsBaseUrl,
|
|
4942
|
+
Mi as aiVendorsWith,
|
|
4929
4943
|
Fn as allocate,
|
|
4930
4944
|
tn as appNameFromPath,
|
|
4931
|
-
|
|
4932
|
-
|
|
4945
|
+
Yc as applyRounding,
|
|
4946
|
+
sa as applySignature,
|
|
4933
4947
|
oo as approvalRate,
|
|
4934
|
-
|
|
4935
|
-
|
|
4948
|
+
Bi as artifactBodyBytes,
|
|
4949
|
+
ji as artifactOutline,
|
|
4936
4950
|
Dn as artifactToMarkdown,
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4951
|
+
uc as assignmentMismatch,
|
|
4952
|
+
Xi as assignmentScopeKey,
|
|
4953
|
+
Qi as assignmentSubject,
|
|
4954
|
+
za as availabilityByPerson,
|
|
4955
|
+
Ga as belongsOnCalendar,
|
|
4956
|
+
_i as buildActivityPreview,
|
|
4957
|
+
ql as buildChannelIntents,
|
|
4958
|
+
Hi as buildShareKeys,
|
|
4959
|
+
vs as buildWindow,
|
|
4946
4960
|
Tr as calendarDaysBetween,
|
|
4947
4961
|
xe as calendarOf,
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4962
|
+
Ma as canNestUnder,
|
|
4963
|
+
Lc as canParent,
|
|
4964
|
+
Wa as capacityTotal,
|
|
4965
|
+
nc as capacityWeights,
|
|
4966
|
+
mi as carriesText,
|
|
4967
|
+
Ca as categoryLabel,
|
|
4954
4968
|
Vo as categoryOf,
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4969
|
+
eu as channelKindForScheme,
|
|
4970
|
+
ui as channelKindOf,
|
|
4971
|
+
Vc as checkInOverdueMs,
|
|
4972
|
+
mc as clampStepMaxTokens,
|
|
4973
|
+
ha as classifyMail,
|
|
4974
|
+
td as cleanMessageMarkdown,
|
|
4975
|
+
ed as cleanMessageText,
|
|
4976
|
+
Ji as codeQuery,
|
|
4977
|
+
Wl as compareAssistRank,
|
|
4964
4978
|
vo as compareWorkTypes,
|
|
4965
4979
|
Xn as conditionHolds,
|
|
4966
4980
|
Do as copyFrom,
|
|
4967
4981
|
W as countsAsPlanned,
|
|
4968
|
-
|
|
4969
|
-
|
|
4982
|
+
Va as coverageByPerson,
|
|
4983
|
+
qa as coverageFor,
|
|
4970
4984
|
Lt as coversWorkstream,
|
|
4971
4985
|
Pt as cycleDayIndex,
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4986
|
+
$l as cycleOrder,
|
|
4987
|
+
Ll as cycleState,
|
|
4988
|
+
Zi as decideAssignmentState,
|
|
4989
|
+
Gu as decideCadence,
|
|
4990
|
+
Xl as decideIncomingCall,
|
|
4977
4991
|
yr as defaultLocaleOf,
|
|
4978
|
-
|
|
4979
|
-
|
|
4992
|
+
xl as defaultStatusKey,
|
|
4993
|
+
ou as defineIntent,
|
|
4980
4994
|
mr as depthOf,
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4995
|
+
Tu as derivePresence,
|
|
4996
|
+
Li as describeClause,
|
|
4997
|
+
Yl as disabledIntentsFromCapabilities,
|
|
4998
|
+
Bi as documentBodyBytes,
|
|
4999
|
+
bu as documentKindOf,
|
|
5000
|
+
ji as documentOutline,
|
|
4987
5001
|
Dn as documentToMarkdown,
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
5002
|
+
mu as documentToText,
|
|
5003
|
+
Oc as dueAtOf,
|
|
5004
|
+
Xc as elapsedSeconds,
|
|
5005
|
+
Yu as emailDomain,
|
|
5006
|
+
Zu as endpointKey,
|
|
4993
5007
|
vr as erlangC,
|
|
4994
|
-
|
|
4995
|
-
|
|
5008
|
+
ms as extractParams,
|
|
5009
|
+
ks as extractTerms,
|
|
4996
5010
|
la as fillDocument,
|
|
4997
5011
|
zn as fillText,
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
$
|
|
5012
|
+
Zl as filterByEndpoint,
|
|
5013
|
+
Ql as filterByIntent,
|
|
5014
|
+
rs as filterByTargetScheme,
|
|
5015
|
+
$i as filterableDimensions,
|
|
5002
5016
|
te as findAiVendor,
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5017
|
+
Kc as fixedLevelForName,
|
|
5018
|
+
El as fixedTypeForName,
|
|
5019
|
+
Sl as fixedTypes,
|
|
5020
|
+
_u as flattenLocales,
|
|
5007
5021
|
H as floorToPeriod,
|
|
5008
|
-
|
|
5022
|
+
Ja as forecastIntervals,
|
|
5009
5023
|
Xr as formatActingIdentity,
|
|
5010
5024
|
D as formatCents,
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5025
|
+
Qc as formatClock,
|
|
5026
|
+
qc as formatHm,
|
|
5027
|
+
wl as formatItemKey,
|
|
5014
5028
|
j as formatPeriod,
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5029
|
+
Rc as formatSlaDuration,
|
|
5030
|
+
Bl as freshSources,
|
|
5031
|
+
Si as getActivitySeenUserIds,
|
|
5032
|
+
ia as getContactEndpoints,
|
|
5033
|
+
Sa as getShortTitle,
|
|
5034
|
+
Ea as getUrgencyScore,
|
|
5035
|
+
Tc as hasReacted,
|
|
5036
|
+
Uc as healthCategory,
|
|
5037
|
+
Fc as healthsInCategory,
|
|
5024
5038
|
$t as heightOf,
|
|
5025
|
-
|
|
5026
|
-
|
|
5039
|
+
Ta as helpCenterText,
|
|
5040
|
+
dc as humanizeAction,
|
|
5027
5041
|
to as interactionIdOf,
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5042
|
+
fl as isAgentUser,
|
|
5043
|
+
Aa as isAssigned,
|
|
5044
|
+
zi as isAssignmentTerminal,
|
|
5031
5045
|
Zr as isAssignmentTrigger,
|
|
5032
|
-
|
|
5046
|
+
bc as isAutoReady,
|
|
5033
5047
|
fr as isAwaitingThem,
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5048
|
+
Ti as isChatMessageActivity,
|
|
5049
|
+
_a as isClosed,
|
|
5050
|
+
gi as isConnectedType,
|
|
5051
|
+
$u as isDeepLink,
|
|
5038
5052
|
hr as isDescendant,
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5053
|
+
da as isEligible,
|
|
5054
|
+
Ii as isEmailActivity,
|
|
5055
|
+
ol as isFrozen,
|
|
5056
|
+
Ju as isHtmlBody,
|
|
5057
|
+
_c as isInFlight,
|
|
5044
5058
|
or as isInteractionUnseen,
|
|
5045
|
-
|
|
5059
|
+
Lu as isLandingPath,
|
|
5046
5060
|
Zn as isLikelyBulk,
|
|
5047
5061
|
St as isMessageShape,
|
|
5048
|
-
|
|
5049
|
-
|
|
5062
|
+
di as isMessageType,
|
|
5063
|
+
gs as isMoreSpecificPattern,
|
|
5050
5064
|
It as isNoteShape,
|
|
5051
5065
|
Ao as isOpenClock,
|
|
5052
|
-
|
|
5066
|
+
Fl as isOutwardTool,
|
|
5053
5067
|
ur as isParked,
|
|
5054
5068
|
co as isPaused,
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5069
|
+
hi as isPlaybookAuthoredType,
|
|
5070
|
+
qu as isPublicEmailDomain,
|
|
5071
|
+
Ku as isPublicPath,
|
|
5058
5072
|
dr as isReminderActive,
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5073
|
+
fi as isReplyableType,
|
|
5074
|
+
ya as isSlaAtRisk,
|
|
5075
|
+
Ac as isTerminal,
|
|
5076
|
+
fa as isThreadLongEnough,
|
|
5077
|
+
yi as isTranscriptType,
|
|
5078
|
+
Nl as isWorkClosed,
|
|
5079
|
+
Jc as isWorkTypeVisible,
|
|
5080
|
+
vl as itemDossierKeys,
|
|
5067
5081
|
N as kindFor,
|
|
5068
5082
|
Wo as ladderFor,
|
|
5069
5083
|
Io as levelIn,
|
|
5070
5084
|
Te as levelOrder,
|
|
5071
5085
|
Er as lineNet,
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5086
|
+
Ia as linkLabel,
|
|
5087
|
+
Ni as listeningAllowed,
|
|
5088
|
+
ka as localeInstruction,
|
|
5089
|
+
wa as localeName,
|
|
5090
|
+
va as localesOf,
|
|
5091
|
+
zu as looksLikeEmail,
|
|
5078
5092
|
Ct as lookup,
|
|
5079
5093
|
ta as marginCents,
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5094
|
+
fu as markdownToDocument,
|
|
5095
|
+
Jl as matchContactToIntents,
|
|
5096
|
+
ys as matchPublicRoute,
|
|
5097
|
+
xa as mcpCredentialScope,
|
|
5098
|
+
Na as mcpToolPrefix,
|
|
5099
|
+
Bc as measureRatio,
|
|
5100
|
+
Hu as mergeShownKeys,
|
|
5087
5101
|
un as messageCountsAs,
|
|
5088
|
-
|
|
5102
|
+
Pi as metricOption,
|
|
5089
5103
|
Kt as minutesOn,
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5104
|
+
Qu as needsPhoneRegion,
|
|
5105
|
+
pi as nestsUnderParent,
|
|
5106
|
+
Pc as nextLevelBelow,
|
|
5107
|
+
xc as nextSlaClock,
|
|
5094
5108
|
il as nextVersion,
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5109
|
+
Fi as normalizeArtifactBlocks,
|
|
5110
|
+
ci as normalizeBlocks,
|
|
5111
|
+
Fi as normalizeDocumentBlocks,
|
|
5098
5112
|
nn as normalizeEmail,
|
|
5099
5113
|
P as normalizeExample,
|
|
5100
5114
|
Kn as normalizeGtin,
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5115
|
+
Su as notificationPrefKey,
|
|
5116
|
+
Ms as novelty,
|
|
5117
|
+
pu as operationDescriptor,
|
|
5118
|
+
du as operationsForKind,
|
|
5119
|
+
ua as organizationSender,
|
|
5105
5120
|
ce as overlapSeconds,
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5121
|
+
Ya as overlaps,
|
|
5122
|
+
jc as paceRatio,
|
|
5123
|
+
pa as parkMarksById,
|
|
5124
|
+
oc as parseActingIdentity,
|
|
5110
5125
|
ea as parseAmount,
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5126
|
+
wc as parseClockMinutes,
|
|
5127
|
+
kl as parseItemKey,
|
|
5128
|
+
fs as pathToRegex,
|
|
5114
5129
|
Ft as patternFor,
|
|
5115
5130
|
Ut as patternStartTime,
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5131
|
+
kc as pauseBitFor,
|
|
5132
|
+
Di as periodsInRange,
|
|
5133
|
+
Xu as phoneSuffix,
|
|
5134
|
+
ma as pickMailHeaders,
|
|
5120
5135
|
ca as pickTemplate,
|
|
5121
|
-
|
|
5136
|
+
rc as placeLumps,
|
|
5122
5137
|
cn as plainTextFromMarkdown,
|
|
5123
|
-
|
|
5124
|
-
|
|
5138
|
+
Cc as planSlaEvent,
|
|
5139
|
+
Qa as plannedBillable,
|
|
5125
5140
|
Lr as plannedWorkTypeKey,
|
|
5126
5141
|
Qr as playbookActor,
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5142
|
+
yc as procedureOf,
|
|
5143
|
+
dl as productScopeKey,
|
|
5144
|
+
Cl as projectDossierKeys,
|
|
5145
|
+
hs as publicBasePathFor,
|
|
5146
|
+
Pu as publicRoutePatterns,
|
|
5147
|
+
qi as reactionWakesAssignment,
|
|
5133
5148
|
fe as readPath,
|
|
5134
5149
|
et as readStepError,
|
|
5135
5150
|
lr as recencyOf,
|
|
5136
5151
|
aa as recipientLocale,
|
|
5137
5152
|
Jr as refKey,
|
|
5138
|
-
|
|
5153
|
+
Ls as registrableDomain,
|
|
5139
5154
|
No as rejectExampleCandidate,
|
|
5140
|
-
|
|
5155
|
+
Ka as relatedByDefault,
|
|
5141
5156
|
Ie as remainingMsOf,
|
|
5142
5157
|
xr as requiredAgents,
|
|
5143
5158
|
$r as requirementFor,
|
|
5144
|
-
|
|
5159
|
+
ts as resolveAccountCapabilities,
|
|
5145
5160
|
me as resolveActivityText,
|
|
5146
|
-
|
|
5161
|
+
es as resolveChannelIntents,
|
|
5147
5162
|
na as resolvePrice,
|
|
5148
5163
|
Gn as resolveSignature,
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5164
|
+
ku as resolveWorkMode,
|
|
5165
|
+
Nu as resourceKindOf,
|
|
5166
|
+
Wc as rollupChildren,
|
|
5152
5167
|
G as roundHalfUp,
|
|
5153
|
-
|
|
5154
|
-
|
|
5168
|
+
sc as runActor,
|
|
5169
|
+
Sc as runInteractionId,
|
|
5155
5170
|
On as sanitizeInline,
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5171
|
+
As as sanitizeTranscript,
|
|
5172
|
+
ec as scheduleEntryScopeKey,
|
|
5173
|
+
ba as scoreInteraction,
|
|
5174
|
+
yl as scoreWorkItem,
|
|
5175
|
+
Oa as selectLenses,
|
|
5161
5176
|
Cr as serviceLevel,
|
|
5162
|
-
|
|
5163
|
-
|
|
5177
|
+
zl as sessionsHoldCannotReach,
|
|
5178
|
+
Vl as sessionsToHold,
|
|
5164
5179
|
vt as shareKeyForTeam,
|
|
5165
5180
|
Mt as shareKeyForUser,
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5181
|
+
Gi as shareKeysForViewer,
|
|
5182
|
+
Za as shortfalls,
|
|
5183
|
+
Mu as shouldRunAudioPipeline,
|
|
5184
|
+
Nc as slaBadgeTone,
|
|
5185
|
+
ga as slaHoursByInbox,
|
|
5171
5186
|
pr as slaHoursFor,
|
|
5172
5187
|
zo as sortStatuses,
|
|
5173
5188
|
Jo as sourceKey,
|
|
5174
5189
|
zr as spreadOverWeights,
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5190
|
+
Ol as statusIn,
|
|
5191
|
+
gc as stepsOf,
|
|
5192
|
+
$c as strategyAncestorKeysFor,
|
|
5193
|
+
Dc as strategyDossierKeys,
|
|
5179
5194
|
zt as strategyItemScopeKey,
|
|
5180
5195
|
ln as stripHtml,
|
|
5181
|
-
|
|
5196
|
+
Ec as subjectKeyOf,
|
|
5182
5197
|
Bt as subjectOf,
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5198
|
+
Gl as subjectRef,
|
|
5199
|
+
Ml as suggestProjectKey,
|
|
5200
|
+
Hc as suggestedHealth,
|
|
5201
|
+
Ic as summarizeReactions,
|
|
5202
|
+
lc as targetById,
|
|
5203
|
+
cc as targetForActivityType,
|
|
5204
|
+
zc as targetOrder,
|
|
5190
5205
|
_r as taxRateFor,
|
|
5191
5206
|
wr as termsFor,
|
|
5192
5207
|
qr as toActingIdentity,
|
|
5193
5208
|
ht as toE164,
|
|
5194
|
-
|
|
5209
|
+
Wi as toolSourceKinds,
|
|
5195
5210
|
Ro as topicOfferedForTeam,
|
|
5196
|
-
|
|
5211
|
+
rl as topicsForTeam,
|
|
5197
5212
|
Or as trafficIntensity,
|
|
5198
|
-
|
|
5199
|
-
|
|
5213
|
+
al as transactionContext,
|
|
5214
|
+
pl as transactionIdFromScope,
|
|
5200
5215
|
ke as transactionKind,
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5216
|
+
ul as transactionScopeKey,
|
|
5217
|
+
cl as transactionSlots,
|
|
5218
|
+
Fa as transactionTotals,
|
|
5204
5219
|
xo as truncateExample,
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5220
|
+
_l as typeIn,
|
|
5221
|
+
Al as typesFor,
|
|
5222
|
+
Rl as uniqueWorkStatusKey,
|
|
5223
|
+
Zc as uniqueWorkTypeKey,
|
|
5209
5224
|
In as usageMetricId,
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5225
|
+
Ki as usageMetrics,
|
|
5226
|
+
Dl as validateStatuses,
|
|
5227
|
+
ac as valueAtPath,
|
|
5213
5228
|
ve as waitHoursOf,
|
|
5214
|
-
|
|
5215
|
-
|
|
5229
|
+
Yi as wakesAssignment,
|
|
5230
|
+
Tl as workActivityScopeKey,
|
|
5216
5231
|
Go as workItemScopeKey,
|
|
5217
5232
|
Yt as workProjectScopeKey,
|
|
5218
|
-
|
|
5233
|
+
Gc as workRatio,
|
|
5219
5234
|
Xo as workStatusKey,
|
|
5220
5235
|
Mo as workTypeKey,
|
|
5221
5236
|
_e as workingMsBetween,
|
|
5222
|
-
|
|
5237
|
+
tc as workstreamScopeKey
|
|
5223
5238
|
};
|