@rhc-office/sdk 6.6.363 → 6.6.381
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/digital-sign-environment.d.ts +6 -0
- package/dist/api/digital-sign-environment.d.ts.map +1 -1
- package/dist/browser/document-viewer.js +1 -1
- package/dist/browser/document-viewer.js.map +1 -1
- package/dist/browser.d.ts +4 -2
- package/dist/browser.d.ts.map +1 -1
- package/dist/index.js +185 -169
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/viewer/DocumentSDK.d.ts +1 -0
- package/dist/viewer/DocumentSDK.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/digital-sign-environment.ts +56 -20
- package/src/browser.ts +5 -0
- package/src/viewer/DocumentSDK.ts +43 -12
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
1
|
+
var Y = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.COMPACT = "compact", t.HIDE = "none", t))(Y || {});
|
|
2
|
+
const U = "RIGHT_CENTER", N = "REGULAR_ESM", B = "auto", k = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", E = {
|
|
3
3
|
defaults: {
|
|
4
4
|
bjca: {
|
|
5
5
|
pin: ""
|
|
6
6
|
},
|
|
7
7
|
deviceType: "client",
|
|
8
|
-
edgePosition:
|
|
8
|
+
edgePosition: U,
|
|
9
9
|
kol: {
|
|
10
10
|
appId: "",
|
|
11
11
|
appName: "",
|
|
@@ -17,8 +17,8 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
17
17
|
pin: "",
|
|
18
18
|
usbKeyType: 14
|
|
19
19
|
},
|
|
20
|
-
rsaMode:
|
|
21
|
-
signatureType:
|
|
20
|
+
rsaMode: B,
|
|
21
|
+
signatureType: N
|
|
22
22
|
},
|
|
23
23
|
signServer: {
|
|
24
24
|
authSource: "Password",
|
|
@@ -38,7 +38,7 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
38
38
|
usbKeyType: 14
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
},
|
|
41
|
+
}, x = (t) => ({
|
|
42
42
|
bjca: {
|
|
43
43
|
pin: t.bjca.pin
|
|
44
44
|
},
|
|
@@ -57,7 +57,7 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
57
57
|
},
|
|
58
58
|
rsaMode: t.rsaMode,
|
|
59
59
|
signatureType: t.signatureType
|
|
60
|
-
}),
|
|
60
|
+
}), K = (t) => ({
|
|
61
61
|
authSource: t.authSource,
|
|
62
62
|
defaultLogin: t.defaultLogin,
|
|
63
63
|
defaultPassword: t.defaultPassword,
|
|
@@ -74,10 +74,10 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
74
74
|
checkCertificateBinding: t.usbKey.checkCertificateBinding,
|
|
75
75
|
usbKeyType: t.usbKey.usbKeyType
|
|
76
76
|
}
|
|
77
|
-
}),
|
|
78
|
-
defaults:
|
|
79
|
-
signServer:
|
|
80
|
-
}),
|
|
77
|
+
}), g = (t) => ({
|
|
78
|
+
defaults: x(t.defaults),
|
|
79
|
+
signServer: K(t.signServer)
|
|
80
|
+
}), y = (t) => ({
|
|
81
81
|
defaults: t.defaults ? {
|
|
82
82
|
...t.defaults,
|
|
83
83
|
bjca: t.defaults.bjca ? { ...t.defaults.bjca } : void 0,
|
|
@@ -89,7 +89,7 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
89
89
|
kol: t.signServer.kol ? { ...t.signServer.kol } : void 0,
|
|
90
90
|
usbKey: t.signServer.usbKey ? { ...t.signServer.usbKey } : void 0
|
|
91
91
|
} : void 0
|
|
92
|
-
}),
|
|
92
|
+
}), W = (t, n) => n ? {
|
|
93
93
|
bjca: {
|
|
94
94
|
pin: n.bjca?.pin ?? t.bjca.pin
|
|
95
95
|
},
|
|
@@ -108,7 +108,7 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
108
108
|
},
|
|
109
109
|
rsaMode: n.rsaMode ?? t.rsaMode,
|
|
110
110
|
signatureType: n.signatureType ?? t.signatureType
|
|
111
|
-
} :
|
|
111
|
+
} : x(t), $ = (t, n) => n ? {
|
|
112
112
|
authSource: n.authSource ?? t.authSource,
|
|
113
113
|
defaultLogin: n.defaultLogin ?? t.defaultLogin,
|
|
114
114
|
defaultPassword: n.defaultPassword ?? t.defaultPassword,
|
|
@@ -125,62 +125,72 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
125
125
|
checkCertificateBinding: n.usbKey?.checkCertificateBinding ?? t.usbKey.checkCertificateBinding,
|
|
126
126
|
usbKeyType: n.usbKey?.usbKeyType ?? t.usbKey.usbKeyType
|
|
127
127
|
}
|
|
128
|
-
} :
|
|
129
|
-
defaults:
|
|
130
|
-
signServer:
|
|
131
|
-
}), X = (t, n) =>
|
|
132
|
-
|
|
133
|
-
...t.defaults,
|
|
134
|
-
...n.defaults
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} : void 0
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
...
|
|
153
|
-
...
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
...
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
128
|
+
} : K(t), V = (t, n) => ({
|
|
129
|
+
defaults: W(t.defaults, n.defaults),
|
|
130
|
+
signServer: $(t.signServer, n.signServer)
|
|
131
|
+
}), X = (t, n) => {
|
|
132
|
+
const e = t.defaults?.bjca || n.defaults?.bjca ? {
|
|
133
|
+
...t.defaults?.bjca,
|
|
134
|
+
...n.defaults?.bjca
|
|
135
|
+
} : void 0, i = t.defaults?.kol || n.defaults?.kol ? {
|
|
136
|
+
...t.defaults?.kol,
|
|
137
|
+
...n.defaults?.kol
|
|
138
|
+
} : void 0, r = t.defaults?.plugin || n.defaults?.plugin ? {
|
|
139
|
+
...t.defaults?.plugin,
|
|
140
|
+
...n.defaults?.plugin
|
|
141
|
+
} : void 0, a = t.signServer?.kol || n.signServer?.kol ? {
|
|
142
|
+
...t.signServer?.kol,
|
|
143
|
+
...n.signServer?.kol
|
|
144
|
+
} : void 0, s = t.signServer?.usbKey || n.signServer?.usbKey ? {
|
|
145
|
+
...t.signServer?.usbKey,
|
|
146
|
+
...n.signServer?.usbKey
|
|
147
|
+
} : void 0;
|
|
148
|
+
return {
|
|
149
|
+
defaults: t.defaults || n.defaults ? {
|
|
150
|
+
...t.defaults,
|
|
151
|
+
...n.defaults,
|
|
152
|
+
...e ? { bjca: e } : {},
|
|
153
|
+
...i ? { kol: i } : {},
|
|
154
|
+
...r ? { plugin: r } : {}
|
|
155
|
+
} : void 0,
|
|
156
|
+
signServer: t.signServer || n.signServer ? {
|
|
157
|
+
...t.signServer,
|
|
158
|
+
...n.signServer,
|
|
159
|
+
...a ? { kol: a } : {},
|
|
160
|
+
...s ? { usbKey: s } : {}
|
|
161
|
+
} : void 0
|
|
162
|
+
};
|
|
163
|
+
}, J = () => globalThis, p = () => {
|
|
161
164
|
const t = J();
|
|
162
165
|
return t[k] || (t[k] = {
|
|
163
|
-
current:
|
|
164
|
-
defaults:
|
|
166
|
+
current: g(E),
|
|
167
|
+
defaults: g(E),
|
|
165
168
|
overrides: {}
|
|
166
169
|
}), t[k];
|
|
167
|
-
},
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
}, ct = () => p().current, ht = () => {
|
|
171
|
+
const t = p();
|
|
172
|
+
return {
|
|
173
|
+
current: g(t.current),
|
|
174
|
+
defaults: g(t.defaults),
|
|
175
|
+
overrides: y(t.overrides)
|
|
176
|
+
};
|
|
173
177
|
}, gt = (t) => {
|
|
174
|
-
const n =
|
|
175
|
-
return n.
|
|
178
|
+
const n = p();
|
|
179
|
+
return n.defaults = g(t), n.current = V(n.defaults, n.overrides), n.current;
|
|
176
180
|
}, mt = (t) => {
|
|
177
|
-
const n =
|
|
178
|
-
return
|
|
179
|
-
}, pt = {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
const n = p();
|
|
182
|
+
return n.current = g(t), n.overrides = y(t), n.current;
|
|
183
|
+
}, pt = (t) => {
|
|
184
|
+
const n = p();
|
|
185
|
+
return n.overrides = X(n.overrides, y(t)), n.current = V(n.current, t), n.current;
|
|
186
|
+
}, bt = (t) => {
|
|
187
|
+
const n = p();
|
|
188
|
+
return t && (n.defaults = g(t)), n.overrides = {}, n.current = g(n.defaults), n.current;
|
|
189
|
+
}, St = {
|
|
190
|
+
EDGE_POSITION: U,
|
|
191
|
+
RSA_MODE: B,
|
|
192
|
+
SIGNATURE_TYPE: N
|
|
193
|
+
}, f = (t) => {
|
|
184
194
|
if (t.length !== 0)
|
|
185
195
|
return t.length === 1 ? t[0] : t;
|
|
186
196
|
}, d = (t, n, e) => new Proxy(
|
|
@@ -201,16 +211,16 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
201
211
|
return a.state?.(e.state.snapshot(), s);
|
|
202
212
|
const o = a.adapterMethod ?? r;
|
|
203
213
|
if (a.kind === "query")
|
|
204
|
-
return e.bridge.request(t, o,
|
|
214
|
+
return e.bridge.request(t, o, f(s));
|
|
205
215
|
if (a.kind === "callbackQuery") {
|
|
206
216
|
const c = s.find((h) => typeof h == "function"), l = s.filter((h) => typeof h != "function");
|
|
207
|
-
e.bridge.request(t, o,
|
|
208
|
-
const
|
|
209
|
-
c?.(...
|
|
217
|
+
e.bridge.request(t, o, f(l)).then((h) => {
|
|
218
|
+
const j = a.mapCallbackResult?.(h) ?? [h];
|
|
219
|
+
c?.(...j);
|
|
210
220
|
}).catch(e.onAsyncError);
|
|
211
221
|
return;
|
|
212
222
|
}
|
|
213
|
-
const u = e.bridge.request(t, o,
|
|
223
|
+
const u = e.bridge.request(t, o, f(s)).catch((c) => {
|
|
214
224
|
e.onAsyncError(c);
|
|
215
225
|
});
|
|
216
226
|
if (a.returnsResult)
|
|
@@ -221,7 +231,7 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
221
231
|
};
|
|
222
232
|
}
|
|
223
233
|
}
|
|
224
|
-
), Z = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && "id" in t,
|
|
234
|
+
), Z = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && "id" in t, P = (t) => t.annotations?.filter(Z).map((n) => ({ ...n })) ?? [], ee = (t) => {
|
|
225
235
|
switch (t) {
|
|
226
236
|
case "select":
|
|
227
237
|
case "pen":
|
|
@@ -259,11 +269,11 @@ const F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGIT
|
|
|
259
269
|
},
|
|
260
270
|
getAnnotations: {
|
|
261
271
|
kind: "stateGetter",
|
|
262
|
-
state: (t) =>
|
|
272
|
+
state: (t) => P(t)
|
|
263
273
|
},
|
|
264
274
|
getAnnotationsCount: {
|
|
265
275
|
kind: "stateGetter",
|
|
266
|
-
state: (t) =>
|
|
276
|
+
state: (t) => P(t).length
|
|
267
277
|
},
|
|
268
278
|
openAnnotationView: { kind: "command" },
|
|
269
279
|
closeAnnotationView: { kind: "command" },
|
|
@@ -300,7 +310,7 @@ class re {
|
|
|
300
310
|
this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = d("crypto", ie, n);
|
|
301
311
|
}
|
|
302
312
|
}
|
|
303
|
-
const
|
|
313
|
+
const C = (t) => t.digitalSignatures ? [...t.digitalSignatures] : [], ae = {
|
|
304
314
|
addDigitalSignatureRetrieveCallback: {
|
|
305
315
|
kind: "callbackRegister",
|
|
306
316
|
callback: (t, n) => {
|
|
@@ -337,11 +347,11 @@ const P = (t) => t.digitalSignatures ? [...t.digitalSignatures] : [], ae = {
|
|
|
337
347
|
listDigitalSignatures: { kind: "callbackQuery" },
|
|
338
348
|
getDigitalSignatures: {
|
|
339
349
|
kind: "stateGetter",
|
|
340
|
-
state: (t) =>
|
|
350
|
+
state: (t) => C(t)
|
|
341
351
|
},
|
|
342
352
|
getDigitalSignaturesCount: {
|
|
343
353
|
kind: "stateGetter",
|
|
344
|
-
state: (t) =>
|
|
354
|
+
state: (t) => C(t).length
|
|
345
355
|
},
|
|
346
356
|
enableDigitalSignatureInfoView: { kind: "command" },
|
|
347
357
|
enableDigitalSignatureRevocation: { kind: "command" }
|
|
@@ -355,7 +365,7 @@ class se {
|
|
|
355
365
|
);
|
|
356
366
|
}
|
|
357
367
|
}
|
|
358
|
-
const oe = "rhc-office.editor-adapter", de = 1, ue = "__RHC_OFFICE_EDITOR_ADAPTER__",
|
|
368
|
+
const oe = "rhc-office.editor-adapter", de = 1, ue = "__RHC_OFFICE_EDITOR_ADAPTER__", D = "rhcOfficeAdapterReady", A = "rhcOfficeAdapterEvent", G = "data-rhc-office-reader-id", le = {
|
|
359
369
|
addDocumentOpenedCallback: {
|
|
360
370
|
kind: "callbackRegister",
|
|
361
371
|
callback: (t, n) => {
|
|
@@ -475,7 +485,7 @@ class ke {
|
|
|
475
485
|
);
|
|
476
486
|
}
|
|
477
487
|
}
|
|
478
|
-
const
|
|
488
|
+
const fe = (t) => ({
|
|
479
489
|
addPageChangeCallback: {
|
|
480
490
|
kind: "callbackRegister",
|
|
481
491
|
callback: (n, e) => {
|
|
@@ -525,11 +535,11 @@ const Re = (t) => ({
|
|
|
525
535
|
gotoPreviousPage: { kind: "command" },
|
|
526
536
|
rotatePage: { kind: "command" }
|
|
527
537
|
});
|
|
528
|
-
class
|
|
538
|
+
class Re {
|
|
529
539
|
constructor(n) {
|
|
530
540
|
this.addPageChangeCallback = (e) => this.adapter.addPageChangeCallback(e), this.addPageModeChangeCallback = (e) => this.adapter.addPageModeChangeCallback(e), this.getPageCount = (e) => this.adapter.getPageCount(e), this.getPageIndex = (e) => this.adapter.getPageIndex(e), this.setSinglePageViewMode = () => this.adapter.setSinglePageViewMode(), this.setTwoPagesViewMode = () => this.adapter.setTwoPagesViewMode(), this.setPageScrollVertical = () => this.adapter.setPageScrollVertical(), this.setPageScrollHorizontal = () => this.adapter.setPageScrollHorizontal(), this.setPageCursorPanDrag = () => this.adapter.setPageCursorPanDrag(), this.setPageCursorTextSelect = () => this.adapter.setPageCursorTextSelect(), this.rotateCW = () => this.adapter.rotateCW(), this.rotateCCW = () => this.adapter.rotateCCW(), this.autoFitPage = () => this.adapter.autoFitPage(), this.fitPageSize = () => this.adapter.fitPageSize(), this.fitPageWidth = () => this.adapter.fitPageWidth(), this.fitPageHeight = () => this.adapter.fitPageHeight(), this.increasePageScale = () => this.adapter.increasePageScale(), this.decreasePageScale = () => this.adapter.decreasePageScale(), this.setPageScale = (e) => this.adapter.setPageScale(e), this.setPageBlendColor = (e, i, r, a) => this.adapter.setPageBlendColor(e, i, r, a), this.gotoPage = (e, i, r) => this.adapter.gotoPage(e, i, r), this.gotoNextPage = () => this.adapter.gotoNextPage(), this.gotoPreviousPage = () => this.adapter.gotoPreviousPage(), this.rotatePage = (e) => this.adapter.rotatePage(e), this.adapter = d(
|
|
531
541
|
"page",
|
|
532
|
-
|
|
542
|
+
fe(n),
|
|
533
543
|
n
|
|
534
544
|
);
|
|
535
545
|
}
|
|
@@ -560,19 +570,19 @@ class ve {
|
|
|
560
570
|
);
|
|
561
571
|
}
|
|
562
572
|
}
|
|
563
|
-
const ye = /\s*,\s*/, Ee = /\s*-\s*/,
|
|
573
|
+
const ye = /\s*,\s*/, Ee = /\s*-\s*/, R = (t) => {
|
|
564
574
|
const n = Number.parseInt(t.trim(), 10);
|
|
565
575
|
return !Number.isFinite(n) || n <= 0 ? null : n;
|
|
566
576
|
}, Pe = (t) => {
|
|
567
577
|
const n = t.split(Ee);
|
|
568
578
|
if (n.length === 1) {
|
|
569
|
-
const r =
|
|
579
|
+
const r = R(n[0] ?? "");
|
|
570
580
|
return r ? [r] : [];
|
|
571
581
|
}
|
|
572
|
-
const e =
|
|
582
|
+
const e = R(n[0] ?? ""), i = R(n[1] ?? "");
|
|
573
583
|
return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (r, a) => e + a);
|
|
574
584
|
}, Ce = (t) => t ? t.split(ye).flatMap((e) => Pe(e)).filter((e, i, r) => r.indexOf(e) === i) : [];
|
|
575
|
-
class
|
|
585
|
+
class De {
|
|
576
586
|
constructor(n, e, i) {
|
|
577
587
|
this.setFieldName = (r) => {
|
|
578
588
|
this.key = r;
|
|
@@ -583,7 +593,7 @@ class Ae {
|
|
|
583
593
|
}, this.key = n, this.value = e, this.description = i;
|
|
584
594
|
}
|
|
585
595
|
}
|
|
586
|
-
class
|
|
596
|
+
class Ae {
|
|
587
597
|
constructor() {
|
|
588
598
|
this.fields = [], this.keywordTextFixedPositions = void 0, this.keywordOffsetX = 0, this.keywordOffsetY = 0, this.bookmarkOffsetX = 0, this.bookmarkOffsetY = 0, this.printMargin = 0, this.grayscaleSealImage = !1, this.signType = 0, this.sealPosition = 0, this.getSignType = () => this.signType, this.setSignType = (n) => {
|
|
589
599
|
this.signType = n;
|
|
@@ -613,7 +623,7 @@ const Me = {
|
|
|
613
623
|
setSecuritySettings: { kind: "query" },
|
|
614
624
|
openSecuritySettingsDialog: { kind: "command" }
|
|
615
625
|
};
|
|
616
|
-
class
|
|
626
|
+
class Ie {
|
|
617
627
|
constructor(n) {
|
|
618
628
|
this.getSecuritySettings = () => this.adapter.getSecuritySettings(), this.setSecuritySettings = (e) => this.adapter.setSecuritySettings(e), this.isSecuritySettingsLocalEditable = () => this.adapter.isSecuritySettingsLocalEditable(), this.setSecuritySettingsLocalEditable = (e) => this.adapter.setSecuritySettingsLocalEditable(e), this.openSecuritySettingsDialog = () => this.adapter.openSecuritySettingsDialog(), this.adapter = d(
|
|
619
629
|
"security",
|
|
@@ -622,7 +632,7 @@ class we {
|
|
|
622
632
|
);
|
|
623
633
|
}
|
|
624
634
|
}
|
|
625
|
-
const
|
|
635
|
+
const we = {
|
|
626
636
|
setSignServer: { kind: "command" },
|
|
627
637
|
addSignServerAuthCallback: {
|
|
628
638
|
kind: "callbackRegister",
|
|
@@ -646,7 +656,7 @@ class _e {
|
|
|
646
656
|
constructor(n) {
|
|
647
657
|
this.setSignServer = (e) => this.adapter.setSignServer(e), this.addSignServerAuthCallback = (e) => this.adapter.addSignServerAuthCallback(e), this.setSignServerDefaultLogin = (e) => this.adapter.setSignServerDefaultLogin(e), this.setDefaultSignServerLogin = (e) => this.adapter.setDefaultSignServerLogin(e), this.setSignServerDefaultPassword = (e) => this.adapter.setSignServerDefaultPassword(e), this.setDefaultSignServerPassword = (e) => this.adapter.setDefaultSignServerPassword(e), this.loginNTKOSignServer = (e, i, r) => this.adapter.loginNTKOSignServer(e, i, r), this.loginSignServer = (e, i, r, a) => this.adapter.loginSignServer(e, i, r, a), this.signOutSignServer = () => this.adapter.signOutSignServer(), this.isAuthenticatedOnSignServer = () => this.adapter.isAuthenticatedOnSignServer(), this.setSignServerLoginFromUSBKey = (e, i) => this.adapter.setSignServerLoginFromUSBKey(e, i), this.setUserAuthSource = (e) => this.adapter.setUserAuthSource(e), this.adapter = d(
|
|
648
658
|
"signServer",
|
|
649
|
-
|
|
659
|
+
we,
|
|
650
660
|
n
|
|
651
661
|
);
|
|
652
662
|
}
|
|
@@ -738,7 +748,7 @@ class xe {
|
|
|
738
748
|
console.warn(`[RHC Office SDK] ui.${n} is deprecated. Use ui.${e} instead.`);
|
|
739
749
|
}
|
|
740
750
|
}
|
|
741
|
-
const
|
|
751
|
+
const Ke = (t) => {
|
|
742
752
|
if (!t)
|
|
743
753
|
return;
|
|
744
754
|
const n = t.trim().toLowerCase();
|
|
@@ -749,21 +759,21 @@ const Ve = (t) => {
|
|
|
749
759
|
}, q = (t) => {
|
|
750
760
|
const n = new URL(t, globalThis.location?.href ?? "http://localhost/");
|
|
751
761
|
return n.hash = "", n.pathname.endsWith("/") || (n.pathname = `${n.pathname}/`), n.toString();
|
|
752
|
-
},
|
|
762
|
+
}, Ve = (t) => new URL("editors.bootstrap.js", t).toString(), Ge = (t, n) => {
|
|
753
763
|
const e = q(t);
|
|
754
764
|
return {
|
|
755
765
|
...n,
|
|
756
766
|
appUrl: e,
|
|
757
|
-
theme:
|
|
767
|
+
theme: Ke(n.theme)
|
|
758
768
|
};
|
|
759
|
-
},
|
|
769
|
+
}, m = "rhc-office-editor", T = "__RHC_OFFICE_SDK_READER_LOADER__", H = () => {
|
|
760
770
|
const t = globalThis;
|
|
761
771
|
return t[T] || (t[T] = {
|
|
762
772
|
activeAppUrl: null,
|
|
763
773
|
loadPromises: /* @__PURE__ */ new Map()
|
|
764
774
|
}), t[T];
|
|
765
775
|
}, qe = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
|
|
766
|
-
class
|
|
776
|
+
class M extends Error {
|
|
767
777
|
constructor(n) {
|
|
768
778
|
super(`Failed to load reader bootstrap script: ${n}`), this.name = "ReaderScriptLoadError";
|
|
769
779
|
}
|
|
@@ -771,7 +781,7 @@ class D extends Error {
|
|
|
771
781
|
class He extends Error {
|
|
772
782
|
constructor(n, e) {
|
|
773
783
|
super(
|
|
774
|
-
`Reader Web Component "${
|
|
784
|
+
`Reader Web Component "${m}" is already bound to ${n} and cannot be reloaded from ${e}.`
|
|
775
785
|
), this.name = "ReaderSourceConflictError";
|
|
776
786
|
}
|
|
777
787
|
}
|
|
@@ -785,29 +795,29 @@ const z = (t) => {
|
|
|
785
795
|
const e = n.loadPromises.get(t);
|
|
786
796
|
if (e)
|
|
787
797
|
return e;
|
|
788
|
-
if (globalThis.customElements?.get(
|
|
798
|
+
if (globalThis.customElements?.get(m)) {
|
|
789
799
|
n.activeAppUrl = t;
|
|
790
800
|
const s = Promise.resolve();
|
|
791
801
|
return n.loadPromises.set(t, s), s;
|
|
792
802
|
}
|
|
793
|
-
const i =
|
|
803
|
+
const i = Ve(t), r = qe(i);
|
|
794
804
|
n.activeAppUrl = t;
|
|
795
805
|
const a = new Promise((s, o) => {
|
|
796
806
|
const u = (h) => {
|
|
797
|
-
h?.remove(), o(new
|
|
807
|
+
h?.remove(), o(new M(i));
|
|
798
808
|
}, c = () => {
|
|
799
|
-
globalThis.customElements.whenDefined(
|
|
809
|
+
globalThis.customElements.whenDefined(m).then(() => {
|
|
800
810
|
s();
|
|
801
811
|
}).catch(o);
|
|
802
812
|
};
|
|
803
813
|
if (r) {
|
|
804
|
-
if (globalThis.customElements?.get(
|
|
814
|
+
if (globalThis.customElements?.get(m)) {
|
|
805
815
|
s();
|
|
806
816
|
return;
|
|
807
817
|
}
|
|
808
818
|
r.addEventListener(
|
|
809
819
|
"error",
|
|
810
|
-
() => o(new
|
|
820
|
+
() => o(new M(i)),
|
|
811
821
|
{
|
|
812
822
|
once: !0
|
|
813
823
|
}
|
|
@@ -817,21 +827,21 @@ const z = (t) => {
|
|
|
817
827
|
const l = document.createElement("script");
|
|
818
828
|
l.src = i, l.async = !0, l.dataset.rhcOfficeSdkReader = t, l.addEventListener("load", c, { once: !0 }), l.addEventListener("error", () => u(l), { once: !0 }), document.head.appendChild(l);
|
|
819
829
|
}).catch((s) => {
|
|
820
|
-
throw n.loadPromises.delete(t), !globalThis.customElements?.get(
|
|
830
|
+
throw n.loadPromises.delete(t), !globalThis.customElements?.get(m) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
|
|
821
831
|
});
|
|
822
832
|
return n.loadPromises.set(t, a), a;
|
|
823
|
-
}, Qe = 5e3,
|
|
833
|
+
}, Qe = 5e3, je = 5e3, Ye = () => {
|
|
824
834
|
const t = globalThis.crypto;
|
|
825
835
|
return typeof t?.randomUUID == "function" ? t.randomUUID() : `adapter-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
826
|
-
},
|
|
827
|
-
class
|
|
836
|
+
}, b = () => globalThis[ue];
|
|
837
|
+
class We extends Error {
|
|
828
838
|
constructor(n, e, i) {
|
|
829
839
|
super(e), this.name = "ReaderBridgeError", this.code = n, this.details = i;
|
|
830
840
|
}
|
|
831
841
|
}
|
|
832
|
-
class
|
|
842
|
+
class $e {
|
|
833
843
|
constructor(n) {
|
|
834
|
-
this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ??
|
|
844
|
+
this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? je, this.requestTimeoutMs = n?.requestTimeoutMs ?? Qe;
|
|
835
845
|
}
|
|
836
846
|
configureTimeouts(n) {
|
|
837
847
|
this.readyTimeoutMs = n?.readyTimeoutMs ?? this.readyTimeoutMs, this.requestTimeoutMs = n?.requestTimeoutMs ?? this.requestTimeoutMs;
|
|
@@ -846,7 +856,7 @@ class je {
|
|
|
846
856
|
const a = await this.requestRaw(n, e, i, r);
|
|
847
857
|
if (a.ok)
|
|
848
858
|
return a.result;
|
|
849
|
-
throw new
|
|
859
|
+
throw new We(
|
|
850
860
|
a.error.code,
|
|
851
861
|
a.error.message,
|
|
852
862
|
a.error.details
|
|
@@ -875,7 +885,7 @@ class je {
|
|
|
875
885
|
const s = {
|
|
876
886
|
protocol: oe,
|
|
877
887
|
version: de,
|
|
878
|
-
requestId:
|
|
888
|
+
requestId: Ye(),
|
|
879
889
|
readerId: this.readerId,
|
|
880
890
|
tool: n,
|
|
881
891
|
method: e,
|
|
@@ -888,25 +898,25 @@ class je {
|
|
|
888
898
|
);
|
|
889
899
|
}
|
|
890
900
|
getCapabilities() {
|
|
891
|
-
return this.readerId ?
|
|
901
|
+
return this.readerId ? b()?.getCapabilities(this.readerId) ?? null : null;
|
|
892
902
|
}
|
|
893
903
|
async waitForReady(n) {
|
|
894
904
|
return this.readerId ? !!await this.waitForAdapter(this.readerId, n?.timeoutMs) : !1;
|
|
895
905
|
}
|
|
896
906
|
async waitForAdapter(n, e = this.readyTimeoutMs) {
|
|
897
|
-
const i =
|
|
907
|
+
const i = b();
|
|
898
908
|
return i?.getCapabilities(n) ? i : new Promise((r) => {
|
|
899
909
|
let a;
|
|
900
910
|
const s = () => {
|
|
901
|
-
a && clearTimeout(a), globalThis.removeEventListener(
|
|
911
|
+
a && clearTimeout(a), globalThis.removeEventListener(D, o);
|
|
902
912
|
}, o = (u) => {
|
|
903
913
|
if ((u instanceof CustomEvent ? u.detail : void 0)?.readerId !== n)
|
|
904
914
|
return;
|
|
905
|
-
const l =
|
|
915
|
+
const l = b();
|
|
906
916
|
s(), r(l ?? null);
|
|
907
917
|
};
|
|
908
|
-
globalThis.addEventListener(
|
|
909
|
-
s(), r(
|
|
918
|
+
globalThis.addEventListener(D, o), a = setTimeout(() => {
|
|
919
|
+
s(), r(b()?.getCapabilities(n) ? b() : null);
|
|
910
920
|
}, e);
|
|
911
921
|
});
|
|
912
922
|
}
|
|
@@ -937,7 +947,7 @@ class je {
|
|
|
937
947
|
});
|
|
938
948
|
}
|
|
939
949
|
}
|
|
940
|
-
const
|
|
950
|
+
const I = {
|
|
941
951
|
annotationEnabled: !1,
|
|
942
952
|
documentModified: !1,
|
|
943
953
|
documentOpened: !1,
|
|
@@ -948,10 +958,10 @@ const M = {
|
|
|
948
958
|
};
|
|
949
959
|
class Xe {
|
|
950
960
|
constructor() {
|
|
951
|
-
this.state = { ...
|
|
961
|
+
this.state = { ...I };
|
|
952
962
|
}
|
|
953
963
|
reset() {
|
|
954
|
-
this.state = { ...
|
|
964
|
+
this.state = { ...I };
|
|
955
965
|
}
|
|
956
966
|
update(n) {
|
|
957
967
|
n && (this.state = {
|
|
@@ -1072,11 +1082,22 @@ const S = "__RHC_OFFICE_READER_RUNTIME__", tt = "__rhcOfficeReaderRuntimeConfig"
|
|
|
1072
1082
|
"documentLoaded",
|
|
1073
1083
|
"documentStateChange",
|
|
1074
1084
|
"documentError"
|
|
1075
|
-
], it = "readerReady", rt = "readerUnload", v = "readerError", at = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
1085
|
+
], it = "readerReady", rt = "readerUnload", v = "readerError", at = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, _ = (t, n) => ({
|
|
1076
1086
|
appUrl: n?.appUrl ?? null,
|
|
1077
1087
|
configuration: n,
|
|
1078
1088
|
element: t
|
|
1079
|
-
}), st = (t) => {
|
|
1089
|
+
}), st = (t, n) => {
|
|
1090
|
+
if (!t)
|
|
1091
|
+
return;
|
|
1092
|
+
const e = typeof t == "string" ? t.trim() : t.userName.trim();
|
|
1093
|
+
if (!e)
|
|
1094
|
+
return;
|
|
1095
|
+
const i = n == null ? "" : String(n).trim(), r = typeof t == "string" || t.userId === void 0 || t.userId === null ? "" : String(t.userId).trim(), a = i || r;
|
|
1096
|
+
return {
|
|
1097
|
+
sessionUser: e,
|
|
1098
|
+
...a ? { sessionUserId: a } : {}
|
|
1099
|
+
};
|
|
1100
|
+
}, ot = (t) => {
|
|
1080
1101
|
if (typeof t == "string") {
|
|
1081
1102
|
const n = document.getElementById(t);
|
|
1082
1103
|
if (!n)
|
|
@@ -1088,52 +1109,52 @@ const S = "__RHC_OFFICE_READER_RUNTIME__", tt = "__rhcOfficeReaderRuntimeConfig"
|
|
|
1088
1109
|
if (!(t instanceof HTMLDivElement))
|
|
1089
1110
|
throw new Error("Reader container must be a div element.");
|
|
1090
1111
|
return t;
|
|
1091
|
-
},
|
|
1112
|
+
}, dt = () => {
|
|
1092
1113
|
const t = typeof globalThis.matchMedia == "function";
|
|
1093
1114
|
return (t ? globalThis.matchMedia("(prefers-contrast: more)").matches : !1) ? "high-contrast" : (t ? globalThis.matchMedia("(prefers-color-scheme: dark)").matches : !1) ? "dark" : "light";
|
|
1094
|
-
},
|
|
1115
|
+
}, O = (t, n) => {
|
|
1095
1116
|
const e = t;
|
|
1096
1117
|
if (typeof e.addEventListener == "function") {
|
|
1097
1118
|
e.addEventListener("change", n);
|
|
1098
1119
|
return;
|
|
1099
1120
|
}
|
|
1100
1121
|
typeof e.addListener == "function" && e.addListener(n);
|
|
1101
|
-
},
|
|
1122
|
+
}, L = (t, n) => {
|
|
1102
1123
|
const e = t;
|
|
1103
1124
|
if (typeof e.removeEventListener == "function") {
|
|
1104
1125
|
e.removeEventListener("change", n);
|
|
1105
1126
|
return;
|
|
1106
1127
|
}
|
|
1107
1128
|
typeof e.removeListener == "function" && e.removeListener(n);
|
|
1108
|
-
},
|
|
1129
|
+
}, ut = (t) => {
|
|
1109
1130
|
t.style.display || (t.style.display = "block"), t.style.width || (t.style.width = "100%"), t.style.height || (t.style.height = "100%");
|
|
1110
|
-
},
|
|
1131
|
+
}, F = (t, n) => {
|
|
1111
1132
|
const e = n;
|
|
1112
1133
|
if (!e)
|
|
1113
1134
|
return t.removeAttribute("theme"), null;
|
|
1114
1135
|
if (e !== "auto")
|
|
1115
1136
|
return t.setAttribute("theme", e), null;
|
|
1116
1137
|
const i = () => {
|
|
1117
|
-
t.setAttribute("theme",
|
|
1138
|
+
t.setAttribute("theme", dt());
|
|
1118
1139
|
};
|
|
1119
1140
|
if (i(), typeof globalThis.matchMedia != "function")
|
|
1120
1141
|
return null;
|
|
1121
1142
|
const r = globalThis.matchMedia("(prefers-color-scheme: dark)"), a = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
|
|
1122
1143
|
i();
|
|
1123
1144
|
};
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1145
|
+
return O(r, s), O(a, s), () => {
|
|
1146
|
+
L(r, s), L(a, s);
|
|
1126
1147
|
};
|
|
1127
1148
|
};
|
|
1128
|
-
class
|
|
1149
|
+
class lt {
|
|
1129
1150
|
constructor(n) {
|
|
1130
|
-
this.bridge = new
|
|
1151
|
+
this.bridge = new $e(), this.callbacks = new et(), this.readerState = new Xe(), this.bridgeToolContext = {
|
|
1131
1152
|
bridge: this.bridge,
|
|
1132
1153
|
callbacks: this.callbacks,
|
|
1133
1154
|
debug: () => this.debugEnabled,
|
|
1134
1155
|
onAsyncError: (e) => this.reportAdapterError(e),
|
|
1135
1156
|
state: this.readerState
|
|
1136
|
-
}, this.documentTool = new ce(this.bridgeToolContext), this.uiTool = new xe(this.bridgeToolContext), this.pageTool = new
|
|
1157
|
+
}, this.documentTool = new ce(this.bridgeToolContext), this.uiTool = new xe(this.bridgeToolContext), this.pageTool = new Re(this.bridgeToolContext), this.pageArrangeTool = new ke(this.bridgeToolContext), this.findTool = new ge(this.bridgeToolContext), this.signServerTool = new _e(this.bridgeToolContext), this.digitalSignTool = new se(this.bridgeToolContext), this.symbologyTool = new Le(this.bridgeToolContext), this.annotationTool = new ne(this.bridgeToolContext), this.templateSignTool = new Ue(this.bridgeToolContext), this.pdfFormFiller = new ve(this.bridgeToolContext), this.networkingTool = new pe(this.bridgeToolContext), this.cryptoTool = new re(this.bridgeToolContext), this.securityTool = new Ie(this.bridgeToolContext), this.readyCallbacks = [], this.unloadCallbacks = [], this.debugEnabled = !1, this.isReady = !1, this.removed = !1, this.mountToken = 0, this.hostContainer = null, this.readerElement = null, this.readerId = null, this.normalizedConfiguration = null, this.runtimeRestoreState = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
|
|
1137
1158
|
this.debugEnabled = e;
|
|
1138
1159
|
}, this.changeLanguage = (e) => {
|
|
1139
1160
|
this.readerElement && this.readerElement.setAttribute("language", e);
|
|
@@ -1141,21 +1162,11 @@ class ut {
|
|
|
1141
1162
|
this.themeCleanup?.(), this.themeCleanup = null, this.normalizedConfiguration = this.normalizedConfiguration ? {
|
|
1142
1163
|
...this.normalizedConfiguration,
|
|
1143
1164
|
theme: e
|
|
1144
|
-
} : null, this.readerElement && (this.themeCleanup =
|
|
1165
|
+
} : null, this.readerElement && (this.themeCleanup = F(this.readerElement, e));
|
|
1145
1166
|
}, this.setSessionUser = (e) => {
|
|
1146
1167
|
this.sessionUser = e;
|
|
1147
1168
|
}, this.setSessionUserId = (e) => {
|
|
1148
|
-
|
|
1149
|
-
this.sessionUser = {
|
|
1150
|
-
userName: typeof this.sessionUser == "string" ? this.sessionUser : "",
|
|
1151
|
-
userId: e
|
|
1152
|
-
};
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
this.sessionUser = {
|
|
1156
|
-
...this.sessionUser,
|
|
1157
|
-
userId: e
|
|
1158
|
-
};
|
|
1169
|
+
this.sessionUserId = e;
|
|
1159
1170
|
}, this.setSessionData = (e) => {
|
|
1160
1171
|
this.sessionData = e;
|
|
1161
1172
|
}, this.isReaderReady = () => this.isReady, this.isReaderDestroyed = () => this.removed && !this.isReady, this.addReaderReadyCallback = (e) => {
|
|
@@ -1165,7 +1176,7 @@ class ut {
|
|
|
1165
1176
|
}, this.setReaderEventListener = (e) => {
|
|
1166
1177
|
this.readerEventListener = e;
|
|
1167
1178
|
}, this.embedReader = (e, i, r) => {
|
|
1168
|
-
const a =
|
|
1179
|
+
const a = ot(e), s = q(i);
|
|
1169
1180
|
z(s);
|
|
1170
1181
|
const o = Ge(s, r), u = this.mountToken + 1;
|
|
1171
1182
|
this.removeReader(), this.mountToken = u, this.removed = !1, this.hostContainer = a, this.normalizedConfiguration = o, this.mountReader(a, o, u);
|
|
@@ -1173,16 +1184,19 @@ class ut {
|
|
|
1173
1184
|
const e = !!(this.readerElement || this.hostContainer);
|
|
1174
1185
|
if (this.mountToken += 1, this.cleanupNativeEventForwarders(), this.cleanupThemeBinding(), this.restoreReaderRuntimeConfig(), this.readerElement?.parentNode && this.readerElement.parentNode.removeChild(this.readerElement), this.readerElement = null, this.readerId = null, this.bridge.setReaderId(null), this.readerState.reset(), this.hostContainer = null, this.normalizedConfiguration = null, this.isReady = !1, this.removed = !0, !e)
|
|
1175
1186
|
return;
|
|
1176
|
-
const i =
|
|
1187
|
+
const i = _(null, null);
|
|
1177
1188
|
this.emitReaderEvent(rt, i), this.unloadCallbacks.forEach((r) => r());
|
|
1178
|
-
}, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getPageArrangeTool = () => this.pageArrangeTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.getSecurityTool = () => this.securityTool, this.createDigitalSignOptions = () => new
|
|
1189
|
+
}, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getPageArrangeTool = () => this.pageArrangeTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.getSecurityTool = () => this.securityTool, this.createDigitalSignOptions = () => new Ae(), this.createKVField = (e, i, r) => new De(e, i, r), this.mountReader = async (e, i, r) => {
|
|
1179
1190
|
try {
|
|
1180
1191
|
if (await ze(i.appUrl), this.mountToken !== r)
|
|
1181
1192
|
return;
|
|
1182
|
-
const a = document.createElement(
|
|
1183
|
-
a.setAttribute(G, s), this.readerId = s, this.bridge.setReaderId(s),
|
|
1193
|
+
const a = document.createElement(m), s = at();
|
|
1194
|
+
a.setAttribute(G, s), this.readerId = s, this.bridge.setReaderId(s), ut(a), this.applyReaderRuntimeConfig(a, i);
|
|
1184
1195
|
const o = i.compactViewer === !0 && i.keepPCMenu !== !0;
|
|
1185
|
-
if (a.toggleAttribute("data-sdk-compact-mode", o), a.
|
|
1196
|
+
if (a.toggleAttribute("data-sdk-compact-mode", o), a.toggleAttribute("data-sdk-ribbon-hidden", i.ribbonMenu === !1), a.toggleAttribute(
|
|
1197
|
+
"data-sdk-ribbon-title-hidden",
|
|
1198
|
+
i.ribbonTitle === !1
|
|
1199
|
+
), a.setAttribute("language", i.language ?? "zh_CN"), this.themeCleanup = F(a, i.theme), this.bindNativeReaderEvents(a), e.replaceChildren(a), this.readerElement = a, await Promise.resolve(), this.mountToken !== r)
|
|
1186
1200
|
return;
|
|
1187
1201
|
const u = await this.bridge.waitForReady();
|
|
1188
1202
|
if (this.mountToken !== r)
|
|
@@ -1190,7 +1204,7 @@ class ut {
|
|
|
1190
1204
|
if (!u)
|
|
1191
1205
|
throw new Error("Editor adapter is not available.");
|
|
1192
1206
|
this.isReady = !0;
|
|
1193
|
-
const c =
|
|
1207
|
+
const c = _(a, i);
|
|
1194
1208
|
this.emitReaderEvent(it, c), this.readyCallbacks.forEach((l) => l());
|
|
1195
1209
|
} catch (a) {
|
|
1196
1210
|
if (this.mountToken !== r)
|
|
@@ -1234,18 +1248,19 @@ class ut {
|
|
|
1234
1248
|
}
|
|
1235
1249
|
applyReaderRuntimeConfig(n, e) {
|
|
1236
1250
|
this.restoreReaderRuntimeConfig();
|
|
1237
|
-
const i = {
|
|
1251
|
+
const i = st(this.sessionUser, this.sessionUserId), r = {
|
|
1238
1252
|
hostKind: "server",
|
|
1239
1253
|
server: {
|
|
1240
1254
|
baseUrl: e.appUrl
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1255
|
+
},
|
|
1256
|
+
...i ? { identity: i } : {}
|
|
1257
|
+
}, a = n;
|
|
1258
|
+
a[tt] = r;
|
|
1259
|
+
const s = globalThis, o = s[S];
|
|
1245
1260
|
this.runtimeRestoreState = {
|
|
1246
|
-
hadPreviousRuntime:
|
|
1247
|
-
...
|
|
1248
|
-
},
|
|
1261
|
+
hadPreviousRuntime: o !== void 0,
|
|
1262
|
+
...o !== void 0 ? { previousRuntime: o } : {}
|
|
1263
|
+
}, s[S] = r;
|
|
1249
1264
|
}
|
|
1250
1265
|
restoreReaderRuntimeConfig() {
|
|
1251
1266
|
if (!this.runtimeRestoreState)
|
|
@@ -1254,32 +1269,33 @@ class ut {
|
|
|
1254
1269
|
this.runtimeRestoreState.hadPreviousRuntime ? n[S] = this.runtimeRestoreState.previousRuntime : Reflect.deleteProperty(n, S), this.runtimeRestoreState = null;
|
|
1255
1270
|
}
|
|
1256
1271
|
}
|
|
1257
|
-
const
|
|
1272
|
+
const kt = (t) => new lt(t);
|
|
1258
1273
|
export {
|
|
1259
1274
|
ne as AnnotationToolImpl,
|
|
1260
1275
|
re as CryptoToolImpl,
|
|
1261
|
-
|
|
1262
|
-
|
|
1276
|
+
St as DIGITAL_SIGN_DEFAULTS,
|
|
1277
|
+
Ae as DigitalSignOptions,
|
|
1263
1278
|
se as DigitalSignToolImpl,
|
|
1264
|
-
|
|
1279
|
+
lt as DocumentSDK,
|
|
1265
1280
|
ce as DocumentToolImpl,
|
|
1266
1281
|
ge as FindToolImpl,
|
|
1267
|
-
|
|
1282
|
+
De as KVField,
|
|
1268
1283
|
pe as NetworkingToolImpl,
|
|
1269
1284
|
ke as PageArrangeToolImpl,
|
|
1270
|
-
|
|
1285
|
+
Re as PageToolImpl,
|
|
1271
1286
|
ve as PdfFormFillerImpl,
|
|
1272
|
-
|
|
1287
|
+
Ie as SecurityToolImpl,
|
|
1273
1288
|
_e as SignServerToolImpl,
|
|
1274
1289
|
Le as SymbologyToolImpl,
|
|
1275
1290
|
Ue as TemplateSignToolImpl,
|
|
1276
1291
|
xe as UIToolImpl,
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
gt as
|
|
1282
|
-
|
|
1283
|
-
|
|
1292
|
+
Y as WatermarkDisplay,
|
|
1293
|
+
kt as createNewDocumentSdk,
|
|
1294
|
+
ct as getDigitalSignEnvironment,
|
|
1295
|
+
ht as getDigitalSignEnvironmentSource,
|
|
1296
|
+
gt as initializeDigitalSignEnvironment,
|
|
1297
|
+
pt as patchDigitalSignEnvironment,
|
|
1298
|
+
bt as resetDigitalSignEnvironment,
|
|
1299
|
+
mt as setDigitalSignEnvironment
|
|
1284
1300
|
};
|
|
1285
1301
|
//# sourceMappingURL=index.js.map
|