@rytass/bpm-core-react 0.7.6 → 0.8.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/chunks/{compose-B1quUa7y.js → compose-CQHDT7vh.js} +2 -2
  3. package/dist/chunks/{compose-B1quUa7y.js.map → compose-CQHDT7vh.js.map} +1 -1
  4. package/dist/chunks/{compose-B6nevcwq.cjs → compose-Ds_cAefe.cjs} +2 -2
  5. package/dist/chunks/{compose-B6nevcwq.cjs.map → compose-Ds_cAefe.cjs.map} +1 -1
  6. package/dist/chunks/designer-CQ9hxSdD.cjs +65 -0
  7. package/dist/chunks/designer-CQ9hxSdD.cjs.map +1 -0
  8. package/dist/chunks/{designer-BLfz5Dk9.js → designer-CUbVXEtS.js} +1075 -868
  9. package/dist/chunks/designer-CUbVXEtS.js.map +1 -0
  10. package/dist/chunks/detail-B-Q4W-iw.cjs +2 -0
  11. package/dist/chunks/detail-B-Q4W-iw.cjs.map +1 -0
  12. package/dist/chunks/{detail-fg8MTwuH.js → detail-Cts5_gVp.js} +285 -283
  13. package/dist/chunks/detail-Cts5_gVp.js.map +1 -0
  14. package/dist/pages/instances/detail/index.cjs +1 -1
  15. package/dist/pages/instances/detail/index.js +1 -1
  16. package/dist/pages/templates/compose/index.cjs +1 -1
  17. package/dist/pages/templates/compose/index.js +1 -1
  18. package/dist/pages/templates/designer/index.cjs +1 -1
  19. package/dist/pages/templates/designer/index.js +1 -1
  20. package/dist/views/instances/detail/index.cjs +1 -1
  21. package/dist/views/instances/detail/index.js +1 -1
  22. package/dist/views/templates/compose/index.cjs +1 -1
  23. package/dist/views/templates/compose/index.js +1 -1
  24. package/dist/views/templates/designer/index.cjs +1 -1
  25. package/dist/views/templates/designer/index.js +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/designer-BLfz5Dk9.js.map +0 -1
  28. package/dist/chunks/designer-DP002lt7.cjs +0 -65
  29. package/dist/chunks/designer-DP002lt7.cjs.map +0 -1
  30. package/dist/chunks/detail-KEmfpCtt.cjs +0 -2
  31. package/dist/chunks/detail-KEmfpCtt.cjs.map +0 -1
  32. package/dist/chunks/detail-fg8MTwuH.js.map +0 -1
