@guodun/antdv 1.7.11 → 1.7.13

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 (64) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +370 -294
  2. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +219 -202
  3. package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +18 -18
  4. package/dist/es/components/contract-signing-location/src/template-source.mjs +62 -49
  5. package/dist/es/components/index.mjs +1 -0
  6. package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +37 -42
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +69 -55
  9. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +278 -270
  10. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +344 -343
  11. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1046 -1000
  12. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +120 -74
  13. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +133 -132
  14. package/dist/es/components/pro-contract-template-designer/src/constants.mjs +7 -7
  15. package/dist/es/components/pro-contract-template-designer/src/utils/contract-layout-check.mjs +239 -0
  16. package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +99 -75
  17. package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +67 -76
  18. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -83
  19. package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +23 -15
  20. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  21. package/dist/es/contract-print-css/index.mjs +473 -0
  22. package/dist/es/contract-print.mjs +2 -0
  23. package/dist/es/index.mjs +21 -20
  24. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  25. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  26. package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
  27. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  28. package/dist/lib/components/index.cjs +1 -1
  29. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  30. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
  31. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
  32. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -1
  33. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  34. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  35. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  36. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  37. package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
  38. package/dist/lib/components/pro-contract-template-designer/src/utils/contract-layout-check.cjs +1 -0
  39. package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +52 -30
  40. package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
  41. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +5 -5
  42. package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
  43. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  44. package/dist/lib/contract-print-css/index.cjs +413 -0
  45. package/dist/lib/contract-print.cjs +1 -0
  46. package/dist/lib/index.cjs +1 -1
  47. package/dist/theme/icon.css +1 -1
  48. package/dist/theme/index.css +1 -1
  49. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +9 -0
  50. package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +7 -0
  51. package/dist/types/components/contract-signing-location/src/template-source.d.ts +6 -0
  52. package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
  53. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.d.ts +2 -0
  54. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +5 -1
  55. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +7 -2
  56. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +2 -2
  57. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +36 -0
  58. package/dist/types/components/pro-contract-template-designer/src/utils/contract-layout-check.d.ts +104 -0
  59. package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +4 -1
  60. package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +2 -8
  61. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +6 -1
  62. package/dist/types/contract-print-css/index.d.ts +99 -0
  63. package/dist/types/contract-print.d.ts +2 -0
  64. package/package.json +16 -5
@@ -1,21 +1,22 @@
1
1
  import "../../pro-contract-template-designer/src/utils/contract-print-document.mjs";
2
2
  import { CONTRACT_SIGNING_SEAL_TYPE_OPTIONS as e } from "./constants.mjs";
3
3
  import { clampContractSigningPlacement as t, clampContractSigningZoom as n, normalizeContractSigningCoordinateScale as r, resolveContractSigningSealSizeLimit as i } from "./coordinates.mjs";
4
- import { isContractSigningTemplateFile as a } from "./template-source.mjs";
5
- import { ContractSigningLocationBuildError as o, buildContractSigningLocationOutput as ee, cloneContractSigningLocationValue as s, createContractSigningLocationValue as c, createContractSigningPlacement as te, findContractSigningPage as l, getContractSigningHomePage as ne, isContractSigningPageUsable as re, normalizeContractSigningLocationValue as u, normalizeContractSigningProviderValue as ie, patchContractSigningPlacement as ae, resolveContractSigningDefaultSealTypes as oe, resolveContractSigningPreviewPageSize as se, validateContractSigningLocationValue as ce } from "./location-rules.mjs";
6
- import le from "./ContractSigningLocationCanvas.mjs";
7
- import ue from "./ContractSigningLocationInspector.mjs";
8
- import de from "./ContractSigningLocationNavigator.mjs";
9
- import { ContractSigningPreviewRequests as fe } from "./preview-requests.mjs";
10
- import { computed as d, createBlock as f, createCommentVNode as p, createElementBlock as pe, createElementVNode as m, createTextVNode as me, createVNode as h, defineComponent as he, nextTick as g, normalizeClass as ge, normalizeStyle as _e, onBeforeUnmount as ve, openBlock as _, ref as v, shallowRef as y, toDisplayString as ye, unref as b, watch as x, withCtx as S } from "vue";
11
- import { Button as C, Tooltip as be } from "ant-design-vue";
12
- import { LeftOutlined as xe, ReloadOutlined as Se, RightOutlined as Ce } from "@ant-design/icons-vue";
4
+ import { createContractTemplateLayoutChecker as a, describeContractTemplateLayoutIssue as o, isContractTemplateLayoutAbortError as s } from "../../pro-contract-template-designer/src/utils/contract-layout-check.mjs";
5
+ import { buildContractSigningLayoutPages as c, isContractSigningTemplateFile as l, isContractSigningTemplateSource as ee } from "./template-source.mjs";
6
+ import { ContractSigningLocationBuildError as te, buildContractSigningLocationOutput as ne, cloneContractSigningLocationValue as u, createContractSigningLocationValue as re, createContractSigningPlacement as ie, findContractSigningPage as d, getContractSigningHomePage as ae, isContractSigningPageUsable as oe, normalizeContractSigningLocationValue as f, normalizeContractSigningProviderValue as se, patchContractSigningPlacement as ce, resolveContractSigningDefaultSealTypes as le, resolveContractSigningPreviewPageSize as ue, validateContractSigningLocationValue as de } from "./location-rules.mjs";
7
+ import fe from "./ContractSigningLocationCanvas.mjs";
8
+ import pe from "./ContractSigningLocationInspector.mjs";
9
+ import me from "./ContractSigningLocationNavigator.mjs";
10
+ import { ContractSigningPreviewRequests as he } from "./preview-requests.mjs";
11
+ import { computed as p, createBlock as m, createCommentVNode as h, createElementBlock as ge, createElementVNode as g, createTextVNode as _e, createVNode as _, defineComponent as ve, nextTick as v, normalizeClass as ye, normalizeStyle as be, onBeforeUnmount as xe, openBlock as y, ref as b, shallowRef as x, toDisplayString as Se, unref as S, watch as C, withCtx as w } from "vue";
12
+ import { Button as Ce, Tooltip as we } from "ant-design-vue";
13
+ import { LeftOutlined as Te, ReloadOutlined as Ee, RightOutlined as De } from "@ant-design/icons-vue";
13
14
  //#region src/components/contract-signing-location/src/ContractSigningLocation.vue?vue&type=script&setup=true&lang.ts
