@guodun/antdv 1.4.7 → 1.5.1

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