@alfadocs/ui-kit-debug 1.108.0 → 1.110.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/_chunks/{public-footer-3Jy1zHSs.js → public-footer-DGjLTtNK.js} +30 -30
- package/dist/_chunks/public-footer-DGjLTtNK.js.map +1 -0
- package/dist/_chunks/{reviews-panel-CtrwZOUS.js → reviews-panel-B03auSpQ.js} +210 -207
- package/dist/_chunks/reviews-panel-B03auSpQ.js.map +1 -0
- package/dist/_chunks/{signature-request-DtLph5Z4.js → signature-request-opW0fQ5P.js} +1032 -1016
- package/dist/_chunks/signature-request-opW0fQ5P.js.map +1 -0
- package/dist/_chunks/{signed-out-frame-Bs_LSPWe.js → signed-out-frame-CPow3aCZ.js} +2 -2
- package/dist/_chunks/{signed-out-frame-Bs_LSPWe.js.map → signed-out-frame-CPow3aCZ.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts +7 -0
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +3 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +3 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +3 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +3 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +3 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +3 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +3 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +3 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +3 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +3 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +3 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +3 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +3 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +3 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +3 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +3 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +3 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/locales/ar.json +3 -0
- package/dist/locales/de.json +3 -0
- package/dist/locales/el.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +3 -0
- package/dist/locales/fr.json +3 -0
- package/dist/locales/hi.json +3 -0
- package/dist/locales/it.json +3 -0
- package/dist/locales/ja.json +3 -0
- package/dist/locales/nl.json +3 -0
- package/dist/locales/pl.json +3 -0
- package/dist/locales/pt.json +3 -0
- package/dist/locales/ro.json +3 -0
- package/dist/locales/ru.json +3 -0
- package/dist/locales/sq.json +3 -0
- package/dist/locales/sv.json +3 -0
- package/dist/locales/tr.json +3 -0
- package/dist/locales/zh.json +3 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/required-documents.d.ts +7 -3
- package/dist/patterns/signature-request/required-documents.d.ts.map +1 -1
- package/dist/patterns/signature-request/signature-request.d.ts +27 -21
- package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/public-footer-3Jy1zHSs.js.map +0 -1
- package/dist/_chunks/reviews-panel-CtrwZOUS.js.map +0 -1
- package/dist/_chunks/signature-request-DtLph5Z4.js.map +0 -1
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as n, jsxs as u, Fragment as
|
|
2
|
-
import { useState as _, useRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { D as
|
|
5
|
-
import { Q as
|
|
6
|
-
import { S as
|
|
7
|
-
import { S as
|
|
1
|
+
import { jsx as n, jsxs as u, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { useState as _, useRef as oe, useEffect as je, useId as B, forwardRef as Mi, useLayoutEffect as Qt } from "react";
|
|
3
|
+
import { useTranslation as Fn } from "react-i18next";
|
|
4
|
+
import { D as q } from "./dialog-C7RWaH08.js";
|
|
5
|
+
import { Q as $i } from "./qr-code-DHEma21c.js";
|
|
6
|
+
import { S as zi } from "./spinner-CoflYlEx.js";
|
|
7
|
+
import { S as Ie } from "./skeleton-tTWJpvAq.js";
|
|
8
8
|
import { B as L } from "./button-DohK_Ak_.js";
|
|
9
|
-
import { I as
|
|
10
|
-
import { s as
|
|
11
|
-
import { S as
|
|
12
|
-
import { A as
|
|
13
|
-
import { S as
|
|
14
|
-
import { A as
|
|
15
|
-
import { L as
|
|
16
|
-
import { L as
|
|
17
|
-
import { a as
|
|
18
|
-
import { a as
|
|
19
|
-
import { c as
|
|
20
|
-
import { M as
|
|
21
|
-
import { M as
|
|
22
|
-
import { D as
|
|
23
|
-
import { S as
|
|
24
|
-
import { C as
|
|
25
|
-
import { E as
|
|
26
|
-
import { D as
|
|
27
|
-
import { S as
|
|
28
|
-
import { T as
|
|
29
|
-
import { U as
|
|
30
|
-
import { T as
|
|
31
|
-
import { C as
|
|
32
|
-
import { P as
|
|
33
|
-
import { S as
|
|
34
|
-
import { P as
|
|
35
|
-
import { X as
|
|
9
|
+
import { I as xn } from "./icon-button-S8_weU3g.js";
|
|
10
|
+
import { s as Fi, S as Ue } from "./select-BBDRYxJl.js";
|
|
11
|
+
import { S as ba } from "./switch-DO6uC4HJ.js";
|
|
12
|
+
import { A as j } from "./alert-C4WKViaS.js";
|
|
13
|
+
import { S as Ra } from "./separator-Bdc9bqoJ.js";
|
|
14
|
+
import { A as st } from "./avatar-Dp5apm1d.js";
|
|
15
|
+
import { L as Hi } from "./link-DtCfnLnF.js";
|
|
16
|
+
import { L as ot } from "./list-CNnn7DOD.js";
|
|
17
|
+
import { a as La, T as _a } from "./tooltip-uEBdD1-5.js";
|
|
18
|
+
import { a as Ma } from "./whatsapp-button-DV9JFmtq.js";
|
|
19
|
+
import { c as dt } from "./createLucideIcon-DhHxpK9K.js";
|
|
20
|
+
import { M as $a } from "./mail-BqXVF2zH.js";
|
|
21
|
+
import { M as Bi } from "./message-square-Bye4ATvx.js";
|
|
22
|
+
import { D as Nn } from "./dropdown-menu-CqxBthww.js";
|
|
23
|
+
import { S as ji } from "./signature-status-chip-pIoQjvH8.js";
|
|
24
|
+
import { C as Ui } from "./chevron-down-DWE7GSq9.js";
|
|
25
|
+
import { E as Wi } from "./eye-BjhN2nYf.js";
|
|
26
|
+
import { D as Na } from "./download-CfYKJO_j.js";
|
|
27
|
+
import { S as Gi } from "./share-2-B49jcW2I.js";
|
|
28
|
+
import { T as xa } from "./trash-2-uumy3fy1.js";
|
|
29
|
+
import { U as es } from "./user-plus-BtcOLgNU.js";
|
|
30
|
+
import { T as Vi } from "./triangle-alert-CBnO6nq_.js";
|
|
31
|
+
import { C as Qi } from "./circle-check-BN6rz4NV.js";
|
|
32
|
+
import { P as qa } from "./pen-line-D0De5zdl.js";
|
|
33
|
+
import { S as Ki } from "./send-C5kDJ-Mz.js";
|
|
34
|
+
import { P as at } from "./plus-DzMQ_c6b.js";
|
|
35
|
+
import { X as Ca } from "./x-B5YnXwCz.js";
|
|
36
36
|
/**
|
|
37
37
|
* @license lucide-react v1.22.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const Xi = [
|
|
43
43
|
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
44
44
|
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
45
45
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
46
|
-
],
|
|
46
|
+
], Yi = dt("link-2", Xi);
|
|
47
47
|
/**
|
|
48
48
|
* @license lucide-react v1.22.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
const
|
|
53
|
+
const Ji = [
|
|
54
54
|
["rect", { width: "5", height: "5", x: "3", y: "3", rx: "1", key: "1tu5fj" }],
|
|
55
55
|
["rect", { width: "5", height: "5", x: "16", y: "3", rx: "1", key: "1v8r4q" }],
|
|
56
56
|
["rect", { width: "5", height: "5", x: "3", y: "16", rx: "1", key: "1x03jg" }],
|
|
@@ -63,14 +63,14 @@ const Qi = [
|
|
|
63
63
|
["path", { d: "M16 12h1", key: "1slzba" }],
|
|
64
64
|
["path", { d: "M21 12v.01", key: "1lwtk9" }],
|
|
65
65
|
["path", { d: "M12 21v-1", key: "1880an" }]
|
|
66
|
-
],
|
|
66
|
+
], Zi = dt("qr-code", Ji);
|
|
67
67
|
/**
|
|
68
68
|
* @license lucide-react v1.22.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
const
|
|
73
|
+
const er = [
|
|
74
74
|
["circle", { cx: "8", cy: "21", r: "1", key: "jimo8o" }],
|
|
75
75
|
["circle", { cx: "19", cy: "21", r: "1", key: "13723u" }],
|
|
76
76
|
[
|
|
@@ -80,170 +80,170 @@ const Xi = [
|
|
|
80
80
|
key: "9zh506"
|
|
81
81
|
}
|
|
82
82
|
]
|
|
83
|
-
],
|
|
83
|
+
], nr = dt("shopping-cart", er);
|
|
84
84
|
/**
|
|
85
85
|
* @license lucide-react v1.22.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
89
|
*/
|
|
90
|
-
const
|
|
90
|
+
const tr = [
|
|
91
91
|
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
|
|
92
92
|
["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
|
|
93
|
-
],
|
|
93
|
+
], sr = dt("tablet", tr), ct = [
|
|
94
94
|
"sms",
|
|
95
95
|
"email",
|
|
96
96
|
"on-device"
|
|
97
|
-
],
|
|
97
|
+
], ar = [
|
|
98
98
|
"sms",
|
|
99
99
|
"email",
|
|
100
100
|
"whatsapp",
|
|
101
101
|
"on-device"
|
|
102
102
|
];
|
|
103
|
-
function
|
|
104
|
-
const { t: i } =
|
|
103
|
+
function ns() {
|
|
104
|
+
const { t: i } = Fn("ui");
|
|
105
105
|
return {
|
|
106
106
|
sms: {
|
|
107
107
|
label: i("signatureRequest.viaSms"),
|
|
108
|
-
icon: /* @__PURE__ */ n(
|
|
108
|
+
icon: /* @__PURE__ */ n(Bi, { className: "ds:size-4", "aria-hidden": !0 })
|
|
109
109
|
},
|
|
110
110
|
email: {
|
|
111
111
|
label: i("signatureRequest.viaEmail"),
|
|
112
|
-
icon: /* @__PURE__ */ n(
|
|
112
|
+
icon: /* @__PURE__ */ n($a, { className: "ds:size-4", "aria-hidden": !0 })
|
|
113
113
|
},
|
|
114
114
|
whatsapp: {
|
|
115
115
|
label: i("signatureRequest.viaWhatsapp"),
|
|
116
|
-
icon: /* @__PURE__ */ n(
|
|
116
|
+
icon: /* @__PURE__ */ n(Ma, { className: "ds:size-4", "aria-hidden": !0 })
|
|
117
117
|
},
|
|
118
118
|
"on-device": {
|
|
119
119
|
label: i("signatureRequest.onThisDevice"),
|
|
120
|
-
icon: /* @__PURE__ */ n(
|
|
120
|
+
icon: /* @__PURE__ */ n(sr, { className: "ds:size-4", "aria-hidden": !0 })
|
|
121
121
|
},
|
|
122
122
|
qr: {
|
|
123
123
|
label: i("signatureRequest.viaQr"),
|
|
124
|
-
icon: /* @__PURE__ */ n(
|
|
124
|
+
icon: /* @__PURE__ */ n(Zi, { className: "ds:size-4", "aria-hidden": !0 })
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function za({
|
|
129
129
|
loading: i,
|
|
130
130
|
loadingText: o,
|
|
131
131
|
loadedText: m,
|
|
132
132
|
message: l
|
|
133
133
|
}) {
|
|
134
|
-
const [p,
|
|
135
|
-
return
|
|
136
|
-
i ?
|
|
134
|
+
const [p, w] = _(""), k = oe(!1);
|
|
135
|
+
return je(() => {
|
|
136
|
+
i ? w(o) : k.current && w(m), k.current = i;
|
|
137
137
|
}, [i, o, m]), /* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: l !== void 0 && !i ? l : p });
|
|
138
138
|
}
|
|
139
|
-
const
|
|
140
|
-
function
|
|
139
|
+
const se = "ds:grid ds:grid-cols-[var(--spacing-xl)_minmax(0,1fr)_var(--min-target-size)] ds:@[512px]/person:grid-cols-[var(--spacing-xl)_minmax(0,1fr)_max-content_var(--min-target-size)] ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-sm)]", it = "ds:col-start-1 ds:row-start-1 ds:flex ds:items-center ds:justify-center", Sa = "ds:col-start-2 ds:row-start-1 ds:min-w-0", Kt = "ds:col-[2/-2] ds:row-start-1 ds:min-w-0", rt = "ds:col-[-3/-2] ds:row-start-2 ds:min-w-0 ds:@[512px]/person:row-start-1", Ia = "ds:col-[-2/-1] ds:row-start-1 ds:flex ds:items-center ds:justify-center", H = "ds:col-[2/-2] ds:min-w-0 ds:text-start", zn = "ds:col-[1/-2] ds:row-start-1 ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", ir = "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", Rn = "ds:@container/person";
|
|
140
|
+
function Fa({ meta: i }) {
|
|
141
141
|
return /* @__PURE__ */ n(
|
|
142
142
|
"span",
|
|
143
143
|
{
|
|
144
144
|
"aria-hidden": "true",
|
|
145
145
|
"data-channel-sizer": "",
|
|
146
146
|
className: "ds:invisible ds:block ds:h-0 ds:overflow-hidden",
|
|
147
|
-
children: Object.entries(i).map(([o, { label: m, icon: l }]) => /* @__PURE__ */ n("span", { className: "ds:flex ds:w-max", children: /* @__PURE__ */ u("span", { className:
|
|
147
|
+
children: Object.entries(i).map(([o, { label: m, icon: l }]) => /* @__PURE__ */ n("span", { className: "ds:flex ds:w-max", children: /* @__PURE__ */ u("span", { className: Fi({ size: "md" }), children: [
|
|
148
148
|
/* @__PURE__ */ u("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
149
149
|
/* @__PURE__ */ n("span", { className: "ds:inline-flex ds:shrink-0", children: l }),
|
|
150
150
|
/* @__PURE__ */ n("span", { className: "ds:whitespace-nowrap", children: m })
|
|
151
151
|
] }),
|
|
152
|
-
/* @__PURE__ */ n(
|
|
152
|
+
/* @__PURE__ */ n(Ui, { className: "ds:size-4 ds:shrink-0" })
|
|
153
153
|
] }) }, o))
|
|
154
154
|
}
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const wa = [
|
|
158
158
|
"link",
|
|
159
159
|
"email",
|
|
160
160
|
"whatsapp"
|
|
161
|
-
],
|
|
162
|
-
function
|
|
161
|
+
], rr = [0, 1], lr = "ds:flex ds:flex-col ds:@[512px]/person:grid ds:@[512px]/person:grid-cols-[max-content_minmax(0,1fr)_max-content] ds:@[512px]/person:gap-x-[var(--spacing-md)]", ya = "ds:flex ds:flex-col ds:@[512px]/person:col-span-full ds:@[512px]/person:grid ds:@[512px]/person:grid-cols-subgrid", Xt = "ds:grid ds:grid-cols-[minmax(0,1fr)_max-content] ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-xs)] ds:py-[var(--spacing-xs)] ds:@[512px]/person:col-span-full ds:@[512px]/person:grid-cols-subgrid ds:@[512px]/person:gap-x-[var(--spacing-md)]", ka = "ds:col-start-1 ds:row-start-1 ds:min-w-0 ds:text-start ds:@[512px]/person:col-start-1 ds:@[512px]/person:whitespace-nowrap", Oa = "ds:col-span-full ds:row-start-2 ds:min-w-0 ds:text-start ds:@[512px]/person:col-span-1 ds:@[512px]/person:col-start-2 ds:@[512px]/person:row-start-1", Ta = "ds:col-start-2 ds:row-start-1 ds:flex ds:justify-end ds:@[512px]/person:col-start-3";
|
|
162
|
+
function Ha(i) {
|
|
163
163
|
const o = (i instanceof Date ? i : new Date(i)).getTime();
|
|
164
164
|
return Number.isNaN(o) ? null : o;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return i.map((o, m) => ({ record: o, index: m, ms:
|
|
166
|
+
function or(i) {
|
|
167
|
+
return i.map((o, m) => ({ record: o, index: m, ms: Ha(o.createdAt) })).sort((o, m) => o.ms === m.ms ? o.index - m.index : o.ms === null ? 1 : m.ms === null ? -1 : m.ms - o.ms).map(({ record: o }) => o);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function cr({
|
|
170
170
|
signatures: i,
|
|
171
171
|
loading: o = !1,
|
|
172
172
|
showLegalLevel: m = !0,
|
|
173
173
|
onView: l,
|
|
174
174
|
onDownload: p,
|
|
175
|
-
onShare:
|
|
176
|
-
shareTargets: k =
|
|
177
|
-
onDelete:
|
|
175
|
+
onShare: w,
|
|
176
|
+
shareTargets: k = wa,
|
|
177
|
+
onDelete: W
|
|
178
178
|
}) {
|
|
179
|
-
const { t: R, i18n: Z } =
|
|
180
|
-
link: { label: R("signatureRequest.shareLink"), icon: /* @__PURE__ */ n(
|
|
181
|
-
email: { label: R("signatureRequest.viaEmail"), icon: /* @__PURE__ */ n(
|
|
179
|
+
const { t: R, i18n: Z } = Fn("ui"), $ = ns(), pe = B(), Pe = {
|
|
180
|
+
link: { label: R("signatureRequest.shareLink"), icon: /* @__PURE__ */ n(Yi, {}) },
|
|
181
|
+
email: { label: R("signatureRequest.viaEmail"), icon: /* @__PURE__ */ n($a, {}) },
|
|
182
182
|
whatsapp: {
|
|
183
183
|
label: R("signatureRequest.viaWhatsapp"),
|
|
184
|
-
icon: /* @__PURE__ */ n(
|
|
184
|
+
icon: /* @__PURE__ */ n(Ma, {})
|
|
185
185
|
}
|
|
186
|
-
},
|
|
186
|
+
}, nn = Z.language || "en", Le = nn === "en" ? "en-GB" : nn, y = new Intl.DateTimeFormat(Le, {
|
|
187
187
|
weekday: "short"
|
|
188
|
-
}),
|
|
188
|
+
}), ae = new Intl.DateTimeFormat(Le, {
|
|
189
189
|
day: "2-digit",
|
|
190
190
|
month: "2-digit",
|
|
191
191
|
year: "numeric"
|
|
192
|
-
}),
|
|
192
|
+
}), tn = new Intl.DateTimeFormat(Le, {
|
|
193
193
|
hour: "2-digit",
|
|
194
194
|
minute: "2-digit"
|
|
195
195
|
}), We = (M) => {
|
|
196
196
|
const b = y.format(M);
|
|
197
197
|
return R("signatureRequest.signedAt", {
|
|
198
|
-
weekday: b.charAt(0).toLocaleUpperCase(
|
|
199
|
-
date:
|
|
200
|
-
time:
|
|
198
|
+
weekday: b.charAt(0).toLocaleUpperCase(Le) + b.slice(1),
|
|
199
|
+
date: ae.format(M),
|
|
200
|
+
time: tn.format(M),
|
|
201
201
|
interpolation: { escapeValue: !1 }
|
|
202
202
|
});
|
|
203
|
-
}, we =
|
|
204
|
-
|
|
205
|
-
const M =
|
|
203
|
+
}, we = oe(null), ce = oe(null), Ge = oe(null), [ye, _e] = _();
|
|
204
|
+
je(() => {
|
|
205
|
+
const M = Ge.current;
|
|
206
206
|
if (!M || o) return;
|
|
207
207
|
const b = new Set((i ?? []).map((z) => z.id));
|
|
208
208
|
if (b.has(M.id)) return;
|
|
209
|
-
|
|
209
|
+
Ge.current = null, _e(R("signatureRequest.signatureDeleted"));
|
|
210
210
|
const E = M.order.indexOf(M.id), ee = M.order.slice(E + 1).find((z) => b.has(z)) ?? M.order.slice(0, E).reverse().find((z) => b.has(z));
|
|
211
211
|
window.setTimeout(() => {
|
|
212
|
-
var
|
|
212
|
+
var de, Oe, fe;
|
|
213
213
|
const z = document.activeElement;
|
|
214
214
|
if (!(!z || z === document.body || !z.isConnected || z.matches('[role="dialog"], [role="alertdialog"]'))) return;
|
|
215
215
|
if (ee === void 0) {
|
|
216
|
-
(
|
|
216
|
+
(de = ce.current) == null || de.focus();
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
const
|
|
220
|
-
((
|
|
219
|
+
const U = Array.from(
|
|
220
|
+
((Oe = we.current) == null ? void 0 : Oe.querySelectorAll(
|
|
221
221
|
"[data-signature-id]"
|
|
222
222
|
)) ?? []
|
|
223
|
-
).find((
|
|
224
|
-
(
|
|
223
|
+
).find((ie) => ie.dataset.signatureId === ee);
|
|
224
|
+
(fe = U == null ? void 0 : U.querySelector('[role="group"] button')) == null || fe.focus();
|
|
225
225
|
}, 0);
|
|
226
226
|
}, [i, o, R]);
|
|
227
|
-
const O = i ?
|
|
228
|
-
let
|
|
227
|
+
const O = i ? or(i) : [];
|
|
228
|
+
let ke;
|
|
229
229
|
if (o)
|
|
230
|
-
|
|
230
|
+
ke = /* @__PURE__ */ n(
|
|
231
231
|
"div",
|
|
232
232
|
{
|
|
233
233
|
"aria-busy": "true",
|
|
234
234
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
235
|
-
children:
|
|
235
|
+
children: rr.map((M) => /* @__PURE__ */ u(
|
|
236
236
|
"div",
|
|
237
237
|
{
|
|
238
238
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
239
239
|
children: [
|
|
240
240
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
241
|
-
/* @__PURE__ */ n(
|
|
242
|
-
/* @__PURE__ */ n(
|
|
241
|
+
/* @__PURE__ */ n(Ie, { size: "md", width: "40%" }),
|
|
242
|
+
/* @__PURE__ */ n(Ie, { size: "sm", width: "70%" })
|
|
243
243
|
] }),
|
|
244
|
-
/* @__PURE__ */ n(
|
|
245
|
-
/* @__PURE__ */ n(
|
|
246
|
-
/* @__PURE__ */ n(
|
|
244
|
+
/* @__PURE__ */ n(Ie, { variant: "circular", size: "sm" }),
|
|
245
|
+
/* @__PURE__ */ n(Ie, { variant: "circular", size: "sm" }),
|
|
246
|
+
/* @__PURE__ */ n(Ie, { variant: "circular", size: "sm" })
|
|
247
247
|
]
|
|
248
248
|
},
|
|
249
249
|
M
|
|
@@ -251,10 +251,10 @@ function ir({
|
|
|
251
251
|
}
|
|
252
252
|
);
|
|
253
253
|
else if (O.length === 0)
|
|
254
|
-
|
|
254
|
+
ke = /* @__PURE__ */ n(
|
|
255
255
|
"p",
|
|
256
256
|
{
|
|
257
|
-
ref:
|
|
257
|
+
ref: ce,
|
|
258
258
|
tabIndex: -1,
|
|
259
259
|
"data-note": "no-signed-versions",
|
|
260
260
|
className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:outline-none",
|
|
@@ -263,32 +263,32 @@ function ir({
|
|
|
263
263
|
);
|
|
264
264
|
else {
|
|
265
265
|
const M = "type-label ds:text-[color:var(--muted-foreground)] ds:pb-[var(--spacing-xs)]";
|
|
266
|
-
|
|
266
|
+
ke = // The chip's tooltip and the icon-button tooltips need a provider; the
|
|
267
267
|
// section brings its own so a host without one does not crash.
|
|
268
|
-
/* @__PURE__ */ n(
|
|
268
|
+
/* @__PURE__ */ n(La, { children: /* @__PURE__ */ u(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
271
|
ref: we,
|
|
272
272
|
role: "table",
|
|
273
|
-
"aria-labelledby":
|
|
274
|
-
className:
|
|
273
|
+
"aria-labelledby": pe,
|
|
274
|
+
className: lr,
|
|
275
275
|
children: [
|
|
276
276
|
/* @__PURE__ */ n(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
279
|
role: "rowgroup",
|
|
280
|
-
className: `${
|
|
280
|
+
className: `${ya} ds:sr-only ds:@[512px]/person:not-sr-only`,
|
|
281
281
|
children: /* @__PURE__ */ u(
|
|
282
282
|
"div",
|
|
283
283
|
{
|
|
284
284
|
role: "row",
|
|
285
|
-
className: `${
|
|
285
|
+
className: `${Xt} ds:border-b ds:border-[color:var(--border)]`,
|
|
286
286
|
children: [
|
|
287
287
|
/* @__PURE__ */ n(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
290
290
|
role: "columnheader",
|
|
291
|
-
className: `${
|
|
291
|
+
className: `${ka} ${M}`,
|
|
292
292
|
children: R("signatureRequest.columnDate")
|
|
293
293
|
}
|
|
294
294
|
),
|
|
@@ -296,7 +296,7 @@ function ir({
|
|
|
296
296
|
"span",
|
|
297
297
|
{
|
|
298
298
|
role: "columnheader",
|
|
299
|
-
className: `${
|
|
299
|
+
className: `${Oa} ${M}`,
|
|
300
300
|
children: R("signatureRequest.columnSignatureType")
|
|
301
301
|
}
|
|
302
302
|
),
|
|
@@ -304,7 +304,7 @@ function ir({
|
|
|
304
304
|
"span",
|
|
305
305
|
{
|
|
306
306
|
role: "columnheader",
|
|
307
|
-
className: `${
|
|
307
|
+
className: `${Ta} ${M}`,
|
|
308
308
|
children: R("signatureRequest.columnActions")
|
|
309
309
|
}
|
|
310
310
|
)
|
|
@@ -313,19 +313,19 @@ function ir({
|
|
|
313
313
|
)
|
|
314
314
|
}
|
|
315
315
|
),
|
|
316
|
-
/* @__PURE__ */ n("div", { role: "rowgroup", className:
|
|
317
|
-
const ee =
|
|
318
|
-
(
|
|
319
|
-
) : [],
|
|
316
|
+
/* @__PURE__ */ n("div", { role: "rowgroup", className: ya, children: O.map((b, E) => {
|
|
317
|
+
const ee = Ha(b.createdAt), z = ee === null ? String(b.createdAt) : We(ee), x = ee === null ? void 0 : new Date(ee).toISOString(), U = $[b.channel], de = b.shareTargets ?? k, Oe = w ? wa.filter(
|
|
318
|
+
(ie) => de.includes(ie)
|
|
319
|
+
) : [], fe = l !== void 0 || p !== void 0 || Oe.length > 0 || W !== void 0;
|
|
320
320
|
return /* @__PURE__ */ u(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
323
|
role: "row",
|
|
324
324
|
"data-signature-id": b.id,
|
|
325
|
-
className: E === 0 ?
|
|
325
|
+
className: E === 0 ? Xt : `${Xt} ds:border-t ds:border-[color:var(--border)]`,
|
|
326
326
|
children: [
|
|
327
|
-
/* @__PURE__ */ n("div", { role: "cell", className: `${
|
|
328
|
-
/* @__PURE__ */ n("div", { role: "cell", className:
|
|
327
|
+
/* @__PURE__ */ n("div", { role: "cell", className: `${ka} type-body`, children: /* @__PURE__ */ n("time", { dateTime: x, children: z }) }),
|
|
328
|
+
/* @__PURE__ */ n("div", { role: "cell", className: Oa, children: /* @__PURE__ */ u("span", { className: "type-body-sm ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
329
329
|
m && b.legalLevel ? /* @__PURE__ */ n("span", { children: b.legalLevel === "advanced" ? R("signatureRequest.legalLevelAdvanced") : R("signatureRequest.legalLevelSimple") }) : null,
|
|
330
330
|
/* @__PURE__ */ u("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
331
331
|
/* @__PURE__ */ n(
|
|
@@ -333,13 +333,13 @@ function ir({
|
|
|
333
333
|
{
|
|
334
334
|
"aria-hidden": "true",
|
|
335
335
|
className: "ds:text-[var(--accent)]",
|
|
336
|
-
children:
|
|
336
|
+
children: U.icon
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
|
-
|
|
339
|
+
U.label
|
|
340
340
|
] }),
|
|
341
341
|
/* @__PURE__ */ n(
|
|
342
|
-
|
|
342
|
+
ji,
|
|
343
343
|
{
|
|
344
344
|
size: "sm",
|
|
345
345
|
operator: b.operator,
|
|
@@ -350,7 +350,7 @@ function ir({
|
|
|
350
350
|
}
|
|
351
351
|
)
|
|
352
352
|
] }) }),
|
|
353
|
-
/* @__PURE__ */ n("div", { role: "cell", className:
|
|
353
|
+
/* @__PURE__ */ n("div", { role: "cell", className: Ta, children: fe ? /* @__PURE__ */ u(
|
|
354
354
|
"span",
|
|
355
355
|
{
|
|
356
356
|
role: "group",
|
|
@@ -361,32 +361,32 @@ function ir({
|
|
|
361
361
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
362
362
|
children: [
|
|
363
363
|
l ? /* @__PURE__ */ n(
|
|
364
|
-
|
|
364
|
+
xn,
|
|
365
365
|
{
|
|
366
366
|
intent: "ghost",
|
|
367
367
|
size: "sm",
|
|
368
|
-
icon: /* @__PURE__ */ n(
|
|
368
|
+
icon: /* @__PURE__ */ n(Wi, {}),
|
|
369
369
|
"aria-label": R("signatureRequest.viewSignature"),
|
|
370
370
|
tooltip: R("signatureRequest.viewSignature"),
|
|
371
371
|
onClick: () => l(b.id)
|
|
372
372
|
}
|
|
373
373
|
) : null,
|
|
374
374
|
p && b.hasAnonymisedVersion ? /* @__PURE__ */ u(
|
|
375
|
-
|
|
375
|
+
Ea,
|
|
376
376
|
{
|
|
377
377
|
id: `signature-download-${b.id}`,
|
|
378
378
|
label: R("signatureRequest.downloadSignature"),
|
|
379
|
-
icon: /* @__PURE__ */ n(
|
|
379
|
+
icon: /* @__PURE__ */ n(Na, {}),
|
|
380
380
|
children: [
|
|
381
381
|
/* @__PURE__ */ n(
|
|
382
|
-
|
|
382
|
+
Nn.Item,
|
|
383
383
|
{
|
|
384
384
|
onSelect: () => p(b.id, "full"),
|
|
385
385
|
children: R("signatureRequest.downloadFull")
|
|
386
386
|
}
|
|
387
387
|
),
|
|
388
388
|
/* @__PURE__ */ n(
|
|
389
|
-
|
|
389
|
+
Nn.Item,
|
|
390
390
|
{
|
|
391
391
|
onSelect: () => p(b.id, "anonymised"),
|
|
392
392
|
children: R("signatureRequest.downloadAnonymised")
|
|
@@ -398,45 +398,45 @@ function ir({
|
|
|
398
398
|
// One file only: a menu with a single entry would
|
|
399
399
|
// be an extra click for nothing.
|
|
400
400
|
/* @__PURE__ */ n(
|
|
401
|
-
|
|
401
|
+
xn,
|
|
402
402
|
{
|
|
403
403
|
intent: "ghost",
|
|
404
404
|
size: "sm",
|
|
405
|
-
icon: /* @__PURE__ */ n(
|
|
405
|
+
icon: /* @__PURE__ */ n(Na, {}),
|
|
406
406
|
"aria-label": R("signatureRequest.downloadSignature"),
|
|
407
407
|
tooltip: R("signatureRequest.downloadSignature"),
|
|
408
408
|
onClick: () => p(b.id, "full")
|
|
409
409
|
}
|
|
410
410
|
)
|
|
411
411
|
) : null,
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
w && Oe.length > 0 ? /* @__PURE__ */ n(
|
|
413
|
+
Ea,
|
|
414
414
|
{
|
|
415
415
|
id: `signature-share-${b.id}`,
|
|
416
416
|
label: R("signatureRequest.shareSignature"),
|
|
417
|
-
icon: /* @__PURE__ */ n(
|
|
418
|
-
children:
|
|
419
|
-
|
|
417
|
+
icon: /* @__PURE__ */ n(Gi, {}),
|
|
418
|
+
children: Oe.map((ie) => /* @__PURE__ */ n(
|
|
419
|
+
Nn.Item,
|
|
420
420
|
{
|
|
421
|
-
startIcon:
|
|
422
|
-
onSelect: () =>
|
|
423
|
-
children:
|
|
421
|
+
startIcon: Pe[ie].icon,
|
|
422
|
+
onSelect: () => w(b.id, ie),
|
|
423
|
+
children: Pe[ie].label
|
|
424
424
|
},
|
|
425
|
-
|
|
425
|
+
ie
|
|
426
426
|
))
|
|
427
427
|
}
|
|
428
428
|
) : null,
|
|
429
|
-
|
|
430
|
-
|
|
429
|
+
W ? /* @__PURE__ */ n(
|
|
430
|
+
dr,
|
|
431
431
|
{
|
|
432
432
|
id: `signature-delete-${b.id}`,
|
|
433
433
|
when: z,
|
|
434
|
-
dateTime:
|
|
434
|
+
dateTime: x,
|
|
435
435
|
onConfirm: () => {
|
|
436
|
-
|
|
436
|
+
Ge.current = {
|
|
437
437
|
id: b.id,
|
|
438
|
-
order: O.map((
|
|
439
|
-
},
|
|
438
|
+
order: O.map((ie) => ie.id)
|
|
439
|
+
}, _e(""), W(b.id);
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
) : null
|
|
@@ -455,36 +455,36 @@ function ir({
|
|
|
455
455
|
return /* @__PURE__ */ u(
|
|
456
456
|
"section",
|
|
457
457
|
{
|
|
458
|
-
"aria-labelledby":
|
|
458
|
+
"aria-labelledby": pe,
|
|
459
459
|
"data-section": "signed-versions",
|
|
460
|
-
className: `${
|
|
460
|
+
className: `${Rn} ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start`,
|
|
461
461
|
children: [
|
|
462
|
-
/* @__PURE__ */ n("div", { className:
|
|
462
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ n("div", { className: zn, children: /* @__PURE__ */ n(
|
|
463
463
|
"h3",
|
|
464
464
|
{
|
|
465
|
-
id:
|
|
465
|
+
id: pe,
|
|
466
466
|
className: "type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
467
467
|
children: R("signatureRequest.signedVersions")
|
|
468
468
|
}
|
|
469
469
|
) }) }),
|
|
470
|
-
/* @__PURE__ */ n("div", { className:
|
|
470
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ u("div", { className: "ds:col-[1/-2] ds:min-w-0", children: [
|
|
471
471
|
/* @__PURE__ */ n(
|
|
472
|
-
|
|
472
|
+
za,
|
|
473
473
|
{
|
|
474
474
|
loading: o,
|
|
475
475
|
loadingText: R("signatureRequest.signaturesLoading"),
|
|
476
476
|
loadedText: R("signatureRequest.signaturesLoaded"),
|
|
477
|
-
message:
|
|
477
|
+
message: ye
|
|
478
478
|
}
|
|
479
479
|
),
|
|
480
|
-
|
|
480
|
+
ke
|
|
481
481
|
] }) })
|
|
482
482
|
]
|
|
483
483
|
}
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const [i, o] = _(!1), m =
|
|
486
|
+
function Ba() {
|
|
487
|
+
const [i, o] = _(!1), m = oe(!1);
|
|
488
488
|
return {
|
|
489
489
|
tooltipProps: {
|
|
490
490
|
open: i,
|
|
@@ -507,18 +507,18 @@ function $a() {
|
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
const p =
|
|
510
|
+
function Ea({ id: i, label: o, icon: m, children: l }) {
|
|
511
|
+
const p = Ba();
|
|
512
512
|
return /* @__PURE__ */ u(
|
|
513
|
-
|
|
513
|
+
Nn.Root,
|
|
514
514
|
{
|
|
515
515
|
id: i,
|
|
516
|
-
onOpenChange: (
|
|
517
|
-
|
|
516
|
+
onOpenChange: (w) => {
|
|
517
|
+
w && p.hideTip();
|
|
518
518
|
},
|
|
519
519
|
children: [
|
|
520
|
-
/* @__PURE__ */ n(
|
|
521
|
-
|
|
520
|
+
/* @__PURE__ */ n(_a, { label: o, ...p.tooltipProps, children: /* @__PURE__ */ n(Nn.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
521
|
+
xn,
|
|
522
522
|
{
|
|
523
523
|
intent: "ghost",
|
|
524
524
|
size: "sm",
|
|
@@ -528,7 +528,7 @@ function ya({ id: i, label: o, icon: m, children: l }) {
|
|
|
528
528
|
}
|
|
529
529
|
) }) }),
|
|
530
530
|
/* @__PURE__ */ n(
|
|
531
|
-
|
|
531
|
+
Nn.Content,
|
|
532
532
|
{
|
|
533
533
|
align: "end",
|
|
534
534
|
onCloseAutoFocus: p.markReturning,
|
|
@@ -539,47 +539,47 @@ function ya({ id: i, label: o, icon: m, children: l }) {
|
|
|
539
539
|
}
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
const { t: p } =
|
|
542
|
+
function dr({ id: i, when: o, dateTime: m, onConfirm: l }) {
|
|
543
|
+
const { t: p } = Fn("ui"), w = Ba(), [k, W] = _(!1), R = p("signatureRequest.deleteSignature");
|
|
544
544
|
return /* @__PURE__ */ u(
|
|
545
|
-
|
|
545
|
+
q,
|
|
546
546
|
{
|
|
547
547
|
id: i,
|
|
548
548
|
open: k,
|
|
549
549
|
onOpenChange: (Z) => {
|
|
550
|
-
Z &&
|
|
550
|
+
Z && w.hideTip(), W(Z);
|
|
551
551
|
},
|
|
552
552
|
children: [
|
|
553
|
-
/* @__PURE__ */ n(
|
|
554
|
-
|
|
553
|
+
/* @__PURE__ */ n(_a, { label: R, ...w.tooltipProps, children: /* @__PURE__ */ n(q.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
554
|
+
xn,
|
|
555
555
|
{
|
|
556
556
|
intent: "destructiveOutline",
|
|
557
557
|
size: "sm",
|
|
558
|
-
icon: /* @__PURE__ */ n(
|
|
558
|
+
icon: /* @__PURE__ */ n(xa, {}),
|
|
559
559
|
"aria-label": R,
|
|
560
|
-
...
|
|
560
|
+
...w.triggerProps
|
|
561
561
|
}
|
|
562
562
|
) }) }),
|
|
563
563
|
/* @__PURE__ */ u(
|
|
564
|
-
|
|
564
|
+
q.Content,
|
|
565
565
|
{
|
|
566
566
|
variant: "alert",
|
|
567
567
|
size: "sm",
|
|
568
|
-
onCloseAutoFocus:
|
|
568
|
+
onCloseAutoFocus: w.markReturning,
|
|
569
569
|
children: [
|
|
570
|
-
/* @__PURE__ */ u(
|
|
571
|
-
/* @__PURE__ */ n(
|
|
572
|
-
/* @__PURE__ */ n(
|
|
570
|
+
/* @__PURE__ */ u(q.Header, { children: [
|
|
571
|
+
/* @__PURE__ */ n(q.Title, { children: p("signatureRequest.deleteSignatureConfirm") }),
|
|
572
|
+
/* @__PURE__ */ n(q.Description, { children: /* @__PURE__ */ n("time", { dateTime: m, children: o }) })
|
|
573
573
|
] }),
|
|
574
|
-
/* @__PURE__ */ u(
|
|
575
|
-
/* @__PURE__ */ n(
|
|
574
|
+
/* @__PURE__ */ u(q.Footer, { children: [
|
|
575
|
+
/* @__PURE__ */ n(q.Close, { asChild: !0, children: /* @__PURE__ */ n(L, { intent: "outline", children: p("common.cancel") }) }),
|
|
576
576
|
/* @__PURE__ */ n(
|
|
577
577
|
L,
|
|
578
578
|
{
|
|
579
579
|
intent: "destructive",
|
|
580
|
-
startIcon: /* @__PURE__ */ n(
|
|
580
|
+
startIcon: /* @__PURE__ */ n(xa, {}),
|
|
581
581
|
onClick: () => {
|
|
582
|
-
l(),
|
|
582
|
+
l(), W(!1);
|
|
583
583
|
},
|
|
584
584
|
children: R
|
|
585
585
|
}
|
|
@@ -592,41 +592,41 @@ function rr({ id: i, when: o, dateTime: m, onConfirm: l }) {
|
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
function
|
|
595
|
+
const K = "__assign-later__";
|
|
596
|
+
function ur(i) {
|
|
597
597
|
return i.filter((o) => o.signed !== !0);
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function hr(i) {
|
|
600
600
|
return i.length > 0 && i.every(
|
|
601
601
|
(o) => o.kind === "document" && o.canCarrySecondary === !0
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function en(i) {
|
|
605
605
|
return i.requiresOperator;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function ja(i, o) {
|
|
608
608
|
return i.filter((m) => m.deleted !== !0 || m.value === o).map(({ deleted: m, ...l }) => l);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Ua(i, o) {
|
|
611
611
|
return i.some(
|
|
612
612
|
(m) => m.value === o && m.disabled !== !0 && m.deleted !== !0
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function Wa(i, o) {
|
|
616
616
|
const m = i.filter((l) => l.disabled === !0 && l.deleted !== !0).map(
|
|
617
617
|
(l) => l.description ? `${l.label} (${l.description})` : l.label
|
|
618
618
|
);
|
|
619
619
|
if (m.length !== 0)
|
|
620
620
|
return new Intl.ListFormat(o || "en", { type: "unit" }).format(m);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function lt({
|
|
623
623
|
items: i,
|
|
624
624
|
channel: o,
|
|
625
625
|
primaryIsPatient: m
|
|
626
626
|
}) {
|
|
627
|
-
return
|
|
627
|
+
return hr(i) ? m ? "patient" : o !== "on-device" ? "channel" : null : i.some((l) => l.kind === "anamnesis") ? "anamnesis" : "documents";
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function mr({
|
|
630
630
|
primaryId: i,
|
|
631
631
|
secondId: o,
|
|
632
632
|
channel: m,
|
|
@@ -635,33 +635,33 @@ function cr({
|
|
|
635
635
|
if (o === i) return "sameAsPrimary";
|
|
636
636
|
const p = l.find((k) => k.value === o);
|
|
637
637
|
if (!p || p.isPatient === !0) return "unknownSignee";
|
|
638
|
-
const
|
|
639
|
-
var
|
|
640
|
-
return (!p.availableChannels || p.availableChannels.length === 0 || p.availableChannels.includes(k)) && !((
|
|
638
|
+
const w = (k) => {
|
|
639
|
+
var W;
|
|
640
|
+
return (!p.availableChannels || p.availableChannels.length === 0 || p.availableChannels.includes(k)) && !((W = p.unavailableChannels) != null && W.some((R) => R.channel === k));
|
|
641
641
|
};
|
|
642
|
-
return m === "sms" && !
|
|
642
|
+
return m === "sms" && !w("sms") ? "missingPhone" : (m === "email" || m === "whatsapp") && !w("email") ? "missingEmail" : null;
|
|
643
643
|
}
|
|
644
|
-
const
|
|
645
|
-
function
|
|
644
|
+
const gr = [0, 1, 2], pr = "ds:grid ds:grid-cols-1 ds:@[512px]/person:grid-cols-2 ds:items-center ds:gap-[var(--spacing-sm)] ds:font-normal", fr = "ds:grid ds:grid-cols-1 ds:@[512px]/person:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_max-content] ds:items-center ds:gap-[var(--spacing-sm)] ds:font-normal", vr = "ds:min-w-0 ds:font-medium", br = "ds:col-span-full ds:min-w-0 ds:font-medium", Yt = "ds:block ds:min-w-0", Da = "ds:!gap-[var(--spacing-sm)] ds:!p-[var(--spacing-sm)]";
|
|
645
|
+
function Rr({
|
|
646
646
|
items: i,
|
|
647
647
|
loading: o = !1,
|
|
648
648
|
operatorOptions: m,
|
|
649
649
|
assignments: l,
|
|
650
650
|
onAssign: p,
|
|
651
|
-
onAssignAllToMe:
|
|
651
|
+
onAssignAllToMe: w,
|
|
652
652
|
busy: k = !1,
|
|
653
|
-
showOperatorChannels:
|
|
653
|
+
showOperatorChannels: W = !1,
|
|
654
654
|
operatorChannels: R = {},
|
|
655
655
|
onOperatorChannel: Z
|
|
656
656
|
}) {
|
|
657
|
-
const { t: $, i18n:
|
|
657
|
+
const { t: $, i18n: pe } = Fn("ui"), Pe = ns(), nn = ct.map(
|
|
658
658
|
(O) => ({
|
|
659
659
|
value: O,
|
|
660
|
-
label:
|
|
661
|
-
startAdornment:
|
|
660
|
+
label: Pe[O].label,
|
|
661
|
+
startAdornment: Pe[O].icon
|
|
662
662
|
})
|
|
663
|
-
),
|
|
664
|
-
|
|
663
|
+
), Le = B(), y = B(), ae = B(), tn = /* @__PURE__ */ n(
|
|
664
|
+
za,
|
|
665
665
|
{
|
|
666
666
|
loading: o,
|
|
667
667
|
loadingText: $("signatureRequest.requiredLoading"),
|
|
@@ -669,20 +669,20 @@ function pr({
|
|
|
669
669
|
}
|
|
670
670
|
);
|
|
671
671
|
if (o)
|
|
672
|
-
return /* @__PURE__ */ u(
|
|
673
|
-
|
|
672
|
+
return /* @__PURE__ */ u(ge, { children: [
|
|
673
|
+
tn,
|
|
674
674
|
/* @__PURE__ */ n(
|
|
675
675
|
"div",
|
|
676
676
|
{
|
|
677
677
|
"aria-busy": "true",
|
|
678
678
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
679
|
-
children:
|
|
679
|
+
children: gr.map((O) => /* @__PURE__ */ u(
|
|
680
680
|
"div",
|
|
681
681
|
{
|
|
682
682
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
683
683
|
children: [
|
|
684
|
-
/* @__PURE__ */ n(
|
|
685
|
-
/* @__PURE__ */ n(
|
|
684
|
+
/* @__PURE__ */ n(Ie, { size: "md", width: "50%" }),
|
|
685
|
+
/* @__PURE__ */ n(Ie, { size: "sm", width: "30%" })
|
|
686
686
|
]
|
|
687
687
|
},
|
|
688
688
|
O
|
|
@@ -690,69 +690,69 @@ function pr({
|
|
|
690
690
|
}
|
|
691
691
|
)
|
|
692
692
|
] });
|
|
693
|
-
const We = i.filter((O) => O.kind === "document"), we = i.filter((O) => O.kind === "anamnesis"),
|
|
694
|
-
(O) =>
|
|
695
|
-
),
|
|
696
|
-
(O) => O.some(
|
|
697
|
-
),
|
|
693
|
+
const We = i.filter((O) => O.kind === "document"), we = i.filter((O) => O.kind === "anamnesis"), ce = i.some(
|
|
694
|
+
(O) => en(O) && l[O.id] === K
|
|
695
|
+
), Ge = [We, we].find(
|
|
696
|
+
(O) => O.some(en)
|
|
697
|
+
), ye = Wa(m, pe.language), _e = (O, ke, M) => {
|
|
698
698
|
if (O.length === 0) return null;
|
|
699
|
-
const b = O ===
|
|
699
|
+
const b = O === Ge;
|
|
700
700
|
return /* @__PURE__ */ u(
|
|
701
701
|
"section",
|
|
702
702
|
{
|
|
703
|
-
className: `${
|
|
703
|
+
className: `${Rn} ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]`,
|
|
704
704
|
children: [
|
|
705
|
-
/* @__PURE__ */ u("div", { className:
|
|
706
|
-
/* @__PURE__ */ u("div", { className:
|
|
705
|
+
/* @__PURE__ */ u("div", { className: se, children: [
|
|
706
|
+
/* @__PURE__ */ u("div", { className: zn, children: [
|
|
707
707
|
/* @__PURE__ */ n(
|
|
708
708
|
"p",
|
|
709
709
|
{
|
|
710
|
-
id:
|
|
710
|
+
id: ke,
|
|
711
711
|
className: "type-eyebrow ds:text-[color:var(--muted-foreground)]",
|
|
712
712
|
children: M
|
|
713
713
|
}
|
|
714
714
|
),
|
|
715
|
-
b &&
|
|
715
|
+
b && w ? /* @__PURE__ */ n(
|
|
716
716
|
L,
|
|
717
717
|
{
|
|
718
718
|
intent: "outline",
|
|
719
719
|
size: "sm",
|
|
720
|
-
startIcon: /* @__PURE__ */ n(
|
|
720
|
+
startIcon: /* @__PURE__ */ n(es, {}),
|
|
721
721
|
disabled: k,
|
|
722
|
-
onClick:
|
|
722
|
+
onClick: w,
|
|
723
723
|
children: $("signatureRequest.assignAllToMe")
|
|
724
724
|
}
|
|
725
725
|
) : null
|
|
726
726
|
] }),
|
|
727
|
-
b &&
|
|
728
|
-
|
|
727
|
+
b && ce ? /* @__PURE__ */ n(
|
|
728
|
+
j,
|
|
729
729
|
{
|
|
730
730
|
variant: "info",
|
|
731
731
|
"data-note": "assign-later",
|
|
732
|
-
className: `${
|
|
733
|
-
children: /* @__PURE__ */ n(
|
|
732
|
+
className: `${H} ${Da}`,
|
|
733
|
+
children: /* @__PURE__ */ n(j.Description, { children: $("signatureRequest.assignLaterNote") })
|
|
734
734
|
}
|
|
735
735
|
) : null,
|
|
736
|
-
b && !
|
|
737
|
-
|
|
736
|
+
b && !W ? /* @__PURE__ */ n(
|
|
737
|
+
j,
|
|
738
738
|
{
|
|
739
739
|
variant: "info",
|
|
740
740
|
"data-note": "operator-channel",
|
|
741
|
-
className: `${
|
|
742
|
-
children: /* @__PURE__ */ n(
|
|
741
|
+
className: `${H} ${Da}`,
|
|
742
|
+
children: /* @__PURE__ */ n(j.Description, { children: $("signatureRequest.operatorChannelNote") })
|
|
743
743
|
}
|
|
744
744
|
) : null
|
|
745
745
|
] }),
|
|
746
|
-
/* @__PURE__ */ n("div", { className:
|
|
747
|
-
|
|
746
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ n(
|
|
747
|
+
ot,
|
|
748
748
|
{
|
|
749
749
|
density: "relaxed",
|
|
750
|
-
"aria-labelledby":
|
|
751
|
-
className:
|
|
750
|
+
"aria-labelledby": ke,
|
|
751
|
+
className: H,
|
|
752
752
|
children: O.map((E) => {
|
|
753
|
-
const ee =
|
|
753
|
+
const ee = en(E), z = ee && W, x = ee && l[E.id] !== void 0 && l[E.id] !== K && l[E.id] !== "";
|
|
754
754
|
return /* @__PURE__ */ n(
|
|
755
|
-
|
|
755
|
+
ot.Item,
|
|
756
756
|
{
|
|
757
757
|
value: E.id,
|
|
758
758
|
"data-required-item-id": E.id,
|
|
@@ -760,23 +760,23 @@ function pr({
|
|
|
760
760
|
title: /* @__PURE__ */ u(
|
|
761
761
|
"span",
|
|
762
762
|
{
|
|
763
|
-
className: z ?
|
|
763
|
+
className: z ? fr : pr,
|
|
764
764
|
children: [
|
|
765
|
-
/* @__PURE__ */ n("span", { className: ee ?
|
|
766
|
-
ee ? /* @__PURE__ */ n("span", { className:
|
|
765
|
+
/* @__PURE__ */ n("span", { className: ee ? vr : br, children: E.name }),
|
|
766
|
+
ee ? /* @__PURE__ */ n("span", { className: Yt, children: /* @__PURE__ */ n(
|
|
767
767
|
Ue,
|
|
768
768
|
{
|
|
769
769
|
id: `signature-request-item-operator-${E.id}`,
|
|
770
|
-
options:
|
|
770
|
+
options: ja(
|
|
771
771
|
m,
|
|
772
772
|
l[E.id]
|
|
773
773
|
),
|
|
774
774
|
value: l[E.id],
|
|
775
|
-
onValueChange: (
|
|
776
|
-
|
|
775
|
+
onValueChange: (U) => {
|
|
776
|
+
U && Ua(m, U) && p(E.id, U);
|
|
777
777
|
},
|
|
778
778
|
showDescriptions: !0,
|
|
779
|
-
"aria-describedby":
|
|
779
|
+
"aria-describedby": ye ? ae : void 0,
|
|
780
780
|
required: !0,
|
|
781
781
|
disabled: k,
|
|
782
782
|
placeholder: $(
|
|
@@ -795,13 +795,13 @@ function pr({
|
|
|
795
795
|
/* @__PURE__ */ u(
|
|
796
796
|
"span",
|
|
797
797
|
{
|
|
798
|
-
className:
|
|
798
|
+
className: x ? Yt : `${Yt} ds:hidden ds:@[512px]/person:block`,
|
|
799
799
|
children: [
|
|
800
|
-
|
|
800
|
+
x ? /* @__PURE__ */ n(
|
|
801
801
|
Ue,
|
|
802
802
|
{
|
|
803
803
|
id: `signature-request-item-operator-channel-${E.id}`,
|
|
804
|
-
options:
|
|
804
|
+
options: nn,
|
|
805
805
|
value: R[E.id],
|
|
806
806
|
adornmentInTrigger: !0,
|
|
807
807
|
disabled: k,
|
|
@@ -809,17 +809,17 @@ function pr({
|
|
|
809
809
|
"signatureRequest.itemOperatorChannelLabel",
|
|
810
810
|
{ name: E.name }
|
|
811
811
|
),
|
|
812
|
-
onValueChange: (
|
|
813
|
-
|
|
814
|
-
|
|
812
|
+
onValueChange: (U) => {
|
|
813
|
+
ct.includes(
|
|
814
|
+
U
|
|
815
815
|
) && (Z == null || Z(
|
|
816
816
|
E.id,
|
|
817
|
-
|
|
817
|
+
U
|
|
818
818
|
));
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
) : null,
|
|
822
|
-
/* @__PURE__ */ n(
|
|
822
|
+
/* @__PURE__ */ n(Fa, { meta: Pe })
|
|
823
823
|
]
|
|
824
824
|
}
|
|
825
825
|
)
|
|
@@ -837,18 +837,18 @@ function pr({
|
|
|
837
837
|
}
|
|
838
838
|
);
|
|
839
839
|
};
|
|
840
|
-
return /* @__PURE__ */ u(
|
|
841
|
-
|
|
842
|
-
|
|
840
|
+
return /* @__PURE__ */ u(ge, { children: [
|
|
841
|
+
tn,
|
|
842
|
+
ye ? /* @__PURE__ */ n("span", { id: ae, className: "ds:sr-only", children: ye }) : null,
|
|
843
843
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)] ds:text-start", children: [
|
|
844
|
-
|
|
844
|
+
_e(
|
|
845
845
|
We,
|
|
846
|
-
|
|
846
|
+
Le,
|
|
847
847
|
$("signatureRequest.requiredDocumentsHeading", {
|
|
848
848
|
count: We.length
|
|
849
849
|
})
|
|
850
850
|
),
|
|
851
|
-
|
|
851
|
+
_e(
|
|
852
852
|
we,
|
|
853
853
|
y,
|
|
854
854
|
$("signatureRequest.requiredAnamnesisHeading", {
|
|
@@ -858,7 +858,7 @@ function pr({
|
|
|
858
858
|
] })
|
|
859
859
|
] });
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function Nr(i, o, { required: m = !1 } = {}) {
|
|
862
862
|
switch (i) {
|
|
863
863
|
case "linkSent":
|
|
864
864
|
return m ? {
|
|
@@ -880,7 +880,7 @@ function fr(i, o, { required: m = !1 } = {}) {
|
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function xr({
|
|
884
884
|
outcome: i
|
|
885
885
|
}) {
|
|
886
886
|
const o = i === "creditsExhausted";
|
|
@@ -894,60 +894,60 @@ function vr({
|
|
|
894
894
|
{
|
|
895
895
|
"aria-hidden": "true",
|
|
896
896
|
className: o ? "ds:text-[color:var(--warning)]" : "ds:text-[color:var(--success)]",
|
|
897
|
-
children: o ? /* @__PURE__ */ n(
|
|
897
|
+
children: o ? /* @__PURE__ */ n(Vi, { className: "ds:size-[var(--icon-size-lg)]" }) : /* @__PURE__ */ n(Qi, { className: "ds:size-[var(--icon-size-lg)]" })
|
|
898
898
|
}
|
|
899
899
|
)
|
|
900
900
|
}
|
|
901
901
|
);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function qr(i) {
|
|
904
904
|
return i === "addSignee" || i === "addSecondSignee";
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function Cr({
|
|
907
907
|
options: i,
|
|
908
908
|
rosterIds: o,
|
|
909
909
|
rosterCap: m
|
|
910
910
|
}) {
|
|
911
911
|
const l = i.find((k) => k.isPatient === !0);
|
|
912
912
|
if ((l == null ? void 0 : l.isMinor) !== !0) return null;
|
|
913
|
-
const p = i.filter((k) => k.isPatient !== !0),
|
|
913
|
+
const p = i.filter((k) => k.isPatient !== !0), w = p.filter(
|
|
914
914
|
(k) => o.includes(k.value)
|
|
915
915
|
);
|
|
916
|
-
return
|
|
916
|
+
return w.length === 0 ? p.length === 0 ? "addSignee" : "selectSignee" : w.length > 1 || o.length >= m ? null : p.length > 1 ? "selectSecondSignee" : "addSecondSignee";
|
|
917
917
|
}
|
|
918
|
-
const
|
|
918
|
+
const bn = [
|
|
919
919
|
"sms",
|
|
920
920
|
"email",
|
|
921
921
|
"whatsapp",
|
|
922
922
|
"on-device",
|
|
923
923
|
"qr"
|
|
924
|
-
],
|
|
924
|
+
], Aa = [
|
|
925
925
|
"sms",
|
|
926
926
|
"email",
|
|
927
927
|
"whatsapp"
|
|
928
|
-
],
|
|
928
|
+
], Jt = "__create-signee__", Sr = ["operator", "signers"], Pa = "signature-request-batch-channel", Zt = {
|
|
929
929
|
anamnesis: "signatureRequest.secondSigneeUnavailableAnamnesis",
|
|
930
930
|
documents: "signatureRequest.secondSigneeUnavailableDocuments",
|
|
931
931
|
patient: "signatureRequest.secondSigneeUnavailablePatient",
|
|
932
932
|
channel: "signatureRequest.secondSigneeUnavailableChannel"
|
|
933
|
-
},
|
|
933
|
+
}, Ir = {
|
|
934
934
|
sms: "signatureRequest.addMobileNumber",
|
|
935
935
|
whatsapp: "signatureRequest.addMobileNumber",
|
|
936
936
|
email: "signatureRequest.addEmailAddress",
|
|
937
937
|
"on-device": "signatureRequest.editContactDetails",
|
|
938
938
|
qr: "signatureRequest.editContactDetails"
|
|
939
|
-
},
|
|
939
|
+
}, wr = {
|
|
940
940
|
addSignee: "signatureRequest.minorPatientAddSignee",
|
|
941
941
|
selectSignee: "signatureRequest.minorPatientSelectSignee",
|
|
942
942
|
selectSecondSignee: "signatureRequest.minorPatientSelectSecondSignee",
|
|
943
943
|
addSecondSignee: "signatureRequest.minorPatientAddSecondSignee"
|
|
944
|
-
},
|
|
944
|
+
}, yr = {
|
|
945
945
|
sameAsPrimary: "signatureRequest.secondSigneeSameAsPrimary",
|
|
946
946
|
unknownSignee: "signatureRequest.secondSigneeUnknown",
|
|
947
947
|
missingPhone: "signatureRequest.secondSigneeMissingPhone",
|
|
948
948
|
missingEmail: "signatureRequest.secondSigneeMissingEmail"
|
|
949
949
|
};
|
|
950
|
-
function
|
|
950
|
+
function kr(i, o, m) {
|
|
951
951
|
const l = i instanceof Date ? i : new Date(i);
|
|
952
952
|
if (Number.isNaN(l.getTime())) return null;
|
|
953
953
|
const p = { hour: "2-digit", minute: "2-digit" };
|
|
@@ -962,220 +962,220 @@ function Sr(i, o, m) {
|
|
|
962
962
|
}).format(l)
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Ae(i, o) {
|
|
966
966
|
var m;
|
|
967
967
|
return ((m = i.find((l) => l.value === o)) == null ? void 0 : m.label) ?? "";
|
|
968
968
|
}
|
|
969
|
-
const
|
|
969
|
+
const Or = Mi(
|
|
970
970
|
({
|
|
971
971
|
open: i,
|
|
972
972
|
onOpenChange: o,
|
|
973
973
|
operators: m,
|
|
974
974
|
signerOptions: l,
|
|
975
975
|
currentOperatorId: p,
|
|
976
|
-
allowAssignLater:
|
|
976
|
+
allowAssignLater: w = !0,
|
|
977
977
|
requireOperator: k = !0,
|
|
978
|
-
requirePatient:
|
|
978
|
+
requirePatient: W = !0,
|
|
979
979
|
initialOperatorId: R,
|
|
980
980
|
initialOperatorChannel: Z,
|
|
981
981
|
initialSigners: $,
|
|
982
|
-
maxSigners:
|
|
983
|
-
channelMode:
|
|
984
|
-
initialBatchChannel:
|
|
985
|
-
confirmRecipients:
|
|
982
|
+
maxSigners: pe = 2,
|
|
983
|
+
channelMode: Pe = "perSigner",
|
|
984
|
+
initialBatchChannel: nn,
|
|
985
|
+
confirmRecipients: Le = !1,
|
|
986
986
|
busy: y = !1,
|
|
987
|
-
error:
|
|
988
|
-
title:
|
|
987
|
+
error: ae,
|
|
988
|
+
title: tn,
|
|
989
989
|
description: We,
|
|
990
990
|
onRequestSignature: we,
|
|
991
|
-
qrCodes:
|
|
992
|
-
qrPending:
|
|
993
|
-
onQrDone:
|
|
994
|
-
signatures:
|
|
991
|
+
qrCodes: ce,
|
|
992
|
+
qrPending: Ge = !1,
|
|
993
|
+
onQrDone: ye,
|
|
994
|
+
signatures: _e,
|
|
995
995
|
signaturesLoading: O = !1,
|
|
996
|
-
showLegalLevel:
|
|
996
|
+
showLegalLevel: ke = !0,
|
|
997
997
|
onViewSignature: M,
|
|
998
998
|
onDownloadSignature: b,
|
|
999
999
|
onShareSignature: E,
|
|
1000
1000
|
signatureShareTargets: ee,
|
|
1001
1001
|
onDeleteSignature: z,
|
|
1002
|
-
resolveChannels:
|
|
1003
|
-
requiredItems:
|
|
1004
|
-
requiredItemsLoading:
|
|
1005
|
-
showOperatorChannels:
|
|
1006
|
-
outcome:
|
|
1007
|
-
onBuyMoreSignatures:
|
|
1008
|
-
onOutcomeCancel:
|
|
1009
|
-
onAddSignee:
|
|
1010
|
-
loading:
|
|
1011
|
-
batchChannelPlacement:
|
|
1012
|
-
signerAddAction:
|
|
1013
|
-
secondSigneeSlot:
|
|
1014
|
-
linkOnDevice:
|
|
1015
|
-
contentProps:
|
|
1016
|
-
},
|
|
1017
|
-
var
|
|
1018
|
-
const { t: r, i18n:
|
|
1002
|
+
resolveChannels: x,
|
|
1003
|
+
requiredItems: U,
|
|
1004
|
+
requiredItemsLoading: de = !1,
|
|
1005
|
+
showOperatorChannels: Oe = !1,
|
|
1006
|
+
outcome: fe,
|
|
1007
|
+
onBuyMoreSignatures: ie,
|
|
1008
|
+
onOutcomeCancel: ts,
|
|
1009
|
+
onAddSignee: re,
|
|
1010
|
+
loading: sn = !1,
|
|
1011
|
+
batchChannelPlacement: Ga = "below",
|
|
1012
|
+
signerAddAction: ss = "addRow",
|
|
1013
|
+
secondSigneeSlot: Hn = !1,
|
|
1014
|
+
linkOnDevice: Va = !1,
|
|
1015
|
+
contentProps: Qa
|
|
1016
|
+
}, Ka) => {
|
|
1017
|
+
var ca, da, ua, ha, ma, ga;
|
|
1018
|
+
const { t: r, i18n: ut } = Fn("ui"), an = oe(0), qn = oe(null), as = oe(null), rn = oe(null), is = oe(null), ne = oe(null), ht = B(), rs = B(), ls = B(), os = B(), mt = B(), gt = B(), cs = B(), Xa = B(), ds = B(), Ya = B(), us = B(), Ja = B(), hs = B(), Bn = B(), f = U !== void 0 || de, te = U ? ur(U) : [], X = k && !f, ue = W || f, v = Pe === "batch", Cn = v && Ga === "inline", G = Hn && ue && pe >= 2, Me = Va && X && ue, Sn = (e) => {
|
|
1019
1019
|
var t;
|
|
1020
1020
|
return ((t = l.find((s) => s.value === e)) == null ? void 0 : t.isPatient) === !0;
|
|
1021
|
-
},
|
|
1021
|
+
}, ln = (e, t) => {
|
|
1022
1022
|
var a, c, d;
|
|
1023
|
-
return
|
|
1023
|
+
return f ? lt({
|
|
1024
1024
|
items: te,
|
|
1025
1025
|
channel: v ? t : ((c = e[0]) == null ? void 0 : c.channel) ?? t,
|
|
1026
|
-
primaryIsPatient:
|
|
1027
|
-
}) === null ? Math.min(
|
|
1028
|
-
}, [
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1026
|
+
primaryIsPatient: Sn((d = e[0]) == null ? void 0 : d.signerId)
|
|
1027
|
+
}) === null ? Math.min(pe, 2) : 1 : G ? Sn((a = e[0]) == null ? void 0 : a.signerId) ? 1 : 2 : pe;
|
|
1028
|
+
}, [pt, on] = _(!1), [Za, ft] = _(!1), [ei, ni] = _(fe);
|
|
1029
|
+
fe !== ei && (ni(fe), ft(!1), fe !== void 0 && on(!1));
|
|
1030
|
+
const ve = (Za ? void 0 : fe) ?? (U !== void 0 && !de && te.length === 0 ? "allSigned" : void 0), In = ve ? Nr(ve, r, { required: f }) : null, wn = (e) => {
|
|
1031
1031
|
var t;
|
|
1032
1032
|
return new Map(
|
|
1033
1033
|
(((t = l.find((s) => s.value === e)) == null ? void 0 : t.unavailableChannels) ?? []).map(({ channel: s, reason: a }) => [s, a])
|
|
1034
1034
|
);
|
|
1035
|
-
},
|
|
1035
|
+
}, ms = (e, t) => {
|
|
1036
1036
|
var c;
|
|
1037
1037
|
const s = ((c = l.find((d) => d.value === e)) == null ? void 0 : c.unavailableChannels) ?? [], a = [];
|
|
1038
1038
|
for (const d of t) {
|
|
1039
|
-
const h = s.find((
|
|
1039
|
+
const h = s.find((I) => I.channel === d);
|
|
1040
1040
|
if (!(h != null && h.actionHref) || /^\s*javascript:/i.test(h.actionHref))
|
|
1041
1041
|
continue;
|
|
1042
|
-
const g = h.actionLabel ?? r(
|
|
1042
|
+
const g = h.actionLabel ?? r(Ir[d]);
|
|
1043
1043
|
a.some(
|
|
1044
|
-
(
|
|
1044
|
+
(I) => I.href === h.actionHref && I.label === g
|
|
1045
1045
|
) || a.push({ href: h.actionHref, label: g });
|
|
1046
1046
|
}
|
|
1047
1047
|
return a;
|
|
1048
|
-
},
|
|
1048
|
+
}, vt = (e, t) => {
|
|
1049
1049
|
var h;
|
|
1050
1050
|
const s = (h = l.find(
|
|
1051
1051
|
(g) => g.value === e
|
|
1052
|
-
)) == null ? void 0 : h.availableChannels, a = s && s.length > 0 ?
|
|
1052
|
+
)) == null ? void 0 : h.availableChannels, a = s && s.length > 0 ? bn.filter((g) => s.includes(g)) : bn;
|
|
1053
1053
|
if (!t) return a;
|
|
1054
|
-
const c =
|
|
1054
|
+
const c = wn(e), d = a.filter((g) => t.includes(g));
|
|
1055
1055
|
return d.some((g) => !c.has(g)) ? d : a;
|
|
1056
|
-
},
|
|
1057
|
-
const s =
|
|
1058
|
-
return
|
|
1056
|
+
}, $e = (e, t) => {
|
|
1057
|
+
const s = wn(e);
|
|
1058
|
+
return vt(e, t).filter(
|
|
1059
1059
|
(a) => !s.has(a)
|
|
1060
1060
|
);
|
|
1061
|
-
},
|
|
1061
|
+
}, cn = (e) => {
|
|
1062
1062
|
const t = e == null ? void 0 : e.operatorAvailableChannels;
|
|
1063
|
-
return t && t.length > 0 ?
|
|
1064
|
-
},
|
|
1065
|
-
const s =
|
|
1063
|
+
return t && t.length > 0 ? ar.filter((s) => t.includes(s)) : ct;
|
|
1064
|
+
}, yn = (e, t) => {
|
|
1065
|
+
const s = $e(e);
|
|
1066
1066
|
return s.includes(t) ? t : s[0] ?? t;
|
|
1067
|
-
},
|
|
1067
|
+
}, dn = l.find(
|
|
1068
1068
|
(e) => e.isPatient === !0
|
|
1069
|
-
),
|
|
1070
|
-
const t =
|
|
1071
|
-
for (const a of
|
|
1072
|
-
if (a === "on-device" || t.some((d) =>
|
|
1073
|
-
const c = t.map((d) =>
|
|
1069
|
+
), gs = (e) => e === void 0 ? [] : dn && dn.value !== e ? [e, dn.value] : [e], bt = (e) => {
|
|
1070
|
+
const t = gs(e), s = /* @__PURE__ */ new Map();
|
|
1071
|
+
for (const a of bn) {
|
|
1072
|
+
if (a === "on-device" || t.some((d) => $e(d).includes(a))) continue;
|
|
1073
|
+
const c = t.map((d) => wn(d).get(a)).find((d) => d !== void 0);
|
|
1074
1074
|
c !== void 0 && s.set(a, c);
|
|
1075
1075
|
}
|
|
1076
1076
|
return s;
|
|
1077
|
-
},
|
|
1078
|
-
if (e === void 0) return
|
|
1079
|
-
const s =
|
|
1080
|
-
(g) => s.some((T) =>
|
|
1081
|
-
), c =
|
|
1082
|
-
return
|
|
1077
|
+
}, ps = (e, t) => {
|
|
1078
|
+
if (e === void 0) return bn;
|
|
1079
|
+
const s = gs(e), a = bn.filter(
|
|
1080
|
+
(g) => s.some((T) => vt(T).includes(g))
|
|
1081
|
+
), c = bt(e), d = t ? a.filter((g) => t.includes(g)) : a, h = d.some((g) => !c.has(g)) ? d : a;
|
|
1082
|
+
return bn.filter(
|
|
1083
1083
|
(g) => g === "on-device" || h.includes(g)
|
|
1084
1084
|
);
|
|
1085
|
-
},
|
|
1086
|
-
const s =
|
|
1087
|
-
return
|
|
1085
|
+
}, kn = (e, t) => {
|
|
1086
|
+
const s = bt(e);
|
|
1087
|
+
return ps(e, t).filter(
|
|
1088
1088
|
(a) => !s.has(a)
|
|
1089
1089
|
);
|
|
1090
|
-
},
|
|
1091
|
-
const s =
|
|
1090
|
+
}, fs = (e, t = !0) => {
|
|
1091
|
+
const s = kn(e), a = (t ? nn : void 0) ?? (Sn(e) && s.includes("sms") ? "sms" : "email");
|
|
1092
1092
|
return s.includes(a) ? a : s[0];
|
|
1093
|
-
},
|
|
1093
|
+
}, vs = (ca = m.find(
|
|
1094
1094
|
(e) => e.disabled !== !0 && e.deleted !== !0
|
|
1095
|
-
)) == null ? void 0 :
|
|
1095
|
+
)) == null ? void 0 : ca.value, bs = (e) => e === null ? w ? K : vs ?? K : e ?? vs ?? (w ? K : ""), ti = () => bs(R), si = () => {
|
|
1096
1096
|
const e = $ && $.length > 0 ? $ : l.length > 0 ? [
|
|
1097
1097
|
{
|
|
1098
1098
|
signerId: l[0].value,
|
|
1099
|
-
channel:
|
|
1099
|
+
channel: yn(l[0].value, "on-device")
|
|
1100
1100
|
}
|
|
1101
1101
|
] : [];
|
|
1102
1102
|
return (G ? e.slice(0, 2) : e).map((t) => {
|
|
1103
|
-
const s =
|
|
1103
|
+
const s = yn(t.signerId, t.channel), { skipOtp: a, ...c } = t;
|
|
1104
1104
|
return {
|
|
1105
1105
|
...c,
|
|
1106
1106
|
channel: s,
|
|
1107
1107
|
...s === "on-device" && a !== void 0 ? { skipOtp: a } : {},
|
|
1108
|
-
rowId:
|
|
1108
|
+
rowId: an.current++
|
|
1109
1109
|
};
|
|
1110
1110
|
});
|
|
1111
|
-
},
|
|
1111
|
+
}, ai = x !== void 0 && !f, Y = (e, t = !0) => {
|
|
1112
1112
|
var a;
|
|
1113
1113
|
const s = ((a = m.find((c) => c.value === e)) == null ? void 0 : a.defaultChannel) ?? "email";
|
|
1114
|
-
return s === "whatsapp" && !
|
|
1115
|
-
},
|
|
1116
|
-
const a =
|
|
1114
|
+
return s === "whatsapp" && !ai || s === "on-device" && !t ? "email" : s;
|
|
1115
|
+
}, Rs = (e, t) => Z === "on-device" ? t ? "on-device" : Y(e, !1) : Z === "whatsapp" ? Y(e, t) : Z ?? Y(e, t), Ns = (e, t, s) => {
|
|
1116
|
+
const a = cn(e), c = e.operatorChannel ?? s, d = Y(t), h = d === "whatsapp" && !a.includes("whatsapp") ? "email" : d;
|
|
1117
1117
|
return a.includes(c) ? c : a.includes(h) ? h : a[0];
|
|
1118
|
-
},
|
|
1119
|
-
const d =
|
|
1118
|
+
}, On = (e, t, s, a, c = "on-device") => {
|
|
1119
|
+
const d = X && e !== K && e !== "", h = f || G ? s.slice(0, ln(s, c)) : s, g = {};
|
|
1120
1120
|
if (ue)
|
|
1121
1121
|
for (const T of h) {
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1122
|
+
const I = [...wn(T.signerId).keys()];
|
|
1123
|
+
I.length > 0 && (g[T.signerId] = I);
|
|
1124
1124
|
}
|
|
1125
1125
|
return {
|
|
1126
1126
|
operatorId: d ? e : null,
|
|
1127
1127
|
operatorChannel: d ? t : null,
|
|
1128
1128
|
signers: ue ? h.map(
|
|
1129
|
-
({ rowId: T, ...
|
|
1129
|
+
({ rowId: T, ...I }) => v ? { signerId: I.signerId, channel: c } : I
|
|
1130
1130
|
) : [],
|
|
1131
1131
|
changed: a,
|
|
1132
1132
|
...Object.keys(g).length > 0 ? { signerUnavailableChannels: g } : {}
|
|
1133
1133
|
};
|
|
1134
|
-
},
|
|
1135
|
-
const d =
|
|
1136
|
-
var
|
|
1137
|
-
if (
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
(
|
|
1141
|
-
), he = ((
|
|
1142
|
-
return
|
|
1134
|
+
}, Rt = (e, t, s, a, c) => {
|
|
1135
|
+
const d = On(t, s, a, c), h = e(d), g = d.operatorChannel === null ? s : Ns(h, t, s), T = d.signers.length, I = a.map((A, xe) => {
|
|
1136
|
+
var qe, Ce;
|
|
1137
|
+
if (xe >= T) return A;
|
|
1138
|
+
const Q = $e(
|
|
1139
|
+
A.signerId,
|
|
1140
|
+
(qe = h.signerAvailableChannels) == null ? void 0 : qe[A.signerId]
|
|
1141
|
+
), he = ((Ce = h.signers.find((Be) => Be.signerId === A.signerId)) == null ? void 0 : Ce.channel) ?? A.channel, Se = Q.includes(he) ? he : Q[0] ?? A.channel;
|
|
1142
|
+
return Se === A.channel ? A : { ...A, channel: Se, skipOtp: void 0 };
|
|
1143
1143
|
});
|
|
1144
|
-
return { operatorChannel: g, rows:
|
|
1145
|
-
},
|
|
1146
|
-
var
|
|
1147
|
-
const d = (
|
|
1148
|
-
if (!
|
|
1149
|
-
const he =
|
|
1144
|
+
return { operatorChannel: g, rows: I };
|
|
1145
|
+
}, xs = (e, t, s, a = "", c = "email") => {
|
|
1146
|
+
var A, xe, Q;
|
|
1147
|
+
const d = (A = e[0]) == null ? void 0 : A.signerId;
|
|
1148
|
+
if (!x) {
|
|
1149
|
+
const he = kn(d);
|
|
1150
1150
|
return {
|
|
1151
1151
|
batch: he.includes(t) ? t : he[0],
|
|
1152
1152
|
operatorChannel: c
|
|
1153
1153
|
};
|
|
1154
1154
|
}
|
|
1155
|
-
const h =
|
|
1155
|
+
const h = On(a, c, e, s, t), g = x(h), T = kn(
|
|
1156
1156
|
d,
|
|
1157
|
-
d === void 0 || (
|
|
1158
|
-
),
|
|
1157
|
+
d === void 0 || (xe = g.signerAvailableChannels) == null ? void 0 : xe[d]
|
|
1158
|
+
), I = ((Q = g.signers.find((he) => he.signerId === d)) == null ? void 0 : Q.channel) ?? t;
|
|
1159
1159
|
return {
|
|
1160
|
-
batch: T.includes(
|
|
1161
|
-
operatorChannel: h.operatorChannel === null ? c :
|
|
1160
|
+
batch: T.includes(I) ? I : T.includes(t) ? t : T[0],
|
|
1161
|
+
operatorChannel: h.operatorChannel === null ? c : Ns(g, a, c)
|
|
1162
1162
|
};
|
|
1163
|
-
},
|
|
1163
|
+
}, ii = () => {
|
|
1164
1164
|
var c, d;
|
|
1165
|
-
const e =
|
|
1165
|
+
const e = ti(), t = si();
|
|
1166
1166
|
if (v) {
|
|
1167
|
-
const h =
|
|
1167
|
+
const h = xs(
|
|
1168
1168
|
t,
|
|
1169
|
-
|
|
1169
|
+
fs((c = t[0]) == null ? void 0 : c.signerId),
|
|
1170
1170
|
null,
|
|
1171
1171
|
e,
|
|
1172
|
-
Z ??
|
|
1172
|
+
Z ?? Y(e)
|
|
1173
1173
|
);
|
|
1174
1174
|
return {
|
|
1175
1175
|
operator: e,
|
|
1176
1176
|
rows: t,
|
|
1177
1177
|
// Required documents mode has no operator row: nothing reads it.
|
|
1178
|
-
operatorChannel:
|
|
1178
|
+
operatorChannel: x ? h.operatorChannel : Rs(
|
|
1179
1179
|
e,
|
|
1180
1180
|
t.length > 0 && h.batch === "on-device"
|
|
1181
1181
|
),
|
|
@@ -1184,20 +1184,20 @@ const wr = Di(
|
|
|
1184
1184
|
};
|
|
1185
1185
|
}
|
|
1186
1186
|
const s = { batchChannel: "on-device", otpOverride: null };
|
|
1187
|
-
if (!
|
|
1187
|
+
if (!x)
|
|
1188
1188
|
return {
|
|
1189
1189
|
operator: e,
|
|
1190
1190
|
rows: t,
|
|
1191
|
-
operatorChannel:
|
|
1191
|
+
operatorChannel: Rs(
|
|
1192
1192
|
e,
|
|
1193
1193
|
t.some((h) => h.channel === "on-device")
|
|
1194
1194
|
),
|
|
1195
1195
|
...s
|
|
1196
1196
|
};
|
|
1197
|
-
const a =
|
|
1198
|
-
|
|
1197
|
+
const a = Rt(
|
|
1198
|
+
x,
|
|
1199
1199
|
e,
|
|
1200
|
-
Z ??
|
|
1200
|
+
Z ?? Y(e),
|
|
1201
1201
|
t,
|
|
1202
1202
|
null
|
|
1203
1203
|
);
|
|
@@ -1207,20 +1207,20 @@ const wr = Di(
|
|
|
1207
1207
|
operatorChannel: a.operatorChannel,
|
|
1208
1208
|
...s
|
|
1209
1209
|
};
|
|
1210
|
-
},
|
|
1211
|
-
const e =
|
|
1212
|
-
if (!
|
|
1210
|
+
}, qs = () => {
|
|
1211
|
+
const e = ii();
|
|
1212
|
+
if (!Me || e.operator === K || e.operator === "")
|
|
1213
1213
|
return e;
|
|
1214
|
-
const t = e.rows.slice(0,
|
|
1214
|
+
const t = e.rows.slice(0, ln(e.rows, e.batchChannel));
|
|
1215
1215
|
if (!(v ? t.length > 0 && e.batchChannel === "on-device" : t.some(
|
|
1216
|
-
(c) => c.channel === "on-device" &&
|
|
1216
|
+
(c) => c.channel === "on-device" && $e(c.signerId).length > 0
|
|
1217
1217
|
))) {
|
|
1218
1218
|
if (e.operatorChannel !== "on-device") return e;
|
|
1219
|
-
const c =
|
|
1220
|
-
if (!
|
|
1221
|
-
const d =
|
|
1222
|
-
|
|
1223
|
-
|
|
1219
|
+
const c = Y(e.operator, !1);
|
|
1220
|
+
if (!x) return { ...e, operatorChannel: c };
|
|
1221
|
+
const d = cn(
|
|
1222
|
+
x(
|
|
1223
|
+
On(
|
|
1224
1224
|
e.operator,
|
|
1225
1225
|
e.operatorChannel,
|
|
1226
1226
|
e.rows,
|
|
@@ -1231,9 +1231,9 @@ const wr = Di(
|
|
|
1231
1231
|
).filter((g) => g !== "on-device"), h = d.includes(c) ? c : d[0];
|
|
1232
1232
|
return h === void 0 ? e : { ...e, operatorChannel: h };
|
|
1233
1233
|
}
|
|
1234
|
-
return (
|
|
1235
|
-
|
|
1236
|
-
|
|
1234
|
+
return (x ? cn(
|
|
1235
|
+
x(
|
|
1236
|
+
On(
|
|
1237
1237
|
e.operator,
|
|
1238
1238
|
e.operatorChannel,
|
|
1239
1239
|
e.rows,
|
|
@@ -1242,330 +1242,331 @@ const wr = Di(
|
|
|
1242
1242
|
)
|
|
1243
1243
|
)
|
|
1244
1244
|
).includes("on-device") : !0) ? { ...e, operatorChannel: "on-device" } : e;
|
|
1245
|
-
}, [
|
|
1246
|
-
|
|
1247
|
-
), [S,
|
|
1248
|
-
|
|
1249
|
-
), [
|
|
1250
|
-
|
|
1251
|
-
), [
|
|
1245
|
+
}, [Tn] = _(qs), [D, Nt] = _(Tn.operator), [C, be] = _(Tn.rows), [F, Re] = _(
|
|
1246
|
+
Tn.operatorChannel
|
|
1247
|
+
), [S, Cs] = _(
|
|
1248
|
+
Tn.batchChannel
|
|
1249
|
+
), [ri, xt] = _(
|
|
1250
|
+
Tn.otpOverride
|
|
1251
|
+
), [li, Ve] = _(!1), qt = ln(C, S), N = f || G ? C.slice(0, qt) : C, [oi, Ct] = _({}), un = {};
|
|
1252
1252
|
for (const e of te)
|
|
1253
|
-
|
|
1253
|
+
en(e) && (un[e.id] = oi[e.id] ?? bs(
|
|
1254
1254
|
e.initialOperatorId !== void 0 ? e.initialOperatorId : R
|
|
1255
1255
|
));
|
|
1256
|
-
const [
|
|
1256
|
+
const [ci, St] = _({}), It = {};
|
|
1257
1257
|
for (const e of te) {
|
|
1258
|
-
const t =
|
|
1259
|
-
t === void 0 || t ===
|
|
1258
|
+
const t = un[e.id];
|
|
1259
|
+
t === void 0 || t === K || t === "" || (It[e.id] = ci[e.id] ?? Y(t));
|
|
1260
1260
|
}
|
|
1261
|
-
const
|
|
1262
|
-
e.length !== 0 &&
|
|
1261
|
+
const Ss = (e) => {
|
|
1262
|
+
e.length !== 0 && St(
|
|
1263
1263
|
(t) => Object.fromEntries(
|
|
1264
1264
|
Object.entries(t).filter(([s]) => !e.includes(s))
|
|
1265
1265
|
)
|
|
1266
1266
|
);
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1269
|
-
},
|
|
1270
|
-
p !== void 0 && (
|
|
1267
|
+
}, di = (e, t) => {
|
|
1268
|
+
un[e] !== t && Ss([e]), Ct((s) => ({ ...s, [e]: t }));
|
|
1269
|
+
}, ui = () => {
|
|
1270
|
+
p !== void 0 && (Ss(
|
|
1271
1271
|
te.filter(
|
|
1272
|
-
(e) =>
|
|
1272
|
+
(e) => en(e) && un[e.id] !== p
|
|
1273
1273
|
).map((e) => e.id)
|
|
1274
|
-
),
|
|
1274
|
+
), Ct((e) => {
|
|
1275
1275
|
const t = { ...e };
|
|
1276
1276
|
for (const s of te)
|
|
1277
|
-
|
|
1277
|
+
en(s) && (t[s.id] = p);
|
|
1278
1278
|
return t;
|
|
1279
1279
|
}));
|
|
1280
|
-
}, [
|
|
1280
|
+
}, [Is, le] = _(null), [hi, ze] = _(
|
|
1281
1281
|
null
|
|
1282
|
-
), [
|
|
1283
|
-
i !==
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
if (
|
|
1287
|
-
const e =
|
|
1288
|
-
|
|
1282
|
+
), [mi, jn] = _(!1), [gi, En] = _(0), wt = !f && (_e !== void 0 || O), [pi, fi] = _(i);
|
|
1283
|
+
i !== pi && (fi(i), i && (jn(!1), En(0), ft(!1), on(!1)));
|
|
1284
|
+
const Un = i && !sn && !de, ws = oe(Un);
|
|
1285
|
+
Qt(() => {
|
|
1286
|
+
if (Un && !ws.current) {
|
|
1287
|
+
const e = qs();
|
|
1288
|
+
Nt(e.operator), be(e.rows), Re(e.operatorChannel), Cs(e.batchChannel), xt(e.otpOverride), le(null), ze(null), Ct({}), St({}), Ve(!1), on(!1), jn(!1), En(0);
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1291
|
-
}, [
|
|
1292
|
-
const
|
|
1293
|
-
(e) => e.channel === "on-device" && !
|
|
1294
|
-
),
|
|
1295
|
-
|
|
1296
|
-
if (!(
|
|
1297
|
-
const e =
|
|
1298
|
-
|
|
1290
|
+
ws.current = Un;
|
|
1291
|
+
}, [Un]);
|
|
1292
|
+
const yt = (e) => $e(e).length === 0, Ne = v ? N.length > 0 && S === "on-device" : N.some(
|
|
1293
|
+
(e) => e.channel === "on-device" && !yt(e.signerId)
|
|
1294
|
+
), hn = x !== void 0;
|
|
1295
|
+
je(() => {
|
|
1296
|
+
if (!(hn || !X) && F === "on-device" && !Ne) {
|
|
1297
|
+
const e = Y(D, !1);
|
|
1298
|
+
Re(e), le(e);
|
|
1299
1299
|
}
|
|
1300
|
-
}, [
|
|
1301
|
-
const
|
|
1300
|
+
}, [F, Ne, D, hn, X]);
|
|
1301
|
+
const ys = w ? [{ value: K, label: r("signatureRequest.assignLater") }] : [], ks = m.map(
|
|
1302
1302
|
({ value: e, label: t, disabled: s, reason: a, deleted: c }) => ({
|
|
1303
1303
|
value: e,
|
|
1304
1304
|
label: t,
|
|
1305
1305
|
...s === !0 ? { disabled: !0, ...a ? { description: a } : {} } : {},
|
|
1306
1306
|
...c === !0 ? { deleted: !0 } : {}
|
|
1307
1307
|
})
|
|
1308
|
-
),
|
|
1309
|
-
|
|
1310
|
-
) : void 0,
|
|
1308
|
+
), Wn = f ? [...ys, ...ks] : [...ks, ...ys], kt = Wa(Wn, ut.language), Os = B(), Fe = D === K, V = ns(), J = x ? x(
|
|
1309
|
+
On(D, F, C, null, S)
|
|
1310
|
+
) : void 0, Gn = X && !Fe && D !== "", Ts = hn ? cn(J).includes("on-device") : !0, Es = (e) => {
|
|
1311
1311
|
var t;
|
|
1312
|
-
return
|
|
1312
|
+
return $e(
|
|
1313
1313
|
e.signerId,
|
|
1314
|
-
(t =
|
|
1314
|
+
(t = J == null ? void 0 : J.signerAvailableChannels) == null ? void 0 : t[e.signerId]
|
|
1315
1315
|
).includes("on-device");
|
|
1316
|
-
},
|
|
1317
|
-
if (!
|
|
1318
|
-
const e =
|
|
1319
|
-
|
|
1320
|
-
).filter((s) => s !== "on-device"), t =
|
|
1316
|
+
}, Vn = v ? void 0 : N[0] && Es(N[0]) ? N[0] : N.find(Es), vi = Ne || (v ? N.length > 0 : Vn !== void 0), Ot = Me && Gn && Ne && Ts, Qn = (e) => Me && Ne && Ts ? "on-device" : e, Kn = (() => {
|
|
1317
|
+
if (!hn || !Gn) return;
|
|
1318
|
+
const e = cn(
|
|
1319
|
+
J
|
|
1320
|
+
).filter((s) => s !== "on-device"), t = Y(D, !1);
|
|
1321
1321
|
return e.includes(t) ? t : e[0];
|
|
1322
1322
|
})();
|
|
1323
|
-
|
|
1324
|
-
if (!(!
|
|
1325
|
-
if (
|
|
1326
|
-
|
|
1323
|
+
je(() => {
|
|
1324
|
+
if (!(!Me || !Gn)) {
|
|
1325
|
+
if (Ot && F !== "on-device") {
|
|
1326
|
+
Re("on-device"), le(null), ze(
|
|
1327
1327
|
r("signatureRequest.operatorChannelChanged", {
|
|
1328
1328
|
channel: V["on-device"].label
|
|
1329
1329
|
})
|
|
1330
1330
|
);
|
|
1331
1331
|
return;
|
|
1332
1332
|
}
|
|
1333
|
-
|
|
1333
|
+
Kn !== void 0 && !Ne && F === "on-device" && (Re(Kn), le(Kn));
|
|
1334
1334
|
}
|
|
1335
1335
|
}, [
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1336
|
+
Me,
|
|
1337
|
+
Gn,
|
|
1338
|
+
Ot,
|
|
1339
|
+
Ne,
|
|
1340
|
+
F,
|
|
1341
|
+
Kn
|
|
1342
1342
|
]);
|
|
1343
|
-
const
|
|
1344
|
-
(t) => t.channel === "on-device" &&
|
|
1345
|
-
),
|
|
1346
|
-
if (!
|
|
1343
|
+
const Ds = (e, t, s) => !Me || e === K || e === "" ? t : s ? "on-device" : t === "on-device" ? Y(e, !1) : t, bi = (e) => e.slice(0, ln(e, S)).some(
|
|
1344
|
+
(t) => t.channel === "on-device" && $e(t.signerId).length > 0
|
|
1345
|
+
), Te = (e, t, s, a, c = []) => {
|
|
1346
|
+
if (!x) return;
|
|
1347
1347
|
if (v) {
|
|
1348
|
-
|
|
1348
|
+
He(s, S, {
|
|
1349
1349
|
operatorId: e,
|
|
1350
1350
|
opChannel: t,
|
|
1351
1351
|
changed: a
|
|
1352
1352
|
});
|
|
1353
1353
|
return;
|
|
1354
1354
|
}
|
|
1355
|
-
const d =
|
|
1356
|
-
|
|
1355
|
+
const d = Rt(
|
|
1356
|
+
x,
|
|
1357
1357
|
e,
|
|
1358
|
-
|
|
1358
|
+
Ds(e, t, bi(s)),
|
|
1359
1359
|
s,
|
|
1360
1360
|
a
|
|
1361
1361
|
);
|
|
1362
|
-
|
|
1362
|
+
Re(d.operatorChannel), be(d.rows), le(null);
|
|
1363
1363
|
const h = [];
|
|
1364
|
-
|
|
1364
|
+
X && e !== K && e !== "" && d.operatorChannel !== t && h.push(
|
|
1365
1365
|
r("signatureRequest.operatorChannelChanged", {
|
|
1366
1366
|
channel: V[d.operatorChannel].label
|
|
1367
1367
|
})
|
|
1368
|
-
), d.rows.forEach((T,
|
|
1369
|
-
T.channel !== s[
|
|
1368
|
+
), d.rows.forEach((T, I) => {
|
|
1369
|
+
T.channel !== s[I].channel && h.push(
|
|
1370
1370
|
r("signatureRequest.signerChannelChanged", {
|
|
1371
|
-
name:
|
|
1371
|
+
name: Ae(l, T.signerId),
|
|
1372
1372
|
channel: V[T.channel].label
|
|
1373
1373
|
})
|
|
1374
1374
|
);
|
|
1375
|
-
}), h.push(...c),
|
|
1376
|
-
},
|
|
1375
|
+
}), h.push(...c), ze(h.length > 0 ? h.join(" ") : null);
|
|
1376
|
+
}, As = (e, t) => f && N.length === 1 && C.length > 1 && e.length > 1 && t > 1, Ps = (e) => r("signatureRequest.secondSigneeReturned", {
|
|
1377
|
+
name: Ae(l, e)
|
|
1378
|
+
}), He = (e, t, {
|
|
1377
1379
|
primaryChanged: s = !1,
|
|
1378
1380
|
clearSecond: a = !1,
|
|
1379
1381
|
userChannel: c = !1,
|
|
1380
|
-
operatorId: d =
|
|
1381
|
-
opChannel: h =
|
|
1382
|
+
operatorId: d = D,
|
|
1383
|
+
opChannel: h = F,
|
|
1382
1384
|
changed: g = "signers"
|
|
1383
1385
|
} = {}) => {
|
|
1384
|
-
var
|
|
1385
|
-
const T = s ?
|
|
1386
|
+
var qe, Ce, Be;
|
|
1387
|
+
const T = s ? fs((qe = e[0]) == null ? void 0 : qe.signerId, !1) : t, I = xs(
|
|
1386
1388
|
e,
|
|
1387
1389
|
T,
|
|
1388
1390
|
g,
|
|
1389
1391
|
d,
|
|
1390
|
-
|
|
1392
|
+
Ds(
|
|
1391
1393
|
d,
|
|
1392
1394
|
h,
|
|
1393
1395
|
e.length > 0 && T === "on-device"
|
|
1394
1396
|
)
|
|
1395
|
-
),
|
|
1396
|
-
|
|
1397
|
+
), A = I.batch, xe = e.length > 1 && (a || f && s), Q = [];
|
|
1398
|
+
X && d !== K && d !== "" && I.operatorChannel !== h && Q.push(
|
|
1397
1399
|
r("signatureRequest.operatorChannelChanged", {
|
|
1398
|
-
channel: V[
|
|
1400
|
+
channel: V[I.operatorChannel].label
|
|
1399
1401
|
})
|
|
1400
|
-
),
|
|
1402
|
+
), A !== (c ? t : S) && Q.push(
|
|
1401
1403
|
r("signatureRequest.signerChannelChanged", {
|
|
1402
|
-
name:
|
|
1403
|
-
channel: V[
|
|
1404
|
+
name: Ae(l, ((Ce = e[0]) == null ? void 0 : Ce.signerId) ?? ""),
|
|
1405
|
+
channel: V[A].label
|
|
1404
1406
|
})
|
|
1405
|
-
)
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
(ra = q[0]) == null ? void 0 : ra.signerId,
|
|
1416
|
-
q[0] === void 0 || (la = Y == null ? void 0 : Y.signerAvailableChannels) == null ? void 0 : la[q[0].signerId]
|
|
1407
|
+
);
|
|
1408
|
+
const Se = f ? lt({
|
|
1409
|
+
items: te,
|
|
1410
|
+
channel: A,
|
|
1411
|
+
primaryIsPatient: Sn((Be = e[0]) == null ? void 0 : Be.signerId)
|
|
1412
|
+
}) : null;
|
|
1413
|
+
(f || G) && N.length > 1 ? xe ? Q.push(r("signatureRequest.secondSigneeCleared")) : Se !== null && e.length > 1 && Q.push(r(Zt[Se])) : As(e, ln(e, A)) && !xe && e[1] && Q.push(Ps(e[1].signerId)), Se !== null && Ve(!1), be(xe ? e.slice(0, 1) : e), X && Re(I.operatorChannel), A !== S && xt(null), Cs(A), le(null), ze(Q.length > 0 ? Q.join(" ") : null);
|
|
1414
|
+
}, Ls = kn(
|
|
1415
|
+
(da = C[0]) == null ? void 0 : da.signerId,
|
|
1416
|
+
C[0] === void 0 || (ua = J == null ? void 0 : J.signerAvailableChannels) == null ? void 0 : ua[C[0].signerId]
|
|
1417
1417
|
);
|
|
1418
|
-
v && !
|
|
1419
|
-
const
|
|
1420
|
-
const t =
|
|
1418
|
+
v && !Ls.includes(S) && He(C, Ls[0]);
|
|
1419
|
+
const Tt = v ? C : C.map((e) => {
|
|
1420
|
+
const t = $e(e.signerId);
|
|
1421
1421
|
return t.length === 0 || t.includes(e.channel) ? e : { ...e, channel: t[0], skipOtp: void 0 };
|
|
1422
1422
|
});
|
|
1423
|
-
if (
|
|
1424
|
-
const e =
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1423
|
+
if (Tt.some((e, t) => e !== C[t])) {
|
|
1424
|
+
const e = x ? Rt(
|
|
1425
|
+
x,
|
|
1426
|
+
D,
|
|
1427
|
+
F,
|
|
1428
|
+
Tt,
|
|
1429
1429
|
"signers"
|
|
1430
|
-
) : { operatorChannel:
|
|
1431
|
-
|
|
1432
|
-
const t = e.rows.filter((s, a) => s.channel !==
|
|
1430
|
+
) : { operatorChannel: F, rows: Tt };
|
|
1431
|
+
be(e.rows), Re(e.operatorChannel), le(null);
|
|
1432
|
+
const t = e.rows.filter((s, a) => s.channel !== C[a].channel).map(
|
|
1433
1433
|
(s) => r("signatureRequest.signerChannelChanged", {
|
|
1434
|
-
name:
|
|
1434
|
+
name: Ae(l, s.signerId),
|
|
1435
1435
|
channel: V[s.channel].label
|
|
1436
1436
|
})
|
|
1437
1437
|
);
|
|
1438
|
-
|
|
1438
|
+
ze(t.length > 0 ? t.join(" ") : null);
|
|
1439
1439
|
}
|
|
1440
|
-
const
|
|
1440
|
+
const Et = (e, t) => ({
|
|
1441
1441
|
value: e,
|
|
1442
1442
|
label: V[t].label,
|
|
1443
1443
|
startAdornment: V[t].icon
|
|
1444
|
-
}),
|
|
1445
|
-
const t =
|
|
1446
|
-
return e === "on-device" ?
|
|
1447
|
-
}),
|
|
1444
|
+
}), _s = Me ? !vi : !hn && !Ne, Ms = _s ? r("signatureRequest.onDeviceUnavailableHint") : void 0, Dt = Ot ? r("signatureRequest.operatorOnDeviceLinked") : void 0, At = Dt ?? Ms, $s = (hn ? cn(J) : ct).map((e) => {
|
|
1445
|
+
const t = Et(e, e);
|
|
1446
|
+
return e === "on-device" ? _s ? { ...t, disabled: !0, description: Ms } : t : Dt ? { ...t, disabled: !0, description: Dt } : t;
|
|
1447
|
+
}), Ri = () => {
|
|
1448
1448
|
if (v) {
|
|
1449
|
-
|
|
1449
|
+
He(C, "on-device", {
|
|
1450
1450
|
opChannel: "on-device",
|
|
1451
1451
|
changed: "operator"
|
|
1452
1452
|
});
|
|
1453
1453
|
return;
|
|
1454
1454
|
}
|
|
1455
|
-
if (!
|
|
1456
|
-
const e =
|
|
1457
|
-
(s) => s.rowId ===
|
|
1455
|
+
if (!Vn) return;
|
|
1456
|
+
const e = C.map(
|
|
1457
|
+
(s) => s.rowId === Vn.rowId ? { ...s, channel: "on-device", skipOtp: void 0 } : s
|
|
1458
1458
|
), t = r("signatureRequest.signerChannelChanged", {
|
|
1459
|
-
name:
|
|
1459
|
+
name: Ae(l, Vn.signerId),
|
|
1460
1460
|
channel: V["on-device"].label
|
|
1461
1461
|
});
|
|
1462
|
-
if (
|
|
1463
|
-
|
|
1462
|
+
if (x) {
|
|
1463
|
+
Te(D, "on-device", e, "operator", [t]);
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
|
|
1467
|
-
},
|
|
1468
|
-
(e) => !
|
|
1469
|
-
),
|
|
1466
|
+
be(e), Re("on-device"), le(null), ze(t);
|
|
1467
|
+
}, Pt = /* @__PURE__ */ n(Fa, { meta: V }), Lt = N.map((e) => e.signerId), Qe = l.find(
|
|
1468
|
+
(e) => !Lt.includes(e.value) && !(f && e.isPatient === !0)
|
|
1469
|
+
), Ni = !y && N.length < qt && Qe !== void 0, Ee = f || v || G ? (ha = N[0]) == null ? void 0 : ha.signerId : void 0, Dn = Sn(Ee), xi = v ? S : ((ma = N[0]) == null ? void 0 : ma.channel) ?? S, An = f ? lt({
|
|
1470
1470
|
items: te,
|
|
1471
|
-
channel:
|
|
1472
|
-
primaryIsPatient:
|
|
1473
|
-
}) : null,
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1471
|
+
channel: xi,
|
|
1472
|
+
primaryIsPatient: Dn
|
|
1473
|
+
}) : null, Xn = f && !de && te.length > 0 && pe >= 2 && An !== null && l.length > 1 && // "Only on this device" promises a seat: someone must be free to take it.
|
|
1474
|
+
(An !== "channel" || Qe !== void 0) ? r(Zt[An]) : null, _t = (e) => Xn && An === e ? gt : void 0, Yn = (f || G) && N.length > 1 ? mr({
|
|
1475
|
+
primaryId: Ee,
|
|
1476
|
+
secondId: N[1].signerId,
|
|
1477
|
+
channel: v ? S : N[1].channel,
|
|
1477
1478
|
options: l
|
|
1478
|
-
}) : null,
|
|
1479
|
-
(e) => e.isPatient !== !0 && !
|
|
1480
|
-
),
|
|
1479
|
+
}) : null, zs = G && N.length < 2, Mt = l.filter(
|
|
1480
|
+
(e) => e.isPatient !== !0 && !Lt.includes(e.value)
|
|
1481
|
+
), qi = G && (N.length === 0 || Dn || An !== null), Fs = zs && !qi && Mt.length > 0, Hs = Fs && li, Bs = !f && zs && Dn && l.some((e) => e.isPatient !== !0) ? r("signatureRequest.secondSigneeUnavailablePatient") : null, Ke = Hn ? Fs && !Hs ? "openSlot" : null : ss === "createSignee" ? re !== void 0 ? "createSignee" : null : l.length > 1 && (!f || pe >= 2) ? "addRow" : null, js = Ke === "createSignee", Us = re !== void 0 && (Hn || !f && ss === "createSignee"), Ws = (e) => Us ? [
|
|
1481
1482
|
...e,
|
|
1482
1483
|
{
|
|
1483
|
-
value:
|
|
1484
|
+
value: Jt,
|
|
1484
1485
|
label: r("signatureRequest.newSignatory"),
|
|
1485
1486
|
separatorBefore: !0,
|
|
1486
1487
|
intent: "action"
|
|
1487
1488
|
}
|
|
1488
|
-
] : [...e],
|
|
1489
|
-
(
|
|
1490
|
-
).includes("sms"),
|
|
1489
|
+
] : [...e], $t = kn(
|
|
1490
|
+
(dn == null ? void 0 : dn.value) ?? Ee
|
|
1491
|
+
).includes("sms"), mn = (f || v) && Dn && !$t, zt = v && S === "on-device" && (mn || (ri ?? !$t)), Ci = v && N.length > 0 && (mn || zt), Ft = (e) => f && e === 0, Ht = (e, t) => e.channel === "on-device" && (Ft(t) ? mn || (e.skipOtp ?? !$t) : e.skipOtp === !0), Pn = ue && !(f && de), Ln = Pn ? Cr({
|
|
1491
1492
|
options: l,
|
|
1492
|
-
rosterIds:
|
|
1493
|
-
rosterCap:
|
|
1494
|
-
}) : null,
|
|
1495
|
-
|
|
1493
|
+
rosterIds: N.map((e) => e.signerId),
|
|
1494
|
+
rosterCap: qt
|
|
1495
|
+
}) : null, Bt = Ln !== null && qr(Ln) && re !== void 0 && !js, Gs = f && !Hn && re !== void 0 && !js && !Bt && !l.some((e) => e.isPatient !== !0), Jn = Bt || Gs, Vs = oe(Jn);
|
|
1496
|
+
je(() => {
|
|
1496
1497
|
var e;
|
|
1497
|
-
if (
|
|
1498
|
+
if (Vs.current && !Jn) {
|
|
1498
1499
|
const t = document.activeElement;
|
|
1499
1500
|
if (t === null || t === document.body || t.getAttribute("role") === "dialog") {
|
|
1500
|
-
const a =
|
|
1501
|
+
const a = qn.current;
|
|
1501
1502
|
(e = a && !a.disabled ? a : ne.current) == null || e.focus();
|
|
1502
1503
|
}
|
|
1503
1504
|
}
|
|
1504
|
-
|
|
1505
|
-
}, [
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1505
|
+
Vs.current = Jn;
|
|
1506
|
+
}, [Jn]);
|
|
1507
|
+
const Si = (e, t) => {
|
|
1508
|
+
be(
|
|
1508
1509
|
(s) => s.map(
|
|
1509
1510
|
(a) => a.rowId === e ? { ...a, ...t } : a
|
|
1510
1511
|
)
|
|
1511
1512
|
);
|
|
1512
|
-
},
|
|
1513
|
-
if (!
|
|
1513
|
+
}, Ii = () => {
|
|
1514
|
+
if (!Qe) return;
|
|
1514
1515
|
if (v) {
|
|
1515
|
-
|
|
1516
|
+
He(
|
|
1516
1517
|
[
|
|
1517
|
-
...
|
|
1518
|
+
...C,
|
|
1518
1519
|
{
|
|
1519
|
-
signerId:
|
|
1520
|
+
signerId: Qe.value,
|
|
1520
1521
|
channel: S,
|
|
1521
|
-
rowId:
|
|
1522
|
+
rowId: an.current++
|
|
1522
1523
|
}
|
|
1523
1524
|
],
|
|
1524
1525
|
S
|
|
1525
1526
|
);
|
|
1526
1527
|
return;
|
|
1527
1528
|
}
|
|
1528
|
-
const e =
|
|
1529
|
-
|
|
1529
|
+
const e = yn(
|
|
1530
|
+
Qe.value,
|
|
1530
1531
|
f ? "on-device" : "sms"
|
|
1531
1532
|
);
|
|
1532
|
-
if (
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1533
|
+
if (x) {
|
|
1534
|
+
Te(
|
|
1535
|
+
D,
|
|
1536
|
+
F,
|
|
1536
1537
|
[
|
|
1537
|
-
...
|
|
1538
|
+
...C,
|
|
1538
1539
|
{
|
|
1539
|
-
signerId:
|
|
1540
|
+
signerId: Qe.value,
|
|
1540
1541
|
channel: e,
|
|
1541
|
-
rowId:
|
|
1542
|
+
rowId: an.current++
|
|
1542
1543
|
}
|
|
1543
1544
|
],
|
|
1544
1545
|
"signers"
|
|
1545
1546
|
);
|
|
1546
1547
|
return;
|
|
1547
1548
|
}
|
|
1548
|
-
|
|
1549
|
+
be((t) => [
|
|
1549
1550
|
...t,
|
|
1550
1551
|
{
|
|
1551
|
-
signerId:
|
|
1552
|
+
signerId: Qe.value,
|
|
1552
1553
|
channel: e,
|
|
1553
|
-
rowId:
|
|
1554
|
+
rowId: an.current++
|
|
1554
1555
|
}
|
|
1555
1556
|
]);
|
|
1556
|
-
},
|
|
1557
|
+
}, wi = (e) => {
|
|
1557
1558
|
var a, c;
|
|
1558
|
-
if (!
|
|
1559
|
-
(a = ne.current) == null || a.focus(),
|
|
1560
|
-
const t =
|
|
1559
|
+
if (!Mt.some((d) => d.value === e)) return;
|
|
1560
|
+
(a = ne.current) == null || a.focus(), rn.current = "second";
|
|
1561
|
+
const t = C.slice(0, 1);
|
|
1561
1562
|
if (v) {
|
|
1562
|
-
|
|
1563
|
+
He(
|
|
1563
1564
|
[
|
|
1564
1565
|
...t,
|
|
1565
1566
|
{
|
|
1566
1567
|
signerId: e,
|
|
1567
1568
|
channel: S,
|
|
1568
|
-
rowId:
|
|
1569
|
+
rowId: an.current++
|
|
1569
1570
|
}
|
|
1570
1571
|
],
|
|
1571
1572
|
S
|
|
@@ -1576,60 +1577,60 @@ const wr = Di(
|
|
|
1576
1577
|
...t,
|
|
1577
1578
|
{
|
|
1578
1579
|
signerId: e,
|
|
1579
|
-
channel:
|
|
1580
|
-
rowId:
|
|
1580
|
+
channel: yn(e, ((c = t[0]) == null ? void 0 : c.channel) ?? "sms"),
|
|
1581
|
+
rowId: an.current++
|
|
1581
1582
|
}
|
|
1582
1583
|
];
|
|
1583
|
-
if (
|
|
1584
|
-
|
|
1584
|
+
if (x) {
|
|
1585
|
+
Te(D, F, s, "signers");
|
|
1585
1586
|
return;
|
|
1586
1587
|
}
|
|
1587
|
-
|
|
1588
|
+
be(s);
|
|
1588
1589
|
};
|
|
1589
|
-
|
|
1590
|
+
Qt(() => {
|
|
1590
1591
|
var s;
|
|
1591
|
-
const e =
|
|
1592
|
+
const e = rn.current;
|
|
1592
1593
|
if (e === null) return;
|
|
1593
|
-
|
|
1594
|
+
rn.current = null, (s = (e === "slot" ? as : e === "second" ? is : qn).current) == null || s.focus();
|
|
1594
1595
|
});
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
},
|
|
1596
|
+
const yi = () => {
|
|
1597
|
+
rn.current = "slot", Ve(!0);
|
|
1598
|
+
}, ki = () => {
|
|
1598
1599
|
var e;
|
|
1599
|
-
(e = ne.current) == null || e.focus(),
|
|
1600
|
-
},
|
|
1600
|
+
(e = ne.current) == null || e.focus(), rn.current = "add", Ve(!1);
|
|
1601
|
+
}, Oi = (e) => {
|
|
1601
1602
|
var t, s;
|
|
1602
|
-
if (G ? ((t = ne.current) == null || t.focus(),
|
|
1603
|
-
|
|
1604
|
-
|
|
1603
|
+
if (G ? ((t = ne.current) == null || t.focus(), rn.current = "add", Ve(!1)) : (s = qn.current) == null || s.focus(), v) {
|
|
1604
|
+
He(
|
|
1605
|
+
C.filter((a) => a.rowId !== e),
|
|
1605
1606
|
S
|
|
1606
1607
|
);
|
|
1607
1608
|
return;
|
|
1608
1609
|
}
|
|
1609
|
-
if (
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1610
|
+
if (x) {
|
|
1611
|
+
Te(
|
|
1612
|
+
D,
|
|
1613
|
+
F,
|
|
1614
|
+
C.filter((a) => a.rowId !== e),
|
|
1614
1615
|
"signers"
|
|
1615
1616
|
);
|
|
1616
1617
|
return;
|
|
1617
1618
|
}
|
|
1618
|
-
|
|
1619
|
+
be(
|
|
1619
1620
|
(a) => a.filter((c) => c.rowId !== e)
|
|
1620
1621
|
);
|
|
1621
|
-
},
|
|
1622
|
-
(e, t) =>
|
|
1623
|
-
),
|
|
1622
|
+
}, Qs = ue && !v && N.some((e) => yt(e.signerId)), Ks = ue && (v ? N.length > 0 && S === "qr" : N.some((e) => e.channel === "qr")), Xs = !v && N.some(
|
|
1623
|
+
(e, t) => Ht(e, t) && !yt(e.signerId)
|
|
1624
|
+
), jt = (e) => new Intl.ListFormat(ut.language || "en", { type: "unit" }).format(
|
|
1624
1625
|
e
|
|
1625
|
-
),
|
|
1626
|
+
), Ys = (e, t) => e.map((s) => {
|
|
1626
1627
|
const a = t.get(s);
|
|
1627
|
-
return a === void 0 ?
|
|
1628
|
-
...
|
|
1628
|
+
return a === void 0 ? Et(s, s) : {
|
|
1629
|
+
...Et(s, s),
|
|
1629
1630
|
disabled: !0,
|
|
1630
1631
|
description: a
|
|
1631
1632
|
};
|
|
1632
|
-
}),
|
|
1633
|
+
}), Js = (e, t, s) => {
|
|
1633
1634
|
const a = /* @__PURE__ */ new Map();
|
|
1634
1635
|
for (const c of e) {
|
|
1635
1636
|
const d = t.get(c);
|
|
@@ -1639,31 +1640,31 @@ const wr = Di(
|
|
|
1639
1640
|
]);
|
|
1640
1641
|
}
|
|
1641
1642
|
if (a.size !== 0)
|
|
1642
|
-
return
|
|
1643
|
-
([c, d]) => `${
|
|
1643
|
+
return jt(s ? [...a.keys()] : [...a].map(
|
|
1644
|
+
([c, d]) => `${jt(d)} (${c})`
|
|
1644
1645
|
));
|
|
1645
|
-
},
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
),
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
),
|
|
1652
|
-
|
|
1653
|
-
|
|
1646
|
+
}, Ut = ps(
|
|
1647
|
+
Ee,
|
|
1648
|
+
Ee === void 0 || (ga = J == null ? void 0 : J.signerAvailableChannels) == null ? void 0 : ga[Ee]
|
|
1649
|
+
), Wt = bt(Ee), Zs = Ys(
|
|
1650
|
+
Ut,
|
|
1651
|
+
Wt
|
|
1652
|
+
), Gt = Js(
|
|
1653
|
+
Ut,
|
|
1654
|
+
Wt,
|
|
1654
1655
|
!1
|
|
1655
|
-
),
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
) : [],
|
|
1656
|
+
), Ti = v ? ms(
|
|
1657
|
+
Ee,
|
|
1658
|
+
Ut.filter((e) => Wt.has(e))
|
|
1659
|
+
) : [], ea = (e, t) => e.length > 0 ? /* @__PURE__ */ n(
|
|
1659
1660
|
"div",
|
|
1660
1661
|
{
|
|
1661
1662
|
"data-note": "contact-actions",
|
|
1662
1663
|
role: t ? "group" : void 0,
|
|
1663
1664
|
"aria-label": t,
|
|
1664
|
-
className: `${
|
|
1665
|
+
className: `${H} type-body-sm ds:flex ds:flex-wrap ds:gap-x-[var(--spacing-md)]`,
|
|
1665
1666
|
children: e.map((s) => /* @__PURE__ */ n(
|
|
1666
|
-
|
|
1667
|
+
Hi,
|
|
1667
1668
|
{
|
|
1668
1669
|
href: s.href,
|
|
1669
1670
|
disabled: y,
|
|
@@ -1673,249 +1674,251 @@ const wr = Di(
|
|
|
1673
1674
|
`${s.href} ${s.label}`
|
|
1674
1675
|
))
|
|
1675
1676
|
}
|
|
1676
|
-
) : null,
|
|
1677
|
+
) : null, na = (e, t) => {
|
|
1677
1678
|
var s, a;
|
|
1678
1679
|
return t === "email" ? (s = e == null ? void 0 : e.contact) == null ? void 0 : s.email : (a = e == null ? void 0 : e.contact) == null ? void 0 : a.phone;
|
|
1679
|
-
},
|
|
1680
|
-
if (
|
|
1681
|
-
const e = m.find((t) => t.value ===
|
|
1682
|
-
|
|
1680
|
+
}, Zn = [];
|
|
1681
|
+
if (X && !Fe && D !== "" && Aa.includes(F)) {
|
|
1682
|
+
const e = m.find((t) => t.value === D);
|
|
1683
|
+
Zn.push({
|
|
1683
1684
|
key: "operator",
|
|
1684
1685
|
role: "operator",
|
|
1685
|
-
name: (e == null ? void 0 : e.label) ??
|
|
1686
|
-
channel:
|
|
1687
|
-
contact:
|
|
1686
|
+
name: (e == null ? void 0 : e.label) ?? D,
|
|
1687
|
+
channel: F,
|
|
1688
|
+
contact: na(e, F)
|
|
1688
1689
|
});
|
|
1689
1690
|
}
|
|
1690
1691
|
if (ue)
|
|
1691
|
-
for (const e of
|
|
1692
|
+
for (const e of N) {
|
|
1692
1693
|
const t = v ? S : e.channel;
|
|
1693
|
-
if (!
|
|
1694
|
+
if (!Aa.includes(t)) continue;
|
|
1694
1695
|
const s = l.find(
|
|
1695
1696
|
(a) => a.value === e.signerId
|
|
1696
1697
|
);
|
|
1697
|
-
|
|
1698
|
+
Zn.push({
|
|
1698
1699
|
key: `signer-${e.rowId}`,
|
|
1699
1700
|
role: "signer",
|
|
1700
1701
|
name: (s == null ? void 0 : s.label) ?? e.signerId,
|
|
1701
1702
|
channel: t,
|
|
1702
|
-
contact:
|
|
1703
|
+
contact: na(s, t)
|
|
1703
1704
|
});
|
|
1704
1705
|
}
|
|
1705
|
-
const
|
|
1706
|
+
const Ei = () => {
|
|
1706
1707
|
var e;
|
|
1707
|
-
if (!(
|
|
1708
|
-
if (
|
|
1709
|
-
(e = ne.current) == null || e.focus(),
|
|
1708
|
+
if (!(Qs || Yn !== null)) {
|
|
1709
|
+
if (Le && !pt && Zn.length > 0) {
|
|
1710
|
+
(e = ne.current) == null || e.focus(), on(!0);
|
|
1710
1711
|
return;
|
|
1711
1712
|
}
|
|
1712
|
-
|
|
1713
|
+
ta();
|
|
1713
1714
|
}
|
|
1714
|
-
},
|
|
1715
|
+
}, ta = () => {
|
|
1715
1716
|
var s;
|
|
1716
|
-
|
|
1717
|
-
const e =
|
|
1717
|
+
jn(Ks), Ks && ((s = ne.current) == null || s.focus(), En(0));
|
|
1718
|
+
const e = N.map(
|
|
1718
1719
|
({ rowId: a, ...c }, d) => v ? {
|
|
1719
1720
|
signerId: c.signerId,
|
|
1720
1721
|
channel: S,
|
|
1721
1722
|
// The batch's OTP waiver rides on the main signer.
|
|
1722
|
-
...d === 0 && S === "on-device" ? { skipOtp:
|
|
1723
|
-
} :
|
|
1723
|
+
...d === 0 && S === "on-device" ? { skipOtp: zt } : {}
|
|
1724
|
+
} : Ft(d) && c.channel === "on-device" ? { ...c, skipOtp: Ht(c, d) } : c
|
|
1724
1725
|
), t = v ? { signMode: S } : {};
|
|
1725
1726
|
if (f) {
|
|
1726
1727
|
const a = {};
|
|
1727
1728
|
let c = null;
|
|
1728
1729
|
for (const h of te) {
|
|
1729
|
-
if (!
|
|
1730
|
-
const g =
|
|
1730
|
+
if (!en(h)) continue;
|
|
1731
|
+
const g = un[h.id], T = g === K || g === "" || g === void 0 ? null : g;
|
|
1731
1732
|
a[h.id] = T, c ?? (c = T);
|
|
1732
1733
|
}
|
|
1733
1734
|
const d = {};
|
|
1734
1735
|
for (const [h, g] of Object.entries(
|
|
1735
1736
|
a
|
|
1736
1737
|
))
|
|
1737
|
-
g !== null && (d[h] =
|
|
1738
|
+
g !== null && (d[h] = It[h]);
|
|
1738
1739
|
we({
|
|
1739
1740
|
operatorId: c,
|
|
1740
1741
|
operatorChannel: null,
|
|
1741
1742
|
signers: e,
|
|
1742
1743
|
...t,
|
|
1743
1744
|
operatorAssignments: a,
|
|
1744
|
-
...
|
|
1745
|
+
...Oe ? { operatorChannels: d } : {},
|
|
1745
1746
|
requiredItemIds: te.map((h) => h.id)
|
|
1746
1747
|
});
|
|
1747
1748
|
return;
|
|
1748
1749
|
}
|
|
1749
1750
|
we({
|
|
1750
|
-
operatorId: !k ||
|
|
1751
|
-
operatorChannel: !k ||
|
|
1752
|
-
signers:
|
|
1753
|
-
...
|
|
1751
|
+
operatorId: !k || Fe ? null : D,
|
|
1752
|
+
operatorChannel: !k || Fe ? null : F,
|
|
1753
|
+
signers: W ? e : [],
|
|
1754
|
+
...W ? t : {}
|
|
1754
1755
|
});
|
|
1755
1756
|
};
|
|
1756
|
-
|
|
1757
|
+
je(() => {
|
|
1757
1758
|
var e;
|
|
1758
|
-
|
|
1759
|
-
}, [
|
|
1760
|
-
const
|
|
1759
|
+
ae && (jn(!1), pt && ((e = ne.current) == null || e.focus()), on(!1));
|
|
1760
|
+
}, [ae]);
|
|
1761
|
+
const gn = ((ce == null ? void 0 : ce.length) ?? 0) > 0, Xe = gn || !ae && (Ge || mi), et = ue ? N.filter(
|
|
1761
1762
|
(e) => (v ? S : e.channel) === "qr"
|
|
1762
1763
|
).map((e) => e.signerId) : [];
|
|
1763
|
-
for (const e of
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1764
|
+
for (const e of ce ?? [])
|
|
1765
|
+
et.includes(e.signerId) || et.push(e.signerId);
|
|
1766
|
+
const _n = et.length, Ye = Math.min(gi, Math.max(_n - 1, 0)), Je = et[Ye], pn = Je === void 0 ? "" : Ae(l, Je), Mn = ce == null ? void 0 : ce.find((e) => e.signerId === Je), sa = Mn ? kr(Mn.expiresAt, ut.language || "en", r) : null, Di = Ye >= _n - 1, aa = gn && _n > 1, nt = pt && !Xe, ia = i && Xe && !ve ? `${gn}:${Ye}` : null;
|
|
1767
|
+
je(() => {
|
|
1767
1768
|
var e;
|
|
1768
|
-
|
|
1769
|
-
}, [
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1769
|
+
ia !== null && ((e = ne.current) == null || e.focus());
|
|
1770
|
+
}, [ia]);
|
|
1771
|
+
const ra = i && ve ? ve : null;
|
|
1772
|
+
je(() => {
|
|
1772
1773
|
var e;
|
|
1773
|
-
|
|
1774
|
-
}, [
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1774
|
+
ra !== null && ((e = ne.current) == null || e.focus());
|
|
1775
|
+
}, [ra]);
|
|
1776
|
+
const tt = sn && !ve;
|
|
1777
|
+
Qt(() => {
|
|
1777
1778
|
var t;
|
|
1778
|
-
if (!i || !
|
|
1779
|
+
if (!i || !sn) return;
|
|
1779
1780
|
const e = document.activeElement;
|
|
1780
1781
|
(e === null || e === document.body) && ((t = ne.current) == null || t.focus());
|
|
1781
|
-
}, [i,
|
|
1782
|
-
const
|
|
1782
|
+
}, [i, sn]);
|
|
1783
|
+
const la = v ? /* @__PURE__ */ u(ge, { children: [
|
|
1783
1784
|
/* @__PURE__ */ n(
|
|
1784
1785
|
Ue,
|
|
1785
1786
|
{
|
|
1786
|
-
id:
|
|
1787
|
-
options:
|
|
1787
|
+
id: Pa,
|
|
1788
|
+
options: Zs,
|
|
1788
1789
|
value: S,
|
|
1789
1790
|
adornmentInTrigger: !0,
|
|
1790
1791
|
showDescriptions: !0,
|
|
1791
1792
|
disabled: y,
|
|
1792
1793
|
"aria-label": r("signatureRequest.channelLabel"),
|
|
1793
|
-
"aria-describedby":
|
|
1794
|
+
"aria-describedby": [Gt ? ds : null, _t("channel")].filter(Boolean).join(" ") || void 0,
|
|
1794
1795
|
onValueChange: (e) => {
|
|
1795
|
-
|
|
1796
|
+
Zs.some(
|
|
1796
1797
|
(s) => s.value === e && !s.disabled
|
|
1797
|
-
) &&
|
|
1798
|
+
) && He(C, e, {
|
|
1798
1799
|
userChannel: !0
|
|
1799
1800
|
});
|
|
1800
1801
|
}
|
|
1801
1802
|
}
|
|
1802
1803
|
),
|
|
1803
|
-
|
|
1804
|
-
] }) : null,
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1804
|
+
Gt ? /* @__PURE__ */ n("span", { id: ds, className: "ds:sr-only", children: Gt }) : null
|
|
1805
|
+
] }) : null, oa = v ? /* @__PURE__ */ u(ge, { children: [
|
|
1806
|
+
ea(
|
|
1807
|
+
Ti,
|
|
1808
|
+
Ae(l, Ee ?? "")
|
|
1808
1809
|
),
|
|
1809
|
-
S === "on-device" ? /* @__PURE__ */ n("div", { className:
|
|
1810
|
-
|
|
1810
|
+
S === "on-device" ? /* @__PURE__ */ n("div", { className: H, children: /* @__PURE__ */ n(
|
|
1811
|
+
ba,
|
|
1811
1812
|
{
|
|
1812
1813
|
label: r("signatureRequest.noOtp"),
|
|
1813
|
-
checked:
|
|
1814
|
-
disabled: y ||
|
|
1815
|
-
"aria-describedby":
|
|
1816
|
-
onCheckedChange: (e) =>
|
|
1814
|
+
checked: zt,
|
|
1815
|
+
disabled: y || mn,
|
|
1816
|
+
"aria-describedby": mn ? Bn : void 0,
|
|
1817
|
+
onCheckedChange: (e) => xt(e)
|
|
1817
1818
|
}
|
|
1818
1819
|
) }) : null,
|
|
1819
|
-
|
|
1820
|
-
] }) : null,
|
|
1820
|
+
Ci ? /* @__PURE__ */ n(j, { variant: "warning", id: Bn, className: H, children: /* @__PURE__ */ n(j.Description, { children: r("signatureRequest.noOtpWarning") }) }) : null
|
|
1821
|
+
] }) : null, Ai = gn ? Mn ? pn ? r("signatureRequest.qrCaptionNamed", { name: pn }) : r("signatureRequest.qrCaption") : (
|
|
1821
1822
|
// The error alert in the body carries the message (and announces
|
|
1822
1823
|
// itself); the description only names whose slot this is.
|
|
1823
|
-
|
|
1824
|
+
pn || Je
|
|
1824
1825
|
) : r("signatureRequest.qrPending");
|
|
1825
|
-
return /* @__PURE__ */ n("div", { ref:
|
|
1826
|
-
|
|
1826
|
+
return /* @__PURE__ */ n("div", { ref: Ka, className: "ds:contents", "data-component": "signature-request", children: /* @__PURE__ */ n(La, { children: /* @__PURE__ */ n(q, { open: i, onOpenChange: o, children: /* @__PURE__ */ u(
|
|
1827
|
+
q.Content,
|
|
1827
1828
|
{
|
|
1828
1829
|
size: "lg",
|
|
1829
1830
|
scroll: "body",
|
|
1830
1831
|
hideCloseButton: !0,
|
|
1831
1832
|
onOpenAutoFocus: (e) => {
|
|
1832
1833
|
var t;
|
|
1833
|
-
!
|
|
1834
|
+
!Xe && !wt && !ve && !sn || (e.preventDefault(), (t = ne.current) == null || t.focus());
|
|
1834
1835
|
},
|
|
1835
|
-
...
|
|
1836
|
+
...Qa,
|
|
1836
1837
|
children: [
|
|
1837
|
-
/* @__PURE__ */ u(
|
|
1838
|
+
/* @__PURE__ */ u(q.Header, { children: [
|
|
1838
1839
|
/* @__PURE__ */ n(
|
|
1839
|
-
|
|
1840
|
+
q.Title,
|
|
1840
1841
|
{
|
|
1841
1842
|
ref: ne,
|
|
1842
1843
|
tabIndex: -1,
|
|
1843
|
-
"aria-describedby":
|
|
1844
|
+
"aria-describedby": In ? ls : tt ? os : Xe ? aa ? `${ht} ${rs}` : ht : nt ? mt : void 0,
|
|
1844
1845
|
className: "ds:outline-none",
|
|
1845
|
-
children:
|
|
1846
|
+
children: In ? In.title : !tt && Xe ? r("signatureRequest.qrTitle") : !tt && nt ? r("signatureRequest.confirmTitle") : tn ?? r(
|
|
1846
1847
|
f ? "signatureRequest.requiredTitle" : "signatureRequest.title"
|
|
1847
1848
|
)
|
|
1848
1849
|
}
|
|
1849
1850
|
),
|
|
1850
|
-
|
|
1851
|
+
In ? /* @__PURE__ */ n(q.Description, { asChild: !0, children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { id: ls, children: In.description }) }) }) : tt ? /* @__PURE__ */ n(q.Description, { asChild: !0, children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { id: os, children: r("signatureRequest.loading") }) }) }) : Xe ? /* @__PURE__ */ n(q.Description, { asChild: !0, children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(
|
|
1851
1852
|
"div",
|
|
1852
1853
|
{
|
|
1853
|
-
id:
|
|
1854
|
+
id: ht,
|
|
1854
1855
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1855
1856
|
children: [
|
|
1856
|
-
/* @__PURE__ */ n("p", { children:
|
|
1857
|
-
|
|
1857
|
+
/* @__PURE__ */ n("p", { children: Ai }),
|
|
1858
|
+
sa ? /* @__PURE__ */ n("p", { children: sa }) : null
|
|
1858
1859
|
]
|
|
1859
1860
|
}
|
|
1860
|
-
) }) }) :
|
|
1861
|
-
f ? "signatureRequest.
|
|
1861
|
+
) }) }) : nt ? /* @__PURE__ */ n(q.Description, { asChild: !0, children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("p", { id: mt, children: r(
|
|
1862
|
+
f ? "signatureRequest.requiredConfirmDescription" : "signatureRequest.confirmDescription"
|
|
1863
|
+
) }) }) }) : /* @__PURE__ */ n(q.Description, { children: We ?? r(
|
|
1864
|
+
f ? "signatureRequest.requiredDescription" : wt ? (
|
|
1862
1865
|
// The table says whether there are signed
|
|
1863
1866
|
// versions, so the header describes the form.
|
|
1864
1867
|
"signatureRequest.requestDescription"
|
|
1865
1868
|
) : "signatureRequest.noSignedVersions"
|
|
1866
1869
|
) })
|
|
1867
1870
|
] }),
|
|
1868
|
-
|
|
1869
|
-
/* @__PURE__ */ n(
|
|
1870
|
-
/* @__PURE__ */ u(
|
|
1871
|
-
|
|
1871
|
+
ve ? /* @__PURE__ */ u(ge, { children: [
|
|
1872
|
+
/* @__PURE__ */ n(q.Body, { children: /* @__PURE__ */ n(xr, { outcome: ve }) }),
|
|
1873
|
+
/* @__PURE__ */ u(q.Footer, { children: [
|
|
1874
|
+
ve === "creditsExhausted" && ie ? /* @__PURE__ */ n(
|
|
1872
1875
|
L,
|
|
1873
1876
|
{
|
|
1874
1877
|
intent: "primary",
|
|
1875
|
-
startIcon: /* @__PURE__ */ n(
|
|
1876
|
-
onClick:
|
|
1878
|
+
startIcon: /* @__PURE__ */ n(nr, {}),
|
|
1879
|
+
onClick: ie,
|
|
1877
1880
|
children: r("signatureRequest.buyMoreSignatures")
|
|
1878
1881
|
}
|
|
1879
1882
|
) : null,
|
|
1880
|
-
|
|
1883
|
+
ve === "creditsExhausted" && fe === "creditsExhausted" && ts ? /* @__PURE__ */ n(
|
|
1881
1884
|
L,
|
|
1882
1885
|
{
|
|
1883
1886
|
intent: "ghost",
|
|
1884
1887
|
onClick: () => {
|
|
1885
1888
|
var e;
|
|
1886
|
-
(e = ne.current) == null || e.focus(),
|
|
1889
|
+
(e = ne.current) == null || e.focus(), ft(!0), ts();
|
|
1887
1890
|
},
|
|
1888
1891
|
children: r("signatureRequest.outcomeCancel")
|
|
1889
1892
|
}
|
|
1890
1893
|
) : null,
|
|
1891
|
-
/* @__PURE__ */ n(
|
|
1894
|
+
/* @__PURE__ */ n(q.Close, { asChild: !0, children: /* @__PURE__ */ n(L, { intent: "outline", children: r("signatureRequest.close") }) })
|
|
1892
1895
|
] })
|
|
1893
|
-
] }) :
|
|
1896
|
+
] }) : sn ? /* @__PURE__ */ u(ge, { children: [
|
|
1894
1897
|
/* @__PURE__ */ n(
|
|
1895
|
-
|
|
1898
|
+
q.Body,
|
|
1896
1899
|
{
|
|
1897
1900
|
"aria-busy": "true",
|
|
1898
1901
|
"data-note": "loading",
|
|
1899
1902
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
1900
|
-
children:
|
|
1901
|
-
(e) => e === "operator" &&
|
|
1903
|
+
children: Sr.filter(
|
|
1904
|
+
(e) => e === "operator" && X || e === "signers" && ue
|
|
1902
1905
|
).map((e, t) => /* @__PURE__ */ u(
|
|
1903
1906
|
"div",
|
|
1904
1907
|
{
|
|
1905
|
-
className: `${
|
|
1908
|
+
className: `${Rn} ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]`,
|
|
1906
1909
|
children: [
|
|
1907
|
-
/* @__PURE__ */ n("div", { className:
|
|
1908
|
-
/* @__PURE__ */ u("div", { className:
|
|
1909
|
-
/* @__PURE__ */ n("div", { className:
|
|
1910
|
-
|
|
1910
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ n("div", { className: zn, children: /* @__PURE__ */ n(Ie, { size: "sm", width: "30%", stagger: t }) }) }),
|
|
1911
|
+
/* @__PURE__ */ u("div", { className: se, children: [
|
|
1912
|
+
/* @__PURE__ */ n("div", { className: it, children: /* @__PURE__ */ n(
|
|
1913
|
+
Ie,
|
|
1911
1914
|
{
|
|
1912
1915
|
variant: "circular",
|
|
1913
1916
|
size: "sm",
|
|
1914
1917
|
stagger: t + 1
|
|
1915
1918
|
}
|
|
1916
1919
|
) }),
|
|
1917
|
-
/* @__PURE__ */ n("div", { className:
|
|
1918
|
-
|
|
1920
|
+
/* @__PURE__ */ n("div", { className: Kt, children: /* @__PURE__ */ n(
|
|
1921
|
+
Ie,
|
|
1919
1922
|
{
|
|
1920
1923
|
variant: "rounded",
|
|
1921
1924
|
height: "var(--min-target-size)",
|
|
@@ -1929,29 +1932,29 @@ const wr = Di(
|
|
|
1929
1932
|
))
|
|
1930
1933
|
}
|
|
1931
1934
|
),
|
|
1932
|
-
/* @__PURE__ */ u(
|
|
1933
|
-
/* @__PURE__ */ n(L, { intent: "primary", startIcon: /* @__PURE__ */ n(
|
|
1934
|
-
/* @__PURE__ */ n(
|
|
1935
|
+
/* @__PURE__ */ u(q.Footer, { children: [
|
|
1936
|
+
/* @__PURE__ */ n(L, { intent: "primary", startIcon: /* @__PURE__ */ n(qa, {}), disabled: !0, children: r("signatureRequest.requestSignature") }),
|
|
1937
|
+
/* @__PURE__ */ n(q.Close, { asChild: !0, children: /* @__PURE__ */ n(L, { intent: "outline", children: r("signatureRequest.close") }) })
|
|
1935
1938
|
] })
|
|
1936
|
-
] }) :
|
|
1937
|
-
/* @__PURE__ */ n(
|
|
1938
|
-
|
|
1939
|
+
] }) : Xe ? /* @__PURE__ */ u(ge, { children: [
|
|
1940
|
+
/* @__PURE__ */ n(q.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center", children: gn ? /* @__PURE__ */ u(ge, { children: [
|
|
1941
|
+
aa ? (
|
|
1939
1942
|
// Also describes the heading, so screen readers hear
|
|
1940
1943
|
// the position when Previous or Next moves focus there.
|
|
1941
1944
|
/* @__PURE__ */ n(
|
|
1942
1945
|
"p",
|
|
1943
1946
|
{
|
|
1944
|
-
id:
|
|
1947
|
+
id: rs,
|
|
1945
1948
|
className: "type-label ds:text-[var(--muted-foreground)]",
|
|
1946
1949
|
children: r("signatureRequest.qrStepCount", {
|
|
1947
|
-
current:
|
|
1948
|
-
total:
|
|
1950
|
+
current: Ye + 1,
|
|
1951
|
+
total: _n
|
|
1949
1952
|
})
|
|
1950
1953
|
}
|
|
1951
1954
|
)
|
|
1952
1955
|
) : null,
|
|
1953
|
-
|
|
1954
|
-
|
|
1956
|
+
pn ? /* @__PURE__ */ n("p", { className: "type-title-item ds:break-words", children: pn }) : null,
|
|
1957
|
+
Mn ? (
|
|
1955
1958
|
// The QrCode's own name speaks of check-in, so the
|
|
1956
1959
|
// pattern names the code and hides the inner figure.
|
|
1957
1960
|
// `lg` keeps a long signing link at a module size a
|
|
@@ -1961,11 +1964,11 @@ const wr = Di(
|
|
|
1961
1964
|
{
|
|
1962
1965
|
role: "img",
|
|
1963
1966
|
"aria-label": r("signatureRequest.qrCodeLabel"),
|
|
1964
|
-
"data-signer-id":
|
|
1967
|
+
"data-signer-id": Je,
|
|
1965
1968
|
children: /* @__PURE__ */ n(
|
|
1966
|
-
|
|
1969
|
+
$i,
|
|
1967
1970
|
{
|
|
1968
|
-
value:
|
|
1971
|
+
value: Mn.url,
|
|
1969
1972
|
variant: "framed",
|
|
1970
1973
|
size: "lg",
|
|
1971
1974
|
decorative: !0
|
|
@@ -1974,13 +1977,13 @@ const wr = Di(
|
|
|
1974
1977
|
}
|
|
1975
1978
|
)
|
|
1976
1979
|
) : /* @__PURE__ */ n(
|
|
1977
|
-
|
|
1980
|
+
j,
|
|
1978
1981
|
{
|
|
1979
1982
|
variant: "error",
|
|
1980
1983
|
className: "ds:text-start",
|
|
1981
|
-
"data-signer-id":
|
|
1982
|
-
children: /* @__PURE__ */ n(
|
|
1983
|
-
name:
|
|
1984
|
+
"data-signer-id": Je,
|
|
1985
|
+
children: /* @__PURE__ */ n(j.Description, { children: r("signatureRequest.qrMissing", {
|
|
1986
|
+
name: pn || Je
|
|
1984
1987
|
}) })
|
|
1985
1988
|
}
|
|
1986
1989
|
)
|
|
@@ -1988,29 +1991,29 @@ const wr = Di(
|
|
|
1988
1991
|
// Waiting for the server: the spinner's status role
|
|
1989
1992
|
// announces the wait politely.
|
|
1990
1993
|
/* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-xl)]", children: /* @__PURE__ */ n(
|
|
1991
|
-
|
|
1994
|
+
zi,
|
|
1992
1995
|
{
|
|
1993
1996
|
size: "lg",
|
|
1994
1997
|
label: r("signatureRequest.qrPending")
|
|
1995
1998
|
}
|
|
1996
1999
|
) })
|
|
1997
2000
|
) }),
|
|
1998
|
-
/* @__PURE__ */ n(
|
|
1999
|
-
|
|
2001
|
+
/* @__PURE__ */ n(q.Footer, { children: gn ? /* @__PURE__ */ u(ge, { children: [
|
|
2002
|
+
_n > 1 ? /* @__PURE__ */ n(
|
|
2000
2003
|
L,
|
|
2001
2004
|
{
|
|
2002
2005
|
intent: "outline",
|
|
2003
|
-
disabled:
|
|
2004
|
-
onClick: () =>
|
|
2006
|
+
disabled: Ye === 0,
|
|
2007
|
+
onClick: () => En(Ye - 1),
|
|
2005
2008
|
children: r("signatureRequest.qrPrevious")
|
|
2006
2009
|
}
|
|
2007
2010
|
) : null,
|
|
2008
|
-
|
|
2011
|
+
Di ? /* @__PURE__ */ n(
|
|
2009
2012
|
L,
|
|
2010
2013
|
{
|
|
2011
2014
|
intent: "primary",
|
|
2012
2015
|
onClick: () => {
|
|
2013
|
-
|
|
2016
|
+
ye == null || ye(), o(!1);
|
|
2014
2017
|
},
|
|
2015
2018
|
children: r("signatureRequest.qrDone")
|
|
2016
2019
|
}
|
|
@@ -2018,19 +2021,19 @@ const wr = Di(
|
|
|
2018
2021
|
L,
|
|
2019
2022
|
{
|
|
2020
2023
|
intent: "primary",
|
|
2021
|
-
onClick: () =>
|
|
2024
|
+
onClick: () => En(Ye + 1),
|
|
2022
2025
|
children: r("signatureRequest.qrNext")
|
|
2023
2026
|
}
|
|
2024
2027
|
)
|
|
2025
|
-
] }) : /* @__PURE__ */ n(
|
|
2026
|
-
] }) :
|
|
2027
|
-
/* @__PURE__ */ u(
|
|
2028
|
-
/* @__PURE__ */ n(
|
|
2029
|
-
|
|
2028
|
+
] }) : /* @__PURE__ */ n(q.Close, { asChild: !0, children: /* @__PURE__ */ n(L, { intent: "outline", children: r("signatureRequest.close") }) }) })
|
|
2029
|
+
] }) : nt ? /* @__PURE__ */ u(ge, { children: [
|
|
2030
|
+
/* @__PURE__ */ u(q.Body, { children: [
|
|
2031
|
+
/* @__PURE__ */ n(ot, { "aria-labelledby": mt, children: Zn.map((e) => /* @__PURE__ */ n(
|
|
2032
|
+
ot.Item,
|
|
2030
2033
|
{
|
|
2031
2034
|
"data-recipient": e.role,
|
|
2032
2035
|
leading: /* @__PURE__ */ n(
|
|
2033
|
-
|
|
2036
|
+
st,
|
|
2034
2037
|
{
|
|
2035
2038
|
"aria-hidden": "true",
|
|
2036
2039
|
name: e.name,
|
|
@@ -2059,22 +2062,22 @@ const wr = Di(
|
|
|
2059
2062
|
},
|
|
2060
2063
|
e.key
|
|
2061
2064
|
)) }),
|
|
2062
|
-
|
|
2063
|
-
|
|
2065
|
+
ae ? /* @__PURE__ */ n(
|
|
2066
|
+
j,
|
|
2064
2067
|
{
|
|
2065
2068
|
variant: "error",
|
|
2066
2069
|
className: "ds:mt-[var(--spacing-md)]",
|
|
2067
|
-
children: /* @__PURE__ */ n(
|
|
2070
|
+
children: /* @__PURE__ */ n(j.Description, { children: ae })
|
|
2068
2071
|
}
|
|
2069
2072
|
) : null
|
|
2070
2073
|
] }),
|
|
2071
|
-
/* @__PURE__ */ u(
|
|
2074
|
+
/* @__PURE__ */ u(q.Footer, { children: [
|
|
2072
2075
|
/* @__PURE__ */ n(
|
|
2073
2076
|
L,
|
|
2074
2077
|
{
|
|
2075
2078
|
intent: "primary",
|
|
2076
|
-
startIcon: /* @__PURE__ */ n(
|
|
2077
|
-
onClick:
|
|
2079
|
+
startIcon: /* @__PURE__ */ n(Ki, {}),
|
|
2080
|
+
onClick: ta,
|
|
2078
2081
|
loading: y,
|
|
2079
2082
|
children: r("signatureRequest.confirmSend")
|
|
2080
2083
|
}
|
|
@@ -2086,21 +2089,21 @@ const wr = Di(
|
|
|
2086
2089
|
disabled: y,
|
|
2087
2090
|
onClick: () => {
|
|
2088
2091
|
var e;
|
|
2089
|
-
(e = ne.current) == null || e.focus(),
|
|
2092
|
+
(e = ne.current) == null || e.focus(), on(!1);
|
|
2090
2093
|
},
|
|
2091
2094
|
children: r("signatureRequest.confirmBack")
|
|
2092
2095
|
}
|
|
2093
2096
|
)
|
|
2094
2097
|
] })
|
|
2095
|
-
] }) : /* @__PURE__ */ u(
|
|
2096
|
-
/* @__PURE__ */ u(
|
|
2097
|
-
|
|
2098
|
+
] }) : /* @__PURE__ */ u(ge, { children: [
|
|
2099
|
+
/* @__PURE__ */ u(q.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
2100
|
+
wt ? /* @__PURE__ */ u(ge, { children: [
|
|
2098
2101
|
/* @__PURE__ */ n(
|
|
2099
|
-
|
|
2102
|
+
cr,
|
|
2100
2103
|
{
|
|
2101
|
-
signatures:
|
|
2104
|
+
signatures: _e,
|
|
2102
2105
|
loading: O,
|
|
2103
|
-
showLegalLevel:
|
|
2106
|
+
showLegalLevel: ke,
|
|
2104
2107
|
onView: M,
|
|
2105
2108
|
onDownload: b,
|
|
2106
2109
|
onShare: E,
|
|
@@ -2108,108 +2111,108 @@ const wr = Di(
|
|
|
2108
2111
|
onDelete: z
|
|
2109
2112
|
}
|
|
2110
2113
|
),
|
|
2111
|
-
|
|
2114
|
+
X || Pn ? /* @__PURE__ */ n(Ra, { decorative: !0 }) : null
|
|
2112
2115
|
] }) : null,
|
|
2113
2116
|
f ? /* @__PURE__ */ n(
|
|
2114
|
-
|
|
2117
|
+
Rr,
|
|
2115
2118
|
{
|
|
2116
2119
|
items: te,
|
|
2117
|
-
loading:
|
|
2118
|
-
operatorOptions:
|
|
2119
|
-
assignments:
|
|
2120
|
-
onAssign:
|
|
2121
|
-
showOperatorChannels:
|
|
2122
|
-
operatorChannels:
|
|
2123
|
-
onOperatorChannel: (e, t) =>
|
|
2120
|
+
loading: de,
|
|
2121
|
+
operatorOptions: Wn,
|
|
2122
|
+
assignments: un,
|
|
2123
|
+
onAssign: di,
|
|
2124
|
+
showOperatorChannels: Oe,
|
|
2125
|
+
operatorChannels: It,
|
|
2126
|
+
onOperatorChannel: (e, t) => St((s) => ({
|
|
2124
2127
|
...s,
|
|
2125
2128
|
[e]: t
|
|
2126
2129
|
})),
|
|
2127
|
-
onAssignAllToMe: p !== void 0 ?
|
|
2130
|
+
onAssignAllToMe: p !== void 0 ? ui : void 0,
|
|
2128
2131
|
busy: y
|
|
2129
2132
|
}
|
|
2130
2133
|
) : null,
|
|
2131
|
-
|
|
2134
|
+
X ? /* @__PURE__ */ u(
|
|
2132
2135
|
"section",
|
|
2133
2136
|
{
|
|
2134
|
-
className: `${
|
|
2137
|
+
className: `${Rn} ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start`,
|
|
2135
2138
|
children: [
|
|
2136
|
-
/* @__PURE__ */ n("div", { className:
|
|
2139
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ u("div", { className: zn, children: [
|
|
2137
2140
|
/* @__PURE__ */ n("p", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: r("signatureRequest.operatorSection") }),
|
|
2138
2141
|
p !== void 0 ? /* @__PURE__ */ n(
|
|
2139
2142
|
L,
|
|
2140
2143
|
{
|
|
2141
2144
|
intent: "outline",
|
|
2142
2145
|
size: "sm",
|
|
2143
|
-
startIcon: /* @__PURE__ */ n(
|
|
2146
|
+
startIcon: /* @__PURE__ */ n(es, {}),
|
|
2144
2147
|
disabled: y,
|
|
2145
2148
|
onClick: () => {
|
|
2146
|
-
if (
|
|
2147
|
-
|
|
2149
|
+
if (Nt(p), x) {
|
|
2150
|
+
Te(
|
|
2148
2151
|
p,
|
|
2149
|
-
|
|
2150
|
-
|
|
2152
|
+
Qn(
|
|
2153
|
+
Y(
|
|
2151
2154
|
p
|
|
2152
2155
|
)
|
|
2153
2156
|
),
|
|
2154
|
-
|
|
2157
|
+
C,
|
|
2155
2158
|
"operator"
|
|
2156
2159
|
);
|
|
2157
2160
|
return;
|
|
2158
2161
|
}
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
+
Re(
|
|
2163
|
+
Qn(
|
|
2164
|
+
Y(
|
|
2162
2165
|
p,
|
|
2163
|
-
|
|
2166
|
+
Ne
|
|
2164
2167
|
)
|
|
2165
2168
|
)
|
|
2166
|
-
),
|
|
2169
|
+
), le(null);
|
|
2167
2170
|
},
|
|
2168
2171
|
children: r("signatureRequest.assignToMe")
|
|
2169
2172
|
}
|
|
2170
2173
|
) : null
|
|
2171
2174
|
] }) }),
|
|
2172
|
-
/* @__PURE__ */ u("div", { className:
|
|
2173
|
-
/* @__PURE__ */ n("div", { className:
|
|
2174
|
-
|
|
2175
|
+
/* @__PURE__ */ u("div", { className: se, "data-person-row": "operator", children: [
|
|
2176
|
+
/* @__PURE__ */ n("div", { className: it, children: /* @__PURE__ */ n(
|
|
2177
|
+
st,
|
|
2175
2178
|
{
|
|
2176
2179
|
"aria-hidden": "true",
|
|
2177
|
-
name:
|
|
2180
|
+
name: Fe ? void 0 : Ae(m, D),
|
|
2178
2181
|
size: "sm"
|
|
2179
2182
|
}
|
|
2180
2183
|
) }),
|
|
2181
|
-
/* @__PURE__ */ u("div", { className:
|
|
2184
|
+
/* @__PURE__ */ u("div", { className: Sa, children: [
|
|
2182
2185
|
/* @__PURE__ */ n(
|
|
2183
2186
|
Ue,
|
|
2184
2187
|
{
|
|
2185
|
-
options:
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
+
options: ja(
|
|
2189
|
+
Wn,
|
|
2190
|
+
D
|
|
2188
2191
|
),
|
|
2189
|
-
value:
|
|
2192
|
+
value: D,
|
|
2190
2193
|
showDescriptions: !0,
|
|
2191
|
-
"aria-describedby":
|
|
2194
|
+
"aria-describedby": kt ? Os : void 0,
|
|
2192
2195
|
onValueChange: (e) => {
|
|
2193
|
-
if (!(!e || !
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2196
|
+
if (!(!e || !Ua(Wn, e))) {
|
|
2197
|
+
if (Nt(e), x) {
|
|
2198
|
+
Te(
|
|
2196
2199
|
e,
|
|
2197
|
-
e ===
|
|
2198
|
-
|
|
2200
|
+
e === K ? "email" : Qn(
|
|
2201
|
+
Y(e)
|
|
2199
2202
|
),
|
|
2200
|
-
|
|
2203
|
+
C,
|
|
2201
2204
|
"operator"
|
|
2202
2205
|
);
|
|
2203
2206
|
return;
|
|
2204
2207
|
}
|
|
2205
|
-
|
|
2206
|
-
e ===
|
|
2207
|
-
|
|
2208
|
+
Re(
|
|
2209
|
+
e === K ? "email" : Qn(
|
|
2210
|
+
Y(
|
|
2208
2211
|
e,
|
|
2209
|
-
|
|
2212
|
+
Ne
|
|
2210
2213
|
)
|
|
2211
2214
|
)
|
|
2212
|
-
),
|
|
2215
|
+
), le(null);
|
|
2213
2216
|
}
|
|
2214
2217
|
},
|
|
2215
2218
|
required: !0,
|
|
@@ -2220,221 +2223,222 @@ const wr = Di(
|
|
|
2220
2223
|
"aria-label": r("signatureRequest.operatorSection")
|
|
2221
2224
|
}
|
|
2222
2225
|
),
|
|
2223
|
-
|
|
2226
|
+
kt ? /* @__PURE__ */ n(
|
|
2224
2227
|
"span",
|
|
2225
2228
|
{
|
|
2226
|
-
id:
|
|
2229
|
+
id: Os,
|
|
2227
2230
|
className: "ds:sr-only",
|
|
2228
|
-
children:
|
|
2231
|
+
children: kt
|
|
2229
2232
|
}
|
|
2230
2233
|
) : null
|
|
2231
2234
|
] }),
|
|
2232
2235
|
/* @__PURE__ */ u(
|
|
2233
2236
|
"div",
|
|
2234
2237
|
{
|
|
2235
|
-
className:
|
|
2238
|
+
className: Fe ? `${rt} ds:hidden ds:@[512px]/person:block` : rt,
|
|
2236
2239
|
children: [
|
|
2237
|
-
|
|
2240
|
+
Fe ? null : /* @__PURE__ */ n(
|
|
2238
2241
|
Ue,
|
|
2239
2242
|
{
|
|
2240
2243
|
id: "signature-request-operator-channel",
|
|
2241
|
-
options:
|
|
2242
|
-
value:
|
|
2244
|
+
options: $s,
|
|
2245
|
+
value: F,
|
|
2243
2246
|
adornmentInTrigger: !0,
|
|
2244
2247
|
showDescriptions: !0,
|
|
2245
2248
|
disabled: y,
|
|
2246
2249
|
"aria-label": r(
|
|
2247
2250
|
"signatureRequest.operatorChannelLabel"
|
|
2248
2251
|
),
|
|
2249
|
-
"aria-describedby":
|
|
2252
|
+
"aria-describedby": At ? cs : void 0,
|
|
2250
2253
|
onValueChange: (e) => {
|
|
2251
|
-
if (
|
|
2254
|
+
if ($s.some(
|
|
2252
2255
|
(s) => s.value === e && !s.disabled
|
|
2253
2256
|
)) {
|
|
2254
|
-
if (
|
|
2255
|
-
|
|
2257
|
+
if (Me && e === "on-device" && !Ne) {
|
|
2258
|
+
Ri();
|
|
2256
2259
|
return;
|
|
2257
2260
|
}
|
|
2258
|
-
if (
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
+
if (x) {
|
|
2262
|
+
Te(
|
|
2263
|
+
D,
|
|
2261
2264
|
e,
|
|
2262
|
-
|
|
2265
|
+
C,
|
|
2263
2266
|
"operator"
|
|
2264
2267
|
);
|
|
2265
2268
|
return;
|
|
2266
2269
|
}
|
|
2267
|
-
|
|
2270
|
+
Re(e), le(null);
|
|
2268
2271
|
}
|
|
2269
2272
|
}
|
|
2270
2273
|
}
|
|
2271
2274
|
),
|
|
2272
|
-
|
|
2275
|
+
Pt
|
|
2273
2276
|
]
|
|
2274
2277
|
}
|
|
2275
2278
|
),
|
|
2276
|
-
|
|
2279
|
+
At && !Fe ? /* @__PURE__ */ n("span", { id: cs, className: "ds:sr-only", children: At }) : null
|
|
2277
2280
|
] })
|
|
2278
2281
|
]
|
|
2279
2282
|
}
|
|
2280
2283
|
) : null,
|
|
2281
|
-
|
|
2282
|
-
channel: V[
|
|
2283
|
-
}) :
|
|
2284
|
-
(
|
|
2285
|
-
|
|
2284
|
+
X || Pn ? /* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: Is ? r("signatureRequest.operatorChannelReverted", {
|
|
2285
|
+
channel: V[Is].label
|
|
2286
|
+
}) : hi }) : null,
|
|
2287
|
+
(X || f) && Pn ? /* @__PURE__ */ n(Ra, { decorative: !0 }) : null,
|
|
2288
|
+
Pn ? /* @__PURE__ */ u(
|
|
2286
2289
|
"section",
|
|
2287
2290
|
{
|
|
2288
|
-
className: `${
|
|
2291
|
+
className: `${Rn} ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start`,
|
|
2289
2292
|
children: [
|
|
2290
|
-
/* @__PURE__ */ u("div", { className:
|
|
2291
|
-
/* @__PURE__ */ u("div", { className:
|
|
2293
|
+
/* @__PURE__ */ u("div", { className: se, children: [
|
|
2294
|
+
/* @__PURE__ */ u("div", { className: zn, children: [
|
|
2292
2295
|
/* @__PURE__ */ n("p", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: r("signatureRequest.signersSection") }),
|
|
2293
|
-
|
|
2296
|
+
Ke === "addRow" ? /* @__PURE__ */ n(
|
|
2294
2297
|
L,
|
|
2295
2298
|
{
|
|
2296
|
-
ref:
|
|
2299
|
+
ref: qn,
|
|
2297
2300
|
intent: "outline",
|
|
2298
2301
|
size: "sm",
|
|
2299
|
-
startIcon: /* @__PURE__ */ n(
|
|
2300
|
-
disabled: !
|
|
2301
|
-
"aria-describedby":
|
|
2302
|
-
onClick:
|
|
2302
|
+
startIcon: /* @__PURE__ */ n(at, {}),
|
|
2303
|
+
disabled: !Ni,
|
|
2304
|
+
"aria-describedby": Xn ? gt : void 0,
|
|
2305
|
+
onClick: Ii,
|
|
2303
2306
|
children: r("signatureRequest.addSigner")
|
|
2304
2307
|
}
|
|
2305
|
-
) :
|
|
2308
|
+
) : Ke !== null ? (
|
|
2306
2309
|
// The second signee line, or the host's own
|
|
2307
2310
|
// create-signee page, as platform's "Aggiungi
|
|
2308
2311
|
// firmatario".
|
|
2309
2312
|
/* @__PURE__ */ n(
|
|
2310
2313
|
L,
|
|
2311
2314
|
{
|
|
2312
|
-
ref:
|
|
2315
|
+
ref: qn,
|
|
2313
2316
|
intent: "outline",
|
|
2314
2317
|
size: "sm",
|
|
2315
|
-
startIcon:
|
|
2318
|
+
startIcon: Ke === "openSlot" ? /* @__PURE__ */ n(at, {}) : /* @__PURE__ */ n(es, {}),
|
|
2316
2319
|
disabled: y,
|
|
2317
|
-
"data-action":
|
|
2318
|
-
onClick:
|
|
2320
|
+
"data-action": Ke === "openSlot" ? "add-second-signee" : "create-signee",
|
|
2321
|
+
onClick: Ke === "openSlot" ? yi : re,
|
|
2319
2322
|
children: r(
|
|
2320
|
-
|
|
2323
|
+
Ke === "openSlot" ? "signatureRequest.addSigner" : "signatureRequest.addSignatory"
|
|
2321
2324
|
)
|
|
2322
2325
|
}
|
|
2323
2326
|
)
|
|
2324
2327
|
) : null
|
|
2325
2328
|
] }),
|
|
2326
|
-
|
|
2327
|
-
|
|
2329
|
+
Ln ? /* @__PURE__ */ u(
|
|
2330
|
+
j,
|
|
2328
2331
|
{
|
|
2329
2332
|
variant: "warning",
|
|
2330
2333
|
announce: "polite",
|
|
2331
2334
|
"data-note": "minor-patient",
|
|
2332
|
-
"data-warning":
|
|
2333
|
-
className:
|
|
2335
|
+
"data-warning": Ln,
|
|
2336
|
+
className: H,
|
|
2334
2337
|
children: [
|
|
2335
|
-
/* @__PURE__ */ n(
|
|
2336
|
-
|
|
2338
|
+
/* @__PURE__ */ n(j.Description, { children: r(wr[Ln]) }),
|
|
2339
|
+
Bt ? /* @__PURE__ */ n(j.Action, { children: /* @__PURE__ */ n(
|
|
2337
2340
|
L,
|
|
2338
2341
|
{
|
|
2339
2342
|
intent: "tonal",
|
|
2340
2343
|
size: "sm",
|
|
2341
|
-
startIcon: /* @__PURE__ */ n(
|
|
2344
|
+
startIcon: /* @__PURE__ */ n(at, {}),
|
|
2342
2345
|
disabled: y,
|
|
2343
|
-
onClick:
|
|
2346
|
+
onClick: re,
|
|
2344
2347
|
children: r("signatureRequest.addSignatory")
|
|
2345
2348
|
}
|
|
2346
2349
|
) }) : null
|
|
2347
2350
|
]
|
|
2348
2351
|
}
|
|
2349
2352
|
) : null,
|
|
2350
|
-
|
|
2353
|
+
Gs ? /* @__PURE__ */ n("div", { className: H, children: /* @__PURE__ */ n(
|
|
2351
2354
|
L,
|
|
2352
2355
|
{
|
|
2353
2356
|
intent: "link",
|
|
2354
2357
|
size: "sm",
|
|
2355
|
-
startIcon: /* @__PURE__ */ n(
|
|
2358
|
+
startIcon: /* @__PURE__ */ n(at, {}),
|
|
2356
2359
|
disabled: y,
|
|
2357
|
-
onClick:
|
|
2360
|
+
onClick: re,
|
|
2358
2361
|
children: r("signatureRequest.addSignatory")
|
|
2359
2362
|
}
|
|
2360
2363
|
) }) : null,
|
|
2361
|
-
v && !
|
|
2364
|
+
v && !Cn ? /* @__PURE__ */ u(
|
|
2362
2365
|
"div",
|
|
2363
2366
|
{
|
|
2364
|
-
className: `${
|
|
2367
|
+
className: `${H} ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]`,
|
|
2365
2368
|
children: [
|
|
2366
2369
|
/* @__PURE__ */ n(
|
|
2367
2370
|
"label",
|
|
2368
2371
|
{
|
|
2369
|
-
htmlFor:
|
|
2372
|
+
htmlFor: Pa,
|
|
2370
2373
|
className: "type-label ds:text-foreground",
|
|
2371
2374
|
children: r("signatureRequest.channelLabel")
|
|
2372
2375
|
}
|
|
2373
2376
|
),
|
|
2374
|
-
|
|
2377
|
+
la
|
|
2375
2378
|
]
|
|
2376
2379
|
}
|
|
2377
2380
|
) : null,
|
|
2378
|
-
|
|
2379
|
-
|
|
2381
|
+
Cn ? null : oa,
|
|
2382
|
+
Bs ? /* @__PURE__ */ n(
|
|
2380
2383
|
"p",
|
|
2381
2384
|
{
|
|
2382
|
-
id:
|
|
2385
|
+
id: Ja,
|
|
2383
2386
|
"data-note": "second-signee-hint",
|
|
2384
|
-
className: `${
|
|
2385
|
-
children:
|
|
2387
|
+
className: `${H} type-body-sm ds:text-[color:var(--muted-foreground)]`,
|
|
2388
|
+
children: Bs
|
|
2386
2389
|
}
|
|
2387
2390
|
) : null,
|
|
2388
|
-
|
|
2391
|
+
Xn ? /* @__PURE__ */ n(
|
|
2389
2392
|
"p",
|
|
2390
2393
|
{
|
|
2391
|
-
id:
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
+
id: gt,
|
|
2395
|
+
"data-note": "second-signee-hint",
|
|
2396
|
+
className: `${H} type-body-sm ds:text-[color:var(--muted-foreground)]`,
|
|
2397
|
+
children: Xn
|
|
2394
2398
|
}
|
|
2395
2399
|
) : null
|
|
2396
2400
|
] }),
|
|
2397
|
-
/* @__PURE__ */ u("div", { className:
|
|
2398
|
-
|
|
2399
|
-
var
|
|
2401
|
+
/* @__PURE__ */ u("div", { className: ir, children: [
|
|
2402
|
+
N.map((e, t) => {
|
|
2403
|
+
var va;
|
|
2400
2404
|
const s = l.filter(
|
|
2401
|
-
(
|
|
2402
|
-
), a =
|
|
2405
|
+
(P) => P.value === e.signerId || !Lt.includes(P.value)
|
|
2406
|
+
), a = Ae(
|
|
2403
2407
|
l,
|
|
2404
2408
|
e.signerId
|
|
2405
2409
|
), c = l.find(
|
|
2406
|
-
(
|
|
2410
|
+
(P) => P.value === e.signerId
|
|
2407
2411
|
), d = (c == null ? void 0 : c.isMinor) === !0 && c.isPatient !== !0, h = (f || G) && t > 0, g = h ? s.filter(
|
|
2408
|
-
(
|
|
2412
|
+
(P) => P.isPatient !== !0
|
|
2409
2413
|
) : s, T = g.some(
|
|
2410
|
-
(
|
|
2411
|
-
),
|
|
2414
|
+
(P) => P.value === e.signerId
|
|
2415
|
+
), I = h ? Yn : null, A = `${hs}-${e.rowId}`, xe = `${Ya}-${e.rowId}`, Q = wn(
|
|
2412
2416
|
e.signerId
|
|
2413
|
-
), he =
|
|
2417
|
+
), he = vt(
|
|
2414
2418
|
e.signerId,
|
|
2415
|
-
(
|
|
2416
|
-
),
|
|
2419
|
+
(va = J == null ? void 0 : J.signerAvailableChannels) == null ? void 0 : va[e.signerId]
|
|
2420
|
+
), Se = Ys(
|
|
2417
2421
|
he,
|
|
2418
|
-
|
|
2419
|
-
),
|
|
2420
|
-
(
|
|
2421
|
-
),
|
|
2422
|
+
Q
|
|
2423
|
+
), qe = !v && Se.every(
|
|
2424
|
+
(P) => P.disabled
|
|
2425
|
+
), Ce = v ? void 0 : Js(
|
|
2422
2426
|
he,
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
),
|
|
2426
|
-
if (
|
|
2427
|
-
|
|
2427
|
+
Q,
|
|
2428
|
+
qe
|
|
2429
|
+
), Be = `${Xa}-${e.rowId}`, pa = Ft(t) && mn, Pi = f || G ? h : N.length > 1, Li = (P) => {
|
|
2430
|
+
if (P === Jt) {
|
|
2431
|
+
Us && (re == null || re());
|
|
2428
2432
|
return;
|
|
2429
2433
|
}
|
|
2430
|
-
if (!
|
|
2431
|
-
(
|
|
2434
|
+
if (!P || !g.some(
|
|
2435
|
+
(me) => me.value === P
|
|
2432
2436
|
))
|
|
2433
2437
|
return;
|
|
2434
|
-
if (G && !h &&
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
(
|
|
2438
|
+
if (G && !h && Ve(!1), v) {
|
|
2439
|
+
He(
|
|
2440
|
+
C.map(
|
|
2441
|
+
(me) => me.rowId === e.rowId ? { ...me, signerId: P } : me
|
|
2438
2442
|
),
|
|
2439
2443
|
S,
|
|
2440
2444
|
{
|
|
@@ -2445,62 +2449,71 @@ const wr = Di(
|
|
|
2445
2449
|
);
|
|
2446
2450
|
return;
|
|
2447
2451
|
}
|
|
2448
|
-
const
|
|
2449
|
-
|
|
2452
|
+
const Vt = yn(
|
|
2453
|
+
P,
|
|
2450
2454
|
e.channel
|
|
2451
|
-
),
|
|
2452
|
-
(
|
|
2453
|
-
...
|
|
2454
|
-
signerId:
|
|
2455
|
-
channel:
|
|
2456
|
-
skipOtp:
|
|
2457
|
-
} :
|
|
2458
|
-
),
|
|
2459
|
-
if (
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2455
|
+
), $n = (f || G) && !h && C.length > 1, De = ($n ? C.slice(0, 1) : C).map(
|
|
2456
|
+
(me) => me.rowId === e.rowId ? {
|
|
2457
|
+
...me,
|
|
2458
|
+
signerId: P,
|
|
2459
|
+
channel: Vt,
|
|
2460
|
+
skipOtp: Vt === "on-device" ? me.skipOtp : void 0
|
|
2461
|
+
} : me
|
|
2462
|
+
), Ze = $n && N.length > 1 ? [r("signatureRequest.secondSigneeCleared")] : [];
|
|
2463
|
+
if (x) {
|
|
2464
|
+
Te(
|
|
2465
|
+
D,
|
|
2466
|
+
F,
|
|
2467
|
+
De,
|
|
2464
2468
|
"signers",
|
|
2465
|
-
|
|
2469
|
+
Ze
|
|
2466
2470
|
);
|
|
2467
2471
|
return;
|
|
2468
2472
|
}
|
|
2469
|
-
|
|
2470
|
-
},
|
|
2471
|
-
if (!
|
|
2472
|
-
(
|
|
2473
|
+
be(De), Ze.length > 0 && (le(null), ze(Ze.join(" ")));
|
|
2474
|
+
}, _i = (P) => {
|
|
2475
|
+
if (!Se.some(
|
|
2476
|
+
(vn) => vn.value === P && !vn.disabled
|
|
2473
2477
|
)) return;
|
|
2474
|
-
const
|
|
2475
|
-
(
|
|
2476
|
-
),
|
|
2478
|
+
const $n = P, De = C.map(
|
|
2479
|
+
(vn) => vn.rowId === e.rowId ? { ...vn, channel: $n, skipOtp: void 0 } : vn
|
|
2480
|
+
), Ze = f && !h ? lt({
|
|
2477
2481
|
items: te,
|
|
2478
|
-
channel:
|
|
2479
|
-
primaryIsPatient:
|
|
2480
|
-
}) : null
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2482
|
+
channel: $n,
|
|
2483
|
+
primaryIsPatient: Dn
|
|
2484
|
+
}) : null;
|
|
2485
|
+
Ze !== null && Ve(!1);
|
|
2486
|
+
const me = !h && As(
|
|
2487
|
+
De,
|
|
2488
|
+
ln(De, S)
|
|
2489
|
+
), fn = [];
|
|
2490
|
+
if (Ze !== null && N.length > 1 && fn.push(r(Zt[Ze])), me && De[1] && fn.push(
|
|
2491
|
+
Ps(De[1].signerId)
|
|
2492
|
+
), x) {
|
|
2493
|
+
Te(
|
|
2494
|
+
D,
|
|
2495
|
+
F,
|
|
2496
|
+
De,
|
|
2486
2497
|
"signers",
|
|
2487
|
-
|
|
2498
|
+
fn
|
|
2488
2499
|
);
|
|
2489
2500
|
return;
|
|
2490
2501
|
}
|
|
2491
|
-
|
|
2492
|
-
|
|
2502
|
+
be(De), fn.length > 0 && le(null), ze(
|
|
2503
|
+
fn.length > 0 ? fn.join(" ") : null
|
|
2504
|
+
);
|
|
2505
|
+
}, fa = /* @__PURE__ */ u(
|
|
2493
2506
|
"div",
|
|
2494
2507
|
{
|
|
2495
2508
|
role: "group",
|
|
2496
2509
|
"aria-label": h ? void 0 : a,
|
|
2497
|
-
"aria-labelledby": h ?
|
|
2510
|
+
"aria-labelledby": h ? xe : void 0,
|
|
2498
2511
|
"data-signer-id": e.signerId,
|
|
2499
2512
|
"data-signer-role": f || G ? h ? "second" : "main" : void 0,
|
|
2500
|
-
className:
|
|
2513
|
+
className: se,
|
|
2501
2514
|
children: [
|
|
2502
|
-
/* @__PURE__ */ n("div", { className:
|
|
2503
|
-
|
|
2515
|
+
/* @__PURE__ */ n("div", { className: it, children: /* @__PURE__ */ n(
|
|
2516
|
+
st,
|
|
2504
2517
|
{
|
|
2505
2518
|
"aria-hidden": "true",
|
|
2506
2519
|
name: f && !T ? void 0 : a,
|
|
@@ -2510,16 +2523,16 @@ const wr = Di(
|
|
|
2510
2523
|
/* @__PURE__ */ n(
|
|
2511
2524
|
"div",
|
|
2512
2525
|
{
|
|
2513
|
-
className: v && !
|
|
2526
|
+
className: v && !Cn ? Kt : Sa,
|
|
2514
2527
|
children: /* @__PURE__ */ n(
|
|
2515
2528
|
Ue,
|
|
2516
2529
|
{
|
|
2517
|
-
ref: h ?
|
|
2518
|
-
options:
|
|
2530
|
+
ref: h ? is : void 0,
|
|
2531
|
+
options: Ws(g),
|
|
2519
2532
|
value: f && !T ? "" : e.signerId,
|
|
2520
|
-
tone:
|
|
2521
|
-
"aria-describedby":
|
|
2522
|
-
onValueChange:
|
|
2533
|
+
tone: I ? "error" : "default",
|
|
2534
|
+
"aria-describedby": I ? A : t === 0 ? _t("patient") : void 0,
|
|
2535
|
+
onValueChange: Li,
|
|
2523
2536
|
required: !0,
|
|
2524
2537
|
disabled: y,
|
|
2525
2538
|
placeholder: r(
|
|
@@ -2532,8 +2545,8 @@ const wr = Di(
|
|
|
2532
2545
|
)
|
|
2533
2546
|
}
|
|
2534
2547
|
),
|
|
2535
|
-
|
|
2536
|
-
t === 0 ?
|
|
2548
|
+
Cn ? /* @__PURE__ */ u("div", { className: rt, children: [
|
|
2549
|
+
t === 0 ? la : /* @__PURE__ */ u(
|
|
2537
2550
|
"span",
|
|
2538
2551
|
{
|
|
2539
2552
|
"data-note": "batch-channel",
|
|
@@ -2552,97 +2565,100 @@ const wr = Di(
|
|
|
2552
2565
|
]
|
|
2553
2566
|
}
|
|
2554
2567
|
),
|
|
2555
|
-
|
|
2568
|
+
Pt
|
|
2556
2569
|
] }) : null,
|
|
2557
|
-
v ? null : /* @__PURE__ */ u("div", { className:
|
|
2570
|
+
v ? null : /* @__PURE__ */ u("div", { className: rt, children: [
|
|
2558
2571
|
/* @__PURE__ */ n(
|
|
2559
2572
|
Ue,
|
|
2560
2573
|
{
|
|
2561
2574
|
id: `signature-request-signer-channel-${e.rowId}`,
|
|
2562
|
-
options:
|
|
2563
|
-
value:
|
|
2575
|
+
options: Se,
|
|
2576
|
+
value: qe ? "" : e.channel,
|
|
2564
2577
|
adornmentInTrigger: !0,
|
|
2565
2578
|
showDescriptions: !0,
|
|
2566
2579
|
disabled: y,
|
|
2567
2580
|
"aria-label": r(
|
|
2568
2581
|
"signatureRequest.channelLabel"
|
|
2569
2582
|
),
|
|
2570
|
-
"aria-describedby":
|
|
2571
|
-
|
|
2583
|
+
"aria-describedby": [
|
|
2584
|
+
Ce ? Be : null,
|
|
2585
|
+
t === 0 ? _t("channel") : null
|
|
2586
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2587
|
+
onValueChange: _i
|
|
2572
2588
|
}
|
|
2573
2589
|
),
|
|
2574
|
-
|
|
2590
|
+
Pt
|
|
2575
2591
|
] }),
|
|
2576
|
-
|
|
2592
|
+
Ce && !qe ? /* @__PURE__ */ n(
|
|
2577
2593
|
"span",
|
|
2578
2594
|
{
|
|
2579
|
-
id:
|
|
2595
|
+
id: Be,
|
|
2580
2596
|
className: "ds:sr-only",
|
|
2581
|
-
children:
|
|
2597
|
+
children: Ce
|
|
2582
2598
|
}
|
|
2583
2599
|
) : null,
|
|
2584
|
-
|
|
2585
|
-
|
|
2600
|
+
Pi ? /* @__PURE__ */ n("div", { className: Ia, children: /* @__PURE__ */ n(
|
|
2601
|
+
xn,
|
|
2586
2602
|
{
|
|
2587
2603
|
intent: "ghost",
|
|
2588
2604
|
size: "sm",
|
|
2589
|
-
icon: /* @__PURE__ */ n(
|
|
2605
|
+
icon: /* @__PURE__ */ n(Ca, {}),
|
|
2590
2606
|
disabled: y,
|
|
2591
2607
|
"aria-label": r(
|
|
2592
2608
|
"signatureRequest.removeSigner"
|
|
2593
2609
|
),
|
|
2594
|
-
onClick: () =>
|
|
2610
|
+
onClick: () => Oi(e.rowId)
|
|
2595
2611
|
}
|
|
2596
2612
|
) }) : null,
|
|
2597
2613
|
d ? /* @__PURE__ */ n(
|
|
2598
|
-
|
|
2614
|
+
j,
|
|
2599
2615
|
{
|
|
2600
2616
|
variant: "warning",
|
|
2601
2617
|
announce: "polite",
|
|
2602
2618
|
"data-note": "minor-signer",
|
|
2603
|
-
className:
|
|
2604
|
-
children: /* @__PURE__ */ n(
|
|
2619
|
+
className: H,
|
|
2620
|
+
children: /* @__PURE__ */ n(j.Description, { children: r("signatureRequest.minorSignerWarning") })
|
|
2605
2621
|
}
|
|
2606
2622
|
) : null,
|
|
2607
|
-
|
|
2623
|
+
I ? /* @__PURE__ */ n(
|
|
2608
2624
|
"p",
|
|
2609
2625
|
{
|
|
2610
|
-
id:
|
|
2626
|
+
id: A,
|
|
2611
2627
|
role: "status",
|
|
2612
2628
|
"data-note": "second-signee-issue",
|
|
2613
|
-
"data-issue":
|
|
2614
|
-
className: `${
|
|
2615
|
-
children: r(
|
|
2629
|
+
"data-issue": I,
|
|
2630
|
+
className: `${H} type-body-sm ds:text-[color:var(--destructive)]`,
|
|
2631
|
+
children: r(yr[I])
|
|
2616
2632
|
}
|
|
2617
2633
|
) : null,
|
|
2618
|
-
|
|
2634
|
+
qe && Ce ? /* @__PURE__ */ n(
|
|
2619
2635
|
"p",
|
|
2620
2636
|
{
|
|
2621
|
-
id:
|
|
2637
|
+
id: Be,
|
|
2622
2638
|
"data-note": "no-channel",
|
|
2623
|
-
className: `${
|
|
2624
|
-
children:
|
|
2639
|
+
className: `${H} type-body-sm ds:text-[color:var(--muted-foreground)]`,
|
|
2640
|
+
children: Ce
|
|
2625
2641
|
}
|
|
2626
2642
|
) : null,
|
|
2627
|
-
v ? null :
|
|
2628
|
-
|
|
2643
|
+
v ? null : ea(
|
|
2644
|
+
ms(
|
|
2629
2645
|
e.signerId,
|
|
2630
2646
|
he
|
|
2631
2647
|
)
|
|
2632
2648
|
),
|
|
2633
|
-
!v && e.channel === "on-device" && !
|
|
2634
|
-
|
|
2649
|
+
!v && e.channel === "on-device" && !qe ? /* @__PURE__ */ n("div", { className: H, children: /* @__PURE__ */ n(
|
|
2650
|
+
ba,
|
|
2635
2651
|
{
|
|
2636
2652
|
label: r("signatureRequest.noOtp"),
|
|
2637
|
-
checked:
|
|
2638
|
-
disabled: y ||
|
|
2639
|
-
"aria-describedby":
|
|
2640
|
-
onCheckedChange: (
|
|
2641
|
-
skipOtp:
|
|
2653
|
+
checked: Ht(e, t),
|
|
2654
|
+
disabled: y || pa,
|
|
2655
|
+
"aria-describedby": pa ? Bn : void 0,
|
|
2656
|
+
onCheckedChange: (P) => Si(e.rowId, {
|
|
2657
|
+
skipOtp: P
|
|
2642
2658
|
})
|
|
2643
2659
|
}
|
|
2644
2660
|
) }) : null,
|
|
2645
|
-
|
|
2661
|
+
Cn && t === 0 ? oa : null
|
|
2646
2662
|
]
|
|
2647
2663
|
},
|
|
2648
2664
|
e.rowId
|
|
@@ -2652,31 +2668,31 @@ const wr = Di(
|
|
|
2652
2668
|
{
|
|
2653
2669
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
2654
2670
|
children: [
|
|
2655
|
-
/* @__PURE__ */ n("div", { className:
|
|
2671
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ n(
|
|
2656
2672
|
"p",
|
|
2657
2673
|
{
|
|
2658
|
-
id:
|
|
2659
|
-
className: `${
|
|
2674
|
+
id: xe,
|
|
2675
|
+
className: `${H} type-label ds:text-[color:var(--muted-foreground)]`,
|
|
2660
2676
|
children: r("signatureRequest.secondSigneeLabel")
|
|
2661
2677
|
}
|
|
2662
2678
|
) }),
|
|
2663
|
-
|
|
2679
|
+
fa
|
|
2664
2680
|
]
|
|
2665
2681
|
},
|
|
2666
2682
|
e.rowId
|
|
2667
|
-
) :
|
|
2683
|
+
) : fa;
|
|
2668
2684
|
}),
|
|
2669
|
-
|
|
2685
|
+
Hs ? /* @__PURE__ */ u(
|
|
2670
2686
|
"div",
|
|
2671
2687
|
{
|
|
2672
2688
|
"data-second-signee-slot": "",
|
|
2673
2689
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
2674
2690
|
children: [
|
|
2675
|
-
/* @__PURE__ */ n("div", { className:
|
|
2691
|
+
/* @__PURE__ */ n("div", { className: se, children: /* @__PURE__ */ n(
|
|
2676
2692
|
"p",
|
|
2677
2693
|
{
|
|
2678
|
-
id:
|
|
2679
|
-
className: `${
|
|
2694
|
+
id: us,
|
|
2695
|
+
className: `${H} type-label ds:text-[color:var(--muted-foreground)]`,
|
|
2680
2696
|
children: r("signatureRequest.secondSigneeLabel")
|
|
2681
2697
|
}
|
|
2682
2698
|
) }),
|
|
@@ -2684,22 +2700,22 @@ const wr = Di(
|
|
|
2684
2700
|
"div",
|
|
2685
2701
|
{
|
|
2686
2702
|
role: "group",
|
|
2687
|
-
"aria-labelledby":
|
|
2688
|
-
className:
|
|
2703
|
+
"aria-labelledby": us,
|
|
2704
|
+
className: se,
|
|
2689
2705
|
children: [
|
|
2690
|
-
/* @__PURE__ */ n("div", { className:
|
|
2691
|
-
/* @__PURE__ */ n("div", { className:
|
|
2706
|
+
/* @__PURE__ */ n("div", { className: it, children: /* @__PURE__ */ n(st, { "aria-hidden": "true", size: "sm" }) }),
|
|
2707
|
+
/* @__PURE__ */ n("div", { className: Kt, children: /* @__PURE__ */ n(
|
|
2692
2708
|
Ue,
|
|
2693
2709
|
{
|
|
2694
|
-
ref:
|
|
2695
|
-
options:
|
|
2710
|
+
ref: as,
|
|
2711
|
+
options: Ws(Mt),
|
|
2696
2712
|
value: "",
|
|
2697
2713
|
onValueChange: (e) => {
|
|
2698
|
-
if (e ===
|
|
2699
|
-
|
|
2714
|
+
if (e === Jt) {
|
|
2715
|
+
re == null || re();
|
|
2700
2716
|
return;
|
|
2701
2717
|
}
|
|
2702
|
-
|
|
2718
|
+
wi(e);
|
|
2703
2719
|
},
|
|
2704
2720
|
disabled: y,
|
|
2705
2721
|
placeholder: r(
|
|
@@ -2710,17 +2726,17 @@ const wr = Di(
|
|
|
2710
2726
|
)
|
|
2711
2727
|
}
|
|
2712
2728
|
) }),
|
|
2713
|
-
/* @__PURE__ */ n("div", { className:
|
|
2714
|
-
|
|
2729
|
+
/* @__PURE__ */ n("div", { className: Ia, children: /* @__PURE__ */ n(
|
|
2730
|
+
xn,
|
|
2715
2731
|
{
|
|
2716
2732
|
intent: "ghost",
|
|
2717
2733
|
size: "sm",
|
|
2718
|
-
icon: /* @__PURE__ */ n(
|
|
2734
|
+
icon: /* @__PURE__ */ n(Ca, {}),
|
|
2719
2735
|
disabled: y,
|
|
2720
2736
|
"aria-label": r(
|
|
2721
2737
|
"signatureRequest.removeSigner"
|
|
2722
2738
|
),
|
|
2723
|
-
onClick:
|
|
2739
|
+
onClick: ki
|
|
2724
2740
|
}
|
|
2725
2741
|
) })
|
|
2726
2742
|
]
|
|
@@ -2733,33 +2749,33 @@ const wr = Di(
|
|
|
2733
2749
|
]
|
|
2734
2750
|
}
|
|
2735
2751
|
) : null,
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2752
|
+
Xs || ae ? /* @__PURE__ */ n("div", { className: Rn, children: /* @__PURE__ */ u("div", { className: se, children: [
|
|
2753
|
+
Xs ? /* @__PURE__ */ n(
|
|
2754
|
+
j,
|
|
2739
2755
|
{
|
|
2740
2756
|
variant: "warning",
|
|
2741
|
-
id:
|
|
2742
|
-
className:
|
|
2743
|
-
children: /* @__PURE__ */ n(
|
|
2757
|
+
id: Bn,
|
|
2758
|
+
className: H,
|
|
2759
|
+
children: /* @__PURE__ */ n(j.Description, { children: r("signatureRequest.noOtpWarning") })
|
|
2744
2760
|
}
|
|
2745
2761
|
) : null,
|
|
2746
|
-
|
|
2762
|
+
ae ? /* @__PURE__ */ n(j, { variant: "error", className: H, children: /* @__PURE__ */ n(j.Description, { children: ae }) }) : null
|
|
2747
2763
|
] }) }) : null
|
|
2748
2764
|
] }),
|
|
2749
|
-
/* @__PURE__ */ u(
|
|
2765
|
+
/* @__PURE__ */ u(q.Footer, { children: [
|
|
2750
2766
|
/* @__PURE__ */ n(
|
|
2751
2767
|
L,
|
|
2752
2768
|
{
|
|
2753
2769
|
intent: "primary",
|
|
2754
|
-
startIcon: /* @__PURE__ */ n(
|
|
2755
|
-
onClick:
|
|
2756
|
-
"aria-describedby":
|
|
2757
|
-
disabled: !y && (ue &&
|
|
2770
|
+
startIcon: /* @__PURE__ */ n(qa, {}),
|
|
2771
|
+
onClick: Ei,
|
|
2772
|
+
"aria-describedby": Yn !== null && N[1] ? `${hs}-${N[1].rowId}` : void 0,
|
|
2773
|
+
disabled: !y && (ue && N.length === 0 || Qs || Yn !== null || !ue && !X || f && (de || te.length === 0)),
|
|
2758
2774
|
loading: y,
|
|
2759
2775
|
children: r("signatureRequest.requestSignature")
|
|
2760
2776
|
}
|
|
2761
2777
|
),
|
|
2762
|
-
/* @__PURE__ */ n(
|
|
2778
|
+
/* @__PURE__ */ n(q.Close, { asChild: !0, children: /* @__PURE__ */ n(L, { intent: "outline", disabled: y, children: r("signatureRequest.close") }) })
|
|
2763
2779
|
] })
|
|
2764
2780
|
] })
|
|
2765
2781
|
]
|
|
@@ -2767,8 +2783,8 @@ const wr = Di(
|
|
|
2767
2783
|
) }) }) });
|
|
2768
2784
|
}
|
|
2769
2785
|
);
|
|
2770
|
-
|
|
2786
|
+
Or.displayName = "SignatureRequestModal";
|
|
2771
2787
|
export {
|
|
2772
|
-
|
|
2788
|
+
Or as S
|
|
2773
2789
|
};
|
|
2774
|
-
//# sourceMappingURL=signature-request-
|
|
2790
|
+
//# sourceMappingURL=signature-request-opW0fQ5P.js.map
|