@sync-in/server 1.4.0 → 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.
- package/CHANGELOG.md +26 -0
- package/README.md +2 -1
- package/package.json +5 -5
- package/server/applications/comments/comments.controller.spec.js +103 -4
- package/server/applications/comments/comments.controller.spec.js.map +1 -1
- package/server/applications/comments/services/comments-manager.service.spec.js +409 -9
- package/server/applications/comments/services/comments-manager.service.spec.js.map +1 -1
- package/server/applications/files/adapters/files-indexer-mysql.service.spec.js +333 -0
- package/server/applications/files/adapters/files-indexer-mysql.service.spec.js.map +1 -0
- package/server/applications/files/constants/routes.js +6 -1
- package/server/applications/files/constants/routes.js.map +1 -1
- package/server/applications/files/files-only-office.controller.js +11 -0
- package/server/applications/files/files-only-office.controller.js.map +1 -1
- package/server/applications/files/files-only-office.controller.spec.js +97 -3
- package/server/applications/files/files-only-office.controller.spec.js.map +1 -1
- package/server/applications/files/files-tasks.controller.spec.js +91 -1
- package/server/applications/files/files-tasks.controller.spec.js.map +1 -1
- package/server/applications/files/files.controller.spec.js +268 -46
- package/server/applications/files/files.controller.spec.js.map +1 -1
- package/server/applications/files/guards/files-only-office.guard.spec.js +77 -1
- package/server/applications/files/guards/files-only-office.guard.spec.js.map +1 -1
- package/server/applications/files/services/files-only-office-manager.service.js +5 -0
- package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
- package/server/applications/links/links.controller.spec.js +91 -58
- package/server/applications/links/links.controller.spec.js.map +1 -1
- package/server/applications/links/services/links-manager.service.js +4 -6
- package/server/applications/links/services/links-manager.service.js.map +1 -1
- package/server/applications/links/services/links-manager.service.spec.js +378 -14
- package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
- package/server/applications/links/services/links-queries.service.js +1 -1
- package/server/applications/links/services/links-queries.service.js.map +1 -1
- package/server/applications/notifications/notifications.controller.spec.js +56 -1
- package/server/applications/notifications/notifications.controller.spec.js.map +1 -1
- package/server/applications/notifications/services/notifications-manager.service.spec.js +461 -5
- package/server/applications/notifications/services/notifications-manager.service.spec.js.map +1 -1
- package/server/applications/shares/services/shares-manager.service.spec.js +590 -14
- package/server/applications/shares/services/shares-manager.service.spec.js.map +1 -1
- package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js +120 -0
- package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js.map +1 -0
- package/server/applications/sync/services/sync-clients-manager.service.spec.js +548 -8
- package/server/applications/sync/services/sync-clients-manager.service.spec.js.map +1 -1
- package/server/applications/sync/services/sync-manager.service.spec.js +837 -5
- package/server/applications/sync/services/sync-manager.service.spec.js.map +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.spec.js +900 -7
- package/server/applications/sync/services/sync-paths-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.js +22 -24
- package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.spec.js +763 -17
- package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/users-manager.service.js +1 -1
- package/server/applications/users/services/users-manager.service.js.map +1 -1
- package/server/applications/users/services/users-manager.service.spec.js +938 -49
- package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
- package/server/applications/webdav/decorators/if-header.decorator.js +4 -1
- package/server/applications/webdav/decorators/if-header.decorator.js.map +1 -1
- package/server/applications/webdav/filters/webdav.filter.spec.js +77 -0
- package/server/applications/webdav/filters/webdav.filter.spec.js.map +1 -0
- package/server/applications/webdav/guards/webdav-protocol.guard.js +3 -7
- package/server/applications/webdav/guards/webdav-protocol.guard.js.map +1 -1
- package/server/applications/webdav/guards/webdav-protocol.guard.spec.js +580 -0
- package/server/applications/webdav/guards/webdav-protocol.guard.spec.js.map +1 -0
- package/server/applications/webdav/services/webdav-methods.service.spec.js +1582 -3
- package/server/applications/webdav/services/webdav-methods.service.spec.js.map +1 -1
- package/server/applications/webdav/services/webdav-spaces.service.spec.js +390 -2
- package/server/applications/webdav/services/webdav-spaces.service.spec.js.map +1 -1
- package/server/applications/webdav/webdav.controller.js +2 -2
- package/server/applications/webdav/webdav.controller.js.map +1 -1
- package/server/authentication/guards/auth-basic.guard.js.map +1 -1
- package/server/authentication/guards/auth-digest.guard.js +1 -2
- package/server/authentication/guards/auth-digest.guard.js.map +1 -1
- package/server/authentication/guards/auth-local.guard.js.map +1 -1
- package/server/infrastructure/context/interceptors/context.interceptor.spec.js +135 -0
- package/server/infrastructure/context/interceptors/context.interceptor.spec.js.map +1 -0
- package/static/3rdpartylicenses.txt +26 -26
- package/static/assets/pdfjs/build/pdf.mjs +1177 -255
- package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
- package/static/assets/pdfjs/build/pdf.sandbox.mjs +25 -2
- package/static/assets/pdfjs/build/pdf.sandbox.mjs.map +1 -1
- package/static/assets/pdfjs/build/pdf.worker.mjs +140 -16
- package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
- package/static/assets/pdfjs/version +1 -1
- package/static/assets/pdfjs/web/debugger.css +31 -0
- package/static/assets/pdfjs/web/debugger.mjs +144 -2
- package/static/assets/pdfjs/web/images/comment-editButton.svg +6 -1
- package/static/assets/pdfjs/web/locale/ach/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/af/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/an/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/ast/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/az/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/be/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/bg/viewer.ftl +0 -37
- package/static/assets/pdfjs/web/locale/bn/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/bo/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/br/viewer.ftl +0 -37
- package/static/assets/pdfjs/web/locale/brx/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/bs/viewer.ftl +22 -0
- package/static/assets/pdfjs/web/locale/ca/viewer.ftl +0 -54
- package/static/assets/pdfjs/web/locale/cak/viewer.ftl +0 -54
- package/static/assets/pdfjs/web/locale/ckb/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/cs/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/cy/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/da/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/de/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/el/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +25 -0
- package/static/assets/pdfjs/web/locale/eo/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +0 -6
- package/static/assets/pdfjs/web/locale/et/viewer.ftl +0 -57
- package/static/assets/pdfjs/web/locale/fa/viewer.ftl +0 -37
- package/static/assets/pdfjs/web/locale/ff/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/fi/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/fr/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/ga-IE/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/gd/viewer.ftl +0 -54
- package/static/assets/pdfjs/web/locale/gl/viewer.ftl +8 -0
- package/static/assets/pdfjs/web/locale/gn/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/gu-IN/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/he/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/hi-IN/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/hu/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +0 -49
- package/static/assets/pdfjs/web/locale/hye/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/ia/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/is/viewer.ftl +0 -3
- package/static/assets/pdfjs/web/locale/it/viewer.ftl +31 -0
- package/static/assets/pdfjs/web/locale/ja/viewer.ftl +8 -0
- package/static/assets/pdfjs/web/locale/ka/viewer.ftl +48 -10
- package/static/assets/pdfjs/web/locale/kab/viewer.ftl +5 -0
- package/static/assets/pdfjs/web/locale/kk/viewer.ftl +8 -0
- package/static/assets/pdfjs/web/locale/km/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/kn/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/ko/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/lij/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/lo/viewer.ftl +0 -54
- package/static/assets/pdfjs/web/locale/lt/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/ltg/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/lv/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/meh/viewer.ftl +0 -75
- package/static/assets/pdfjs/web/locale/mk/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/ml/viewer.ftl +0 -3
- package/static/assets/pdfjs/web/locale/mr/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/ms/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/my/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +44 -6
- package/static/assets/pdfjs/web/locale/ne-NP/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/nl/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +45 -1
- package/static/assets/pdfjs/web/locale/oc/viewer.ftl +0 -31
- package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/pl/viewer.ftl +39 -1
- package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/ro/viewer.ftl +355 -1
- package/static/assets/pdfjs/web/locale/ru/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/sat/viewer.ftl +0 -54
- package/static/assets/pdfjs/web/locale/sc/viewer.ftl +0 -38
- package/static/assets/pdfjs/web/locale/scn/viewer.ftl +0 -92
- package/static/assets/pdfjs/web/locale/sco/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/si/viewer.ftl +0 -51
- package/static/assets/pdfjs/web/locale/sk/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/skr/viewer.ftl +0 -27
- package/static/assets/pdfjs/web/locale/sl/viewer.ftl +8 -0
- package/static/assets/pdfjs/web/locale/son/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/sr/viewer.ftl +0 -33
- package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/szl/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/ta/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/te/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/tg/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/tl/viewer.ftl +0 -63
- package/static/assets/pdfjs/web/locale/tr/viewer.ftl +40 -2
- package/static/assets/pdfjs/web/locale/trs/viewer.ftl +0 -72
- package/static/assets/pdfjs/web/locale/ur/viewer.ftl +0 -60
- package/static/assets/pdfjs/web/locale/uz/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/vi/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/wo/viewer.ftl +0 -77
- package/static/assets/pdfjs/web/locale/xh/viewer.ftl +0 -71
- package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +38 -0
- package/static/assets/pdfjs/web/viewer.css +649 -120
- package/static/assets/pdfjs/web/viewer.html +19 -0
- package/static/assets/pdfjs/web/viewer.mjs +489 -38
- package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
- package/static/chunk-22EANI6R.js +1 -0
- package/static/{chunk-N2LYWNTC.js → chunk-2456KVFZ.js} +1 -1
- package/static/{chunk-YCINY2YI.js → chunk-2LVCLKCK.js} +1 -1
- package/static/{chunk-5YKWZT33.js → chunk-2V5S7DWD.js} +1 -1
- package/static/{chunk-3GC2BQZD.js → chunk-44YDXGNZ.js} +1 -1
- package/static/{chunk-W3QXNDI5.js → chunk-4LSJLWYV.js} +1 -1
- package/static/{chunk-T55FAU2O.js → chunk-4UT5VH7R.js} +1 -1
- package/static/{chunk-VMQMD36Z.js → chunk-5GOMMRRE.js} +1 -1
- package/static/{chunk-TXPODW5Q.js → chunk-5J4VRDKB.js} +1 -1
- package/static/{chunk-FQ4AFNGE.js → chunk-6PVKNZ7Q.js} +1 -1
- package/static/{chunk-XE5YHU5J.js → chunk-BIUNUYZ5.js} +1 -1
- package/static/{chunk-X43VWRFP.js → chunk-DFQKHCDR.js} +1 -1
- package/static/{chunk-TDQAEVZN.js → chunk-EE2TDTY4.js} +1 -1
- package/static/{chunk-MOVWEZ7J.js → chunk-ESNDJ5T6.js} +1 -1
- package/static/{chunk-TCFKH6K6.js → chunk-GDKKLLEU.js} +1 -1
- package/static/{chunk-VHYIXL7R.js → chunk-GSR2MCQG.js} +1 -1
- package/static/{chunk-LJIGRUEF.js → chunk-HR7KS5BR.js} +1 -1
- package/static/chunk-HW2H3ISM.js +559 -0
- package/static/{chunk-HZA7R43P.js → chunk-IMB3C547.js} +1 -1
- package/static/{chunk-B2Y2RNFP.js → chunk-J4ALHUDX.js} +1 -1
- package/static/{chunk-PF4K7MVG.js → chunk-KP6LSQTK.js} +1 -1
- package/static/{chunk-C23BPTJZ.js → chunk-LUZCOHFN.js} +1 -1
- package/static/{chunk-GBCYYDCI.js → chunk-MHSCCXVL.js} +1 -1
- package/static/{chunk-PY3BGNJN.js → chunk-OMRQYBXV.js} +1 -1
- package/static/chunk-P7CTJ5BG.js +27 -0
- package/static/{chunk-Y2CDUS4J.js → chunk-P7PX67IR.js} +4 -4
- package/static/{chunk-VMUOUCEI.js → chunk-PPO7DBVO.js} +1 -1
- package/static/{chunk-TTQ37MUV.js → chunk-RSS6GYNE.js} +1 -1
- package/static/{chunk-WWIC7UW3.js → chunk-SLGGINMR.js} +1 -1
- package/static/{chunk-KZQCFEPT.js → chunk-UHD5XD3G.js} +1 -1
- package/static/{chunk-TNW2CGK6.js → chunk-UPYYAJCJ.js} +1 -1
- package/static/{chunk-6F55D74O.js → chunk-VHYPQ3D4.js} +1 -1
- package/static/{chunk-DGVNNICG.js → chunk-YQSDS6BO.js} +1 -1
- package/static/{chunk-MTRNPGS4.js → chunk-ZC5NIT55.js} +1 -1
- package/static/index.html +1 -1
- package/static/main-FYD34UEC.js +7 -0
- package/static/chunk-RSNLYAN6.js +0 -560
- package/static/chunk-WHMS3PJ3.js +0 -24
- package/static/chunk-ZZ3LHYOY.js +0 -1
- package/static/main-7LDKYVXO.js +0 -10
|
@@ -21,9 +21,32 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* pdfjsVersion = 5.4.
|
|
25
|
-
* pdfjsBuild =
|
|
24
|
+
* pdfjsVersion = 5.4.149
|
|
25
|
+
* pdfjsBuild = 9e2e9e209
|
|
26
26
|
*/
|
|
27
|
+
/******/ // The require scope
|
|
28
|
+
/******/ var __webpack_require__ = {};
|
|
29
|
+
/******/
|
|
30
|
+
/************************************************************************/
|
|
31
|
+
/******/ /* webpack/runtime/define property getters */
|
|
32
|
+
/******/ (() => {
|
|
33
|
+
/******/ // define getter functions for harmony exports
|
|
34
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
35
|
+
/******/ for(var key in definition) {
|
|
36
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
37
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
38
|
+
/******/ }
|
|
39
|
+
/******/ }
|
|
40
|
+
/******/ };
|
|
41
|
+
/******/ })();
|
|
42
|
+
/******/
|
|
43
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
44
|
+
/******/ (() => {
|
|
45
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
46
|
+
/******/ })();
|
|
47
|
+
/******/
|
|
48
|
+
/************************************************************************/
|
|
49
|
+
var __webpack_exports__ = {};
|
|
27
50
|
|
|
28
51
|
;// ./web/pdfjs.js
|
|
29
52
|
const {
|
|
@@ -157,7 +180,13 @@ function scrollIntoView(element, spot, scrollMatches = false) {
|
|
|
157
180
|
offsetY += spot.top;
|
|
158
181
|
}
|
|
159
182
|
if (spot.left !== undefined) {
|
|
160
|
-
|
|
183
|
+
if (scrollMatches) {
|
|
184
|
+
const elementWidth = element.getBoundingClientRect().width;
|
|
185
|
+
const padding = MathClamp((parent.clientWidth - elementWidth) / 2, 20, 400);
|
|
186
|
+
offsetX += spot.left - padding;
|
|
187
|
+
} else {
|
|
188
|
+
offsetX += spot.left;
|
|
189
|
+
}
|
|
161
190
|
parent.scrollLeft = offsetX;
|
|
162
191
|
}
|
|
163
192
|
}
|
|
@@ -731,6 +760,10 @@ const defaultOptions = {
|
|
|
731
760
|
value: true,
|
|
732
761
|
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
|
|
733
762
|
},
|
|
763
|
+
enableOptimizedPartialRendering: {
|
|
764
|
+
value: false,
|
|
765
|
+
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
|
|
766
|
+
},
|
|
734
767
|
enablePermissions: {
|
|
735
768
|
value: false,
|
|
736
769
|
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
|
|
@@ -1138,6 +1171,15 @@ class PDFLinkService {
|
|
|
1138
1171
|
pageNumber
|
|
1139
1172
|
});
|
|
1140
1173
|
}
|
|
1174
|
+
goToXY(pageNumber, x, y) {
|
|
1175
|
+
this.pdfViewer.scrollPageIntoView({
|
|
1176
|
+
pageNumber,
|
|
1177
|
+
destArray: [null, {
|
|
1178
|
+
name: "XYZ"
|
|
1179
|
+
}, x, y],
|
|
1180
|
+
ignoreDestinationZoom: true
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1141
1183
|
addLinkAttributes(link, url, newWindow = false) {
|
|
1142
1184
|
if (!url || typeof url !== "string") {
|
|
1143
1185
|
throw new Error('A valid "url" parameter must provided.');
|
|
@@ -1475,6 +1517,7 @@ class BasePreferences {
|
|
|
1475
1517
|
enableGuessAltText: true,
|
|
1476
1518
|
enableHighlightFloatingButton: false,
|
|
1477
1519
|
enableNewAltTextWhenAddingImage: true,
|
|
1520
|
+
enableOptimizedPartialRendering: false,
|
|
1478
1521
|
enablePermissions: false,
|
|
1479
1522
|
enablePrintAutoRotate: true,
|
|
1480
1523
|
enableScripting: true,
|
|
@@ -3101,7 +3144,7 @@ class genericl10n_GenericL10n extends L10n {
|
|
|
3101
3144
|
yield this.#createBundleFallback(lang);
|
|
3102
3145
|
}
|
|
3103
3146
|
static async #createBundleFallback(lang) {
|
|
3104
|
-
const text = "pdfjs-previous-button =\n .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n .title = Zoom\npdfjs-presentation-mode-button =\n .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-tools-button =\n .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n .title = Document Properties\u2026\npdfjs-document-properties-button-label = Document Properties\u2026\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)\npdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing\u2026\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n .title = Page { $page }\npdfjs-thumb-page-canvas =\n .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n .title = Find\n .placeholder = Find in document\u2026\npdfjs-find-previous-button =\n .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n { $total ->\n [one] { $current } of { $total } match\n *[other] { $current } of { $total } matches\n }\npdfjs-find-match-count-limit =\n { $limit ->\n [one] More than { $limit } match\n *[other] More than { $limit } matches\n }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-text-annotation-type =\n .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n .title = Text\npdfjs-editor-color-picker-free-text-input =\n .title = Change text color\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n .title = Draw\npdfjs-editor-color-picker-ink-input =\n .title = Change drawing color\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-highlight-floating-button1 =\n .title = Highlight\n .aria-label = Highlight\npdfjs-highlight-floating-button-label = Highlight\npdfjs-editor-signature-button =\n .title = Add signature\npdfjs-editor-signature-button-label = Add signature\npdfjs-editor-highlight-editor =\n .aria-label = Highlight editor\npdfjs-editor-ink-editor =\n .aria-label = Drawing editor\npdfjs-editor-signature-editor1 =\n .aria-description = Signature editor: { $description }\npdfjs-editor-stamp-editor =\n .aria-label = Image editor\npdfjs-editor-remove-ink-button =\n .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n .title = Remove text\npdfjs-editor-remove-stamp-button =\n .title = Remove image\npdfjs-editor-remove-highlight-button =\n .title = Remove highlight\npdfjs-editor-remove-signature-button =\n .title = Remove signature\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-editor-free-highlight-thickness-input = Thickness\npdfjs-editor-free-highlight-thickness-title =\n .title = Change thickness when highlighting items other than text\npdfjs-editor-add-signature-container =\n .aria-label = Signature controls and saved signatures\npdfjs-editor-signature-add-signature-button =\n .title = Add new signature\npdfjs-editor-signature-add-signature-button-label = Add new signature\npdfjs-editor-add-saved-signature-button =\n .title = Saved signature: { $description }\npdfjs-free-text2 =\n .aria-label = Text Editor\n .default-content = Start typing\u2026\npdfjs-editor-alt-text-button =\n .aria-label = Alt text\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button =\n .aria-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D\npdfjs-editor-resizer-top-left =\n .aria-label = Top left corner \u2014 resize\npdfjs-editor-resizer-top-middle =\n .aria-label = Top middle \u2014 resize\npdfjs-editor-resizer-top-right =\n .aria-label = Top right corner \u2014 resize\npdfjs-editor-resizer-middle-right =\n .aria-label = Middle right \u2014 resize\npdfjs-editor-resizer-bottom-right =\n .aria-label = Bottom right corner \u2014 resize\npdfjs-editor-resizer-bottom-middle =\n .aria-label = Bottom middle \u2014 resize\npdfjs-editor-resizer-bottom-left =\n .aria-label = Bottom left corner \u2014 resize\npdfjs-editor-resizer-middle-left =\n .aria-label = Middle left \u2014 resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n .title = Change color\npdfjs-editor-colorpicker-dropdown =\n .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n .title = Yellow\npdfjs-editor-colorpicker-green =\n .title = Green\npdfjs-editor-colorpicker-blue =\n .title = Blue\npdfjs-editor-colorpicker-pink =\n .title = Pink\npdfjs-editor-colorpicker-red =\n .title = Red\npdfjs-editor-highlight-show-all-button-label = Show all\npdfjs-editor-highlight-show-all-button =\n .title = Show all\npdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)\npdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)\npdfjs-editor-new-alt-text-textarea =\n .placeholder = Write your description here\u2026\npdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.\npdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more\npdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically\npdfjs-editor-new-alt-text-not-now-button = Not now\npdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically\npdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.\npdfjs-editor-new-alt-text-error-close-button = Close\npdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\n .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\npdfjs-editor-new-alt-text-added-button =\n .aria-label = Alt text added\npdfjs-editor-new-alt-text-added-button-label = Alt text added\npdfjs-editor-new-alt-text-missing-button =\n .aria-label = Missing alt text\npdfjs-editor-new-alt-text-missing-button-label = Missing alt text\npdfjs-editor-new-alt-text-to-review-button =\n .aria-label = Review alt text\npdfjs-editor-new-alt-text-to-review-button-label = Review alt text\npdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }\npdfjs-image-alt-text-settings-button =\n .title = Image alt text settings\npdfjs-image-alt-text-settings-button-label = Image alt text settings\npdfjs-editor-alt-text-settings-dialog-label = Image alt text settings\npdfjs-editor-alt-text-settings-automatic-title = Automatic alt text\npdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically\npdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)\npdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.\npdfjs-editor-alt-text-settings-delete-model-button = Delete\npdfjs-editor-alt-text-settings-download-model-button = Download\npdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026\npdfjs-editor-alt-text-settings-editor-title = Alt text editor\npdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image\npdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.\npdfjs-editor-alt-text-settings-close-button = Close\npdfjs-editor-highlight-added-alert = Highlight added\npdfjs-editor-freetext-added-alert = Text added\npdfjs-editor-ink-added-alert = Drawing added\npdfjs-editor-stamp-added-alert = Image added\npdfjs-editor-signature-added-alert = Signature added\npdfjs-editor-undo-bar-message-highlight = Highlight removed\npdfjs-editor-undo-bar-message-freetext = Text removed\npdfjs-editor-undo-bar-message-ink = Drawing removed\npdfjs-editor-undo-bar-message-stamp = Image removed\npdfjs-editor-undo-bar-message-signature = Signature removed\npdfjs-editor-undo-bar-message-multiple =\n { $count ->\n [one] { $count } annotation removed\n *[other] { $count } annotations removed\n }\npdfjs-editor-undo-bar-undo-button =\n .title = Undo\npdfjs-editor-undo-bar-undo-button-label = Undo\npdfjs-editor-undo-bar-close-button =\n .title = Close\npdfjs-editor-undo-bar-close-button-label = Close\npdfjs-editor-add-signature-dialog-label = This modal allows the user to create a signature to add to a PDF document. The user can edit the name (which also serves as the alt text), and optionally save the signature for repeated use.\npdfjs-editor-add-signature-dialog-title = Add a signature\npdfjs-editor-add-signature-type-button = Type\n .title = Type\npdfjs-editor-add-signature-draw-button = Draw\n .title = Draw\npdfjs-editor-add-signature-image-button = Image\n .title = Image\npdfjs-editor-add-signature-type-input =\n .aria-label = Type your signature\n .placeholder = Type your signature\npdfjs-editor-add-signature-draw-placeholder = Draw your signature\npdfjs-editor-add-signature-draw-thickness-range-label = Thickness\npdfjs-editor-add-signature-draw-thickness-range =\n .title = Drawing thickness: { $thickness }\npdfjs-editor-add-signature-image-placeholder = Drag a file here to upload\npdfjs-editor-add-signature-image-browse-link =\n { PLATFORM() ->\n [macos] Or choose image files\n *[other] Or browse image files\n }\npdfjs-editor-add-signature-description-label = Description (alt text)\npdfjs-editor-add-signature-description-input =\n .title = Description (alt text)\npdfjs-editor-add-signature-description-default-when-drawing = Signature\npdfjs-editor-add-signature-clear-button-label = Clear signature\npdfjs-editor-add-signature-clear-button =\n .title = Clear signature\npdfjs-editor-add-signature-save-checkbox = Save signature\npdfjs-editor-add-signature-save-warning-message = You\u2019ve reached the limit of 5 saved signatures. Remove one to save more.\npdfjs-editor-add-signature-image-upload-error-title = Couldn\u2019t upload image\npdfjs-editor-add-signature-image-upload-error-description = Check your network connection or try another image.\npdfjs-editor-add-signature-image-no-data-error-title = Can\u2019t convert this image into a signature\npdfjs-editor-add-signature-image-no-data-error-description = Please try uploading a different image.\npdfjs-editor-add-signature-error-close-button = Close\npdfjs-editor-add-signature-cancel-button = Cancel\npdfjs-editor-add-signature-add-button = Add\npdfjs-editor-delete-signature-button1 =\n .title = Remove saved signature\npdfjs-editor-delete-signature-button-label1 = Remove saved signature\npdfjs-editor-add-signature-edit-button-label = Edit description\npdfjs-editor-edit-signature-dialog-title = Edit description\npdfjs-editor-edit-signature-update-button = Update\npdfjs-editor-edit-comment-actions-button-label = Actions\npdfjs-editor-edit-comment-actions-button =\n .title = Actions\npdfjs-editor-edit-comment-close-button-label = Close\npdfjs-editor-edit-comment-close-button =\n .title = Close\npdfjs-editor-edit-comment-actions-edit-button-label = Edit\npdfjs-editor-edit-comment-actions-delete-button-label = Delete\npdfjs-editor-edit-comment-manager-text-input =\n .placeholder = Enter your comment\npdfjs-editor-edit-comment-manager-cancel-button = Cancel\npdfjs-editor-edit-comment-manager-save-button = Save\npdfjs-editor-edit-comment-button =\n .title = Edit comment";
|
|
3147
|
+
const text = "pdfjs-previous-button =\n .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n .title = Zoom\npdfjs-presentation-mode-button =\n .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-tools-button =\n .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n .title = Document Properties\u2026\npdfjs-document-properties-button-label = Document Properties\u2026\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)\npdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing\u2026\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n .title = Page { $page }\npdfjs-thumb-page-canvas =\n .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n .title = Find\n .placeholder = Find in document\u2026\npdfjs-find-previous-button =\n .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n { $total ->\n [one] { $current } of { $total } match\n *[other] { $current } of { $total } matches\n }\npdfjs-find-match-count-limit =\n { $limit ->\n [one] More than { $limit } match\n *[other] More than { $limit } matches\n }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: \"short\", timeStyle: \"medium\") }\npdfjs-text-annotation-type =\n .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n .title = Text\npdfjs-editor-color-picker-free-text-input =\n .title = Change text color\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n .title = Draw\npdfjs-editor-color-picker-ink-input =\n .title = Change drawing color\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-highlight-floating-button1 =\n .title = Highlight\n .aria-label = Highlight\npdfjs-highlight-floating-button-label = Highlight\npdfjs-comment-floating-button =\n .title = Comment\n .aria-label = Comment\npdfjs-comment-floating-button-label = Comment\npdfjs-editor-comment-button =\n .title = Comment\n .aria-label = Comment\npdfjs-editor-comment-button-label = Comment\npdfjs-editor-signature-button =\n .title = Add signature\npdfjs-editor-signature-button-label = Add signature\npdfjs-editor-highlight-editor =\n .aria-label = Highlight editor\npdfjs-editor-ink-editor =\n .aria-label = Drawing editor\npdfjs-editor-signature-editor1 =\n .aria-description = Signature editor: { $description }\npdfjs-editor-stamp-editor =\n .aria-label = Image editor\npdfjs-editor-remove-ink-button =\n .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n .title = Remove text\npdfjs-editor-remove-stamp-button =\n .title = Remove image\npdfjs-editor-remove-highlight-button =\n .title = Remove highlight\npdfjs-editor-remove-signature-button =\n .title = Remove signature\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-editor-free-highlight-thickness-input = Thickness\npdfjs-editor-free-highlight-thickness-title =\n .title = Change thickness when highlighting items other than text\npdfjs-editor-add-signature-container =\n .aria-label = Signature controls and saved signatures\npdfjs-editor-signature-add-signature-button =\n .title = Add new signature\npdfjs-editor-signature-add-signature-button-label = Add new signature\npdfjs-editor-add-saved-signature-button =\n .title = Saved signature: { $description }\npdfjs-free-text2 =\n .aria-label = Text Editor\n .default-content = Start typing\u2026\npdfjs-editor-comments-sidebar-title =\n { $count ->\n [one] Comment\n *[other] Comments\n }\npdfjs-editor-comments-sidebar-close-button =\n .title = Close the sidebar\n .aria-label = Close the sidebar\npdfjs-editor-comments-sidebar-close-button-label = Close the sidebar\npdfjs-editor-comments-sidebar-no-comments = Add a comment by selecting text or an annotation.\npdfjs-editor-alt-text-button =\n .aria-label = Alt text\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button =\n .aria-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D\npdfjs-editor-resizer-top-left =\n .aria-label = Top left corner \u2014 resize\npdfjs-editor-resizer-top-middle =\n .aria-label = Top middle \u2014 resize\npdfjs-editor-resizer-top-right =\n .aria-label = Top right corner \u2014 resize\npdfjs-editor-resizer-middle-right =\n .aria-label = Middle right \u2014 resize\npdfjs-editor-resizer-bottom-right =\n .aria-label = Bottom right corner \u2014 resize\npdfjs-editor-resizer-bottom-middle =\n .aria-label = Bottom middle \u2014 resize\npdfjs-editor-resizer-bottom-left =\n .aria-label = Bottom left corner \u2014 resize\npdfjs-editor-resizer-middle-left =\n .aria-label = Middle left \u2014 resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n .title = Change color\npdfjs-editor-colorpicker-dropdown =\n .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n .title = Yellow\npdfjs-editor-colorpicker-green =\n .title = Green\npdfjs-editor-colorpicker-blue =\n .title = Blue\npdfjs-editor-colorpicker-pink =\n .title = Pink\npdfjs-editor-colorpicker-red =\n .title = Red\npdfjs-editor-highlight-show-all-button-label = Show all\npdfjs-editor-highlight-show-all-button =\n .title = Show all\npdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)\npdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)\npdfjs-editor-new-alt-text-textarea =\n .placeholder = Write your description here\u2026\npdfjs-editor-new-alt-text-description = Short description for people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.\npdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more\npdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically\npdfjs-editor-new-alt-text-not-now-button = Not now\npdfjs-editor-new-alt-text-error-title = Couldn\u2019t create alt text automatically\npdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.\npdfjs-editor-new-alt-text-error-close-button = Close\npdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\n .aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)\npdfjs-editor-new-alt-text-added-button =\n .aria-label = Alt text added\npdfjs-editor-new-alt-text-added-button-label = Alt text added\npdfjs-editor-new-alt-text-missing-button =\n .aria-label = Missing alt text\npdfjs-editor-new-alt-text-missing-button-label = Missing alt text\npdfjs-editor-new-alt-text-to-review-button =\n .aria-label = Review alt text\npdfjs-editor-new-alt-text-to-review-button-label = Review alt text\npdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }\npdfjs-image-alt-text-settings-button =\n .title = Image alt text settings\npdfjs-image-alt-text-settings-button-label = Image alt text settings\npdfjs-editor-alt-text-settings-dialog-label = Image alt text settings\npdfjs-editor-alt-text-settings-automatic-title = Automatic alt text\npdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically\npdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can\u2019t see the image or when the image doesn\u2019t load.\npdfjs-editor-alt-text-settings-download-model-label = Alt text AI model ({ $totalSize } MB)\npdfjs-editor-alt-text-settings-ai-model-description = Runs locally on your device so your data stays private. Required for automatic alt text.\npdfjs-editor-alt-text-settings-delete-model-button = Delete\npdfjs-editor-alt-text-settings-download-model-button = Download\npdfjs-editor-alt-text-settings-downloading-model-button = Downloading\u2026\npdfjs-editor-alt-text-settings-editor-title = Alt text editor\npdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image\npdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.\npdfjs-editor-alt-text-settings-close-button = Close\npdfjs-editor-highlight-added-alert = Highlight added\npdfjs-editor-freetext-added-alert = Text added\npdfjs-editor-ink-added-alert = Drawing added\npdfjs-editor-stamp-added-alert = Image added\npdfjs-editor-signature-added-alert = Signature added\npdfjs-editor-undo-bar-message-highlight = Highlight removed\npdfjs-editor-undo-bar-message-freetext = Text removed\npdfjs-editor-undo-bar-message-ink = Drawing removed\npdfjs-editor-undo-bar-message-stamp = Image removed\npdfjs-editor-undo-bar-message-signature = Signature removed\npdfjs-editor-undo-bar-message-multiple =\n { $count ->\n [one] { $count } annotation removed\n *[other] { $count } annotations removed\n }\npdfjs-editor-undo-bar-undo-button =\n .title = Undo\npdfjs-editor-undo-bar-undo-button-label = Undo\npdfjs-editor-undo-bar-close-button =\n .title = Close\npdfjs-editor-undo-bar-close-button-label = Close\npdfjs-editor-add-signature-dialog-label = This modal allows the user to create a signature to add to a PDF document. The user can edit the name (which also serves as the alt text), and optionally save the signature for repeated use.\npdfjs-editor-add-signature-dialog-title = Add a signature\npdfjs-editor-add-signature-type-button = Type\n .title = Type\npdfjs-editor-add-signature-draw-button = Draw\n .title = Draw\npdfjs-editor-add-signature-image-button = Image\n .title = Image\npdfjs-editor-add-signature-type-input =\n .aria-label = Type your signature\n .placeholder = Type your signature\npdfjs-editor-add-signature-draw-placeholder = Draw your signature\npdfjs-editor-add-signature-draw-thickness-range-label = Thickness\npdfjs-editor-add-signature-draw-thickness-range =\n .title = Drawing thickness: { $thickness }\npdfjs-editor-add-signature-image-placeholder = Drag a file here to upload\npdfjs-editor-add-signature-image-browse-link =\n { PLATFORM() ->\n [macos] Or choose image files\n *[other] Or browse image files\n }\npdfjs-editor-add-signature-description-label = Description (alt text)\npdfjs-editor-add-signature-description-input =\n .title = Description (alt text)\npdfjs-editor-add-signature-description-default-when-drawing = Signature\npdfjs-editor-add-signature-clear-button-label = Clear signature\npdfjs-editor-add-signature-clear-button =\n .title = Clear signature\npdfjs-editor-add-signature-save-checkbox = Save signature\npdfjs-editor-add-signature-save-warning-message = You\u2019ve reached the limit of 5 saved signatures. Remove one to save more.\npdfjs-editor-add-signature-image-upload-error-title = Couldn\u2019t upload image\npdfjs-editor-add-signature-image-upload-error-description = Check your network connection or try another image.\npdfjs-editor-add-signature-image-no-data-error-title = Can\u2019t convert this image into a signature\npdfjs-editor-add-signature-image-no-data-error-description = Please try uploading a different image.\npdfjs-editor-add-signature-error-close-button = Close\npdfjs-editor-add-signature-cancel-button = Cancel\npdfjs-editor-add-signature-add-button = Add\npdfjs-editor-delete-signature-button1 =\n .title = Remove saved signature\npdfjs-editor-delete-signature-button-label1 = Remove saved signature\npdfjs-editor-add-signature-edit-button-label = Edit description\npdfjs-editor-edit-signature-dialog-title = Edit description\npdfjs-editor-edit-signature-update-button = Update\npdfjs-editor-edit-comment-actions-button-label = Actions\npdfjs-editor-edit-comment-actions-button =\n .title = Actions\npdfjs-editor-edit-comment-close-button-label = Close\npdfjs-editor-edit-comment-close-button =\n .title = Close\npdfjs-editor-edit-comment-actions-edit-button-label = Edit\npdfjs-editor-edit-comment-actions-delete-button-label = Delete\npdfjs-editor-edit-comment-manager-text-input =\n .placeholder = Enter your comment\npdfjs-editor-edit-comment-manager-cancel-button = Cancel\npdfjs-editor-edit-comment-manager-save-button = Save\npdfjs-editor-edit-comment-button =\n .title = Edit comment";
|
|
3105
3148
|
return createBundle(lang, text);
|
|
3106
3149
|
}
|
|
3107
3150
|
}
|
|
@@ -4381,6 +4424,7 @@ class CaretBrowsingMode {
|
|
|
4381
4424
|
|
|
4382
4425
|
;// ./web/comment_manager.js
|
|
4383
4426
|
|
|
4427
|
+
|
|
4384
4428
|
class CommentManager {
|
|
4385
4429
|
#actions;
|
|
4386
4430
|
#currentEditor;
|
|
@@ -4394,6 +4438,7 @@ class CommentManager {
|
|
|
4394
4438
|
#textInput;
|
|
4395
4439
|
#textView;
|
|
4396
4440
|
#saveButton;
|
|
4441
|
+
#sidebar;
|
|
4397
4442
|
#uiManager;
|
|
4398
4443
|
#prevDragX = Infinity;
|
|
4399
4444
|
#prevDragY = Infinity;
|
|
@@ -4412,12 +4457,13 @@ class CommentManager {
|
|
|
4412
4457
|
textView,
|
|
4413
4458
|
cancelButton,
|
|
4414
4459
|
saveButton
|
|
4415
|
-
}, overlayManager) {
|
|
4460
|
+
}, sidebar, eventBus, linkService, overlayManager) {
|
|
4416
4461
|
this.#actions = actions;
|
|
4417
4462
|
this.#dialog = dialog;
|
|
4418
4463
|
this.#editMenuItem = editMenuItem;
|
|
4419
4464
|
this.#deleteMenuItem = deleteMenuItem;
|
|
4420
4465
|
this.#menu = menu;
|
|
4466
|
+
this.#sidebar = new CommentSidebar(sidebar, eventBus, linkService);
|
|
4421
4467
|
this.#textInput = textInput;
|
|
4422
4468
|
this.#textView = textView;
|
|
4423
4469
|
this.#overlayManager = overlayManager;
|
|
@@ -4502,6 +4548,21 @@ class CommentManager {
|
|
|
4502
4548
|
});
|
|
4503
4549
|
overlayManager.register(dialog);
|
|
4504
4550
|
}
|
|
4551
|
+
showSidebar(annotations) {
|
|
4552
|
+
this.#sidebar.show(annotations);
|
|
4553
|
+
}
|
|
4554
|
+
hideSidebar() {
|
|
4555
|
+
this.#sidebar.hide();
|
|
4556
|
+
}
|
|
4557
|
+
removeComments(ids) {
|
|
4558
|
+
this.#sidebar.removeComments(ids);
|
|
4559
|
+
}
|
|
4560
|
+
selectComment(id) {
|
|
4561
|
+
this.#sidebar.selectComment(null, id);
|
|
4562
|
+
}
|
|
4563
|
+
addComment(annotation) {
|
|
4564
|
+
this.#sidebar.addComment(annotation);
|
|
4565
|
+
}
|
|
4505
4566
|
#closeMenu() {
|
|
4506
4567
|
if (!this.#menuAC) {
|
|
4507
4568
|
return;
|
|
@@ -4710,6 +4771,270 @@ class CommentManager {
|
|
|
4710
4771
|
this.#finish();
|
|
4711
4772
|
}
|
|
4712
4773
|
}
|
|
4774
|
+
class CommentSidebar {
|
|
4775
|
+
#annotations = null;
|
|
4776
|
+
#boundCommentClick = this.#commentClick.bind(this);
|
|
4777
|
+
#boundCommentKeydown = this.#commentKeydown.bind(this);
|
|
4778
|
+
#sidebar;
|
|
4779
|
+
#closeButton;
|
|
4780
|
+
#commentsList;
|
|
4781
|
+
#commentCount;
|
|
4782
|
+
#sidebarTitle;
|
|
4783
|
+
#linkService;
|
|
4784
|
+
#elementsToAnnotations = null;
|
|
4785
|
+
#idsToElements = null;
|
|
4786
|
+
constructor({
|
|
4787
|
+
sidebar,
|
|
4788
|
+
commentsList,
|
|
4789
|
+
commentCount,
|
|
4790
|
+
sidebarTitle,
|
|
4791
|
+
closeButton,
|
|
4792
|
+
commentToolbarButton
|
|
4793
|
+
}, eventBus, linkService) {
|
|
4794
|
+
this.#sidebar = sidebar;
|
|
4795
|
+
this.#sidebarTitle = sidebarTitle;
|
|
4796
|
+
this.#commentsList = commentsList;
|
|
4797
|
+
this.#commentCount = commentCount;
|
|
4798
|
+
this.#linkService = linkService;
|
|
4799
|
+
this.#closeButton = closeButton;
|
|
4800
|
+
closeButton.addEventListener("click", () => {
|
|
4801
|
+
eventBus.dispatch("switchannotationeditormode", {
|
|
4802
|
+
source: this,
|
|
4803
|
+
mode: AnnotationEditorType.NONE
|
|
4804
|
+
});
|
|
4805
|
+
});
|
|
4806
|
+
commentToolbarButton.addEventListener("keydown", e => {
|
|
4807
|
+
if (e.key === "ArrowDown" || e.key === "Home" || e.key === "F6") {
|
|
4808
|
+
this.#commentsList.firstElementChild.focus();
|
|
4809
|
+
stopEvent(e);
|
|
4810
|
+
} else if (e.key === "ArrowUp" || e.key === "End") {
|
|
4811
|
+
this.#commentsList.lastElementChild.focus();
|
|
4812
|
+
stopEvent(e);
|
|
4813
|
+
}
|
|
4814
|
+
});
|
|
4815
|
+
this.#sidebar.hidden = true;
|
|
4816
|
+
}
|
|
4817
|
+
show(annotations) {
|
|
4818
|
+
this.#elementsToAnnotations = new WeakMap();
|
|
4819
|
+
this.#idsToElements = new Map();
|
|
4820
|
+
this.#annotations = annotations = annotations.filter(a => a.popupRef && a.contentsObj?.str);
|
|
4821
|
+
annotations.sort(this.#sortComments.bind(this));
|
|
4822
|
+
if (annotations.length !== 0) {
|
|
4823
|
+
const fragment = document.createDocumentFragment();
|
|
4824
|
+
for (const annotation of annotations) {
|
|
4825
|
+
fragment.append(this.#createCommentElement(annotation));
|
|
4826
|
+
}
|
|
4827
|
+
this.#setCommentsCount(fragment);
|
|
4828
|
+
this.#commentsList.append(fragment);
|
|
4829
|
+
} else {
|
|
4830
|
+
this.#setCommentsCount();
|
|
4831
|
+
}
|
|
4832
|
+
this.#sidebar.hidden = false;
|
|
4833
|
+
}
|
|
4834
|
+
hide() {
|
|
4835
|
+
this.#sidebar.hidden = true;
|
|
4836
|
+
this.#commentsList.replaceChildren();
|
|
4837
|
+
this.#elementsToAnnotations = null;
|
|
4838
|
+
this.#idsToElements = null;
|
|
4839
|
+
this.#annotations = null;
|
|
4840
|
+
}
|
|
4841
|
+
removeComments(ids) {
|
|
4842
|
+
if (ids.length === 0) {
|
|
4843
|
+
return;
|
|
4844
|
+
}
|
|
4845
|
+
if (new Set(this.#idsToElements.keys()).difference(new Set(ids)).size === 0) {
|
|
4846
|
+
this.#removeAll();
|
|
4847
|
+
return;
|
|
4848
|
+
}
|
|
4849
|
+
for (const id of ids) {
|
|
4850
|
+
this.#removeComment(id);
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
focusComment(id) {
|
|
4854
|
+
const element = this.#idsToElements.get(id);
|
|
4855
|
+
if (!element) {
|
|
4856
|
+
return;
|
|
4857
|
+
}
|
|
4858
|
+
this.#sidebar.scrollTop = element.offsetTop - this.#sidebar.offsetTop;
|
|
4859
|
+
for (const el of this.#commentsList.children) {
|
|
4860
|
+
el.classList.toggle("selected", el === element);
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
#removeComment(id) {
|
|
4864
|
+
const element = this.#idsToElements.get(id);
|
|
4865
|
+
if (!element) {
|
|
4866
|
+
return;
|
|
4867
|
+
}
|
|
4868
|
+
const annotation = this.#elementsToAnnotations.get(element);
|
|
4869
|
+
const index = binarySearchFirstItem(this.#annotations, a => this.#sortComments(a, annotation) >= 0);
|
|
4870
|
+
if (index >= this.#annotations.length) {
|
|
4871
|
+
return;
|
|
4872
|
+
}
|
|
4873
|
+
this.#annotations.splice(index, 1);
|
|
4874
|
+
element.remove();
|
|
4875
|
+
this.#idsToElements.delete(id);
|
|
4876
|
+
this.#setCommentsCount();
|
|
4877
|
+
}
|
|
4878
|
+
#removeAll() {
|
|
4879
|
+
this.#commentsList.replaceChildren();
|
|
4880
|
+
this.#elementsToAnnotations = new WeakMap();
|
|
4881
|
+
this.#idsToElements.clear();
|
|
4882
|
+
this.#annotations.length = 0;
|
|
4883
|
+
this.#setCommentsCount();
|
|
4884
|
+
}
|
|
4885
|
+
selectComment(element, id = null) {
|
|
4886
|
+
element ||= this.#idsToElements.get(id);
|
|
4887
|
+
for (const el of this.#commentsList.children) {
|
|
4888
|
+
el.classList.toggle("selected", el === element);
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
addComment(annotation) {
|
|
4892
|
+
if (this.#idsToElements.has(annotation.id)) {
|
|
4893
|
+
return;
|
|
4894
|
+
}
|
|
4895
|
+
const {
|
|
4896
|
+
popupRef,
|
|
4897
|
+
contentsObj
|
|
4898
|
+
} = annotation;
|
|
4899
|
+
if (!popupRef || !contentsObj?.str) {
|
|
4900
|
+
return;
|
|
4901
|
+
}
|
|
4902
|
+
const commentItem = this.#createCommentElement(annotation);
|
|
4903
|
+
if (this.#annotations.length === 0) {
|
|
4904
|
+
this.#commentsList.replaceChildren(commentItem);
|
|
4905
|
+
this.#annotations.push(annotation);
|
|
4906
|
+
this.#setCommentsCount();
|
|
4907
|
+
return;
|
|
4908
|
+
}
|
|
4909
|
+
const index = binarySearchFirstItem(this.#annotations, a => this.#sortComments(a, annotation) >= 0);
|
|
4910
|
+
this.#annotations.splice(index, 0, annotation);
|
|
4911
|
+
if (index >= this.#commentsList.children.length) {
|
|
4912
|
+
this.#commentsList.append(commentItem);
|
|
4913
|
+
} else {
|
|
4914
|
+
this.#commentsList.insertBefore(commentItem, this.#commentsList.children[index]);
|
|
4915
|
+
}
|
|
4916
|
+
this.#setCommentsCount();
|
|
4917
|
+
}
|
|
4918
|
+
#setCommentsCount(container = this.#commentsList) {
|
|
4919
|
+
const count = this.#idsToElements.size;
|
|
4920
|
+
this.#sidebarTitle.setAttribute("data-l10n-args", JSON.stringify({
|
|
4921
|
+
count
|
|
4922
|
+
}));
|
|
4923
|
+
this.#commentCount.textContent = count;
|
|
4924
|
+
if (count === 0) {
|
|
4925
|
+
container.append(this.#createZeroCommentElement());
|
|
4926
|
+
}
|
|
4927
|
+
}
|
|
4928
|
+
#createZeroCommentElement() {
|
|
4929
|
+
const commentItem = document.createElement("li");
|
|
4930
|
+
commentItem.classList.add("sidebarComment", "noComments");
|
|
4931
|
+
commentItem.role = "button";
|
|
4932
|
+
const textDiv = document.createElement("div");
|
|
4933
|
+
textDiv.className = "sidebarCommentText";
|
|
4934
|
+
textDiv.setAttribute("data-l10n-id", "pdfjs-editor-comments-sidebar-no-comments");
|
|
4935
|
+
commentItem.addEventListener("keydown", this.#boundCommentKeydown);
|
|
4936
|
+
commentItem.append(textDiv);
|
|
4937
|
+
return commentItem;
|
|
4938
|
+
}
|
|
4939
|
+
#createCommentElement(annotation) {
|
|
4940
|
+
const {
|
|
4941
|
+
creationDate,
|
|
4942
|
+
modificationDate,
|
|
4943
|
+
contentsObj: {
|
|
4944
|
+
str: text
|
|
4945
|
+
}
|
|
4946
|
+
} = annotation;
|
|
4947
|
+
const commentItem = document.createElement("li");
|
|
4948
|
+
commentItem.role = "button";
|
|
4949
|
+
commentItem.className = "sidebarComment";
|
|
4950
|
+
commentItem.tabIndex = -1;
|
|
4951
|
+
const dateDiv = document.createElement("time");
|
|
4952
|
+
const date = PDFDateString.toDateObject(modificationDate || creationDate);
|
|
4953
|
+
dateDiv.dateTime = date.toISOString();
|
|
4954
|
+
const dateFormat = new Intl.DateTimeFormat(undefined, {
|
|
4955
|
+
dateStyle: "long"
|
|
4956
|
+
});
|
|
4957
|
+
dateDiv.textContent = dateFormat.format(date);
|
|
4958
|
+
const textDiv = document.createElement("div");
|
|
4959
|
+
textDiv.className = "sidebarCommentText";
|
|
4960
|
+
textDiv.textContent = text;
|
|
4961
|
+
commentItem.append(dateDiv, textDiv);
|
|
4962
|
+
commentItem.addEventListener("click", this.#boundCommentClick);
|
|
4963
|
+
commentItem.addEventListener("keydown", this.#boundCommentKeydown);
|
|
4964
|
+
this.#elementsToAnnotations.set(commentItem, annotation);
|
|
4965
|
+
this.#idsToElements.set(annotation.id, commentItem);
|
|
4966
|
+
return commentItem;
|
|
4967
|
+
}
|
|
4968
|
+
#commentClick({
|
|
4969
|
+
currentTarget
|
|
4970
|
+
}) {
|
|
4971
|
+
if (currentTarget.classList.contains("selected")) {
|
|
4972
|
+
return;
|
|
4973
|
+
}
|
|
4974
|
+
const annotation = this.#elementsToAnnotations.get(currentTarget);
|
|
4975
|
+
if (!annotation) {
|
|
4976
|
+
return;
|
|
4977
|
+
}
|
|
4978
|
+
const {
|
|
4979
|
+
pageIndex,
|
|
4980
|
+
rect
|
|
4981
|
+
} = annotation;
|
|
4982
|
+
const SPACE_ABOVE_ANNOTATION = 10;
|
|
4983
|
+
this.#linkService?.goToXY(pageIndex + 1, rect[0], rect[3] + SPACE_ABOVE_ANNOTATION);
|
|
4984
|
+
this.selectComment(currentTarget);
|
|
4985
|
+
}
|
|
4986
|
+
#commentKeydown(e) {
|
|
4987
|
+
const {
|
|
4988
|
+
key,
|
|
4989
|
+
currentTarget
|
|
4990
|
+
} = e;
|
|
4991
|
+
switch (key) {
|
|
4992
|
+
case "ArrowDown":
|
|
4993
|
+
(currentTarget.nextElementSibling || this.#commentsList.firstElementChild).focus();
|
|
4994
|
+
stopEvent(e);
|
|
4995
|
+
break;
|
|
4996
|
+
case "ArrowUp":
|
|
4997
|
+
(currentTarget.previousElementSibling || this.#commentsList.lastElementChild).focus();
|
|
4998
|
+
stopEvent(e);
|
|
4999
|
+
break;
|
|
5000
|
+
case "Home":
|
|
5001
|
+
this.#commentsList.firstElementChild.focus();
|
|
5002
|
+
stopEvent(e);
|
|
5003
|
+
break;
|
|
5004
|
+
case "End":
|
|
5005
|
+
this.#commentsList.lastElementChild.focus();
|
|
5006
|
+
stopEvent(e);
|
|
5007
|
+
break;
|
|
5008
|
+
case "Enter":
|
|
5009
|
+
case " ":
|
|
5010
|
+
this.#commentClick(e);
|
|
5011
|
+
stopEvent(e);
|
|
5012
|
+
break;
|
|
5013
|
+
case "ShiftTab":
|
|
5014
|
+
this.#closeButton.focus();
|
|
5015
|
+
stopEvent(e);
|
|
5016
|
+
break;
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
#sortComments(a, b) {
|
|
5020
|
+
if (a.pageIndex !== b.pageIndex) {
|
|
5021
|
+
return a.pageIndex - b.pageIndex;
|
|
5022
|
+
}
|
|
5023
|
+
if (a.rect[3] !== b.rect[3]) {
|
|
5024
|
+
return b.rect[3] - a.rect[3];
|
|
5025
|
+
}
|
|
5026
|
+
if (a.rect[0] !== b.rect[0]) {
|
|
5027
|
+
return a.rect[0] - b.rect[0];
|
|
5028
|
+
}
|
|
5029
|
+
if (a.rect[1] !== b.rect[1]) {
|
|
5030
|
+
return b.rect[1] - a.rect[1];
|
|
5031
|
+
}
|
|
5032
|
+
if (a.rect[2] !== b.rect[2]) {
|
|
5033
|
+
return a.rect[2] - b.rect[2];
|
|
5034
|
+
}
|
|
5035
|
+
return a.id.localeCompare(b.id);
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
4713
5038
|
|
|
4714
5039
|
;// ./web/download_manager.js
|
|
4715
5040
|
|
|
@@ -5682,7 +6007,6 @@ const FindState = {
|
|
|
5682
6007
|
};
|
|
5683
6008
|
const FIND_TIMEOUT = 250;
|
|
5684
6009
|
const MATCH_SCROLL_OFFSET_TOP = -50;
|
|
5685
|
-
const MATCH_SCROLL_OFFSET_LEFT = -400;
|
|
5686
6010
|
const CHARACTERS_TO_NORMALIZE = {
|
|
5687
6011
|
"\u2010": "-",
|
|
5688
6012
|
"\u2018": "'",
|
|
@@ -6000,7 +6324,7 @@ class PDFFindController {
|
|
|
6000
6324
|
this._scrollMatches = false;
|
|
6001
6325
|
const spot = {
|
|
6002
6326
|
top: MATCH_SCROLL_OFFSET_TOP,
|
|
6003
|
-
left: selectedLeft
|
|
6327
|
+
left: selectedLeft
|
|
6004
6328
|
};
|
|
6005
6329
|
scrollIntoView(element, spot, true);
|
|
6006
6330
|
}
|
|
@@ -9594,6 +9918,7 @@ class AnnotationLayerBuilder {
|
|
|
9594
9918
|
annotationStorage = null,
|
|
9595
9919
|
imageResourcesPath = "",
|
|
9596
9920
|
renderForms = true,
|
|
9921
|
+
enableComment = false,
|
|
9597
9922
|
enableScripting = false,
|
|
9598
9923
|
hasJSActionsPromise = null,
|
|
9599
9924
|
fieldObjectsPromise = null,
|
|
@@ -9608,6 +9933,7 @@ class AnnotationLayerBuilder {
|
|
|
9608
9933
|
this.imageResourcesPath = imageResourcesPath;
|
|
9609
9934
|
this.renderForms = renderForms;
|
|
9610
9935
|
this.annotationStorage = annotationStorage;
|
|
9936
|
+
this.enableComment = enableComment;
|
|
9611
9937
|
this.enableScripting = enableScripting;
|
|
9612
9938
|
this._hasJSActionsPromise = hasJSActionsPromise || Promise.resolve(false);
|
|
9613
9939
|
this._fieldObjectsPromise = fieldObjectsPromise || Promise.resolve(null);
|
|
@@ -9658,6 +9984,7 @@ class AnnotationLayerBuilder {
|
|
|
9658
9984
|
linkService: this.linkService,
|
|
9659
9985
|
downloadManager: this.downloadManager,
|
|
9660
9986
|
annotationStorage: this.annotationStorage,
|
|
9987
|
+
enableComment: this.enableComment,
|
|
9661
9988
|
enableScripting: this.enableScripting,
|
|
9662
9989
|
hasJSActions,
|
|
9663
9990
|
fieldObjects
|
|
@@ -9946,9 +10273,11 @@ class BasePDFPageView {
|
|
|
9946
10273
|
#tempCanvas = null;
|
|
9947
10274
|
canvas = null;
|
|
9948
10275
|
div = null;
|
|
10276
|
+
enableOptimizedPartialRendering = false;
|
|
9949
10277
|
eventBus = null;
|
|
9950
10278
|
id = null;
|
|
9951
10279
|
pageColors = null;
|
|
10280
|
+
recordedGroups = null;
|
|
9952
10281
|
renderingQueue = null;
|
|
9953
10282
|
renderTask = null;
|
|
9954
10283
|
resume = null;
|
|
@@ -9957,6 +10286,7 @@ class BasePDFPageView {
|
|
|
9957
10286
|
this.id = options.id;
|
|
9958
10287
|
this.pageColors = options.pageColors || null;
|
|
9959
10288
|
this.renderingQueue = options.renderingQueue;
|
|
10289
|
+
this.enableOptimizedPartialRendering = options.enableOptimizedPartialRendering ?? false;
|
|
9960
10290
|
this.#minDurationToUpdateCanvas = options.minDurationToUpdateCanvas ?? 500;
|
|
9961
10291
|
}
|
|
9962
10292
|
get renderingState() {
|
|
@@ -10097,6 +10427,9 @@ class BasePDFPageView {
|
|
|
10097
10427
|
this.#renderError = error;
|
|
10098
10428
|
if (renderTask === this.renderTask) {
|
|
10099
10429
|
this.renderTask = null;
|
|
10430
|
+
if (this.enableOptimizedPartialRendering) {
|
|
10431
|
+
this.recordedGroups ??= renderTask.recordedGroups;
|
|
10432
|
+
}
|
|
10100
10433
|
}
|
|
10101
10434
|
}
|
|
10102
10435
|
this.renderingState = RenderingStates.FINISHED;
|
|
@@ -10279,6 +10612,45 @@ class PDFPageDetailView extends BasePDFPageView {
|
|
|
10279
10612
|
keepCanvas: true
|
|
10280
10613
|
});
|
|
10281
10614
|
}
|
|
10615
|
+
_getRenderingContext(canvas, transform) {
|
|
10616
|
+
const baseContext = this.pageView._getRenderingContext(canvas, transform);
|
|
10617
|
+
const recordedGroups = this.pdfPage.recordedGroups;
|
|
10618
|
+
if (!recordedGroups || !this.enableOptimizedPartialRendering) {
|
|
10619
|
+
return {
|
|
10620
|
+
...baseContext,
|
|
10621
|
+
recordOperations: false
|
|
10622
|
+
};
|
|
10623
|
+
}
|
|
10624
|
+
const filteredIndexes = new Set();
|
|
10625
|
+
const {
|
|
10626
|
+
viewport: {
|
|
10627
|
+
width: vWidth,
|
|
10628
|
+
height: vHeight
|
|
10629
|
+
}
|
|
10630
|
+
} = this.pageView;
|
|
10631
|
+
const {
|
|
10632
|
+
width: aWidth,
|
|
10633
|
+
height: aHeight,
|
|
10634
|
+
minX: aMinX,
|
|
10635
|
+
minY: aMinY
|
|
10636
|
+
} = this.#detailArea;
|
|
10637
|
+
const detailMinX = aMinX / vWidth;
|
|
10638
|
+
const detailMinY = aMinY / vHeight;
|
|
10639
|
+
const detailMaxX = (aMinX + aWidth) / vWidth;
|
|
10640
|
+
const detailMaxY = (aMinY + aHeight) / vHeight;
|
|
10641
|
+
for (let i = 0, ii = recordedGroups.length; i < ii; i++) {
|
|
10642
|
+
const group = recordedGroups[i];
|
|
10643
|
+
if (group.minX <= detailMaxX && group.maxX >= detailMinX && group.minY <= detailMaxY && group.maxY >= detailMinY) {
|
|
10644
|
+
filteredIndexes.add(group.idx);
|
|
10645
|
+
group.dependencies.forEach(filteredIndexes.add, filteredIndexes);
|
|
10646
|
+
}
|
|
10647
|
+
}
|
|
10648
|
+
return {
|
|
10649
|
+
...baseContext,
|
|
10650
|
+
recordOperations: false,
|
|
10651
|
+
filteredOperationIndexes: filteredIndexes
|
|
10652
|
+
};
|
|
10653
|
+
}
|
|
10282
10654
|
async draw() {
|
|
10283
10655
|
if (this.pageView.detailView !== this) {
|
|
10284
10656
|
return undefined;
|
|
@@ -10328,7 +10700,7 @@ class PDFPageDetailView extends BasePDFPageView {
|
|
|
10328
10700
|
style.height = `${area.height * 100 / height}%`;
|
|
10329
10701
|
style.top = `${area.minY * 100 / height}%`;
|
|
10330
10702
|
style.left = `${area.minX * 100 / width}%`;
|
|
10331
|
-
const renderingPromise = this._drawCanvas(this.
|
|
10703
|
+
const renderingPromise = this._drawCanvas(this._getRenderingContext(canvas, transform), () => {
|
|
10332
10704
|
this.canvas?.remove();
|
|
10333
10705
|
this.canvas = prevCanvas;
|
|
10334
10706
|
}, () => {
|
|
@@ -11433,6 +11805,7 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11433
11805
|
keepCanvasWrapper = false,
|
|
11434
11806
|
preserveDetailViewState = false
|
|
11435
11807
|
} = {}) {
|
|
11808
|
+
const keepPdfBugGroups = this.pdfPage?._pdfBug ?? false;
|
|
11436
11809
|
this.cancelRendering({
|
|
11437
11810
|
keepAnnotationLayer,
|
|
11438
11811
|
keepAnnotationEditorLayer,
|
|
@@ -11457,6 +11830,9 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11457
11830
|
case canvasWrapperNode:
|
|
11458
11831
|
continue;
|
|
11459
11832
|
}
|
|
11833
|
+
if (keepPdfBugGroups && node.classList.contains("pdfBugGroupsLayer")) {
|
|
11834
|
+
continue;
|
|
11835
|
+
}
|
|
11460
11836
|
node.remove();
|
|
11461
11837
|
const layerIndex = this.#layers.indexOf(node);
|
|
11462
11838
|
if (layerIndex >= 0) {
|
|
@@ -11507,7 +11883,8 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11507
11883
|
if (this.enableDetailCanvas) {
|
|
11508
11884
|
if (this.#needsRestrictedScaling && this.maxCanvasPixels > 0 && visibleArea) {
|
|
11509
11885
|
this.detailView ??= new PDFPageDetailView({
|
|
11510
|
-
pageView: this
|
|
11886
|
+
pageView: this,
|
|
11887
|
+
enableOptimizedPartialRendering: this.enableOptimizedPartialRendering
|
|
11511
11888
|
});
|
|
11512
11889
|
this.detailView.update({
|
|
11513
11890
|
visibleArea
|
|
@@ -11719,7 +12096,8 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11719
12096
|
optionalContentConfigPromise: this._optionalContentConfigPromise,
|
|
11720
12097
|
annotationCanvasMap: this._annotationCanvasMap,
|
|
11721
12098
|
pageColors: this.pageColors,
|
|
11722
|
-
isEditing: this.#isEditing
|
|
12099
|
+
isEditing: this.#isEditing,
|
|
12100
|
+
recordOperations: this.enableOptimizedPartialRendering && !this.recordedGroups
|
|
11723
12101
|
};
|
|
11724
12102
|
}
|
|
11725
12103
|
async draw() {
|
|
@@ -11758,6 +12136,7 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11758
12136
|
annotationStorage,
|
|
11759
12137
|
annotationEditorUIManager,
|
|
11760
12138
|
downloadManager,
|
|
12139
|
+
enableComment,
|
|
11761
12140
|
enableScripting,
|
|
11762
12141
|
fieldObjectsPromise,
|
|
11763
12142
|
hasJSActionsPromise,
|
|
@@ -11771,6 +12150,7 @@ class PDFPageView extends BasePDFPageView {
|
|
|
11771
12150
|
renderForms: this.#annotationMode === AnnotationMode.ENABLE_FORMS,
|
|
11772
12151
|
linkService,
|
|
11773
12152
|
downloadManager,
|
|
12153
|
+
enableComment,
|
|
11774
12154
|
enableScripting,
|
|
11775
12155
|
hasJSActionsPromise,
|
|
11776
12156
|
fieldObjectsPromise,
|
|
@@ -11981,6 +12361,7 @@ class PDFViewer {
|
|
|
11981
12361
|
#eventAbortController = null;
|
|
11982
12362
|
#minDurationToUpdateCanvas = 0;
|
|
11983
12363
|
#mlManager = null;
|
|
12364
|
+
#printingAllowed = true;
|
|
11984
12365
|
#scrollTimeoutId = null;
|
|
11985
12366
|
#switchAnnotationEditorModeAC = null;
|
|
11986
12367
|
#switchAnnotationEditorModeTimeoutId = null;
|
|
@@ -11996,7 +12377,7 @@ class PDFViewer {
|
|
|
11996
12377
|
#textLayerMode = TextLayerMode.ENABLE;
|
|
11997
12378
|
#viewerAlert = null;
|
|
11998
12379
|
constructor(options) {
|
|
11999
|
-
const viewerVersion = "5.4.
|
|
12380
|
+
const viewerVersion = "5.4.149";
|
|
12000
12381
|
if (version !== viewerVersion) {
|
|
12001
12382
|
throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`);
|
|
12002
12383
|
}
|
|
@@ -12036,6 +12417,7 @@ class PDFViewer {
|
|
|
12036
12417
|
this.maxCanvasDim = options.maxCanvasDim;
|
|
12037
12418
|
this.capCanvasAreaFactor = options.capCanvasAreaFactor;
|
|
12038
12419
|
this.enableDetailCanvas = options.enableDetailCanvas ?? true;
|
|
12420
|
+
this.enableOptimizedPartialRendering = options.enableOptimizedPartialRendering ?? false;
|
|
12039
12421
|
this.l10n = options.l10n;
|
|
12040
12422
|
this.l10n ||= new genericl10n_GenericL10n();
|
|
12041
12423
|
this.#enablePermissions = options.enablePermissions || false;
|
|
@@ -12081,6 +12463,9 @@ class PDFViewer {
|
|
|
12081
12463
|
this.l10n.translate(this.container);
|
|
12082
12464
|
}
|
|
12083
12465
|
}
|
|
12466
|
+
get printingAllowed() {
|
|
12467
|
+
return this.#printingAllowed;
|
|
12468
|
+
}
|
|
12084
12469
|
get pagesCount() {
|
|
12085
12470
|
return this._pages.length;
|
|
12086
12471
|
}
|
|
@@ -12236,6 +12621,9 @@ class PDFViewer {
|
|
|
12236
12621
|
get downloadManager() {
|
|
12237
12622
|
return self.downloadManager;
|
|
12238
12623
|
},
|
|
12624
|
+
get enableComment() {
|
|
12625
|
+
return !!self.#commentManager;
|
|
12626
|
+
},
|
|
12239
12627
|
get enableScripting() {
|
|
12240
12628
|
return !!self._scriptingManager;
|
|
12241
12629
|
},
|
|
@@ -12260,8 +12648,18 @@ class PDFViewer {
|
|
|
12260
12648
|
textLayerMode: this.#textLayerMode
|
|
12261
12649
|
};
|
|
12262
12650
|
if (!permissions) {
|
|
12651
|
+
this.#printingAllowed = true;
|
|
12652
|
+
this.eventBus.dispatch("printingallowed", {
|
|
12653
|
+
source: this,
|
|
12654
|
+
isAllowed: this.#printingAllowed
|
|
12655
|
+
});
|
|
12263
12656
|
return params;
|
|
12264
12657
|
}
|
|
12658
|
+
this.#printingAllowed = permissions.includes(PermissionFlag.PRINT_HIGH_QUALITY) || permissions.includes(PermissionFlag.PRINT);
|
|
12659
|
+
this.eventBus.dispatch("printingallowed", {
|
|
12660
|
+
source: this,
|
|
12661
|
+
isAllowed: this.#printingAllowed
|
|
12662
|
+
});
|
|
12265
12663
|
if (!permissions.includes(PermissionFlag.COPY) && this.#textLayerMode === TextLayerMode.ENABLE) {
|
|
12266
12664
|
params.textLayerMode = TextLayerMode.ENABLE_PERMISSIONS;
|
|
12267
12665
|
}
|
|
@@ -12359,6 +12757,8 @@ class PDFViewer {
|
|
|
12359
12757
|
this._scriptingManager?.setDocument(null);
|
|
12360
12758
|
this.#annotationEditorUIManager?.destroy();
|
|
12361
12759
|
this.#annotationEditorUIManager = null;
|
|
12760
|
+
this.#annotationEditorMode = AnnotationEditorType.NONE;
|
|
12761
|
+
this.#printingAllowed = true;
|
|
12362
12762
|
}
|
|
12363
12763
|
this.pdfDocument = pdfDocument;
|
|
12364
12764
|
if (!pdfDocument) {
|
|
@@ -12478,6 +12878,7 @@ class PDFViewer {
|
|
|
12478
12878
|
maxCanvasDim: this.maxCanvasDim,
|
|
12479
12879
|
capCanvasAreaFactor: this.capCanvasAreaFactor,
|
|
12480
12880
|
enableDetailCanvas: this.enableDetailCanvas,
|
|
12881
|
+
enableOptimizedPartialRendering: this.enableOptimizedPartialRendering,
|
|
12481
12882
|
pageColors,
|
|
12482
12883
|
l10n: this.l10n,
|
|
12483
12884
|
layerProperties: this._layerProperties,
|
|
@@ -14765,6 +15166,17 @@ class Toolbar {
|
|
|
14765
15166
|
}, {
|
|
14766
15167
|
element: options.download,
|
|
14767
15168
|
eventName: "download"
|
|
15169
|
+
}, {
|
|
15170
|
+
element: options.editorCommentButton,
|
|
15171
|
+
eventName: "switchannotationeditormode",
|
|
15172
|
+
eventDetails: {
|
|
15173
|
+
get mode() {
|
|
15174
|
+
const {
|
|
15175
|
+
classList
|
|
15176
|
+
} = options.editorCommentButton;
|
|
15177
|
+
return classList.contains("toggled") ? AnnotationEditorType.NONE : AnnotationEditorType.POPUP;
|
|
15178
|
+
}
|
|
15179
|
+
}
|
|
14768
15180
|
}, {
|
|
14769
15181
|
element: options.editorFreeTextButton,
|
|
14770
15182
|
eventName: "switchannotationeditormode",
|
|
@@ -14967,6 +15379,8 @@ class Toolbar {
|
|
|
14967
15379
|
mode
|
|
14968
15380
|
}) {
|
|
14969
15381
|
const {
|
|
15382
|
+
editorCommentButton,
|
|
15383
|
+
editorCommentParamsToolbar,
|
|
14970
15384
|
editorFreeTextButton,
|
|
14971
15385
|
editorFreeTextParamsToolbar,
|
|
14972
15386
|
editorHighlightButton,
|
|
@@ -14978,17 +15392,13 @@ class Toolbar {
|
|
|
14978
15392
|
editorSignatureButton,
|
|
14979
15393
|
editorSignatureParamsToolbar
|
|
14980
15394
|
} = this.#opts;
|
|
15395
|
+
toggleExpandedBtn(editorCommentButton, mode === AnnotationEditorType.POPUP, editorCommentParamsToolbar);
|
|
14981
15396
|
toggleExpandedBtn(editorFreeTextButton, mode === AnnotationEditorType.FREETEXT, editorFreeTextParamsToolbar);
|
|
14982
15397
|
toggleExpandedBtn(editorHighlightButton, mode === AnnotationEditorType.HIGHLIGHT, editorHighlightParamsToolbar);
|
|
14983
15398
|
toggleExpandedBtn(editorInkButton, mode === AnnotationEditorType.INK, editorInkParamsToolbar);
|
|
14984
15399
|
toggleExpandedBtn(editorStampButton, mode === AnnotationEditorType.STAMP, editorStampParamsToolbar);
|
|
14985
15400
|
toggleExpandedBtn(editorSignatureButton, mode === AnnotationEditorType.SIGNATURE, editorSignatureParamsToolbar);
|
|
14986
|
-
|
|
14987
|
-
editorFreeTextButton.disabled = isDisable;
|
|
14988
|
-
editorHighlightButton.disabled = isDisable;
|
|
14989
|
-
editorInkButton.disabled = isDisable;
|
|
14990
|
-
editorStampButton.disabled = isDisable;
|
|
14991
|
-
editorSignatureButton.disabled = isDisable;
|
|
15401
|
+
editorCommentButton.disabled = editorFreeTextButton.disabled = editorHighlightButton.disabled = editorInkButton.disabled = editorStampButton.disabled = editorSignatureButton.disabled = mode === AnnotationEditorType.DISABLE;
|
|
14992
15402
|
}
|
|
14993
15403
|
#updateUIState(resetNumPages = false) {
|
|
14994
15404
|
const {
|
|
@@ -15217,6 +15627,7 @@ const PDFViewerApplication = {
|
|
|
15217
15627
|
_caretBrowsing: null,
|
|
15218
15628
|
_isScrolling: false,
|
|
15219
15629
|
editorUndoBar: null,
|
|
15630
|
+
_printPermissionPromise: null,
|
|
15220
15631
|
async initialize(appConfig) {
|
|
15221
15632
|
this.appConfig = appConfig;
|
|
15222
15633
|
try {
|
|
@@ -15389,7 +15800,14 @@ const PDFViewerApplication = {
|
|
|
15389
15800
|
this.editorUndoBar = new EditorUndoBar(appConfig.editorUndoBar, eventBus);
|
|
15390
15801
|
}
|
|
15391
15802
|
const signatureManager = AppOptions.get("enableSignatureEditor") && appConfig.addSignatureDialog ? new SignatureManager(appConfig.addSignatureDialog, appConfig.editSignatureDialog, appConfig.annotationEditorParams?.editorSignatureAddSignature || null, overlayManager, l10n, externalServices.createSignatureStorage(eventBus, abortSignal), eventBus) : null;
|
|
15392
|
-
const commentManager = AppOptions.get("enableComment") && appConfig.editCommentDialog ? new CommentManager(appConfig.editCommentDialog,
|
|
15803
|
+
const commentManager = AppOptions.get("enableComment") && appConfig.editCommentDialog ? new CommentManager(appConfig.editCommentDialog, {
|
|
15804
|
+
sidebar: appConfig.annotationEditorParams?.editorCommentsSidebar || null,
|
|
15805
|
+
commentsList: appConfig.annotationEditorParams?.editorCommentsSidebarList || null,
|
|
15806
|
+
commentCount: appConfig.annotationEditorParams?.editorCommentsSidebarCount || null,
|
|
15807
|
+
sidebarTitle: appConfig.annotationEditorParams?.editorCommentsSidebarTitle || null,
|
|
15808
|
+
closeButton: appConfig.annotationEditorParams?.editorCommentsSidebarCloseButton || null,
|
|
15809
|
+
commentToolbarButton: appConfig.toolbar?.editorCommentButton || null
|
|
15810
|
+
}, eventBus, linkService, overlayManager) : null;
|
|
15393
15811
|
const enableHWA = AppOptions.get("enableHWA"),
|
|
15394
15812
|
maxCanvasPixels = AppOptions.get("maxCanvasPixels"),
|
|
15395
15813
|
maxCanvasDim = AppOptions.get("maxCanvasDim"),
|
|
@@ -15423,6 +15841,7 @@ const PDFViewerApplication = {
|
|
|
15423
15841
|
capCanvasAreaFactor,
|
|
15424
15842
|
enableDetailCanvas: AppOptions.get("enableDetailCanvas"),
|
|
15425
15843
|
enablePermissions: AppOptions.get("enablePermissions"),
|
|
15844
|
+
enableOptimizedPartialRendering: AppOptions.get("enableOptimizedPartialRendering"),
|
|
15426
15845
|
pageColors,
|
|
15427
15846
|
mlManager,
|
|
15428
15847
|
abortSignal,
|
|
@@ -15464,6 +15883,10 @@ const PDFViewerApplication = {
|
|
|
15464
15883
|
if (editorSignatureButton && AppOptions.get("enableSignatureEditor")) {
|
|
15465
15884
|
editorSignatureButton.parentElement.hidden = false;
|
|
15466
15885
|
}
|
|
15886
|
+
const editorCommentButton = appConfig.toolbar?.editorCommentButton;
|
|
15887
|
+
if (editorCommentButton && AppOptions.get("enableComment")) {
|
|
15888
|
+
editorCommentButton.parentElement.hidden = false;
|
|
15889
|
+
}
|
|
15467
15890
|
this.annotationEditorParams = new AnnotationEditorParams(appConfig.annotationEditorParams, eventBus);
|
|
15468
15891
|
} else {
|
|
15469
15892
|
for (const id of ["editorModeButtons", "editorModeSeparator"]) {
|
|
@@ -15604,9 +16027,16 @@ const PDFViewerApplication = {
|
|
|
15604
16027
|
console.warn(msg);
|
|
15605
16028
|
});
|
|
15606
16029
|
}
|
|
16030
|
+
const togglePrintingButtons = visible => {
|
|
16031
|
+
appConfig.toolbar?.print?.classList.toggle("hidden", !visible);
|
|
16032
|
+
appConfig.secondaryToolbar?.printButton.classList.toggle("hidden", !visible);
|
|
16033
|
+
};
|
|
15607
16034
|
if (!this.supportsPrinting) {
|
|
15608
|
-
|
|
15609
|
-
|
|
16035
|
+
togglePrintingButtons(false);
|
|
16036
|
+
} else {
|
|
16037
|
+
eventBus.on("printingallowed", ({
|
|
16038
|
+
isAllowed
|
|
16039
|
+
}) => togglePrintingButtons(isAllowed));
|
|
15610
16040
|
}
|
|
15611
16041
|
if (!this.supportsFullscreen) {
|
|
15612
16042
|
appConfig.secondaryToolbar?.presentationModeButton.classList.add("hidden");
|
|
@@ -15932,6 +16362,15 @@ const PDFViewerApplication = {
|
|
|
15932
16362
|
},
|
|
15933
16363
|
load(pdfDocument) {
|
|
15934
16364
|
this.pdfDocument = pdfDocument;
|
|
16365
|
+
this._printPermissionPromise = new Promise(resolve => {
|
|
16366
|
+
this.eventBus.on("printingallowed", ({
|
|
16367
|
+
isAllowed
|
|
16368
|
+
}) => {
|
|
16369
|
+
resolve(isAllowed);
|
|
16370
|
+
}, {
|
|
16371
|
+
once: true
|
|
16372
|
+
});
|
|
16373
|
+
});
|
|
15935
16374
|
pdfDocument.getDownloadInfo().then(({
|
|
15936
16375
|
length
|
|
15937
16376
|
}) => {
|
|
@@ -16317,7 +16756,7 @@ const PDFViewerApplication = {
|
|
|
16317
16756
|
if (this.printService) {
|
|
16318
16757
|
return;
|
|
16319
16758
|
}
|
|
16320
|
-
if (!this.supportsPrinting) {
|
|
16759
|
+
if (!this.supportsPrinting || !this.pdfViewer.printingAllowed) {
|
|
16321
16760
|
this._otherError("pdfjs-printing-not-supported");
|
|
16322
16761
|
return;
|
|
16323
16762
|
}
|
|
@@ -16368,8 +16807,8 @@ const PDFViewerApplication = {
|
|
|
16368
16807
|
requestPresentationMode() {
|
|
16369
16808
|
this.pdfPresentationMode?.request();
|
|
16370
16809
|
},
|
|
16371
|
-
triggerPrinting() {
|
|
16372
|
-
if (this.supportsPrinting) {
|
|
16810
|
+
async triggerPrinting() {
|
|
16811
|
+
if (this.supportsPrinting && (await this._printPermissionPromise)) {
|
|
16373
16812
|
window.print();
|
|
16374
16813
|
}
|
|
16375
16814
|
},
|
|
@@ -16515,18 +16954,18 @@ const PDFViewerApplication = {
|
|
|
16515
16954
|
scrollTop: this._lastScrollTop,
|
|
16516
16955
|
scrollLeft: this._lastScrollLeft
|
|
16517
16956
|
} = mainContainer);
|
|
16957
|
+
let scrollendTimeoutID, scrollAbortController;
|
|
16518
16958
|
const scrollend = () => {
|
|
16519
16959
|
({
|
|
16520
16960
|
scrollTop: this._lastScrollTop,
|
|
16521
16961
|
scrollLeft: this._lastScrollLeft
|
|
16522
16962
|
} = mainContainer);
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
mainContainer.removeEventListener("blur", scrollend);
|
|
16963
|
+
clearTimeout(scrollendTimeoutID);
|
|
16964
|
+
if (this._isScrolling) {
|
|
16965
|
+
scrollAbortController.abort();
|
|
16966
|
+
scrollAbortController = null;
|
|
16967
|
+
this._isScrolling = false;
|
|
16968
|
+
}
|
|
16530
16969
|
};
|
|
16531
16970
|
const scroll = () => {
|
|
16532
16971
|
if (this._isCtrlKeyDown) {
|
|
@@ -16535,14 +16974,19 @@ const PDFViewerApplication = {
|
|
|
16535
16974
|
if (this._lastScrollTop === mainContainer.scrollTop && this._lastScrollLeft === mainContainer.scrollLeft) {
|
|
16536
16975
|
return;
|
|
16537
16976
|
}
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16977
|
+
if (!this._isScrolling) {
|
|
16978
|
+
scrollAbortController = new AbortController();
|
|
16979
|
+
const abortSignal = AbortSignal.any([scrollAbortController.signal, signal]);
|
|
16980
|
+
mainContainer.addEventListener("scrollend", scrollend, {
|
|
16981
|
+
signal: abortSignal
|
|
16982
|
+
});
|
|
16983
|
+
mainContainer.addEventListener("blur", scrollend, {
|
|
16984
|
+
signal: abortSignal
|
|
16985
|
+
});
|
|
16986
|
+
this._isScrolling = true;
|
|
16987
|
+
}
|
|
16988
|
+
clearTimeout(scrollendTimeoutID);
|
|
16989
|
+
scrollendTimeoutID = setTimeout(scrollend, 100);
|
|
16546
16990
|
};
|
|
16547
16991
|
mainContainer.addEventListener("scroll", scroll, {
|
|
16548
16992
|
passive: true,
|
|
@@ -17221,6 +17665,8 @@ function getViewerConfiguration() {
|
|
|
17221
17665
|
zoomIn: document.getElementById("zoomInButton"),
|
|
17222
17666
|
zoomOut: document.getElementById("zoomOutButton"),
|
|
17223
17667
|
print: document.getElementById("printButton"),
|
|
17668
|
+
editorCommentButton: document.getElementById("editorCommentButton"),
|
|
17669
|
+
editorCommentParamsToolbar: document.getElementById("editorCommentParamsToolbar"),
|
|
17224
17670
|
editorFreeTextButton: document.getElementById("editorFreeTextButton"),
|
|
17225
17671
|
editorFreeTextParamsToolbar: document.getElementById("editorFreeTextParamsToolbar"),
|
|
17226
17672
|
editorHighlightButton: document.getElementById("editorHighlightButton"),
|
|
@@ -17384,6 +17830,11 @@ function getViewerConfiguration() {
|
|
|
17384
17830
|
updateButton: document.getElementById("editSignatureUpdateButton")
|
|
17385
17831
|
},
|
|
17386
17832
|
annotationEditorParams: {
|
|
17833
|
+
editorCommentsSidebar: document.getElementById("editorCommentsSidebar"),
|
|
17834
|
+
editorCommentsSidebarCount: document.getElementById("editorCommentsSidebarCount"),
|
|
17835
|
+
editorCommentsSidebarTitle: document.getElementById("editorCommentsSidebarTitle"),
|
|
17836
|
+
editorCommentsSidebarCloseButton: document.getElementById("editorCommentsSidebarCloseButton"),
|
|
17837
|
+
editorCommentsSidebarList: document.getElementById("editorCommentsSidebarList"),
|
|
17387
17838
|
editorFreeTextFontSize: document.getElementById("editorFreeTextFontSize"),
|
|
17388
17839
|
editorFreeTextColor: document.getElementById("editorFreeTextColor"),
|
|
17389
17840
|
editorInkColor: document.getElementById("editorInkColor"),
|