@@ -9,13 +9,13 @@ import { AutoComplete as f, Button as p, Input as m, Modal as h, PageHeader as g
9
9
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
10
10
  import { cancelAdhocDirective as re, cancelApprovalInstance as ie, configureAdhocCompletionNotification as ae, configureAdhocStageNotification as oe, decideTask as se, listAdhocDirectives as ce, listAttachments as le, listTaskDecisions as ue, readApprovalInstance as de, readAttachmentDownloadUrl as fe, readAttachmentPreviewUrl as pe, readInstanceSignatures as me, requestAdhocCountersign as he, requestAdhocPreApproval as ge, resolveMemberProfiles as _e, resubmitApprovalInstance as ve, searchMembers as ye, uploadAttachment as be } from "@rytass/bpm-core-client/workflow";
11
11
  import xe from "@mezzanine-ui/react/ContentHeader";
12
- import { CheckedIcon as Se, ChevronLeftIcon as T, ChevronRightIcon as E, DangerousOutlineIcon as Ce, DownloadIcon as D, FileSearchIcon as we, NotificationUnreadIcon as Te, PlusIcon as Ee, RefreshCcwIcon as De, ShareIcon as Oe, UserIcon as ke, ZoomInIcon as O, ZoomOutIcon as Ae } from "@mezzanine-ui/icons";
13
- import { focusFormRendererField as je, validateFormRendererValues as Me } from "@rytass/bpm-core-client/form";
14
- import { Background as Ne, Controls as Pe, Handle as Fe, Position as k, ReactFlow as A } from "@xyflow/react";
15
- import * as Ie from "dagre";
16
- import { Document as Le, Page as Re } from "react-pdf";
17
- import { stepClasses as j } from "@mezzanine-ui/core/stepper";
18
- var M = {
12
+ import { CheckedIcon as Se, ChevronLeftIcon as T, ChevronRightIcon as E, DangerousOutlineIcon as Ce, DownloadIcon as D, FileSearchIcon as we, NotificationUnreadIcon as Te, PlusIcon as Ee, RefreshCcwIcon as De, ShareIcon as Oe, UserIcon as ke, ZoomInIcon as Ae, ZoomOutIcon as je } from "@mezzanine-ui/icons";
13
+ import { focusFormRendererField as Me, validateFormRendererValues as Ne } from "@rytass/bpm-core-client/form";
14
+ import { Background as Pe, Controls as Fe, Handle as Ie, Position as O, ReactFlow as k } from "@xyflow/react";
15
+ import * as Le from "dagre";
16
+ import { Document as Re, Page as ze } from "react-pdf";
17
+ import { stepClasses as A } from "@mezzanine-ui/core/stepper";
18
+ var j = {
19
19
  root: "bpm_root_ehm7w",
20
20
  toolbar: "bpm_toolbar_R-tis",
21
21
  pageControls: "bpm_pageControls_jM-rC",
@@ -24,9 +24,9 @@ var M = {
24
24
  viewport: "bpm_viewport_DQXms",
25
25
  page: "bpm_page_Cv5Rg",
26
26
  state: "bpm_state_bpgp3"
27
- }, N = 760, ze = 920, Be = 320, Ve = 32, P = .75, He = 1.75, Ue = .25;
28
- function F({ filename: e, fileUrl: t, onDownload: n }) {
29
- let r = u(null), [i, a] = d(null), [c, f] = d(1), [m, h] = d(1), [g, _] = d(N);
27
+ }, M = 760, Be = 920, Ve = 320, He = 32, N = .75, Ue = 1.75, We = .25;
28
+ function P({ filename: e, fileUrl: t, onDownload: n }) {
29
+ let r = u(null), [i, a] = d(null), [c, f] = d(1), [m, h] = d(1), [g, _] = d(M);
30
30
  s(() => {
31
31
  let e = r.current;
32
32
  if (!e || typeof ResizeObserver > "u") return;
@@ -39,19 +39,19 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
39
39
  a(null), f(1), h(1);
40
40
  }, [t]);
41
41
  let ee = l(() => {
42
- let e = Math.max(Be, g - Ve);
43
- return Math.round(Math.min(ze, e) * m);
42
+ let e = Math.max(Ve, g - He);
43
+ return Math.round(Math.min(Be, e) * m);
44
44
  }, [m, g]), v = o((e) => {
45
45
  a(e.numPages), f(1);
46
- }, []), y = c > 1, te = i !== null && c < i, ne = m > P, b = m < He, S = i === null ? `第 ${c} 頁` : `第 ${c} / ${i} 頁`, re = `${Math.round(m * 100)}%`;
46
+ }, []), y = c > 1, te = i !== null && c < i, ne = m > N, b = m < Ue, S = i === null ? `第 ${c} 頁` : `第 ${c} / ${i} 頁`, re = `${Math.round(m * 100)}%`;
47
47
  return /* @__PURE__ */ w("section", {
48
48
  "aria-label": `${e} PDF 預覽`,
49
- className: M.root,
49
+ className: j.root,
50
50
  children: [/* @__PURE__ */ w("div", {
51
- className: M.toolbar,
51
+ className: j.toolbar,
52
52
  children: [
53
53
  /* @__PURE__ */ w("div", {
54
- className: M.pageControls,
54
+ className: j.pageControls,
55
55
  "aria-label": "頁面切換",
56
56
  children: [
57
57
  /* @__PURE__ */ C(p, {
@@ -65,7 +65,7 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
65
65
  variant: "base-secondary"
66
66
  }),
67
67
  /* @__PURE__ */ C(x, {
68
- className: M.counter,
68
+ className: j.counter,
69
69
  component: "span",
70
70
  variant: "body",
71
71
  children: S
@@ -83,21 +83,21 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
83
83
  ]
84
84
  }),
85
85
  /* @__PURE__ */ w("div", {
86
- className: M.zoomControls,
86
+ className: j.zoomControls,
87
87
  "aria-label": "縮放",
88
88
  children: [
89
89
  /* @__PURE__ */ C(p, {
90
90
  "aria-label": "縮小",
91
91
  disabled: !ne,
92
- icon: Ae,
92
+ icon: je,
93
93
  onClick: () => {
94
- h((e) => Math.max(P, e - Ue));
94
+ h((e) => Math.max(N, e - We));
95
95
  },
96
96
  size: "minor",
97
97
  variant: "base-secondary"
98
98
  }),
99
99
  /* @__PURE__ */ C(x, {
100
- className: M.counter,
100
+ className: j.counter,
101
101
  component: "span",
102
102
  variant: "body",
103
103
  children: re
@@ -105,9 +105,9 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
105
105
  /* @__PURE__ */ C(p, {
106
106
  "aria-label": "放大",
107
107
  disabled: !b,
108
- icon: O,
108
+ icon: Ae,
109
109
  onClick: () => {
110
- h((e) => Math.min(He, e + Ue));
110
+ h((e) => Math.min(Ue, e + We));
111
111
  },
112
112
  size: "minor",
113
113
  variant: "base-secondary"
@@ -124,17 +124,17 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
124
124
  }) : null
125
125
  ]
126
126
  }), /* @__PURE__ */ C("div", {
127
- className: M.viewport,
127
+ className: j.viewport,
128
128
  ref: r,
129
- children: /* @__PURE__ */ C(Le, {
130
- error: /* @__PURE__ */ C(I, { message: "PDF 無法載入。" }),
129
+ children: /* @__PURE__ */ C(Re, {
130
+ error: /* @__PURE__ */ C(F, { message: "PDF 無法載入。" }),
131
131
  file: t,
132
- loading: /* @__PURE__ */ C(I, { message: "正在載入 PDF..." }),
133
- noData: /* @__PURE__ */ C(I, { message: "沒有可預覽的 PDF。" }),
132
+ loading: /* @__PURE__ */ C(F, { message: "正在載入 PDF..." }),
133
+ noData: /* @__PURE__ */ C(F, { message: "沒有可預覽的 PDF。" }),
134
134
  onLoadSuccess: v,
135
- children: /* @__PURE__ */ C(Re, {
136
- className: M.page,
137
- loading: /* @__PURE__ */ C(I, { message: "正在載入頁面..." }),
135
+ children: /* @__PURE__ */ C(ze, {
136
+ className: j.page,
137
+ loading: /* @__PURE__ */ C(F, { message: "正在載入頁面..." }),
138
138
  pageNumber: c,
139
139
  renderAnnotationLayer: !0,
140
140
  renderTextLayer: !0,
@@ -144,9 +144,9 @@ function F({ filename: e, fileUrl: t, onDownload: n }) {
144
144
  })]
145
145
  });
146
146
  }
147
- function I({ message: e }) {
147
+ function F({ message: e }) {
148
148
  return /* @__PURE__ */ C("div", {
149
- className: M.state,
149
+ className: j.state,
150
150
  children: /* @__PURE__ */ C(x, {
151
151
  color: "text-neutral",
152
152
  variant: "body",
@@ -156,63 +156,63 @@ function I({ message: e }) {
156
156
  }
157
157
  //#endregion
158
158
  //#region src/views/instances/detail/sections/shared.ts
159
- function L(e) {
160
- let t = z(e, "from"), n = z(e, "to"), r = z(e, "reason");
159
+ function I(e) {
160
+ let t = R(e, "from"), n = R(e, "to"), r = R(e, "reason");
161
161
  return !t || !n || !r ? null : {
162
162
  from: t,
163
163
  reason: r,
164
- ruleId: z(e, "ruleId"),
164
+ ruleId: R(e, "ruleId"),
165
165
  to: n
166
166
  };
167
167
  }
168
- function R(e) {
168
+ function L(e) {
169
169
  try {
170
170
  let t = JSON.parse(e);
171
- return Array.isArray(t) ? t.map((e) => We(e) ? L(e) : null).filter((e) => e !== null) : [];
171
+ return Array.isArray(t) ? t.map((e) => Ke(e) ? I(e) : null).filter((e) => e !== null) : [];
172
172
  } catch {
173
173
  return [];
174
174
  }
175
175
  }
176
- function z(e, t) {
176
+ function R(e, t) {
177
177
  let n = e[t];
178
178
  return typeof n == "string" ? n : null;
179
179
  }
180
- function B(e, t) {
180
+ function Ge(e, t) {
181
181
  let n = e[t];
182
182
  return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
183
183
  }
184
- function V(e, t) {
184
+ function z(e, t) {
185
185
  let n = e[t];
186
186
  return typeof n == "number" ? n : null;
187
187
  }
188
- function H(e) {
188
+ function B(e) {
189
189
  return typeof e == "string" && e.trim().length > 0;
190
190
  }
191
- function We(e) {
191
+ function Ke(e) {
192
192
  return typeof e == "object" && !!e;
193
193
  }
194
- function Ge(e) {
194
+ function qe(e) {
195
195
  return e.status === "PENDING" || e.status === "IN_PROGRESS";
196
196
  }
197
- function U(e) {
197
+ function V(e) {
198
198
  return e instanceof Error ? e.message : "發生未知錯誤";
199
199
  }
200
- function W(e) {
200
+ function H(e) {
201
201
  return !Number.isFinite(e) || e <= 0 ? "-" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
202
202
  }
203
- function G(e) {
203
+ function U(e) {
204
204
  return e.length > 16 ? `${e.slice(0, 12)}...` : e;
205
205
  }
206
- function Ke(e) {
206
+ function W(e) {
207
207
  return e === "APPROVED" ? "已同意" : e === "CANCELLED" ? "已取消" : e === "DRAFT" ? "草稿" : e === "EXPIRED" ? "已逾期" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "RUNNING" ? "進行中" : e;
208
208
  }
209
- function qe(e) {
209
+ function Je(e) {
210
210
  return e === "PENDING" ? "待處理" : e === "IN_PROGRESS" ? "處理中" : e === "COMPLETED" ? "已完成" : e === "CANCELLED" ? "已取消" : e === "TRANSFERRED" ? "已轉派" : e;
211
211
  }
212
- function Je(e) {
212
+ function Ye(e) {
213
213
  return e === "APPROVED" ? "同意" : e === "REJECTED" ? "拒絕" : e === "RETURNED" ? "退回" : e === "TRANSFERRED" ? "轉派" : e;
214
214
  }
215
- function Ye(e) {
215
+ function G(e) {
216
216
  return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
217
217
  }
218
218
  function K(e, t) {
@@ -224,7 +224,7 @@ function q(e, t) {
224
224
  return n ? `${n.name}(${n.email})` : e;
225
225
  }
226
226
  function Xe(e, t = /* @__PURE__ */ new Map()) {
227
- let n = R(e.delegationChainJson);
227
+ let n = L(e.delegationChainJson);
228
228
  if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => q(e, t)).join("、")}` : "未指定";
229
229
  let r = q(e.assigneeMemberId, t), i = q(e.originalAssigneeMemberId, t);
230
230
  return n.length === 0 || e.originalAssigneeMemberId === e.assigneeMemberId ? r : `${r}(原:${i})`;
@@ -236,12 +236,12 @@ function Qe(e, t) {
236
236
  if (t.type !== "userTask" || !t.data.returnBehavior.allowReturn) return [];
237
237
  if (t.data.returnBehavior.allowedTargets === "ANY") return e.nodes.filter((e) => e.id !== t.id).map((e) => ({
238
238
  id: e.id,
239
- name: `${e.data.label}(${Ye(e.type)})`
239
+ name: `${e.data.label}(${G(e.type)})`
240
240
  }));
241
241
  let n = t.data.returnBehavior.allowedTargets === "INITIATOR" ? e.nodes.find((e) => e.type === "startEvent")?.id : e.edges.find((e) => e.target === t.id)?.source, r = e.nodes.find((e) => e.id === n);
242
242
  return r ? [{
243
243
  id: r.id,
244
- name: `${r.data.label}(${Ye(r.type)})`
244
+ name: `${r.data.label}(${G(r.type)})`
245
245
  }] : [];
246
246
  }
247
247
  function $e(e) {
@@ -252,7 +252,7 @@ function $e(e) {
252
252
  };
253
253
  }
254
254
  function J(e) {
255
- if (!We(e)) return null;
255
+ if (!Ke(e)) return null;
256
256
  let t = e.email, n = e.id, r = e.name;
257
257
  return typeof n == "string" && typeof r == "string" ? {
258
258
  email: typeof t == "string" ? t : null,
@@ -271,13 +271,13 @@ function et(e, t) {
271
271
  return r.length === 1 ? r[0] ?? null : null;
272
272
  }
273
273
  function Y(e) {
274
- return H(e) ? {
274
+ return B(e) ? {
275
275
  text: e,
276
276
  type: "text"
277
277
  } : null;
278
278
  }
279
279
  function tt(e) {
280
- return H(e) ? {
280
+ return B(e) ? {
281
281
  text: e,
282
282
  type: "dangerText"
283
283
  } : null;
@@ -306,71 +306,71 @@ function it(e) {
306
306
  return e === "APPROVED" ? "已同意" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "TRANSFERRED" ? "已轉派" : "簽核已決議";
307
307
  }
308
308
  function at(e, t) {
309
- return e === "INSTANCE_STARTED" ? "案件已發起" : e === "TOKEN_CREATED" ? "流程路徑已建立" : e === "ENGINE_PROCESS_REQUESTED" ? "流程引擎已處理" : e === "TOKEN_ADVANCED" ? "流程已前進" : e === "TASK_CREATED" ? "待簽任務已建立" : e === "TASK_DECIDED" ? it(z(t, "action")) : e === "SLA_TRIGGERED" ? "時限提醒已觸發" : e;
309
+ return e === "INSTANCE_STARTED" ? "案件已發起" : e === "TOKEN_CREATED" ? "流程路徑已建立" : e === "ENGINE_PROCESS_REQUESTED" ? "流程引擎已處理" : e === "TOKEN_ADVANCED" ? "流程已前進" : e === "TASK_CREATED" ? "待簽任務已建立" : e === "TASK_DECIDED" ? it(R(t, "action")) : e === "SLA_TRIGGERED" ? "時限提醒已觸發" : e;
310
310
  }
311
311
  function ot(e) {
312
312
  try {
313
313
  let t = JSON.parse(e.payloadJson);
314
- return We(t) ? t : {};
314
+ return Ke(t) ? t : {};
315
315
  } catch {
316
316
  return {};
317
317
  }
318
318
  }
319
319
  function Q(e, t) {
320
- return e.eventType === "SLA_TRIGGERED" || z(t, "action") === "REJECTED" || z(t, "instanceState") === "REJECTED";
320
+ return e.eventType === "SLA_TRIGGERED" || R(t, "action") === "REJECTED" || R(t, "instanceState") === "REJECTED";
321
321
  }
322
322
  function st(e) {
323
323
  return t(e);
324
324
  }
325
325
  function ct(e, t, n, r) {
326
326
  if (e.eventType === "TASK_CREATED") {
327
- let e = z(t, "assigneeMemberId"), n = z(t, "originalAssigneeMemberId");
327
+ let e = R(t, "assigneeMemberId"), n = R(t, "originalAssigneeMemberId");
328
328
  if (!e) {
329
- let e = B(t, "candidateMemberIds");
329
+ let e = Ge(t, "candidateMemberIds");
330
330
  return e.length ? `候選簽核人:${e.map((e) => q(e, r)).join("、")}` : null;
331
331
  }
332
332
  let i = q(e, r), a = q(n, r);
333
333
  return n && n !== e ? `待簽人:${i}(原簽核人:${a})` : `待簽人:${i}`;
334
334
  }
335
335
  if (e.eventType === "TASK_DECIDED") {
336
- let e = z(t, "action"), n = z(t, "comment"), i = e ? `決議:${Je(e)}` : null, a = z(t, "transferToMemberId");
337
- return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(H).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${q(a, r)}`].filter(H).join(" · ") : i;
336
+ let e = R(t, "action"), n = R(t, "comment"), i = e ? `決議:${Ye(e)}` : null, a = R(t, "transferToMemberId");
337
+ return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(B).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${q(a, r)}`].filter(B).join(" · ") : i;
338
338
  }
339
339
  if (e.eventType === "TOKEN_ADVANCED") {
340
- let e = z(t, "action");
341
- if (e) return `流程結果:${Je(e)}`;
342
- let r = V(t, "arrivedCount"), i = V(t, "requiredCount");
340
+ let e = R(t, "action");
341
+ if (e) return `流程結果:${Ye(e)}`;
342
+ let r = z(t, "arrivedCount"), i = z(t, "requiredCount");
343
343
  if (r !== null && i !== null) return `等待匯合:${r}/${i}`;
344
- let a = z(t, "fromNodeId"), o = z(t, "toNodeId");
344
+ let a = R(t, "fromNodeId"), o = R(t, "toNodeId");
345
345
  if (a && o) return `由 ${K(a, n)} 前進至 ${K(o, n)}`;
346
346
  }
347
347
  if (e.eventType === "ENGINE_PROCESS_REQUESTED") {
348
- let e = z(t, "state");
349
- return e ? `案件狀態:${Ke(e)}` : null;
348
+ let e = R(t, "state");
349
+ return e ? `案件狀態:${W(e)}` : null;
350
350
  }
351
351
  return null;
352
352
  }
353
353
  function lt(e, t, n, r, i, a, o) {
354
354
  if (e.eventType !== "TASK_DECIDED") return [Y(ct(e, t, n, o))].filter(Z);
355
- let s = e.taskId ? r.get(e.taskId) : null, c = z(t, "action") ?? s?.action ?? null, l = z(t, "comment") ?? s?.comment ?? null, u = z(t, "transferToMemberId") ?? s?.transferToMemberId ?? null, d = z(t, "signatureId") ?? s?.signatureId ?? null, f = d ? i.get(d) : null;
355
+ let s = e.taskId ? r.get(e.taskId) : null, c = R(t, "action") ?? s?.action ?? null, l = R(t, "comment") ?? s?.comment ?? null, u = R(t, "transferToMemberId") ?? s?.transferToMemberId ?? null, d = R(t, "signatureId") ?? s?.signatureId ?? null, f = d ? i.get(d) : null;
356
356
  return [
357
- Y(c ? `決議:${Je(c)}` : null),
357
+ Y(c ? `決議:${Ye(c)}` : null),
358
358
  c === "REJECTED" ? tt(`拒絕原因:${l ?? "-"}`) : null,
359
359
  c === "RETURNED" ? Y(`退回說明:${l ?? "-"}`) : null,
360
360
  c === "TRANSFERRED" ? Y(`轉派給:${q(u, o)}`) : null,
361
361
  c === "TRANSFERRED" ? Y(`轉派說明:${l ?? "-"}`) : null,
362
- f ? Y(a?.valid ? `簽章:已驗證(${G(f.signedPayloadHash)})` : `簽章:待檢查(${G(f.signedPayloadHash)})`) : null
362
+ f ? Y(a?.valid ? `簽章:已驗證(${U(f.signedPayloadHash)})` : `簽章:待檢查(${U(f.signedPayloadHash)})`) : null
363
363
  ].filter(Z);
364
364
  }
365
- function $(e, t, n, r, i) {
365
+ function ut(e, t, n, r, i) {
366
366
  if (e.type === "startEvent" || i.has(e.id)) return !1;
367
367
  if (r === "REJECTED") return !0;
368
368
  let a = vt(e, t, n, r);
369
369
  return a.tone === "neutral" || a.tone === "waiting";
370
370
  }
371
- function ut(e, t, n, r, i) {
371
+ function $(e, t, n, r, i) {
372
372
  if (r !== "RUNNING" && r !== "REJECTED") return [];
373
- let a = e.nodes.filter((e) => $(e, t, n, r, i)), o = dt(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
373
+ let a = e.nodes.filter((e) => ut(e, t, n, r, i)), o = dt(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
374
374
  return a.filter((e) => o.has(e.id)).sort((e, t) => {
375
375
  let n = o.get(e.id) ?? 0, r = o.get(t.id) ?? 0;
376
376
  return n === r ? e.position.x === t.position.x ? e.position.y === t.position.y ? (s.get(e.id) ?? 0) - (s.get(t.id) ?? 0) : e.position.y - t.position.y : e.position.x - t.position.x : n - r;
@@ -384,7 +384,7 @@ function dt(e, t, n, r, i) {
384
384
  return ft(e, n, r, i).reduce((e, t) => ht(e, pt(t, o, a)), /* @__PURE__ */ new Map());
385
385
  }
386
386
  function ft(e, t, n, r) {
387
- let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(Ge).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [...new Set([
387
+ let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(qe).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [...new Set([
388
388
  ...i,
389
389
  ...a,
390
390
  ...o
@@ -427,7 +427,7 @@ function _t(e, t, n, r, i, a, o, s, c) {
427
427
  id: e.id,
428
428
  title: at(e.eventType, t)
429
429
  };
430
- }), u = t.filter(Ge).map((e) => ({
430
+ }), u = t.filter(qe).map((e) => ({
431
431
  descriptionParts: [
432
432
  Y(`節點:${K(e.nodeId, r)}`),
433
433
  X("處理者", e.assigneeMemberId, a, "未指定"),
@@ -436,8 +436,8 @@ function _t(e, t, n, r, i, a, o, s, c) {
436
436
  error: !1,
437
437
  id: `pending-task-${e.id}`,
438
438
  title: e.status === "IN_PROGRESS" ? "簽核處理中" : "等待簽核處理"
439
- })), d = new Set([...e.filter(rt).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(H)), f = r ? ut(r, t, n, i, d).map((e) => ({
440
- descriptionParts: [Y(`${Ye(e.type)} · 尚未抵達`)].filter(Z),
439
+ })), d = new Set([...e.filter(rt).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(B)), f = r ? $(r, t, n, i, d).map((e) => ({
440
+ descriptionParts: [Y(`${G(e.type)} · 尚未抵達`)].filter(Z),
441
441
  error: !1,
442
442
  forcePending: !0,
443
443
  id: `future-node-${e.id}`,
@@ -480,7 +480,7 @@ function vt(e, t, n, r) {
480
480
  statusLabel: r === "REJECTED" ? "已拒絕" : "已完成",
481
481
  tone: r === "REJECTED" ? "cancelled" : "completed"
482
482
  } : {
483
- secondaryLabel: Ye(e.type),
483
+ secondaryLabel: G(e.type),
484
484
  statusLabel: "未抵達",
485
485
  tone: "neutral"
486
486
  };
@@ -493,9 +493,9 @@ async function yt({ activityLogs: e, adhocDirectives: t = [], tasks: n }) {
493
493
  ...n.map((e) => e.assigneeMemberId),
494
494
  ...n.map((e) => e.originalAssigneeMemberId),
495
495
  ...n.flatMap((e) => e.candidateMemberIds),
496
- ...n.flatMap((e) => R(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
496
+ ...n.flatMap((e) => L(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
497
497
  ...t.flatMap((e) => [e.createdByMemberId, ...bt(e.targetValueJson)])
498
- ].filter(H))];
498
+ ].filter(B))];
499
499
  try {
500
500
  return await _e(r);
501
501
  } catch {
@@ -584,7 +584,7 @@ function Dt({ attachments: e, onDownload: n, onPreview: r }) {
584
584
  id: e.id,
585
585
  key: e.id,
586
586
  mimeType: e.mimeType,
587
- sizeLabel: W(Number(e.sizeBytes))
587
+ sizeLabel: H(Number(e.sizeBytes))
588
588
  })), [e]), a = l(() => [
589
589
  {
590
590
  dataIndex: "filename",
@@ -691,17 +691,17 @@ var Pt = {
691
691
  id: "WEBHOOK",
692
692
  name: "Webhook"
693
693
  }], Rt = a(function({ adhocDirectives: e, currentMemberId: r, instance: i, memberProfilesById: a, onChanged: o, tasks: s }, u) {
694
- let [g, _] = d(!1), [ee, y] = d(null), [b, ie] = d(""), [ce, le] = d(null), [ue, de] = d(!1), [fe, pe] = d(""), [me, _e] = d(!1), [ve, be] = d(null), [xe, Se] = d(""), [T, E] = d(null), [Ce, D] = d(!1), [we, Te] = d([]), [Ee, De] = d(!1), [Oe, ke] = d(""), [O, Ae] = d(null), [je, Me] = d(!1), [Ne, Pe] = d([]), [Fe, k] = d(!1), [A, Ie] = d("COUNTERSIGN"), [Le, Re] = d("REJECT_INSTANCE"), [j, M] = d(!1), [N, ze] = d("MEMBER"), [Be, Ve] = d(""), P = b.trim(), He = fe.trim(), Ue = xe.trim(), F = l(() => s.find((e) => Ze(e, r) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [r, s]), I = l(() => F && i ? i.workflowSnapshot.nodes.find((e) => e.id === F.nodeId) ?? null : null, [F, i]), L = l(() => I && i ? Qe(i.workflowSnapshot, I) : [], [I, i]), R = I?.type === "userTask" && I.data.returnBehavior.allowReturn, z = I?.type === "userTask" && I.data.allowAddSigner, B = l(() => e.filter((e) => e.status === "PENDING"), [e]), V = L.find((e) => e.id === ve) ?? L[0] ?? null, H = l(() => s.map((e) => ({
694
+ let [g, _] = d(!1), [ee, y] = d(null), [b, ie] = d(""), [ce, le] = d(null), [ue, de] = d(!1), [fe, pe] = d(""), [me, _e] = d(!1), [ve, be] = d(null), [xe, Se] = d(""), [T, E] = d(null), [Ce, D] = d(!1), [we, Te] = d([]), [Ee, De] = d(!1), [Oe, ke] = d(""), [Ae, je] = d(null), [Me, Ne] = d(!1), [Pe, Fe] = d([]), [Ie, O] = d(!1), [k, Le] = d("COUNTERSIGN"), [Re, ze] = d("REJECT_INSTANCE"), [A, j] = d(!1), [M, Be] = d("MEMBER"), [Ve, He] = d(""), N = b.trim(), Ue = fe.trim(), We = xe.trim(), P = l(() => s.find((e) => Ze(e, r) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [r, s]), F = l(() => P && i ? i.workflowSnapshot.nodes.find((e) => e.id === P.nodeId) ?? null : null, [P, i]), I = l(() => F && i ? Qe(i.workflowSnapshot, F) : [], [F, i]), L = F?.type === "userTask" && F.data.returnBehavior.allowReturn, R = F?.type === "userTask" && F.data.returnBehavior.requireComment === !0, Ge = F?.type === "userTask" && F.data.allowAddSigner, z = l(() => e.filter((e) => e.status === "PENDING"), [e]), B = I.find((e) => e.id === ve) ?? I[0] ?? null, Ke = l(() => s.map((e) => ({
695
695
  ...e,
696
696
  assigneeLabel: Xe(e, a),
697
697
  key: e.id,
698
698
  nodeLabel: `${K(e.nodeId, i?.workflowSnapshot ?? null)}${e.isAdhoc ? e.adhocType === "COUNTERSIGN" ? "(臨時會簽)" : "(臨時加簽)" : ""}`,
699
- statusLabel: qe(e.status)
699
+ statusLabel: Je(e.status)
700
700
  })), [
701
701
  i,
702
702
  a,
703
703
  s
704
- ]), We = l(() => [
704
+ ]), qe = l(() => [
705
705
  {
706
706
  dataIndex: "nodeLabel",
707
707
  key: "nodeLabel",
@@ -734,13 +734,13 @@ var Pt = {
734
734
  title: "建立時間",
735
735
  width: 220
736
736
  }
737
- ], []), Ge = l(() => B.map((e) => ({
737
+ ], []), H = l(() => z.map((e) => ({
738
738
  ...e,
739
739
  createdByLabel: q(e.createdByMemberId, a),
740
740
  key: e.id,
741
741
  targetLabel: zt(e, a),
742
742
  typeLabel: Pt[e.type]
743
- })), [a, B]), W = l(() => [
743
+ })), [a, z]), U = l(() => [
744
744
  {
745
745
  dataIndex: "typeLabel",
746
746
  key: "typeLabel",
@@ -780,8 +780,8 @@ var Pt = {
780
780
  {
781
781
  key: "actions",
782
782
  render: (e) => e.createdByMemberId === r ? /* @__PURE__ */ C(p, {
783
- disabled: j,
784
- onClick: () => void lt(e.id),
783
+ disabled: A,
784
+ onClick: () => void ut(e.id),
785
785
  size: "minor",
786
786
  variant: "destructive-secondary",
787
787
  children: "撤回"
@@ -789,9 +789,9 @@ var Pt = {
789
789
  title: "操作",
790
790
  width: 100
791
791
  }
792
- ], [j, r]);
793
- async function G({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: i = null }) {
794
- if (!(!r || !F)) {
792
+ ], [A, r]);
793
+ async function W({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: i = null }) {
794
+ if (!(!r || !P)) {
795
795
  _(!0), y(null);
796
796
  try {
797
797
  await se({
@@ -799,94 +799,94 @@ var Pt = {
799
799
  comment: t,
800
800
  decidedByMemberId: r,
801
801
  returnToNodeId: n,
802
- taskId: F.id,
802
+ taskId: P.id,
803
803
  transferToMemberId: i
804
804
  }), de(!1), _e(!1), De(!1), ie(""), pe(""), Se(""), E(null), be(null), le(null), await o();
805
805
  } catch (e) {
806
- y(U(e));
806
+ y(V(e));
807
807
  } finally {
808
808
  _(!1);
809
809
  }
810
810
  }
811
811
  }
812
- function Ke() {
812
+ function Ye() {
813
813
  ie(""), le(null), de(!0);
814
814
  }
815
- function Je() {
815
+ function G() {
816
816
  g || (de(!1), ie(""), le(null));
817
817
  }
818
- function Ye() {
819
- pe(""), be(L[0]?.id ?? null), _e(!0);
820
- }
821
818
  function Y() {
822
- g || (_e(!1), pe(""), be(null));
819
+ pe(""), be(I[0]?.id ?? null), _e(!0);
823
820
  }
824
821
  function tt() {
825
- Se(""), E(null), De(!0), Z("");
822
+ g || (_e(!1), pe(""), be(null));
826
823
  }
827
824
  function X() {
825
+ Se(""), E(null), De(!0), nt("");
826
+ }
827
+ function Z() {
828
828
  g || (De(!1), Se(""), E(null));
829
829
  }
830
- async function Z(e) {
830
+ async function nt(e) {
831
831
  D(!0);
832
832
  try {
833
833
  Te((await ye(e)).filter((e) => e.memberId !== r).map($e));
834
834
  } catch (e) {
835
- y(U(e));
835
+ y(V(e));
836
836
  } finally {
837
837
  D(!1);
838
838
  }
839
839
  }
840
- async function nt() {
841
- if (!P) {
840
+ async function rt() {
841
+ if (!N) {
842
842
  le("請輸入拒絕原因");
843
843
  return;
844
844
  }
845
- await G({
845
+ await W({
846
846
  action: "REJECTED",
847
- comment: P
847
+ comment: N
848
848
  });
849
849
  }
850
- async function rt() {
850
+ async function it() {
851
851
  if (!T) {
852
852
  y("請選擇轉派對象");
853
853
  return;
854
854
  }
855
- await G({
855
+ await W({
856
856
  action: "TRANSFERRED",
857
- comment: Ue || null,
857
+ comment: We || null,
858
858
  transferToMemberId: T.id
859
859
  });
860
860
  }
861
- async function it() {
862
- await G({
861
+ async function at() {
862
+ await W({
863
863
  action: "RETURNED",
864
- comment: He || null,
865
- returnToNodeId: V?.id ?? null
864
+ comment: Ue || null,
865
+ returnToNodeId: B?.id ?? null
866
866
  });
867
867
  }
868
- function at() {
869
- ke(""), Ae(null), Re("REJECT_INSTANCE"), ze("MEMBER"), Ve("");
868
+ function ot() {
869
+ ke(""), je(null), ze("REJECT_INSTANCE"), Be("MEMBER"), He("");
870
870
  }
871
- function ot(e) {
872
- Ie(e), at(), k(!0), st("");
871
+ function Q(e) {
872
+ Le(e), ot(), O(!0), ct("");
873
873
  }
874
- function Q() {
875
- j || (k(!1), at());
874
+ function st() {
875
+ A || (O(!1), ot());
876
876
  }
877
- async function st(e) {
878
- Me(!0);
877
+ async function ct(e) {
878
+ Ne(!0);
879
879
  try {
880
- Pe((await ye(e)).map($e));
880
+ Fe((await ye(e)).map($e));
881
881
  } catch (e) {
882
- y(U(e));
882
+ y(V(e));
883
883
  } finally {
884
- Me(!1);
884
+ Ne(!1);
885
885
  }
886
886
  }
887
- async function ct() {
888
- if (!F) return;
889
- let e = (A === "STAGE_NOTIFY" || A === "COMPLETION_NOTIFY") && N === "WEBHOOK", t = Be.trim(), n = O;
887
+ async function lt() {
888
+ if (!P) return;
889
+ let e = (k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY") && M === "WEBHOOK", t = Ve.trim(), n = Ae;
890
890
  if (e && !t) {
891
891
  y("請輸入 Webhook URL");
892
892
  return;
@@ -902,62 +902,62 @@ var Pt = {
902
902
  kind: "MEMBER",
903
903
  memberIds: [n.id]
904
904
  }, i = Oe.trim() || null;
905
- M(!0), y(null);
905
+ j(!0), y(null);
906
906
  try {
907
- A === "COUNTERSIGN" ? await he({
907
+ k === "COUNTERSIGN" ? await he({
908
908
  comment: i,
909
909
  target: r,
910
- taskId: F.id
911
- }) : A === "PRE_APPROVAL" ? await ge({
910
+ taskId: P.id
911
+ }) : k === "PRE_APPROVAL" ? await ge({
912
912
  comment: i,
913
- onReject: Le,
913
+ onReject: Re,
914
914
  target: r,
915
- taskId: F.id
916
- }) : A === "STAGE_NOTIFY" ? await oe({
915
+ taskId: P.id
916
+ }) : k === "STAGE_NOTIFY" ? await oe({
917
917
  target: r,
918
- taskId: F.id
918
+ taskId: P.id
919
919
  }) : await ae({
920
920
  target: r,
921
- taskId: F.id
922
- }), k(!1), at(), await o();
921
+ taskId: P.id
922
+ }), O(!1), ot(), await o();
923
923
  } catch (e) {
924
- y(U(e));
924
+ y(V(e));
925
925
  } finally {
926
- M(!1);
926
+ j(!1);
927
927
  }
928
928
  }
929
- async function lt(e) {
930
- M(!0), y(null);
929
+ async function ut(e) {
930
+ j(!0), y(null);
931
931
  try {
932
932
  await re(e), await o();
933
933
  } catch (e) {
934
- y(U(e));
934
+ y(V(e));
935
935
  } finally {
936
- M(!1);
936
+ j(!1);
937
937
  }
938
938
  }
939
939
  c(u, () => ({
940
- canAddSignerCurrentTask: z,
941
- canReturnCurrentTask: R,
940
+ canAddSignerCurrentTask: Ge,
941
+ canReturnCurrentTask: L,
942
942
  deciding: g,
943
943
  handleApprove: () => {
944
- G({
944
+ W({
945
945
  action: "APPROVED",
946
946
  comment: null
947
947
  });
948
948
  },
949
- hasCurrentTask: F !== null,
950
- openAdhocModal: ot,
951
- openRejectModal: Ke,
952
- openReturnModal: Ye,
953
- openTransferModal: tt
949
+ hasCurrentTask: P !== null,
950
+ openAdhocModal: Q,
951
+ openRejectModal: Ye,
952
+ openReturnModal: Y,
953
+ openTransferModal: X
954
954
  }), [
955
- z,
956
- R,
957
- F,
955
+ Ge,
956
+ L,
957
+ P,
958
958
  g
959
959
  ]);
960
- let $ = A === "STAGE_NOTIFY" || A === "COMPLETION_NOTIFY", ut = $ && N === "WEBHOOK" ? !Be.trim() : !O, dt = It.find((e) => e.id === Le) ?? It[0], ft = Lt.find((e) => e.id === N) ?? Lt[0];
960
+ let $ = k === "STAGE_NOTIFY" || k === "COMPLETION_NOTIFY", dt = $ && M === "WEBHOOK" ? !Ve.trim() : !Ae, ft = It.find((e) => e.id === Re) ?? It[0], pt = Lt.find((e) => e.id === M) ?? Lt[0];
961
961
  return /* @__PURE__ */ w(S, { children: [
962
962
  /* @__PURE__ */ C(x, {
963
963
  component: "h2",
@@ -972,12 +972,12 @@ var Pt = {
972
972
  /* @__PURE__ */ C("div", {
973
973
  style: jt,
974
974
  children: /* @__PURE__ */ C(te, {
975
- columns: We,
976
- dataSource: H,
975
+ columns: qe,
976
+ dataSource: Ke,
977
977
  fullWidth: !0
978
978
  })
979
979
  }),
980
- B.length > 0 ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(x, {
980
+ z.length > 0 ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(x, {
981
981
  component: "h3",
982
982
  style: Mt,
983
983
  variant: "h3",
@@ -985,24 +985,24 @@ var Pt = {
985
985
  }), /* @__PURE__ */ C("div", {
986
986
  style: jt,
987
987
  children: /* @__PURE__ */ C(te, {
988
- columns: W,
989
- dataSource: Ge,
988
+ columns: U,
989
+ dataSource: H,
990
990
  fullWidth: !0
991
991
  })
992
992
  })] }) : null,
993
993
  /* @__PURE__ */ C(h, {
994
994
  cancelText: "取消",
995
995
  confirmButtonProps: {
996
- disabled: !P,
996
+ disabled: !N,
997
997
  variant: "destructive-primary"
998
998
  },
999
999
  confirmText: "送出拒絕",
1000
1000
  loading: g,
1001
1001
  modalStatusType: "error",
1002
1002
  modalType: "standard",
1003
- onCancel: Je,
1004
- onClose: Je,
1005
- onConfirm: () => void nt(),
1003
+ onCancel: G,
1004
+ onClose: G,
1005
+ onConfirm: () => void rt(),
1006
1006
  open: ue,
1007
1007
  showModalFooter: !0,
1008
1008
  showModalHeader: !0,
@@ -1041,9 +1041,9 @@ var Pt = {
1041
1041
  confirmText: "送出轉派",
1042
1042
  loading: g,
1043
1043
  modalType: "standard",
1044
- onCancel: X,
1045
- onClose: X,
1046
- onConfirm: () => void rt(),
1044
+ onCancel: Z,
1045
+ onClose: Z,
1046
+ onConfirm: () => void it(),
1047
1047
  open: Ee,
1048
1048
  showModalFooter: !0,
1049
1049
  showModalHeader: !0,
@@ -1070,10 +1070,10 @@ var Pt = {
1070
1070
  loadingText: "搜尋成員中...",
1071
1071
  mode: "single",
1072
1072
  onChange: (e) => E(J(e)),
1073
- onSearch: Z,
1073
+ onSearch: nt,
1074
1074
  onSearchTextChange: (e) => E(et(e, we)),
1075
1075
  onVisibilityChange: (e) => {
1076
- e && Z("");
1076
+ e && nt("");
1077
1077
  },
1078
1078
  options: [...we],
1079
1079
  placeholder: "搜尋姓名或信箱",
@@ -1097,13 +1097,13 @@ var Pt = {
1097
1097
  }),
1098
1098
  /* @__PURE__ */ C(h, {
1099
1099
  cancelText: "取消",
1100
- confirmButtonProps: { disabled: !V },
1100
+ confirmButtonProps: { disabled: !B || R && !Ue },
1101
1101
  confirmText: "送出退回",
1102
1102
  loading: g,
1103
1103
  modalType: "standard",
1104
- onCancel: Y,
1105
- onClose: Y,
1106
- onConfirm: () => void it(),
1104
+ onCancel: tt,
1105
+ onClose: tt,
1106
+ onConfirm: () => void at(),
1107
1107
  open: me,
1108
1108
  showModalFooter: !0,
1109
1109
  showModalHeader: !0,
@@ -1120,16 +1120,18 @@ var Pt = {
1120
1120
  clearable: !1,
1121
1121
  fullWidth: !0,
1122
1122
  onChange: (e) => be(e?.id ?? null),
1123
- options: [...L],
1123
+ options: [...I],
1124
1124
  placeholder: "選擇退回節點",
1125
- value: V
1125
+ value: B
1126
1126
  })
1127
1127
  }), /* @__PURE__ */ C(n, {
1128
+ hintText: R ? "此關卡設定退回時必須填寫意見。" : void 0,
1128
1129
  label: "退回說明",
1129
1130
  name: "returnComment",
1131
+ required: R,
1130
1132
  children: /* @__PURE__ */ C(ne, {
1131
1133
  onChange: (e) => pe(e.target.value),
1132
- placeholder: "可補充需要修改的內容",
1134
+ placeholder: R ? "請說明退回原因" : "可補充需要修改的內容",
1133
1135
  ref: Nt,
1134
1136
  resize: "vertical",
1135
1137
  rows: 4,
@@ -1141,19 +1143,19 @@ var Pt = {
1141
1143
  }),
1142
1144
  /* @__PURE__ */ C(h, {
1143
1145
  cancelText: "取消",
1144
- confirmButtonProps: { disabled: ut },
1146
+ confirmButtonProps: { disabled: dt },
1145
1147
  confirmText: "送出",
1146
- loading: j,
1148
+ loading: A,
1147
1149
  modalType: "standard",
1148
- onCancel: Q,
1149
- onClose: Q,
1150
- onConfirm: () => void ct(),
1151
- open: Fe,
1150
+ onCancel: st,
1151
+ onClose: st,
1152
+ onConfirm: () => void lt(),
1153
+ open: Ie,
1152
1154
  showModalFooter: !0,
1153
1155
  showModalHeader: !0,
1154
1156
  size: "regular",
1155
- supportingText: Ft[A],
1156
- title: Pt[A],
1157
+ supportingText: Ft[k],
1158
+ title: Pt[k],
1157
1159
  children: /* @__PURE__ */ w("div", {
1158
1160
  style: At,
1159
1161
  children: [
@@ -1164,7 +1166,7 @@ var Pt = {
1164
1166
  children: /* @__PURE__ */ C(v, {
1165
1167
  clearable: !1,
1166
1168
  fullWidth: !0,
1167
- onChange: (e) => Ie(e?.id === "COMPLETION_NOTIFY" ? "COMPLETION_NOTIFY" : "STAGE_NOTIFY"),
1169
+ onChange: (e) => Le(e?.id === "COMPLETION_NOTIFY" ? "COMPLETION_NOTIFY" : "STAGE_NOTIFY"),
1168
1170
  options: [{
1169
1171
  id: "STAGE_NOTIFY",
1170
1172
  name: Pt.STAGE_NOTIFY
@@ -1173,8 +1175,8 @@ var Pt = {
1173
1175
  name: Pt.COMPLETION_NOTIFY
1174
1176
  }],
1175
1177
  value: {
1176
- id: A,
1177
- name: Pt[A]
1178
+ id: k,
1179
+ name: Pt[k]
1178
1180
  }
1179
1181
  })
1180
1182
  }) : null,
@@ -1185,20 +1187,20 @@ var Pt = {
1185
1187
  children: /* @__PURE__ */ C(v, {
1186
1188
  clearable: !1,
1187
1189
  fullWidth: !0,
1188
- onChange: (e) => ze(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
1190
+ onChange: (e) => Be(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
1189
1191
  options: [...Lt],
1190
- value: ft
1192
+ value: pt
1191
1193
  })
1192
1194
  }) : null,
1193
- $ && N === "WEBHOOK" ? /* @__PURE__ */ C(n, {
1195
+ $ && M === "WEBHOOK" ? /* @__PURE__ */ C(n, {
1194
1196
  label: "Webhook URL",
1195
1197
  name: "adhocWebhookUrl",
1196
1198
  required: !0,
1197
1199
  children: /* @__PURE__ */ C(m, {
1198
1200
  fullWidth: !0,
1199
- onChange: (e) => Ve(e.target.value),
1201
+ onChange: (e) => He(e.target.value),
1200
1202
  placeholder: "https://example.com/webhook",
1201
- value: Be
1203
+ value: Ve
1202
1204
  })
1203
1205
  }) : /* @__PURE__ */ C(n, {
1204
1206
  label: $ ? "通知對象" : "簽核對象",
@@ -1214,31 +1216,31 @@ var Pt = {
1214
1216
  name: "adhoc-member-search",
1215
1217
  spellCheck: !1
1216
1218
  },
1217
- loading: je,
1219
+ loading: Me,
1218
1220
  loadingText: "搜尋成員中...",
1219
1221
  mode: "single",
1220
- onChange: (e) => Ae(J(e)),
1221
- onSearch: st,
1222
- onSearchTextChange: (e) => Ae(et(e, Ne)),
1222
+ onChange: (e) => je(J(e)),
1223
+ onSearch: ct,
1224
+ onSearchTextChange: (e) => je(et(e, Pe)),
1223
1225
  onVisibilityChange: (e) => {
1224
- e && st("");
1226
+ e && ct("");
1225
1227
  },
1226
- options: [...Ne],
1228
+ options: [...Pe],
1227
1229
  placeholder: "搜尋姓名或信箱",
1228
1230
  searchDebounceTime: 300,
1229
- value: O
1231
+ value: Ae
1230
1232
  })
1231
1233
  }),
1232
- A === "PRE_APPROVAL" ? /* @__PURE__ */ C(n, {
1234
+ k === "PRE_APPROVAL" ? /* @__PURE__ */ C(n, {
1233
1235
  label: "拒簽處理方式",
1234
1236
  name: "adhocOnReject",
1235
1237
  required: !0,
1236
1238
  children: /* @__PURE__ */ C(v, {
1237
1239
  clearable: !1,
1238
1240
  fullWidth: !0,
1239
- onChange: (e) => Re(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
1241
+ onChange: (e) => ze(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
1240
1242
  options: [...It],
1241
- value: dt
1243
+ value: ft
1242
1244
  })
1243
1245
  }) : null,
1244
1246
  $ ? null : /* @__PURE__ */ C(n, {
@@ -1278,7 +1280,7 @@ var Bt = {
1278
1280
  function Vt({ signatureVerification: e, signatures: n }) {
1279
1281
  let r = l(() => n.map((e) => ({
1280
1282
  algorithm: e.algorithm,
1281
- hashLabel: G(e.signedPayloadHash),
1283
+ hashLabel: U(e.signedPayloadHash),
1282
1284
  key: e.id,
1283
1285
  keyVersion: e.keyVersion,
1284
1286
  signedAtLabel: t(e.signedAt),
@@ -1347,25 +1349,25 @@ var Ht = {
1347
1349
  textUnderlineOffset: 3
1348
1350
  }, Wt = { color: "var(--mzn-color-text-error)" };
1349
1351
  function Gt(...e) {
1350
- return e.filter((e) => H(e ?? null)).join(" ");
1352
+ return e.filter((e) => B(e ?? null)).join(" ");
1351
1353
  }
1352
1354
  var Kt = a(function({ className: e, descriptionParts: t, error: n, forcePending: r = !1, index: a = 0, orientation: o, status: s = "pending", title: c, type: l = "number", ...u }, d) {
1353
1355
  let f = r ? "pending" : s;
1354
1356
  return /* @__PURE__ */ w("div", {
1355
1357
  ...u,
1356
- className: Gt(j.host, l === "dot" ? j.dot : null, n && f !== "processing" ? j.error : null, o === "horizontal" ? j.horizontal : null, l === "number" ? j.number : null, f === "pending" ? j.pending : null, f === "processing" ? j.processing : null, n && f === "processing" ? j.processingError : null, !n && f === "succeeded" ? j.succeeded : null, o === "vertical" ? j.vertical : null, e),
1358
+ className: Gt(A.host, l === "dot" ? A.dot : null, n && f !== "processing" ? A.error : null, o === "horizontal" ? A.horizontal : null, l === "number" ? A.number : null, f === "pending" ? A.pending : null, f === "processing" ? A.processing : null, n && f === "processing" ? A.processingError : null, !n && f === "succeeded" ? A.succeeded : null, o === "vertical" ? A.vertical : null, e),
1357
1359
  ref: d,
1358
- children: [l === "dot" ? /* @__PURE__ */ C("span", { className: Gt(j.statusIndicator, j.statusIndicatorDot) }) : /* @__PURE__ */ C("span", {
1359
- className: j.statusIndicator,
1360
+ children: [l === "dot" ? /* @__PURE__ */ C("span", { className: Gt(A.statusIndicator, A.statusIndicatorDot) }) : /* @__PURE__ */ C("span", {
1361
+ className: A.statusIndicator,
1360
1362
  children: a + 1
1361
1363
  }), /* @__PURE__ */ w("div", {
1362
- className: j.textContainer,
1364
+ className: A.textContainer,
1363
1365
  children: [/* @__PURE__ */ w(x, {
1364
- className: j.title,
1366
+ className: A.title,
1365
1367
  variant: "label-primary-highlight",
1366
- children: [c, /* @__PURE__ */ C("span", { className: j.titleConnectLine })]
1368
+ children: [c, /* @__PURE__ */ C("span", { className: A.titleConnectLine })]
1367
1369
  }), t.length > 0 ? /* @__PURE__ */ C(x, {
1368
- className: j.description,
1370
+ className: A.description,
1369
1371
  variant: "caption",
1370
1372
  children: t.map((e, t) => /* @__PURE__ */ w(i, { children: [t > 0 ? " · " : null, qt(e)] }, `${e.type}-${t}`))
1371
1373
  }) : null]
@@ -1477,20 +1479,20 @@ var Yt = 184, Xt = 96, Zt = {
1477
1479
  gap: 16
1478
1480
  }, sn = { workflowRuntime: _n };
1479
1481
  function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHistory: o = !0, showSignatures: c = !0, showTasks: f = !0 }) {
1480
- let { member: m } = e(), v = m?.memberId ?? null, [y, te] = d([]), [b, re] = d(null), [ae, oe] = d([]), [se, ue] = d([]), [he, ge] = d([]), [_e, ye] = d(null), [T, E] = d([]), [D, we] = d([]), [O, Ae] = d([]), [Fe, k] = d(null), [Ie, Le] = d(!0), [Re, j] = d(!1), [M, N] = d(!1), [ze, Be] = d(""), [Ve, P] = d(!1), [He, Ue] = d({}), [I, L] = d({}), [R, z] = d(null), [B, V] = d(null), [H, We] = d([]), Ge = ze.trim(), W = u(null);
1482
+ let { member: m } = e(), v = m?.memberId ?? null, [y, te] = d([]), [b, re] = d(null), [ae, oe] = d([]), [se, ue] = d([]), [he, ge] = d([]), [_e, ye] = d(null), [T, E] = d([]), [D, we] = d([]), [Ae, je] = d([]), [Ie, O] = d(null), [Le, Re] = d(!0), [ze, A] = d(!1), [j, M] = d(!1), [Be, Ve] = d(""), [He, N] = d(!1), [Ue, We] = d({}), [F, I] = d({}), [L, R] = d(null), [Ge, z] = d(null), [B, Ke] = d([]), qe = Be.trim(), H = u(null);
1481
1483
  s(() => {
1482
1484
  X();
1483
1485
  }, [v, r]), s(() => {
1484
- L(b?.formData ?? {});
1486
+ I(b?.formData ?? {});
1485
1487
  }, [b]);
1486
- let G = l(() => T.find((e) => Ze(e, v) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [v, T]), qe = l(() => G && b ? b.workflowSnapshot.nodes.find((e) => e.id === G.nodeId) ?? null : null, [G, b]), Je = qe?.type === "userTask" && qe.data.returnBehavior.allowReturn, Ye = qe?.type === "userTask" && qe.data.allowAddSigner, K = !!(b && b.initiatorMemberId === v && (b.state === "RUNNING" || b.state === "RETURNED")), q = !!(b && b.initiatorMemberId === v && b.state === "RETURNED"), Xe = l(() => new Map(O.map((e) => [e.memberId, e])), [O]), Qe = l(() => St(ae), [ae]), $e = l(() => new Map(he.map((e) => [e.id, e])), [he]), J = l(() => b ? pn(b.workflowSnapshot) : null, [b]), et = l(() => b && J ? fn(J, T, D, b.state) : [], [
1488
+ let U = l(() => T.find((e) => Ze(e, v) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [v, T]), Je = l(() => U && b ? b.workflowSnapshot.nodes.find((e) => e.id === U.nodeId) ?? null : null, [U, b]), Ye = Je?.type === "userTask" && Je.data.returnBehavior.allowReturn, G = Je?.type === "userTask" && Je.data.allowAddSigner, K = !!(b && b.initiatorMemberId === v && (b.state === "RUNNING" || b.state === "RETURNED")), q = !!(b && b.initiatorMemberId === v && b.state === "RETURNED"), Xe = l(() => new Map(Ae.map((e) => [e.memberId, e])), [Ae]), Qe = l(() => St(ae), [ae]), $e = l(() => new Map(he.map((e) => [e.id, e])), [he]), J = l(() => b ? pn(b.workflowSnapshot) : null, [b]), et = l(() => b && J ? fn(J, T, D, b.state) : [], [
1487
1489
  b,
1488
1490
  J,
1489
1491
  T,
1490
1492
  D
1491
1493
  ]), Y = l(() => J ? mn(J) : [], [J]), tt = l(() => b ? un(b.workflowSnapshot) : [], [b]);
1492
1494
  async function X() {
1493
- Le(!0), k(null);
1495
+ Re(!0), O(null);
1494
1496
  try {
1495
1497
  let e = await de(r);
1496
1498
  te(e.activityLogs), re(e.instance), E(e.tasks), we(e.workflowTokens);
@@ -1503,11 +1505,11 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1503
1505
  le(e.instance.id),
1504
1506
  me(e.instance.id)
1505
1507
  ]);
1506
- oe(n), Ae(i), ue(a), ge(o.signatures), ye(o.verification), We(t);
1508
+ oe(n), je(i), ue(a), ge(o.signatures), ye(o.verification), Ke(t);
1507
1509
  } catch (e) {
1508
- k(U(e));
1510
+ O(V(e));
1509
1511
  } finally {
1510
- Le(!1);
1512
+ Re(!1);
1511
1513
  }
1512
1514
  }
1513
1515
  async function Z(e, t) {
@@ -1525,62 +1527,62 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1525
1527
  async function rt(e) {
1526
1528
  if (!v) return;
1527
1529
  let t = await pe({ id: e.id });
1528
- z(e), V(t);
1530
+ R(e), z(t);
1529
1531
  }
1530
1532
  async function it() {
1531
1533
  if (!(!v || !b || !K)) {
1532
- if (j(!0), k(null), Ue({}), b.formDefinitionSnapshot.schema && b.formDefinitionSnapshot.uiSchema) {
1533
- let e = Me({
1534
+ if (A(!0), O(null), We({}), b.formDefinitionSnapshot.schema && b.formDefinitionSnapshot.uiSchema) {
1535
+ let e = Ne({
1534
1536
  schema: b.formDefinitionSnapshot.schema,
1535
1537
  uiSchema: b.formDefinitionSnapshot.uiSchema,
1536
- values: I
1538
+ values: F
1537
1539
  });
1538
1540
  if (!e.valid) {
1539
- Ue(e.errors), k("請先補齊必填欄位。"), e.firstInvalidFieldKey && je(e.firstInvalidFieldKey), j(!1);
1541
+ We(e.errors), O("請先補齊必填欄位。"), e.firstInvalidFieldKey && Me(e.firstInvalidFieldKey), A(!1);
1540
1542
  return;
1541
1543
  }
1542
1544
  }
1543
1545
  try {
1544
1546
  await ie({
1545
1547
  cancelledByMemberId: v,
1546
- comment: Ge || null,
1548
+ comment: qe || null,
1547
1549
  instanceId: b.id
1548
- }), Be(""), P(!1), await X();
1550
+ }), Ve(""), N(!1), await X();
1549
1551
  } catch (e) {
1550
- k(U(e));
1552
+ O(V(e));
1551
1553
  } finally {
1552
- j(!1);
1554
+ A(!1);
1553
1555
  }
1554
1556
  }
1555
1557
  }
1556
1558
  async function at() {
1557
1559
  if (!(!v || !b || !q)) {
1558
- j(!0), k(null);
1560
+ A(!0), O(null);
1559
1561
  try {
1560
1562
  await ve({
1561
- formData: I,
1563
+ formData: F,
1562
1564
  initiatorMemberId: v,
1563
1565
  instanceId: b.id,
1564
1566
  title: b.title
1565
1567
  }), await X();
1566
1568
  } catch (e) {
1567
- k(U(e));
1569
+ O(V(e));
1568
1570
  } finally {
1569
- j(!1);
1571
+ A(!1);
1570
1572
  }
1571
1573
  }
1572
1574
  }
1573
- let ot = W.current?.deciding ?? !1, Q = Re || ot;
1575
+ let ot = H.current?.deciding ?? !1, Q = ze || ot;
1574
1576
  return /* @__PURE__ */ w(S, { children: [
1575
1577
  /* @__PURE__ */ C(g, { children: /* @__PURE__ */ w(xe, {
1576
- description: b ? `${Ke(b.state)} · ${t(b.startedAt)}` : "載入案件內容。",
1578
+ description: b ? `${W(b.state)} · ${t(b.startedAt)}` : "載入案件內容。",
1577
1579
  title: b?.title ?? "簽核案件",
1578
1580
  children: [
1579
1581
  b ? /* @__PURE__ */ C(p, {
1580
1582
  "aria-label": "查看流程圖",
1581
1583
  icon: Oe,
1582
1584
  iconType: "icon-only",
1583
- onClick: () => N(!0),
1585
+ onClick: () => M(!0),
1584
1586
  title: "查看流程圖",
1585
1587
  variant: "base-secondary",
1586
1588
  children: "流程圖"
@@ -1589,23 +1591,23 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1589
1591
  disabled: Q,
1590
1592
  icon: Ce,
1591
1593
  iconType: "leading",
1592
- onClick: () => P(!0),
1594
+ onClick: () => N(!0),
1593
1595
  variant: "destructive-secondary",
1594
1596
  children: "取消案件"
1595
1597
  }) : null,
1596
- G ? /* @__PURE__ */ w(S, { children: [
1597
- Ye ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(p, {
1598
+ U ? /* @__PURE__ */ w(S, { children: [
1599
+ G ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(p, {
1598
1600
  disabled: Q,
1599
1601
  icon: Ee,
1600
1602
  iconType: "leading",
1601
- onClick: () => W.current?.openAdhocModal("COUNTERSIGN"),
1603
+ onClick: () => H.current?.openAdhocModal("COUNTERSIGN"),
1602
1604
  variant: "base-secondary",
1603
1605
  children: "會簽"
1604
1606
  }, "adhoc-countersign"), /* @__PURE__ */ C(p, {
1605
1607
  disabled: Q,
1606
1608
  icon: Ee,
1607
1609
  iconType: "leading",
1608
- onClick: () => W.current?.openAdhocModal("PRE_APPROVAL"),
1610
+ onClick: () => H.current?.openAdhocModal("PRE_APPROVAL"),
1609
1611
  variant: "base-secondary",
1610
1612
  children: "加簽"
1611
1613
  }, "adhoc-pre-approval")] }) : null,
@@ -1613,15 +1615,15 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1613
1615
  disabled: Q,
1614
1616
  icon: Te,
1615
1617
  iconType: "leading",
1616
- onClick: () => W.current?.openAdhocModal("STAGE_NOTIFY"),
1618
+ onClick: () => H.current?.openAdhocModal("STAGE_NOTIFY"),
1617
1619
  variant: "base-secondary",
1618
1620
  children: "通知設定"
1619
1621
  }, "adhoc-notify"),
1620
- Je ? /* @__PURE__ */ C(p, {
1622
+ Ye ? /* @__PURE__ */ C(p, {
1621
1623
  disabled: Q,
1622
1624
  icon: De,
1623
1625
  iconType: "leading",
1624
- onClick: () => W.current?.openReturnModal(),
1626
+ onClick: () => H.current?.openReturnModal(),
1625
1627
  variant: "base-secondary",
1626
1628
  children: "退回"
1627
1629
  }, "task-return") : null,
@@ -1629,7 +1631,7 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1629
1631
  disabled: Q,
1630
1632
  icon: ke,
1631
1633
  iconType: "leading",
1632
- onClick: () => W.current?.openTransferModal(),
1634
+ onClick: () => H.current?.openTransferModal(),
1633
1635
  variant: "base-secondary",
1634
1636
  children: "轉派"
1635
1637
  }, "task-transfer"),
@@ -1637,7 +1639,7 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1637
1639
  disabled: Q,
1638
1640
  icon: Ce,
1639
1641
  iconType: "leading",
1640
- onClick: () => W.current?.openRejectModal(),
1642
+ onClick: () => H.current?.openRejectModal(),
1641
1643
  variant: "destructive-secondary",
1642
1644
  children: "拒絕"
1643
1645
  }, "task-reject"),
@@ -1645,7 +1647,7 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1645
1647
  disabled: Q,
1646
1648
  icon: Se,
1647
1649
  iconType: "leading",
1648
- onClick: () => W.current?.handleApprove(),
1650
+ onClick: () => H.current?.handleApprove(),
1649
1651
  variant: "base-primary",
1650
1652
  children: "同意"
1651
1653
  }, "task-approve")
@@ -1655,17 +1657,17 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1655
1657
  /* @__PURE__ */ w(ee, { children: [
1656
1658
  a ? /* @__PURE__ */ C(_, { children: /* @__PURE__ */ C(Tt, {
1657
1659
  canResubmitInstance: q,
1658
- deciding: Re,
1659
- error: Fe,
1660
+ deciding: ze,
1661
+ error: Ie,
1660
1662
  instance: b,
1661
- loading: Ie,
1663
+ loading: Le,
1662
1664
  onResubmitFormChange: (e) => {
1663
- L(e), Ue({});
1665
+ I(e), We({});
1664
1666
  },
1665
1667
  onResubmitInstance: () => void at(),
1666
1668
  onUploadAttachment: Z,
1667
- resubmitFormData: I,
1668
- resubmitFormErrors: He
1669
+ resubmitFormData: F,
1670
+ resubmitFormErrors: Ue
1669
1671
  }) }) : null,
1670
1672
  i ? /* @__PURE__ */ C(_, { children: /* @__PURE__ */ C(Dt, {
1671
1673
  attachments: se,
@@ -1677,12 +1679,12 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1677
1679
  }
1678
1680
  }) }) : null,
1679
1681
  f ? /* @__PURE__ */ C(_, { children: /* @__PURE__ */ C(Rt, {
1680
- adhocDirectives: H,
1682
+ adhocDirectives: B,
1681
1683
  currentMemberId: v,
1682
1684
  instance: b,
1683
1685
  memberProfilesById: Xe,
1684
1686
  onChanged: X,
1685
- ref: W,
1687
+ ref: H,
1686
1688
  tasks: T
1687
1689
  }) }) : null,
1688
1690
  c ? /* @__PURE__ */ C(_, { children: /* @__PURE__ */ C(Vt, {
@@ -1703,17 +1705,17 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1703
1705
  ] }),
1704
1706
  b ? /* @__PURE__ */ C(h, {
1705
1707
  modalType: "standard",
1706
- onClose: () => N(!1),
1707
- open: M,
1708
+ onClose: () => M(!1),
1709
+ open: j,
1708
1710
  showModalHeader: !0,
1709
1711
  size: "wide",
1710
- supportingText: `${Ke(b.state)} · ${t(b.startedAt)}`,
1712
+ supportingText: `${W(b.state)} · ${t(b.startedAt)}`,
1711
1713
  title: "流程圖",
1712
1714
  children: /* @__PURE__ */ w("div", {
1713
1715
  style: Zt,
1714
1716
  children: [/* @__PURE__ */ C("div", {
1715
1717
  style: Qt,
1716
- children: /* @__PURE__ */ w(A, {
1718
+ children: /* @__PURE__ */ w(k, {
1717
1719
  edges: Y,
1718
1720
  fitView: !0,
1719
1721
  fitViewOptions: { padding: .18 },
@@ -1725,7 +1727,7 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1725
1727
  nodeTypes: sn,
1726
1728
  panOnDrag: !0,
1727
1729
  proOptions: { hideAttribution: !0 },
1728
- children: [/* @__PURE__ */ C(Ne, {}), /* @__PURE__ */ C(Pe, { showInteractive: !1 })]
1730
+ children: [/* @__PURE__ */ C(Pe, {}), /* @__PURE__ */ C(Fe, { showInteractive: !1 })]
1729
1731
  })
1730
1732
  }), tt.length > 0 ? /* @__PURE__ */ C("div", {
1731
1733
  style: rn,
@@ -1739,30 +1741,30 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1739
1741
  /* @__PURE__ */ C(h, {
1740
1742
  modalType: "standard",
1741
1743
  onClose: () => {
1742
- z(null), V(null);
1744
+ R(null), z(null);
1743
1745
  },
1744
- open: !!(R && B),
1746
+ open: !!(L && Ge),
1745
1747
  showModalHeader: !0,
1746
1748
  size: "wide",
1747
- supportingText: R?.filename ?? void 0,
1749
+ supportingText: L?.filename ?? void 0,
1748
1750
  title: "PDF 預覽",
1749
- children: B ? /* @__PURE__ */ C(F, {
1750
- filename: R?.filename ?? "PDF 預覽",
1751
- fileUrl: B,
1752
- onDownload: R ? () => void nt(R) : void 0
1751
+ children: Ge ? /* @__PURE__ */ C(P, {
1752
+ filename: L?.filename ?? "PDF 預覽",
1753
+ fileUrl: Ge,
1754
+ onDownload: L ? () => void nt(L) : void 0
1753
1755
  }) : null
1754
1756
  }),
1755
1757
  /* @__PURE__ */ C(h, {
1756
1758
  cancelText: "保留案件",
1757
1759
  confirmButtonProps: { variant: "destructive-primary" },
1758
1760
  confirmText: "確認取消",
1759
- loading: Re,
1761
+ loading: ze,
1760
1762
  modalStatusType: "error",
1761
1763
  modalType: "standard",
1762
- onCancel: () => P(!1),
1763
- onClose: () => P(!1),
1764
+ onCancel: () => N(!1),
1765
+ onClose: () => N(!1),
1764
1766
  onConfirm: () => void it(),
1765
- open: Ve,
1767
+ open: He,
1766
1768
  showModalFooter: !0,
1767
1769
  showModalHeader: !0,
1768
1770
  supportingText: "取消後會關閉目前待簽任務與候選簽核人。",
@@ -1780,11 +1782,11 @@ function cn({ instanceId: r, showAttachments: i = !0, showForm: a = !0, showHist
1780
1782
  label: "取消原因",
1781
1783
  name: "cancelComment",
1782
1784
  children: /* @__PURE__ */ C(ne, {
1783
- onChange: (e) => Be(e.target.value),
1785
+ onChange: (e) => Ve(e.target.value),
1784
1786
  placeholder: "可填寫取消原因",
1785
1787
  resize: "vertical",
1786
1788
  rows: 3,
1787
- value: ze
1789
+ value: Be
1788
1790
  })
1789
1791
  })]
1790
1792
  })
@@ -1813,14 +1815,14 @@ function fn(e, t, n, r) {
1813
1815
  },
1814
1816
  id: e.id,
1815
1817
  position: e.position,
1816
- sourcePosition: k.Right,
1817
- targetPosition: k.Left,
1818
+ sourcePosition: O.Right,
1819
+ targetPosition: O.Left,
1818
1820
  type: "workflowRuntime"
1819
1821
  };
1820
1822
  });
1821
1823
  }
1822
1824
  function pn(e) {
1823
- let t = new Ie.graphlib.Graph();
1825
+ let t = new Le.graphlib.Graph();
1824
1826
  return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
1825
1827
  nodesep: 56,
1826
1828
  rankdir: "LR",
@@ -1832,7 +1834,7 @@ function pn(e) {
1832
1834
  });
1833
1835
  }), e.edges.forEach((e) => {
1834
1836
  t.setEdge(e.source, e.target);
1835
- }), Ie.layout(t), {
1837
+ }), Le.layout(t), {
1836
1838
  ...e,
1837
1839
  nodes: e.nodes.map((e) => {
1838
1840
  let n = t.node(e.id);
@@ -1921,9 +1923,9 @@ function _n({ data: e }) {
1921
1923
  return /* @__PURE__ */ w("div", {
1922
1924
  style: hn(e.tone),
1923
1925
  children: [
1924
- /* @__PURE__ */ C(Fe, {
1926
+ /* @__PURE__ */ C(Ie, {
1925
1927
  isConnectable: !1,
1926
- position: k.Left,
1928
+ position: O.Left,
1927
1929
  style: nn,
1928
1930
  type: "target"
1929
1931
  }),
@@ -1943,9 +1945,9 @@ function _n({ data: e }) {
1943
1945
  style: tn,
1944
1946
  children: e.secondaryLabel || e.kindLabel
1945
1947
  }),
1946
- /* @__PURE__ */ C(Fe, {
1948
+ /* @__PURE__ */ C(Ie, {
1947
1949
  isConnectable: !1,
1948
- position: k.Right,
1950
+ position: O.Right,
1949
1951
  style: nn,
1950
1952
  type: "source"
1951
1953
  })
@@ -1955,4 +1957,4 @@ function _n({ data: e }) {
1955
1957
  //#endregion
1956
1958
  export { Dt as a, Rt as i, Jt as n, Tt as o, Vt as r, cn as t };
1957
1959
 
1958
- //# sourceMappingURL=detail-fg8MTwuH.js.map
1960
+ //# sourceMappingURL=detail-Cts5_gVp.js.map