@opencxh/domain 1.244.0 → 1.246.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/document-template/tokens.d.ts +20 -3
- package/dist/entities/money/totals.d.ts +3 -0
- package/dist/entities/transaction/document.d.ts +2 -0
- package/dist/entities/transaction/types.d.ts +17 -0
- package/dist/index.cjs +18 -18
- package/dist/index.js +1198 -1189
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const is = 10, ss = 10, as = 10, cs = 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 ls(e, t = () => {
|
|
18
18
|
}) {
|
|
19
19
|
if (!Array.isArray(e)) return [];
|
|
20
20
|
const n = [];
|
|
@@ -59,9 +59,9 @@ function ci(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 i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && oe(a.text));
|
|
63
|
+
if (s.length !== i.length && t("an action without action_id, invoke or text"), s.length === 0) continue;
|
|
64
|
+
s.length > 5 && t("more than 5 actions"), o.elements = s.slice(0, 5);
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -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 ie(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 — ${ie(e.payload.from)}` : `Outbound call started — ${ie(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 — ${ie(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 us(e) {
|
|
471
471
|
return w(e)?.icon ?? "circle";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function ds(e) {
|
|
474
474
|
return w(e)?.channelKind;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Et(e) {
|
|
477
477
|
return e === "message" || e === "note";
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
479
|
+
function ps(e) {
|
|
480
|
+
return Et(w(e)?.shape);
|
|
481
481
|
}
|
|
482
482
|
function It(e) {
|
|
483
483
|
return e === "note";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function fs(e) {
|
|
486
486
|
return It(w(e)?.shape);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function ms(e) {
|
|
489
489
|
return w(e)?.replyable === !0;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function hs(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 gs(e) {
|
|
498
498
|
return w(e)?.playbookAuthored === !0;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function ys(e) {
|
|
501
501
|
return w(e)?.connected === !0;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function bs(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 _s(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 As(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 [i, s] of Object.entries(e.params ?? {}))
|
|
534
|
+
r[i] = fe(t, s);
|
|
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 Ss(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,
|
|
@@ -649,7 +649,7 @@ class hn {
|
|
|
649
649
|
* {@link ResolvedActivityType}.
|
|
650
650
|
*/
|
|
651
651
|
isMessage(t) {
|
|
652
|
-
return
|
|
652
|
+
return Et(this.get(t)?.shape);
|
|
653
653
|
}
|
|
654
654
|
/** Folds into the list under the message it answers. See {@link isNoteShape}. */
|
|
655
655
|
nestsUnderParent(t) {
|
|
@@ -681,20 +681,20 @@ class hn {
|
|
|
681
681
|
return this.translate;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function
|
|
684
|
+
const Es = new hn();
|
|
685
|
+
function Is(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(([i, s]) => s >= r && !o.has(i)).map(([i]) => i);
|
|
690
690
|
}
|
|
691
691
|
function gn(e) {
|
|
692
692
|
return e.createdAt ?? 0;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function Ts(e) {
|
|
695
695
|
return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function ws(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 ks(e) {
|
|
794
794
|
return te(e)?.label ?? e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Ms(e, t = "gpt-5-mini") {
|
|
797
797
|
return te(e)?.defaultModel ?? t;
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function vs(e) {
|
|
800
800
|
return Tt.filter((t) => t.capabilities.includes(e));
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Cs(e) {
|
|
803
803
|
const t = te(e);
|
|
804
804
|
return !!t && !t.baseUrl;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Os(e, t) {
|
|
807
807
|
return t === "text" ? !0 : te(e)?.attachmentKinds?.includes(t) === !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function xs(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 Ns(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 Rs(e) {
|
|
826
826
|
return e?.listeningEnabled !== !1;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Ds = [
|
|
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,49 +835,49 @@ const Ri = [
|
|
|
835
835
|
{ id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
|
|
836
836
|
{ id: "time", label: "Tijd", labelSource: "raw" }
|
|
837
837
|
];
|
|
838
|
-
function
|
|
838
|
+
function se(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()}-${se(n.getUTCMonth() + 1)}-${se(n.getUTCDate())}`;
|
|
843
|
+
return t === "day" ? r : `${r}T${se(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
|
-
const bn = 36e5,
|
|
850
|
-
function
|
|
851
|
-
const r = n === "hour" ? bn :
|
|
852
|
-
for (let
|
|
853
|
-
o.push(j(
|
|
849
|
+
const bn = 36e5, _n = 864e5;
|
|
850
|
+
function $s(e, t, n) {
|
|
851
|
+
const r = n === "hour" ? bn : _n, o = [];
|
|
852
|
+
for (let i = H(e, n); i <= t; i += r)
|
|
853
|
+
o.push(j(i, n));
|
|
854
854
|
return o;
|
|
855
855
|
}
|
|
856
|
-
const
|
|
857
|
-
function
|
|
856
|
+
const An = /* @__PURE__ */ new Set(["time"]);
|
|
857
|
+
function Ls(e, t, n) {
|
|
858
858
|
if (!e) return [];
|
|
859
859
|
const r = new Set(e.supportedDimensions ?? []);
|
|
860
|
-
return t.filter((o) => r.has(o.id) && !
|
|
860
|
+
return t.filter((o) => r.has(o.id) && !An.has(o.id)).map((o) => ({
|
|
861
861
|
id: o.id,
|
|
862
862
|
label: o.label,
|
|
863
863
|
options: o.options?.length ? o.options : n[o.id] ?? []
|
|
864
864
|
})).filter((o) => o.options.length > 0);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Ps(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 Ks(e) {
|
|
871
871
|
return { value: e.id, label: `${e.category} · ${e.label}` };
|
|
872
872
|
}
|
|
873
|
-
const
|
|
873
|
+
const Sn = [
|
|
874
874
|
{ id: "resource", label: "Resource", labelSource: "raw" },
|
|
875
875
|
{ id: "origin", label: "Herkomst", labelSource: "raw" }
|
|
876
|
-
],
|
|
876
|
+
], En = Sn.map((e) => e.id);
|
|
877
877
|
function In(e, t) {
|
|
878
878
|
return `${e}.usage.${t}`;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Us(e, t) {
|
|
881
881
|
return t.map((n) => ({
|
|
882
882
|
id: In(e, n.unit),
|
|
883
883
|
label: n.label,
|
|
@@ -886,13 +886,13 @@ function Ki(e, t) {
|
|
|
886
886
|
aggregation: "sum",
|
|
887
887
|
supportedDimensions: [
|
|
888
888
|
"provider",
|
|
889
|
-
...
|
|
889
|
+
...En,
|
|
890
890
|
...n.extraDimensions ?? [],
|
|
891
891
|
"time"
|
|
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, Fs = 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), i = qe(e, o, "[", "]");
|
|
926
|
+
if (i < 0 || e[i + 1] !== "(") {
|
|
927
927
|
t += e[n], n += 1;
|
|
928
928
|
continue;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
931
|
-
if (
|
|
930
|
+
const s = qe(e, i + 2, "(", ")");
|
|
931
|
+
if (s < 0) {
|
|
932
932
|
t += e[n], n += 1;
|
|
933
933
|
continue;
|
|
934
934
|
}
|
|
935
|
-
const a = e.slice(o,
|
|
936
|
-
t += r || !Me(
|
|
935
|
+
const a = e.slice(o, i), u = e.slice(i + 2, s).trim().split(/\s+/)[0] ?? "";
|
|
936
|
+
t += r || !Me(u) ? a : e.slice(n, s + 1), n = s + 1;
|
|
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 i = t; i < e.length; i += 1) {
|
|
943
|
+
if (e[i] === "\\") {
|
|
944
|
+
i += 1;
|
|
945
945
|
continue;
|
|
946
946
|
}
|
|
947
|
-
if (e[
|
|
948
|
-
else if (e[
|
|
949
|
-
return
|
|
947
|
+
if (e[i] === n) o += 1;
|
|
948
|
+
else if (e[i] === r && (o -= 1, o === 0))
|
|
949
|
+
return i;
|
|
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 Bs(e, t = () => {
|
|
972
972
|
}) {
|
|
973
973
|
if (!Array.isArray(e)) return [];
|
|
974
974
|
const n = [];
|
|
@@ -983,95 +983,95 @@ function Fi(e, t = () => {
|
|
|
983
983
|
t(`unknown block type ${String(o.type)}`);
|
|
984
984
|
continue;
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const i = 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 s = T(o.text);
|
|
990
|
+
if (!s) {
|
|
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({ ...i, type: "heading", level: a, text: s });
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
998
|
case "paragraph": {
|
|
999
|
-
const
|
|
1000
|
-
if (!
|
|
999
|
+
const s = T(o.text);
|
|
1000
|
+
if (!s) {
|
|
1001
1001
|
t("a paragraph without text");
|
|
1002
1002
|
continue;
|
|
1003
1003
|
}
|
|
1004
|
-
n.push({ ...
|
|
1004
|
+
n.push({ ...i, type: "paragraph", text: s });
|
|
1005
1005
|
break;
|
|
1006
1006
|
}
|
|
1007
1007
|
case "quote": {
|
|
1008
|
-
const
|
|
1009
|
-
if (!
|
|
1008
|
+
const s = T(o.text);
|
|
1009
|
+
if (!s) {
|
|
1010
1010
|
t("a quote without text");
|
|
1011
1011
|
continue;
|
|
1012
1012
|
}
|
|
1013
|
-
n.push({ ...
|
|
1013
|
+
n.push({ ...i, type: "quote", text: s });
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
1016
|
case "code": {
|
|
1017
|
-
const
|
|
1018
|
-
if (!
|
|
1017
|
+
const s = xn(o.text);
|
|
1018
|
+
if (!s) {
|
|
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({ ...i, type: "code", ...a, text: s });
|
|
1024
1024
|
break;
|
|
1025
1025
|
}
|
|
1026
1026
|
case "divider":
|
|
1027
|
-
n.push({ ...
|
|
1027
|
+
n.push({ ...i, type: "divider" });
|
|
1028
1028
|
break;
|
|
1029
1029
|
case "list": {
|
|
1030
|
-
const
|
|
1031
|
-
for (const l of
|
|
1030
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1031
|
+
for (const l of s) {
|
|
1032
1032
|
if (a.length >= Ge) {
|
|
1033
1033
|
t(`more than ${Ge} list items`);
|
|
1034
1034
|
break;
|
|
1035
1035
|
}
|
|
1036
1036
|
const d = T(l?.text);
|
|
1037
1037
|
if (!d) continue;
|
|
1038
|
-
const
|
|
1039
|
-
a.push(
|
|
1038
|
+
const c = T(l?.lead, 200);
|
|
1039
|
+
a.push(c ? { lead: c, text: d } : { text: d });
|
|
1040
1040
|
}
|
|
1041
1041
|
if (a.length === 0) {
|
|
1042
1042
|
t("a list without usable items");
|
|
1043
1043
|
continue;
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
n.push({ ...
|
|
1045
|
+
const u = o.style === "numbered" ? "numbered" : "bulleted";
|
|
1046
|
+
n.push({ ...i, type: "list", style: u, items: a });
|
|
1047
1047
|
break;
|
|
1048
1048
|
}
|
|
1049
1049
|
case "table": {
|
|
1050
|
-
const
|
|
1051
|
-
for (const
|
|
1050
|
+
const s = Array.isArray(o.columns) ? o.columns : [], a = [];
|
|
1051
|
+
for (const c of s) {
|
|
1052
1052
|
if (a.length >= Ve) {
|
|
1053
1053
|
t(`more than ${Ve} table columns`);
|
|
1054
1054
|
break;
|
|
1055
1055
|
}
|
|
1056
|
-
const p = T(
|
|
1056
|
+
const p = T(c?.label, q), f = c?.align === "right" ? "right" : void 0;
|
|
1057
1057
|
a.push(f ? { label: p, align: f } : { label: p });
|
|
1058
1058
|
}
|
|
1059
1059
|
if (a.length === 0) {
|
|
1060
1060
|
t("a table without columns");
|
|
1061
1061
|
continue;
|
|
1062
1062
|
}
|
|
1063
|
-
const
|
|
1064
|
-
for (const
|
|
1063
|
+
const u = Array.isArray(o.rows) ? o.rows : [], l = [];
|
|
1064
|
+
for (const c of u) {
|
|
1065
1065
|
if (l.length >= We) {
|
|
1066
1066
|
t(`more than ${We} table rows`);
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
|
-
const p = Array.isArray(
|
|
1069
|
+
const p = Array.isArray(c) ? c : [];
|
|
1070
1070
|
l.push(a.map((f, y) => T(p[y], q)));
|
|
1071
1071
|
}
|
|
1072
1072
|
const d = T(o.caption, q);
|
|
1073
1073
|
n.push({
|
|
1074
|
-
...
|
|
1074
|
+
...i,
|
|
1075
1075
|
type: "table",
|
|
1076
1076
|
columns: a,
|
|
1077
1077
|
rows: l,
|
|
@@ -1080,52 +1080,52 @@ function Fi(e, t = () => {
|
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
1082
|
case "kpi": {
|
|
1083
|
-
const
|
|
1084
|
-
for (const
|
|
1083
|
+
const s = Array.isArray(o.items) ? o.items : [], a = [];
|
|
1084
|
+
for (const u of s) {
|
|
1085
1085
|
if (a.length >= ze) {
|
|
1086
1086
|
t(`more than ${ze} kpi items`);
|
|
1087
1087
|
break;
|
|
1088
1088
|
}
|
|
1089
|
-
const l = T(
|
|
1089
|
+
const l = T(u?.value, 40), d = T(u?.label, 80);
|
|
1090
1090
|
if (!l || !d) continue;
|
|
1091
|
-
const
|
|
1091
|
+
const c = u?.tone;
|
|
1092
1092
|
a.push(
|
|
1093
|
-
typeof
|
|
1093
|
+
typeof c == "string" && wt.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
|
|
1094
1094
|
);
|
|
1095
1095
|
}
|
|
1096
1096
|
if (a.length === 0) {
|
|
1097
1097
|
t("a kpi block without usable items");
|
|
1098
1098
|
continue;
|
|
1099
1099
|
}
|
|
1100
|
-
n.push({ ...
|
|
1100
|
+
n.push({ ...i, type: "kpi", items: a });
|
|
1101
1101
|
break;
|
|
1102
1102
|
}
|
|
1103
1103
|
case "image": {
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1104
|
+
const s = typeof o.url == "string" ? o.url.trim() : "";
|
|
1105
|
+
if (!s || !Me(s)) {
|
|
1106
1106
|
t("an image without a usable url");
|
|
1107
1107
|
continue;
|
|
1108
1108
|
}
|
|
1109
|
-
const a = T(o.alt, 200),
|
|
1109
|
+
const a = T(o.alt, 200), u = T(o.caption, q);
|
|
1110
1110
|
n.push({
|
|
1111
|
-
...
|
|
1111
|
+
...i,
|
|
1112
1112
|
type: "image",
|
|
1113
|
-
url:
|
|
1113
|
+
url: s,
|
|
1114
1114
|
...a ? { alt: a } : {},
|
|
1115
|
-
...
|
|
1115
|
+
...u ? { caption: u } : {}
|
|
1116
1116
|
});
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
1119
1119
|
case "letterhead": {
|
|
1120
|
-
const
|
|
1121
|
-
for (const d of
|
|
1120
|
+
const s = Array.isArray(o.fields) ? o.fields : [], a = [];
|
|
1121
|
+
for (const d of s) {
|
|
1122
1122
|
if (a.length >= Xe) {
|
|
1123
1123
|
t(`more than ${Xe} letterhead fields`);
|
|
1124
1124
|
break;
|
|
1125
1125
|
}
|
|
1126
|
-
const
|
|
1126
|
+
const c = d, p = typeof c?.key == "string" ? c.key.slice(0, 48) : "", f = U(c?.value);
|
|
1127
1127
|
if (!p || !f) continue;
|
|
1128
|
-
const y = U(
|
|
1128
|
+
const y = U(c?.label, 80);
|
|
1129
1129
|
a.push(y ? { key: p, label: y, value: f } : { key: p, value: f });
|
|
1130
1130
|
}
|
|
1131
1131
|
const l = (Array.isArray(o.recipient) ? o.recipient : []).slice(0, Tn).map((d) => U(d)).filter(Boolean);
|
|
@@ -1134,7 +1134,7 @@ function Fi(e, t = () => {
|
|
|
1134
1134
|
continue;
|
|
1135
1135
|
}
|
|
1136
1136
|
n.push({
|
|
1137
|
-
...
|
|
1137
|
+
...i,
|
|
1138
1138
|
type: "letterhead",
|
|
1139
1139
|
fields: a,
|
|
1140
1140
|
...l.length > 0 ? { recipient: l } : {}
|
|
@@ -1142,44 +1142,44 @@ function Fi(e, t = () => {
|
|
|
1142
1142
|
break;
|
|
1143
1143
|
}
|
|
1144
1144
|
case "totals": {
|
|
1145
|
-
const
|
|
1146
|
-
const d = Array.isArray(l) ? l : [],
|
|
1145
|
+
const s = (l) => {
|
|
1146
|
+
const d = Array.isArray(l) ? l : [], c = [];
|
|
1147
1147
|
for (const p of d) {
|
|
1148
|
-
if (
|
|
1148
|
+
if (c.length >= Ye) {
|
|
1149
1149
|
t(`more than ${Ye} totals rows`);
|
|
1150
1150
|
break;
|
|
1151
1151
|
}
|
|
1152
1152
|
const f = p, y = U(f?.label), m = U(f?.amount, 40);
|
|
1153
|
-
!y || !m ||
|
|
1153
|
+
!y || !m || c.push(
|
|
1154
1154
|
f?.emphasis === !0 ? { label: y, amount: m, emphasis: !0 } : { label: y, amount: m }
|
|
1155
1155
|
);
|
|
1156
1156
|
}
|
|
1157
|
-
return
|
|
1158
|
-
}, a =
|
|
1159
|
-
if (a.length === 0) {
|
|
1157
|
+
return c;
|
|
1158
|
+
}, a = s(o.rows);
|
|
1159
|
+
if (a.length === 0 && !o.block_id) {
|
|
1160
1160
|
t("a totals block without usable rows");
|
|
1161
1161
|
continue;
|
|
1162
1162
|
}
|
|
1163
|
-
const
|
|
1164
|
-
n.push({ ...
|
|
1163
|
+
const u = s(o.taxRows);
|
|
1164
|
+
n.push({ ...i, type: "totals", rows: a, ...u.length > 0 ? { taxRows: u } : {} });
|
|
1165
1165
|
break;
|
|
1166
1166
|
}
|
|
1167
1167
|
case "pagebreak":
|
|
1168
|
-
n.push({ ...
|
|
1168
|
+
n.push({ ...i, type: "pagebreak" });
|
|
1169
1169
|
break;
|
|
1170
1170
|
case "callout": {
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1171
|
+
const s = T(o.text);
|
|
1172
|
+
if (!s) {
|
|
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
|
+
...i,
|
|
1179
1179
|
type: "callout",
|
|
1180
1180
|
tone: Nn(o.tone),
|
|
1181
1181
|
...a ? { title: a } : {},
|
|
1182
|
-
text:
|
|
1182
|
+
text: s
|
|
1183
1183
|
});
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
@@ -1187,10 +1187,10 @@ function Fi(e, t = () => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
return n;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function js(e) {
|
|
1191
1191
|
return JSON.stringify(e).length;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Hs(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, i) => n?.[i] === "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 i = Rn(o);
|
|
1272
|
+
i.length > 0 && n.push(i.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 Gs(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 Ws(e, t) {
|
|
1288
1288
|
return [Mt(e), ...t.map(vt)];
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Vs(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"], zs = ["open", "waiting"];
|
|
1297
|
+
function Xs(e) {
|
|
1298
1298
|
return $n.includes(e);
|
|
1299
1299
|
}
|
|
1300
1300
|
const Ln = "assignment";
|
|
1301
|
-
function
|
|
1301
|
+
function Ys(e) {
|
|
1302
1302
|
return `${Ln}:${e}`;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function qs(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 Qs(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 Zs(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 Js(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 ea(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
|
}
|
|
@@ -1350,38 +1350,38 @@ function G(e) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
function Fn(e, t) {
|
|
1352
1352
|
if (t.length === 0) return [];
|
|
1353
|
-
const n = t.reduce((
|
|
1354
|
-
if (n === 0) return t.map((
|
|
1355
|
-
const r = t.map((
|
|
1356
|
-
let
|
|
1357
|
-
const
|
|
1358
|
-
for (let
|
|
1359
|
-
o[
|
|
1353
|
+
const n = t.reduce((u, l) => u + l, 0);
|
|
1354
|
+
if (n === 0) return t.map((u, l) => l === 0 ? e : 0);
|
|
1355
|
+
const r = t.map((u) => e * u / n), o = r.map((u) => Math.trunc(u));
|
|
1356
|
+
let i = e - o.reduce((u, l) => u + l, 0);
|
|
1357
|
+
const s = r.map((u, l) => ({ index: l, fraction: Math.abs(u - o[l]) })).sort((u, l) => l.fraction - u.fraction), a = i < 0 ? -1 : 1;
|
|
1358
|
+
for (let u = 0; i !== 0 && u < s.length; u++)
|
|
1359
|
+
o[s[u].index] += a, i -= a;
|
|
1360
1360
|
return o;
|
|
1361
1361
|
}
|
|
1362
1362
|
function D(e, t = {}) {
|
|
1363
|
-
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0,
|
|
1364
|
-
let
|
|
1365
|
-
for (let l = 0; l <
|
|
1366
|
-
l > 0 && (
|
|
1367
|
-
return `${o ? "-" : ""}${
|
|
1363
|
+
const n = t.decimal ?? ",", r = t.group ?? ".", o = e < 0, i = Math.abs(Math.trunc(e)).toString().padStart(3, "0"), s = i.slice(0, -2), a = i.slice(-2);
|
|
1364
|
+
let u = "";
|
|
1365
|
+
for (let l = 0; l < s.length; l++)
|
|
1366
|
+
l > 0 && (s.length - l) % 3 === 0 && (u += r), u += s[l];
|
|
1367
|
+
return `${o ? "-" : ""}${u}${n}${a}`;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function ta(e) {
|
|
1370
1370
|
const t = e.trim().replace(/[\s ]/g, "");
|
|
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 i = o.lastIndexOf(","), s = o.lastIndexOf("."), a = Math.max(i, s), u = a === -1 ? "" : o.slice(a + 1), l = a !== -1 && u.length >= 1 && u.length <= 2, d = l ? o.slice(0, a) : o;
|
|
1375
1375
|
if (!Bn(d)) return;
|
|
1376
|
-
const
|
|
1377
|
-
if (
|
|
1378
|
-
const f = Number(
|
|
1376
|
+
const c = d.replace(/[.,]/g, ""), p = l ? u.padEnd(2, "0") : "00";
|
|
1377
|
+
if (c === "") return;
|
|
1378
|
+
const f = Number(c) * 100 + Number(p);
|
|
1379
1379
|
return r ? -f : f;
|
|
1380
1380
|
}
|
|
1381
1381
|
function Bn(e) {
|
|
1382
1382
|
return /^\d+$/.test(e) ? !0 : e.includes(".") && e.includes(",") ? !1 : /^\d{1,3}([.,]\d{3})*$/.test(e);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function na(e) {
|
|
1385
1385
|
return e.costPriceCents == null ? e.netCents : e.netCents - G(e.costPriceCents * e.quantity);
|
|
1386
1386
|
}
|
|
1387
1387
|
const jn = [
|
|
@@ -1406,20 +1406,20 @@ const jn = [
|
|
|
1406
1406
|
matches: (e, t) => !e.contractId && !e.companyId && !!e.segmentKey && e.segmentKey === t.segmentKey && !!e.categoryKey
|
|
1407
1407
|
}
|
|
1408
1408
|
];
|
|
1409
|
-
function
|
|
1409
|
+
function ra(e, t, n) {
|
|
1410
1410
|
const r = n.filter(
|
|
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
|
|
1417
|
-
(a,
|
|
1414
|
+
const i = r.filter((a) => o.matches(a, t));
|
|
1415
|
+
if (i.length === 0) continue;
|
|
1416
|
+
const s = i.reduce(
|
|
1417
|
+
(a, u) => (u.minQuantity ?? 0) >= (a.minQuantity ?? 0) ? u : a
|
|
1418
1418
|
);
|
|
1419
1419
|
return {
|
|
1420
|
-
unitPriceCents: Hn(
|
|
1421
|
-
sourceKey: (
|
|
1422
|
-
ruleId:
|
|
1420
|
+
unitPriceCents: Hn(s, e.listPriceCents),
|
|
1421
|
+
sourceKey: (s.minQuantity ?? 0) > 1 ? "tier" : o.key,
|
|
1422
|
+
ruleId: s.id
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
1425
|
return { unitPriceCents: e.listPriceCents, sourceKey: "list" };
|
|
@@ -1427,7 +1427,7 @@ function na(e, t, n) {
|
|
|
1427
1427
|
function Hn(e, t) {
|
|
1428
1428
|
return e.unitPriceCents != null ? e.unitPriceCents : e.discountPercent != null ? G(t * (1 - e.discountPercent / 100)) : t;
|
|
1429
1429
|
}
|
|
1430
|
-
const
|
|
1430
|
+
const oa = ["piece", "hour", "day", "month", "km", "license"], ia = /* @__PURE__ */ new Set(["mail", "message"]);
|
|
1431
1431
|
function Gn(e, t) {
|
|
1432
1432
|
const n = e.settings?.signatures?.[t];
|
|
1433
1433
|
return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
|
|
@@ -1439,7 +1439,7 @@ function sa(e, t, n, r = "html") {
|
|
|
1439
1439
|
|
|
1440
1440
|
` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function aa(e) {
|
|
1443
1443
|
return e.endpoints ?? [];
|
|
1444
1444
|
}
|
|
1445
1445
|
function $(e) {
|
|
@@ -1447,14 +1447,14 @@ function $(e) {
|
|
|
1447
1447
|
if (t)
|
|
1448
1448
|
return t.split(/[-_]/)[0] || void 0;
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1450
|
+
function ca(e) {
|
|
1451
1451
|
return $(e.contactLocale) ?? $(e.companyLocale) ?? $(e.organizationLocale);
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function la(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 i = $(n), s = $(r);
|
|
1457
|
+
return o.find((a) => $(a.locale) === i) ?? o.find((a) => $(a.locale) === s) ?? // A row with no language at all is the single-language case: it is for everybody.
|
|
1458
1458
|
o.find((a) => !a.locale) ?? o[0];
|
|
1459
1459
|
}
|
|
1460
1460
|
const Wn = /\{([a-zA-Z0-9_.]+)\}/g;
|
|
@@ -1469,12 +1469,12 @@ function Ct(e, t) {
|
|
|
1469
1469
|
function Vn(e) {
|
|
1470
1470
|
return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
1471
1471
|
}
|
|
1472
|
-
function zn(e, t) {
|
|
1473
|
-
const
|
|
1474
|
-
return { text: e.replace(Wn, (
|
|
1475
|
-
const
|
|
1476
|
-
return
|
|
1477
|
-
}), unresolved:
|
|
1472
|
+
function zn(e, t, n) {
|
|
1473
|
+
const r = [];
|
|
1474
|
+
return { text: e.replace(Wn, (i, s) => {
|
|
1475
|
+
const a = Ct(t, s);
|
|
1476
|
+
return a == null || a === "" ? (r.includes(s) || r.push(s), n ?? `{${s}}`) : Vn(a);
|
|
1477
|
+
}), unresolved: r };
|
|
1478
1478
|
}
|
|
1479
1479
|
function Xn(e, t) {
|
|
1480
1480
|
if (!e) return !0;
|
|
@@ -1485,104 +1485,108 @@ function Xn(e, t) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
return e.equals !== void 0 ? n === e.equals : !0;
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const
|
|
1490
|
-
const
|
|
1491
|
-
for (const
|
|
1492
|
-
return
|
|
1488
|
+
function ua(e, t, n, r, o) {
|
|
1489
|
+
const i = [], s = [], a = /* @__PURE__ */ new Set(), u = (l) => {
|
|
1490
|
+
const d = zn(l, t, o);
|
|
1491
|
+
for (const c of d.unresolved) i.includes(c) || i.push(c);
|
|
1492
|
+
return d.text;
|
|
1493
1493
|
};
|
|
1494
|
-
for (const
|
|
1495
|
-
if (
|
|
1496
|
-
const
|
|
1497
|
-
if (
|
|
1498
|
-
s.push(...
|
|
1494
|
+
for (const l of e) {
|
|
1495
|
+
if (l.block_id && !Xn(n?.[l.block_id], t)) continue;
|
|
1496
|
+
const d = l.block_id ? r?.[l.block_id] : void 0;
|
|
1497
|
+
if (d && l.block_id) {
|
|
1498
|
+
a.add(l.block_id), s.push(...d);
|
|
1499
1499
|
continue;
|
|
1500
1500
|
}
|
|
1501
|
-
switch (
|
|
1501
|
+
switch (l.type) {
|
|
1502
1502
|
case "heading":
|
|
1503
1503
|
case "paragraph":
|
|
1504
1504
|
case "quote":
|
|
1505
|
-
s.push({ ...
|
|
1505
|
+
s.push({ ...l, text: u(l.text) });
|
|
1506
1506
|
break;
|
|
1507
1507
|
case "callout":
|
|
1508
1508
|
s.push({
|
|
1509
|
-
...
|
|
1510
|
-
...
|
|
1511
|
-
text:
|
|
1509
|
+
...l,
|
|
1510
|
+
...l.title ? { title: u(l.title) } : {},
|
|
1511
|
+
text: u(l.text)
|
|
1512
1512
|
});
|
|
1513
1513
|
break;
|
|
1514
1514
|
case "code":
|
|
1515
|
-
s.push(
|
|
1515
|
+
s.push(l);
|
|
1516
1516
|
break;
|
|
1517
1517
|
case "list":
|
|
1518
1518
|
s.push({
|
|
1519
|
-
...
|
|
1520
|
-
items:
|
|
1521
|
-
...
|
|
1522
|
-
text:
|
|
1519
|
+
...l,
|
|
1520
|
+
items: l.items.map((c) => ({
|
|
1521
|
+
...c.lead ? { lead: u(c.lead) } : {},
|
|
1522
|
+
text: u(c.text)
|
|
1523
1523
|
}))
|
|
1524
1524
|
});
|
|
1525
1525
|
break;
|
|
1526
1526
|
case "table":
|
|
1527
1527
|
s.push({
|
|
1528
|
-
...
|
|
1529
|
-
columns:
|
|
1530
|
-
rows:
|
|
1531
|
-
...
|
|
1528
|
+
...l,
|
|
1529
|
+
columns: l.columns.map((c) => ({ ...c, label: u(c.label) })),
|
|
1530
|
+
rows: l.rows.map((c) => c.map(u)),
|
|
1531
|
+
...l.caption ? { caption: u(l.caption) } : {}
|
|
1532
1532
|
});
|
|
1533
1533
|
break;
|
|
1534
1534
|
case "kpi":
|
|
1535
1535
|
s.push({
|
|
1536
|
-
...
|
|
1537
|
-
items:
|
|
1538
|
-
...
|
|
1539
|
-
value:
|
|
1540
|
-
label:
|
|
1536
|
+
...l,
|
|
1537
|
+
items: l.items.map((c) => ({
|
|
1538
|
+
...c,
|
|
1539
|
+
value: u(c.value),
|
|
1540
|
+
label: u(c.label)
|
|
1541
1541
|
}))
|
|
1542
1542
|
});
|
|
1543
1543
|
break;
|
|
1544
1544
|
case "letterhead":
|
|
1545
1545
|
s.push({
|
|
1546
|
-
...
|
|
1547
|
-
fields:
|
|
1548
|
-
...
|
|
1546
|
+
...l,
|
|
1547
|
+
fields: l.fields.map((c) => ({ ...c, value: u(c.value) })),
|
|
1548
|
+
...l.recipient ? { recipient: l.recipient.map(u) } : {}
|
|
1549
1549
|
});
|
|
1550
1550
|
break;
|
|
1551
1551
|
case "totals":
|
|
1552
1552
|
s.push({
|
|
1553
|
-
...
|
|
1554
|
-
rows:
|
|
1555
|
-
...
|
|
1556
|
-
label:
|
|
1557
|
-
amount:
|
|
1553
|
+
...l,
|
|
1554
|
+
rows: l.rows.map((c) => ({
|
|
1555
|
+
...c,
|
|
1556
|
+
label: u(c.label),
|
|
1557
|
+
amount: u(c.amount)
|
|
1558
1558
|
})),
|
|
1559
|
-
...
|
|
1560
|
-
taxRows:
|
|
1561
|
-
...
|
|
1562
|
-
label:
|
|
1563
|
-
amount:
|
|
1559
|
+
...l.taxRows ? {
|
|
1560
|
+
taxRows: l.taxRows.map((c) => ({
|
|
1561
|
+
...c,
|
|
1562
|
+
label: u(c.label),
|
|
1563
|
+
amount: u(c.amount)
|
|
1564
1564
|
}))
|
|
1565
1565
|
} : {}
|
|
1566
1566
|
});
|
|
1567
1567
|
break;
|
|
1568
1568
|
case "image":
|
|
1569
1569
|
s.push({
|
|
1570
|
-
...
|
|
1571
|
-
url:
|
|
1572
|
-
...
|
|
1570
|
+
...l,
|
|
1571
|
+
url: u(l.url),
|
|
1572
|
+
...l.alt ? { alt: u(l.alt) } : {}
|
|
1573
1573
|
});
|
|
1574
1574
|
break;
|
|
1575
1575
|
default:
|
|
1576
|
-
s.push(
|
|
1576
|
+
s.push(l);
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
return {
|
|
1579
|
+
return {
|
|
1580
|
+
blocks: s,
|
|
1581
|
+
unresolved: i,
|
|
1582
|
+
unusedSlots: Object.keys(r ?? {}).filter((l) => !a.has(l))
|
|
1583
|
+
};
|
|
1580
1584
|
}
|
|
1581
|
-
function
|
|
1582
|
-
const t = e?.billing, n = e?.address, r = e?.houseStyle, o = [n?.street, n?.houseNumber].filter(Boolean).join(" "),
|
|
1585
|
+
function da(e) {
|
|
1586
|
+
const t = e?.billing, n = e?.address, r = e?.houseStyle, o = [n?.street, n?.houseNumber].filter(Boolean).join(" "), i = [n?.postalCode, n?.city].filter(Boolean).join(" ");
|
|
1583
1587
|
return {
|
|
1584
1588
|
name: t?.companyName || e?.name || e?.displayName || "",
|
|
1585
|
-
addressLines: [o,
|
|
1589
|
+
addressLines: [o, i, n?.country ?? ""].filter(Boolean),
|
|
1586
1590
|
footerLines: [
|
|
1587
1591
|
r?.footerText ?? "",
|
|
1588
1592
|
t?.kvkNumber ? `KvK ${t.kvkNumber}` : "",
|
|
@@ -1592,13 +1596,13 @@ function ua(e) {
|
|
|
1592
1596
|
...e?.logo ? { logo: e.logo } : {}
|
|
1593
1597
|
};
|
|
1594
1598
|
}
|
|
1595
|
-
const Yn = 36e5, qn = 864e5, L = -1 / 0,
|
|
1599
|
+
const Yn = 36e5, qn = 864e5, L = -1 / 0, pa = (e) => e.score > L, J = {
|
|
1596
1600
|
urgent: 40,
|
|
1597
1601
|
high: 25,
|
|
1598
1602
|
normal: 10,
|
|
1599
1603
|
low: 0
|
|
1600
1604
|
};
|
|
1601
|
-
function
|
|
1605
|
+
function fa(e) {
|
|
1602
1606
|
return Object.fromEntries(e.map((t) => [t.resourceId, t]));
|
|
1603
1607
|
}
|
|
1604
1608
|
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;
|
|
@@ -1606,7 +1610,7 @@ function Zn(e, t) {
|
|
|
1606
1610
|
return !!(e && Qn.test(e) || t && Ot.test(t));
|
|
1607
1611
|
}
|
|
1608
1612
|
const Jn = 3, er = 600;
|
|
1609
|
-
function
|
|
1613
|
+
function ma(e, t) {
|
|
1610
1614
|
return e >= Jn || t >= er;
|
|
1611
1615
|
}
|
|
1612
1616
|
const tr = [
|
|
@@ -1619,7 +1623,7 @@ const tr = [
|
|
|
1619
1623
|
"feedback-id",
|
|
1620
1624
|
"x-mailer"
|
|
1621
1625
|
];
|
|
1622
|
-
function
|
|
1626
|
+
function ha(e) {
|
|
1623
1627
|
const t = {};
|
|
1624
1628
|
for (const n of e) {
|
|
1625
1629
|
const r = n.name?.toLowerCase();
|
|
@@ -1628,7 +1632,7 @@ function ma(e) {
|
|
|
1628
1632
|
return t;
|
|
1629
1633
|
}
|
|
1630
1634
|
const nr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, rr = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
|
|
1631
|
-
function
|
|
1635
|
+
function ga(e) {
|
|
1632
1636
|
const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
|
|
1633
1637
|
if (r && r !== "no" || t["x-auto-response-suppress"] || n && nr.test(n))
|
|
1634
1638
|
return "automated";
|
|
@@ -1639,7 +1643,7 @@ function ha(e) {
|
|
|
1639
1643
|
function or(e, t) {
|
|
1640
1644
|
return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
|
|
1641
1645
|
}
|
|
1642
|
-
const
|
|
1646
|
+
const ir = ["open"], sr = 1e3, ar = {
|
|
1643
1647
|
urgent: 1,
|
|
1644
1648
|
high: 4,
|
|
1645
1649
|
normal: 8,
|
|
@@ -1654,7 +1658,7 @@ function ur(e, t) {
|
|
|
1654
1658
|
function dr(e, t, n) {
|
|
1655
1659
|
return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
|
|
1656
1660
|
}
|
|
1657
|
-
const xt = (e) => un(e) === "outbound_message", Nt = (e) =>
|
|
1661
|
+
const xt = (e) => un(e) === "outbound_message", Nt = (e) => ir.includes(e);
|
|
1658
1662
|
function ve(e, t) {
|
|
1659
1663
|
return Math.max(0, (t - lr(e)) / Yn);
|
|
1660
1664
|
}
|
|
@@ -1662,20 +1666,20 @@ function pr(e, t) {
|
|
|
1662
1666
|
const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
|
|
1663
1667
|
return typeof n == "number" && n > 0 ? n : ar[e.priority ?? "normal"];
|
|
1664
1668
|
}
|
|
1665
|
-
function
|
|
1669
|
+
function ya(e) {
|
|
1666
1670
|
const t = {};
|
|
1667
1671
|
for (const n of e)
|
|
1668
1672
|
typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
|
|
1669
1673
|
return t;
|
|
1670
1674
|
}
|
|
1671
|
-
function
|
|
1675
|
+
function ba(e, t, n) {
|
|
1672
1676
|
return !Nt(e.status) || e.firstResponseAt ? !1 : ve(e, t) > pr(e, n);
|
|
1673
1677
|
}
|
|
1674
1678
|
function fr(e, t) {
|
|
1675
1679
|
const n = e.lastActivityPreview;
|
|
1676
1680
|
return n?.direction !== "outbound" || !xt(n.type) ? !1 : ve(e, t) < cr;
|
|
1677
1681
|
}
|
|
1678
|
-
function
|
|
1682
|
+
function _a(e, t) {
|
|
1679
1683
|
if (!Nt(e.status)) return { score: L, reasons: [] };
|
|
1680
1684
|
if (e.snoozedTill && e.snoozedTill > t.now) return { score: L, reasons: [] };
|
|
1681
1685
|
if (fr(e, t.now)) return { score: L, reasons: [] };
|
|
@@ -1683,25 +1687,25 @@ function ba(e, t) {
|
|
|
1683
1687
|
let n = 0;
|
|
1684
1688
|
const r = [], o = e.priority ?? "normal";
|
|
1685
1689
|
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"));
|
|
1686
|
-
const
|
|
1687
|
-
if (
|
|
1688
|
-
const
|
|
1689
|
-
n +=
|
|
1690
|
+
const i = ve(e, t.now);
|
|
1691
|
+
if (i > 0) {
|
|
1692
|
+
const u = Math.min(i * 2, 30);
|
|
1693
|
+
n += u, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
|
|
1690
1694
|
}
|
|
1691
|
-
const
|
|
1692
|
-
return
|
|
1695
|
+
const s = e.lastActivityPreview;
|
|
1696
|
+
return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && xt(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || Zn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= sr, r.push("bulk")), { score: n, reasons: r };
|
|
1693
1697
|
}
|
|
1694
|
-
const Aa = (e) => !!e.assignedUserId || !!e.assignedInboxId,
|
|
1698
|
+
const Aa = (e) => !!e.assignedUserId || !!e.assignedInboxId, Sa = (e) => e.status === "closed", Ea = (e) => ({
|
|
1695
1699
|
urgent: 10,
|
|
1696
1700
|
high: 5,
|
|
1697
1701
|
normal: 2,
|
|
1698
1702
|
low: 1
|
|
1699
|
-
})[e.priority] || 0,
|
|
1700
|
-
function
|
|
1703
|
+
})[e.priority] || 0, Ia = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
|
|
1704
|
+
function Ta(e, t) {
|
|
1701
1705
|
const n = e.labels ?? [];
|
|
1702
1706
|
return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
|
|
1703
1707
|
}
|
|
1704
|
-
function
|
|
1708
|
+
function wa(e, t, n) {
|
|
1705
1709
|
const r = e.translations ?? [];
|
|
1706
1710
|
return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
|
|
1707
1711
|
}
|
|
@@ -1724,10 +1728,10 @@ function Rt(e) {
|
|
|
1724
1728
|
const t = (e ?? "").toLowerCase();
|
|
1725
1729
|
return Ze.find((n) => n.code === t) ?? Ze.find((n) => n.code === t.split("-")[0]);
|
|
1726
1730
|
}
|
|
1727
|
-
function
|
|
1731
|
+
function ka(e) {
|
|
1728
1732
|
return Rt(e)?.label ?? e;
|
|
1729
1733
|
}
|
|
1730
|
-
function
|
|
1734
|
+
function Ma(e) {
|
|
1731
1735
|
const t = Rt(e);
|
|
1732
1736
|
return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
|
|
1733
1737
|
}
|
|
@@ -1741,13 +1745,13 @@ function mr(e, t) {
|
|
|
1741
1745
|
}
|
|
1742
1746
|
return r;
|
|
1743
1747
|
}
|
|
1744
|
-
function
|
|
1748
|
+
function va(e, t, n) {
|
|
1745
1749
|
if (!e) return !0;
|
|
1746
1750
|
if (e === t) return !1;
|
|
1747
|
-
const r = new Map(n.map((
|
|
1751
|
+
const r = new Map(n.map((s) => [s.id, s]));
|
|
1748
1752
|
if (!r.has(e) || t && hr(e, t, r)) return !1;
|
|
1749
|
-
const o = mr(e, r),
|
|
1750
|
-
return o +
|
|
1753
|
+
const o = mr(e, r), i = t ? $t(t, n) : 1;
|
|
1754
|
+
return o + i <= Dt;
|
|
1751
1755
|
}
|
|
1752
1756
|
function hr(e, t, n) {
|
|
1753
1757
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -1769,13 +1773,13 @@ const gr = "en";
|
|
|
1769
1773
|
function yr(e) {
|
|
1770
1774
|
return e.defaultLocale || e.locale || gr;
|
|
1771
1775
|
}
|
|
1772
|
-
function
|
|
1776
|
+
function Ca(e) {
|
|
1773
1777
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1774
1778
|
for (const r of [yr(e), ...e.locales ?? []])
|
|
1775
1779
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
1776
1780
|
return n;
|
|
1777
1781
|
}
|
|
1778
|
-
function
|
|
1782
|
+
function Oa(e, t, n) {
|
|
1779
1783
|
const r = e.translations ?? [];
|
|
1780
1784
|
return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
|
|
1781
1785
|
}
|
|
@@ -1806,29 +1810,29 @@ function br(e, t) {
|
|
|
1806
1810
|
return e.userId === t.userId;
|
|
1807
1811
|
}
|
|
1808
1812
|
}
|
|
1809
|
-
function
|
|
1813
|
+
function xa(e, t) {
|
|
1810
1814
|
return e.filter((n) => n.enabled && br(n.ownerScope, t));
|
|
1811
1815
|
}
|
|
1812
|
-
function
|
|
1816
|
+
function Na(e) {
|
|
1813
1817
|
return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
|
|
1814
1818
|
}
|
|
1815
|
-
function
|
|
1819
|
+
function Ra(e) {
|
|
1816
1820
|
return `mcp__${e}__`;
|
|
1817
1821
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1822
|
+
const Da = 1e3, $a = 2e3, La = 500, Pa = 12e3, Ka = 4e3, _r = ["contact", "company", "work_item"];
|
|
1823
|
+
function Ua(e) {
|
|
1820
1824
|
if (!e) return !1;
|
|
1821
1825
|
const t = e.slice(0, e.indexOf(":"));
|
|
1822
|
-
return
|
|
1826
|
+
return _r.includes(t);
|
|
1823
1827
|
}
|
|
1824
|
-
const
|
|
1828
|
+
const Fa = [
|
|
1825
1829
|
{ key: "high", label: "tax_high", percent: 21, kind: "standard" },
|
|
1826
1830
|
{ key: "low", label: "tax_low", percent: 9, kind: "reduced" },
|
|
1827
1831
|
{ key: "zero", label: "tax_zero", percent: 0, kind: "zero" },
|
|
1828
1832
|
{ key: "reverse_charge", label: "tax_reverse_charge", percent: 0, kind: "reverse_charge" },
|
|
1829
1833
|
{ key: "exempt", label: "tax_exempt", percent: 0, kind: "exempt" }
|
|
1830
1834
|
];
|
|
1831
|
-
function
|
|
1835
|
+
function Ar(e, t) {
|
|
1832
1836
|
return t.find((n) => n.key === e) ?? {
|
|
1833
1837
|
key: e,
|
|
1834
1838
|
label: e,
|
|
@@ -1836,44 +1840,44 @@ function _r(e, t) {
|
|
|
1836
1840
|
kind: "zero"
|
|
1837
1841
|
};
|
|
1838
1842
|
}
|
|
1839
|
-
function
|
|
1843
|
+
function Sr(e) {
|
|
1840
1844
|
if (e.kind !== "product") return 0;
|
|
1841
1845
|
const t = 1 - (e.discountPercent ?? 0) / 100;
|
|
1842
1846
|
return G(e.quantity * e.unitPriceCents * t);
|
|
1843
1847
|
}
|
|
1844
|
-
function
|
|
1845
|
-
const r = e.map((l) => ({ ...l, netCents:
|
|
1848
|
+
function Ba(e, t, n) {
|
|
1849
|
+
const r = e.map((l) => ({ ...l, netCents: Sr(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
|
|
1846
1850
|
for (let l = 0; l < r.length; l++) {
|
|
1847
|
-
if (r[l].kind !== "product") continue;
|
|
1848
|
-
const d = n ?? r[l].taxRateKey,
|
|
1849
|
-
|
|
1851
|
+
if (r[l].kind !== "product" || r[l].optional) continue;
|
|
1852
|
+
const d = n ?? r[l].taxRateKey, c = o.get(d);
|
|
1853
|
+
c ? c.push(l) : o.set(d, [l]);
|
|
1850
1854
|
}
|
|
1851
|
-
const
|
|
1852
|
-
let
|
|
1855
|
+
const i = [];
|
|
1856
|
+
let s = 0, a = 0;
|
|
1853
1857
|
for (const [l, d] of o) {
|
|
1854
|
-
const
|
|
1858
|
+
const c = Ar(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = G(p * c.percent / 100), y = Fn(
|
|
1855
1859
|
f,
|
|
1856
1860
|
d.map((m) => r[m].netCents)
|
|
1857
1861
|
);
|
|
1858
1862
|
for (let m = 0; m < d.length; m++) r[d[m]].taxCents = y[m];
|
|
1859
|
-
|
|
1863
|
+
i.push({ taxRateKey: l, netCents: p, taxCents: f }), s += p, a += f;
|
|
1860
1864
|
}
|
|
1861
|
-
const
|
|
1862
|
-
(l, d) => d.costPriceCents == null ? l : l + G(d.costPriceCents * d.quantity),
|
|
1865
|
+
const u = r.reduce(
|
|
1866
|
+
(l, d) => d.costPriceCents == null || d.optional ? l : l + G(d.costPriceCents * d.quantity),
|
|
1863
1867
|
0
|
|
1864
1868
|
);
|
|
1865
1869
|
return {
|
|
1866
1870
|
lines: r,
|
|
1867
1871
|
totals: {
|
|
1868
|
-
netCents:
|
|
1872
|
+
netCents: s,
|
|
1869
1873
|
taxCents: a,
|
|
1870
|
-
grossCents:
|
|
1871
|
-
costCents:
|
|
1872
|
-
byRate:
|
|
1874
|
+
grossCents: s + a,
|
|
1875
|
+
costCents: u,
|
|
1876
|
+
byRate: i
|
|
1873
1877
|
}
|
|
1874
1878
|
};
|
|
1875
1879
|
}
|
|
1876
|
-
const
|
|
1880
|
+
const ja = "onboarding-source", Ha = ["support", "billing", "availability", "sales", "onboarding"], Ga = ["keep", "replace"], Ce = [
|
|
1877
1881
|
{
|
|
1878
1882
|
key: "shift",
|
|
1879
1883
|
label: "kind_shift",
|
|
@@ -1947,7 +1951,7 @@ const Ba = "onboarding-source", ja = ["support", "billing", "availability", "sal
|
|
|
1947
1951
|
absent: !0,
|
|
1948
1952
|
icon: "party-popper"
|
|
1949
1953
|
}
|
|
1950
|
-
],
|
|
1954
|
+
], Er = {
|
|
1951
1955
|
key: "unknown",
|
|
1952
1956
|
label: "kind_unknown",
|
|
1953
1957
|
capacity: !1,
|
|
@@ -1955,7 +1959,7 @@ const Ba = "onboarding-source", ja = ["support", "billing", "availability", "sal
|
|
|
1955
1959
|
absent: !1
|
|
1956
1960
|
};
|
|
1957
1961
|
function N(e, t = Ce) {
|
|
1958
|
-
return t.find((n) => n.key === e) ?? { ...
|
|
1962
|
+
return t.find((n) => n.key === e) ?? { ...Er, key: e };
|
|
1959
1963
|
}
|
|
1960
1964
|
function W(e) {
|
|
1961
1965
|
return e === "published" || e === "approved";
|
|
@@ -1965,7 +1969,7 @@ function Lt(e, t, n = Ce) {
|
|
|
1965
1969
|
const r = N(e.kindKey, n);
|
|
1966
1970
|
return r.absent ? !1 : r.productive || r.capacity;
|
|
1967
1971
|
}
|
|
1968
|
-
function
|
|
1972
|
+
function Wa(e, t = Ce) {
|
|
1969
1973
|
if (!e.userId || !W(e.status)) return !1;
|
|
1970
1974
|
const n = N(e.kindKey, t);
|
|
1971
1975
|
return n.capacity || n.productive || n.absent;
|
|
@@ -1987,8 +1991,8 @@ function Ut(e, t) {
|
|
|
1987
1991
|
function Ft(e, t, n, r) {
|
|
1988
1992
|
const o = e.filter(
|
|
1989
1993
|
(a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
|
|
1990
|
-
),
|
|
1991
|
-
return
|
|
1994
|
+
), i = (a) => a.sort((u, l) => (l.effectiveFrom ?? 0) - (u.effectiveFrom ?? 0))[0], s = i(o.filter((a) => a.userId === t));
|
|
1995
|
+
return s || i(
|
|
1992
1996
|
o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
|
|
1993
1997
|
);
|
|
1994
1998
|
}
|
|
@@ -2007,34 +2011,34 @@ function ge(e, t, n, r) {
|
|
|
2007
2011
|
return o > 0 ? o / 1e3 : 0;
|
|
2008
2012
|
}
|
|
2009
2013
|
const tt = { interval: 0, day: 1, week: 2 };
|
|
2010
|
-
function
|
|
2011
|
-
const { entries: n, patterns: r = [], terms: o = [] } = t,
|
|
2012
|
-
(
|
|
2013
|
-
),
|
|
2014
|
-
(
|
|
2014
|
+
function Va(e, t) {
|
|
2015
|
+
const { entries: n, patterns: r = [], terms: o = [] } = t, i = n.filter(
|
|
2016
|
+
(c) => c.userId && W(c.status) && N(c.kindKey).capacity
|
|
2017
|
+
), s = n.filter(
|
|
2018
|
+
(c) => c.userId && W(c.status) && N(c.kindKey).absent
|
|
2015
2019
|
), a = t.userIds ?? [
|
|
2016
2020
|
.../* @__PURE__ */ new Set([
|
|
2017
|
-
...
|
|
2018
|
-
...r.map((
|
|
2019
|
-
...o.map((
|
|
2021
|
+
...i.map((c) => c.userId),
|
|
2022
|
+
...r.map((c) => c.userId),
|
|
2023
|
+
...o.map((c) => c.userId)
|
|
2020
2024
|
])
|
|
2021
|
-
].filter((
|
|
2025
|
+
].filter((c) => !!c), u = {};
|
|
2022
2026
|
let l = "interval";
|
|
2023
|
-
const d = (
|
|
2024
|
-
tt[
|
|
2027
|
+
const d = (c) => {
|
|
2028
|
+
tt[c] > tt[l] && (l = c);
|
|
2025
2029
|
};
|
|
2026
|
-
for (const
|
|
2027
|
-
const p = t.teamIdsOf?.(
|
|
2030
|
+
for (const c of a) {
|
|
2031
|
+
const p = t.teamIdsOf?.(c) ?? [];
|
|
2028
2032
|
let f = 0, y = 0, m = 0;
|
|
2029
2033
|
for (const h of kr(e)) {
|
|
2030
|
-
const
|
|
2034
|
+
const S = Math.max(h, e.from), x = Math.min(h + he, e.to);
|
|
2031
2035
|
m++;
|
|
2032
|
-
const C =
|
|
2036
|
+
const C = i.filter((k) => k.userId === c).reduce((k, $e) => k + ge($e.start, $e.end, S, x), 0);
|
|
2033
2037
|
if (C > 0) {
|
|
2034
2038
|
f += C;
|
|
2035
2039
|
continue;
|
|
2036
2040
|
}
|
|
2037
|
-
const M = Ft(r,
|
|
2041
|
+
const M = Ft(r, c, p, h), O = M ? Kt(M, h) : 0;
|
|
2038
2042
|
if (M && O > 0) {
|
|
2039
2043
|
f += O * 60, d(Ut(M, h) ? "interval" : "day");
|
|
2040
2044
|
continue;
|
|
@@ -2042,67 +2046,67 @@ function Wa(e, t) {
|
|
|
2042
2046
|
M || y++;
|
|
2043
2047
|
}
|
|
2044
2048
|
if (y > 0) {
|
|
2045
|
-
const h = wr(o,
|
|
2049
|
+
const h = wr(o, c, e.from);
|
|
2046
2050
|
h && (f += h.weeklyMinutes * 60 * (y / 7), d("week"));
|
|
2047
2051
|
}
|
|
2048
|
-
const
|
|
2049
|
-
(h,
|
|
2052
|
+
const E = s.filter((h) => h.userId === c).reduce(
|
|
2053
|
+
(h, S) => h + ge(S.start, S.end, e.from, e.to),
|
|
2050
2054
|
0
|
|
2051
|
-
), g = Math.max(0, f -
|
|
2052
|
-
(g > 0 || m > 0) && (c
|
|
2055
|
+
), g = Math.max(0, f - E);
|
|
2056
|
+
(g > 0 || m > 0) && (u[c] = g);
|
|
2053
2057
|
}
|
|
2054
2058
|
return {
|
|
2055
|
-
seconds: Object.values(
|
|
2059
|
+
seconds: Object.values(u).reduce((c, p) => c + p, 0),
|
|
2056
2060
|
precision: l,
|
|
2057
|
-
byUser:
|
|
2061
|
+
byUser: u
|
|
2058
2062
|
};
|
|
2059
2063
|
}
|
|
2060
|
-
function
|
|
2064
|
+
function za(e, t) {
|
|
2061
2065
|
if (!e.some((a) => a.userId)) return [];
|
|
2062
2066
|
const n = "", r = /* @__PURE__ */ new Map();
|
|
2063
2067
|
for (const a of e) {
|
|
2064
|
-
const
|
|
2065
|
-
r.set(
|
|
2068
|
+
const u = a.userId ?? n;
|
|
2069
|
+
r.set(u, (r.get(u) ?? 0) + a.seconds);
|
|
2066
2070
|
}
|
|
2067
|
-
const
|
|
2071
|
+
const i = [.../* @__PURE__ */ new Set([
|
|
2068
2072
|
...Object.keys(t.byUser),
|
|
2069
2073
|
...[...r.keys()].filter((a) => a !== n)
|
|
2070
2074
|
])].map((a) => {
|
|
2071
|
-
const
|
|
2075
|
+
const u = r.get(a) ?? 0, l = t.byUser[a] ?? 0;
|
|
2072
2076
|
return {
|
|
2073
2077
|
userId: a,
|
|
2074
|
-
requiredSeconds:
|
|
2078
|
+
requiredSeconds: u,
|
|
2075
2079
|
capacitySeconds: l,
|
|
2076
|
-
netSeconds: l -
|
|
2080
|
+
netSeconds: l - u
|
|
2077
2081
|
};
|
|
2078
2082
|
});
|
|
2079
|
-
|
|
2080
|
-
const
|
|
2081
|
-
return
|
|
2083
|
+
i.sort((a, u) => a.netSeconds - u.netSeconds);
|
|
2084
|
+
const s = r.get(n) ?? 0;
|
|
2085
|
+
return s > 0 && i.push({ requiredSeconds: s, capacitySeconds: 0, netSeconds: -s }), i;
|
|
2082
2086
|
}
|
|
2083
|
-
function
|
|
2087
|
+
function Xa(e, t, n, r) {
|
|
2084
2088
|
const o = e.filter(
|
|
2085
|
-
(
|
|
2086
|
-
),
|
|
2087
|
-
([
|
|
2088
|
-
let
|
|
2089
|
+
(s) => s.userId && W(s.status) && !N(s.kindKey).absent
|
|
2090
|
+
), i = Object.entries(r.byUser).map(
|
|
2091
|
+
([s, a]) => {
|
|
2092
|
+
let u = 0, l = 0;
|
|
2089
2093
|
for (const d of o) {
|
|
2090
|
-
if (d.userId !==
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2094
|
+
if (d.userId !== s || N(d.kindKey).capacity && !d.workstreamId) continue;
|
|
2095
|
+
const c = ge(d.start, d.end, n.from, n.to);
|
|
2096
|
+
c <= 0 || (Lt(d, t) ? u += c : l += c);
|
|
2093
2097
|
}
|
|
2094
2098
|
return {
|
|
2095
|
-
userId:
|
|
2099
|
+
userId: s,
|
|
2096
2100
|
capacitySeconds: a,
|
|
2097
|
-
onThisSeconds:
|
|
2101
|
+
onThisSeconds: u,
|
|
2098
2102
|
elsewhereSeconds: l,
|
|
2099
|
-
freeSeconds: Math.max(0, a -
|
|
2103
|
+
freeSeconds: Math.max(0, a - u - l)
|
|
2100
2104
|
};
|
|
2101
2105
|
}
|
|
2102
2106
|
);
|
|
2103
|
-
return
|
|
2107
|
+
return i.sort((s, a) => a.freeSeconds - s.freeSeconds), i;
|
|
2104
2108
|
}
|
|
2105
|
-
const
|
|
2109
|
+
const Ya = "demand-source", nt = 1e3;
|
|
2106
2110
|
function Mr(e, t) {
|
|
2107
2111
|
let n = 1;
|
|
2108
2112
|
for (let r = 1; r <= e; r++)
|
|
@@ -2126,9 +2130,9 @@ function xr(e, t, n, r) {
|
|
|
2126
2130
|
if (e <= 0 || t <= 0) return 0;
|
|
2127
2131
|
const o = Or(e, t, n);
|
|
2128
2132
|
if (o <= 0) return 0;
|
|
2129
|
-
const
|
|
2133
|
+
const i = r.serviceLevelPercent / 100, s = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
|
|
2130
2134
|
for (let a = Math.max(1, Math.ceil(o)); a <= nt; a++)
|
|
2131
|
-
if (!(a <= o) && !(Cr(a, o, r.targetSeconds, t) <
|
|
2135
|
+
if (!(a <= o) && !(Cr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
|
|
2132
2136
|
return a;
|
|
2133
2137
|
return nt;
|
|
2134
2138
|
}
|
|
@@ -2136,7 +2140,7 @@ const Nr = 36e5, Rr = 864e5;
|
|
|
2136
2140
|
function Dr(e) {
|
|
2137
2141
|
return e === "day" ? Rr : Nr;
|
|
2138
2142
|
}
|
|
2139
|
-
function
|
|
2143
|
+
function qa(e, t) {
|
|
2140
2144
|
return e.start < t.end && t.start < e.end;
|
|
2141
2145
|
}
|
|
2142
2146
|
function ce(e, t, n) {
|
|
@@ -2146,24 +2150,24 @@ function ce(e, t, n) {
|
|
|
2146
2150
|
function $r(e, t, n) {
|
|
2147
2151
|
const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
|
|
2148
2152
|
if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
|
|
2149
|
-
const
|
|
2153
|
+
const i = (t.unplannedLossPercent ?? 0) / 100, s = i > 0 && i < 1 ? 1 / (1 - i) : 1;
|
|
2150
2154
|
if (t.model === "queue" && e.volume !== void 0 && r > 0) {
|
|
2151
2155
|
const a = xr(e.volume, r, n, t);
|
|
2152
|
-
return { seconds: o, headcount: a *
|
|
2156
|
+
return { seconds: o, headcount: a * s };
|
|
2153
2157
|
}
|
|
2154
|
-
return { seconds: o, headcount: o / n *
|
|
2158
|
+
return { seconds: o, headcount: o / n * s };
|
|
2155
2159
|
}
|
|
2156
|
-
function
|
|
2157
|
-
const { entries: t, workstreamId: n, staffing: r, demand: o, range:
|
|
2158
|
-
for (let m = H(
|
|
2159
|
-
const
|
|
2160
|
+
function Qa(e) {
|
|
2161
|
+
const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = Dr(s), u = a / 1e3, l = e.kinds, d = t.filter((m) => W(m.status)), c = 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 = [];
|
|
2162
|
+
for (let m = H(i.from, s); m < i.to; m += a) {
|
|
2163
|
+
const E = m + a, g = j(m, s);
|
|
2160
2164
|
let h = 0;
|
|
2161
|
-
for (const k of
|
|
2162
|
-
let
|
|
2163
|
-
for (const k of p)
|
|
2165
|
+
for (const k of c) h += ce(k, m, E);
|
|
2166
|
+
let S = 0;
|
|
2167
|
+
for (const k of p) S += ce(k, m, E);
|
|
2164
2168
|
let x = 0;
|
|
2165
|
-
for (const k of f) x += ce(k, m,
|
|
2166
|
-
const C = o?.[g] ?? {}, M = $r(C, r,
|
|
2169
|
+
for (const k of f) x += ce(k, m, E);
|
|
2170
|
+
const C = o?.[g] ?? {}, M = $r(C, r, u), O = h / u;
|
|
2167
2171
|
y.push({
|
|
2168
2172
|
period: g,
|
|
2169
2173
|
forecastVolume: C.volume,
|
|
@@ -2172,7 +2176,7 @@ function qa(e) {
|
|
|
2172
2176
|
scheduledSeconds: h,
|
|
2173
2177
|
scheduledHeadcount: O,
|
|
2174
2178
|
netHeadcount: O - M.headcount,
|
|
2175
|
-
capacitySeconds:
|
|
2179
|
+
capacitySeconds: S,
|
|
2176
2180
|
absentSeconds: x
|
|
2177
2181
|
});
|
|
2178
2182
|
}
|
|
@@ -2181,11 +2185,11 @@ function qa(e) {
|
|
|
2181
2185
|
function Lr(e, t) {
|
|
2182
2186
|
return e.workTypeKey ?? t?.defaultWorkTypeKey;
|
|
2183
2187
|
}
|
|
2184
|
-
function
|
|
2188
|
+
function Za(e, t, n) {
|
|
2185
2189
|
const r = Lr(e, t);
|
|
2186
2190
|
return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
|
|
2187
2191
|
}
|
|
2188
|
-
function
|
|
2192
|
+
function Ja(e) {
|
|
2189
2193
|
return e.filter(
|
|
2190
2194
|
(t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
|
|
2191
2195
|
);
|
|
@@ -2197,15 +2201,15 @@ function Br(e) {
|
|
|
2197
2201
|
}
|
|
2198
2202
|
function jr(e, t, n) {
|
|
2199
2203
|
const r = [];
|
|
2200
|
-
for (let
|
|
2201
|
-
const
|
|
2202
|
-
let
|
|
2203
|
-
for (const [d,
|
|
2204
|
-
d >= a && d <
|
|
2205
|
-
l && r.push(
|
|
2204
|
+
for (let i = 0; i < n; i++) {
|
|
2205
|
+
const s = t - i * ye, a = s - ye;
|
|
2206
|
+
let u = 0, l = !1;
|
|
2207
|
+
for (const [d, c] of e)
|
|
2208
|
+
d >= a && d < s && (u += c, l = !0);
|
|
2209
|
+
l && r.push(u);
|
|
2206
2210
|
}
|
|
2207
2211
|
if (r.length < 2) return 1;
|
|
2208
|
-
const o = r.reduce((
|
|
2212
|
+
const o = r.reduce((i, s) => i + s, 0) / r.length;
|
|
2209
2213
|
return o <= 0 ? 1 : Math.min(Fr, Math.max(Ur, r[0] / o));
|
|
2210
2214
|
}
|
|
2211
2215
|
function Hr(e, t) {
|
|
@@ -2215,30 +2219,30 @@ function Hr(e, t) {
|
|
|
2215
2219
|
t >= r.from && t < r.to && (n = r);
|
|
2216
2220
|
return n;
|
|
2217
2221
|
}
|
|
2218
|
-
function
|
|
2219
|
-
const r = Math.max(1, n?.weeks ?? Kr), o = /* @__PURE__ */ new Map(),
|
|
2220
|
-
for (const
|
|
2221
|
-
o.set(Br(
|
|
2222
|
-
const
|
|
2223
|
-
for (let
|
|
2222
|
+
function ec(e, t, n) {
|
|
2223
|
+
const r = Math.max(1, n?.weeks ?? Kr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
2224
|
+
for (const u of e)
|
|
2225
|
+
o.set(Br(u.period), u.value), i.add(u.period.slice(0, 10));
|
|
2226
|
+
const s = jr(o, H(t.from, "hour"), r), a = [];
|
|
2227
|
+
for (let u = H(t.from, "hour"); u < t.to; u += Pr) {
|
|
2224
2228
|
let l = 0, d = 0;
|
|
2225
2229
|
for (let f = 1; f <= r; f++) {
|
|
2226
|
-
const y =
|
|
2227
|
-
if (
|
|
2230
|
+
const y = u - f * ye, E = o.get(y) ?? (i.has(j(y, "day")) ? 0 : void 0);
|
|
2231
|
+
if (E === void 0) continue;
|
|
2228
2232
|
const g = r - f + 1;
|
|
2229
|
-
l +=
|
|
2233
|
+
l += E * g, d += g;
|
|
2230
2234
|
}
|
|
2231
|
-
let
|
|
2232
|
-
const p = Hr(n?.adjustments,
|
|
2233
|
-
p?.absoluteVolume !== void 0 ?
|
|
2235
|
+
let c = d > 0 ? l / d * s : 0;
|
|
2236
|
+
const p = Hr(n?.adjustments, u);
|
|
2237
|
+
p?.absoluteVolume !== void 0 ? c = p.absoluteVolume : p?.factor !== void 0 && (c *= p.factor), a.push({ period: j(u, "hour"), volume: c });
|
|
2234
2238
|
}
|
|
2235
2239
|
return a;
|
|
2236
2240
|
}
|
|
2237
2241
|
const Gr = "schedule_entry", Wr = "workstream";
|
|
2238
|
-
function
|
|
2242
|
+
function tc(e) {
|
|
2239
2243
|
return `${Gr}:${e}`;
|
|
2240
2244
|
}
|
|
2241
|
-
function
|
|
2245
|
+
function nc(e) {
|
|
2242
2246
|
return `${Wr}:${e}`;
|
|
2243
2247
|
}
|
|
2244
2248
|
const be = 36e5, K = 864e5;
|
|
@@ -2255,48 +2259,48 @@ function le(e, t, n, r) {
|
|
|
2255
2259
|
const o = Math.min(t, r) - Math.max(e, n);
|
|
2256
2260
|
return o > 0 ? o / 1e3 : 0;
|
|
2257
2261
|
}
|
|
2258
|
-
function
|
|
2259
|
-
const r = n.grain ?? "hour", o = Vr(t, r),
|
|
2260
|
-
for (const
|
|
2261
|
-
if (!(
|
|
2262
|
+
function rc(e, t, n = {}) {
|
|
2263
|
+
const r = n.grain ?? "hour", o = Vr(t, r), i = r === "day" ? K : be, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
|
|
2264
|
+
for (const c of a)
|
|
2265
|
+
if (!(u && c.userId && !u.has(c.userId))) {
|
|
2262
2266
|
for (const p of o) {
|
|
2263
|
-
const f = le(
|
|
2264
|
-
f > 0 &&
|
|
2267
|
+
const f = le(c.start, c.end, p, p + i);
|
|
2268
|
+
f > 0 && s.set(p, (s.get(p) ?? 0) + f);
|
|
2265
2269
|
}
|
|
2266
2270
|
for (const p of rt(t))
|
|
2267
|
-
le(
|
|
2271
|
+
le(c.start, c.end, p, p + K) > 0 && l.add(`${c.userId}:${p}`);
|
|
2268
2272
|
}
|
|
2269
2273
|
const d = n.userIds ?? [
|
|
2270
2274
|
.../* @__PURE__ */ new Set([
|
|
2271
|
-
...a.map((
|
|
2272
|
-
...(n.patterns ?? []).map((
|
|
2275
|
+
...a.map((c) => c.userId),
|
|
2276
|
+
...(n.patterns ?? []).map((c) => c.userId)
|
|
2273
2277
|
])
|
|
2274
|
-
].filter((
|
|
2278
|
+
].filter((c) => !!c);
|
|
2275
2279
|
if (n.patterns?.length)
|
|
2276
|
-
for (const
|
|
2277
|
-
const p = n.teamIdsOf?.(
|
|
2280
|
+
for (const c of d) {
|
|
2281
|
+
const p = n.teamIdsOf?.(c) ?? [];
|
|
2278
2282
|
for (const f of rt(t)) {
|
|
2279
|
-
if (l.has(`${
|
|
2280
|
-
const y = Ft(n.patterns,
|
|
2283
|
+
if (l.has(`${c}:${f}`)) continue;
|
|
2284
|
+
const y = Ft(n.patterns, c, p, f);
|
|
2281
2285
|
if (!y) continue;
|
|
2282
2286
|
const m = Kt(y, f);
|
|
2283
2287
|
if (m <= 0) continue;
|
|
2284
|
-
const
|
|
2285
|
-
if (
|
|
2286
|
-
const [
|
|
2288
|
+
const E = Ut(y, f);
|
|
2289
|
+
if (E) {
|
|
2290
|
+
const [S, x] = E.split(":").map(Number), C = f + S * be + (x ?? 0) * 6e4, M = C + m * 6e4;
|
|
2287
2291
|
for (const O of o) {
|
|
2288
|
-
const k = le(C, M, O, O +
|
|
2289
|
-
k > 0 &&
|
|
2292
|
+
const k = le(C, M, O, O + i);
|
|
2293
|
+
k > 0 && s.set(O, (s.get(O) ?? 0) + k);
|
|
2290
2294
|
}
|
|
2291
2295
|
continue;
|
|
2292
2296
|
}
|
|
2293
|
-
const g = o.filter((
|
|
2297
|
+
const g = o.filter((S) => S >= f && S < f + K);
|
|
2294
2298
|
if (!g.length) continue;
|
|
2295
2299
|
const h = m * 60 / g.length;
|
|
2296
|
-
for (const
|
|
2300
|
+
for (const S of g) s.set(S, (s.get(S) ?? 0) + h);
|
|
2297
2301
|
}
|
|
2298
2302
|
}
|
|
2299
|
-
return o.map((
|
|
2303
|
+
return o.map((c) => ({ period: j(c, r), weight: s.get(c) ?? 0 }));
|
|
2300
2304
|
}
|
|
2301
2305
|
function zr(e, t) {
|
|
2302
2306
|
if (e <= 0 || !t.length) return [];
|
|
@@ -2307,17 +2311,17 @@ function zr(e, t) {
|
|
|
2307
2311
|
}
|
|
2308
2312
|
return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
|
|
2309
2313
|
}
|
|
2310
|
-
function
|
|
2314
|
+
function oc(e, t, n) {
|
|
2311
2315
|
const r = /* @__PURE__ */ new Map();
|
|
2312
2316
|
for (const o of e) {
|
|
2313
|
-
const
|
|
2314
|
-
for (const a of zr(o.seconds,
|
|
2315
|
-
const
|
|
2316
|
-
l ? l.seconds += a.seconds : r.set(
|
|
2317
|
+
const i = o.by ? t.filter((a) => n(a.period) < o.by) : t, s = i.length ? i : t;
|
|
2318
|
+
for (const a of zr(o.seconds, s)) {
|
|
2319
|
+
const u = `${a.period}|${o.userId ?? ""}`, l = r.get(u);
|
|
2320
|
+
l ? l.seconds += a.seconds : r.set(u, { ...a, userId: o.userId });
|
|
2317
2321
|
}
|
|
2318
2322
|
}
|
|
2319
2323
|
return [...r.values()].sort(
|
|
2320
|
-
(o,
|
|
2324
|
+
(o, i) => o.period.localeCompare(i.period) || (o.userId ?? "").localeCompare(i.userId ?? "")
|
|
2321
2325
|
);
|
|
2322
2326
|
}
|
|
2323
2327
|
function Xr(e) {
|
|
@@ -2330,7 +2334,7 @@ function Xr(e) {
|
|
|
2330
2334
|
return "org";
|
|
2331
2335
|
}
|
|
2332
2336
|
}
|
|
2333
|
-
function
|
|
2337
|
+
function ic(e) {
|
|
2334
2338
|
if (typeof e != "string") return;
|
|
2335
2339
|
const t = e.trim();
|
|
2336
2340
|
if (t === "org") return { kind: "org" };
|
|
@@ -2359,10 +2363,10 @@ const Qr = qr;
|
|
|
2359
2363
|
function sc(e) {
|
|
2360
2364
|
return e.agentId ? { kind: "user", userId: e.agentId } : Qr(e.ownerScope);
|
|
2361
2365
|
}
|
|
2362
|
-
function
|
|
2366
|
+
function ac(e) {
|
|
2363
2367
|
return Yr(e);
|
|
2364
2368
|
}
|
|
2365
|
-
function
|
|
2369
|
+
function cc(e, t) {
|
|
2366
2370
|
if (!t) return;
|
|
2367
2371
|
let n = e;
|
|
2368
2372
|
for (const r of t.split(".")) {
|
|
@@ -2371,24 +2375,24 @@ function ac(e, t) {
|
|
|
2371
2375
|
}
|
|
2372
2376
|
return n;
|
|
2373
2377
|
}
|
|
2374
|
-
function
|
|
2378
|
+
function lc(e, t) {
|
|
2375
2379
|
return e.targets.find((n) => n.activityTypes.includes(t));
|
|
2376
2380
|
}
|
|
2377
|
-
function
|
|
2381
|
+
function uc(e, t) {
|
|
2378
2382
|
if (t)
|
|
2379
2383
|
return e.targets.find((n) => n.id === t);
|
|
2380
2384
|
}
|
|
2381
2385
|
function Zr(e) {
|
|
2382
2386
|
return e?.kind === "assignment";
|
|
2383
2387
|
}
|
|
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
2388
|
function dc(e) {
|
|
2389
|
+
const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
|
|
2390
|
+
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";
|
|
2391
|
+
}
|
|
2392
|
+
function pc(e) {
|
|
2389
2393
|
return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
|
|
2390
2394
|
}
|
|
2391
|
-
const
|
|
2395
|
+
const fc = [
|
|
2392
2396
|
{ name: "text", type: "string" },
|
|
2393
2397
|
{ name: "subject", type: "string" },
|
|
2394
2398
|
{ name: "from", type: "string" },
|
|
@@ -2428,7 +2432,7 @@ const pc = [
|
|
|
2428
2432
|
// `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
|
|
2429
2433
|
// the trigger filter runs — like contactId/companyId above.
|
|
2430
2434
|
{ name: "assigneeUserId", type: "string" }
|
|
2431
|
-
],
|
|
2435
|
+
], mc = {
|
|
2432
2436
|
topics: [
|
|
2433
2437
|
{ name: "topicId", type: "string" },
|
|
2434
2438
|
{ name: "topic", type: "string" },
|
|
@@ -2450,26 +2454,26 @@ function to(e) {
|
|
|
2450
2454
|
return e?.type === eo ? e.id : void 0;
|
|
2451
2455
|
}
|
|
2452
2456
|
const no = 64, ro = 8e3;
|
|
2453
|
-
function
|
|
2457
|
+
function hc(e) {
|
|
2454
2458
|
const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
|
|
2455
2459
|
if (!(!Number.isFinite(t) || t <= 0))
|
|
2456
2460
|
return Math.min(Math.max(Math.round(t), no), ro);
|
|
2457
2461
|
}
|
|
2458
|
-
const
|
|
2459
|
-
function
|
|
2462
|
+
const gc = { kind: "workflow", steps: [] };
|
|
2463
|
+
function yc(e) {
|
|
2460
2464
|
return e?.kind === "workflow" ? e.steps : [];
|
|
2461
2465
|
}
|
|
2462
|
-
function
|
|
2466
|
+
function bc(e) {
|
|
2463
2467
|
return e?.kind === "procedure" ? e.procedure : void 0;
|
|
2464
2468
|
}
|
|
2465
2469
|
function oo(e) {
|
|
2466
2470
|
const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
|
|
2467
2471
|
return { total: n, rate: n ? t / n : 0 };
|
|
2468
2472
|
}
|
|
2469
|
-
const
|
|
2470
|
-
function
|
|
2473
|
+
const io = 10, so = 0.9;
|
|
2474
|
+
function _c(e) {
|
|
2471
2475
|
const { total: t, rate: n } = oo(e);
|
|
2472
|
-
return t >=
|
|
2476
|
+
return t >= io && n >= so;
|
|
2473
2477
|
}
|
|
2474
2478
|
const ao = ["done", "escalated", "failed", "stopped"];
|
|
2475
2479
|
function Ac(e) {
|
|
@@ -2478,7 +2482,7 @@ function Ac(e) {
|
|
|
2478
2482
|
function co(e) {
|
|
2479
2483
|
return e === "waiting";
|
|
2480
2484
|
}
|
|
2481
|
-
function
|
|
2485
|
+
function Sc(e) {
|
|
2482
2486
|
return e === "running" || co(e);
|
|
2483
2487
|
}
|
|
2484
2488
|
function Bt(e) {
|
|
@@ -2488,10 +2492,10 @@ function Ec(e) {
|
|
|
2488
2492
|
const t = Bt(e);
|
|
2489
2493
|
return t ? Jr(t) : void 0;
|
|
2490
2494
|
}
|
|
2491
|
-
function
|
|
2495
|
+
function Ic(e) {
|
|
2492
2496
|
return to(Bt(e));
|
|
2493
2497
|
}
|
|
2494
|
-
function
|
|
2498
|
+
function Tc(e) {
|
|
2495
2499
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
2496
2500
|
for (const r of [...e].sort(lo)) {
|
|
2497
2501
|
const o = n.get(r.emoji);
|
|
@@ -2507,10 +2511,10 @@ function Ic(e) {
|
|
|
2507
2511
|
}).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
|
|
2508
2512
|
}
|
|
2509
2513
|
const lo = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
|
|
2510
|
-
function
|
|
2514
|
+
function wc(e, t) {
|
|
2511
2515
|
return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
|
|
2512
2516
|
}
|
|
2513
|
-
const
|
|
2517
|
+
const _e = 6e4, uo = 36e5, V = 864e5, jt = 800;
|
|
2514
2518
|
function ot(e, t) {
|
|
2515
2519
|
const n = Date.UTC(e, t + 1, 0);
|
|
2516
2520
|
return n - new Date(n).getUTCDay() * V + uo;
|
|
@@ -2521,7 +2525,7 @@ function po(e) {
|
|
|
2521
2525
|
}
|
|
2522
2526
|
function Ht(e, t) {
|
|
2523
2527
|
const n = t.dst === "eu" && po(e) ? 60 : 0;
|
|
2524
|
-
return (t.utcOffsetMinutes + n) *
|
|
2528
|
+
return (t.utcOffsetMinutes + n) * _e;
|
|
2525
2529
|
}
|
|
2526
2530
|
function fo(e) {
|
|
2527
2531
|
return (e + 3) % 7 + 1;
|
|
@@ -2529,25 +2533,25 @@ function fo(e) {
|
|
|
2529
2533
|
function Gt(e, t) {
|
|
2530
2534
|
const n = Ht(e, t), r = e + n, o = Math.floor(r / V);
|
|
2531
2535
|
if (!t.days.includes(fo(o))) return null;
|
|
2532
|
-
const
|
|
2536
|
+
const i = o * V;
|
|
2533
2537
|
return {
|
|
2534
|
-
open:
|
|
2535
|
-
close:
|
|
2538
|
+
open: i + t.fromMinutes * _e - n,
|
|
2539
|
+
close: i + t.toMinutes * _e - n
|
|
2536
2540
|
};
|
|
2537
2541
|
}
|
|
2538
2542
|
function Wt(e, t) {
|
|
2539
2543
|
const n = Ht(e, t), r = e + n;
|
|
2540
2544
|
return (Math.floor(r / V) + 1) * V - n;
|
|
2541
2545
|
}
|
|
2542
|
-
function
|
|
2546
|
+
function Ae(e, t, n) {
|
|
2543
2547
|
if (t <= e) return 0;
|
|
2544
2548
|
if (!n) return t - e;
|
|
2545
2549
|
let r = 0, o = e;
|
|
2546
|
-
for (let
|
|
2547
|
-
const
|
|
2548
|
-
if (
|
|
2549
|
-
const a = Math.max(o,
|
|
2550
|
-
|
|
2550
|
+
for (let i = 0; i < jt && o < t; i++) {
|
|
2551
|
+
const s = Gt(o, n);
|
|
2552
|
+
if (s) {
|
|
2553
|
+
const a = Math.max(o, s.open), u = Math.min(t, s.close);
|
|
2554
|
+
u > a && (r += u - a);
|
|
2551
2555
|
}
|
|
2552
2556
|
o = Wt(o, n);
|
|
2553
2557
|
}
|
|
@@ -2556,93 +2560,93 @@ function _e(e, t, n) {
|
|
|
2556
2560
|
function Oe(e, t, n) {
|
|
2557
2561
|
if (!n) return e + t;
|
|
2558
2562
|
let r = t, o = e;
|
|
2559
|
-
for (let
|
|
2560
|
-
const
|
|
2561
|
-
if (
|
|
2562
|
-
const a = Math.max(o,
|
|
2563
|
-
if (
|
|
2564
|
-
const
|
|
2565
|
-
if (r <=
|
|
2566
|
-
r -=
|
|
2563
|
+
for (let i = 0; i < jt; i++) {
|
|
2564
|
+
const s = Gt(o, n);
|
|
2565
|
+
if (s) {
|
|
2566
|
+
const a = Math.max(o, s.open);
|
|
2567
|
+
if (s.close > a) {
|
|
2568
|
+
const u = s.close - a;
|
|
2569
|
+
if (r <= u) return a + r;
|
|
2570
|
+
r -= u;
|
|
2567
2571
|
}
|
|
2568
2572
|
}
|
|
2569
2573
|
o = Wt(o, n);
|
|
2570
2574
|
}
|
|
2571
2575
|
return e + t;
|
|
2572
2576
|
}
|
|
2573
|
-
function
|
|
2577
|
+
function kc(e) {
|
|
2574
2578
|
const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
|
|
2575
2579
|
return t ? Number(t[1]) * 60 + Number(t[2]) : null;
|
|
2576
2580
|
}
|
|
2577
|
-
const
|
|
2578
|
-
function
|
|
2579
|
-
return e === "snoozed" ?
|
|
2581
|
+
const Se = 1, Ee = 2;
|
|
2582
|
+
function Mc(e) {
|
|
2583
|
+
return e === "snoozed" ? Se : Ee;
|
|
2580
2584
|
}
|
|
2581
2585
|
function xe(e) {
|
|
2582
2586
|
const t = e.calendar;
|
|
2583
2587
|
return t && Array.isArray(t.days) ? t : null;
|
|
2584
2588
|
}
|
|
2585
|
-
const
|
|
2589
|
+
const vc = [
|
|
2586
2590
|
"speed_of_answer",
|
|
2587
2591
|
"first_response",
|
|
2588
2592
|
"next_response",
|
|
2589
2593
|
"resolution",
|
|
2590
2594
|
"close"
|
|
2591
|
-
],
|
|
2595
|
+
], Cc = ["snoozed", "waiting_for_customer"], mo = 6e4, Vt = ["speed_of_answer", "first_response", "next_response"], ho = [...Vt, "resolution", "close"];
|
|
2592
2596
|
function z(e) {
|
|
2593
2597
|
return e.state === "running" || e.state === "paused";
|
|
2594
2598
|
}
|
|
2595
2599
|
function go(e, t) {
|
|
2596
2600
|
return z(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
|
|
2597
2601
|
}
|
|
2598
|
-
function
|
|
2602
|
+
function it(e) {
|
|
2599
2603
|
return z(e) ? { state: "void" } : null;
|
|
2600
2604
|
}
|
|
2601
2605
|
function yo(e, t, n, r) {
|
|
2602
2606
|
if (!z(e) || (e.pauseBits & t) !== 0) return null;
|
|
2603
2607
|
const o = e.pauseBits | t;
|
|
2604
|
-
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs:
|
|
2608
|
+
return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Ae(n, e.dueAt, r) };
|
|
2605
2609
|
}
|
|
2606
2610
|
function bo(e, t, n, r) {
|
|
2607
2611
|
if (!z(e) || (e.pauseBits & t) === 0) return null;
|
|
2608
2612
|
const o = e.pauseBits & ~t;
|
|
2609
2613
|
return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: Oe(n, e.remainingMs, r) };
|
|
2610
2614
|
}
|
|
2611
|
-
function
|
|
2612
|
-
const
|
|
2613
|
-
h && (
|
|
2615
|
+
function Oc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
2616
|
+
const i = xe(o), s = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
|
|
2617
|
+
h && (u.push({ op: "patch", clockId: g.id, patch: h }), Object.assign(g, h));
|
|
2614
2618
|
}, d = (g) => {
|
|
2615
2619
|
for (const h of a)
|
|
2616
|
-
h.metric === g && l(h, go(h,
|
|
2617
|
-
},
|
|
2620
|
+
h.metric === g && l(h, go(h, s));
|
|
2621
|
+
}, c = (g) => {
|
|
2618
2622
|
for (const h of a)
|
|
2619
|
-
g.includes(h.metric) && l(h,
|
|
2623
|
+
g.includes(h.metric) && l(h, it(h));
|
|
2620
2624
|
}, p = (g) => {
|
|
2621
|
-
for (const h of a) l(h, yo(h, g,
|
|
2625
|
+
for (const h of a) l(h, yo(h, g, s, i));
|
|
2622
2626
|
}, f = (g) => {
|
|
2623
|
-
for (const h of a) l(h, bo(h, g,
|
|
2624
|
-
}, y = (g) => a.reduce((h,
|
|
2625
|
-
const
|
|
2626
|
-
if (!
|
|
2627
|
-
const x =
|
|
2628
|
-
|
|
2627
|
+
for (const h of a) l(h, bo(h, g, s, i));
|
|
2628
|
+
}, y = (g) => a.reduce((h, S) => S.metric === g ? Math.max(h, S.attempt) : h, 0) + 1, m = (g) => a.some((h) => h.metric === g && z(h)), E = (g, h) => {
|
|
2629
|
+
const S = o.targets.find((C) => C.metric === g);
|
|
2630
|
+
if (!S) return;
|
|
2631
|
+
const x = S.minutes * mo;
|
|
2632
|
+
u.push({
|
|
2629
2633
|
op: "start",
|
|
2630
2634
|
metric: g,
|
|
2631
2635
|
attempt: y(g),
|
|
2632
2636
|
startedAt: h,
|
|
2633
2637
|
targetMs: x,
|
|
2634
|
-
dueAt: Oe(h, x,
|
|
2638
|
+
dueAt: Oe(h, x, i)
|
|
2635
2639
|
});
|
|
2636
2640
|
};
|
|
2637
2641
|
switch (e) {
|
|
2638
2642
|
case "apply": {
|
|
2639
2643
|
for (const g of a)
|
|
2640
|
-
g.profileId !== o.id && l(g,
|
|
2644
|
+
g.profileId !== o.id && l(g, it(g));
|
|
2641
2645
|
for (const g of o.targets) {
|
|
2642
2646
|
if (g.metric === "next_response") continue;
|
|
2643
2647
|
a.some(
|
|
2644
|
-
(
|
|
2645
|
-
) ||
|
|
2648
|
+
(S) => S.metric === g.metric && S.profileId === o.id
|
|
2649
|
+
) || E(g.metric, s);
|
|
2646
2650
|
}
|
|
2647
2651
|
break;
|
|
2648
2652
|
}
|
|
@@ -2650,53 +2654,53 @@ function Cc({ event: e, at: t, now: n, clocks: r, profile: o }) {
|
|
|
2650
2654
|
d("speed_of_answer");
|
|
2651
2655
|
break;
|
|
2652
2656
|
case "outbound": {
|
|
2653
|
-
d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(
|
|
2657
|
+
d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(Ee);
|
|
2654
2658
|
break;
|
|
2655
2659
|
}
|
|
2656
2660
|
case "inbound": {
|
|
2657
|
-
f(
|
|
2661
|
+
f(Ee), !m("first_response") && !m("next_response") && E("next_response", s);
|
|
2658
2662
|
break;
|
|
2659
2663
|
}
|
|
2660
2664
|
case "resolved":
|
|
2661
2665
|
d("resolution");
|
|
2662
2666
|
break;
|
|
2663
2667
|
case "closed":
|
|
2664
|
-
d("close"), d("resolution"),
|
|
2668
|
+
d("close"), d("resolution"), c(Vt);
|
|
2665
2669
|
break;
|
|
2666
2670
|
case "reopened":
|
|
2667
|
-
m("resolution") ||
|
|
2671
|
+
m("resolution") || E("resolution", s), m("close") || E("close", s);
|
|
2668
2672
|
break;
|
|
2669
2673
|
case "snoozed":
|
|
2670
|
-
o.pauseOn.includes("snoozed") && p(
|
|
2674
|
+
o.pauseOn.includes("snoozed") && p(Se);
|
|
2671
2675
|
break;
|
|
2672
2676
|
case "unsnoozed":
|
|
2673
|
-
f(
|
|
2677
|
+
f(Se);
|
|
2674
2678
|
break;
|
|
2675
2679
|
case "discarded":
|
|
2676
|
-
|
|
2680
|
+
c(ho);
|
|
2677
2681
|
break;
|
|
2678
2682
|
}
|
|
2679
|
-
return
|
|
2683
|
+
return u;
|
|
2680
2684
|
}
|
|
2681
|
-
function
|
|
2685
|
+
function _o(e) {
|
|
2682
2686
|
return e.state === "running" || e.state === "paused";
|
|
2683
2687
|
}
|
|
2684
2688
|
function Ie(e, t) {
|
|
2685
2689
|
const n = xe(e);
|
|
2686
|
-
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -
|
|
2690
|
+
return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Ae(e.dueAt, t, n) : Ae(t, e.dueAt, n);
|
|
2687
2691
|
}
|
|
2688
|
-
function
|
|
2692
|
+
function xc(e, t) {
|
|
2689
2693
|
return e.state === "paused" ? Oe(t, e.remainingMs, xe(e)) : e.dueAt;
|
|
2690
2694
|
}
|
|
2691
|
-
function
|
|
2692
|
-
const n = e.filter(
|
|
2695
|
+
function Nc(e, t) {
|
|
2696
|
+
const n = e.filter(_o);
|
|
2693
2697
|
if (!n.length) return;
|
|
2694
|
-
const r = n.filter((
|
|
2698
|
+
const r = n.filter((i) => i.state === "running");
|
|
2695
2699
|
return (r.length ? r : n).reduce(
|
|
2696
|
-
(
|
|
2700
|
+
(i, s) => Ie(s, t) < Ie(i, t) ? s : i
|
|
2697
2701
|
);
|
|
2698
2702
|
}
|
|
2699
|
-
function
|
|
2703
|
+
function Rc(e, t) {
|
|
2700
2704
|
if (e.state === "missed") return "breached";
|
|
2701
2705
|
if (e.state === "hit") return "met";
|
|
2702
2706
|
if (e.state === "paused") return "paused";
|
|
@@ -2704,41 +2708,41 @@ function Nc(e, t) {
|
|
|
2704
2708
|
const n = Ie(e, t);
|
|
2705
2709
|
return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
|
|
2706
2710
|
}
|
|
2707
|
-
function
|
|
2711
|
+
function Dc(e) {
|
|
2708
2712
|
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);
|
|
2709
2713
|
return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
|
|
2710
2714
|
}
|
|
2711
|
-
const
|
|
2715
|
+
const Ao = "strategy_item";
|
|
2712
2716
|
function zt(e) {
|
|
2713
|
-
return `${
|
|
2717
|
+
return `${Ao}:${e}`;
|
|
2714
2718
|
}
|
|
2715
|
-
function
|
|
2719
|
+
function $c(e, t = 25) {
|
|
2716
2720
|
const n = /* @__PURE__ */ new Set([zt(e.id)]);
|
|
2717
2721
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
2718
2722
|
return Array.from(n).slice(0, t);
|
|
2719
2723
|
}
|
|
2720
|
-
function
|
|
2724
|
+
function Lc(e) {
|
|
2721
2725
|
return e ? [...e.ancestorKeys ?? [], zt(e.id)] : [];
|
|
2722
2726
|
}
|
|
2723
2727
|
const ne = [
|
|
2724
2728
|
{ key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
|
|
2725
2729
|
{ key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
|
|
2726
2730
|
{ key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
|
|
2727
|
-
],
|
|
2731
|
+
], So = 999, Eo = 7;
|
|
2728
2732
|
function Io(e, t = ne) {
|
|
2729
2733
|
return t.find((n) => n.key === e);
|
|
2730
2734
|
}
|
|
2731
2735
|
function Te(e, t = ne) {
|
|
2732
|
-
return Io(e, t)?.order ??
|
|
2736
|
+
return Io(e, t)?.order ?? So;
|
|
2733
2737
|
}
|
|
2734
|
-
function
|
|
2738
|
+
function Pc(e, t, n = ne) {
|
|
2735
2739
|
return Te(t, n) <= Te(e, n);
|
|
2736
2740
|
}
|
|
2737
|
-
function
|
|
2741
|
+
function Kc(e, t = ne) {
|
|
2738
2742
|
const n = Te(e, t);
|
|
2739
|
-
return t.filter((o) => o.order > n).sort((o,
|
|
2743
|
+
return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
|
|
2740
2744
|
}
|
|
2741
|
-
function
|
|
2745
|
+
function Uc(e) {
|
|
2742
2746
|
const t = e.trim().toLowerCase();
|
|
2743
2747
|
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;
|
|
2744
2748
|
}
|
|
@@ -2751,86 +2755,86 @@ const we = {
|
|
|
2751
2755
|
achieved: "closed",
|
|
2752
2756
|
missed: "closed"
|
|
2753
2757
|
};
|
|
2754
|
-
function
|
|
2758
|
+
function Fc(e) {
|
|
2755
2759
|
return we[e] ?? "open";
|
|
2756
2760
|
}
|
|
2757
|
-
function
|
|
2761
|
+
function Bc(e) {
|
|
2758
2762
|
return Object.keys(we).filter(
|
|
2759
2763
|
(t) => e.includes(we[t])
|
|
2760
2764
|
);
|
|
2761
2765
|
}
|
|
2762
2766
|
const To = 864e5, re = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
|
|
2763
|
-
function
|
|
2767
|
+
function jc(e, t) {
|
|
2764
2768
|
const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
|
|
2765
2769
|
if (!Number.isFinite(t)) return 0;
|
|
2766
|
-
const
|
|
2767
|
-
return (n === "down" ?
|
|
2770
|
+
const i = n === "down" ? t <= o : t >= o, s = o - r;
|
|
2771
|
+
return (n === "down" ? s < 0 : s > 0) ? re((t - r) / s) : i ? 1 : 0;
|
|
2768
2772
|
}
|
|
2769
|
-
function
|
|
2773
|
+
function Hc(e, t) {
|
|
2770
2774
|
const { startDate: n, targetDate: r } = e;
|
|
2771
2775
|
if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
|
|
2772
2776
|
return re((t - n) / (r - n));
|
|
2773
2777
|
}
|
|
2774
2778
|
const wo = 0.1, ko = 0.25;
|
|
2775
|
-
function
|
|
2779
|
+
function Gc(e, t) {
|
|
2776
2780
|
if (typeof e != "number" || typeof t != "number") return;
|
|
2777
2781
|
if (e >= 1) return "achieved";
|
|
2778
2782
|
const n = t - e;
|
|
2779
2783
|
return n >= ko ? "off_track" : n >= wo ? "at_risk" : "on_track";
|
|
2780
2784
|
}
|
|
2781
|
-
function
|
|
2785
|
+
function Wc(e, t) {
|
|
2782
2786
|
if (t)
|
|
2783
2787
|
return re(e / t);
|
|
2784
2788
|
}
|
|
2785
|
-
function
|
|
2789
|
+
function Vc(e) {
|
|
2786
2790
|
const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
|
|
2787
2791
|
if (t.length)
|
|
2788
2792
|
return re(t.reduce((n, r) => n + r, 0) / t.length);
|
|
2789
2793
|
}
|
|
2790
|
-
function
|
|
2794
|
+
function zc(e, t) {
|
|
2791
2795
|
const n = e.lastCheckInAt ?? e.createdAt;
|
|
2792
2796
|
if (typeof n != "number") return 0;
|
|
2793
|
-
const r = (e.checkInEveryDays ??
|
|
2797
|
+
const r = (e.checkInEveryDays ?? Eo) * To, o = t - n - r;
|
|
2794
2798
|
return o > 0 ? o : 0;
|
|
2795
2799
|
}
|
|
2796
|
-
function
|
|
2800
|
+
function Xc(e) {
|
|
2797
2801
|
return e.targetDate ?? Number.MAX_SAFE_INTEGER;
|
|
2798
2802
|
}
|
|
2799
|
-
function
|
|
2803
|
+
function Yc(e, t) {
|
|
2800
2804
|
const n = e.accumulatedSeconds || 0;
|
|
2801
2805
|
return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
|
|
2802
2806
|
}
|
|
2803
|
-
function
|
|
2807
|
+
function qc(e, t) {
|
|
2804
2808
|
const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
|
|
2805
2809
|
if (!t || t === "exact") return n * 60;
|
|
2806
2810
|
const r = Number(t);
|
|
2807
2811
|
return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
|
|
2808
2812
|
}
|
|
2809
|
-
function
|
|
2813
|
+
function Qc(e) {
|
|
2810
2814
|
const t = Math.max(0, Math.round(e / 60));
|
|
2811
2815
|
return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
2812
2816
|
}
|
|
2813
|
-
function
|
|
2814
|
-
const t = Math.max(0, Math.floor(e)), n = (
|
|
2817
|
+
function Zc(e) {
|
|
2818
|
+
const t = Math.max(0, Math.floor(e)), n = (i) => String(i).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
|
|
2815
2819
|
return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
|
|
2816
2820
|
}
|
|
2817
2821
|
function Mo(e) {
|
|
2818
2822
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
2819
2823
|
}
|
|
2820
|
-
function
|
|
2824
|
+
function Jc(e, t) {
|
|
2821
2825
|
const n = Mo(e) || "werksoort", r = new Set(t);
|
|
2822
2826
|
if (!r.has(n)) return n;
|
|
2823
2827
|
for (let o = 2; o < 500; o++) {
|
|
2824
|
-
const
|
|
2825
|
-
if (!r.has(
|
|
2828
|
+
const i = `${n}-${o}`;
|
|
2829
|
+
if (!r.has(i)) return i;
|
|
2826
2830
|
}
|
|
2827
2831
|
return `${n}-${r.size + 1}`;
|
|
2828
2832
|
}
|
|
2829
|
-
function
|
|
2833
|
+
function el(e, t) {
|
|
2830
2834
|
const n = e.ownerScope;
|
|
2831
2835
|
return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
|
|
2832
2836
|
}
|
|
2833
|
-
function
|
|
2837
|
+
function tl(e) {
|
|
2834
2838
|
return e.filter((t) => !t.archived).sort(vo);
|
|
2835
2839
|
}
|
|
2836
2840
|
function vo(e, t) {
|
|
@@ -2847,25 +2851,25 @@ function xo(e) {
|
|
|
2847
2851
|
const n = t.slice(0, ue), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
|
|
2848
2852
|
return r > ue * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
|
|
2849
2853
|
}
|
|
2850
|
-
function
|
|
2854
|
+
function nl(e, t) {
|
|
2851
2855
|
const n = xo(t.text), r = P(n);
|
|
2852
|
-
if (!r || (e.examples ?? []).some((
|
|
2853
|
-
const o = e.exampleCandidates ?? [],
|
|
2854
|
-
if (
|
|
2855
|
-
if (o[
|
|
2856
|
-
const
|
|
2857
|
-
return i
|
|
2856
|
+
if (!r || (e.examples ?? []).some((s) => P(s) === r)) return null;
|
|
2857
|
+
const o = e.exampleCandidates ?? [], i = o.findIndex((s) => P(s.text) === r);
|
|
2858
|
+
if (i >= 0) {
|
|
2859
|
+
if (o[i].corrected || !t.corrected) return null;
|
|
2860
|
+
const s = [...o];
|
|
2861
|
+
return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, st(s);
|
|
2858
2862
|
}
|
|
2859
|
-
return
|
|
2863
|
+
return st([{ ...t, text: n }, ...o]).slice(0, Oo);
|
|
2860
2864
|
}
|
|
2861
|
-
function
|
|
2865
|
+
function st(e) {
|
|
2862
2866
|
return [...e].sort(
|
|
2863
2867
|
(t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
|
|
2864
2868
|
);
|
|
2865
2869
|
}
|
|
2866
|
-
function
|
|
2867
|
-
const n = P(t), r = (e.examples ?? []).filter((
|
|
2868
|
-
return { examples: r.some((
|
|
2870
|
+
function rl(e, t) {
|
|
2871
|
+
const n = P(t), r = (e.examples ?? []).filter((i) => i.trim());
|
|
2872
|
+
return { examples: r.some((i) => P(i) === n) ? r : [...r, t].slice(-Co), exampleCandidates: No(e, t) };
|
|
2869
2873
|
}
|
|
2870
2874
|
function No(e, t) {
|
|
2871
2875
|
const n = P(t);
|
|
@@ -2875,7 +2879,7 @@ function Ro(e, t) {
|
|
|
2875
2879
|
const n = e.ownerScope;
|
|
2876
2880
|
return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
|
|
2877
2881
|
}
|
|
2878
|
-
function
|
|
2882
|
+
function ol(e, t) {
|
|
2879
2883
|
return e.filter((n) => Ro(n, t));
|
|
2880
2884
|
}
|
|
2881
2885
|
const Xt = [
|
|
@@ -2917,7 +2921,7 @@ function ke(e) {
|
|
|
2917
2921
|
statuses: ["draft"]
|
|
2918
2922
|
};
|
|
2919
2923
|
}
|
|
2920
|
-
function
|
|
2924
|
+
function il(e) {
|
|
2921
2925
|
return e.issuedAt != null;
|
|
2922
2926
|
}
|
|
2923
2927
|
const sl = [
|
|
@@ -2958,7 +2962,7 @@ function Do(e, t) {
|
|
|
2958
2962
|
source: e.source
|
|
2959
2963
|
};
|
|
2960
2964
|
}
|
|
2961
|
-
function
|
|
2965
|
+
function al(e) {
|
|
2962
2966
|
return {
|
|
2963
2967
|
...Do(e, e.kindKey),
|
|
2964
2968
|
sourceTransactionId: e.sourceTransactionId,
|
|
@@ -2968,7 +2972,7 @@ function il(e) {
|
|
|
2968
2972
|
totals: e.totals
|
|
2969
2973
|
};
|
|
2970
2974
|
}
|
|
2971
|
-
function
|
|
2975
|
+
function cl(e, t = {}) {
|
|
2972
2976
|
const n = ke(e.kindKey), r = e.totals ?? { netCents: 0, taxCents: 0, grossCents: 0 };
|
|
2973
2977
|
return {
|
|
2974
2978
|
customer: {
|
|
@@ -2977,7 +2981,7 @@ function al(e, t = {}) {
|
|
|
2977
2981
|
// One token per line of the address, plus `street` on its own for a template that wants
|
|
2978
2982
|
// the house number elsewhere. Empty stays empty: `fillText` reports it as a hole, and a
|
|
2979
2983
|
// recipient block missing its street is exactly what the issue gate has to refuse.
|
|
2980
|
-
address:
|
|
2984
|
+
address: Po(t.companyAddress),
|
|
2981
2985
|
street: t.companyAddress?.street ?? "",
|
|
2982
2986
|
house_number: t.companyAddress?.houseNumber ?? "",
|
|
2983
2987
|
postal_code: t.companyAddress?.postalCode ?? "",
|
|
@@ -3002,8 +3006,8 @@ function al(e, t = {}) {
|
|
|
3002
3006
|
}
|
|
3003
3007
|
};
|
|
3004
3008
|
}
|
|
3005
|
-
function
|
|
3006
|
-
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((
|
|
3009
|
+
function ll(e, t = [], n = $o) {
|
|
3010
|
+
const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((u) => u.key === a)?.percent ?? 0, i = {
|
|
3007
3011
|
block_id: "lines",
|
|
3008
3012
|
type: "table",
|
|
3009
3013
|
columns: [
|
|
@@ -3017,13 +3021,13 @@ function cl(e, t = [], n = $o) {
|
|
|
3017
3021
|
// A text line spans as a heading: empty money cells would read as "free".
|
|
3018
3022
|
[a.name, "", "", ""]
|
|
3019
3023
|
) : [
|
|
3020
|
-
a.
|
|
3021
|
-
|
|
3024
|
+
Lo(a.name, a.description, a.optional, n.optional),
|
|
3025
|
+
Ko(a.quantity),
|
|
3022
3026
|
D(a.unitPriceCents),
|
|
3023
3027
|
D(a.netCents)
|
|
3024
3028
|
]
|
|
3025
3029
|
)
|
|
3026
|
-
},
|
|
3030
|
+
}, s = {
|
|
3027
3031
|
block_id: "totals",
|
|
3028
3032
|
type: "totals",
|
|
3029
3033
|
rows: [
|
|
@@ -3035,20 +3039,25 @@ function cl(e, t = [], n = $o) {
|
|
|
3035
3039
|
amount: D(a.taxCents)
|
|
3036
3040
|
}))
|
|
3037
3041
|
};
|
|
3038
|
-
return { lines: [
|
|
3042
|
+
return { lines: [i], totals: [s] };
|
|
3039
3043
|
}
|
|
3040
3044
|
const $o = {
|
|
3041
3045
|
description: "Omschrijving",
|
|
3046
|
+
optional: "optioneel",
|
|
3042
3047
|
quantity: "Aantal",
|
|
3043
3048
|
unitPrice: "Stuksprijs",
|
|
3044
3049
|
net: "Netto",
|
|
3045
3050
|
tax: "Btw",
|
|
3046
3051
|
gross: "Totaal"
|
|
3047
3052
|
};
|
|
3048
|
-
function Lo(e) {
|
|
3049
|
-
|
|
3053
|
+
function Lo(e, t, n, r) {
|
|
3054
|
+
const o = t ? `${e} — ${t}` : e;
|
|
3055
|
+
return n ? `${o} (${r})` : o;
|
|
3050
3056
|
}
|
|
3051
3057
|
function Po(e) {
|
|
3058
|
+
return e?.street ? [e.street, e.houseNumber].filter(Boolean).join(" ") : "";
|
|
3059
|
+
}
|
|
3060
|
+
function Ko(e) {
|
|
3052
3061
|
return Number.isInteger(e) ? String(e) : String(e).replace(".", ",");
|
|
3053
3062
|
}
|
|
3054
3063
|
function at(e) {
|
|
@@ -3056,7 +3065,7 @@ function at(e) {
|
|
|
3056
3065
|
const t = new Date(e), n = (r) => String(r).padStart(2, "0");
|
|
3057
3066
|
return `${n(t.getDate())}-${n(t.getMonth() + 1)}-${t.getFullYear()}`;
|
|
3058
3067
|
}
|
|
3059
|
-
const
|
|
3068
|
+
const ul = [
|
|
3060
3069
|
{
|
|
3061
3070
|
block_id: "head",
|
|
3062
3071
|
type: "letterhead",
|
|
@@ -3089,39 +3098,39 @@ Hierbij onze offerte. Hieronder vindt u de specificatie.`
|
|
|
3089
3098
|
type: "paragraph",
|
|
3090
3099
|
text: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld. Deze offerte is geldig tot {quote.valid_until}."
|
|
3091
3100
|
}
|
|
3092
|
-
],
|
|
3093
|
-
function
|
|
3101
|
+
], Uo = Xt.map((e) => e.key), Fo = "product";
|
|
3102
|
+
function dl(e, t) {
|
|
3094
3103
|
return `${e}:${t}`;
|
|
3095
3104
|
}
|
|
3096
|
-
function dl(e) {
|
|
3097
|
-
return `${Uo}:${e}`;
|
|
3098
|
-
}
|
|
3099
3105
|
function pl(e) {
|
|
3106
|
+
return `${Fo}:${e}`;
|
|
3107
|
+
}
|
|
3108
|
+
function fl(e) {
|
|
3100
3109
|
const t = e.indexOf(":");
|
|
3101
3110
|
if (t < 0) return;
|
|
3102
3111
|
const n = e.slice(0, t);
|
|
3103
|
-
return
|
|
3112
|
+
return Uo.includes(n) ? e.slice(t + 1) : void 0;
|
|
3104
3113
|
}
|
|
3105
|
-
function
|
|
3114
|
+
function ml(e) {
|
|
3106
3115
|
return e.type === "agent";
|
|
3107
3116
|
}
|
|
3108
|
-
const
|
|
3109
|
-
function
|
|
3117
|
+
const hl = "WORK_COMMENT_ADDED", gl = "WORK_ITEM_ASSIGNED", yl = "WORK_ITEM_STATUS_CHANGED";
|
|
3118
|
+
function Bo(e, t) {
|
|
3110
3119
|
const n = (r) => {
|
|
3111
3120
|
const o = new Date(r);
|
|
3112
3121
|
return o.setHours(0, 0, 0, 0), o.getTime();
|
|
3113
3122
|
};
|
|
3114
3123
|
return Math.round((n(e) - n(t)) / qn);
|
|
3115
3124
|
}
|
|
3116
|
-
function
|
|
3125
|
+
function bl(e, t) {
|
|
3117
3126
|
if (e.closedAt != null) return { score: L, reasons: [] };
|
|
3118
3127
|
const n = t.remindersById?.[e.id];
|
|
3119
3128
|
if (n && n.remindAt > t.now) return { score: L, reasons: [] };
|
|
3120
3129
|
let r = 0;
|
|
3121
|
-
const o = [],
|
|
3122
|
-
if (J[
|
|
3123
|
-
const
|
|
3124
|
-
|
|
3130
|
+
const o = [], i = e.priority ?? "normal";
|
|
3131
|
+
if (J[i] > 0 && (r += J[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
|
|
3132
|
+
const s = Bo(e.dueDate, t.now);
|
|
3133
|
+
s < 0 ? (r += 35, o.push("overdue")) : s === 0 && (r += 20, o.push("due-today"));
|
|
3125
3134
|
}
|
|
3126
3135
|
return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
|
|
3127
3136
|
}
|
|
@@ -3133,35 +3142,35 @@ const Ne = [
|
|
|
3133
3142
|
{ key: "subtask", label: "type_subtask" },
|
|
3134
3143
|
{ key: "case", label: "type_case" },
|
|
3135
3144
|
{ key: "deal", label: "type_deal" }
|
|
3136
|
-
],
|
|
3145
|
+
], _l = Ne.map((e) => e.key);
|
|
3137
3146
|
function Al(e) {
|
|
3138
3147
|
return e?.types?.length ? e.types : Ne;
|
|
3139
3148
|
}
|
|
3140
|
-
function
|
|
3149
|
+
function Sl(e, t) {
|
|
3141
3150
|
return t.find((n) => n.key === e);
|
|
3142
3151
|
}
|
|
3143
3152
|
function El(e) {
|
|
3144
3153
|
const t = e.trim().toLowerCase();
|
|
3145
3154
|
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;
|
|
3146
3155
|
}
|
|
3147
|
-
function
|
|
3156
|
+
function Il(...e) {
|
|
3148
3157
|
return e.map((t) => Ne.find((n) => n.key === t)).filter((t) => !!t);
|
|
3149
3158
|
}
|
|
3150
|
-
const
|
|
3151
|
-
function
|
|
3152
|
-
return `${Bo}:${e}`;
|
|
3153
|
-
}
|
|
3154
|
-
function Yt(e) {
|
|
3159
|
+
const jo = "work_item", Ho = "work_project", Go = "work_activity", Tl = "work_cycle";
|
|
3160
|
+
function Wo(e) {
|
|
3155
3161
|
return `${jo}:${e}`;
|
|
3156
3162
|
}
|
|
3157
|
-
function
|
|
3163
|
+
function Yt(e) {
|
|
3158
3164
|
return `${Ho}:${e}`;
|
|
3159
3165
|
}
|
|
3160
|
-
function wl(e
|
|
3166
|
+
function wl(e) {
|
|
3167
|
+
return `${Go}:${e}`;
|
|
3168
|
+
}
|
|
3169
|
+
function kl(e, t, n) {
|
|
3161
3170
|
const r = `${e}-${t}`;
|
|
3162
3171
|
return n ? `${r}-${n}` : r;
|
|
3163
3172
|
}
|
|
3164
|
-
function
|
|
3173
|
+
function Ml(e) {
|
|
3165
3174
|
const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
|
|
3166
3175
|
return t ? {
|
|
3167
3176
|
projectKey: t[1].toUpperCase(),
|
|
@@ -3169,17 +3178,17 @@ function kl(e) {
|
|
|
3169
3178
|
...t[3] ? { subSequence: Number(t[3]) } : {}
|
|
3170
3179
|
} : null;
|
|
3171
3180
|
}
|
|
3172
|
-
function
|
|
3181
|
+
function vl(e) {
|
|
3173
3182
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
|
|
3174
3183
|
}
|
|
3175
|
-
function
|
|
3176
|
-
const n = /* @__PURE__ */ new Set([
|
|
3184
|
+
function Cl(e, t = 25) {
|
|
3185
|
+
const n = /* @__PURE__ */ new Set([Wo(e.id)]);
|
|
3177
3186
|
e.projectId && n.add(Yt(e.projectId));
|
|
3178
3187
|
for (const r of e.ancestorKeys ?? []) n.add(r);
|
|
3179
3188
|
for (const r of e.partyKeys ?? []) n.add(r);
|
|
3180
3189
|
return Array.from(n).slice(0, t);
|
|
3181
3190
|
}
|
|
3182
|
-
function
|
|
3191
|
+
function Ol(e) {
|
|
3183
3192
|
return [Yt(e.id)];
|
|
3184
3193
|
}
|
|
3185
3194
|
const Re = [
|
|
@@ -3188,41 +3197,41 @@ const Re = [
|
|
|
3188
3197
|
{ key: "done", label: "status_done", category: "done", order: 2 },
|
|
3189
3198
|
{ key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
|
|
3190
3199
|
], qt = Re.map((e) => e.key);
|
|
3191
|
-
function
|
|
3200
|
+
function Vo(e) {
|
|
3192
3201
|
return e?.statuses?.length ? e.statuses : Re;
|
|
3193
3202
|
}
|
|
3194
|
-
function
|
|
3203
|
+
function zo(e, t) {
|
|
3195
3204
|
return t.find((n) => n.key === e)?.category ?? "todo";
|
|
3196
3205
|
}
|
|
3197
|
-
function
|
|
3206
|
+
function xl(e, t) {
|
|
3198
3207
|
return t.find((n) => n.key === e);
|
|
3199
3208
|
}
|
|
3200
|
-
function
|
|
3201
|
-
const t =
|
|
3202
|
-
return n && t.some((r) => r.key === n) ? n :
|
|
3209
|
+
function Nl(e) {
|
|
3210
|
+
const t = Vo(e), n = e?.defaultStatusKey;
|
|
3211
|
+
return n && t.some((r) => r.key === n) ? n : Xo(t)[0]?.key ?? Re[0].key;
|
|
3203
3212
|
}
|
|
3204
|
-
function
|
|
3213
|
+
function Xo(e) {
|
|
3205
3214
|
return [...e].sort((t, n) => {
|
|
3206
3215
|
const r = (t.order ?? 0) - (n.order ?? 0);
|
|
3207
3216
|
return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
|
|
3208
3217
|
});
|
|
3209
3218
|
}
|
|
3210
|
-
function
|
|
3211
|
-
return
|
|
3219
|
+
function Rl(e, t) {
|
|
3220
|
+
return zo(e, t) === "done";
|
|
3212
3221
|
}
|
|
3213
|
-
function
|
|
3222
|
+
function Yo(e) {
|
|
3214
3223
|
return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
|
|
3215
3224
|
}
|
|
3216
|
-
function
|
|
3217
|
-
const n =
|
|
3225
|
+
function Dl(e, t) {
|
|
3226
|
+
const n = Yo(e) || "status", r = /* @__PURE__ */ new Set([...t, ...qt]);
|
|
3218
3227
|
if (!r.has(n)) return n;
|
|
3219
3228
|
for (let o = 2; o < 500; o++) {
|
|
3220
|
-
const
|
|
3221
|
-
if (!r.has(
|
|
3229
|
+
const i = `${n}-${o}`;
|
|
3230
|
+
if (!r.has(i)) return i;
|
|
3222
3231
|
}
|
|
3223
3232
|
return `${n}-${r.size + 1}`;
|
|
3224
3233
|
}
|
|
3225
|
-
function
|
|
3234
|
+
function $l(e) {
|
|
3226
3235
|
const t = [];
|
|
3227
3236
|
if (!e.length) return [{ index: -1, reason: "empty" }];
|
|
3228
3237
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -3234,13 +3243,13 @@ function Dl(e) {
|
|
|
3234
3243
|
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);
|
|
3235
3244
|
}), 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;
|
|
3236
3245
|
}
|
|
3237
|
-
function
|
|
3246
|
+
function Ll(e) {
|
|
3238
3247
|
return e.startDate ?? Number.MAX_SAFE_INTEGER;
|
|
3239
3248
|
}
|
|
3240
|
-
function
|
|
3249
|
+
function Pl(e) {
|
|
3241
3250
|
return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
|
|
3242
3251
|
}
|
|
3243
|
-
const
|
|
3252
|
+
const qo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Qo = /* @__PURE__ */ new Set([
|
|
3244
3253
|
"text/plain",
|
|
3245
3254
|
"text/markdown",
|
|
3246
3255
|
"text/csv",
|
|
@@ -3249,67 +3258,67 @@ const Yo = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
|
|
|
3249
3258
|
"application/xml",
|
|
3250
3259
|
"text/xml"
|
|
3251
3260
|
]);
|
|
3252
|
-
function
|
|
3261
|
+
function Zo(e) {
|
|
3253
3262
|
const t = (e ?? "").trim().toLowerCase().split(";")[0];
|
|
3254
|
-
return t ?
|
|
3263
|
+
return t ? qo.has(t) ? "image" : t === "application/pdf" ? "pdf" : Qo.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
|
|
3255
3264
|
}
|
|
3256
|
-
const F = 1024 * 1024,
|
|
3265
|
+
const F = 1024 * 1024, Jo = {
|
|
3257
3266
|
image: 5 * F,
|
|
3258
3267
|
pdf: 20 * F,
|
|
3259
3268
|
text: 1 * F,
|
|
3260
3269
|
audio: 20 * F
|
|
3261
|
-
},
|
|
3262
|
-
function
|
|
3263
|
-
const n =
|
|
3264
|
-
return n === "unsupported" ? "unsupported" : t >
|
|
3270
|
+
}, Kl = 25 * F, Ul = 5;
|
|
3271
|
+
function Fl(e, t) {
|
|
3272
|
+
const n = Zo(e);
|
|
3273
|
+
return n === "unsupported" ? "unsupported" : t > Jo[n] ? "too-large" : null;
|
|
3265
3274
|
}
|
|
3266
|
-
function
|
|
3275
|
+
function Bl(e) {
|
|
3267
3276
|
return e.access !== "read" && e.effect !== "internal";
|
|
3268
3277
|
}
|
|
3269
|
-
function
|
|
3278
|
+
function ei(e) {
|
|
3270
3279
|
return `${e.kind}:${e.id || e.url || e.title}`;
|
|
3271
3280
|
}
|
|
3272
|
-
function
|
|
3281
|
+
function jl(e, t = []) {
|
|
3273
3282
|
const n = new Set(t), r = [], o = [];
|
|
3274
|
-
for (const
|
|
3275
|
-
const
|
|
3276
|
-
n.has(
|
|
3283
|
+
for (const i of e) {
|
|
3284
|
+
const s = ei(i);
|
|
3285
|
+
n.has(s) || (n.add(s), r.push(i), o.push(s));
|
|
3277
3286
|
}
|
|
3278
3287
|
return { sources: r, keys: o };
|
|
3279
3288
|
}
|
|
3280
|
-
const
|
|
3281
|
-
function
|
|
3289
|
+
const Hl = "assist-source", Gl = ["blocking", "due", "open"];
|
|
3290
|
+
function Wl(e, t) {
|
|
3282
3291
|
const [n, r] = (e.subjectKey ?? "").split(":");
|
|
3283
3292
|
return n === t && r ? r : void 0;
|
|
3284
3293
|
}
|
|
3285
3294
|
const ct = { blocking: 0, due: 1, open: 2 };
|
|
3286
|
-
function
|
|
3295
|
+
function Vl(e, t) {
|
|
3287
3296
|
return ct[e.band ?? "open"] - ct[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
|
|
3288
3297
|
}
|
|
3289
|
-
function
|
|
3298
|
+
function zl(e) {
|
|
3290
3299
|
return e.sessions.filter(
|
|
3291
3300
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
|
|
3292
3301
|
);
|
|
3293
3302
|
}
|
|
3294
|
-
function
|
|
3303
|
+
function Xl(e) {
|
|
3295
3304
|
return e.sessions.filter(
|
|
3296
3305
|
(t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
|
|
3297
3306
|
);
|
|
3298
3307
|
}
|
|
3299
|
-
function
|
|
3308
|
+
function Yl(e) {
|
|
3300
3309
|
return e.sessions.some(
|
|
3301
3310
|
(n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
|
|
3302
3311
|
) ? { admit: !1, reason: "busy" } : { admit: !0 };
|
|
3303
3312
|
}
|
|
3304
|
-
function
|
|
3305
|
-
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((
|
|
3313
|
+
function ti(e, t) {
|
|
3314
|
+
const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => ri(s, r[s.intent]));
|
|
3306
3315
|
if (!e.extraIntents || e.extraIntents.length === 0) return o;
|
|
3307
|
-
const
|
|
3308
|
-
for (const
|
|
3309
|
-
|
|
3316
|
+
const i = new Set(o.map((s) => s.intent));
|
|
3317
|
+
for (const s of e.extraIntents)
|
|
3318
|
+
i.has(s.intent) || (o.push(s), i.add(s.intent));
|
|
3310
3319
|
return o;
|
|
3311
3320
|
}
|
|
3312
|
-
function
|
|
3321
|
+
function ni(e, t) {
|
|
3313
3322
|
const n = {};
|
|
3314
3323
|
for (const r of e.intents) {
|
|
3315
3324
|
if (!r.togglable) continue;
|
|
@@ -3318,46 +3327,46 @@ function ts(e, t) {
|
|
|
3318
3327
|
}
|
|
3319
3328
|
return n;
|
|
3320
3329
|
}
|
|
3321
|
-
function
|
|
3322
|
-
const n =
|
|
3330
|
+
function ql(e, t) {
|
|
3331
|
+
const n = ni(e, t);
|
|
3323
3332
|
return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
|
|
3324
3333
|
}
|
|
3325
|
-
function
|
|
3334
|
+
function ri(e, t) {
|
|
3326
3335
|
return t ? {
|
|
3327
3336
|
intent: t.intent ?? e.intent,
|
|
3328
3337
|
targetSchemes: t.targetSchemes ?? e.targetSchemes,
|
|
3329
3338
|
transport: t.transport ?? e.transport
|
|
3330
3339
|
} : e;
|
|
3331
3340
|
}
|
|
3332
|
-
function
|
|
3341
|
+
function Ql(e, t) {
|
|
3333
3342
|
const n = [];
|
|
3334
3343
|
for (const r of e) {
|
|
3335
3344
|
if (!r.enabled) continue;
|
|
3336
3345
|
const o = t[r.providerId];
|
|
3337
3346
|
if (o)
|
|
3338
|
-
for (const
|
|
3339
|
-
n.push({ channel: r, description: o, capability:
|
|
3347
|
+
for (const i of ti(r, o))
|
|
3348
|
+
n.push({ channel: r, description: o, capability: i });
|
|
3340
3349
|
}
|
|
3341
3350
|
return n;
|
|
3342
3351
|
}
|
|
3343
|
-
function
|
|
3352
|
+
function Zl(e, t) {
|
|
3344
3353
|
return t.filter((n) => n.capability.intent === e);
|
|
3345
3354
|
}
|
|
3346
|
-
function
|
|
3355
|
+
function oi(e, t) {
|
|
3347
3356
|
return t.filter((n) => n.capability.targetSchemes.includes(e));
|
|
3348
3357
|
}
|
|
3349
|
-
function
|
|
3350
|
-
return
|
|
3358
|
+
function Jl(e, t) {
|
|
3359
|
+
return oi(e.scheme, t);
|
|
3351
3360
|
}
|
|
3352
|
-
function
|
|
3361
|
+
function eu(e, t, n) {
|
|
3353
3362
|
const r = [];
|
|
3354
3363
|
for (const o of e)
|
|
3355
|
-
for (const
|
|
3356
|
-
|
|
3364
|
+
for (const i of n)
|
|
3365
|
+
i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
|
|
3357
3366
|
return r;
|
|
3358
3367
|
}
|
|
3359
|
-
var
|
|
3360
|
-
const
|
|
3368
|
+
var ii = /* @__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))(ii || {});
|
|
3369
|
+
const si = {
|
|
3361
3370
|
mailto: "mail",
|
|
3362
3371
|
sip: "tel",
|
|
3363
3372
|
tel: "tel",
|
|
@@ -3378,10 +3387,10 @@ const ss = {
|
|
|
3378
3387
|
id: "note",
|
|
3379
3388
|
custom: "note"
|
|
3380
3389
|
};
|
|
3381
|
-
function
|
|
3382
|
-
return e ?
|
|
3390
|
+
function tu(e) {
|
|
3391
|
+
return e ? si[e] ?? "note" : "note";
|
|
3383
3392
|
}
|
|
3384
|
-
const
|
|
3393
|
+
const nu = "message_window", ru = "message_templates", ou = {
|
|
3385
3394
|
// E-mail
|
|
3386
3395
|
FROM: "from",
|
|
3387
3396
|
TO: "to",
|
|
@@ -3398,27 +3407,27 @@ const tu = "message_window", nu = "message_templates", ru = {
|
|
|
3398
3407
|
// Voice/conference
|
|
3399
3408
|
HOST: "host",
|
|
3400
3409
|
PARTICIPANT: "participant"
|
|
3401
|
-
},
|
|
3410
|
+
}, iu = (e, t) => ({ intent: e, ...t }), su = "folder_management", au = "remote_search", cu = "message_reactions", lu = {
|
|
3402
3411
|
ok: !1,
|
|
3403
3412
|
code: "UNSUPPORTED",
|
|
3404
3413
|
message: "Provider does not support this op"
|
|
3405
|
-
},
|
|
3406
|
-
function b(e, t, n, r, o,
|
|
3414
|
+
}, uu = "connector", du = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), Q = (e) => ({ type: "boolean", description: e }), v = A("Sheet name. Omit for the sheet the user is looking at."), lt = A("Slide id, as `inspect` reports it.");
|
|
3415
|
+
function b(e, t, n, r, o, i) {
|
|
3407
3416
|
return {
|
|
3408
3417
|
op: e,
|
|
3409
3418
|
kinds: t,
|
|
3410
3419
|
summary: n,
|
|
3411
3420
|
parameters: { type: "object", properties: r, required: o },
|
|
3412
|
-
undoable:
|
|
3413
|
-
visible:
|
|
3421
|
+
undoable: i.undoable,
|
|
3422
|
+
visible: i.visible
|
|
3414
3423
|
};
|
|
3415
3424
|
}
|
|
3416
|
-
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 },
|
|
3425
|
+
const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut = { undoable: !1, visible: !0 }, ee = { undoable: !1, visible: !1 }, ai = [
|
|
3417
3426
|
b(
|
|
3418
3427
|
"pdf.goToPage",
|
|
3419
3428
|
["pdf"],
|
|
3420
3429
|
"Scroll the viewer to a page.",
|
|
3421
|
-
{ page:
|
|
3430
|
+
{ page: _("1-based page number.") },
|
|
3422
3431
|
["page"],
|
|
3423
3432
|
B
|
|
3424
3433
|
),
|
|
@@ -3426,7 +3435,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3426
3435
|
"pdf.search",
|
|
3427
3436
|
["pdf"],
|
|
3428
3437
|
"Search the document and highlight the matches, as the find bar does.",
|
|
3429
|
-
{ query:
|
|
3438
|
+
{ query: A("Text to find."), next: Q("Jump to the next match instead of the first.") },
|
|
3430
3439
|
["query"],
|
|
3431
3440
|
B
|
|
3432
3441
|
),
|
|
@@ -3449,7 +3458,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3449
3458
|
["pdf"],
|
|
3450
3459
|
"Fill one form field of a fillable PDF.",
|
|
3451
3460
|
{
|
|
3452
|
-
field:
|
|
3461
|
+
field: A("Field name, exactly as `inspect` reports it under `fields`."),
|
|
3453
3462
|
value: {
|
|
3454
3463
|
type: ["string", "boolean"],
|
|
3455
3464
|
description: "Text for a text field, true/false for a checkbox or radio."
|
|
@@ -3485,13 +3494,13 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3485
3494
|
["pdf"],
|
|
3486
3495
|
"Place a text note on a page. Written on save; not visible before that.",
|
|
3487
3496
|
{
|
|
3488
|
-
page:
|
|
3489
|
-
text:
|
|
3490
|
-
left:
|
|
3491
|
-
top:
|
|
3492
|
-
width:
|
|
3493
|
-
height:
|
|
3494
|
-
fontSize:
|
|
3497
|
+
page: _("1-based page number."),
|
|
3498
|
+
text: A("The note's text."),
|
|
3499
|
+
left: _("Distance from the left edge, in PDF points (72 per inch)."),
|
|
3500
|
+
top: _("Distance from the top edge, in PDF points."),
|
|
3501
|
+
width: _("Box width in points. Omit for a sensible default."),
|
|
3502
|
+
height: _("Box height in points. Omit for a sensible default."),
|
|
3503
|
+
fontSize: _("Font size in points. Omit for 12.")
|
|
3495
3504
|
},
|
|
3496
3505
|
["page", "text", "left", "top"],
|
|
3497
3506
|
ee
|
|
@@ -3501,21 +3510,21 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3501
3510
|
["pdf"],
|
|
3502
3511
|
"Highlight a phrase on a page. Written on save; not visible before that.",
|
|
3503
3512
|
{
|
|
3504
|
-
page:
|
|
3505
|
-
text:
|
|
3506
|
-
occurrence:
|
|
3513
|
+
page: _("1-based page number."),
|
|
3514
|
+
text: A("The exact phrase to highlight, as it appears in the page's text."),
|
|
3515
|
+
occurrence: _("Which occurrence on that page, 1-based. Omit for the first.")
|
|
3507
3516
|
},
|
|
3508
3517
|
["page", "text"],
|
|
3509
3518
|
ee
|
|
3510
3519
|
)
|
|
3511
|
-
],
|
|
3520
|
+
], ci = [
|
|
3512
3521
|
b(
|
|
3513
3522
|
"sheet.setValues",
|
|
3514
3523
|
["sheet"],
|
|
3515
3524
|
"Write a block of values. The block's shape must match the range.",
|
|
3516
3525
|
{
|
|
3517
3526
|
sheet: v,
|
|
3518
|
-
range:
|
|
3527
|
+
range: A("A1 notation, e.g. `B2:D5` or a single `A1`."),
|
|
3519
3528
|
values: {
|
|
3520
3529
|
type: "array",
|
|
3521
3530
|
items: { type: "array", items: { type: ["string", "number", "boolean", "null"] } },
|
|
@@ -3529,7 +3538,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3529
3538
|
"sheet.setFormula",
|
|
3530
3539
|
["sheet"],
|
|
3531
3540
|
"Put a formula in every cell of a range.",
|
|
3532
|
-
{ sheet: v, range:
|
|
3541
|
+
{ sheet: v, range: A("A1 notation."), formula: A("Including the leading `=`.") },
|
|
3533
3542
|
["range", "formula"],
|
|
3534
3543
|
I
|
|
3535
3544
|
),
|
|
@@ -3539,18 +3548,18 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3539
3548
|
"Change the look of a range. Only the properties you pass are touched.",
|
|
3540
3549
|
{
|
|
3541
3550
|
sheet: v,
|
|
3542
|
-
range:
|
|
3551
|
+
range: A("A1 notation."),
|
|
3543
3552
|
bold: Q("Bold on or off."),
|
|
3544
3553
|
italic: Q("Italic on or off."),
|
|
3545
|
-
fontSize:
|
|
3546
|
-
fontColor:
|
|
3547
|
-
background:
|
|
3554
|
+
fontSize: _("Point size."),
|
|
3555
|
+
fontColor: A("CSS colour, e.g. `#b91c1c`."),
|
|
3556
|
+
background: A("CSS colour for the cell fill."),
|
|
3548
3557
|
horizontalAlignment: {
|
|
3549
3558
|
type: "string",
|
|
3550
3559
|
enum: ["left", "center", "right"],
|
|
3551
3560
|
description: "Horizontal alignment."
|
|
3552
3561
|
},
|
|
3553
|
-
numberFormat:
|
|
3562
|
+
numberFormat: A("Number format pattern, e.g. `#,##0.00` or `0%`.")
|
|
3554
3563
|
},
|
|
3555
3564
|
["range"],
|
|
3556
3565
|
I
|
|
@@ -3561,8 +3570,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3561
3570
|
"Insert empty rows, pushing the rest down.",
|
|
3562
3571
|
{
|
|
3563
3572
|
sheet: v,
|
|
3564
|
-
at:
|
|
3565
|
-
count:
|
|
3573
|
+
at: _("1-based row number to insert before."),
|
|
3574
|
+
count: _("How many. Omit for 1.")
|
|
3566
3575
|
},
|
|
3567
3576
|
["at"],
|
|
3568
3577
|
I
|
|
@@ -3571,7 +3580,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3571
3580
|
"sheet.deleteRows",
|
|
3572
3581
|
["sheet"],
|
|
3573
3582
|
"Delete rows, pulling the rest up.",
|
|
3574
|
-
{ sheet: v, at:
|
|
3583
|
+
{ sheet: v, at: _("1-based first row to delete."), count: _("How many. Omit for 1.") },
|
|
3575
3584
|
["at"],
|
|
3576
3585
|
I
|
|
3577
3586
|
),
|
|
@@ -3581,8 +3590,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3581
3590
|
"Insert empty columns, pushing the rest right.",
|
|
3582
3591
|
{
|
|
3583
3592
|
sheet: v,
|
|
3584
|
-
at:
|
|
3585
|
-
count:
|
|
3593
|
+
at: _("1-based column number to insert before."),
|
|
3594
|
+
count: _("How many. Omit for 1.")
|
|
3586
3595
|
},
|
|
3587
3596
|
["at"],
|
|
3588
3597
|
I
|
|
@@ -3593,8 +3602,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3593
3602
|
"Delete columns, pulling the rest left.",
|
|
3594
3603
|
{
|
|
3595
3604
|
sheet: v,
|
|
3596
|
-
at:
|
|
3597
|
-
count:
|
|
3605
|
+
at: _("1-based first column to delete."),
|
|
3606
|
+
count: _("How many. Omit for 1.")
|
|
3598
3607
|
},
|
|
3599
3608
|
["at"],
|
|
3600
3609
|
I
|
|
@@ -3603,7 +3612,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3603
3612
|
"sheet.merge",
|
|
3604
3613
|
["sheet"],
|
|
3605
3614
|
"Merge a range into one cell.",
|
|
3606
|
-
{ sheet: v, range:
|
|
3615
|
+
{ sheet: v, range: A("A1 notation.") },
|
|
3607
3616
|
["range"],
|
|
3608
3617
|
I
|
|
3609
3618
|
),
|
|
@@ -3611,7 +3620,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3611
3620
|
"sheet.unmerge",
|
|
3612
3621
|
["sheet"],
|
|
3613
3622
|
"Break merged cells in a range apart.",
|
|
3614
|
-
{ sheet: v, range:
|
|
3623
|
+
{ sheet: v, range: A("A1 notation.") },
|
|
3615
3624
|
["range"],
|
|
3616
3625
|
I
|
|
3617
3626
|
),
|
|
@@ -3621,8 +3630,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3621
3630
|
"Sort a range on one of its columns.",
|
|
3622
3631
|
{
|
|
3623
3632
|
sheet: v,
|
|
3624
|
-
range:
|
|
3625
|
-
column:
|
|
3633
|
+
range: A("A1 notation covering the rows to sort, header excluded."),
|
|
3634
|
+
column: _("1-based column *within the range*, not within the sheet."),
|
|
3626
3635
|
ascending: Q("Ascending. Omit for ascending.")
|
|
3627
3636
|
},
|
|
3628
3637
|
["range", "column"],
|
|
@@ -3632,7 +3641,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3632
3641
|
"sheet.insertSheet",
|
|
3633
3642
|
["sheet"],
|
|
3634
3643
|
"Add a new sheet.",
|
|
3635
|
-
{ name:
|
|
3644
|
+
{ name: A("Name for the new sheet.") },
|
|
3636
3645
|
["name"],
|
|
3637
3646
|
I
|
|
3638
3647
|
),
|
|
@@ -3640,7 +3649,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3640
3649
|
"sheet.renameSheet",
|
|
3641
3650
|
["sheet"],
|
|
3642
3651
|
"Rename a sheet.",
|
|
3643
|
-
{ sheet:
|
|
3652
|
+
{ sheet: A("Current name."), name: A("New name.") },
|
|
3644
3653
|
["sheet", "name"],
|
|
3645
3654
|
I
|
|
3646
3655
|
),
|
|
@@ -3648,7 +3657,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3648
3657
|
"sheet.deleteSheet",
|
|
3649
3658
|
["sheet"],
|
|
3650
3659
|
"Remove a sheet and everything on it.",
|
|
3651
|
-
{ sheet:
|
|
3660
|
+
{ sheet: A("Name of the sheet to delete.") },
|
|
3652
3661
|
["sheet"],
|
|
3653
3662
|
I
|
|
3654
3663
|
),
|
|
@@ -3656,18 +3665,18 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3656
3665
|
"sheet.activate",
|
|
3657
3666
|
["sheet"],
|
|
3658
3667
|
"Show the user a sheet and select a range on it.",
|
|
3659
|
-
{ sheet: v, range:
|
|
3668
|
+
{ sheet: v, range: A("A1 notation to select. Omit to only switch sheets.") },
|
|
3660
3669
|
[],
|
|
3661
3670
|
B
|
|
3662
3671
|
)
|
|
3663
|
-
],
|
|
3672
|
+
], li = [
|
|
3664
3673
|
b(
|
|
3665
3674
|
"word.replaceParagraph",
|
|
3666
3675
|
["word"],
|
|
3667
3676
|
"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",
|
|
3668
3677
|
{
|
|
3669
|
-
at:
|
|
3670
|
-
text:
|
|
3678
|
+
at: _("The offset the paragraph starts at, exactly as `inspect` prints it."),
|
|
3679
|
+
text: A("The new text for that paragraph. A newline starts a further paragraph.")
|
|
3671
3680
|
},
|
|
3672
3681
|
["at", "text"],
|
|
3673
3682
|
I
|
|
@@ -3677,9 +3686,9 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3677
3686
|
["word"],
|
|
3678
3687
|
"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",
|
|
3679
3688
|
{
|
|
3680
|
-
start:
|
|
3681
|
-
end:
|
|
3682
|
-
text:
|
|
3689
|
+
start: _("Character offset where the replaced text starts, as `inspect` reports offsets."),
|
|
3690
|
+
end: _("Character offset just past the last character to replace."),
|
|
3691
|
+
text: A("The replacement text. A newline starts a new paragraph.")
|
|
3683
3692
|
},
|
|
3684
3693
|
["start", "end", "text"],
|
|
3685
3694
|
I
|
|
@@ -3689,8 +3698,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3689
3698
|
["word"],
|
|
3690
3699
|
"Insert text at a character offset, without removing anything.",
|
|
3691
3700
|
{
|
|
3692
|
-
index:
|
|
3693
|
-
text:
|
|
3701
|
+
index: _("Character offset, as `inspect` reports offsets."),
|
|
3702
|
+
text: A("The text to insert.")
|
|
3694
3703
|
},
|
|
3695
3704
|
["index", "text"],
|
|
3696
3705
|
I
|
|
@@ -3699,7 +3708,7 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3699
3708
|
"word.appendText",
|
|
3700
3709
|
["word"],
|
|
3701
3710
|
"Add text at the end of the document.",
|
|
3702
|
-
{ text:
|
|
3711
|
+
{ text: A("The text to append.") },
|
|
3703
3712
|
["text"],
|
|
3704
3713
|
I
|
|
3705
3714
|
),
|
|
@@ -3708,8 +3717,8 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3708
3717
|
["word"],
|
|
3709
3718
|
"Start a new paragraph, optionally with text in it.",
|
|
3710
3719
|
{
|
|
3711
|
-
text:
|
|
3712
|
-
index:
|
|
3720
|
+
text: A("Paragraph text. Newlines start further paragraphs."),
|
|
3721
|
+
index: _("Character offset to insert at. Omit for the end of the document.")
|
|
3713
3722
|
},
|
|
3714
3723
|
[],
|
|
3715
3724
|
I
|
|
@@ -3718,19 +3727,19 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3718
3727
|
"word.setSelection",
|
|
3719
3728
|
["word"],
|
|
3720
3729
|
"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",
|
|
3721
|
-
{ start:
|
|
3730
|
+
{ start: _("Start character offset."), end: _("End character offset. Omit for a caret.") },
|
|
3722
3731
|
["start"],
|
|
3723
3732
|
B
|
|
3724
3733
|
)
|
|
3725
|
-
],
|
|
3734
|
+
], ui = [
|
|
3726
3735
|
b(
|
|
3727
3736
|
"slides.setText",
|
|
3728
3737
|
["slides"],
|
|
3729
3738
|
"Replace the text of one shape. Written on save; not visible before that, and not undoable.",
|
|
3730
3739
|
{
|
|
3731
3740
|
slide: lt,
|
|
3732
|
-
element:
|
|
3733
|
-
text:
|
|
3741
|
+
element: A("Element id, as `inspect` reports it."),
|
|
3742
|
+
text: A("The new text.")
|
|
3734
3743
|
},
|
|
3735
3744
|
["slide", "element", "text"],
|
|
3736
3745
|
ee
|
|
@@ -3741,63 +3750,63 @@ const B = { undoable: !1, visible: !0 }, I = { undoable: !0, visible: !0 }, ut =
|
|
|
3741
3750
|
"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
|
|
3742
3751
|
{
|
|
3743
3752
|
slide: lt,
|
|
3744
|
-
element:
|
|
3745
|
-
left:
|
|
3746
|
-
top:
|
|
3747
|
-
width:
|
|
3748
|
-
height:
|
|
3753
|
+
element: A("Element id."),
|
|
3754
|
+
left: _("Distance from the left edge, in pixels."),
|
|
3755
|
+
top: _("Distance from the top edge, in pixels."),
|
|
3756
|
+
width: _("Width in pixels."),
|
|
3757
|
+
height: _("Height in pixels.")
|
|
3749
3758
|
},
|
|
3750
3759
|
["slide", "element"],
|
|
3751
3760
|
ee
|
|
3752
3761
|
)
|
|
3753
3762
|
], Qt = [
|
|
3754
|
-
...
|
|
3755
|
-
...
|
|
3756
|
-
...
|
|
3757
|
-
...
|
|
3763
|
+
...ai,
|
|
3764
|
+
...ci,
|
|
3765
|
+
...li,
|
|
3766
|
+
...ui
|
|
3758
3767
|
];
|
|
3759
|
-
function
|
|
3768
|
+
function pu(e) {
|
|
3760
3769
|
return Qt.filter((t) => t.kinds.includes(e));
|
|
3761
3770
|
}
|
|
3762
|
-
function
|
|
3771
|
+
function fu(e) {
|
|
3763
3772
|
return Qt.find((t) => t.op === e);
|
|
3764
3773
|
}
|
|
3765
|
-
const dt = /(?: {2,}|\\)$/,
|
|
3774
|
+
const dt = /(?: {2,}|\\)$/, di = /^\*\*([^*]+)\*\*\s+(.*)$/;
|
|
3766
3775
|
function pt(e) {
|
|
3767
|
-
const t =
|
|
3776
|
+
const t = di.exec(e);
|
|
3768
3777
|
return t ? { lead: t[1], text: t[2] } : { text: e };
|
|
3769
3778
|
}
|
|
3770
|
-
function
|
|
3779
|
+
function mu(e) {
|
|
3771
3780
|
const t = (e ?? "").replace(/\r\n/g, `
|
|
3772
3781
|
`).split(`
|
|
3773
3782
|
`), n = [];
|
|
3774
3783
|
let r = null;
|
|
3775
3784
|
const o = () => {
|
|
3776
3785
|
r && n.push({ type: "list", style: r.style, items: r.items }), r = null;
|
|
3777
|
-
},
|
|
3786
|
+
}, i = (p, f) => {
|
|
3778
3787
|
r && r.style !== p && o(), r ? r.items.push(pt(f)) : r = { style: p, items: [pt(f)] };
|
|
3779
3788
|
};
|
|
3780
|
-
let
|
|
3781
|
-
const
|
|
3782
|
-
if (
|
|
3783
|
-
const p =
|
|
3784
|
-
p && n.push({ type: "paragraph", text: p }),
|
|
3789
|
+
let s = [], a = [];
|
|
3790
|
+
const u = () => {
|
|
3791
|
+
if (s.length) {
|
|
3792
|
+
const p = s.join("").trim();
|
|
3793
|
+
p && n.push({ type: "paragraph", text: p }), s = [];
|
|
3785
3794
|
}
|
|
3786
3795
|
}, l = () => {
|
|
3787
3796
|
a.length && (n.push({ type: "quote", text: a.join(`
|
|
3788
3797
|
`) }), a = []);
|
|
3789
3798
|
}, d = () => {
|
|
3790
|
-
|
|
3799
|
+
u(), l(), o();
|
|
3791
3800
|
};
|
|
3792
|
-
let
|
|
3793
|
-
for (;
|
|
3794
|
-
const p = t[
|
|
3801
|
+
let c = 0;
|
|
3802
|
+
for (; c < t.length; ) {
|
|
3803
|
+
const p = t[c] ?? "", f = p.match(/^```(\w*)\s*$/);
|
|
3795
3804
|
if (f) {
|
|
3796
3805
|
d();
|
|
3797
3806
|
const g = [];
|
|
3798
|
-
for (
|
|
3799
|
-
g.push(t[
|
|
3800
|
-
|
|
3807
|
+
for (c++; c < t.length && !/^```\s*$/.test(t[c] ?? ""); )
|
|
3808
|
+
g.push(t[c] ?? ""), c++;
|
|
3809
|
+
c++, n.push({ type: "code", ...f[1] ? { lang: f[1] } : {}, text: g.join(`
|
|
3801
3810
|
`) });
|
|
3802
3811
|
continue;
|
|
3803
3812
|
}
|
|
@@ -3807,7 +3816,7 @@ function fu(e) {
|
|
|
3807
3816
|
type: "heading",
|
|
3808
3817
|
level: y[1].length,
|
|
3809
3818
|
text: y[2].trim()
|
|
3810
|
-
}),
|
|
3819
|
+
}), c++;
|
|
3811
3820
|
continue;
|
|
3812
3821
|
}
|
|
3813
3822
|
const m = p.match(/^!\[([^\]]*)\]\(([^)\s]+)\)\s*$/);
|
|
@@ -3816,57 +3825,57 @@ function fu(e) {
|
|
|
3816
3825
|
type: "image",
|
|
3817
3826
|
url: m[2],
|
|
3818
3827
|
...m[1] ? { alt: m[1] } : {}
|
|
3819
|
-
}),
|
|
3828
|
+
}), c++;
|
|
3820
3829
|
continue;
|
|
3821
3830
|
}
|
|
3822
3831
|
if (/^\s*[-*]\s+/.test(p)) {
|
|
3823
|
-
|
|
3832
|
+
u(), l(), i("bulleted", p.replace(/^\s*[-*]\s+/, "")), c++;
|
|
3824
3833
|
continue;
|
|
3825
3834
|
}
|
|
3826
3835
|
if (/^\s*\d+\.\s+/.test(p)) {
|
|
3827
|
-
|
|
3836
|
+
u(), l(), i("numbered", p.replace(/^\s*\d+\.\s+/, "")), c++;
|
|
3828
3837
|
continue;
|
|
3829
3838
|
}
|
|
3830
3839
|
if (/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(p)) {
|
|
3831
|
-
d(), n.push({ type: "divider" }),
|
|
3840
|
+
d(), n.push({ type: "divider" }), c++;
|
|
3832
3841
|
continue;
|
|
3833
3842
|
}
|
|
3834
3843
|
if (/^>\s?/.test(p)) {
|
|
3835
|
-
|
|
3844
|
+
u(), o(), a.push(p.replace(/^>\s?/, "")), c++;
|
|
3836
3845
|
continue;
|
|
3837
3846
|
}
|
|
3838
3847
|
if (p.trim() === "") {
|
|
3839
|
-
d(),
|
|
3848
|
+
d(), c++;
|
|
3840
3849
|
continue;
|
|
3841
3850
|
}
|
|
3842
3851
|
l(), o();
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3845
|
-
` : " ")),
|
|
3852
|
+
const E = dt.test(p);
|
|
3853
|
+
s.push(p.replace(dt, "").trim() + (E ? `
|
|
3854
|
+
` : " ")), c++;
|
|
3846
3855
|
}
|
|
3847
3856
|
return d(), n;
|
|
3848
3857
|
}
|
|
3849
|
-
function
|
|
3858
|
+
function hu(e, t) {
|
|
3850
3859
|
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, `
|
|
3851
3860
|
|
|
3852
3861
|
`).trim();
|
|
3853
3862
|
}
|
|
3854
|
-
const
|
|
3855
|
-
function
|
|
3863
|
+
const gu = "documents.describe", yu = "documents.inspect", bu = "documents.apply";
|
|
3864
|
+
function _u(e) {
|
|
3856
3865
|
const t = e.indexOf(":");
|
|
3857
3866
|
if (t !== -1) return e.slice(0, t);
|
|
3858
3867
|
const n = e.indexOf(".");
|
|
3859
3868
|
return n === -1 ? e : e.slice(0, n);
|
|
3860
3869
|
}
|
|
3861
3870
|
const Au = "installation-id";
|
|
3862
|
-
function
|
|
3871
|
+
function Su(e) {
|
|
3863
3872
|
const t = [];
|
|
3864
3873
|
for (const n of Object.keys(e))
|
|
3865
3874
|
for (const r of Object.keys(e[n]))
|
|
3866
3875
|
t.push({ lang: n, key: r, value: e[n][r] });
|
|
3867
3876
|
return t;
|
|
3868
3877
|
}
|
|
3869
|
-
const Eu = "notification-source",
|
|
3878
|
+
const Eu = "notification-source", Iu = (e, t) => `${e}.pref.${t}`, Tu = {
|
|
3870
3879
|
ai: [
|
|
3871
3880
|
"account.read",
|
|
3872
3881
|
"account.write",
|
|
@@ -4001,96 +4010,96 @@ const Eu = "notification-source", Su = (e, t) => `${e}.pref.${t}`, Iu = {
|
|
|
4001
4010
|
time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
|
|
4002
4011
|
user: ["user.read", "user.write"],
|
|
4003
4012
|
work: ["item.read", "item.write", "project.read", "project.write"]
|
|
4004
|
-
}, Zt = 9e4,
|
|
4005
|
-
function
|
|
4013
|
+
}, Zt = 9e4, pi = ["out_of_office"], Jt = (e) => pi.includes(e);
|
|
4014
|
+
function wu(e, t, n) {
|
|
4006
4015
|
const r = n - e < Zt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
|
|
4007
4016
|
if (!o?.status) return { online: r, status: r ? "available" : "offline" };
|
|
4008
|
-
const
|
|
4009
|
-
return !r && !Jt(
|
|
4017
|
+
const i = o.status;
|
|
4018
|
+
return !r && !Jt(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
|
|
4010
4019
|
}
|
|
4011
|
-
function
|
|
4020
|
+
function ku(e, t) {
|
|
4012
4021
|
const n = t - e.lastSeenAt < Zt, r = n || Jt(e.status) ? e.status : "offline";
|
|
4013
4022
|
return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
|
|
4014
4023
|
}
|
|
4015
|
-
function
|
|
4024
|
+
function Mu(e, t) {
|
|
4016
4025
|
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 };
|
|
4017
4026
|
}
|
|
4018
|
-
function
|
|
4027
|
+
function vu(e) {
|
|
4019
4028
|
return e.providerAvailable && e.allowed;
|
|
4020
4029
|
}
|
|
4021
|
-
const
|
|
4022
|
-
function
|
|
4030
|
+
const Cu = "resources.describe", Ou = "resources.search", xu = "resources.resolve", Nu = "resources.attached";
|
|
4031
|
+
function Ru(e) {
|
|
4023
4032
|
const t = e.indexOf(":");
|
|
4024
4033
|
return t === -1 ? e : e.slice(0, t);
|
|
4025
4034
|
}
|
|
4026
|
-
const
|
|
4035
|
+
const Du = "/provider/scope/related", $u = "/provider/scope/read", en = "auth";
|
|
4027
4036
|
function tn(e) {
|
|
4028
4037
|
const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
|
|
4029
4038
|
return t ? t[1] : null;
|
|
4030
4039
|
}
|
|
4031
|
-
function
|
|
4040
|
+
function Lu(e) {
|
|
4032
4041
|
const t = tn(e);
|
|
4033
4042
|
return t ? t !== en : typeof e == "string" && e.startsWith("/wake");
|
|
4034
4043
|
}
|
|
4035
|
-
function
|
|
4044
|
+
function Pu(e) {
|
|
4036
4045
|
return typeof e != "string" || e === "" || e === "/" ? !0 : tn(e) === en;
|
|
4037
4046
|
}
|
|
4038
|
-
function
|
|
4047
|
+
function fi(e) {
|
|
4039
4048
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4040
4049
|
}
|
|
4041
|
-
function
|
|
4042
|
-
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${
|
|
4050
|
+
function mi(e) {
|
|
4051
|
+
const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${fi(r)}`).join("");
|
|
4043
4052
|
return new RegExp(`^${n}\\/?$`);
|
|
4044
4053
|
}
|
|
4045
|
-
function
|
|
4054
|
+
function hi(e, t) {
|
|
4046
4055
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
|
|
4047
|
-
return n.forEach((
|
|
4048
|
-
if (
|
|
4049
|
-
const a =
|
|
4050
|
-
|
|
4056
|
+
return n.forEach((i, s) => {
|
|
4057
|
+
if (i.startsWith(":")) {
|
|
4058
|
+
const a = i.endsWith("?") ? i.slice(1, -1) : i.slice(1), u = r[s];
|
|
4059
|
+
u && (o[a] = u);
|
|
4051
4060
|
}
|
|
4052
4061
|
}), o;
|
|
4053
4062
|
}
|
|
4054
|
-
function
|
|
4063
|
+
function gi(e) {
|
|
4055
4064
|
return e.publicBasePath ?? `/apps/${e.name}`;
|
|
4056
4065
|
}
|
|
4057
|
-
function
|
|
4066
|
+
function Ku(e) {
|
|
4058
4067
|
const t = [];
|
|
4059
4068
|
for (const n of e) {
|
|
4060
4069
|
if (!n?.name) continue;
|
|
4061
|
-
const r =
|
|
4070
|
+
const r = gi(n);
|
|
4062
4071
|
for (const o of n.routes ?? []) {
|
|
4063
4072
|
if (!o.public) continue;
|
|
4064
|
-
const
|
|
4073
|
+
const i = o.path === "/" ? "" : o.path;
|
|
4065
4074
|
t.push({
|
|
4066
4075
|
appName: n.name,
|
|
4067
4076
|
resource: o.resource,
|
|
4068
|
-
pattern: `${r}${
|
|
4077
|
+
pattern: `${r}${i}`,
|
|
4069
4078
|
props: o.props
|
|
4070
4079
|
});
|
|
4071
4080
|
}
|
|
4072
4081
|
}
|
|
4073
4082
|
return t;
|
|
4074
4083
|
}
|
|
4075
|
-
function
|
|
4084
|
+
function yi(e, t) {
|
|
4076
4085
|
const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
|
|
4077
4086
|
for (let o = 0; o < Math.min(n.length, r.length); o++) {
|
|
4078
|
-
const
|
|
4079
|
-
if (
|
|
4087
|
+
const i = n[o].startsWith(":"), s = r[o].startsWith(":");
|
|
4088
|
+
if (i !== s) return s;
|
|
4080
4089
|
}
|
|
4081
4090
|
return n.length > r.length;
|
|
4082
4091
|
}
|
|
4083
|
-
function
|
|
4092
|
+
function bi(e, t) {
|
|
4084
4093
|
if (typeof e != "string") return null;
|
|
4085
4094
|
let n = null;
|
|
4086
4095
|
for (const r of t)
|
|
4087
|
-
|
|
4088
|
-
return n ? { ...n, params: { ...n.props, ...
|
|
4096
|
+
mi(r.pattern).test(e) && (!n || yi(r.pattern, n.pattern)) && (n = r);
|
|
4097
|
+
return n ? { ...n, params: { ...n.props, ...hi(n.pattern, e) } } : null;
|
|
4089
4098
|
}
|
|
4090
|
-
function
|
|
4091
|
-
return
|
|
4099
|
+
function Uu(e, t) {
|
|
4100
|
+
return bi(e, t) !== null;
|
|
4092
4101
|
}
|
|
4093
|
-
const
|
|
4102
|
+
const Fu = 10 * 1024 * 1024, Bu = 25 * 1024 * 1024, ju = "sync-target", Hu = 20, _i = {
|
|
4094
4103
|
afrikaans: [
|
|
4095
4104
|
"[Muziek]",
|
|
4096
4105
|
"(C) TV GELDERLAND 2021",
|
|
@@ -4240,14 +4249,14 @@ const Uu = 10 * 1024 * 1024, Fu = 25 * 1024 * 1024, Bu = "sync-target", ju = 20,
|
|
|
4240
4249
|
"[MÚSICA]",
|
|
4241
4250
|
"[Music cuts in British]"
|
|
4242
4251
|
]
|
|
4243
|
-
},
|
|
4252
|
+
}, Ai = (e) => {
|
|
4244
4253
|
let t = e;
|
|
4245
|
-
return Object.values(
|
|
4254
|
+
return Object.values(_i).forEach((n) => {
|
|
4246
4255
|
n.forEach((r) => {
|
|
4247
4256
|
t = t.replaceAll(r, "");
|
|
4248
4257
|
});
|
|
4249
4258
|
}), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
|
|
4250
|
-
},
|
|
4259
|
+
}, Si = 6e4, Ei = 8e3, Ii = 2, Ti = 0.4, wi = 3, ki = /* @__PURE__ */ new Set([
|
|
4251
4260
|
"aan",
|
|
4252
4261
|
"als",
|
|
4253
4262
|
"ben",
|
|
@@ -4360,52 +4369,52 @@ const Uu = 10 * 1024 * 1024, Fu = 25 * 1024 * 1024, Bu = "sync-target", ju = 20,
|
|
|
4360
4369
|
"you",
|
|
4361
4370
|
"your"
|
|
4362
4371
|
]);
|
|
4363
|
-
function
|
|
4372
|
+
function Mi(e) {
|
|
4364
4373
|
const t = /* @__PURE__ */ new Set();
|
|
4365
4374
|
for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
|
|
4366
|
-
n.length <
|
|
4375
|
+
n.length < wi || ki.has(n) || t.add(n);
|
|
4367
4376
|
return [...t];
|
|
4368
4377
|
}
|
|
4369
|
-
function
|
|
4378
|
+
function vi(e, t) {
|
|
4370
4379
|
if (!e.length) return 0;
|
|
4371
4380
|
if (!t.length) return 1;
|
|
4372
4381
|
const n = new Set(t), r = new Set(e);
|
|
4373
4382
|
let o = 0;
|
|
4374
|
-
for (const
|
|
4383
|
+
for (const i of r) n.has(i) || (o += 1);
|
|
4375
4384
|
return o / r.size;
|
|
4376
4385
|
}
|
|
4377
|
-
function
|
|
4378
|
-
const n = e.filter((
|
|
4386
|
+
function Ci(e, t = Si) {
|
|
4387
|
+
const n = e.filter((s) => !s.partial && typeof s.text == "string");
|
|
4379
4388
|
if (!n.length) return { text: "", segmentCount: 0 };
|
|
4380
|
-
const o = n.reduce((
|
|
4381
|
-
return { text: n.filter((
|
|
4389
|
+
const o = n.reduce((s, a) => Math.max(s, a.endedAt ?? 0), 0) - t;
|
|
4390
|
+
return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Ai(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
4382
4391
|
}
|
|
4383
|
-
const
|
|
4384
|
-
function
|
|
4392
|
+
const Oi = 60;
|
|
4393
|
+
function Gu(e, t, n = Oi) {
|
|
4385
4394
|
const r = new Set(e), o = [...e];
|
|
4386
|
-
for (const
|
|
4387
|
-
!
|
|
4395
|
+
for (const i of t)
|
|
4396
|
+
!i || r.has(i) || (r.add(i), o.push(i));
|
|
4388
4397
|
return o.slice(-n);
|
|
4389
4398
|
}
|
|
4390
|
-
function
|
|
4399
|
+
function Wu(e) {
|
|
4391
4400
|
const { segments: t, now: n, state: r } = e;
|
|
4392
|
-
if (r.lastTriggerAt && n - r.lastTriggerAt <
|
|
4401
|
+
if (r.lastTriggerAt && n - r.lastTriggerAt < Ei)
|
|
4393
4402
|
return { trigger: !1, reason: "too_soon" };
|
|
4394
|
-
const o =
|
|
4403
|
+
const o = Ci(t, e.windowMs);
|
|
4395
4404
|
if (!o.text) return { trigger: !1, reason: "no_speech" };
|
|
4396
|
-
const
|
|
4397
|
-
if (r.lastQueryTerms &&
|
|
4405
|
+
const i = o.segmentCount - (r.lastSegmentCount ?? 0);
|
|
4406
|
+
if (r.lastQueryTerms && i < Ii)
|
|
4398
4407
|
return { trigger: !1, reason: "too_few_new" };
|
|
4399
|
-
const
|
|
4400
|
-
return
|
|
4408
|
+
const s = Mi(o.text);
|
|
4409
|
+
return s.length ? r.lastQueryTerms?.length && vi(s, r.lastQueryTerms) < Ti ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
4401
4410
|
}
|
|
4402
|
-
const
|
|
4411
|
+
const Vu = [
|
|
4403
4412
|
"personal",
|
|
4404
4413
|
"workspace",
|
|
4405
4414
|
"connections",
|
|
4406
4415
|
"work",
|
|
4407
4416
|
"ai"
|
|
4408
|
-
],
|
|
4417
|
+
], zu = "navNotice", De = {
|
|
4409
4418
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
4410
4419
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
4411
4420
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -4428,7 +4437,7 @@ const Wu = [
|
|
|
4428
4437
|
PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
|
|
4429
4438
|
US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
|
|
4430
4439
|
CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
|
|
4431
|
-
},
|
|
4440
|
+
}, xi = "NL", Ni = 15, Ri = 8, Di = Array.from(
|
|
4432
4441
|
new Set(Object.values(De).map((e) => e.callingCode))
|
|
4433
4442
|
).sort((e, t) => t.length - e.length);
|
|
4434
4443
|
function ft(e) {
|
|
@@ -4439,27 +4448,27 @@ function Z(e, t) {
|
|
|
4439
4448
|
return e.length >= t.nsnMin && e.length <= t.nsnMax;
|
|
4440
4449
|
}
|
|
4441
4450
|
function mt(e) {
|
|
4442
|
-
if (e.length >
|
|
4443
|
-
for (const t of
|
|
4451
|
+
if (e.length > Ni) return null;
|
|
4452
|
+
for (const t of Di) {
|
|
4444
4453
|
if (!e.startsWith(t)) continue;
|
|
4445
4454
|
const n = e.slice(t.length);
|
|
4446
4455
|
for (const r of Object.values(De)) {
|
|
4447
4456
|
if (r.callingCode !== t) continue;
|
|
4448
|
-
const o = r.trunkPrefix,
|
|
4449
|
-
if (Z(
|
|
4457
|
+
const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
|
|
4458
|
+
if (Z(i, r)) return `+${t}${i}`;
|
|
4450
4459
|
}
|
|
4451
4460
|
return null;
|
|
4452
4461
|
}
|
|
4453
|
-
return e.length <
|
|
4462
|
+
return e.length < Ri ? null : `+${e}`;
|
|
4454
4463
|
}
|
|
4455
|
-
function
|
|
4464
|
+
function $i(e) {
|
|
4456
4465
|
let t = e.trim();
|
|
4457
4466
|
const n = t.match(/^(sips?|tel|whatsapp):/i);
|
|
4458
4467
|
n && (t = t.slice(n[0].length));
|
|
4459
4468
|
const r = t.indexOf("@");
|
|
4460
4469
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
4461
4470
|
}
|
|
4462
|
-
function
|
|
4471
|
+
function Xu(e) {
|
|
4463
4472
|
if (!e) return !1;
|
|
4464
4473
|
const t = e.indexOf("@");
|
|
4465
4474
|
if (t <= 0) return !1;
|
|
@@ -4468,26 +4477,26 @@ function zu(e) {
|
|
|
4468
4477
|
}
|
|
4469
4478
|
function ht(e, t) {
|
|
4470
4479
|
if (!e) return null;
|
|
4471
|
-
const n =
|
|
4480
|
+
const n = $i(e);
|
|
4472
4481
|
if (!n) return null;
|
|
4473
4482
|
const r = n.startsWith("+"), o = n.replace(/\D/g, "");
|
|
4474
4483
|
if (!o) return null;
|
|
4475
4484
|
if (r) return mt(o);
|
|
4476
4485
|
if (o.startsWith("00")) return mt(o.slice(2));
|
|
4477
|
-
const
|
|
4478
|
-
if (!
|
|
4479
|
-
const
|
|
4480
|
-
if (
|
|
4481
|
-
const a = o.slice(
|
|
4482
|
-
return Z(a,
|
|
4486
|
+
const i = ft(t) ?? ft(xi);
|
|
4487
|
+
if (!i) return null;
|
|
4488
|
+
const s = i.trunkPrefix;
|
|
4489
|
+
if (s && o.startsWith(s)) {
|
|
4490
|
+
const a = o.slice(s.length);
|
|
4491
|
+
return Z(a, i) ? `+${i.callingCode}${a}` : null;
|
|
4483
4492
|
}
|
|
4484
|
-
if (o.startsWith(
|
|
4485
|
-
const a = o.slice(
|
|
4486
|
-
if (Z(a,
|
|
4493
|
+
if (o.startsWith(i.callingCode)) {
|
|
4494
|
+
const a = o.slice(i.callingCode.length);
|
|
4495
|
+
if (Z(a, i)) return `+${i.callingCode}${a}`;
|
|
4487
4496
|
}
|
|
4488
|
-
return !
|
|
4497
|
+
return !s && Z(o, i) ? `+${i.callingCode}${o}` : null;
|
|
4489
4498
|
}
|
|
4490
|
-
function
|
|
4499
|
+
function Yu(e, t = 9) {
|
|
4491
4500
|
const n = (e ?? "").replace(/\D/g, "");
|
|
4492
4501
|
return n.length < t ? null : n.slice(-t);
|
|
4493
4502
|
}
|
|
@@ -4498,11 +4507,11 @@ function nn(e) {
|
|
|
4498
4507
|
const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
|
|
4499
4508
|
return !r || !o.includes(".") ? null : `${r}@${o}`;
|
|
4500
4509
|
}
|
|
4501
|
-
function
|
|
4510
|
+
function qu(e) {
|
|
4502
4511
|
const t = nn(e);
|
|
4503
4512
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
4504
4513
|
}
|
|
4505
|
-
const
|
|
4514
|
+
const Li = /* @__PURE__ */ new Set([
|
|
4506
4515
|
"co.uk",
|
|
4507
4516
|
"org.uk",
|
|
4508
4517
|
"gov.uk",
|
|
@@ -4512,14 +4521,14 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
4512
4521
|
"com.br",
|
|
4513
4522
|
"co.za"
|
|
4514
4523
|
]);
|
|
4515
|
-
function
|
|
4524
|
+
function Pi(e) {
|
|
4516
4525
|
if (!e) return null;
|
|
4517
4526
|
const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
|
|
4518
4527
|
if (t.length < 2) return null;
|
|
4519
4528
|
const n = t.slice(-2).join(".");
|
|
4520
|
-
return
|
|
4529
|
+
return Li.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
|
|
4521
4530
|
}
|
|
4522
|
-
const
|
|
4531
|
+
const Ki = /* @__PURE__ */ new Set([
|
|
4523
4532
|
"gmail.com",
|
|
4524
4533
|
"googlemail.com",
|
|
4525
4534
|
"outlook.com",
|
|
@@ -4564,34 +4573,34 @@ const Ps = /* @__PURE__ */ new Set([
|
|
|
4564
4573
|
"proximus.be",
|
|
4565
4574
|
"scarlet.be"
|
|
4566
4575
|
]);
|
|
4567
|
-
function qu(e) {
|
|
4568
|
-
const t = Ls(e);
|
|
4569
|
-
return t ? Ps.has(t) : !1;
|
|
4570
|
-
}
|
|
4571
4576
|
function Qu(e) {
|
|
4577
|
+
const t = Pi(e);
|
|
4578
|
+
return t ? Ki.has(t) : !1;
|
|
4579
|
+
}
|
|
4580
|
+
function Zu(e) {
|
|
4572
4581
|
if (!e) return !1;
|
|
4573
4582
|
const t = e.trim().toLowerCase();
|
|
4574
4583
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
4575
4584
|
}
|
|
4576
|
-
function
|
|
4585
|
+
function Ju(e, t, n) {
|
|
4577
4586
|
if (!e || !t) return null;
|
|
4578
4587
|
const r = e.trim().toLowerCase();
|
|
4579
4588
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
4580
|
-
const
|
|
4581
|
-
return
|
|
4589
|
+
const i = ht(t, n);
|
|
4590
|
+
return i ? `tel:${i}` : null;
|
|
4582
4591
|
}
|
|
4583
4592
|
if (r === "fax") {
|
|
4584
|
-
const
|
|
4585
|
-
return
|
|
4593
|
+
const i = ht(t, n);
|
|
4594
|
+
return i ? `fax:${i}` : null;
|
|
4586
4595
|
}
|
|
4587
4596
|
if (r === "mailto" || r === "email") {
|
|
4588
|
-
const
|
|
4589
|
-
return
|
|
4597
|
+
const i = nn(t);
|
|
4598
|
+
return i ? `mailto:${i}` : null;
|
|
4590
4599
|
}
|
|
4591
4600
|
const o = t.trim().toLowerCase();
|
|
4592
4601
|
return o ? `${r}:${o}` : null;
|
|
4593
4602
|
}
|
|
4594
|
-
const
|
|
4603
|
+
const Ui = [
|
|
4595
4604
|
/<blockquote/i,
|
|
4596
4605
|
/class="?gmail_quote/i,
|
|
4597
4606
|
// Gmail quote container
|
|
@@ -4604,24 +4613,24 @@ const Ks = [
|
|
|
4604
4613
|
// Outlook underscore separator before "From:"
|
|
4605
4614
|
/\bOn\b[\s\S]{0,200}?\bwrote:/i
|
|
4606
4615
|
// Gmail "On <date> <name> wrote:"
|
|
4607
|
-
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,
|
|
4608
|
-
function
|
|
4616
|
+
], gt = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Fi = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
|
|
4617
|
+
function Bi(e) {
|
|
4609
4618
|
const t = e.split(`
|
|
4610
4619
|
`);
|
|
4611
4620
|
for (let n = 0; n < t.length; n++)
|
|
4612
|
-
if (
|
|
4621
|
+
if (Fi.test(t[n]) || gt.test(t[n]) && t.slice(n + 1, n + 4).some((r) => gt.test(r)))
|
|
4613
4622
|
return t.slice(0, n).join(`
|
|
4614
4623
|
`).trim();
|
|
4615
4624
|
return e;
|
|
4616
4625
|
}
|
|
4617
|
-
const
|
|
4626
|
+
const ji = /^(?:https?:|mailto:|tel:)/i, Hi = /^(?:https?:|cid:|data:image\/)/i;
|
|
4618
4627
|
function de(e, t) {
|
|
4619
4628
|
const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
|
|
4620
4629
|
return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
|
|
4621
4630
|
}
|
|
4622
|
-
const
|
|
4631
|
+
const Gi = /(!\[[^\]]*\]\([^)]*\))/;
|
|
4623
4632
|
function yt(e) {
|
|
4624
|
-
return e.replace(/\s+/g, " ").trim().split(
|
|
4633
|
+
return e.replace(/\s+/g, " ").trim().split(Gi).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
|
|
4625
4634
|
}
|
|
4626
4635
|
function pe(e) {
|
|
4627
4636
|
return e.replace(
|
|
@@ -4629,86 +4638,86 @@ function pe(e) {
|
|
|
4629
4638
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
|
|
4630
4639
|
);
|
|
4631
4640
|
}
|
|
4632
|
-
function
|
|
4641
|
+
function Wi(e) {
|
|
4633
4642
|
return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
|
|
4634
4643
|
const o = de(r, "src");
|
|
4635
|
-
return
|
|
4644
|
+
return Hi.test(o) ? `})` : "";
|
|
4636
4645
|
}).replace(
|
|
4637
4646
|
/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
|
|
4638
4647
|
(n, r, o) => {
|
|
4639
|
-
const
|
|
4640
|
-
return
|
|
4648
|
+
const i = yt(o.replace(/<[^>]*>/g, "")), s = de(r, "href");
|
|
4649
|
+
return ji.test(s) ? `[${i || pe(s)}](${pe(s)})` : i;
|
|
4641
4650
|
}
|
|
4642
4651
|
);
|
|
4643
4652
|
}
|
|
4644
|
-
const
|
|
4645
|
-
function
|
|
4653
|
+
const Vi = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, zi = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, Xi = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
|
|
4654
|
+
function Yi(e, t) {
|
|
4646
4655
|
return /<table\b/i.test(e) || e.includes(`
|
|
4647
4656
|
|
|
4648
4657
|
|`) || t.includes("![") || t.length > 200;
|
|
4649
4658
|
}
|
|
4650
|
-
const
|
|
4651
|
-
function
|
|
4659
|
+
const qi = 40, Qi = { left: "---", center: ":---:", right: "---:" };
|
|
4660
|
+
function Zi(e) {
|
|
4652
4661
|
const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
|
|
4653
4662
|
return t ? t[1].toLowerCase() : "left";
|
|
4654
4663
|
}
|
|
4655
|
-
function
|
|
4664
|
+
function Ji(e) {
|
|
4656
4665
|
return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
|
|
4657
4666
|
}
|
|
4658
|
-
function
|
|
4667
|
+
function es(e) {
|
|
4659
4668
|
const t = [];
|
|
4660
|
-
for (const
|
|
4669
|
+
for (const s of e.matchAll(zi)) {
|
|
4661
4670
|
const a = [];
|
|
4662
|
-
for (const
|
|
4663
|
-
const l =
|
|
4664
|
-
if (
|
|
4665
|
-
a.push({ text: l, align:
|
|
4671
|
+
for (const u of s[1].matchAll(Xi)) {
|
|
4672
|
+
const l = Ji(u[3]);
|
|
4673
|
+
if (Yi(u[3], l)) return null;
|
|
4674
|
+
a.push({ text: l, align: Zi(u[2]) });
|
|
4666
4675
|
}
|
|
4667
4676
|
if (a.length === 0) return null;
|
|
4668
|
-
a.some((
|
|
4677
|
+
a.some((u) => u.text !== "") && t.push(a);
|
|
4669
4678
|
}
|
|
4670
4679
|
const n = t[0]?.length ?? 0;
|
|
4671
|
-
if (t.length < 2 || n < 2 || t.some((
|
|
4672
|
-
const r = (
|
|
4680
|
+
if (t.length < 2 || n < 2 || t.some((s) => s.length !== n)) return null;
|
|
4681
|
+
const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => Qi[s.align]).join(" | "), i = t.slice(1).map(r).join(`
|
|
4673
4682
|
`);
|
|
4674
4683
|
return `
|
|
4675
4684
|
|
|
4676
4685
|
${r(t[0])}
|
|
4677
4686
|
| ${o} |
|
|
4678
|
-
${
|
|
4687
|
+
${i}
|
|
4679
4688
|
|
|
4680
4689
|
`;
|
|
4681
4690
|
}
|
|
4682
|
-
function
|
|
4691
|
+
function ts(e) {
|
|
4683
4692
|
return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
|
|
4684
4693
|
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
|
|
4685
4694
|
}
|
|
4686
|
-
function
|
|
4695
|
+
function ns(e) {
|
|
4687
4696
|
let t = e;
|
|
4688
|
-
for (let n = 0; n <
|
|
4689
|
-
const r =
|
|
4697
|
+
for (let n = 0; n < qi; n++) {
|
|
4698
|
+
const r = Vi.exec(t);
|
|
4690
4699
|
if (!r || r.index === void 0) break;
|
|
4691
|
-
const
|
|
4700
|
+
const i = es(r[1]) ?? `
|
|
4692
4701
|
|
|
4693
|
-
${
|
|
4702
|
+
${ts(r[1])}
|
|
4694
4703
|
|
|
4695
4704
|
`;
|
|
4696
|
-
t = t.slice(0, r.index) +
|
|
4705
|
+
t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
|
|
4697
4706
|
}
|
|
4698
4707
|
return t;
|
|
4699
4708
|
}
|
|
4700
4709
|
function bt(e, t) {
|
|
4701
4710
|
let n = e;
|
|
4702
4711
|
return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
|
|
4703
|
-
`), t && (n =
|
|
4712
|
+
`), t && (n = ns(Wi(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
|
|
4704
4713
|
|
|
4705
4714
|
`), n = n.replace(/<\/(div|li|tr)>/gi, `
|
|
4706
4715
|
`), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
|
|
4707
4716
|
}
|
|
4708
|
-
function
|
|
4717
|
+
function _t(e) {
|
|
4709
4718
|
return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
|
|
4710
4719
|
}
|
|
4711
|
-
const
|
|
4720
|
+
const rs = {
|
|
4712
4721
|
euro: "€",
|
|
4713
4722
|
pound: "£",
|
|
4714
4723
|
yen: "¥",
|
|
@@ -4730,47 +4739,47 @@ const ni = {
|
|
|
4730
4739
|
rdquo: "”",
|
|
4731
4740
|
apos: "'"
|
|
4732
4741
|
};
|
|
4733
|
-
function
|
|
4734
|
-
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) =>
|
|
4742
|
+
function At(e) {
|
|
4743
|
+
return e.replace(/ /gi, " ").replace(/&([a-z]+);/gi, (t, n) => rs[n.toLowerCase()] ?? t).replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/&#(\d+);/g, (t, n) => _t(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => _t(parseInt(n, 16)) ?? t).replace(/&/gi, "&");
|
|
4735
4744
|
}
|
|
4736
|
-
function
|
|
4745
|
+
function St(e) {
|
|
4737
4746
|
return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
|
|
4738
4747
|
`).replace(/\n{3,}/g, `
|
|
4739
4748
|
|
|
4740
4749
|
`).trim();
|
|
4741
4750
|
}
|
|
4742
|
-
const
|
|
4743
|
-
function Ju(e) {
|
|
4744
|
-
return ri.test(e);
|
|
4745
|
-
}
|
|
4751
|
+
const os = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
4746
4752
|
function ed(e) {
|
|
4747
|
-
return
|
|
4753
|
+
return os.test(e);
|
|
4748
4754
|
}
|
|
4749
4755
|
function td(e) {
|
|
4756
|
+
return rn(e, !1);
|
|
4757
|
+
}
|
|
4758
|
+
function nd(e) {
|
|
4750
4759
|
return rn(e, !0);
|
|
4751
4760
|
}
|
|
4752
4761
|
function rn(e, t) {
|
|
4753
4762
|
if (typeof e != "string" || !e) return "";
|
|
4754
4763
|
let n = e.length;
|
|
4755
|
-
for (const
|
|
4756
|
-
const a = e.search(
|
|
4764
|
+
for (const s of Ui) {
|
|
4765
|
+
const a = e.search(s);
|
|
4757
4766
|
a >= 0 && a < n && (n = a);
|
|
4758
4767
|
}
|
|
4759
4768
|
const r = e.slice(0, n);
|
|
4760
|
-
let o =
|
|
4761
|
-
return o || (o =
|
|
4769
|
+
let o = St(At(bt(r, t)));
|
|
4770
|
+
return o || (o = St(At(bt(e, t)))), Bi(o) || o;
|
|
4762
4771
|
}
|
|
4763
4772
|
export {
|
|
4764
|
-
|
|
4773
|
+
zs as ACTIVE_ASSIGNMENT_STATUSES,
|
|
4765
4774
|
R as ACTIVITY_CATALOG,
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4775
|
+
Jo as AI_ATTACHMENT_LIMITS,
|
|
4776
|
+
Ul as AI_ATTACHMENT_MAX_PER_TURN,
|
|
4777
|
+
Kl as AI_ATTACHMENT_TURN_BUDGET,
|
|
4769
4778
|
Tt as AI_VENDORS,
|
|
4770
4779
|
kn as ALLOWED_LINK_SCHEMES,
|
|
4771
|
-
|
|
4780
|
+
Tu as APP_PERMISSIONS,
|
|
4772
4781
|
He as ARTIFACT_MAX_BLOCKS,
|
|
4773
|
-
|
|
4782
|
+
Fs as ARTIFACT_MAX_BODY_BYTES,
|
|
4774
4783
|
q as ARTIFACT_MAX_CELL_LEN,
|
|
4775
4784
|
ze as ARTIFACT_MAX_KPI_ITEMS,
|
|
4776
4785
|
Ge as ARTIFACT_MAX_LIST_ITEMS,
|
|
@@ -4778,37 +4787,37 @@ export {
|
|
|
4778
4787
|
We as ARTIFACT_MAX_TABLE_ROWS,
|
|
4779
4788
|
kt as ARTIFACT_MAX_TEXT_LEN,
|
|
4780
4789
|
Ln as ASSIGNMENT_SCOPE_KIND,
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4790
|
+
Gl as ASSIST_BANDS,
|
|
4791
|
+
Hl as ASSIST_SOURCE_PROVIDER_GROUP,
|
|
4792
|
+
ir as ATTENTION_STATUSES,
|
|
4784
4793
|
wo as AT_RISK_GAP,
|
|
4785
4794
|
en as AUTH_APP_NAME,
|
|
4786
|
-
|
|
4787
|
-
|
|
4795
|
+
io as AUTO_READY_MIN_PROPOSALS,
|
|
4796
|
+
so as AUTO_READY_RATE,
|
|
4788
4797
|
hn as ActivityTypeRegistry,
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4798
|
+
Es as BUILT_IN_ONLY,
|
|
4799
|
+
sr as BULK_PENALTY,
|
|
4800
|
+
Ei as CADENCE_FLOOR_MS,
|
|
4801
|
+
Ii as CADENCE_MIN_NEW_SEGMENTS,
|
|
4802
|
+
Ti as CADENCE_MIN_NOVELTY,
|
|
4803
|
+
Si as CADENCE_WINDOW_MS,
|
|
4804
|
+
mc as CLASSIFY_VARS,
|
|
4805
|
+
uu as CONNECTOR_PROVIDER_GROUP,
|
|
4806
|
+
du as CONTEXT_COLLECT_SERVICE,
|
|
4807
|
+
Ds as CORE_DIMENSIONS,
|
|
4808
|
+
ii as CommunicationScheme,
|
|
4800
4809
|
qn as DAY_MS,
|
|
4801
|
-
|
|
4810
|
+
Eo as DEFAULT_CHECK_IN_DAYS,
|
|
4802
4811
|
Kr as DEFAULT_FORECAST_WEEKS,
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4812
|
+
Ka as DEFAULT_MEMORY_BUDGET,
|
|
4813
|
+
xi as DEFAULT_PHONE_REGION,
|
|
4814
|
+
ul as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
|
|
4815
|
+
Ya as DEMAND_SOURCE_PROVIDER_GROUP,
|
|
4816
|
+
bu as DOCUMENT_APPLY_SERVICE,
|
|
4817
|
+
gu as DOCUMENT_DESCRIBE_SERVICE,
|
|
4818
|
+
yu as DOCUMENT_INSPECT_SERVICE,
|
|
4810
4819
|
He as DOCUMENT_MAX_BLOCKS,
|
|
4811
|
-
|
|
4820
|
+
Fs as DOCUMENT_MAX_BODY_BYTES,
|
|
4812
4821
|
q as DOCUMENT_MAX_CELL_LEN,
|
|
4813
4822
|
ze as DOCUMENT_MAX_KPI_ITEMS,
|
|
4814
4823
|
Xe as DOCUMENT_MAX_LETTERHEAD_FIELDS,
|
|
@@ -4820,419 +4829,419 @@ export {
|
|
|
4820
4829
|
Ye as DOCUMENT_MAX_TOTALS_ROWS,
|
|
4821
4830
|
Qt as DOCUMENT_OPERATIONS,
|
|
4822
4831
|
$o as DUTCH_SLOT_LABELS,
|
|
4823
|
-
|
|
4832
|
+
gc as EMPTY_WORKFLOW,
|
|
4824
4833
|
su as FEATURE_FOLDER_MANAGEMENT,
|
|
4825
|
-
|
|
4826
|
-
|
|
4834
|
+
cu as FEATURE_MESSAGE_REACTIONS,
|
|
4835
|
+
au as FEATURE_REMOTE_SEARCH,
|
|
4827
4836
|
Ce as FIXED_KINDS,
|
|
4828
4837
|
ne as FIXED_LEVELS,
|
|
4829
4838
|
Ne as FIXED_TYPES,
|
|
4830
|
-
|
|
4839
|
+
oa as FIXED_UNITS,
|
|
4831
4840
|
cr as FOLLOW_UP_HOURS,
|
|
4832
4841
|
sl as FROZEN_WRITABLE_FIELDS,
|
|
4833
4842
|
Yn as HOUR_MS,
|
|
4834
|
-
|
|
4843
|
+
os as HTML_BODY_RE,
|
|
4835
4844
|
L as INELIGIBLE,
|
|
4836
4845
|
Au as INSTALLATION_HEADER,
|
|
4837
4846
|
eo as INTERACTION_KIND,
|
|
4838
|
-
|
|
4847
|
+
ou as InteractionParticipantRole,
|
|
4839
4848
|
gr as KB_FALLBACK_LOCALE,
|
|
4840
4849
|
Ze as KB_LOCALES,
|
|
4841
4850
|
Ze as LOCALES,
|
|
4842
4851
|
Re as LOOSE_STATUSES,
|
|
4843
4852
|
tr as MAIL_HINT_HEADERS,
|
|
4844
|
-
|
|
4853
|
+
cs as MAX_ACTIONS,
|
|
4845
4854
|
Pn as MAX_ASSIGNMENT_TURNS,
|
|
4846
|
-
|
|
4855
|
+
is as MAX_BLOCKS,
|
|
4847
4856
|
Dt as MAX_COLLECTION_DEPTH,
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4857
|
+
Fu as MAX_EDITABLE_FILE_BYTES,
|
|
4858
|
+
ss as MAX_FIELDS,
|
|
4859
|
+
as as MAX_LIST_ITEMS,
|
|
4860
|
+
Da as MAX_MEMORY_BROWSE,
|
|
4861
|
+
Pa as MAX_MEMORY_BUDGET,
|
|
4862
|
+
$a as MAX_MEMORY_CHARS,
|
|
4863
|
+
Oi as MAX_SHOWN_KEYS,
|
|
4855
4864
|
Oo as MAX_TOPIC_CANDIDATES,
|
|
4856
4865
|
Co as MAX_TOPIC_EXAMPLES,
|
|
4857
4866
|
ue as MAX_TOPIC_EXAMPLE_CHARS,
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4867
|
+
Bu as MAX_VIEWABLE_FILE_BYTES,
|
|
4868
|
+
La as MIN_MEMORY_BUDGET,
|
|
4869
|
+
zu as NAV_NOTICE_SLOT,
|
|
4870
|
+
Fa as NL_TAX_RATES,
|
|
4862
4871
|
Eu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
4863
4872
|
ko as OFF_TRACK_GAP,
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4873
|
+
ja as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
4874
|
+
Se as PAUSE_SNOOZED,
|
|
4875
|
+
Ee as PAUSE_WAITING_FOR_CUSTOMER,
|
|
4867
4876
|
De as PHONE_REGIONS,
|
|
4868
4877
|
Zt as PRESENCE_ONLINE_WINDOW_MS,
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4878
|
+
pi as PRESENCE_SURVIVES_OFFLINE,
|
|
4879
|
+
Fo as PRODUCT_SCOPE_KIND,
|
|
4880
|
+
Ga as PROFILE_TOOL_DISPOSITIONS,
|
|
4881
|
+
ru as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
4882
|
+
nu as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
4883
|
+
Ki as PUBLIC_EMAIL_DOMAINS,
|
|
4875
4884
|
Je as READ_STEP_TYPES,
|
|
4876
|
-
|
|
4885
|
+
_r as RELATED_SUBJECT_KINDS,
|
|
4877
4886
|
qt as RESERVED_STATUS_KEYS,
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4887
|
+
_l as RESERVED_TYPE_KEYS,
|
|
4888
|
+
Nu as RESOURCE_ATTACHED_SERVICE,
|
|
4889
|
+
Cu as RESOURCE_DESCRIBE_SERVICE,
|
|
4890
|
+
xu as RESOURCE_RESOLVE_SERVICE,
|
|
4891
|
+
Ou as RESOURCE_SEARCH_SERVICE,
|
|
4883
4892
|
Gr as SCHEDULE_ENTRY_SCOPE_KIND,
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4893
|
+
$u as SCOPE_READ_ROUTE,
|
|
4894
|
+
Du as SCOPE_RELATED_ROUTE,
|
|
4895
|
+
Vu as SETTINGS_CATEGORIES,
|
|
4896
|
+
ia as SIGNATURE_INTENTS,
|
|
4888
4897
|
ar as SLA_HOURS_BY_PRIORITY,
|
|
4889
|
-
|
|
4890
|
-
|
|
4898
|
+
vc as SLA_METRICS,
|
|
4899
|
+
Cc as SLA_PAUSE_REASONS,
|
|
4891
4900
|
ro as STEP_MAX_TOKENS_MAX,
|
|
4892
4901
|
no as STEP_MAX_TOKENS_MIN,
|
|
4893
|
-
|
|
4902
|
+
Ao as STRATEGY_ITEM_SCOPE_KIND,
|
|
4894
4903
|
er as SUMMARY_MIN_LAST_CHARS,
|
|
4895
4904
|
Jn as SUMMARY_MIN_MESSAGES,
|
|
4896
|
-
|
|
4897
|
-
|
|
4905
|
+
Hu as SYNC_RUN_MAX_ERRORS,
|
|
4906
|
+
ju as SYNC_TARGET_PROVIDER_GROUP,
|
|
4898
4907
|
$n as TERMINAL_ASSIGNMENT_STATUSES,
|
|
4899
4908
|
ao as TERMINAL_RUN_STATUSES,
|
|
4900
4909
|
Xt as TRANSACTION_KINDS,
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4910
|
+
Uo as TRANSACTION_SCOPE_KINDS,
|
|
4911
|
+
fc as TRIGGER_VARS,
|
|
4912
|
+
Er as UNKNOWN_KIND,
|
|
4913
|
+
So as UNKNOWN_LEVEL_ORDER,
|
|
4914
|
+
lu as UNSUPPORTED,
|
|
4915
|
+
Sn as USAGE_DIMENSIONS,
|
|
4916
|
+
En as USAGE_DIMENSION_IDS,
|
|
4908
4917
|
Wr as WORKSTREAM_SCOPE_KIND,
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4918
|
+
Go as WORK_ACTIVITY_SCOPE_KIND,
|
|
4919
|
+
Ha as WORK_AREAS,
|
|
4920
|
+
hl as WORK_COMMENT_ADDED,
|
|
4921
|
+
Tl as WORK_CYCLE_SYNC_KIND,
|
|
4922
|
+
gl as WORK_ITEM_ASSIGNED,
|
|
4923
|
+
jo as WORK_ITEM_SCOPE_KIND,
|
|
4924
|
+
yl as WORK_ITEM_STATUS_CHANGED,
|
|
4925
|
+
Ho as WORK_PROJECT_SCOPE_KIND,
|
|
4917
4926
|
J as W_PRIORITY,
|
|
4918
|
-
|
|
4927
|
+
rl as acceptExampleCandidate,
|
|
4919
4928
|
Yr as actingIdentityKey,
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4929
|
+
tl as activeWorkTypes,
|
|
4930
|
+
us as activityIconOf,
|
|
4931
|
+
As as activityJoinUrl,
|
|
4923
4932
|
dn as activitySnippet,
|
|
4924
4933
|
pn as activityTextParams,
|
|
4925
|
-
|
|
4934
|
+
_s as activityTimelineText,
|
|
4926
4935
|
gn as activityTimestamp,
|
|
4927
4936
|
w as activityTypeInfo,
|
|
4928
|
-
|
|
4929
|
-
|
|
4937
|
+
ac as actorKey,
|
|
4938
|
+
nl as addExampleCandidate,
|
|
4930
4939
|
Oe as addWorkingMs,
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4940
|
+
ku as agePresenceEntry,
|
|
4941
|
+
Zo as aiAttachmentKind,
|
|
4942
|
+
Fl as aiAttachmentRejection,
|
|
4934
4943
|
je as aiBudgetLimit,
|
|
4935
|
-
|
|
4944
|
+
Ns as aiBudgetPeriodKey,
|
|
4936
4945
|
yn as aiBudgetPeriodStart,
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4946
|
+
xs as aiBudgetState,
|
|
4947
|
+
Os as aiVendorAcceptsAttachment,
|
|
4948
|
+
Ms as aiVendorDefaultModel,
|
|
4949
|
+
ks as aiVendorLabel,
|
|
4950
|
+
Cs as aiVendorNeedsBaseUrl,
|
|
4951
|
+
vs as aiVendorsWith,
|
|
4943
4952
|
Fn as allocate,
|
|
4944
4953
|
tn as appNameFromPath,
|
|
4945
|
-
|
|
4954
|
+
qc as applyRounding,
|
|
4946
4955
|
sa as applySignature,
|
|
4947
4956
|
oo as approvalRate,
|
|
4948
|
-
|
|
4949
|
-
|
|
4957
|
+
js as artifactBodyBytes,
|
|
4958
|
+
Hs as artifactOutline,
|
|
4950
4959
|
Dn as artifactToMarkdown,
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
+
dc as assignmentMismatch,
|
|
4961
|
+
Ys as assignmentScopeKey,
|
|
4962
|
+
Zs as assignmentSubject,
|
|
4963
|
+
Xa as availabilityByPerson,
|
|
4964
|
+
Wa as belongsOnCalendar,
|
|
4965
|
+
Ss as buildActivityPreview,
|
|
4966
|
+
Ql as buildChannelIntents,
|
|
4967
|
+
Gs as buildShareKeys,
|
|
4968
|
+
Ci as buildWindow,
|
|
4960
4969
|
Tr as calendarDaysBetween,
|
|
4961
4970
|
xe as calendarOf,
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4971
|
+
va as canNestUnder,
|
|
4972
|
+
Pc as canParent,
|
|
4973
|
+
Va as capacityTotal,
|
|
4974
|
+
rc as capacityWeights,
|
|
4975
|
+
hs as carriesText,
|
|
4976
|
+
Oa as categoryLabel,
|
|
4977
|
+
zo as categoryOf,
|
|
4978
|
+
tu as channelKindForScheme,
|
|
4979
|
+
ds as channelKindOf,
|
|
4980
|
+
zc as checkInOverdueMs,
|
|
4981
|
+
hc as clampStepMaxTokens,
|
|
4982
|
+
ga as classifyMail,
|
|
4983
|
+
nd as cleanMessageMarkdown,
|
|
4984
|
+
td as cleanMessageText,
|
|
4985
|
+
ea as codeQuery,
|
|
4986
|
+
Vl as compareAssistRank,
|
|
4978
4987
|
vo as compareWorkTypes,
|
|
4979
4988
|
Xn as conditionHolds,
|
|
4980
4989
|
Do as copyFrom,
|
|
4981
4990
|
W as countsAsPlanned,
|
|
4982
|
-
|
|
4983
|
-
|
|
4991
|
+
za as coverageByPerson,
|
|
4992
|
+
Qa as coverageFor,
|
|
4984
4993
|
Lt as coversWorkstream,
|
|
4985
4994
|
Pt as cycleDayIndex,
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4995
|
+
Ll as cycleOrder,
|
|
4996
|
+
Pl as cycleState,
|
|
4997
|
+
Js as decideAssignmentState,
|
|
4998
|
+
Wu as decideCadence,
|
|
4999
|
+
Yl as decideIncomingCall,
|
|
4991
5000
|
yr as defaultLocaleOf,
|
|
4992
|
-
|
|
4993
|
-
|
|
5001
|
+
Nl as defaultStatusKey,
|
|
5002
|
+
iu as defineIntent,
|
|
4994
5003
|
mr as depthOf,
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5004
|
+
wu as derivePresence,
|
|
5005
|
+
Ps as describeClause,
|
|
5006
|
+
ql as disabledIntentsFromCapabilities,
|
|
5007
|
+
js as documentBodyBytes,
|
|
5008
|
+
_u as documentKindOf,
|
|
5009
|
+
Hs as documentOutline,
|
|
5001
5010
|
Dn as documentToMarkdown,
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5011
|
+
hu as documentToText,
|
|
5012
|
+
xc as dueAtOf,
|
|
5013
|
+
Yc as elapsedSeconds,
|
|
5014
|
+
qu as emailDomain,
|
|
5015
|
+
Ju as endpointKey,
|
|
5007
5016
|
vr as erlangC,
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5017
|
+
hi as extractParams,
|
|
5018
|
+
Mi as extractTerms,
|
|
5019
|
+
ua as fillDocument,
|
|
5011
5020
|
zn as fillText,
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5021
|
+
Jl as filterByEndpoint,
|
|
5022
|
+
Zl as filterByIntent,
|
|
5023
|
+
oi as filterByTargetScheme,
|
|
5024
|
+
Ls as filterableDimensions,
|
|
5016
5025
|
te as findAiVendor,
|
|
5017
|
-
|
|
5026
|
+
Uc as fixedLevelForName,
|
|
5018
5027
|
El as fixedTypeForName,
|
|
5019
|
-
|
|
5020
|
-
|
|
5028
|
+
Il as fixedTypes,
|
|
5029
|
+
Su as flattenLocales,
|
|
5021
5030
|
H as floorToPeriod,
|
|
5022
|
-
|
|
5031
|
+
ec as forecastIntervals,
|
|
5023
5032
|
Xr as formatActingIdentity,
|
|
5024
5033
|
D as formatCents,
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5034
|
+
Zc as formatClock,
|
|
5035
|
+
Qc as formatHm,
|
|
5036
|
+
kl as formatItemKey,
|
|
5028
5037
|
j as formatPeriod,
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5038
|
+
Dc as formatSlaDuration,
|
|
5039
|
+
jl as freshSources,
|
|
5040
|
+
Is as getActivitySeenUserIds,
|
|
5041
|
+
aa as getContactEndpoints,
|
|
5042
|
+
Ia as getShortTitle,
|
|
5034
5043
|
Ea as getUrgencyScore,
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5044
|
+
wc as hasReacted,
|
|
5045
|
+
Fc as healthCategory,
|
|
5046
|
+
Bc as healthsInCategory,
|
|
5038
5047
|
$t as heightOf,
|
|
5039
|
-
|
|
5040
|
-
|
|
5048
|
+
wa as helpCenterText,
|
|
5049
|
+
pc as humanizeAction,
|
|
5041
5050
|
to as interactionIdOf,
|
|
5042
|
-
|
|
5051
|
+
ml as isAgentUser,
|
|
5043
5052
|
Aa as isAssigned,
|
|
5044
|
-
|
|
5053
|
+
Xs as isAssignmentTerminal,
|
|
5045
5054
|
Zr as isAssignmentTrigger,
|
|
5046
|
-
|
|
5055
|
+
_c as isAutoReady,
|
|
5047
5056
|
fr as isAwaitingThem,
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5057
|
+
ws as isChatMessageActivity,
|
|
5058
|
+
Sa as isClosed,
|
|
5059
|
+
ys as isConnectedType,
|
|
5060
|
+
Lu as isDeepLink,
|
|
5052
5061
|
hr as isDescendant,
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5062
|
+
pa as isEligible,
|
|
5063
|
+
Ts as isEmailActivity,
|
|
5064
|
+
il as isFrozen,
|
|
5065
|
+
ed as isHtmlBody,
|
|
5066
|
+
Sc as isInFlight,
|
|
5058
5067
|
or as isInteractionUnseen,
|
|
5059
|
-
|
|
5068
|
+
Pu as isLandingPath,
|
|
5060
5069
|
Zn as isLikelyBulk,
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5070
|
+
Et as isMessageShape,
|
|
5071
|
+
ps as isMessageType,
|
|
5072
|
+
yi as isMoreSpecificPattern,
|
|
5064
5073
|
It as isNoteShape,
|
|
5065
|
-
|
|
5066
|
-
|
|
5074
|
+
_o as isOpenClock,
|
|
5075
|
+
Bl as isOutwardTool,
|
|
5067
5076
|
ur as isParked,
|
|
5068
5077
|
co as isPaused,
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5078
|
+
gs as isPlaybookAuthoredType,
|
|
5079
|
+
Qu as isPublicEmailDomain,
|
|
5080
|
+
Uu as isPublicPath,
|
|
5072
5081
|
dr as isReminderActive,
|
|
5073
|
-
|
|
5074
|
-
|
|
5082
|
+
ms as isReplyableType,
|
|
5083
|
+
ba as isSlaAtRisk,
|
|
5075
5084
|
Ac as isTerminal,
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5085
|
+
ma as isThreadLongEnough,
|
|
5086
|
+
bs as isTranscriptType,
|
|
5087
|
+
Rl as isWorkClosed,
|
|
5088
|
+
el as isWorkTypeVisible,
|
|
5089
|
+
Cl as itemDossierKeys,
|
|
5081
5090
|
N as kindFor,
|
|
5082
|
-
|
|
5091
|
+
Vo as ladderFor,
|
|
5083
5092
|
Io as levelIn,
|
|
5084
5093
|
Te as levelOrder,
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5094
|
+
Sr as lineNet,
|
|
5095
|
+
Ta as linkLabel,
|
|
5096
|
+
Rs as listeningAllowed,
|
|
5097
|
+
Ma as localeInstruction,
|
|
5098
|
+
ka as localeName,
|
|
5099
|
+
Ca as localesOf,
|
|
5100
|
+
Xu as looksLikeEmail,
|
|
5092
5101
|
Ct as lookup,
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5102
|
+
na as marginCents,
|
|
5103
|
+
mu as markdownToDocument,
|
|
5104
|
+
eu as matchContactToIntents,
|
|
5105
|
+
bi as matchPublicRoute,
|
|
5106
|
+
Na as mcpCredentialScope,
|
|
5107
|
+
Ra as mcpToolPrefix,
|
|
5108
|
+
jc as measureRatio,
|
|
5109
|
+
Gu as mergeShownKeys,
|
|
5101
5110
|
un as messageCountsAs,
|
|
5102
|
-
|
|
5111
|
+
Ks as metricOption,
|
|
5103
5112
|
Kt as minutesOn,
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5113
|
+
Zu as needsPhoneRegion,
|
|
5114
|
+
fs as nestsUnderParent,
|
|
5115
|
+
Kc as nextLevelBelow,
|
|
5116
|
+
Nc as nextSlaClock,
|
|
5117
|
+
al as nextVersion,
|
|
5118
|
+
Bs as normalizeArtifactBlocks,
|
|
5119
|
+
ls as normalizeBlocks,
|
|
5120
|
+
Bs as normalizeDocumentBlocks,
|
|
5112
5121
|
nn as normalizeEmail,
|
|
5113
5122
|
P as normalizeExample,
|
|
5114
5123
|
Kn as normalizeGtin,
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5124
|
+
Iu as notificationPrefKey,
|
|
5125
|
+
vi as novelty,
|
|
5126
|
+
fu as operationDescriptor,
|
|
5127
|
+
pu as operationsForKind,
|
|
5128
|
+
da as organizationSender,
|
|
5120
5129
|
ce as overlapSeconds,
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5130
|
+
qa as overlaps,
|
|
5131
|
+
Hc as paceRatio,
|
|
5132
|
+
fa as parkMarksById,
|
|
5133
|
+
ic as parseActingIdentity,
|
|
5134
|
+
ta as parseAmount,
|
|
5135
|
+
kc as parseClockMinutes,
|
|
5136
|
+
Ml as parseItemKey,
|
|
5137
|
+
mi as pathToRegex,
|
|
5129
5138
|
Ft as patternFor,
|
|
5130
5139
|
Ut as patternStartTime,
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5140
|
+
Mc as pauseBitFor,
|
|
5141
|
+
$s as periodsInRange,
|
|
5142
|
+
Yu as phoneSuffix,
|
|
5143
|
+
ha as pickMailHeaders,
|
|
5144
|
+
la as pickTemplate,
|
|
5145
|
+
oc as placeLumps,
|
|
5137
5146
|
cn as plainTextFromMarkdown,
|
|
5138
|
-
|
|
5139
|
-
|
|
5147
|
+
Oc as planSlaEvent,
|
|
5148
|
+
Za as plannedBillable,
|
|
5140
5149
|
Lr as plannedWorkTypeKey,
|
|
5141
5150
|
Qr as playbookActor,
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5151
|
+
bc as procedureOf,
|
|
5152
|
+
pl as productScopeKey,
|
|
5153
|
+
Ol as projectDossierKeys,
|
|
5154
|
+
gi as publicBasePathFor,
|
|
5155
|
+
Ku as publicRoutePatterns,
|
|
5156
|
+
Qs as reactionWakesAssignment,
|
|
5148
5157
|
fe as readPath,
|
|
5149
5158
|
et as readStepError,
|
|
5150
5159
|
lr as recencyOf,
|
|
5151
|
-
|
|
5160
|
+
ca as recipientLocale,
|
|
5152
5161
|
Jr as refKey,
|
|
5153
|
-
|
|
5162
|
+
Pi as registrableDomain,
|
|
5154
5163
|
No as rejectExampleCandidate,
|
|
5155
|
-
|
|
5164
|
+
Ua as relatedByDefault,
|
|
5156
5165
|
Ie as remainingMsOf,
|
|
5157
5166
|
xr as requiredAgents,
|
|
5158
5167
|
$r as requirementFor,
|
|
5159
|
-
|
|
5168
|
+
ni as resolveAccountCapabilities,
|
|
5160
5169
|
me as resolveActivityText,
|
|
5161
|
-
|
|
5162
|
-
|
|
5170
|
+
ti as resolveChannelIntents,
|
|
5171
|
+
ra as resolvePrice,
|
|
5163
5172
|
Gn as resolveSignature,
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5173
|
+
Mu as resolveWorkMode,
|
|
5174
|
+
Ru as resourceKindOf,
|
|
5175
|
+
Vc as rollupChildren,
|
|
5167
5176
|
G as roundHalfUp,
|
|
5168
5177
|
sc as runActor,
|
|
5169
|
-
|
|
5178
|
+
Ic as runInteractionId,
|
|
5170
5179
|
On as sanitizeInline,
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5180
|
+
Ai as sanitizeTranscript,
|
|
5181
|
+
tc as scheduleEntryScopeKey,
|
|
5182
|
+
_a as scoreInteraction,
|
|
5183
|
+
bl as scoreWorkItem,
|
|
5184
|
+
xa as selectLenses,
|
|
5176
5185
|
Cr as serviceLevel,
|
|
5177
|
-
|
|
5178
|
-
|
|
5186
|
+
Xl as sessionsHoldCannotReach,
|
|
5187
|
+
zl as sessionsToHold,
|
|
5179
5188
|
vt as shareKeyForTeam,
|
|
5180
5189
|
Mt as shareKeyForUser,
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5190
|
+
Ws as shareKeysForViewer,
|
|
5191
|
+
Ja as shortfalls,
|
|
5192
|
+
vu as shouldRunAudioPipeline,
|
|
5193
|
+
Rc as slaBadgeTone,
|
|
5194
|
+
ya as slaHoursByInbox,
|
|
5186
5195
|
pr as slaHoursFor,
|
|
5187
|
-
|
|
5188
|
-
|
|
5196
|
+
Xo as sortStatuses,
|
|
5197
|
+
ei as sourceKey,
|
|
5189
5198
|
zr as spreadOverWeights,
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5199
|
+
xl as statusIn,
|
|
5200
|
+
yc as stepsOf,
|
|
5201
|
+
Lc as strategyAncestorKeysFor,
|
|
5202
|
+
$c as strategyDossierKeys,
|
|
5194
5203
|
zt as strategyItemScopeKey,
|
|
5195
5204
|
ln as stripHtml,
|
|
5196
5205
|
Ec as subjectKeyOf,
|
|
5197
5206
|
Bt as subjectOf,
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5207
|
+
Wl as subjectRef,
|
|
5208
|
+
vl as suggestProjectKey,
|
|
5209
|
+
Gc as suggestedHealth,
|
|
5210
|
+
Tc as summarizeReactions,
|
|
5211
|
+
uc as targetById,
|
|
5212
|
+
lc as targetForActivityType,
|
|
5213
|
+
Xc as targetOrder,
|
|
5214
|
+
Ar as taxRateFor,
|
|
5206
5215
|
wr as termsFor,
|
|
5207
5216
|
qr as toActingIdentity,
|
|
5208
5217
|
ht as toE164,
|
|
5209
|
-
|
|
5218
|
+
Vs as toolSourceKinds,
|
|
5210
5219
|
Ro as topicOfferedForTeam,
|
|
5211
|
-
|
|
5220
|
+
ol as topicsForTeam,
|
|
5212
5221
|
Or as trafficIntensity,
|
|
5213
|
-
|
|
5214
|
-
|
|
5222
|
+
cl as transactionContext,
|
|
5223
|
+
fl as transactionIdFromScope,
|
|
5215
5224
|
ke as transactionKind,
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5225
|
+
dl as transactionScopeKey,
|
|
5226
|
+
ll as transactionSlots,
|
|
5227
|
+
Ba as transactionTotals,
|
|
5219
5228
|
xo as truncateExample,
|
|
5220
|
-
|
|
5229
|
+
Sl as typeIn,
|
|
5221
5230
|
Al as typesFor,
|
|
5222
|
-
|
|
5223
|
-
|
|
5231
|
+
Dl as uniqueWorkStatusKey,
|
|
5232
|
+
Jc as uniqueWorkTypeKey,
|
|
5224
5233
|
In as usageMetricId,
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5234
|
+
Us as usageMetrics,
|
|
5235
|
+
$l as validateStatuses,
|
|
5236
|
+
cc as valueAtPath,
|
|
5228
5237
|
ve as waitHoursOf,
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5238
|
+
qs as wakesAssignment,
|
|
5239
|
+
wl as workActivityScopeKey,
|
|
5240
|
+
Wo as workItemScopeKey,
|
|
5232
5241
|
Yt as workProjectScopeKey,
|
|
5233
|
-
|
|
5234
|
-
|
|
5242
|
+
Wc as workRatio,
|
|
5243
|
+
Yo as workStatusKey,
|
|
5235
5244
|
Mo as workTypeKey,
|
|
5236
|
-
|
|
5237
|
-
|
|
5245
|
+
Ae as workingMsBetween,
|
|
5246
|
+
nc as workstreamScopeKey
|
|
5238
5247
|
};
|