14
- var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "gd-ant-contract-signing-location__title" }, Ee = { class: "gd-ant-contract-signing-location__header-actions" }, De = { class: "gd-ant-contract-signing-location__placement-count" }, Oe = {
15
+ var Oe = { class: "gd-ant-contract-signing-location__header" }, ke = { class: "gd-ant-contract-signing-location__title" }, Ae = { class: "gd-ant-contract-signing-location__header-actions" }, je = { class: "gd-ant-contract-signing-location__placement-count" }, Me = {
15
16
  key: 0,
16
17
  class: "gd-ant-contract-signing-location__error",
17
18
  role: "alert"
18
- }, ke = ["aria-label", "aria-expanded"], Ae = { class: "gd-ant-contract-signing-location__panel-stack" }, je = ["aria-label", "aria-expanded"], Me = { class: "gd-ant-contract-signing-location__panel-stack" }, Ne = /* @__PURE__ */ he({
19
+ }, Ne = ["aria-label", "aria-expanded"], Pe = { class: "gd-ant-contract-signing-location__panel-stack" }, Fe = ["aria-label", "aria-expanded"], Ie = { class: "gd-ant-contract-signing-location__panel-stack" }, Le = "正在校验排版,请稍后再确认签署位置", Re = /* @__PURE__ */ ve({
19
20
  name: "ContractSigningLocation",
20
21
  __name: "ContractSigningLocation",
21
22
  props: {
@@ -74,71 +75,93 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
74
75
  "submit",
75
76
  "error"
76
77
  ],
77
- setup(e, { expose: he, emit: Ne }) {
78
- let w = e, T = Ne, E = d(() => i(w.sealMinSize, w.sealMaxSize)), D = u(w.modelValue ?? c(w.contractId), {
79
- sealSizeLimit: E.value,
80
- sealTypeOptions: w.sealTypeOptions
81
- }), O = y(D), Pe = y(s(D)), k = y(D.files[0]?.fileId ?? ""), A = y(D.files[0]?.pages[0]?.pageIndex ?? 0), j = y(""), M = y(!1), N = y(""), P = v([]), F = v({}), Fe = y($e(w.zoom)), I = v(null), L = v(!1), R = v(!1), z = y("loading"), Ie = y(""), B = 0, V = !1, H, U = [], Le = 0, W = new fe(), G = d(() => w.mode === "preview"), Re = d(() => G.value || w.readonly || w.disabled), ze = d(() => w.showInspector ?? !G.value), Be = d(() => !G.value && w.showSubmitButton), Ve = d(() => O.value.files.length <= 1), He = d(() => Pt(w.height)), K = d(() => O.value.files.find((e) => e.fileId === k.value) ?? O.value.files[0]), q = d(() => a(K.value) && z.value !== "ready"), J = d(() => !q.value || G.value ? "" : z.value === "loading" ? "合同排版校验中,暂不可指定签署位置" : xt(Ie.value)), Ue = d(() => z.value === "error" && J.value ? J.value : N.value || J.value), We = d(() => !!(N.value && w.dataProvider && w.contractId) && !(z.value === "error" && J.value)), Y = d(() => Re.value || q.value), Ge = d(() => K.value?.pages.find((e) => e.pageIndex === A.value) ?? K.value?.pages[0]), Ke = d(() => {
82
- let e = K.value;
78
+ setup(e, { expose: ve, emit: Re }) {
79
+ let T = e, E = Re, D = p(() => i(T.sealMinSize, T.sealMaxSize)), ze = f(T.modelValue ?? re(T.contractId), {
80
+ sealSizeLimit: D.value,
81
+ sealTypeOptions: T.sealTypeOptions
82
+ }), O = x(ze), Be = x(u(ze)), k = x(ze.files[0]?.fileId ?? ""), A = x(ze.files[0]?.pages[0]?.pageIndex ?? 0), j = x(""), Ve = x(!1), M = x(""), N = b([]), P = b({}), He = x(ft(T.zoom)), F = b(null), I = b(!1), L = b(!1), R = x("loading"), Ue = x(""), We = a(), z = x({
83
+ status: "ready",
84
+ issues: [],
85
+ messages: []
86
+ }), Ge, Ke = 0, B = 0, V = !1, qe, H = [], Je = 0, U = new he(), W = p(() => T.mode === "preview"), Ye = p(() => W.value || T.readonly || T.disabled), Xe = p(() => T.showInspector ?? !W.value), Ze = p(() => !W.value && T.showSubmitButton), Qe = p(() => O.value.files.length <= 1), $e = p(() => Xt(T.height)), G = p(() => O.value.files.find((e) => e.fileId === k.value) ?? O.value.files[0]), K = p(() => l(G.value) && R.value !== "ready"), q = p(() => z.value.status === "checking"), et = p(() => {
87
+ let e = G.value?.fileId;
88
+ return z.value.issues.filter((t) => t.fileId === e);
89
+ }), J = p(() => {
90
+ let e = z.value;
91
+ return e.status === "ready" ? [] : e.status === "checking" ? [{
92
+ code: "CONTRACT_LAYOUT_CHECKING",
93
+ message: Le
94
+ }] : e.issues.length ? e.issues.map((e) => ({
95
+ code: e.kind === "measure-failed" ? "CONTRACT_PAGE_LAYOUT_UNVERIFIED" : "CONTRACT_PAGE_LAYOUT_OVERFLOW",
96
+ message: kt(e),
97
+ ...e.fileId === void 0 ? {} : { fileId: e.fileId },
98
+ pageIndex: e.pageIndex
99
+ })) : [{
100
+ code: "CONTRACT_PAGE_LAYOUT_UNVERIFIED",
101
+ message: "合同排版校验失败,请刷新后重试"
102
+ }];
103
+ }), tt = p(() => z.value.status === "error" ? z.value.messages[0] ?? "" : ""), Y = p(() => !K.value || W.value ? "" : R.value === "loading" ? "合同排版校验中,暂不可指定签署位置" : It(Ue.value)), nt = p(() => R.value === "error" && Y.value ? Y.value : M.value || Y.value || tt.value), rt = p(() => !!(M.value && T.dataProvider && T.contractId) && !(R.value === "error" && Y.value)), X = p(() => Ye.value || K.value), it = p(() => G.value?.pages.find((e) => e.pageIndex === A.value) ?? G.value?.pages[0]), at = p(() => {
104
+ let e = G.value;
83
105
  return e ? O.value.placements.filter((t) => t.fileId === e.fileId) : [];
84
- }), qe = d(() => {
85
- let e = K.value;
86
- return e ? w.referencePlacements.filter((t) => t.fileId === e.fileId) : [];
87
- }), X = d(() => O.value.placements.find((e) => e.id === j.value)), Je = d(() => {
88
- let e = X.value;
89
- return e ? l(O.value, e.fileId, e.pageIndex) ?? Ge.value : Ge.value;
90
- }), Ye = d(() => P.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Xe = d(() => Object.keys(F.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), Ze = d(() => P.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), Qe = d(() => {
106
+ }), ot = p(() => {
107
+ let e = G.value;
108
+ return e ? T.referencePlacements.filter((t) => t.fileId === e.fileId) : [];
109
+ }), Z = p(() => O.value.placements.find((e) => e.id === j.value)), st = p(() => {
110
+ let e = Z.value;
111
+ return e ? d(O.value, e.fileId, e.pageIndex) ?? it.value : it.value;
112
+ }), ct = p(() => N.value.filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), lt = p(() => Object.keys(P.value).filter((e) => e.endsWith(":thumbnail")).map((e) => e.slice(0, -10))), ut = p(() => N.value.filter((e) => e.endsWith(":preview")).map((e) => e.slice(0, -8))), dt = p(() => {
91
113
  let e = {};
92
- return Object.entries(F.value).forEach(([t, n]) => {
114
+ return Object.entries(P.value).forEach(([t, n]) => {
93
115
  t.endsWith(":preview") && (e[t.slice(0, -8)] = n);
94
116
  }), e;
95
117
  });
96
- x(() => w.modelValue, (e) => {
118
+ C(() => T.modelValue, (e) => {
97
119
  if (!e) return;
98
- let t = u(e, {
99
- sealSizeLimit: E.value,
100
- sealTypeOptions: w.sealTypeOptions
120
+ let t = f(e, {
121
+ sealSizeLimit: D.value,
122
+ sealTypeOptions: T.sealTypeOptions
101
123
  });
102
- Mt(t) !== Mt(O.value) && (Ot(), O.value = t, Pe.value = s(t), Q(), g(() => I.value?.scrollToPage(A.value)));
103
- }, { deep: !0 }), x(E, () => {
104
- Mt(u(O.value, {
105
- sealSizeLimit: E.value,
106
- sealTypeOptions: w.sealTypeOptions
107
- })) !== Mt(O.value) && Z(O.value);
108
- }), x(() => w.zoom, (e) => {
109
- Fe.value = $e(e);
110
- }), x(() => K.value?.fileId, () => {
111
- z.value = a(K.value) ? "loading" : "ready", Ie.value = "";
112
- }), x(() => [
113
- w.contractId,
114
- w.dataProvider,
115
- w.autoLoad
124
+ Jt(t) !== Jt(O.value) && (Wt(), O.value = t, Be.value = u(t), zt(), At(), v(() => F.value?.scrollToPage(A.value)));
125
+ }, { deep: !0 }), C(D, () => {
126
+ Jt(f(O.value, {
127
+ sealSizeLimit: D.value,
128
+ sealTypeOptions: T.sealTypeOptions
129
+ })) !== Jt(O.value) && Q(O.value);
130
+ }), C(() => T.zoom, (e) => {
131
+ He.value = ft(e);
132
+ }), C(() => G.value?.fileId, () => {
133
+ R.value = l(G.value) ? "loading" : "ready", Ue.value = "";
134
+ }), At(), C(() => [
135
+ T.contractId,
136
+ T.dataProvider,
137
+ T.autoLoad
116
138
  ], ([e, t, n], r) => {
117
- !n || !t || !e || (!r || e !== r[0] || t !== r[1]) && nt();
118
- }, { immediate: !0 }), ve(() => {
119
- V = !0, B += 1, Dt(), Ot();
139
+ !n || !t || !e || (!r || e !== r[0] || t !== r[1]) && ht();
140
+ }, { immediate: !0 }), xe(() => {
141
+ V = !0, B += 1, Ut(), Wt(), Ge?.abort(), We.dispose();
120
142
  });
121
- function $e(e) {
122
- return n(e, Math.min(w.minZoom, w.maxZoom), Math.max(w.minZoom, w.maxZoom));
123
- }
124
- function et(e) {
125
- let t = $e(e);
126
- Fe.value = t, T("update:zoom", t);
127
- }
128
- function tt() {
129
- return I.value?.fitWidth() ?? Fe.value;
130
- }
131
- function Z(e, t = {}) {
132
- O.value = u(e, {
133
- sealSizeLimit: E.value,
134
- sealTypeOptions: w.sealTypeOptions
135
- }), t.clearError !== !1 && (N.value = ""), Q();
136
- let n = s(O.value);
137
- return T("update:modelValue", n), T("change", n), n;
138
- }
139
- async function nt() {
140
- let e = String(w.contractId || O.value.contractId || "").trim();
141
- if (!w.dataProvider) return $({
143
+ function ft(e) {
144
+ return n(e, Math.min(T.minZoom, T.maxZoom), Math.max(T.minZoom, T.maxZoom));
145
+ }
146
+ function pt(e) {
147
+ let t = ft(e);
148
+ He.value = t, E("update:zoom", t);
149
+ }
150
+ function mt() {
151
+ return F.value?.fitWidth() ?? He.value;
152
+ }
153
+ function Q(e, t = {}) {
154
+ let n = e.files !== O.value.files;
155
+ O.value = f(e, {
156
+ sealSizeLimit: D.value,
157
+ sealTypeOptions: T.sealTypeOptions
158
+ }), t.clearError !== !1 && (M.value = ""), zt(), n && At();
159
+ let r = u(O.value);
160
+ return E("update:modelValue", r), E("change", r), r;
161
+ }
162
+ async function ht() {
163
+ let e = String(T.contractId || O.value.contractId || "").trim();
164
+ if (!T.dataProvider) return $({
142
165
  code: "CONTRACT_PROVIDER_MISSING",
143
166
  message: "未配置合同数据提供器,请由宿主传入文件数据"
144
167
  }), !1;
@@ -147,49 +170,49 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
147
170
  message: "缺少用于加载合同的 PaaS contractId"
148
171
  }), !1;
149
172
  let t = ++B;
150
- Ot(), M.value = !0, N.value = "";
173
+ Wt(), Ve.value = !0, M.value = "";
151
174
  try {
152
- let n = await w.dataProvider.loadContract({ contractId: e });
175
+ let n = await T.dataProvider.loadContract({ contractId: e });
153
176
  if (V || t !== B) return !1;
154
- let i = ie(n, r(w.dataProvider.coordinateScale)), a = u({
177
+ let i = se(n, r(T.dataProvider.coordinateScale)), a = f({
155
178
  ...i,
156
179
  contractId: e,
157
180
  placements: i.placements.length ? i.placements : O.value.contractId === e ? O.value.placements : []
158
181
  }, {
159
- sealSizeLimit: E.value,
160
- sealTypeOptions: w.sealTypeOptions
182
+ sealSizeLimit: D.value,
183
+ sealTypeOptions: T.sealTypeOptions
161
184
  });
162
- O.value = a, Pe.value = s(a), j.value = "", Q();
163
- let o = s(a);
164
- return T("update:modelValue", o), T("change", o), T("ready", o), rt(), g(() => I.value?.scrollToPage(A.value)), o;
185
+ O.value = a, Be.value = u(a), j.value = "", zt(), At();
186
+ let o = u(a);
187
+ return E("update:modelValue", o), E("change", o), E("ready", o), gt(), v(() => F.value?.scrollToPage(A.value)), o;
165
188
  } catch (e) {
166
- return V || t !== B || $(wt(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
189
+ return V || t !== B || $(Bt(e, "CONTRACT_LOAD_FAILED", "合同加载失败,请检查授权后重试")), !1;
167
190
  } finally {
168
- !V && t === B && (M.value = !1);
191
+ !V && t === B && (Ve.value = !1);
169
192
  }
170
193
  }
171
- async function rt() {
172
- w.dataProvider?.loadPagePreview && await Promise.allSettled(O.value.files.map((e) => {
173
- if (a(e)) return Promise.resolve();
174
- let t = ne(e.pages);
175
- return t && !t.thumbnailUrl ? it(e.fileId, t.pageIndex, !0) : Promise.resolve();
194
+ async function gt() {
195
+ T.dataProvider?.loadPagePreview && await Promise.allSettled(O.value.files.map((e) => {
196
+ if (l(e)) return Promise.resolve();
197
+ let t = ae(e.pages);
198
+ return t && !t.thumbnailUrl ? _t(e.fileId, t.pageIndex, !0) : Promise.resolve();
176
199
  }));
177
200
  }
178
- async function it(e, t, n) {
179
- let i = w.dataProvider?.loadPagePreview, o = O.value.files.find((t) => t.fileId === e), ee = l(O.value, e, t), s = Tt(e, t, n);
180
- if (!i || a(o) || !ee || P.value.includes(s)) return;
181
- Et(s), P.value = [...P.value, s];
182
- let c = W.start(s);
201
+ async function _t(e, t, n) {
202
+ let i = T.dataProvider?.loadPagePreview, a = O.value.files.find((t) => t.fileId === e), o = d(O.value, e, t), s = Vt(e, t, n);
203
+ if (!i || l(a) || !o || N.value.includes(s)) return;
204
+ Ht(s), N.value = [...N.value, s];
205
+ let c = U.start(s);
183
206
  try {
184
207
  let a = await i({
185
- contractId: O.value.contractId || w.contractId,
208
+ contractId: O.value.contractId || T.contractId,
186
209
  fileId: e,
187
210
  pageIndex: t,
188
211
  thumbnail: n,
189
212
  signal: c.signal
190
213
  });
191
- if (V || !W.isCurrent(s, c) || !l(O.value, e, t)) return;
192
- let o = se(l(O.value, e, t), a, r(w.dataProvider?.coordinateScale), n), ee = O.value.files.map((r) => r.fileId === e ? {
214
+ if (V || !U.isCurrent(s, c) || !d(O.value, e, t)) return;
215
+ let o = ue(d(O.value, e, t), a, r(T.dataProvider?.coordinateScale), n), l = O.value.files.map((r) => r.fileId === e ? {
193
216
  ...r,
194
217
  pages: r.pages.map((e) => e.pageIndex === t ? {
195
218
  ...e,
@@ -197,73 +220,73 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
197
220
  ...n ? { thumbnailUrl: a.url } : { previewUrl: a.url }
198
221
  } : e)
199
222
  } : r);
200
- Z({
223
+ Q({
201
224
  ...O.value,
202
- files: ee
225
+ files: l
203
226
  }, { clearError: !1 });
204
227
  } catch (n) {
205
- if (!W.isCurrent(s, c) || kt(n)) return;
206
- let r = wt(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
228
+ if (!U.isCurrent(s, c) || Gt(n)) return;
229
+ let r = Bt(n, "CONTRACT_PREVIEW_FAILED", "合同页面预览加载失败,可切换页面或重试", {
207
230
  fileId: e,
208
231
  pageIndex: t
209
232
  });
210
- T("error", r), F.value = {
211
- ...F.value,
233
+ E("error", r), P.value = {
234
+ ...P.value,
212
235
  [s]: r.message
213
236
  };
214
237
  } finally {
215
- W.finish(s, c) && (P.value = P.value.filter((e) => e !== s));
238
+ U.finish(s, c) && (N.value = N.value.filter((e) => e !== s));
216
239
  }
217
240
  }
218
- function at(e) {
241
+ function vt(e) {
219
242
  if (e === k.value) return;
220
243
  let t = k.value;
221
- Dt(), t && (Ot((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), U = U.filter((t) => t.fileId === e)), k.value = e, A.value = ne(O.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, j.value = "", T("file-change", e), T("page-change", e, A.value), g(() => I.value?.scrollToPage(A.value));
244
+ Ut(), t && (Wt((e) => e.startsWith(`${t}:`) && e.endsWith(":preview")), H = H.filter((t) => t.fileId === e)), k.value = e, A.value = ae(O.value.files.find((t) => t.fileId === e)?.pages)?.pageIndex ?? 0, j.value = "", E("file-change", e), E("page-change", e, A.value), v(() => F.value?.scrollToPage(A.value));
222
245
  }
223
- function ot(e) {
246
+ function yt(e) {
224
247
  A.value = e;
225
248
  }
226
- function st(e) {
227
- A.value !== e && (A.value = e), T("page-change", k.value, e);
249
+ function bt(e) {
250
+ A.value !== e && (A.value = e), E("page-change", k.value, e);
228
251
  }
229
- function ct(e) {
230
- Dt();
252
+ function xt(e) {
253
+ Ut();
231
254
  let t = k.value;
232
- H = setTimeout(() => {
233
- H = void 0, k.value === t && lt(t, e);
255
+ qe = setTimeout(() => {
256
+ qe = void 0, k.value === t && St(t, e);
234
257
  }, 150);
235
258
  }
236
- function lt(e, t) {
259
+ function St(e, t) {
237
260
  let n = O.value.files.find((t) => t.fileId === e);
238
- !n || a(n) || e !== k.value || (t.forEach((e) => {
261
+ !n || l(n) || e !== k.value || (t.forEach((e) => {
239
262
  let t = n.pages.find((t) => t.pageIndex === e);
240
- !t || t.previewUrl || P.value.includes(Tt(n.fileId, e, !1)) || U.some((t) => t.fileId === n.fileId && t.pageIndex === e) || U.push({
263
+ !t || t.previewUrl || N.value.includes(Vt(n.fileId, e, !1)) || H.some((t) => t.fileId === n.fileId && t.pageIndex === e) || H.push({
241
264
  fileId: n.fileId,
242
265
  pageIndex: e
243
266
  });
244
- }), ut());
267
+ }), Ct());
245
268
  }
246
- async function ut() {
269
+ async function Ct() {
247
270
  let e = k.value;
248
- for (U = U.filter((t) => t.fileId === e); Le < 3 && U.length;) {
249
- let t = U.shift();
271
+ for (H = H.filter((t) => t.fileId === e); Je < 3 && H.length;) {
272
+ let t = H.shift();
250
273
  if (!t || t.fileId !== e) continue;
251
- let n = l(O.value, t.fileId, t.pageIndex), r = O.value.files.find((e) => e.fileId === t.fileId);
252
- !n || a(r) || n.previewUrl || P.value.includes(Tt(t.fileId, t.pageIndex, !1)) || (Le += 1, it(t.fileId, t.pageIndex, !1).finally(() => {
253
- Le = Math.max(0, Le - 1), ut();
274
+ let n = d(O.value, t.fileId, t.pageIndex), r = O.value.files.find((e) => e.fileId === t.fileId);
275
+ !n || l(r) || n.previewUrl || N.value.includes(Vt(t.fileId, t.pageIndex, !1)) || (Je += 1, _t(t.fileId, t.pageIndex, !1).finally(() => {
276
+ Je = Math.max(0, Je - 1), Ct();
254
277
  }));
255
278
  }
256
279
  }
257
- function dt(e) {
280
+ function wt(e) {
258
281
  let t = O.value.placements.find((t) => t.id === e);
259
- t && (t.fileId !== k.value && at(t.fileId), j.value = e, g(() => I.value?.scrollToPlacement(e)));
282
+ t && (t.fileId !== k.value && vt(t.fileId), j.value = e, v(() => F.value?.scrollToPlacement(e)));
260
283
  }
261
- function ft(e, t = {}) {
262
- if (Y.value || !w.allowedPlacementTypes.includes(e)) return;
263
- let n = t.fileId ?? K.value?.fileId, r = t.pageIndex ?? Ge.value?.pageIndex;
284
+ function Tt(e, t = {}) {
285
+ if (X.value || !T.allowedPlacementTypes.includes(e)) return;
286
+ let n = t.fileId ?? G.value?.fileId, r = t.pageIndex ?? it.value?.pageIndex;
264
287
  if (!n || r === void 0) return;
265
- let i = l(O.value, n, r);
266
- if (!i || !re(i)) {
288
+ let i = d(O.value, n, r);
289
+ if (!i || !oe(i)) {
267
290
  $({
268
291
  code: "CONTRACT_PAGE_SIZE_INVALID",
269
292
  message: "当前页面缺少有效的原始宽高,暂时不能添加签署位置",
@@ -272,7 +295,7 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
272
295
  });
273
296
  return;
274
297
  }
275
- let a = oe(w.defaultSealTypes, w.sealTypeOptions);
298
+ let a = le(T.defaultSealTypes, T.sealTypeOptions);
276
299
  if (e === "seal" && !a.length) {
277
300
  $({
278
301
  code: "CONTRACT_SEAL_TYPES_MISSING",
@@ -282,112 +305,161 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
282
305
  });
283
306
  return;
284
307
  }
285
- let o = te(e, n, i, {
308
+ let o = ie(e, n, i, {
286
309
  signLeft: t.signLeft,
287
310
  signTop: t.signTop,
288
- sizeProfile: w.sizeProfile,
289
- sealSizeLimit: E.value,
290
- sealTypeOptions: w.sealTypeOptions,
311
+ sizeProfile: T.sizeProfile,
312
+ sealSizeLimit: D.value,
313
+ sealTypeOptions: T.sealTypeOptions,
291
314
  ...e === "seal" ? { sealType: a } : {}
292
315
  });
293
- return Z({
316
+ return Q({
294
317
  ...O.value,
295
318
  placements: [...O.value.placements, o]
296
- }), k.value = n, A.value = r, j.value = o.id, jt(o);
319
+ }), k.value = n, A.value = r, j.value = o.id, qt(o);
297
320
  }
298
- function pt(e, t) {
299
- Y.value || Z({
321
+ function Et(e, t) {
322
+ X.value || Q({
300
323
  ...O.value,
301
324
  placements: O.value.placements.map((n) => {
302
325
  if (n.id !== e) return n;
303
326
  let r = t.pageIndex === void 0 ? n.pageIndex : t.pageIndex;
304
- return ae(n, t, l(O.value, n.fileId, r), {
305
- sealSizeLimit: E.value,
306
- sealTypeOptions: w.sealTypeOptions
327
+ return ce(n, t, d(O.value, n.fileId, r), {
328
+ sealSizeLimit: D.value,
329
+ sealTypeOptions: T.sealTypeOptions
307
330
  });
308
331
  })
309
332
  });
310
333
  }
311
- function mt() {
312
- let e = X.value;
313
- if (!e || Y.value) return;
314
- let n = l(O.value, e.fileId, e.pageIndex);
334
+ function Dt() {
335
+ let e = Z.value;
336
+ if (!e || X.value) return;
337
+ let n = d(O.value, e.fileId, e.pageIndex);
315
338
  if (!n) return;
316
339
  let r = t({
317
- ...jt(e),
318
- id: Nt(),
340
+ ...qt(e),
341
+ id: Yt(),
319
342
  signLeft: e.signLeft + 16,
320
343
  signTop: e.signTop + 16
321
- }, n, { sealSizeLimit: E.value });
322
- Z({
344
+ }, n, { sealSizeLimit: D.value });
345
+ Q({
323
346
  ...O.value,
324
347
  placements: [...O.value.placements, r]
325
348
  }), j.value = r.id;
326
349
  }
327
- function ht(e) {
328
- Y.value || (Z({
350
+ function Ot(e) {
351
+ X.value || (Q({
329
352
  ...O.value,
330
353
  placements: O.value.placements.filter((t) => t.id !== e)
331
354
  }), j.value === e && (j.value = ""));
332
355
  }
333
- function gt() {
334
- let e = ce(O.value, { allowedSealTypes: w.sealTypeOptions.map((e) => e.value) });
335
- return q.value ? [...e, {
356
+ function kt(e) {
357
+ let t = O.value.files.find((t) => t.fileId === e.fileId)?.fileName, n = o(e, "generate")[0] ?? "合同排版校验未通过";
358
+ return t ? `${t}:${n}` : n;
359
+ }
360
+ function At() {
361
+ Ge?.abort();
362
+ let e = ++Ke, t = [];
363
+ for (let e of O.value.files) ee(e.source) && t.push({
364
+ fileId: e.fileId,
365
+ template: e.source.template,
366
+ ...e.source.values ? { values: e.source.values } : {},
367
+ layoutPages: c(e.fileId, e.source)
368
+ });
369
+ if (!t.length) {
370
+ Ge = void 0, z.value = {
371
+ status: "ready",
372
+ issues: [],
373
+ messages: []
374
+ };
375
+ return;
376
+ }
377
+ let n = new AbortController();
378
+ Ge = n, z.value = {
379
+ status: "checking",
380
+ issues: [],
381
+ messages: []
382
+ }, We.check(t, { signal: n.signal }).then((t) => {
383
+ V || e !== Ke || (z.value = t.length ? {
384
+ status: "error",
385
+ issues: t,
386
+ messages: t.map((e) => kt(e))
387
+ } : {
388
+ status: "ready",
389
+ issues: [],
390
+ messages: []
391
+ });
392
+ }, (t) => {
393
+ V || e !== Ke || s(t) || (z.value = {
394
+ status: "error",
395
+ issues: [],
396
+ messages: ["合同排版校验失败,请刷新后重试"]
397
+ });
398
+ });
399
+ }
400
+ function jt() {
401
+ let e = de(O.value, { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
402
+ return [...K.value && !q.value ? [...e, {
336
403
  code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
337
- message: St()
338
- }] : e;
404
+ message: Lt()
405
+ }] : e, ...J.value];
339
406
  }
340
- function _t() {
341
- return s(O.value);
407
+ function Mt() {
408
+ return u(O.value);
342
409
  }
343
- function vt() {
344
- if (q.value) throw new o([{
410
+ function Nt() {
411
+ if (q.value) throw new te(J.value);
412
+ if (K.value) throw new te([{
345
413
  code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
346
- message: St()
414
+ message: Lt()
347
415
  }]);
348
- return ee(_t(), { allowedSealTypes: w.sealTypeOptions.map((e) => e.value) });
416
+ if (J.value.length) throw new te(J.value);
417
+ return ne(Mt(), { allowedSealTypes: T.sealTypeOptions.map((e) => e.value) });
349
418
  }
350
- function yt() {
351
- if (q.value) {
352
- let e = St();
419
+ function Pt() {
420
+ if (q.value) return $(J.value[0]), !1;
421
+ if (K.value) {
422
+ let e = Lt();
353
423
  return console.error("[GD-SIGN-COORD]", e), $({
354
424
  code: "CONTRACT_TEMPLATE_FONT_UNAVAILABLE",
355
- message: J.value || e
425
+ message: Y.value || e
356
426
  }), !1;
357
427
  }
428
+ let e = J.value;
429
+ if (e.length) return e[0].code !== "CONTRACT_LAYOUT_CHECKING" && console.error("[GD-SIGN-COORD]", e.map((e) => e.message).join(";")), $(e[0]), !1;
358
430
  try {
359
- let e = vt();
360
- return N.value = "", T("submit", e), e;
431
+ let e = Nt();
432
+ return M.value = "", E("submit", e), e;
361
433
  } catch (e) {
362
- return $(e instanceof o ? {
434
+ return $(e instanceof te ? {
363
435
  ...e.errors[0],
364
436
  cause: e
365
- } : wt(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
437
+ } : Bt(e, "CONTRACT_SIGNING_LOCATION_INVALID", "指定签署位置数据不完整")), !1;
366
438
  }
367
439
  }
368
- function bt(e, t) {
369
- z.value = e, Ie.value = e === "error" ? t || "合同排版度量校验失败" : "";
440
+ function Ft(e, t) {
441
+ R.value = e, Ue.value = e === "error" ? t || "合同排版度量校验失败" : "";
370
442
  }
371
- function xt(e) {
443
+ function It(e) {
372
444
  let t = e.match(/第\s*(\d+)\s*页正文超出纸张/);
373
- return t ? `第 ${t[1]} 页正文超出纸张,请回模板设计器调整后重试` : e.includes("合同排版度量不一致") ? "当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。" : e.includes("超时") ? "合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。" : e.includes("合同打印页节点不存在") ? "合同底图没有加载完整。请刷新后重新打开这份模板。" : "合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。";
445
+ return t ? `第 ${t[1]} 页正文超出纸张,请回模板设计器调整后重试` : e.includes("合同排版度量不一致") ? "当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。" : e.includes("超时") ? "合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。" : e.includes("合同打印页节点不存在") ? "合同底图没有加载完整。请刷新后重新打开这份模板。" : e.includes("合同图片加载失败") ? "合同底图中有图片未能加载。请确认图片地址可以正常访问,刷新后重新打开这份模板。" : e.includes("无法确认排版") ? `${e}。请刷新后重试;仍失败时请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。` : "合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。";
374
446
  }
375
- function St() {
376
- return z.value === "error" ? Ie.value || "合同排版度量校验失败,禁止生成签署坐标" : "合同排版度量校验中,请稍后再保存签署坐标";
447
+ function Lt() {
448
+ return R.value === "error" ? Ue.value || "合同排版度量校验失败,禁止生成签署坐标" : "合同排版度量校验中,请稍后再保存签署坐标";
377
449
  }
378
- function Ct() {
379
- if (Y.value) return s(O.value);
380
- let e = Z(s(Pe.value));
381
- return j.value = "", Q(!0), g(() => I.value?.scrollToPage(A.value)), e;
450
+ function Rt() {
451
+ if (X.value) return u(O.value);
452
+ let e = Q(u(Be.value));
453
+ return j.value = "", zt(!0), v(() => F.value?.scrollToPage(A.value)), e;
382
454
  }
383
- function Q(e = !1) {
455
+ function zt(e = !1) {
384
456
  let t = (e ? void 0 : O.value.files.find((e) => e.fileId === k.value)) ?? O.value.files[0];
385
457
  k.value = t?.fileId ?? "", A.value = ((e ? void 0 : t?.pages.find((e) => e.pageIndex === A.value)) ?? t?.pages[0])?.pageIndex ?? 0, O.value.placements.some((e) => e.id === j.value) || (j.value = "");
386
458
  }
387
459
  function $(e) {
388
- N.value = e.message, T("error", e);
460
+ M.value = e.message, E("error", e);
389
461
  }
390
- function wt(e, t, n, r = {}) {
462
+ function Bt(e, t, n, r = {}) {
391
463
  let i = typeof e == "object" && e && "status" in e ? Number(e.status) : void 0;
392
464
  return {
393
465
  code: t,
@@ -396,170 +468,172 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
396
468
  cause: e
397
469
  };
398
470
  }
399
- function Tt(e, t, n) {
471
+ function Vt(e, t, n) {
400
472
  return `${e}:${t}:${n ? "thumbnail" : "preview"}`;
401
473
  }
402
- function Et(e) {
403
- if (!(e in F.value)) return;
404
- let t = { ...F.value };
405
- delete t[e], F.value = t;
474
+ function Ht(e) {
475
+ if (!(e in P.value)) return;
476
+ let t = { ...P.value };
477
+ delete t[e], P.value = t;
406
478
  }
407
- function Dt() {
408
- H &&= (clearTimeout(H), void 0);
479
+ function Ut() {
480
+ qe &&= (clearTimeout(qe), void 0);
409
481
  }
410
- function Ot(e) {
411
- let t = e ?? (() => !0), n = new Set(W.abort(t));
412
- n.size && (P.value = P.value.filter((e) => !n.has(e))), e || (U = []);
482
+ function Wt(e) {
483
+ let t = e ?? (() => !0), n = new Set(U.abort(t));
484
+ n.size && (N.value = N.value.filter((e) => !n.has(e))), e || (H = []);
413
485
  }
414
- function kt(e) {
486
+ function Gt(e) {
415
487
  return !!(e && typeof e == "object" && "cancelled" in e && e.cancelled) || e instanceof DOMException && e.name === "AbortError";
416
488
  }
417
- function At(e) {
418
- let t = K.value;
419
- t && it(t.fileId, e, !1);
489
+ function Kt(e) {
490
+ let t = G.value;
491
+ t && _t(t.fileId, e, !1);
420
492
  }
421
- function jt(e) {
493
+ function qt(e) {
422
494
  return {
423
495
  ...e,
424
496
  sealType: e.sealType ? [...e.sealType] : void 0
425
497
  };
426
498
  }
427
- function Mt(e) {
499
+ function Jt(e) {
428
500
  return JSON.stringify(e);
429
501
  }
430
- function Nt() {
502
+ function Yt() {
431
503
  return typeof crypto < "u" && "randomUUID" in crypto ? `contract-signing-placement-${crypto.randomUUID()}` : `contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
432
504
  }
433
- function Pt(e) {
505
+ function Xt(e) {
434
506
  if (typeof e == "number" && Number.isFinite(e) && e > 0) return { "--gd-ant-contract-signing-location-height": `${e}px` };
435
507
  if (typeof e == "string" && e.trim()) return { "--gd-ant-contract-signing-location-height": e.trim() };
436
508
  }
437
- return he({
438
- load: nt,
439
- validate: gt,
440
- getValue: _t,
441
- getOutput: vt,
442
- submit: yt,
443
- reset: Ct,
444
- addPlacement: ft,
445
- removePlacement: ht,
446
- fitWidth: tt
447
- }), (t, n) => (_(), pe("section", {
448
- class: ge(["gd-ant-contract-signing-location", {
449
- "is-readonly": Re.value,
509
+ return ve({
510
+ load: ht,
511
+ validate: jt,
512
+ getValue: Mt,
513
+ getOutput: Nt,
514
+ submit: Pt,
515
+ reset: Rt,
516
+ addPlacement: Tt,
517
+ removePlacement: Ot,
518
+ fitWidth: mt
519
+ }), (t, n) => (y(), ge("section", {
520
+ class: ye(["gd-ant-contract-signing-location", {
521
+ "is-readonly": Ye.value,
450
522
  "is-disabled": e.disabled,
451
- "is-preview": G.value
523
+ "is-preview": W.value
452
524
  }]),
453
- style: _e(He.value)
525
+ style: be($e.value)
454
526
  }, [
455
- m("header", we, [m("div", Te, [n[6] ||= m("span", {
527
+ g("header", Oe, [g("div", ke, [n[6] ||= g("span", {
456
528
  class: "gd-ant-contract-signing-location__title-bar",
457
529
  "aria-hidden": "true"
458
- }, null, -1), m("div", null, [m("strong", null, ye(G.value ? "合同预览" : "指定合同签署位置"), 1)])]), m("div", Ee, [
459
- m("span", De, ye(O.value.placements.length) + " 个位置", 1),
460
- e.dataProvider ? (_(), f(b(C), {
530
+ }, null, -1), g("div", null, [g("strong", null, Se(W.value ? "合同预览" : "指定合同签署位置"), 1)])]), g("div", Ae, [
531
+ g("span", je, Se(O.value.placements.length) + " 个位置", 1),
532
+ e.dataProvider ? (y(), m(S(Ce), {
461
533
  key: 0,
462
- loading: M.value,
463
- onClick: nt
534
+ loading: Ve.value,
535
+ onClick: ht
464
536
  }, {
465
- default: S(() => [h(b(Se), { "aria-hidden": "true" }), n[7] ||= me(" 重新加载 ", -1)]),
537
+ default: w(() => [_(S(Ee), { "aria-hidden": "true" }), n[7] ||= _e(" 重新加载 ", -1)]),
466
538
  _: 1
467
- }, 8, ["loading"])) : p("", !0),
468
- G.value ? p("", !0) : (_(), f(b(C), {
539
+ }, 8, ["loading"])) : h("", !0),
540
+ W.value ? h("", !0) : (y(), m(S(Ce), {
469
541
  key: 1,
470
- disabled: Y.value,
471
- onClick: Ct
542
+ disabled: X.value,
543
+ onClick: Rt
472
544
  }, {
473
- default: S(() => [...n[8] ||= [me("重置", -1)]]),
545
+ default: w(() => [...n[8] ||= [_e("重置", -1)]]),
474
546
  _: 1
475
547
  }, 8, ["disabled"])),
476
- Be.value ? (_(), f(b(C), {
548
+ Ze.value ? (y(), m(S(Ce), {
477
549
  key: 2,
478
550
  type: "primary",
479
- loading: M.value,
480
- disabled: e.disabled || q.value,
481
- onClick: yt
551
+ loading: Ve.value || q.value,
552
+ disabled: e.disabled || K.value || q.value,
553
+ onClick: Pt
482
554
  }, {
483
- default: S(() => [...n[9] ||= [me("确认并生成规则", -1)]]),
555
+ default: w(() => [...n[9] ||= [_e("确认并生成规则", -1)]]),
484
556
  _: 1
485
- }, 8, ["loading", "disabled"])) : p("", !0)
557
+ }, 8, ["loading", "disabled"])) : h("", !0)
486
558
  ])]),
487
- Ue.value ? (_(), pe("div", Oe, [m("span", null, ye(Ue.value), 1), We.value ? (_(), f(b(C), {
559
+ nt.value ? (y(), ge("div", Me, [g("span", null, Se(nt.value), 1), rt.value ? (y(), m(S(Ce), {
488
560
  key: 0,
489
561
  type: "link",
490
562
  size: "small",
491
- onClick: nt
563
+ onClick: ht
492
564
  }, {
493
- default: S(() => [...n[10] ||= [me("重试", -1)]]),
565
+ default: w(() => [...n[10] ||= [_e("重试", -1)]]),
494
566
  _: 1
495
- })) : p("", !0)])) : p("", !0),
496
- m("div", { class: ge(["gd-ant-contract-signing-location__body", {
497
- "is-single-file": Ve.value,
498
- "is-inspector-hidden": !ze.value
567
+ })) : h("", !0)])) : h("", !0),
568
+ g("div", { class: ye(["gd-ant-contract-signing-location__body", {
569
+ "is-single-file": Qe.value,
570
+ "is-inspector-hidden": !Xe.value
499
571
  }]) }, [
500
- Ve.value ? p("", !0) : (_(), pe("div", {
572
+ Qe.value ? h("", !0) : (y(), ge("div", {
501
573
  key: 0,
502
- class: ge(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": R.value }])
503
- }, [h(b(be), { title: R.value ? "展开页面栏" : "收起页面栏" }, {
504
- default: S(() => [m("button", {
574
+ class: ye(["gd-ant-contract-signing-location__navigator-wrap", { "is-collapsed": L.value }])
575
+ }, [_(S(we), { title: L.value ? "展开页面栏" : "收起页面栏" }, {
576
+ default: w(() => [g("button", {
505
577
  type: "button",
506
578
  class: "gd-ant-contract-signing-location__panel-handle",
507
- "aria-label": R.value ? "展开页面栏" : "收起页面栏",
508
- "aria-expanded": !R.value,
509
- onClick: n[0] ||= (e) => R.value = !R.value
510
- }, [R.value ? (_(), f(b(Ce), {
579
+ "aria-label": L.value ? "展开页面栏" : "收起页面栏",
580
+ "aria-expanded": !L.value,
581
+ onClick: n[0] ||= (e) => L.value = !L.value
582
+ }, [L.value ? (y(), m(S(De), {
511
583
  key: 0,
512
584
  "aria-hidden": "true"
513
- })) : (_(), f(b(xe), {
585
+ })) : (y(), m(S(Te), {
514
586
  key: 1,
515
587
  "aria-hidden": "true"
516
- }))], 8, ke)]),
588
+ }))], 8, Ne)]),
517
589
  _: 1
518
- }, 8, ["title"]), m("div", Ae, [h(de, {
590
+ }, 8, ["title"]), g("div", Pe, [_(me, {
519
591
  files: O.value.files,
520
592
  "active-file-id": k.value,
521
- "loading-preview-keys": Ye.value,
522
- "error-preview-keys": Xe.value,
523
- onSelect: at
593
+ "loading-preview-keys": ct.value,
594
+ "error-preview-keys": lt.value,
595
+ onSelect: vt
524
596
  }, null, 8, [
525
597
  "files",
526
598
  "active-file-id",
527
599
  "loading-preview-keys",
528
600
  "error-preview-keys"
529
601
  ])])], 2)),
530
- h(le, {
602
+ _(fe, {
531
603
  ref_key: "canvasRef",
532
- ref: I,
533
- file: K.value,
534
- pages: K.value?.pages ?? [],
535
- placements: Ke.value,
536
- "reference-placements": qe.value,
604
+ ref: F,
605
+ file: G.value,
606
+ pages: G.value?.pages ?? [],
607
+ placements: at.value,
608
+ "reference-placements": ot.value,
537
609
  "selected-placement-id": j.value,
538
- readonly: Y.value,
610
+ readonly: X.value,
539
611
  resizable: e.resizable,
540
- "seal-size-limit": E.value,
612
+ "seal-size-limit": D.value,
541
613
  "seal-type-options": e.sealTypeOptions,
542
- zoom: Fe.value,
543
- "preview-loading-keys": Ze.value,
544
- "preview-error-map": Qe.value,
614
+ zoom: He.value,
615
+ "preview-loading-keys": ut.value,
616
+ "preview-error-map": dt.value,
545
617
  "active-page-index": A.value,
546
618
  "min-zoom": e.minZoom,
547
619
  "max-zoom": e.maxZoom,
548
620
  "font-base-url": e.contractFontBaseUrl,
621
+ "layout-issues": et.value,
622
+ "layout-checking": q.value,
549
623
  onSelect: n[1] ||= (e) => j.value = e,
550
- onRetry: At,
551
- onAdd: n[2] ||= (e, t, n, r) => ft(e, {
624
+ onRetry: Kt,
625
+ onAdd: n[2] ||= (e, t, n, r) => Tt(e, {
552
626
  signLeft: t,
553
627
  signTop: n,
554
628
  pageIndex: r
555
629
  }),
556
- onUpdate: n[3] ||= (e) => pt(e.id, e),
557
- onRemove: ht,
558
- onVisiblePages: ct,
559
- onViewPage: ot,
560
- onPageChange: st,
561
- onZoomChange: et,
562
- onTemplateStatus: bt
630
+ onUpdate: n[3] ||= (e) => Et(e.id, e),
631
+ onRemove: Ot,
632
+ onVisiblePages: xt,
633
+ onViewPage: yt,
634
+ onPageChange: bt,
635
+ onZoomChange: pt,
636
+ onTemplateStatus: Ft
563
637
  }, null, 8, [
564
638
  "file",
565
639
  "pages",
@@ -576,42 +650,44 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
576
650
  "active-page-index",
577
651
  "min-zoom",
578
652
  "max-zoom",
579
- "font-base-url"
653
+ "font-base-url",
654
+ "layout-issues",
655
+ "layout-checking"
580
656
  ]),
581
- ze.value ? (_(), pe("div", {
657
+ Xe.value ? (y(), ge("div", {
582
658
  key: 1,
583
- class: ge(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": L.value }])
584
- }, [h(b(be), { title: L.value ? "展开属性栏" : "收起属性栏" }, {
585
- default: S(() => [m("button", {
659
+ class: ye(["gd-ant-contract-signing-location__inspector-wrap", { "is-collapsed": I.value }])
660
+ }, [_(S(we), { title: I.value ? "展开属性栏" : "收起属性栏" }, {
661
+ default: w(() => [g("button", {
586
662
  type: "button",
587
663
  class: "gd-ant-contract-signing-location__panel-handle",
588
- "aria-label": L.value ? "展开属性栏" : "收起属性栏",
589
- "aria-expanded": !L.value,
590
- onClick: n[4] ||= (e) => L.value = !L.value
591
- }, [L.value ? (_(), f(b(xe), {
664
+ "aria-label": I.value ? "展开属性栏" : "收起属性栏",
665
+ "aria-expanded": !I.value,
666
+ onClick: n[4] ||= (e) => I.value = !I.value
667
+ }, [I.value ? (y(), m(S(Te), {
592
668
  key: 0,
593
669
  "aria-hidden": "true"
594
- })) : (_(), f(b(Ce), {
670
+ })) : (y(), m(S(De), {
595
671
  key: 1,
596
672
  "aria-hidden": "true"
597
- }))], 8, je)]),
673
+ }))], 8, Fe)]),
598
674
  _: 1
599
- }, 8, ["title"]), m("div", Me, [h(ue, {
600
- placement: X.value,
601
- page: Je.value,
602
- pages: K.value?.pages ?? [],
603
- placements: Ke.value,
604
- readonly: Y.value,
675
+ }, 8, ["title"]), g("div", Ie, [_(pe, {
676
+ placement: Z.value,
677
+ page: st.value,
678
+ pages: G.value?.pages ?? [],
679
+ placements: at.value,
680
+ readonly: X.value,
605
681
  resizable: e.resizable,
606
- "seal-size-limit": E.value,
682
+ "seal-size-limit": D.value,
607
683
  "seal-type-options": e.sealTypeOptions,
608
684
  "allowed-placement-types": e.allowedPlacementTypes,
609
685
  "size-profile": e.sizeProfile,
610
- onAdd: ft,
611
- onUpdate: n[5] ||= (e) => X.value && pt(X.value.id, e),
612
- onDuplicate: mt,
613
- onRemove: ht,
614
- onLocate: dt
686
+ onAdd: Tt,
687
+ onUpdate: n[5] ||= (e) => Z.value && Et(Z.value.id, e),
688
+ onDuplicate: Dt,
689
+ onRemove: Ot,
690
+ onLocate: wt
615
691
  }, null, 8, [
616
692
  "placement",
617
693
  "page",
@@ -623,10 +699,10 @@ var we = { class: "gd-ant-contract-signing-location__header" }, Te = { class: "g
623
699
  "seal-type-options",
624
700
  "allowed-placement-types",
625
701
  "size-profile"
626
- ])])], 2)) : p("", !0)
702
+ ])])], 2)) : h("", !0)
627
703
  ], 2)
628
704
  ], 6));
629
705
  }
630
706
  });
631
707
  //#endregion
632
- export { Ne as default };
708
+ export { Re as default };