@getflip/swirl-components-react 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{balancetext-31f1ec68.bd1c1b2d.js → balancetext-fa49c64f.754e913c.js} +1 -1
- package/dist/{file-manager.entry.313b8c7c.js → file-manager.entry.20ffe74a.js} +1 -1
- package/dist/index-d280dafb.186cdb0e.js +71 -0
- package/dist/index.771fb0bd.js +1424 -0
- package/dist/stencil-generated/index.d.ts +7 -0
- package/dist/{swirl-action-list-section.entry.d256aaab.js → swirl-action-list-section.entry.5552aa20.js} +1 -1
- package/dist/swirl-action-list_3.entry.4f943f70.js +89 -0
- package/dist/{swirl-app-layout_5.entry.e95b5db4.js → swirl-app-layout_5.entry.05c5b705.js} +15 -16
- package/dist/{swirl-autocomplete.entry.5dd8a0f2.js → swirl-autocomplete.entry.97b5c640.js} +3 -4
- package/dist/{swirl-avatar-group.entry.8a9e1a7a.js → swirl-avatar-group.entry.3a2a9e5a.js} +4 -5
- package/dist/{swirl-avatar.entry.d9305778.js → swirl-avatar.entry.c43f4681.js} +2 -3
- package/dist/{swirl-badge.entry.343617d0.js → swirl-badge.entry.7be0934d.js} +2 -3
- package/dist/{swirl-banner.entry.b456e6bc.js → swirl-banner.entry.1597d14a.js} +3 -4
- package/dist/{swirl-button-group.entry.e333895b.js → swirl-button-group.entry.dafcab95.js} +2 -3
- package/dist/{swirl-button.entry.2a618b68.js → swirl-button.entry.199c6a8a.js} +10 -8
- package/dist/{swirl-card.entry.9d9aa2af.js → swirl-card.entry.e5ed3c77.js} +2 -3
- package/dist/{swirl-checkbox.entry.4fb05d65.js → swirl-checkbox.entry.0600cd6f.js} +2 -3
- package/dist/{swirl-chip.entry.2acd5392.js → swirl-chip.entry.4f576f76.js} +3 -4
- package/dist/swirl-components-react.js +126 -119
- package/dist/swirl-components-react.umd.cjs +47 -44
- package/dist/{swirl-console-layout.entry.70af7d3d.js → swirl-console-layout.entry.ff15c1d4.js} +3 -4
- package/dist/{swirl-date-input.entry.74baafc1.js → swirl-date-input.entry.e5eb360e.js} +5 -6
- package/dist/{swirl-date-picker_2.entry.047e3cba.js → swirl-date-picker_2.entry.5f9e31e4.js} +2 -3
- package/dist/{swirl-description-list-item.entry.b0f47248.js → swirl-description-list-item.entry.f0c4e608.js} +1 -1
- package/dist/{swirl-description-list.entry.2a45d3ab.js → swirl-description-list.entry.0340fc1d.js} +1 -1
- package/dist/{swirl-dialog.entry.5d3e1fc6.js → swirl-dialog.entry.fab32668.js} +2 -3
- package/dist/{swirl-file-uploader.entry.dfc1d331.js → swirl-file-uploader.entry.ff6a732f.js} +2 -3
- package/dist/{swirl-file-viewer_7.entry.8582dc5b.js → swirl-file-viewer_7.entry.47672c19.js} +369 -348
- package/dist/{swirl-form-control.entry.9016a12e.js → swirl-form-control.entry.67eebaa3.js} +2 -3
- package/dist/{swirl-form-group.entry.acd21d5a.js → swirl-form-group.entry.695465dd.js} +2 -3
- package/dist/{swirl-heading.entry.d5f3f196.js → swirl-heading.entry.5a244e67.js} +3 -4
- package/dist/{swirl-icon-add-photo.entry.b6b8d145.js → swirl-icon-add-photo.entry.d7a58326.js} +2 -3
- package/dist/swirl-icon-add_6.entry.03d1eaf1.js +72 -0
- package/dist/{swirl-icon-admin-panel-settings.entry.cbf77079.js → swirl-icon-admin-panel-settings.entry.cdce67c5.js} +4 -5
- package/dist/{swirl-icon-arrow-back.entry.e1a7bbc0.js → swirl-icon-arrow-back.entry.64d10729.js} +6 -7
- package/dist/{swirl-icon-arrow-downward_2.entry.6e12407d.js → swirl-icon-arrow-downward_2.entry.b7a7d6cf.js} +2 -3
- package/dist/{swirl-icon-arrow-forward.entry.5e09833d.js → swirl-icon-arrow-forward.entry.1b3d6314.js} +5 -6
- package/dist/swirl-icon-arrow-left_4.entry.9e3544d8.js +50 -0
- package/dist/{swirl-icon-arrow-right-small.entry.e383ffa6.js → swirl-icon-arrow-right-small.entry.3b9ae0a5.js} +5 -6
- package/dist/{swirl-icon-attachment.entry.455a7bfe.js → swirl-icon-attachment.entry.f49c7730.js} +5 -6
- package/dist/{swirl-icon-block.entry.9f333c93.js → swirl-icon-block.entry.fa877db4.js} +7 -8
- package/dist/{swirl-icon-bookmark.entry.1e272909.js → swirl-icon-bookmark.entry.54962d28.js} +2 -3
- package/dist/{swirl-icon-cancel_4.entry.4f7ca0aa.js → swirl-icon-cancel_4.entry.50b58fee.js} +2 -3
- package/dist/{swirl-icon-chat-bubble.entry.52e69d49.js → swirl-icon-chat-bubble.entry.c2a076f7.js} +4 -5
- package/dist/{swirl-icon-chats-filled.entry.39ff452c.js → swirl-icon-chats-filled.entry.cd642800.js} +2 -3
- package/dist/{swirl-icon-chats-outlined.entry.5cb1eefb.js → swirl-icon-chats-outlined.entry.bd1131ca.js} +4 -5
- package/dist/{swirl-icon-check-circle.entry.6fa2ef87.js → swirl-icon-check-circle.entry.c190d70f.js} +2 -3
- package/dist/{swirl-icon-check-small_4.entry.1845bf2b.js → swirl-icon-check-small_4.entry.02540bd9.js} +3 -4
- package/dist/{swirl-icon-check-strong.entry.b623e034.js → swirl-icon-check-strong.entry.3591ce92.js} +6 -7
- package/dist/{swirl-icon-check.entry.4cf18b55.js → swirl-icon-check.entry.bba18e6f.js} +2 -3
- package/dist/{swirl-icon-chevron-left.entry.95060d93.js → swirl-icon-chevron-left.entry.fa824265.js} +5 -6
- package/dist/{swirl-icon-chevron-right.entry.b182e3e5.js → swirl-icon-chevron-right.entry.57bc9371.js} +2 -3
- package/dist/{swirl-icon-close-small.entry.22aaa0c5.js → swirl-icon-close-small.entry.8fff42b6.js} +2 -3
- package/dist/{swirl-icon-close.entry.49f6e45d.js → swirl-icon-close.entry.b9322bbe.js} +5 -6
- package/dist/{swirl-icon-cloud-upload.entry.7c482ec2.js → swirl-icon-cloud-upload.entry.0aab63e7.js} +2 -3
- package/dist/{swirl-icon-column.entry.9136436c.js → swirl-icon-column.entry.2f445faa.js} +7 -8
- package/dist/{swirl-icon-comment.entry.a632ad32.js → swirl-icon-comment.entry.aac07110.js} +2 -3
- package/dist/{swirl-icon-copy.entry.52c46124.js → swirl-icon-copy.entry.de91c57e.js} +5 -6
- package/dist/{swirl-icon-date-range.entry.fb774376.js → swirl-icon-date-range.entry.a806737d.js} +2 -3
- package/dist/{swirl-icon-delete.entry.5c80a345.js → swirl-icon-delete.entry.fe6cc703.js} +8 -9
- package/dist/{swirl-icon-description.entry.2cf0dc3c.js → swirl-icon-description.entry.f049a0cd.js} +2 -3
- package/dist/swirl-icon-double-arrow-left.entry.4a2f4dda.js +17 -0
- package/dist/swirl-icon-double-arrow-right.entry.6a34eb2b.js +17 -0
- package/dist/swirl-icon-download.entry.c41e4266.js +17 -0
- package/dist/{swirl-icon-edit.entry.bb5d32ba.js → swirl-icon-edit.entry.e9a07a85.js} +5 -6
- package/dist/{swirl-icon-emoji-mood.entry.367cc80a.js → swirl-icon-emoji-mood.entry.b74812b6.js} +5 -6
- package/dist/{swirl-icon-emoji-satisfied.entry.64f15ba2.js → swirl-icon-emoji-satisfied.entry.2e784849.js} +2 -3
- package/dist/{swirl-icon-error_3.entry.83dd8d6a.js → swirl-icon-error_3.entry.86558ef6.js} +7 -8
- package/dist/{swirl-icon-expand-more.entry.05277173.js → swirl-icon-expand-more.entry.857ce700.js} +5 -6
- package/dist/{swirl-icon-file.entry.3487ba9f.js → swirl-icon-file.entry.41af312e.js} +4 -5
- package/dist/{swirl-icon-filter.entry.66f49bc7.js → swirl-icon-filter.entry.40c17edf.js} +2 -3
- package/dist/{swirl-icon-folder-shared.entry.1e4cc5ed.js → swirl-icon-folder-shared.entry.f57cd35d.js} +2 -3
- package/dist/swirl-icon-folder.entry.7304ddef.js +17 -0
- package/dist/{swirl-icon-group-assign.entry.e546a3bc.js → swirl-icon-group-assign.entry.8fed9b9c.js} +5 -6
- package/dist/{swirl-icon-groups-custom.entry.714c1fde.js → swirl-icon-groups-custom.entry.edb72334.js} +2 -3
- package/dist/{swirl-icon-groups-filled.entry.d1324828.js → swirl-icon-groups-filled.entry.28994fb5.js} +6 -7
- package/dist/{swirl-icon-groups-outlined.entry.87201dd1.js → swirl-icon-groups-outlined.entry.a0514ed1.js} +2 -3
- package/dist/{swirl-icon-groups.entry.65eb994a.js → swirl-icon-groups.entry.79f63ae8.js} +5 -6
- package/dist/{swirl-icon-help.entry.b5a8b568.js → swirl-icon-help.entry.36866dc4.js} +5 -6
- package/dist/{swirl-icon-image.entry.978e1d21.js → swirl-icon-image.entry.b4d50f81.js} +2 -3
- package/dist/{swirl-icon-info.entry.e92e4c16.js → swirl-icon-info.entry.895b53ab.js} +6 -7
- package/dist/{swirl-icon-inventory.entry.969153d5.js → swirl-icon-inventory.entry.52b6a01e.js} +5 -6
- package/dist/{swirl-icon-like.entry.71c22713.js → swirl-icon-like.entry.8595b4ab.js} +6 -7
- package/dist/{swirl-icon-link.entry.2c60c940.js → swirl-icon-link.entry.19691045.js} +5 -6
- package/dist/{swirl-icon-lock.entry.9e0161e3.js → swirl-icon-lock.entry.c5baddde.js} +7 -8
- package/dist/{swirl-icon-logout.entry.c5381645.js → swirl-icon-logout.entry.589c9f3e.js} +2 -3
- package/dist/{swirl-icon-mail.entry.6c984822.js → swirl-icon-mail.entry.aa3a8071.js} +8 -9
- package/dist/{swirl-icon-manage-accounts.entry.f8fd3559.js → swirl-icon-manage-accounts.entry.5a3ac2bc.js} +2 -3
- package/dist/{swirl-icon-mention.entry.93d4f40c.js → swirl-icon-mention.entry.b3828dbe.js} +5 -6
- package/dist/{swirl-icon-menu-filled.entry.0c02b1e2.js → swirl-icon-menu-filled.entry.15601920.js} +2 -3
- package/dist/{swirl-icon-menu-outlined.entry.c5da01e4.js → swirl-icon-menu-outlined.entry.0ff1bcda.js} +6 -7
- package/dist/{swirl-icon-menu.entry.503c141a.js → swirl-icon-menu.entry.6b73dde5.js} +5 -6
- package/dist/{swirl-icon-message.entry.6db2caf8.js → swirl-icon-message.entry.6fb71047.js} +2 -3
- package/dist/{swirl-icon-more-horizontal.entry.b12378ac.js → swirl-icon-more-horizontal.entry.1546f87d.js} +2 -3
- package/dist/{swirl-icon-news-filled.entry.ad14a8c7.js → swirl-icon-news-filled.entry.693bbe99.js} +2 -3
- package/dist/{swirl-icon-news-outlined.entry.d98b0e06.js → swirl-icon-news-outlined.entry.c604bace.js} +4 -5
- package/dist/{swirl-icon-notifications-active.entry.1bf7fd92.js → swirl-icon-notifications-active.entry.d4f603a6.js} +4 -5
- package/dist/{swirl-icon-notifications-off.entry.58c97e94.js → swirl-icon-notifications-off.entry.dc93820a.js} +2 -3
- package/dist/{swirl-icon-notifications.entry.d2565cf0.js → swirl-icon-notifications.entry.b8238ff0.js} +2 -3
- package/dist/{swirl-icon-open-in-new.entry.086d5e74.js → swirl-icon-open-in-new.entry.03ae2b7f.js} +6 -7
- package/dist/{swirl-icon-people-alt.entry.265732c1.js → swirl-icon-people-alt.entry.125b2063.js} +2 -3
- package/dist/{swirl-icon-person-off.entry.9a6117a5.js → swirl-icon-person-off.entry.c43cbf3f.js} +2 -3
- package/dist/{swirl-icon-person.entry.d44bd845.js → swirl-icon-person.entry.08fda345.js} +2 -3
- package/dist/{swirl-icon-phone.entry.0e51e77d.js → swirl-icon-phone.entry.50dcf41d.js} +2 -3
- package/dist/{swirl-icon-poll.entry.645ec904.js → swirl-icon-poll.entry.26d3ba7d.js} +5 -6
- package/dist/{swirl-icon-print.entry.57381444.js → swirl-icon-print.entry.7fb7220a.js} +5 -6
- package/dist/{swirl-icon-recieved.entry.a54a0cca.js → swirl-icon-recieved.entry.16b6593b.js} +6 -7
- package/dist/{swirl-icon-search-strong.entry.13523840.js → swirl-icon-search-strong.entry.9520c399.js} +2 -3
- package/dist/{swirl-icon-search.entry.cd0e2efa.js → swirl-icon-search.entry.41f267f4.js} +2 -3
- package/dist/{swirl-icon-send.entry.92965ef4.js → swirl-icon-send.entry.33278242.js} +7 -8
- package/dist/{swirl-icon-settings.entry.647b9b9a.js → swirl-icon-settings.entry.e6005ffc.js} +2 -3
- package/dist/{swirl-icon-sync.entry.d8686f6d.js → swirl-icon-sync.entry.df437327.js} +5 -6
- package/dist/{swirl-icon-tasks-filled.entry.a0078629.js → swirl-icon-tasks-filled.entry.83c10995.js} +2 -3
- package/dist/{swirl-icon-tasks-outlined.entry.4d4692cd.js → swirl-icon-tasks-outlined.entry.087d7d78.js} +2 -3
- package/dist/{swirl-icon-time-filled.entry.9a53309f.js → swirl-icon-time-filled.entry.03f26736.js} +2 -3
- package/dist/{swirl-icon-time-outlined.entry.3ee9922f.js → swirl-icon-time-outlined.entry.d543c31e.js} +5 -6
- package/dist/{swirl-icon-user-assign.entry.25374fd6.js → swirl-icon-user-assign.entry.2c92778c.js} +5 -6
- package/dist/{swirl-icon-video-camera.entry.87e4d0f1.js → swirl-icon-video-camera.entry.8ede1b5a.js} +2 -3
- package/dist/{swirl-icon-warning.entry.84b2b545.js → swirl-icon-warning.entry.c20f10f2.js} +2 -3
- package/dist/swirl-lightbox.entry.38465d54.js +131 -0
- package/dist/{swirl-link.entry.68a6d594.js → swirl-link.entry.0fa816a4.js} +1 -1
- package/dist/{swirl-list.entry.5fbb2b14.js → swirl-list.entry.d0ba2cd0.js} +1 -1
- package/dist/{swirl-modal.entry.7206d1a3.js → swirl-modal.entry.ceaae69a.js} +2 -3
- package/dist/{swirl-option-list-section.entry.18baecf3.js → swirl-option-list-section.entry.04a3275e.js} +1 -1
- package/dist/{swirl-pagination.entry.c7542c36.js → swirl-pagination.entry.89c76bc8.js} +2 -3
- package/dist/swirl-pdf-reader.entry.afa81425.js +98 -0
- package/dist/{swirl-popover.entry.8d4ec220.js → swirl-popover.entry.06394ecc.js} +26 -27
- package/dist/{swirl-progress-indicator.entry.a4126e3f.js → swirl-progress-indicator.entry.3e6a995f.js} +2 -3
- package/dist/{swirl-radio-group.entry.15357364.js → swirl-radio-group.entry.87584edf.js} +1 -1
- package/dist/{swirl-radio.entry.4d612329.js → swirl-radio.entry.217a708e.js} +2 -3
- package/dist/{swirl-resource-list-file-item.entry.d49f71df.js → swirl-resource-list-file-item.entry.366c3ba6.js} +3 -4
- package/dist/{swirl-search.entry.64731720.js → swirl-search.entry.54eb832f.js} +3 -4
- package/dist/{swirl-select.entry.9eb2a7df.js → swirl-select.entry.cfed617a.js} +3 -4
- package/dist/swirl-shell-layout.entry.5235baf4.js +56 -0
- package/dist/swirl-shell-navigation-item.entry.18d99f7e.js +34 -0
- package/dist/{swirl-skeleton-box.entry.881f1103.js → swirl-skeleton-box.entry.f4774a3d.js} +2 -3
- package/dist/{swirl-skeleton-text.entry.d47af665.js → swirl-skeleton-text.entry.9f12dd3d.js} +2 -3
- package/dist/{swirl-stack.entry.1bf0bb6c.js → swirl-stack.entry.84603ec1.js} +2 -3
- package/dist/{swirl-switch.entry.20435526.js → swirl-switch.entry.c8a6a7af.js} +9 -10
- package/dist/{swirl-tab.entry.87ba443d.js → swirl-tab.entry.c69b60b9.js} +5 -6
- package/dist/{swirl-table-cell.entry.7e6ba90a.js → swirl-table-cell.entry.8ca65c35.js} +1 -1
- package/dist/{swirl-table-column.entry.8e52b72f.js → swirl-table-column.entry.3caaa152.js} +1 -1
- package/dist/{swirl-table-row-group.entry.0f0f8e4a.js → swirl-table-row-group.entry.bd156d99.js} +1 -1
- package/dist/{swirl-table-row.entry.1daca0eb.js → swirl-table-row.entry.104fd930.js} +5 -6
- package/dist/{swirl-table.entry.d064fe93.js → swirl-table.entry.14249ab1.js} +2 -2
- package/dist/{swirl-tabs.entry.accd4a02.js → swirl-tabs.entry.f76be575.js} +2 -3
- package/dist/{swirl-tag.entry.ad79f86e.js → swirl-tag.entry.5f83ab8e.js} +2 -3
- package/dist/{swirl-text-input.entry.bfcf4c41.js → swirl-text-input.entry.7a89bf47.js} +6 -7
- package/dist/{swirl-text.entry.733d285b.js → swirl-text.entry.4a39f34f.js} +5 -6
- package/dist/{swirl-theme-provider.entry.c1d97194.js → swirl-theme-provider.entry.ce1908b8.js} +1 -1
- package/dist/{swirl-toast-provider.entry.4caa1cfc.js → swirl-toast-provider.entry.0083a6ab.js} +1 -1
- package/dist/{swirl-toast.entry.3dcdd51a.js → swirl-toast.entry.6880e619.js} +6 -7
- package/dist/{swirl-tooltip.entry.eec54ec3.js → swirl-tooltip.entry.bc886575.js} +1 -1
- package/dist/{swirl-tree-navigation-item.entry.2fc51541.js → swirl-tree-navigation-item.entry.69bb84fc.js} +2 -3
- package/dist/{swirl-video-thumbnail.entry.45c89279.js → swirl-video-thumbnail.entry.70cf2d94.js} +1 -1
- package/dist/{swirl-visually-hidden.entry.8d718043.js → swirl-visually-hidden.entry.fa652e44.js} +1 -1
- package/dist/utils-61f188cc.4a43deab.js +52 -0
- package/dist/{wc-datepicker.entry.4ad085ad.js → wc-datepicker.entry.d8406594.js} +1 -1
- package/package.json +2 -2
- package/dist/_commonjsHelpers-10467d11.b7d83301.js +0 -37
- package/dist/index-47862d62.75c2fcf1.js +0 -37
- package/dist/index.6fe614c0.js +0 -1417
- package/dist/swirl-action-list-item.entry.fa699b60.js +0 -34
- package/dist/swirl-action-list.entry.fecb516a.js +0 -38
- package/dist/swirl-icon-add_4.entry.5d7cb42a.js +0 -51
- package/dist/swirl-icon-arrow-left_3.entry.dea508c8.js +0 -40
- package/dist/swirl-icon-more-vertikal.entry.590b40db.js +0 -18
- package/dist/swirl-lightbox.entry.50e168f2.js +0 -119
- package/dist/swirl-pdf-reader.entry.5736dbbf.js +0 -79
- package/dist/swirl-separator.entry.ac3a46cc.js +0 -15
- package/dist/swirl-thumbnail.entry.682af2ec.js +0 -18
- package/dist/utils-33d31b58.1488fcfe.js +0 -46
package/dist/{swirl-file-viewer_7.entry.8582dc5b.js → swirl-file-viewer_7.entry.47672c19.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import {
|
|
3
|
-
import { d as
|
|
1
|
+
import { r as jt, c as Rt, h as qe, H as $t, g as Qt } from "./index.771fb0bd.js";
|
|
2
|
+
import { a as cr, c as Qi, b as vt, g as Ji, d as qr, e as Zi } from "./index-d280dafb.186cdb0e.js";
|
|
3
|
+
import { d as ea, b as ta, i as ra } from "./utils-61f188cc.4a43deab.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
var
|
|
7
|
-
(function(Ie,
|
|
8
|
-
|
|
6
|
+
var na = cr(function(De, we) {
|
|
7
|
+
(function(Ie, Te) {
|
|
8
|
+
Te();
|
|
9
9
|
})(vt, function() {
|
|
10
10
|
function Ie(o, c) {
|
|
11
11
|
return typeof c > "u" ? c = { autoBom: !1 } : typeof c != "object" && (console.warn("Deprecated: Expected third argument to be a object"), c = { autoBom: !c }), c.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type) ? new Blob(["\uFEFF", o], { type: o.type }) : o;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Te(o, c, T) {
|
|
14
14
|
var R = new XMLHttpRequest();
|
|
15
15
|
R.open("GET", o), R.responseType = "blob", R.onload = function() {
|
|
16
16
|
n(R.response, c, T);
|
|
@@ -18,7 +18,7 @@ var ra = cr(function(De, Te) {
|
|
|
18
18
|
console.error("could not download file");
|
|
19
19
|
}, R.send();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Le(o) {
|
|
22
22
|
var c = new XMLHttpRequest();
|
|
23
23
|
c.open("HEAD", o, !1);
|
|
24
24
|
try {
|
|
@@ -38,7 +38,7 @@ var ra = cr(function(De, Te) {
|
|
|
38
38
|
var B = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof vt == "object" && vt.global === vt ? vt : void 0, v = B.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), n = B.saveAs || (typeof window != "object" || window !== B ? function() {
|
|
39
39
|
} : "download" in HTMLAnchorElement.prototype && !v ? function(o, c, T) {
|
|
40
40
|
var R = B.URL || B.webkitURL, O = document.createElement("a");
|
|
41
|
-
c = c || o.name || "download", O.download = c, O.rel = "noopener", typeof o == "string" ? (O.href = o, O.origin === location.origin ? Qe(O) :
|
|
41
|
+
c = c || o.name || "download", O.download = c, O.rel = "noopener", typeof o == "string" ? (O.href = o, O.origin === location.origin ? Qe(O) : Le(O.href) ? Te(o, c, T) : Qe(O, O.target = "_blank")) : (O.href = R.createObjectURL(o), setTimeout(function() {
|
|
42
42
|
R.revokeObjectURL(O.href);
|
|
43
43
|
}, 4e4), setTimeout(function() {
|
|
44
44
|
Qe(O);
|
|
@@ -46,8 +46,8 @@ var ra = cr(function(De, Te) {
|
|
|
46
46
|
} : "msSaveOrOpenBlob" in navigator ? function(o, c, T) {
|
|
47
47
|
if (c = c || o.name || "download", typeof o != "string")
|
|
48
48
|
navigator.msSaveOrOpenBlob(Ie(o, T), c);
|
|
49
|
-
else if (
|
|
50
|
-
|
|
49
|
+
else if (Le(o))
|
|
50
|
+
Te(o, c, T);
|
|
51
51
|
else {
|
|
52
52
|
var R = document.createElement("a");
|
|
53
53
|
R.href = o, R.target = "_blank", setTimeout(function() {
|
|
@@ -56,7 +56,7 @@ var ra = cr(function(De, Te) {
|
|
|
56
56
|
}
|
|
57
57
|
} : function(o, c, T, R) {
|
|
58
58
|
if (R = R || open("", "_blank"), R && (R.document.title = R.document.body.innerText = "downloading..."), typeof o == "string")
|
|
59
|
-
return
|
|
59
|
+
return Te(o, c, T);
|
|
60
60
|
var O = o.type === "application/octet-stream", P = /constructor/i.test(B.HTMLElement) || B.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
61
61
|
if ((m || O && P || v) && typeof FileReader < "u") {
|
|
62
62
|
var y = new FileReader();
|
|
@@ -74,28 +74,30 @@ var ra = cr(function(De, Te) {
|
|
|
74
74
|
B.saveAs = n.saveAs = n, De.exports = n;
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
const
|
|
77
|
+
const ia = ":host{display:block;width:100%;height:100%}:host *{box-sizing:border-box}.file-viewer{display:flex;width:100%;height:100%;justify-content:center;align-items:center}.file-viewer__file{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center}", aa = class {
|
|
78
78
|
constructor(De) {
|
|
79
|
-
|
|
80
|
-
this.activate.emit(
|
|
81
|
-
}, this.
|
|
79
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.visiblePagesChange = Rt(this, "visiblePagesChange", 7), this.onActivate = (we) => {
|
|
80
|
+
this.activate.emit(we.detail);
|
|
81
|
+
}, this.onVisiblePagesChange = (we) => {
|
|
82
|
+
this.visiblePagesChange.emit(we.detail);
|
|
83
|
+
}, this.active = !0, this.autoplay = void 0, this.description = void 0, this.errorMessage = "File could not be loaded.", this.file = void 0, this.thumbnailUrl = void 0, this.type = void 0, this.typeUnsupportedMessage = "File type is not supported.", this.viewMode = "single", this.zoom = 1;
|
|
82
84
|
}
|
|
83
85
|
async download() {
|
|
84
|
-
const De = this.file.split("/").pop(),
|
|
85
|
-
|
|
86
|
+
const De = this.file.split("/").pop(), we = await fetch(this.file);
|
|
87
|
+
na.saveAs(await we.blob(), De);
|
|
86
88
|
}
|
|
87
89
|
async print() {
|
|
88
90
|
this.type === "application/pdf" && this.viewer.print();
|
|
89
91
|
}
|
|
90
92
|
render() {
|
|
91
93
|
const De = !Boolean(this.type) || !this.type.startsWith("image/") && !this.type.startsWith("video/") && !this.type.startsWith("audio/") && this.type !== "text/plain" && this.type !== "text/csv" && this.type !== "application/pdf";
|
|
92
|
-
return qe($t, null, qe("div", { class: "file-viewer" }, this.type && this.active && qe("div", { class: "file-viewer__file" }, this.type.startsWith("image/") && qe("swirl-file-viewer-image", { description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (
|
|
94
|
+
return qe($t, null, qe("div", { class: "file-viewer" }, this.type && this.active && qe("div", { class: "file-viewer__file" }, this.type.startsWith("image/") && qe("swirl-file-viewer-image", { description: this.description, errorMessage: this.errorMessage, file: this.file, ref: (we) => this.viewer = we }), this.type === "text/plain" && qe("swirl-file-viewer-text", { errorMessage: this.errorMessage, file: this.file, ref: (we) => this.viewer = we }), this.type === "text/csv" && qe("swirl-file-viewer-csv", { errorMessage: this.errorMessage, file: this.file, ref: (we) => this.viewer = we }), this.type === "application/pdf" && qe("swirl-file-viewer-pdf", { errorMessage: this.errorMessage, file: this.file, onActivate: this.onActivate, onVisiblePagesChange: this.onVisiblePagesChange, ref: (we) => this.viewer = we, viewMode: this.viewMode, zoom: this.zoom }), this.type.startsWith("video/") && qe("swirl-file-viewer-video", { autoplay: this.autoplay, file: this.file, ref: (we) => this.viewer = we, type: this.type }), this.type.startsWith("audio/") && qe("swirl-file-viewer-audio", { autoplay: this.autoplay, file: this.file, ref: (we) => this.viewer = we, type: this.type }), De && qe("swirl-inline-error", { message: this.typeUnsupportedMessage }))));
|
|
93
95
|
}
|
|
94
96
|
};
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
+
aa.style = ia;
|
|
98
|
+
const sa = ":host{display:inline-flex;width:100%;height:100%}:host *{box-sizing:border-box}.file-viewer-audio__audio{width:100%;height:100%}", oa = class {
|
|
97
99
|
constructor(De) {
|
|
98
|
-
|
|
100
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.autoplay = void 0, this.file = void 0, this.type = void 0;
|
|
99
101
|
}
|
|
100
102
|
componentDidLoad() {
|
|
101
103
|
this.activate.emit(this.el);
|
|
@@ -107,30 +109,30 @@ const aa = ":host{display:inline-flex;width:100%;height:100%}:host *{box-sizing:
|
|
|
107
109
|
return Qt(this);
|
|
108
110
|
}
|
|
109
111
|
};
|
|
110
|
-
|
|
111
|
-
var
|
|
112
|
+
oa.style = sa;
|
|
113
|
+
var la = cr(function(De, we) {
|
|
112
114
|
/* @license
|
|
113
115
|
Papa Parse
|
|
114
116
|
v5.3.2
|
|
115
117
|
https://github.com/mholt/PapaParse
|
|
116
118
|
License: MIT
|
|
117
119
|
*/
|
|
118
|
-
(function(Ie,
|
|
119
|
-
De.exports =
|
|
120
|
+
(function(Ie, Te) {
|
|
121
|
+
De.exports = Te();
|
|
120
122
|
})(vt, function Ie() {
|
|
121
|
-
var
|
|
123
|
+
var Te = typeof self < "u" ? self : typeof window < "u" ? window : Te !== void 0 ? Te : {}, Le = !Te.document && !!Te.postMessage, Qe = Le && /blob:/i.test((Te.location || {}).protocol), B = {}, v = 0, n = { parse: function(p, b) {
|
|
122
124
|
var u = (b = b || {}).dynamicTyping || !1;
|
|
123
125
|
if (F(u) && (b.dynamicTypingFunction = u, u = {}), b.dynamicTyping = u, b.transform = !!F(b.transform) && b.transform, b.worker && n.WORKERS_SUPPORTED) {
|
|
124
126
|
var t = function() {
|
|
125
127
|
if (!n.WORKERS_SUPPORTED)
|
|
126
128
|
return !1;
|
|
127
|
-
var f = (E =
|
|
129
|
+
var f = (E = Te.URL || Te.webkitURL || null, W = Ie.toString(), n.BLOB_URL || (n.BLOB_URL = E.createObjectURL(new Blob(["(", W, ")();"], { type: "text/javascript" })))), g = new Te.Worker(f), E, W;
|
|
128
130
|
return g.onmessage = r, g.id = v++, B[g.id] = g;
|
|
129
131
|
}();
|
|
130
132
|
return t.userStep = b.step, t.userChunk = b.chunk, t.userComplete = b.complete, t.userError = b.error, b.step = F(b.step), b.chunk = F(b.chunk), b.complete = F(b.complete), b.error = F(b.error), delete b.worker, void t.postMessage({ input: p, config: b, workerId: t.id });
|
|
131
133
|
}
|
|
132
134
|
var a = null;
|
|
133
|
-
return typeof p == "string" ? a = b.download ? new T(b) : new O(b) : p.readable === !0 && F(p.read) && F(p.on) ? a = new P(b) : (
|
|
135
|
+
return typeof p == "string" ? a = b.download ? new T(b) : new O(b) : p.readable === !0 && F(p.read) && F(p.on) ? a = new P(b) : (Te.File && p instanceof File || p instanceof Object) && (a = new R(b)), a.stream(p);
|
|
134
136
|
}, unparse: function(p, b) {
|
|
135
137
|
var u = !1, t = !0, a = ",", f = `\r
|
|
136
138
|
`, g = '"', E = g + g, W = !1, k = null, ne = !1;
|
|
@@ -201,12 +203,12 @@ var oa = cr(function(De, Te) {
|
|
|
201
203
|
}
|
|
202
204
|
} };
|
|
203
205
|
if (n.RECORD_SEP = String.fromCharCode(30), n.UNIT_SEP = String.fromCharCode(31), n.BYTE_ORDER_MARK = "\uFEFF", n.BAD_DELIMITERS = ["\r", `
|
|
204
|
-
`, '"', n.BYTE_ORDER_MARK], n.WORKERS_SUPPORTED = !
|
|
205
|
-
var o =
|
|
206
|
+
`, '"', n.BYTE_ORDER_MARK], n.WORKERS_SUPPORTED = !Le && !!Te.Worker, n.NODE_STREAM_INPUT = 1, n.LocalChunkSize = 10485760, n.RemoteChunkSize = 5242880, n.DefaultDelimiter = ",", n.Parser = D, n.ParserHandle = m, n.NetworkStreamer = T, n.FileStreamer = R, n.StringStreamer = O, n.ReadableStreamStreamer = P, Te.jQuery) {
|
|
207
|
+
var o = Te.jQuery;
|
|
206
208
|
o.fn.parse = function(p) {
|
|
207
209
|
var b = p.config || {}, u = [];
|
|
208
210
|
return this.each(function(f) {
|
|
209
|
-
if (!(o(this).prop("tagName").toUpperCase() === "INPUT" && o(this).attr("type").toLowerCase() === "file" &&
|
|
211
|
+
if (!(o(this).prop("tagName").toUpperCase() === "INPUT" && o(this).attr("type").toLowerCase() === "file" && Te.FileReader) || !this.files || this.files.length === 0)
|
|
210
212
|
return !0;
|
|
211
213
|
for (var g = 0; g < this.files.length; g++)
|
|
212
214
|
u.push({ file: this.files[g], inputElem: this, instanceConfig: o.extend({}, b) });
|
|
@@ -255,7 +257,7 @@ var oa = cr(function(De, Te) {
|
|
|
255
257
|
this._finished || (this._partialLine = a.substring(g - this._baseIndex), this._baseIndex = g), f && f.data && (this._rowCount += f.data.length);
|
|
256
258
|
var E = this._finished || this._config.preview && this._rowCount >= this._config.preview;
|
|
257
259
|
if (Qe)
|
|
258
|
-
|
|
260
|
+
Te.postMessage({ results: f, workerId: n.WORKER_ID, finished: E });
|
|
259
261
|
else if (F(this._config.chunk) && !u) {
|
|
260
262
|
if (this._config.chunk(f, this._handle), this._handle.paused() || this._handle.aborted())
|
|
261
263
|
return void (this._halted = !0);
|
|
@@ -265,12 +267,12 @@ var oa = cr(function(De, Te) {
|
|
|
265
267
|
}
|
|
266
268
|
this._halted = !0;
|
|
267
269
|
}, this._sendError = function(b) {
|
|
268
|
-
F(this._config.error) ? this._config.error(b) : Qe && this._config.error &&
|
|
270
|
+
F(this._config.error) ? this._config.error(b) : Qe && this._config.error && Te.postMessage({ workerId: n.WORKER_ID, error: b, finished: !1 });
|
|
269
271
|
};
|
|
270
272
|
}
|
|
271
273
|
function T(p) {
|
|
272
274
|
var b;
|
|
273
|
-
(p = p || {}).chunkSize || (p.chunkSize = n.RemoteChunkSize), c.call(this, p), this._nextChunk =
|
|
275
|
+
(p = p || {}).chunkSize || (p.chunkSize = n.RemoteChunkSize), c.call(this, p), this._nextChunk = Le ? function() {
|
|
274
276
|
this._readChunk(), this._chunkLoaded();
|
|
275
277
|
} : function() {
|
|
276
278
|
this._readChunk();
|
|
@@ -280,7 +282,7 @@ var oa = cr(function(De, Te) {
|
|
|
280
282
|
if (this._finished)
|
|
281
283
|
this._chunkLoaded();
|
|
282
284
|
else {
|
|
283
|
-
if (b = new XMLHttpRequest(), this._config.withCredentials && (b.withCredentials = this._config.withCredentials),
|
|
285
|
+
if (b = new XMLHttpRequest(), this._config.withCredentials && (b.withCredentials = this._config.withCredentials), Le || (b.onload = w(this._chunkLoaded, this), b.onerror = w(this._chunkError, this)), b.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !Le), this._config.downloadRequestHeaders) {
|
|
284
286
|
var u = this._config.downloadRequestHeaders;
|
|
285
287
|
for (var t in u)
|
|
286
288
|
b.setRequestHeader(t, u[t]);
|
|
@@ -294,7 +296,7 @@ var oa = cr(function(De, Te) {
|
|
|
294
296
|
} catch (f) {
|
|
295
297
|
this._chunkError(f.message);
|
|
296
298
|
}
|
|
297
|
-
|
|
299
|
+
Le && b.status === 0 && this._chunkError();
|
|
298
300
|
}
|
|
299
301
|
}, this._chunkLoaded = function() {
|
|
300
302
|
b.readyState === 4 && (b.status < 200 || 400 <= b.status ? this._chunkError() : (this._start += this._config.chunkSize ? this._config.chunkSize : b.responseText.length, this._finished = !this._config.chunkSize || this._start >= function(u) {
|
|
@@ -630,20 +632,20 @@ var oa = cr(function(De, Te) {
|
|
|
630
632
|
function F(p) {
|
|
631
633
|
return typeof p == "function";
|
|
632
634
|
}
|
|
633
|
-
return Qe && (
|
|
635
|
+
return Qe && (Te.onmessage = function(p) {
|
|
634
636
|
var b = p.data;
|
|
635
637
|
if (n.WORKER_ID === void 0 && b && (n.WORKER_ID = b.workerId), typeof b.input == "string")
|
|
636
|
-
|
|
637
|
-
else if (
|
|
638
|
+
Te.postMessage({ workerId: n.WORKER_ID, results: n.parse(b.input, b.config), finished: !0 });
|
|
639
|
+
else if (Te.File && b.input instanceof File || b.input instanceof Object) {
|
|
638
640
|
var u = n.parse(b.input, b.config);
|
|
639
|
-
u &&
|
|
641
|
+
u && Te.postMessage({ workerId: n.WORKER_ID, results: u, finished: !0 });
|
|
640
642
|
}
|
|
641
643
|
}), (T.prototype = Object.create(c.prototype)).constructor = T, (R.prototype = Object.create(c.prototype)).constructor = R, (O.prototype = Object.create(O.prototype)).constructor = O, (P.prototype = Object.create(c.prototype)).constructor = P, n;
|
|
642
644
|
});
|
|
643
645
|
});
|
|
644
|
-
const
|
|
646
|
+
const ca = ":host{position:relative;display:inline-flex;width:100%;max-height:100%}:host *{box-sizing:border-box}.file-viewer-csv__csv{overflow:auto;width:100%;max-height:100%;padding:var(--s-space-16);background-color:var(--s-background-default)}.file-viewer-csv__table{margin-right:auto;margin-left:auto;border-collapse:collapse;line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.file-viewer-csv__table{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.file-viewer-csv__cell{padding:var(--s-space-8);border:var(--s-border-width-default) solid var(--s-border-default)}.file-viewer-csv__spinner{position:absolute;display:flex;justify-content:center;align-items:center;background-color:rgba(0, 0, 0, 0.2);inset:0}.file-viewer-csv__error{position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}", ua = class {
|
|
645
647
|
constructor(De) {
|
|
646
|
-
|
|
648
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.errorMessage = "File could not be loaded.", this.file = void 0, this.data = void 0, this.error = void 0, this.loading = void 0;
|
|
647
649
|
}
|
|
648
650
|
componentWillLoad() {
|
|
649
651
|
this.updateTable();
|
|
@@ -655,7 +657,7 @@ const la = ":host{position:relative;display:inline-flex;width:100%;max-height:10
|
|
|
655
657
|
var De;
|
|
656
658
|
this.error = !1, this.loading = !0;
|
|
657
659
|
try {
|
|
658
|
-
const
|
|
660
|
+
const we = await fetch(this.file), Ie = la.parse(await we.text(), {
|
|
659
661
|
dynamicTyping: !0,
|
|
660
662
|
fastMode: !1,
|
|
661
663
|
skipEmptyLines: !0
|
|
@@ -671,7 +673,7 @@ const la = ":host{position:relative;display:inline-flex;width:100%;max-height:10
|
|
|
671
673
|
}
|
|
672
674
|
render() {
|
|
673
675
|
var De;
|
|
674
|
-
return qe($t, { class: "file-viewer-csv", exportparts: "file-viewer-csv__table" }, this.error && qe("swirl-inline-error", { class: "file-viewer-csv__error", message: this.errorMessage }), qe("div", { class: "file-viewer-csv__csv", tabIndex: 0 }, qe("table", { class: "file-viewer-csv__table", part: "file-viewer-csv__table" }, qe("tbody", null, (De = this.data) === null || De === void 0 ? void 0 : De.map((
|
|
676
|
+
return qe($t, { class: "file-viewer-csv", exportparts: "file-viewer-csv__table" }, this.error && qe("swirl-inline-error", { class: "file-viewer-csv__error", message: this.errorMessage }), qe("div", { class: "file-viewer-csv__csv", tabIndex: 0 }, qe("table", { class: "file-viewer-csv__table", part: "file-viewer-csv__table" }, qe("tbody", null, (De = this.data) === null || De === void 0 ? void 0 : De.map((we, Ie) => qe("tr", { class: "file-viewer-csv__row", key: `row-${Ie}` }, we.map((Te, Le) => qe("td", { class: "file-viewer-csv__cell", key: `cell-${Ie}-${Le}` }, Te))))))), this.loading && qe("div", { class: "file-viewer-csv__spinner" }, qe("swirl-spinner", null)));
|
|
675
677
|
}
|
|
676
678
|
get el() {
|
|
677
679
|
return Qt(this);
|
|
@@ -682,64 +684,64 @@ const la = ":host{position:relative;display:inline-flex;width:100%;max-height:10
|
|
|
682
684
|
};
|
|
683
685
|
}
|
|
684
686
|
};
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
+
ua.style = ca;
|
|
688
|
+
const da = ":host{position:relative;display:inline-flex;max-height:100%}:host *{box-sizing:border-box}.file-viewer-image__image{max-width:100%;-o-object-fit:contain;object-fit:contain}.file-viewer-image__spinner{position:absolute;display:flex;justify-content:center;align-items:center;background-color:rgba(0, 0, 0, 0.2);inset:0}.file-viewer-image__error{position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}", ha = class {
|
|
687
689
|
constructor(De) {
|
|
688
|
-
|
|
690
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.panX = 0, this.panY = 0, this.zoom = 1, this.onError = () => {
|
|
689
691
|
this.error = !0, this.loading = !1;
|
|
690
692
|
}, this.onLoad = () => {
|
|
691
693
|
this.error = !1, this.loading = !1;
|
|
692
|
-
}, this.onDblClick = (
|
|
693
|
-
this.clickToZoom(
|
|
694
|
-
}, this.onWheel = (
|
|
695
|
-
|
|
696
|
-
const Ie = Math.min(Math.max(1, this.zoom + -1 *
|
|
694
|
+
}, this.onDblClick = (we) => {
|
|
695
|
+
this.clickToZoom(we);
|
|
696
|
+
}, this.onWheel = (we) => {
|
|
697
|
+
we.preventDefault();
|
|
698
|
+
const Ie = Math.min(Math.max(1, this.zoom + -1 * we.deltaY / 100), this.maxZoom);
|
|
697
699
|
if (Ie === this.zoom)
|
|
698
700
|
return;
|
|
699
|
-
const
|
|
700
|
-
this.updateTransformOrigin(
|
|
701
|
-
}, this.onPointerDown = (
|
|
702
|
-
this.startPan(
|
|
703
|
-
}, this.onPointerMove = (
|
|
704
|
-
this.pan(
|
|
701
|
+
const Te = we.offsetX, Le = we.offsetY;
|
|
702
|
+
this.updateTransformOrigin(Te, Le), this.updateZoomAndPan(Ie, 0, 0);
|
|
703
|
+
}, this.onPointerDown = (we) => {
|
|
704
|
+
this.startPan(we);
|
|
705
|
+
}, this.onPointerMove = (we) => {
|
|
706
|
+
this.pan(we);
|
|
705
707
|
}, this.onPointerUp = () => {
|
|
706
708
|
this.endPan();
|
|
707
|
-
}, this.onTouchStart = (
|
|
708
|
-
|
|
709
|
-
}, this.onTouchMove = (
|
|
710
|
-
|
|
711
|
-
}, this.onTouchEnd = (
|
|
712
|
-
|
|
713
|
-
}, this.startPinchToZoom = (
|
|
714
|
-
!Boolean(this.imageEl) || (this.pinchDistance = this.getPinchDistance(
|
|
715
|
-
}, this.pinchToZoom = (
|
|
716
|
-
const Ie = this.getPinchDistance(
|
|
717
|
-
this.zoom !==
|
|
709
|
+
}, this.onTouchStart = (we) => {
|
|
710
|
+
we.preventDefault(), we.touches.length === 2 && this.startPinchToZoom(we);
|
|
711
|
+
}, this.onTouchMove = (we) => {
|
|
712
|
+
we.preventDefault(), this.pinching && this.pinchToZoom(we);
|
|
713
|
+
}, this.onTouchEnd = (we) => {
|
|
714
|
+
we.preventDefault(), this.pinching && this.endPinchToZoom();
|
|
715
|
+
}, this.startPinchToZoom = (we) => {
|
|
716
|
+
!Boolean(this.imageEl) || (this.pinchDistance = this.getPinchDistance(we), this.pinching = !0);
|
|
717
|
+
}, this.pinchToZoom = (we) => {
|
|
718
|
+
const Ie = this.getPinchDistance(we) - this.pinchDistance, Te = Math.min(Math.max(1, this.zoom + Ie / 100), this.maxZoom);
|
|
719
|
+
this.zoom !== Te && (this.pinchDistance = this.getPinchDistance(we), this.updateZoomAndPan(Te));
|
|
718
720
|
}, this.endPinchToZoom = () => {
|
|
719
721
|
this.pinching = !1, Math.abs(this.zoom - 1) < 0.2 && (this.zoom = 1, this.imageEl.style.transform = "");
|
|
720
|
-
}, this.getPinchDistance = (
|
|
722
|
+
}, this.getPinchDistance = (we) => Math.hypot(we.touches[0].pageX - we.touches[1].pageX, we.touches[0].pageY - we.touches[1].pageY), this.clickToZoom = (we) => {
|
|
721
723
|
if (!(navigator.maxTouchPoints > 1))
|
|
722
724
|
if (this.zoom === 1) {
|
|
723
|
-
const
|
|
724
|
-
this.updateTransformOrigin(
|
|
725
|
+
const Te = we.pageX - this.el.getBoundingClientRect().x, Le = we.pageY - this.el.getBoundingClientRect().y;
|
|
726
|
+
this.updateTransformOrigin(Te, Le), this.updateZoomAndPan(2);
|
|
725
727
|
} else
|
|
726
728
|
this.updateZoomAndPan(1);
|
|
727
|
-
}, this.updateZoomAndPan = (
|
|
728
|
-
const
|
|
729
|
-
this.zoom =
|
|
729
|
+
}, this.updateZoomAndPan = (we, Ie, Te) => {
|
|
730
|
+
const Le = we === void 0 ? this.zoom : we, Qe = Le - this.zoom, B = Ie === void 0 ? this.panX + this.panX * Qe : Ie, v = Ie === void 0 ? this.panY + this.panY * Qe : Te, n = this.panX, o = this.panY;
|
|
731
|
+
this.zoom = Le, this.panX = B, this.panY = v;
|
|
730
732
|
const c = (this.el.parentElement || this.el).getBoundingClientRect(), T = this.imageEl.getBoundingClientRect(), R = T.right < c.right && B < n || T.left > c.left && B > n, O = T.bottom < c.bottom && v < o || T.top > c.top && v > o;
|
|
731
733
|
R && (this.panX = n), O && (this.panY = o), this.zoom === 1 && (this.panX = 0, this.panY = 0), this.imageEl.style.transform = `matrix(${this.zoom}, 0, 0, ${this.zoom}, ${this.panX}, ${this.panY})`;
|
|
732
|
-
}, this.updateTransformOrigin = (
|
|
733
|
-
this.transformOriginX =
|
|
734
|
-
}, this.startPan = (
|
|
735
|
-
this.panning = !0, this.previousScreenX =
|
|
736
|
-
}, this.pan = (
|
|
737
|
-
const Ie = this.previousScreenX || 0,
|
|
738
|
-
if (this.previousScreenX =
|
|
734
|
+
}, this.updateTransformOrigin = (we, Ie) => {
|
|
735
|
+
this.transformOriginX = we, this.transformOriginY = Ie, this.imageEl.style.transformOrigin = `${this.transformOriginX}px ${this.transformOriginY}px`;
|
|
736
|
+
}, this.startPan = (we) => {
|
|
737
|
+
this.panning = !0, this.previousScreenX = we.screenX, this.previousScreenY = we.screenY;
|
|
738
|
+
}, this.pan = (we) => {
|
|
739
|
+
const Ie = this.previousScreenX || 0, Te = this.previousScreenY || 0;
|
|
740
|
+
if (this.previousScreenX = we.screenX, this.previousScreenY = we.screenY, !this.panning || this.pinching)
|
|
739
741
|
return;
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
this.updateZoomAndPan(this.zoom,
|
|
742
|
+
we.preventDefault();
|
|
743
|
+
const Le = this.panX + we.screenX - Ie, Qe = this.panY + we.screenY - Te;
|
|
744
|
+
this.updateZoomAndPan(this.zoom, Le, Qe);
|
|
743
745
|
}, this.endPan = () => {
|
|
744
746
|
this.panning = !1;
|
|
745
747
|
}, this.description = "", this.errorMessage = "File could not be loaded.", this.file = void 0, this.maxZoom = 3, this.error = void 0, this.loading = !0;
|
|
@@ -768,15 +770,15 @@ const ua = ":host{position:relative;display:inline-flex;max-height:100%}:host *{
|
|
|
768
770
|
};
|
|
769
771
|
}
|
|
770
772
|
};
|
|
771
|
-
|
|
772
|
-
var
|
|
773
|
+
ha.style = da;
|
|
774
|
+
var fa = cr(function(De, we) {
|
|
773
775
|
/*!
|
|
774
776
|
* DOMMatrix v1.0.3 (https://thednp.github.io/dommatrix/)
|
|
775
777
|
* Copyright 2022 © thednp
|
|
776
778
|
* Licensed under MIT (https://github.com/thednp/DOMMatrix/blob/master/LICENSE)
|
|
777
779
|
*/
|
|
778
|
-
(function(Ie,
|
|
779
|
-
De.exports =
|
|
780
|
+
(function(Ie, Te) {
|
|
781
|
+
De.exports = Te();
|
|
780
782
|
})(vt, function() {
|
|
781
783
|
function Ie(r) {
|
|
782
784
|
var l = new P(), A = Array.from(r);
|
|
@@ -794,7 +796,7 @@ var ha = cr(function(De, Te) {
|
|
|
794
796
|
throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");
|
|
795
797
|
return l;
|
|
796
798
|
}
|
|
797
|
-
function
|
|
799
|
+
function Te(r) {
|
|
798
800
|
var l = Object.keys(new P());
|
|
799
801
|
if (typeof r == "object" && l.every(function(A) {
|
|
800
802
|
return A in r;
|
|
@@ -821,7 +823,7 @@ var ha = cr(function(De, Te) {
|
|
|
821
823
|
);
|
|
822
824
|
throw TypeError('CSSMatrix: "' + JSON.stringify(r) + '" is not a DOMMatrix / CSSMatrix / JSON compatible object.');
|
|
823
825
|
}
|
|
824
|
-
function
|
|
826
|
+
function Le(r) {
|
|
825
827
|
if (typeof r != "string")
|
|
826
828
|
throw TypeError('CSSMatrix: "' + r + '" is not a string.');
|
|
827
829
|
var l = String(r).replace(/\s/g, ""), A = new P(), h = 'CSSMatrix: invalid transform string "' + r + '"';
|
|
@@ -999,11 +1001,11 @@ var ha = cr(function(De, Te) {
|
|
|
999
1001
|
return r.m31 === 0 && r.m32 === 0 && r.m33 === 1 && r.m34 === 0 && r.m43 === 0 && r.m44 === 1;
|
|
1000
1002
|
}, P.prototype.setMatrixValue = function(l) {
|
|
1001
1003
|
var A = this;
|
|
1002
|
-
return typeof l == "string" && l.length && l !== "none" ?
|
|
1004
|
+
return typeof l == "string" && l.length && l !== "none" ? Le(l) : [Array, Float64Array, Float32Array].some(function(h) {
|
|
1003
1005
|
return l instanceof h;
|
|
1004
1006
|
}) ? Ie(l) : [P, DOMMatrix, Object].some(function(h) {
|
|
1005
1007
|
return l instanceof h;
|
|
1006
|
-
}) ?
|
|
1008
|
+
}) ? Te(l) : A;
|
|
1007
1009
|
}, P.prototype.toFloat32Array = function(l) {
|
|
1008
1010
|
return Float32Array.from(Qe(this, l));
|
|
1009
1011
|
}, P.prototype.toFloat64Array = function(l) {
|
|
@@ -1055,21 +1057,21 @@ var ha = cr(function(De, Te) {
|
|
|
1055
1057
|
Skew: c,
|
|
1056
1058
|
Multiply: O,
|
|
1057
1059
|
fromArray: Ie,
|
|
1058
|
-
fromMatrix:
|
|
1059
|
-
fromString:
|
|
1060
|
+
fromMatrix: Te,
|
|
1061
|
+
fromString: Le,
|
|
1060
1062
|
toArray: Qe
|
|
1061
1063
|
});
|
|
1062
1064
|
var y = "1.0.3", D = y;
|
|
1063
1065
|
return Object.assign(P, { Version: D }), P;
|
|
1064
1066
|
});
|
|
1065
|
-
}),
|
|
1066
|
-
(function(Ie,
|
|
1067
|
-
we
|
|
1067
|
+
}), pa = cr(function(De, we) {
|
|
1068
|
+
(function(Ie, Te) {
|
|
1069
|
+
Te(we);
|
|
1068
1070
|
})(vt, function(Ie) {
|
|
1069
|
-
var
|
|
1071
|
+
var Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol : function(e) {
|
|
1070
1072
|
return "Symbol(" + e + ")";
|
|
1071
1073
|
};
|
|
1072
|
-
function
|
|
1074
|
+
function Le() {
|
|
1073
1075
|
}
|
|
1074
1076
|
function Qe() {
|
|
1075
1077
|
if (typeof self < "u")
|
|
@@ -1083,7 +1085,7 @@ var ha = cr(function(De, Te) {
|
|
|
1083
1085
|
function v(e) {
|
|
1084
1086
|
return typeof e == "object" && e !== null || typeof e == "function";
|
|
1085
1087
|
}
|
|
1086
|
-
var n =
|
|
1088
|
+
var n = Le, o = Promise, c = Promise.prototype.then, T = Promise.resolve.bind(o), R = Promise.reject.bind(o);
|
|
1087
1089
|
function O(e) {
|
|
1088
1090
|
return new o(e);
|
|
1089
1091
|
}
|
|
@@ -1195,7 +1197,7 @@ var ha = cr(function(De, Te) {
|
|
|
1195
1197
|
function re(e) {
|
|
1196
1198
|
e._closedPromise_resolve !== void 0 && (e._closedPromise_resolve(void 0), e._closedPromise_resolve = void 0, e._closedPromise_reject = void 0);
|
|
1197
1199
|
}
|
|
1198
|
-
var Z =
|
|
1200
|
+
var Z = Te("[[AbortSteps]]"), z = Te("[[ErrorSteps]]"), $ = Te("[[CancelSteps]]"), U = Te("[[PullSteps]]"), I = Number.isFinite || function(e) {
|
|
1199
1201
|
return typeof e == "number" && isFinite(e);
|
|
1200
1202
|
}, ee = Math.trunc || function(e) {
|
|
1201
1203
|
return e < 0 ? Math.ceil(e) : Math.floor(e);
|
|
@@ -1244,7 +1246,7 @@ var ha = cr(function(De, Te) {
|
|
|
1244
1246
|
return !I(pe) || pe === 0 ? 0 : pe;
|
|
1245
1247
|
}
|
|
1246
1248
|
function M(e, i) {
|
|
1247
|
-
if (!
|
|
1249
|
+
if (!Mt(e))
|
|
1248
1250
|
throw new TypeError(i + " is not a ReadableStream.");
|
|
1249
1251
|
}
|
|
1250
1252
|
function L(e) {
|
|
@@ -1266,7 +1268,7 @@ var ha = cr(function(De, Te) {
|
|
|
1266
1268
|
}
|
|
1267
1269
|
var he = function() {
|
|
1268
1270
|
function e(i) {
|
|
1269
|
-
if (S(i, 1, "ReadableStreamDefaultReader"), M(i, "First parameter"),
|
|
1271
|
+
if (S(i, 1, "ReadableStreamDefaultReader"), M(i, "First parameter"), Ft(i))
|
|
1270
1272
|
throw new TypeError("This stream has already been locked for exclusive reading by another reader");
|
|
1271
1273
|
t(this, i), this._readRequests = new u();
|
|
1272
1274
|
}
|
|
@@ -1312,7 +1314,7 @@ var ha = cr(function(De, Te) {
|
|
|
1312
1314
|
read: { enumerable: !0 },
|
|
1313
1315
|
releaseLock: { enumerable: !0 },
|
|
1314
1316
|
closed: { enumerable: !0 }
|
|
1315
|
-
}), typeof
|
|
1317
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(he.prototype, Te.toStringTag, {
|
|
1316
1318
|
value: "ReadableStreamDefaultReader",
|
|
1317
1319
|
configurable: !0
|
|
1318
1320
|
});
|
|
@@ -1327,9 +1329,9 @@ var ha = cr(function(De, Te) {
|
|
|
1327
1329
|
return new TypeError("ReadableStreamDefaultReader.prototype." + e + " can only be used on a ReadableStreamDefaultReader");
|
|
1328
1330
|
}
|
|
1329
1331
|
var _e, Ce;
|
|
1330
|
-
typeof
|
|
1332
|
+
typeof Te.asyncIterator == "symbol" && (Ce = (_e = {}, _e[Te.asyncIterator] = function() {
|
|
1331
1333
|
return this;
|
|
1332
|
-
}, _e), Object.defineProperty(Ce,
|
|
1334
|
+
}, _e), Object.defineProperty(Ce, Te.asyncIterator, { enumerable: !1 }));
|
|
1333
1335
|
var Oe = function() {
|
|
1334
1336
|
function e(i, x) {
|
|
1335
1337
|
this._ongoingPromise = void 0, this._isFinished = !1, this._reader = i, this._preventCancel = x;
|
|
@@ -1480,7 +1482,7 @@ var ha = cr(function(De, Te) {
|
|
|
1480
1482
|
respond: { enumerable: !0 },
|
|
1481
1483
|
respondWithNewView: { enumerable: !0 },
|
|
1482
1484
|
view: { enumerable: !0 }
|
|
1483
|
-
}), typeof
|
|
1485
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(ae.prototype, Te.toStringTag, {
|
|
1484
1486
|
value: "ReadableStreamBYOBRequest",
|
|
1485
1487
|
configurable: !0
|
|
1486
1488
|
});
|
|
@@ -1492,7 +1494,7 @@ var ha = cr(function(De, Te) {
|
|
|
1492
1494
|
get: function() {
|
|
1493
1495
|
if (!We(this))
|
|
1494
1496
|
throw Jt("byobRequest");
|
|
1495
|
-
return
|
|
1497
|
+
return xt(this);
|
|
1496
1498
|
},
|
|
1497
1499
|
enumerable: !1,
|
|
1498
1500
|
configurable: !0
|
|
@@ -1500,7 +1502,7 @@ var ha = cr(function(De, Te) {
|
|
|
1500
1502
|
get: function() {
|
|
1501
1503
|
if (!We(this))
|
|
1502
1504
|
throw Jt("desiredSize");
|
|
1503
|
-
return
|
|
1505
|
+
return Lt(this);
|
|
1504
1506
|
},
|
|
1505
1507
|
enumerable: !1,
|
|
1506
1508
|
configurable: !0
|
|
@@ -1575,7 +1577,7 @@ var ha = cr(function(De, Te) {
|
|
|
1575
1577
|
error: { enumerable: !0 },
|
|
1576
1578
|
byobRequest: { enumerable: !0 },
|
|
1577
1579
|
desiredSize: { enumerable: !0 }
|
|
1578
|
-
}), typeof
|
|
1580
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(be.prototype, Te.toStringTag, {
|
|
1579
1581
|
value: "ReadableByteStreamController",
|
|
1580
1582
|
configurable: !0
|
|
1581
1583
|
});
|
|
@@ -1607,10 +1609,10 @@ var ha = cr(function(De, Te) {
|
|
|
1607
1609
|
function xe(e, i) {
|
|
1608
1610
|
var x = !1;
|
|
1609
1611
|
e._state === "closed" && (x = !0);
|
|
1610
|
-
var K =
|
|
1612
|
+
var K = Ne(i);
|
|
1611
1613
|
i.readerType === "default" ? J(e, K, x) : zn(e, K, x);
|
|
1612
1614
|
}
|
|
1613
|
-
function
|
|
1615
|
+
function Ne(e) {
|
|
1614
1616
|
var i = e.bytesFilled, x = e.elementSize;
|
|
1615
1617
|
return new e.viewConstructor(e.buffer, e.byteOffset, i / x);
|
|
1616
1618
|
}
|
|
@@ -1667,7 +1669,7 @@ var ha = cr(function(De, Te) {
|
|
|
1667
1669
|
}
|
|
1668
1670
|
if (e._queueTotalSize > 0) {
|
|
1669
1671
|
if (Ge(e, Ue)) {
|
|
1670
|
-
var Je =
|
|
1672
|
+
var Je = Ne(Ue);
|
|
1671
1673
|
Ve(e), x._chunkSteps(Je);
|
|
1672
1674
|
return;
|
|
1673
1675
|
}
|
|
@@ -1714,7 +1716,7 @@ var ha = cr(function(De, Te) {
|
|
|
1714
1716
|
return !1;
|
|
1715
1717
|
if (se(i) && ie(i) > 0 || Fr(i) && en(i) > 0)
|
|
1716
1718
|
return !0;
|
|
1717
|
-
var x =
|
|
1719
|
+
var x = Lt(e);
|
|
1718
1720
|
return x > 0;
|
|
1719
1721
|
}
|
|
1720
1722
|
function st(e) {
|
|
@@ -1762,14 +1764,14 @@ var ha = cr(function(De, Te) {
|
|
|
1762
1764
|
var x = e._controlledReadableByteStream;
|
|
1763
1765
|
x._state === "readable" && (ue(e), te(e), st(e), Cn(x, i));
|
|
1764
1766
|
}
|
|
1765
|
-
function
|
|
1767
|
+
function xt(e) {
|
|
1766
1768
|
if (e._byobRequest === null && e._pendingPullIntos.length > 0) {
|
|
1767
1769
|
var i = e._pendingPullIntos.peek(), x = new Uint8Array(i.buffer, i.byteOffset + i.bytesFilled, i.byteLength - i.bytesFilled), K = Object.create(ae.prototype);
|
|
1768
1770
|
Un(K, e, x), e._byobRequest = K;
|
|
1769
1771
|
}
|
|
1770
1772
|
return e._byobRequest;
|
|
1771
1773
|
}
|
|
1772
|
-
function
|
|
1774
|
+
function Lt(e) {
|
|
1773
1775
|
var i = e._controlledReadableByteStream._state;
|
|
1774
1776
|
return i === "errored" ? null : i === "closed" ? 0 : e._strategyHWM - e._queueTotalSize;
|
|
1775
1777
|
}
|
|
@@ -1854,11 +1856,11 @@ var ha = cr(function(De, Te) {
|
|
|
1854
1856
|
}
|
|
1855
1857
|
function Fr(e) {
|
|
1856
1858
|
var i = e._reader;
|
|
1857
|
-
return !(i === void 0 || !
|
|
1859
|
+
return !(i === void 0 || !Nt(i));
|
|
1858
1860
|
}
|
|
1859
1861
|
var Zt = function() {
|
|
1860
1862
|
function e(i) {
|
|
1861
|
-
if (S(i, 1, "ReadableStreamBYOBReader"), M(i, "First parameter"),
|
|
1863
|
+
if (S(i, 1, "ReadableStreamBYOBReader"), M(i, "First parameter"), Ft(i))
|
|
1862
1864
|
throw new TypeError("This stream has already been locked for exclusive reading by another reader");
|
|
1863
1865
|
if (!We(i._readableStreamController))
|
|
1864
1866
|
throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");
|
|
@@ -1866,14 +1868,14 @@ var ha = cr(function(De, Te) {
|
|
|
1866
1868
|
}
|
|
1867
1869
|
return Object.defineProperty(e.prototype, "closed", {
|
|
1868
1870
|
get: function() {
|
|
1869
|
-
return
|
|
1871
|
+
return Nt(this) ? this._closedPromise : m(ur("closed"));
|
|
1870
1872
|
},
|
|
1871
1873
|
enumerable: !1,
|
|
1872
1874
|
configurable: !0
|
|
1873
1875
|
}), e.prototype.cancel = function(i) {
|
|
1874
|
-
return i === void 0 && (i = void 0),
|
|
1876
|
+
return i === void 0 && (i = void 0), Nt(this) ? this._ownerReadableStream === void 0 ? m(g("cancel")) : a(this, i) : m(ur("cancel"));
|
|
1875
1877
|
}, e.prototype.read = function(i) {
|
|
1876
|
-
if (!
|
|
1878
|
+
if (!Nt(this))
|
|
1877
1879
|
return m(ur("read"));
|
|
1878
1880
|
if (!ArrayBuffer.isView(i))
|
|
1879
1881
|
return m(new TypeError("view must be an array buffer view"));
|
|
@@ -1898,7 +1900,7 @@ var ha = cr(function(De, Te) {
|
|
|
1898
1900
|
};
|
|
1899
1901
|
return tn(this, i, Ae), pe;
|
|
1900
1902
|
}, e.prototype.releaseLock = function() {
|
|
1901
|
-
if (!
|
|
1903
|
+
if (!Nt(this))
|
|
1902
1904
|
throw ur("releaseLock");
|
|
1903
1905
|
if (this._ownerReadableStream !== void 0) {
|
|
1904
1906
|
if (this._readIntoRequests.length > 0)
|
|
@@ -1912,11 +1914,11 @@ var ha = cr(function(De, Te) {
|
|
|
1912
1914
|
read: { enumerable: !0 },
|
|
1913
1915
|
releaseLock: { enumerable: !0 },
|
|
1914
1916
|
closed: { enumerable: !0 }
|
|
1915
|
-
}), typeof
|
|
1917
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Zt.prototype, Te.toStringTag, {
|
|
1916
1918
|
value: "ReadableStreamBYOBReader",
|
|
1917
1919
|
configurable: !0
|
|
1918
1920
|
});
|
|
1919
|
-
function
|
|
1921
|
+
function Nt(e) {
|
|
1920
1922
|
return !v(e) || !Object.prototype.hasOwnProperty.call(e, "_readIntoRequests") ? !1 : e instanceof Zt;
|
|
1921
1923
|
}
|
|
1922
1924
|
function tn(e, i, x) {
|
|
@@ -2036,7 +2038,7 @@ var ha = cr(function(De, Te) {
|
|
|
2036
2038
|
close: { enumerable: !0 },
|
|
2037
2039
|
getWriter: { enumerable: !0 },
|
|
2038
2040
|
locked: { enumerable: !0 }
|
|
2039
|
-
}), typeof
|
|
2041
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(tr.prototype, Te.toStringTag, {
|
|
2040
2042
|
value: "WritableStream",
|
|
2041
2043
|
configurable: !0
|
|
2042
2044
|
});
|
|
@@ -2198,14 +2200,14 @@ var ha = cr(function(De, Te) {
|
|
|
2198
2200
|
}
|
|
2199
2201
|
return Object.defineProperty(e.prototype, "closed", {
|
|
2200
2202
|
get: function() {
|
|
2201
|
-
return
|
|
2203
|
+
return Bt(this) ? this._closedPromise : m(Wt("closed"));
|
|
2202
2204
|
},
|
|
2203
2205
|
enumerable: !1,
|
|
2204
2206
|
configurable: !0
|
|
2205
2207
|
}), Object.defineProperty(e.prototype, "desiredSize", {
|
|
2206
2208
|
get: function() {
|
|
2207
|
-
if (!
|
|
2208
|
-
throw
|
|
2209
|
+
if (!Bt(this))
|
|
2210
|
+
throw Wt("desiredSize");
|
|
2209
2211
|
if (this._ownerWritableStream === void 0)
|
|
2210
2212
|
throw nr("desiredSize");
|
|
2211
2213
|
return ci(this);
|
|
@@ -2214,24 +2216,24 @@ var ha = cr(function(De, Te) {
|
|
|
2214
2216
|
configurable: !0
|
|
2215
2217
|
}), Object.defineProperty(e.prototype, "ready", {
|
|
2216
2218
|
get: function() {
|
|
2217
|
-
return
|
|
2219
|
+
return Bt(this) ? this._readyPromise : m(Wt("ready"));
|
|
2218
2220
|
},
|
|
2219
2221
|
enumerable: !1,
|
|
2220
2222
|
configurable: !0
|
|
2221
2223
|
}), e.prototype.abort = function(i) {
|
|
2222
|
-
return i === void 0 && (i = void 0),
|
|
2224
|
+
return i === void 0 && (i = void 0), Bt(this) ? this._ownerWritableStream === void 0 ? m(nr("abort")) : si(this, i) : m(Wt("abort"));
|
|
2223
2225
|
}, e.prototype.close = function() {
|
|
2224
|
-
if (!
|
|
2225
|
-
return m(
|
|
2226
|
+
if (!Bt(this))
|
|
2227
|
+
return m(Wt("close"));
|
|
2226
2228
|
var i = this._ownerWritableStream;
|
|
2227
2229
|
return i === void 0 ? m(nr("close")) : _t(i) ? m(new TypeError("Cannot close an already-closing stream")) : on(this);
|
|
2228
2230
|
}, e.prototype.releaseLock = function() {
|
|
2229
|
-
if (!
|
|
2230
|
-
throw
|
|
2231
|
+
if (!Bt(this))
|
|
2232
|
+
throw Wt("releaseLock");
|
|
2231
2233
|
var i = this._ownerWritableStream;
|
|
2232
2234
|
i !== void 0 && cn(this);
|
|
2233
2235
|
}, e.prototype.write = function(i) {
|
|
2234
|
-
return i === void 0 && (i = void 0),
|
|
2236
|
+
return i === void 0 && (i = void 0), Bt(this) ? this._ownerWritableStream === void 0 ? m(nr("write to")) : un(this, i) : m(Wt("write"));
|
|
2235
2237
|
}, e;
|
|
2236
2238
|
}();
|
|
2237
2239
|
Object.defineProperties(rr.prototype, {
|
|
@@ -2242,11 +2244,11 @@ var ha = cr(function(De, Te) {
|
|
|
2242
2244
|
closed: { enumerable: !0 },
|
|
2243
2245
|
desiredSize: { enumerable: !0 },
|
|
2244
2246
|
ready: { enumerable: !0 }
|
|
2245
|
-
}), typeof
|
|
2247
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(rr.prototype, Te.toStringTag, {
|
|
2246
2248
|
value: "WritableStreamDefaultWriter",
|
|
2247
2249
|
configurable: !0
|
|
2248
2250
|
});
|
|
2249
|
-
function
|
|
2251
|
+
function Bt(e) {
|
|
2250
2252
|
return !v(e) || !Object.prototype.hasOwnProperty.call(e, "_ownerWritableStream") ? !1 : e instanceof rr;
|
|
2251
2253
|
}
|
|
2252
2254
|
function si(e, i) {
|
|
@@ -2327,7 +2329,7 @@ var ha = cr(function(De, Te) {
|
|
|
2327
2329
|
abortReason: { enumerable: !0 },
|
|
2328
2330
|
signal: { enumerable: !0 },
|
|
2329
2331
|
error: { enumerable: !0 }
|
|
2330
|
-
}), typeof
|
|
2332
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Vt.prototype, Te.toStringTag, {
|
|
2331
2333
|
value: "WritableStreamDefaultController",
|
|
2332
2334
|
configurable: !0
|
|
2333
2335
|
});
|
|
@@ -2451,7 +2453,7 @@ var ha = cr(function(De, Te) {
|
|
|
2451
2453
|
function zr(e) {
|
|
2452
2454
|
return new TypeError("WritableStreamDefaultController.prototype." + e + " can only be used on a WritableStreamDefaultController");
|
|
2453
2455
|
}
|
|
2454
|
-
function
|
|
2456
|
+
function Wt(e) {
|
|
2455
2457
|
return new TypeError("WritableStreamDefaultWriter.prototype." + e + " can only be used on a WritableStreamDefaultWriter");
|
|
2456
2458
|
}
|
|
2457
2459
|
function nr(e) {
|
|
@@ -2554,7 +2556,7 @@ var ha = cr(function(De, Te) {
|
|
|
2554
2556
|
return O(function(Ye, it) {
|
|
2555
2557
|
fe(Me, {
|
|
2556
2558
|
_chunkSteps: function(lt) {
|
|
2557
|
-
Je = y(un(Ue, lt), void 0,
|
|
2559
|
+
Je = y(un(Ue, lt), void 0, Le), Ye(!1);
|
|
2558
2560
|
},
|
|
2559
2561
|
_closeSteps: function() {
|
|
2560
2562
|
return Ye(!0);
|
|
@@ -2577,10 +2579,10 @@ var ha = cr(function(De, Te) {
|
|
|
2577
2579
|
return oi(Ue);
|
|
2578
2580
|
});
|
|
2579
2581
|
}), _t(i) || i._state === "closed") {
|
|
2580
|
-
var
|
|
2581
|
-
pe ? Pt(!0,
|
|
2582
|
-
return yt(e,
|
|
2583
|
-
}, !0,
|
|
2582
|
+
var It = new TypeError("the destination writable stream closed before all data could be piped to it");
|
|
2583
|
+
pe ? Pt(!0, It) : mt(function() {
|
|
2584
|
+
return yt(e, It);
|
|
2585
|
+
}, !0, It);
|
|
2584
2586
|
}
|
|
2585
2587
|
h(St());
|
|
2586
2588
|
function Et() {
|
|
@@ -2602,8 +2604,8 @@ var ha = cr(function(De, Te) {
|
|
|
2602
2604
|
function Tt() {
|
|
2603
2605
|
D(Ye(), function() {
|
|
2604
2606
|
return ot(it, lt);
|
|
2605
|
-
}, function(
|
|
2606
|
-
return ot(!0,
|
|
2607
|
+
}, function(Dt) {
|
|
2608
|
+
return ot(!0, Dt);
|
|
2607
2609
|
});
|
|
2608
2610
|
}
|
|
2609
2611
|
}
|
|
@@ -2644,7 +2646,7 @@ var ha = cr(function(De, Te) {
|
|
|
2644
2646
|
}, e.prototype.error = function(i) {
|
|
2645
2647
|
if (i === void 0 && (i = void 0), !Sr(this))
|
|
2646
2648
|
throw _r("error");
|
|
2647
|
-
|
|
2649
|
+
kt(this, i);
|
|
2648
2650
|
}, e.prototype[$] = function(i) {
|
|
2649
2651
|
te(this);
|
|
2650
2652
|
var x = this._cancelAlgorithm(i);
|
|
@@ -2663,7 +2665,7 @@ var ha = cr(function(De, Te) {
|
|
|
2663
2665
|
enqueue: { enumerable: !0 },
|
|
2664
2666
|
error: { enumerable: !0 },
|
|
2665
2667
|
desiredSize: { enumerable: !0 }
|
|
2666
|
-
}), typeof
|
|
2668
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Xt.prototype, Te.toStringTag, {
|
|
2667
2669
|
value: "ReadableStreamDefaultController",
|
|
2668
2670
|
configurable: !0
|
|
2669
2671
|
});
|
|
@@ -2682,7 +2684,7 @@ var ha = cr(function(De, Te) {
|
|
|
2682
2684
|
D(x, function() {
|
|
2683
2685
|
e._pulling = !1, e._pullAgain && (e._pullAgain = !1, ir(e));
|
|
2684
2686
|
}, function(K) {
|
|
2685
|
-
|
|
2687
|
+
kt(e, K);
|
|
2686
2688
|
});
|
|
2687
2689
|
}
|
|
2688
2690
|
}
|
|
@@ -2690,7 +2692,7 @@ var ha = cr(function(De, Te) {
|
|
|
2690
2692
|
var i = e._controlledReadableStream;
|
|
2691
2693
|
if (!Yt(e) || !e._started)
|
|
2692
2694
|
return !1;
|
|
2693
|
-
if (
|
|
2695
|
+
if (Ft(i) && ie(i) > 0)
|
|
2694
2696
|
return !0;
|
|
2695
2697
|
var x = Hr(e);
|
|
2696
2698
|
return x > 0;
|
|
@@ -2707,25 +2709,25 @@ var ha = cr(function(De, Te) {
|
|
|
2707
2709
|
function wr(e, i) {
|
|
2708
2710
|
if (!!Yt(e)) {
|
|
2709
2711
|
var x = e._controlledReadableStream;
|
|
2710
|
-
if (
|
|
2712
|
+
if (Ft(x) && ie(x) > 0)
|
|
2711
2713
|
J(x, i, !1);
|
|
2712
2714
|
else {
|
|
2713
2715
|
var K = void 0;
|
|
2714
2716
|
try {
|
|
2715
2717
|
K = e._strategySizeAlgorithm(i);
|
|
2716
2718
|
} catch (pe) {
|
|
2717
|
-
throw
|
|
2719
|
+
throw kt(e, pe), pe;
|
|
2718
2720
|
}
|
|
2719
2721
|
try {
|
|
2720
2722
|
Be(e, i, K);
|
|
2721
2723
|
} catch (pe) {
|
|
2722
|
-
throw
|
|
2724
|
+
throw kt(e, pe), pe;
|
|
2723
2725
|
}
|
|
2724
2726
|
}
|
|
2725
2727
|
ir(e);
|
|
2726
2728
|
}
|
|
2727
2729
|
}
|
|
2728
|
-
function
|
|
2730
|
+
function kt(e, i) {
|
|
2729
2731
|
var x = e._controlledReadableStream;
|
|
2730
2732
|
x._state === "readable" && (te(e), Ar(e), Cn(x, i));
|
|
2731
2733
|
}
|
|
@@ -2746,7 +2748,7 @@ var ha = cr(function(De, Te) {
|
|
|
2746
2748
|
D(P(Ue), function() {
|
|
2747
2749
|
i._started = !0, ir(i);
|
|
2748
2750
|
}, function(Ke) {
|
|
2749
|
-
|
|
2751
|
+
kt(i, Ke);
|
|
2750
2752
|
});
|
|
2751
2753
|
}
|
|
2752
2754
|
function Ei(e, i, x, K) {
|
|
@@ -2802,7 +2804,7 @@ var ha = cr(function(De, Te) {
|
|
|
2802
2804
|
}
|
|
2803
2805
|
return dt;
|
|
2804
2806
|
}
|
|
2805
|
-
function
|
|
2807
|
+
function It(ft) {
|
|
2806
2808
|
if (Me = !0, Ke = ft, Ae) {
|
|
2807
2809
|
var Ct = G([Ue, Ke]), mt = yt(e, Ct);
|
|
2808
2810
|
rt(mt);
|
|
@@ -2811,8 +2813,8 @@ var ha = cr(function(De, Te) {
|
|
|
2811
2813
|
}
|
|
2812
2814
|
function Et() {
|
|
2813
2815
|
}
|
|
2814
|
-
return Je = Vr(Et, St, qt), et = Vr(Et, St,
|
|
2815
|
-
|
|
2816
|
+
return Je = Vr(Et, St, qt), et = Vr(Et, St, It), l(x._closedPromise, function(ft) {
|
|
2817
|
+
kt(Je._readableStreamController, ft), kt(et._readableStreamController, ft), (!Ae || !Me) && rt(void 0);
|
|
2816
2818
|
}), [Je, et];
|
|
2817
2819
|
}
|
|
2818
2820
|
function Pi(e) {
|
|
@@ -2825,7 +2827,7 @@ var ha = cr(function(De, Te) {
|
|
|
2825
2827
|
});
|
|
2826
2828
|
}
|
|
2827
2829
|
function qt() {
|
|
2828
|
-
|
|
2830
|
+
Nt(i) && (f(i), i = L(e), St(i));
|
|
2829
2831
|
var ot = {
|
|
2830
2832
|
_chunkSteps: function(Ye) {
|
|
2831
2833
|
w(function() {
|
|
@@ -2850,32 +2852,32 @@ var ha = cr(function(De, Te) {
|
|
|
2850
2852
|
};
|
|
2851
2853
|
fe(i, ot);
|
|
2852
2854
|
}
|
|
2853
|
-
function
|
|
2855
|
+
function It(ot, Ye) {
|
|
2854
2856
|
le(i) && (f(i), i = Jr(e), St(i));
|
|
2855
2857
|
var it = Ye ? et : Je, lt = Ye ? Je : et, Tt = {
|
|
2856
|
-
_chunkSteps: function(
|
|
2858
|
+
_chunkSteps: function(Dt) {
|
|
2857
2859
|
w(function() {
|
|
2858
2860
|
K = !1, pe = !1;
|
|
2859
2861
|
var Kt = Ye ? Me : Ae, lr = Ye ? Ae : Me;
|
|
2860
2862
|
if (lr)
|
|
2861
|
-
Kt || wt(it._readableStreamController,
|
|
2863
|
+
Kt || wt(it._readableStreamController, Dt);
|
|
2862
2864
|
else {
|
|
2863
2865
|
var Bn = void 0;
|
|
2864
2866
|
try {
|
|
2865
|
-
Bn = ce(
|
|
2867
|
+
Bn = ce(Dt);
|
|
2866
2868
|
} catch (Yr) {
|
|
2867
2869
|
pt(it._readableStreamController, Yr), pt(lt._readableStreamController, Yr), rt(yt(e, Yr));
|
|
2868
2870
|
return;
|
|
2869
2871
|
}
|
|
2870
|
-
Kt || wt(it._readableStreamController,
|
|
2872
|
+
Kt || wt(it._readableStreamController, Dt), bt(lt._readableStreamController, Bn);
|
|
2871
2873
|
}
|
|
2872
2874
|
x = !1, K ? Et() : pe && ft();
|
|
2873
2875
|
});
|
|
2874
2876
|
},
|
|
2875
|
-
_closeSteps: function(
|
|
2877
|
+
_closeSteps: function(Dt) {
|
|
2876
2878
|
x = !1;
|
|
2877
2879
|
var Kt = Ye ? Me : Ae, lr = Ye ? Ae : Me;
|
|
2878
|
-
Kt || gt(it._readableStreamController), lr || gt(lt._readableStreamController),
|
|
2880
|
+
Kt || gt(it._readableStreamController), lr || gt(lt._readableStreamController), Dt !== void 0 && (Kt || wt(it._readableStreamController, Dt), !lr && lt._readableStreamController._pendingPullIntos.length > 0 && At(lt._readableStreamController, 0)), (!Kt || !lr) && rt(void 0);
|
|
2879
2881
|
},
|
|
2880
2882
|
_errorSteps: function() {
|
|
2881
2883
|
x = !1;
|
|
@@ -2887,15 +2889,15 @@ var ha = cr(function(De, Te) {
|
|
|
2887
2889
|
if (x)
|
|
2888
2890
|
return K = !0, P(void 0);
|
|
2889
2891
|
x = !0;
|
|
2890
|
-
var ot =
|
|
2891
|
-
return ot === null ? qt() :
|
|
2892
|
+
var ot = xt(Je._readableStreamController);
|
|
2893
|
+
return ot === null ? qt() : It(ot._view, !1), P(void 0);
|
|
2892
2894
|
}
|
|
2893
2895
|
function ft() {
|
|
2894
2896
|
if (x)
|
|
2895
2897
|
return pe = !0, P(void 0);
|
|
2896
2898
|
x = !0;
|
|
2897
|
-
var ot =
|
|
2898
|
-
return ot === null ? qt() :
|
|
2899
|
+
var ot = xt(et._readableStreamController);
|
|
2900
|
+
return ot === null ? qt() : It(ot._view, !0), P(void 0);
|
|
2899
2901
|
}
|
|
2900
2902
|
function Ct(ot) {
|
|
2901
2903
|
if (Ae = !0, Ue = ot, Me) {
|
|
@@ -2984,7 +2986,7 @@ var ha = cr(function(De, Te) {
|
|
|
2984
2986
|
var K = e == null ? void 0 : e.writable;
|
|
2985
2987
|
return N(K, "writable", "ReadableWritablePair"), rn(K, i + " has member 'writable' that"), { readable: x, writable: K };
|
|
2986
2988
|
}
|
|
2987
|
-
var
|
|
2989
|
+
var Ot = function() {
|
|
2988
2990
|
function e(i, x) {
|
|
2989
2991
|
i === void 0 && (i = {}), x === void 0 && (x = {}), i === void 0 ? i = null : C(i, "First parameter");
|
|
2990
2992
|
var K = hr(x, "Second parameter"), pe = Ri(i, "First parameter");
|
|
@@ -3000,33 +3002,33 @@ var ha = cr(function(De, Te) {
|
|
|
3000
3002
|
}
|
|
3001
3003
|
return Object.defineProperty(e.prototype, "locked", {
|
|
3002
3004
|
get: function() {
|
|
3003
|
-
if (!
|
|
3004
|
-
throw
|
|
3005
|
-
return
|
|
3005
|
+
if (!Mt(this))
|
|
3006
|
+
throw Ut("locked");
|
|
3007
|
+
return Ft(this);
|
|
3006
3008
|
},
|
|
3007
3009
|
enumerable: !1,
|
|
3008
3010
|
configurable: !0
|
|
3009
3011
|
}), e.prototype.cancel = function(i) {
|
|
3010
|
-
return i === void 0 && (i = void 0),
|
|
3012
|
+
return i === void 0 && (i = void 0), Mt(this) ? Ft(this) ? m(new TypeError("Cannot cancel a stream that already has a reader")) : yt(this, i) : m(Ut("cancel"));
|
|
3011
3013
|
}, e.prototype.getReader = function(i) {
|
|
3012
|
-
if (i === void 0 && (i = void 0), !
|
|
3013
|
-
throw
|
|
3014
|
+
if (i === void 0 && (i = void 0), !Mt(this))
|
|
3015
|
+
throw Ut("getReader");
|
|
3014
3016
|
var x = Fi(i, "First parameter");
|
|
3015
3017
|
return x.mode === void 0 ? L(this) : Jr(this);
|
|
3016
3018
|
}, e.prototype.pipeThrough = function(i, x) {
|
|
3017
|
-
if (x === void 0 && (x = {}), !
|
|
3018
|
-
throw
|
|
3019
|
+
if (x === void 0 && (x = {}), !Mt(this))
|
|
3020
|
+
throw Ut("pipeThrough");
|
|
3019
3021
|
S(i, 1, "pipeThrough");
|
|
3020
3022
|
var K = Ni(i, "First parameter"), pe = _n(x, "Second parameter");
|
|
3021
|
-
if (
|
|
3023
|
+
if (Ft(this))
|
|
3022
3024
|
throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");
|
|
3023
3025
|
if (Ht(K.writable))
|
|
3024
3026
|
throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");
|
|
3025
3027
|
var Ae = Sn(this, K.writable, pe.preventClose, pe.preventAbort, pe.preventCancel, pe.signal);
|
|
3026
3028
|
return h(Ae), K.readable;
|
|
3027
3029
|
}, e.prototype.pipeTo = function(i, x) {
|
|
3028
|
-
if (x === void 0 && (x = {}), !
|
|
3029
|
-
return m(
|
|
3030
|
+
if (x === void 0 && (x = {}), !Mt(this))
|
|
3031
|
+
return m(Ut("pipeTo"));
|
|
3030
3032
|
if (i === void 0)
|
|
3031
3033
|
return m("Parameter 1 is required in 'pipeTo'.");
|
|
3032
3034
|
if (!Gt(i))
|
|
@@ -3037,20 +3039,20 @@ var ha = cr(function(De, Te) {
|
|
|
3037
3039
|
} catch (pe) {
|
|
3038
3040
|
return m(pe);
|
|
3039
3041
|
}
|
|
3040
|
-
return
|
|
3042
|
+
return Ft(this) ? m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : Ht(i) ? m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : Sn(this, i, K.preventClose, K.preventAbort, K.preventCancel, K.signal);
|
|
3041
3043
|
}, e.prototype.tee = function() {
|
|
3042
|
-
if (!
|
|
3043
|
-
throw
|
|
3044
|
+
if (!Mt(this))
|
|
3045
|
+
throw Ut("tee");
|
|
3044
3046
|
var i = Ci(this);
|
|
3045
3047
|
return G(i);
|
|
3046
3048
|
}, e.prototype.values = function(i) {
|
|
3047
|
-
if (i === void 0 && (i = void 0), !
|
|
3048
|
-
throw
|
|
3049
|
+
if (i === void 0 && (i = void 0), !Mt(this))
|
|
3050
|
+
throw Ut("values");
|
|
3049
3051
|
var x = Di(i, "First parameter");
|
|
3050
3052
|
return Fe(this, x.preventCancel);
|
|
3051
3053
|
}, e;
|
|
3052
3054
|
}();
|
|
3053
|
-
Object.defineProperties(
|
|
3055
|
+
Object.defineProperties(Ot.prototype, {
|
|
3054
3056
|
cancel: { enumerable: !0 },
|
|
3055
3057
|
getReader: { enumerable: !0 },
|
|
3056
3058
|
pipeThrough: { enumerable: !0 },
|
|
@@ -3058,11 +3060,11 @@ var ha = cr(function(De, Te) {
|
|
|
3058
3060
|
tee: { enumerable: !0 },
|
|
3059
3061
|
values: { enumerable: !0 },
|
|
3060
3062
|
locked: { enumerable: !0 }
|
|
3061
|
-
}), typeof
|
|
3063
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Ot.prototype, Te.toStringTag, {
|
|
3062
3064
|
value: "ReadableStream",
|
|
3063
3065
|
configurable: !0
|
|
3064
|
-
}), typeof
|
|
3065
|
-
value:
|
|
3066
|
+
}), typeof Te.asyncIterator == "symbol" && Object.defineProperty(Ot.prototype, Te.asyncIterator, {
|
|
3067
|
+
value: Ot.prototype.values,
|
|
3066
3068
|
writable: !0,
|
|
3067
3069
|
configurable: !0
|
|
3068
3070
|
});
|
|
@@ -3070,13 +3072,13 @@ var ha = cr(function(De, Te) {
|
|
|
3070
3072
|
K === void 0 && (K = 1), pe === void 0 && (pe = function() {
|
|
3071
3073
|
return 1;
|
|
3072
3074
|
});
|
|
3073
|
-
var Ae = Object.create(
|
|
3075
|
+
var Ae = Object.create(Ot.prototype);
|
|
3074
3076
|
Xr(Ae);
|
|
3075
3077
|
var Me = Object.create(Xt.prototype);
|
|
3076
3078
|
return wn(Ae, Me, e, i, x, K, pe), Ae;
|
|
3077
3079
|
}
|
|
3078
3080
|
function En(e, i, x) {
|
|
3079
|
-
var K = Object.create(
|
|
3081
|
+
var K = Object.create(Ot.prototype);
|
|
3080
3082
|
Xr(K);
|
|
3081
3083
|
var pe = Object.create(be.prototype);
|
|
3082
3084
|
return Qr(K, pe, e, i, x, 0, void 0), K;
|
|
@@ -3084,10 +3086,10 @@ var ha = cr(function(De, Te) {
|
|
|
3084
3086
|
function Xr(e) {
|
|
3085
3087
|
e._state = "readable", e._reader = void 0, e._storedError = void 0, e._disturbed = !1;
|
|
3086
3088
|
}
|
|
3087
|
-
function Ot(e) {
|
|
3088
|
-
return !v(e) || !Object.prototype.hasOwnProperty.call(e, "_readableStreamController") ? !1 : e instanceof kt;
|
|
3089
|
-
}
|
|
3090
3089
|
function Mt(e) {
|
|
3090
|
+
return !v(e) || !Object.prototype.hasOwnProperty.call(e, "_readableStreamController") ? !1 : e instanceof Ot;
|
|
3091
|
+
}
|
|
3092
|
+
function Ft(e) {
|
|
3091
3093
|
return e._reader !== void 0;
|
|
3092
3094
|
}
|
|
3093
3095
|
function yt(e, i) {
|
|
@@ -3097,11 +3099,11 @@ var ha = cr(function(De, Te) {
|
|
|
3097
3099
|
return m(e._storedError);
|
|
3098
3100
|
sr(e);
|
|
3099
3101
|
var x = e._reader;
|
|
3100
|
-
x !== void 0 &&
|
|
3102
|
+
x !== void 0 && Nt(x) && (x._readIntoRequests.forEach(function(pe) {
|
|
3101
3103
|
pe._closeSteps(void 0);
|
|
3102
3104
|
}), x._readIntoRequests = new u());
|
|
3103
3105
|
var K = e._readableStreamController[$](i);
|
|
3104
|
-
return A(K,
|
|
3106
|
+
return A(K, Le);
|
|
3105
3107
|
}
|
|
3106
3108
|
function sr(e) {
|
|
3107
3109
|
e._state = "closed";
|
|
@@ -3119,7 +3121,7 @@ var ha = cr(function(De, Te) {
|
|
|
3119
3121
|
K._errorSteps(i);
|
|
3120
3122
|
}), x._readIntoRequests = new u()));
|
|
3121
3123
|
}
|
|
3122
|
-
function
|
|
3124
|
+
function Ut(e) {
|
|
3123
3125
|
return new TypeError("ReadableStream.prototype." + e + " can only be used on a ReadableStream");
|
|
3124
3126
|
}
|
|
3125
3127
|
function Tn(e, i) {
|
|
@@ -3164,7 +3166,7 @@ var ha = cr(function(De, Te) {
|
|
|
3164
3166
|
Object.defineProperties(Er.prototype, {
|
|
3165
3167
|
highWaterMark: { enumerable: !0 },
|
|
3166
3168
|
size: { enumerable: !0 }
|
|
3167
|
-
}), typeof
|
|
3169
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Er.prototype, Te.toStringTag, {
|
|
3168
3170
|
value: "ByteLengthQueuingStrategy",
|
|
3169
3171
|
configurable: !0
|
|
3170
3172
|
});
|
|
@@ -3209,7 +3211,7 @@ var ha = cr(function(De, Te) {
|
|
|
3209
3211
|
Object.defineProperties(Cr.prototype, {
|
|
3210
3212
|
highWaterMark: { enumerable: !0 },
|
|
3211
3213
|
size: { enumerable: !0 }
|
|
3212
|
-
}), typeof
|
|
3214
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Cr.prototype, Te.toStringTag, {
|
|
3213
3215
|
value: "CountQueuingStrategy",
|
|
3214
3216
|
configurable: !0
|
|
3215
3217
|
});
|
|
@@ -3279,7 +3281,7 @@ var ha = cr(function(De, Te) {
|
|
|
3279
3281
|
Object.defineProperties(Tr.prototype, {
|
|
3280
3282
|
readable: { enumerable: !0 },
|
|
3281
3283
|
writable: { enumerable: !0 }
|
|
3282
|
-
}), typeof
|
|
3284
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(Tr.prototype, Te.toStringTag, {
|
|
3283
3285
|
value: "TransformStream",
|
|
3284
3286
|
configurable: !0
|
|
3285
3287
|
});
|
|
@@ -3309,7 +3311,7 @@ var ha = cr(function(De, Te) {
|
|
|
3309
3311
|
return !v(e) || !Object.prototype.hasOwnProperty.call(e, "_transformStreamController") ? !1 : e instanceof Tr;
|
|
3310
3312
|
}
|
|
3311
3313
|
function Pr(e, i) {
|
|
3312
|
-
|
|
3314
|
+
kt(e._readable._readableStreamController, i), Rr(e, i);
|
|
3313
3315
|
}
|
|
3314
3316
|
function Rr(e, i) {
|
|
3315
3317
|
In(e._transformStreamController), Wr(e._writable._writableStreamController, i), e._backpressure && xr(e, !1);
|
|
@@ -3351,7 +3353,7 @@ var ha = cr(function(De, Te) {
|
|
|
3351
3353
|
error: { enumerable: !0 },
|
|
3352
3354
|
terminate: { enumerable: !0 },
|
|
3353
3355
|
desiredSize: { enumerable: !0 }
|
|
3354
|
-
}), typeof
|
|
3356
|
+
}), typeof Te.toStringTag == "symbol" && Object.defineProperty(or.prototype, Te.toStringTag, {
|
|
3355
3357
|
value: "TransformStreamDefaultController",
|
|
3356
3358
|
configurable: !0
|
|
3357
3359
|
});
|
|
@@ -3442,16 +3444,16 @@ var ha = cr(function(De, Te) {
|
|
|
3442
3444
|
function Nn(e) {
|
|
3443
3445
|
return new TypeError("TransformStream.prototype." + e + " can only be used on a TransformStream");
|
|
3444
3446
|
}
|
|
3445
|
-
Ie.ByteLengthQueuingStrategy = Er, Ie.CountQueuingStrategy = Cr, Ie.ReadableByteStreamController = be, Ie.ReadableStream =
|
|
3447
|
+
Ie.ByteLengthQueuingStrategy = Er, Ie.CountQueuingStrategy = Cr, Ie.ReadableByteStreamController = be, Ie.ReadableStream = Ot, Ie.ReadableStreamBYOBReader = Zt, Ie.ReadableStreamBYOBRequest = ae, Ie.ReadableStreamDefaultController = Xt, Ie.ReadableStreamDefaultReader = he, Ie.TransformStream = Tr, Ie.TransformStreamDefaultController = or, Ie.WritableStream = tr, Ie.WritableStreamDefaultController = Vt, Ie.WritableStreamDefaultWriter = rr, Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
3446
3448
|
});
|
|
3447
3449
|
});
|
|
3448
|
-
const
|
|
3450
|
+
const ga = {}, ma = /* @__PURE__ */ Object.freeze({
|
|
3449
3451
|
__proto__: null,
|
|
3450
|
-
default:
|
|
3451
|
-
}),
|
|
3452
|
-
var Kr = cr(function(De,
|
|
3453
|
-
(function(
|
|
3454
|
-
De.exports =
|
|
3452
|
+
default: ga
|
|
3453
|
+
}), zt = /* @__PURE__ */ Zi(ma);
|
|
3454
|
+
var Kr = cr(function(De, we) {
|
|
3455
|
+
(function(Te, Le) {
|
|
3456
|
+
De.exports = Le();
|
|
3455
3457
|
})(globalThis, () => (() => {
|
|
3456
3458
|
var Ie = [
|
|
3457
3459
|
,
|
|
@@ -4040,8 +4042,8 @@ var Kr = cr(function(De, Te) {
|
|
|
4040
4042
|
return [te[0] * ae[0] + te[1] * ae[1] + te[2] * ae[2], te[3] * ae[0] + te[4] * ae[1] + te[5] * ae[2], te[6] * ae[0] + te[7] * ae[1] + te[8] * ae[2]];
|
|
4041
4043
|
}
|
|
4042
4044
|
static singularValueDecompose2dScale(te) {
|
|
4043
|
-
const ae = [te[0], te[2], te[1], te[3]], be = te[0] * ae[0] + te[1] * ae[2], We = te[0] * ae[1] + te[1] * ae[3], He = te[2] * ae[0] + te[3] * ae[2], me = te[2] * ae[1] + te[3] * ae[3], ue = (be + me) / 2, xe = Math.sqrt((be + me) ** 2 - 4 * (be * me - He * We)) / 2,
|
|
4044
|
-
return [Math.sqrt(
|
|
4045
|
+
const ae = [te[0], te[2], te[1], te[3]], be = te[0] * ae[0] + te[1] * ae[2], We = te[0] * ae[1] + te[1] * ae[3], He = te[2] * ae[0] + te[3] * ae[2], me = te[2] * ae[1] + te[3] * ae[3], ue = (be + me) / 2, xe = Math.sqrt((be + me) ** 2 - 4 * (be * me - He * We)) / 2, Ne = ue + xe || 1, $e = ue - xe || 1;
|
|
4046
|
+
return [Math.sqrt(Ne), Math.sqrt($e)];
|
|
4045
4047
|
}
|
|
4046
4048
|
static normalizeRect(te) {
|
|
4047
4049
|
const ae = te.slice(0);
|
|
@@ -4055,21 +4057,21 @@ var Kr = cr(function(De, Te) {
|
|
|
4055
4057
|
return He > me ? null : [be, He, We, me];
|
|
4056
4058
|
}
|
|
4057
4059
|
static bezierBoundingBox(te, ae, be, We, He, me, ue, xe) {
|
|
4058
|
-
const
|
|
4060
|
+
const Ne = [], $e = [[], []];
|
|
4059
4061
|
let Ge, Xe, Ve, je, Ze, ct, tt, at;
|
|
4060
4062
|
for (let st = 0; st < 2; ++st) {
|
|
4061
4063
|
if (st === 0 ? (Xe = 6 * te - 12 * be + 6 * He, Ge = -3 * te + 9 * be - 9 * He + 3 * ue, Ve = 3 * be - 3 * te) : (Xe = 6 * ae - 12 * We + 6 * me, Ge = -3 * ae + 9 * We - 9 * me + 3 * xe, Ve = 3 * We - 3 * ae), Math.abs(Ge) < 1e-12) {
|
|
4062
4064
|
if (Math.abs(Xe) < 1e-12)
|
|
4063
4065
|
continue;
|
|
4064
|
-
je = -Ve / Xe, 0 < je && je < 1 &&
|
|
4066
|
+
je = -Ve / Xe, 0 < je && je < 1 && Ne.push(je);
|
|
4065
4067
|
continue;
|
|
4066
4068
|
}
|
|
4067
|
-
tt = Xe * Xe - 4 * Ve * Ge, at = Math.sqrt(tt), !(tt < 0) && (Ze = (-Xe + at) / (2 * Ge), 0 < Ze && Ze < 1 &&
|
|
4069
|
+
tt = Xe * Xe - 4 * Ve * Ge, at = Math.sqrt(tt), !(tt < 0) && (Ze = (-Xe + at) / (2 * Ge), 0 < Ze && Ze < 1 && Ne.push(Ze), ct = (-Xe - at) / (2 * Ge), 0 < ct && ct < 1 && Ne.push(ct));
|
|
4068
4070
|
}
|
|
4069
|
-
let ut =
|
|
4071
|
+
let ut = Ne.length, nt;
|
|
4070
4072
|
const ht = ut;
|
|
4071
4073
|
for (; ut--; )
|
|
4072
|
-
je =
|
|
4074
|
+
je = Ne[ut], nt = 1 - je, $e[0][ut] = nt * nt * nt * te + 3 * nt * nt * je * be + 3 * nt * je * je * He + je * je * je * ue, $e[1][ut] = nt * nt * nt * ae + 3 * nt * nt * je * We + 3 * nt * je * je * me + je * je * je * xe;
|
|
4073
4075
|
return $e[0][ht] = te, $e[1][ht] = ae, $e[0][ht + 1] = ue, $e[1][ht + 1] = xe, $e[0].length = $e[1].length = ht + 2, [Math.min(...$e[0]), Math.min(...$e[1]), Math.max(...$e[0]), Math.max(...$e[1])];
|
|
4074
4076
|
}
|
|
4075
4077
|
}
|
|
@@ -4158,9 +4160,9 @@ var Kr = cr(function(De, Te) {
|
|
|
4158
4160
|
return Buffer.from(T, "base64").toString("binary");
|
|
4159
4161
|
});
|
|
4160
4162
|
}(), function() {
|
|
4161
|
-
globalThis.DOMMatrix || !o.isNodeJS || (globalThis.DOMMatrix =
|
|
4163
|
+
globalThis.DOMMatrix || !o.isNodeJS || (globalThis.DOMMatrix = fa);
|
|
4162
4164
|
}(), function() {
|
|
4163
|
-
globalThis.ReadableStream || !o.isNodeJS || (globalThis.ReadableStream =
|
|
4165
|
+
globalThis.ReadableStream || !o.isNodeJS || (globalThis.ReadableStream = pa.ReadableStream);
|
|
4164
4166
|
}(), function() {
|
|
4165
4167
|
Array.prototype.at || n(4);
|
|
4166
4168
|
}(), function() {
|
|
@@ -5618,7 +5620,7 @@ var Kr = cr(function(De, Te) {
|
|
|
5618
5620
|
return _(Re, ce);
|
|
5619
5621
|
} else
|
|
5620
5622
|
Re = new j();
|
|
5621
|
-
var Be = w(ce), ge = !1, te, ae, be, We, He, me, ue, xe,
|
|
5623
|
+
var Be = w(ce), ge = !1, te, ae, be, We, He, me, ue, xe, Ne, $e;
|
|
5622
5624
|
switch (Be) {
|
|
5623
5625
|
case "Array":
|
|
5624
5626
|
be = [], ge = !0;
|
|
@@ -5737,8 +5739,8 @@ var Kr = cr(function(De, Te) {
|
|
|
5737
5739
|
if (typeof ce.slice == "function")
|
|
5738
5740
|
be = ce.slice(0);
|
|
5739
5741
|
else
|
|
5740
|
-
for (me = ce.byteLength, be = new ArrayBuffer(me),
|
|
5741
|
-
$e.setUint8(He,
|
|
5742
|
+
for (me = ce.byteLength, be = new ArrayBuffer(me), Ne = new te(ce), $e = new te(be), He = 0; He < me; He++)
|
|
5743
|
+
$e.setUint8(He, Ne.getUint8(He));
|
|
5742
5744
|
} catch {
|
|
5743
5745
|
throw new S("ArrayBuffer is detached", ve);
|
|
5744
5746
|
}
|
|
@@ -5839,8 +5841,8 @@ var Kr = cr(function(De, Te) {
|
|
|
5839
5841
|
if (!r(ce))
|
|
5840
5842
|
throw I("Transfer option cannot be converted to a sequence");
|
|
5841
5843
|
var Be = [];
|
|
5842
|
-
A(ce, function(
|
|
5843
|
-
J(Be, h(
|
|
5844
|
+
A(ce, function(Ne) {
|
|
5845
|
+
J(Be, h(Ne));
|
|
5844
5846
|
});
|
|
5845
5847
|
var ge = 0, te = u(Be), ae, be, We, He, me, ue, xe;
|
|
5846
5848
|
if (Ee)
|
|
@@ -6447,7 +6449,7 @@ var Kr = cr(function(De, Te) {
|
|
|
6447
6449
|
ue || (ue = /* @__PURE__ */ Object.create(null), this._intentStates.set(me.cacheKey, ue)), ue.streamReaderCancelTimeout && (clearTimeout(ue.streamReaderCancelTimeout), ue.streamReaderCancelTimeout = null);
|
|
6448
6450
|
const xe = ge || new re({
|
|
6449
6451
|
ownerDocument: this._ownerDocument
|
|
6450
|
-
}),
|
|
6452
|
+
}), Ne = !!(me.renderingIntent & o.RenderingIntentFlag.PRINT);
|
|
6451
6453
|
ue.displayReadyCapability || (ue.displayReadyCapability = (0, o.createPromiseCapability)(), ue.operatorList = {
|
|
6452
6454
|
fnArray: [],
|
|
6453
6455
|
argsArray: [],
|
|
@@ -6455,7 +6457,7 @@ var Kr = cr(function(De, Te) {
|
|
|
6455
6457
|
separateAnnots: null
|
|
6456
6458
|
}, this._stats && this._stats.time("Page Request"), this._pumpOperatorList(me));
|
|
6457
6459
|
const $e = (Ve) => {
|
|
6458
|
-
ue.renderTasks.delete(Ge), (this.cleanupAfterRender ||
|
|
6460
|
+
ue.renderTasks.delete(Ge), (this.cleanupAfterRender || Ne) && (this.pendingCleanup = !0), this._tryCleanup(), Ve ? (Ge.capability.reject(Ve), this._abortOperatorList({
|
|
6459
6461
|
intentState: ue,
|
|
6460
6462
|
reason: Ve instanceof Error ? Ve : new Error(Ve)
|
|
6461
6463
|
})) : Ge.capability.resolve(), this._stats && (this._stats.timeEnd("Rendering"), this._stats.timeEnd("Overall"));
|
|
@@ -6474,7 +6476,7 @@ var Kr = cr(function(De, Te) {
|
|
|
6474
6476
|
operatorList: ue.operatorList,
|
|
6475
6477
|
pageIndex: this._pageIndex,
|
|
6476
6478
|
canvasFactory: xe,
|
|
6477
|
-
useRequestAnimationFrame: !
|
|
6479
|
+
useRequestAnimationFrame: !Ne,
|
|
6478
6480
|
pdfBug: this._pdfBug,
|
|
6479
6481
|
pageColors: We
|
|
6480
6482
|
});
|
|
@@ -11285,7 +11287,7 @@ var Kr = cr(function(De, Te) {
|
|
|
11285
11287
|
var o = n(134);
|
|
11286
11288
|
const c = function(P) {
|
|
11287
11289
|
return new Promise((m, y) => {
|
|
11288
|
-
|
|
11290
|
+
zt.readFile(P, (r, l) => {
|
|
11289
11291
|
if (r || !l) {
|
|
11290
11292
|
y(new Error(r));
|
|
11291
11293
|
return;
|
|
@@ -11296,7 +11298,7 @@ var Kr = cr(function(De, Te) {
|
|
|
11296
11298
|
};
|
|
11297
11299
|
class T extends o.BaseCanvasFactory {
|
|
11298
11300
|
_createCanvas(m, y) {
|
|
11299
|
-
return
|
|
11301
|
+
return zt.createCanvas(m, y);
|
|
11300
11302
|
}
|
|
11301
11303
|
}
|
|
11302
11304
|
v.NodeCanvasFactory = T;
|
|
@@ -11909,8 +11911,8 @@ var Kr = cr(function(De, Te) {
|
|
|
11909
11911
|
throw new TypeError("Private static access of wrong provenance");
|
|
11910
11912
|
}
|
|
11911
11913
|
function l(me, ue, xe) {
|
|
11912
|
-
var
|
|
11913
|
-
return A(me,
|
|
11914
|
+
var Ne = w(me, ue, "set");
|
|
11915
|
+
return A(me, Ne, xe), xe;
|
|
11914
11916
|
}
|
|
11915
11917
|
function A(me, ue, xe) {
|
|
11916
11918
|
if (ue.set)
|
|
@@ -12069,8 +12071,8 @@ var Kr = cr(function(De, Te) {
|
|
|
12069
12071
|
var je;
|
|
12070
12072
|
return (je = this.div) === null || je === void 0 ? void 0 : je.setAttribute("aria-label", Ve);
|
|
12071
12073
|
});
|
|
12072
|
-
const [
|
|
12073
|
-
if (this.setAt(
|
|
12074
|
+
const [Ne, $e, Ge, Xe] = p(this, de, Oe).call(this);
|
|
12075
|
+
if (this.setAt(Ne, $e, 0, 0), this.setDims(Ge, Xe), p(this, j, H).call(this), this.width) {
|
|
12074
12076
|
const [Ve, je] = this.parent.viewportBaseDimensions;
|
|
12075
12077
|
this.setAt(ue * Ve, xe * je, this.width * Ve, this.height * je), l(this, ne, !0), p(this, d, Ee).call(this), this.setDims(this.width * Ve, this.height * je), p(this, S, Q).call(this), p(this, le, He).call(this), this.div.classList.add("disabled");
|
|
12076
12078
|
} else
|
|
@@ -12078,41 +12080,41 @@ var Kr = cr(function(De, Te) {
|
|
|
12078
12080
|
return p(this, s, oe).call(this), this.div;
|
|
12079
12081
|
}
|
|
12080
12082
|
setDimensions(ue, xe) {
|
|
12081
|
-
const
|
|
12082
|
-
if (h(this, Z) ===
|
|
12083
|
+
const Ne = Math.round(ue), $e = Math.round(xe);
|
|
12084
|
+
if (h(this, Z) === Ne && h(this, z) === $e)
|
|
12083
12085
|
return;
|
|
12084
|
-
l(this, Z,
|
|
12086
|
+
l(this, Z, Ne), l(this, z, $e), this.canvas.style.visibility = "hidden", h(this, u) && Math.abs(h(this, u) - ue / xe) > 0.01 && (xe = Math.ceil(ue / h(this, u)), this.setDims(ue, xe));
|
|
12085
12087
|
const [Ge, Xe] = this.parent.viewportBaseDimensions;
|
|
12086
12088
|
this.width = ue / Ge, this.height = xe / Xe, h(this, k) && p(this, _, ke).call(this, ue, xe), p(this, d, Ee).call(this), p(this, S, Q).call(this), this.canvas.style.visibility = "visible";
|
|
12087
12089
|
}
|
|
12088
12090
|
static deserialize(ue, xe) {
|
|
12089
|
-
const
|
|
12090
|
-
|
|
12091
|
-
const [$e, Ge] = xe.pageDimensions, Xe =
|
|
12092
|
-
l(
|
|
12091
|
+
const Ne = super.deserialize(ue, xe);
|
|
12092
|
+
Ne.thickness = ue.thickness, Ne.color = o.Util.makeHexColor(...ue.color), Ne.opacity = ue.opacity;
|
|
12093
|
+
const [$e, Ge] = xe.pageDimensions, Xe = Ne.width * $e, Ve = Ne.height * Ge, je = xe.scaleFactor, Ze = ue.thickness / 2;
|
|
12094
|
+
l(Ne, u, Xe / Ve), l(Ne, k, !0), l(Ne, Z, Math.round(Xe)), l(Ne, z, Math.round(Ve));
|
|
12093
12095
|
for (const {
|
|
12094
12096
|
bezier: tt
|
|
12095
12097
|
} of ue.paths) {
|
|
12096
12098
|
const at = [];
|
|
12097
|
-
|
|
12099
|
+
Ne.paths.push(at);
|
|
12098
12100
|
let ut = je * (tt[0] - Ze), nt = je * (Ve - tt[1] - Ze);
|
|
12099
12101
|
for (let st = 2, gt = tt.length; st < gt; st += 6) {
|
|
12100
|
-
const bt = je * (tt[st] - Ze), pt = je * (Ve - tt[st + 1] - Ze),
|
|
12101
|
-
at.push([[ut, nt], [bt, pt], [
|
|
12102
|
+
const bt = je * (tt[st] - Ze), pt = je * (Ve - tt[st + 1] - Ze), xt = je * (tt[st + 2] - Ze), Lt = je * (Ve - tt[st + 3] - Ze), At = je * (tt[st + 4] - Ze), wt = je * (Ve - tt[st + 5] - Ze);
|
|
12103
|
+
at.push([[ut, nt], [bt, pt], [xt, Lt], [At, wt]]), ut = At, nt = wt;
|
|
12102
12104
|
}
|
|
12103
12105
|
const ht = D(this, fe, Re).call(this, at);
|
|
12104
|
-
|
|
12106
|
+
Ne.bezierPath2D.push(ht);
|
|
12105
12107
|
}
|
|
12106
|
-
const ct = p(
|
|
12107
|
-
return l(
|
|
12108
|
+
const ct = p(Ne, ie, ae).call(Ne);
|
|
12109
|
+
return l(Ne, a, Math.max(b, ct[2] - ct[0])), l(Ne, t, Math.max(b, ct[3] - ct[1])), p(Ne, _, ke).call(Ne, Xe, Ve), Ne;
|
|
12108
12110
|
}
|
|
12109
12111
|
serialize() {
|
|
12110
12112
|
if (this.isEmpty())
|
|
12111
12113
|
return null;
|
|
12112
|
-
const ue = this.getRect(0, 0), xe = this.rotation % 180 === 0 ? ue[3] - ue[1] : ue[2] - ue[0],
|
|
12114
|
+
const ue = this.getRect(0, 0), xe = this.rotation % 180 === 0 ? ue[3] - ue[1] : ue[2] - ue[0], Ne = c.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);
|
|
12113
12115
|
return {
|
|
12114
12116
|
annotationType: o.AnnotationEditorType.INK,
|
|
12115
|
-
color:
|
|
12117
|
+
color: Ne,
|
|
12116
12118
|
thickness: this.thickness,
|
|
12117
12119
|
opacity: this.opacity,
|
|
12118
12120
|
paths: p(this, L, Be).call(this, this.scaleFactor / this.parent.scaleFactor, this.translationX, this.translationY, xe),
|
|
@@ -12199,13 +12201,13 @@ var Kr = cr(function(De, Te) {
|
|
|
12199
12201
|
}), window.requestAnimationFrame(h(this, $));
|
|
12200
12202
|
}
|
|
12201
12203
|
function Pe(me, ue) {
|
|
12202
|
-
const [xe,
|
|
12203
|
-
me === xe && ue ===
|
|
12204
|
+
const [xe, Ne] = this.currentPath.at(-1);
|
|
12205
|
+
me === xe && ue === Ne || (this.currentPath.push([me, ue]), l(this, q, [me, ue]));
|
|
12204
12206
|
}
|
|
12205
12207
|
function V(me, ue) {
|
|
12206
12208
|
this.ctx.closePath(), l(this, $, null), me = Math.min(Math.max(me, 0), this.canvas.width), ue = Math.min(Math.max(ue, 0), this.canvas.height);
|
|
12207
|
-
const [xe,
|
|
12208
|
-
(me !== xe || ue !==
|
|
12209
|
+
const [xe, Ne] = this.currentPath.at(-1);
|
|
12210
|
+
(me !== xe || ue !== Ne) && this.currentPath.push([me, ue]);
|
|
12209
12211
|
let $e;
|
|
12210
12212
|
if (this.currentPath.length !== 1)
|
|
12211
12213
|
$e = (0, T.fitCurve)(this.currentPath, 30, null);
|
|
@@ -12262,8 +12264,8 @@ var Kr = cr(function(De, Te) {
|
|
|
12262
12264
|
this.canvas.width = Math.ceil(this.width * me), this.canvas.height = Math.ceil(this.height * ue), p(this, M, ce).call(this);
|
|
12263
12265
|
}
|
|
12264
12266
|
function ke(me, ue) {
|
|
12265
|
-
const xe = p(this, se, be).call(this),
|
|
12266
|
-
this.scaleFactor = Math.min(
|
|
12267
|
+
const xe = p(this, se, be).call(this), Ne = (me - xe) / h(this, a), $e = (ue - xe) / h(this, t);
|
|
12268
|
+
this.scaleFactor = Math.min(Ne, $e);
|
|
12267
12269
|
}
|
|
12268
12270
|
function ce() {
|
|
12269
12271
|
const me = p(this, se, be).call(this) / 2;
|
|
@@ -12271,20 +12273,20 @@ var Kr = cr(function(De, Te) {
|
|
|
12271
12273
|
}
|
|
12272
12274
|
function Re(me) {
|
|
12273
12275
|
const ue = new Path2D();
|
|
12274
|
-
for (let xe = 0,
|
|
12276
|
+
for (let xe = 0, Ne = me.length; xe < Ne; xe++) {
|
|
12275
12277
|
const [$e, Ge, Xe, Ve] = me[xe];
|
|
12276
12278
|
xe === 0 && ue.moveTo(...$e), ue.bezierCurveTo(Ge[0], Ge[1], Xe[0], Xe[1], Ve[0], Ve[1]);
|
|
12277
12279
|
}
|
|
12278
12280
|
return ue;
|
|
12279
12281
|
}
|
|
12280
|
-
function Be(me, ue, xe,
|
|
12282
|
+
function Be(me, ue, xe, Ne) {
|
|
12281
12283
|
const Ge = [], Xe = this.thickness / 2;
|
|
12282
12284
|
let Ve, je;
|
|
12283
12285
|
for (const Ze of this.paths) {
|
|
12284
12286
|
Ve = [], je = [];
|
|
12285
12287
|
for (let ct = 0, tt = Ze.length; ct < tt; ct++) {
|
|
12286
|
-
const [at, ut, nt, ht] = Ze[ct], st = me * (at[0] + ue) + Xe, gt =
|
|
12287
|
-
ct === 0 && (Ve.push(st, gt), je.push(st, gt)), Ve.push(bt, pt,
|
|
12288
|
+
const [at, ut, nt, ht] = Ze[ct], st = me * (at[0] + ue) + Xe, gt = Ne - me * (at[1] + xe) - Xe, bt = me * (ut[0] + ue) + Xe, pt = Ne - me * (ut[1] + xe) - Xe, xt = me * (nt[0] + ue) + Xe, Lt = Ne - me * (nt[1] + xe) - Xe, At = me * (ht[0] + ue) + Xe, wt = Ne - me * (ht[1] + xe) - Xe;
|
|
12289
|
+
ct === 0 && (Ve.push(st, gt), je.push(st, gt)), Ve.push(bt, pt, xt, Lt, At, wt), p(this, X, ge).call(this, st, gt, bt, pt, xt, Lt, At, wt, 4, je);
|
|
12288
12290
|
}
|
|
12289
12291
|
Ge.push({
|
|
12290
12292
|
bezier: Ve,
|
|
@@ -12293,31 +12295,31 @@ var Kr = cr(function(De, Te) {
|
|
|
12293
12295
|
}
|
|
12294
12296
|
return Ge;
|
|
12295
12297
|
}
|
|
12296
|
-
function ge(me, ue, xe,
|
|
12297
|
-
if (p(this, J, te).call(this, me, ue, xe,
|
|
12298
|
+
function ge(me, ue, xe, Ne, $e, Ge, Xe, Ve, je, Ze) {
|
|
12299
|
+
if (p(this, J, te).call(this, me, ue, xe, Ne, $e, Ge, Xe, Ve)) {
|
|
12298
12300
|
Ze.push(Xe, Ve);
|
|
12299
12301
|
return;
|
|
12300
12302
|
}
|
|
12301
12303
|
for (let ct = 1; ct < je - 1; ct++) {
|
|
12302
12304
|
const tt = ct / je, at = 1 - tt;
|
|
12303
|
-
let ut = tt * me + at * xe, nt = tt * ue + at *
|
|
12305
|
+
let ut = tt * me + at * xe, nt = tt * ue + at * Ne, ht = tt * xe + at * $e, st = tt * Ne + at * Ge;
|
|
12304
12306
|
const gt = tt * $e + at * Xe, bt = tt * Ge + at * Ve;
|
|
12305
12307
|
ut = tt * ut + at * ht, nt = tt * nt + at * st, ht = tt * ht + at * gt, st = tt * st + at * bt, ut = tt * ut + at * ht, nt = tt * nt + at * st, Ze.push(ut, nt);
|
|
12306
12308
|
}
|
|
12307
12309
|
Ze.push(Xe, Ve);
|
|
12308
12310
|
}
|
|
12309
|
-
function te(me, ue, xe,
|
|
12310
|
-
const Ze = (3 * xe - 2 * me - Xe) ** 2, ct = (3 *
|
|
12311
|
+
function te(me, ue, xe, Ne, $e, Ge, Xe, Ve) {
|
|
12312
|
+
const Ze = (3 * xe - 2 * me - Xe) ** 2, ct = (3 * Ne - 2 * ue - Ve) ** 2, tt = (3 * $e - me - 2 * Xe) ** 2, at = (3 * Ge - ue - 2 * Ve) ** 2;
|
|
12311
12313
|
return Math.max(Ze, tt) + Math.max(ct, at) <= 10;
|
|
12312
12314
|
}
|
|
12313
12315
|
function ae() {
|
|
12314
|
-
let me = 1 / 0, ue = -1 / 0, xe = 1 / 0,
|
|
12316
|
+
let me = 1 / 0, ue = -1 / 0, xe = 1 / 0, Ne = -1 / 0;
|
|
12315
12317
|
for (const $e of this.paths)
|
|
12316
12318
|
for (const [Ge, Xe, Ve, je] of $e) {
|
|
12317
12319
|
const Ze = o.Util.bezierBoundingBox(...Ge, ...Xe, ...Ve, ...je);
|
|
12318
|
-
me = Math.min(me, Ze[0]), xe = Math.min(xe, Ze[1]), ue = Math.max(ue, Ze[2]),
|
|
12320
|
+
me = Math.min(me, Ze[0]), xe = Math.min(xe, Ze[1]), ue = Math.max(ue, Ze[2]), Ne = Math.max(Ne, Ze[3]);
|
|
12319
12321
|
}
|
|
12320
|
-
return [me, xe, ue,
|
|
12322
|
+
return [me, xe, ue, Ne];
|
|
12321
12323
|
}
|
|
12322
12324
|
function be() {
|
|
12323
12325
|
return h(this, k) ? Math.ceil(this.thickness * this.parent.scaleFactor) : 0;
|
|
@@ -12332,10 +12334,10 @@ var Kr = cr(function(De, Te) {
|
|
|
12332
12334
|
}
|
|
12333
12335
|
const ue = p(this, ie, ae).call(this), xe = p(this, se, be).call(this);
|
|
12334
12336
|
l(this, a, Math.max(b, ue[2] - ue[0])), l(this, t, Math.max(b, ue[3] - ue[1]));
|
|
12335
|
-
const
|
|
12336
|
-
this.width =
|
|
12337
|
+
const Ne = Math.ceil(xe + h(this, a) * this.scaleFactor), $e = Math.ceil(xe + h(this, t) * this.scaleFactor), [Ge, Xe] = this.parent.viewportBaseDimensions;
|
|
12338
|
+
this.width = Ne / Ge, this.height = $e / Xe, l(this, u, Ne / $e), p(this, le, He).call(this);
|
|
12337
12339
|
const Ve = this.translationX, je = this.translationY;
|
|
12338
|
-
this.translationX = -ue[0], this.translationY = -ue[1], p(this, d, Ee).call(this), p(this, S, Q).call(this), l(this, Z,
|
|
12340
|
+
this.translationX = -ue[0], this.translationY = -ue[1], p(this, d, Ee).call(this), p(this, S, Q).call(this), l(this, Z, Ne), l(this, z, $e), this.setDims(Ne, $e);
|
|
12339
12341
|
const Ze = me ? xe / this.scaleFactor / 2 : 0;
|
|
12340
12342
|
this.translate(Ve - this.translationX - Ze, je - this.translationY - Ze);
|
|
12341
12343
|
}
|
|
@@ -14522,7 +14524,7 @@ var Kr = cr(function(De, Te) {
|
|
|
14522
14524
|
try {
|
|
14523
14525
|
let Z;
|
|
14524
14526
|
parseInt(process.versions.node) >= 8 ? Z = re : Z = Buffer.from(re);
|
|
14525
|
-
const z =
|
|
14527
|
+
const z = zt.deflateSync(Z, {
|
|
14526
14528
|
level: 9
|
|
14527
14529
|
});
|
|
14528
14530
|
return z instanceof Uint8Array ? z : new Uint8Array(z);
|
|
@@ -15172,7 +15174,7 @@ var Kr = cr(function(De, Te) {
|
|
|
15172
15174
|
value: !0
|
|
15173
15175
|
}), v.PDFNodeStream = void 0;
|
|
15174
15176
|
var o = n(1), c = n(158);
|
|
15175
|
-
const T =
|
|
15177
|
+
const T = zt, R = zt, O = zt, P = zt, m = /^file:\/\/\/[a-zA-Z]:\//;
|
|
15176
15178
|
function y(b) {
|
|
15177
15179
|
const u = P.parse(b);
|
|
15178
15180
|
return u.protocol === "file:" || u.host ? u : /^[a-z]:[/\\]/i.test(b) ? P.parse(`file:///${b}`) : (u.host || (u.protocol = "file:"), u);
|
|
@@ -15943,15 +15945,15 @@ var Kr = cr(function(De, Te) {
|
|
|
15943
15945
|
}
|
|
15944
15946
|
}
|
|
15945
15947
|
}
|
|
15946
|
-
],
|
|
15947
|
-
function
|
|
15948
|
-
var v =
|
|
15948
|
+
], Te = {};
|
|
15949
|
+
function Le(B) {
|
|
15950
|
+
var v = Te[B];
|
|
15949
15951
|
if (v !== void 0)
|
|
15950
15952
|
return v.exports;
|
|
15951
|
-
var n =
|
|
15953
|
+
var n = Te[B] = {
|
|
15952
15954
|
exports: {}
|
|
15953
15955
|
};
|
|
15954
|
-
return Ie[B](n, n.exports,
|
|
15956
|
+
return Ie[B](n, n.exports, Le), n.exports;
|
|
15955
15957
|
}
|
|
15956
15958
|
var Qe = {};
|
|
15957
15959
|
return (() => {
|
|
@@ -16144,40 +16146,40 @@ var Kr = cr(function(De, Te) {
|
|
|
16144
16146
|
return n.version;
|
|
16145
16147
|
}
|
|
16146
16148
|
});
|
|
16147
|
-
var v =
|
|
16149
|
+
var v = Le(1), n = Le(129), o = Le(133), c = Le(147), T = Le(132), R = Le(152), O = Le(140), P = Le(3), m = Le(155), y = Le(156), D = Le(154);
|
|
16148
16150
|
if (P.isNodeJS) {
|
|
16149
16151
|
const {
|
|
16150
16152
|
PDFNodeStream: r
|
|
16151
|
-
} =
|
|
16153
|
+
} = Le(157);
|
|
16152
16154
|
(0, n.setPDFNetworkStreamFactory)((l) => new r(l));
|
|
16153
16155
|
} else {
|
|
16154
16156
|
const {
|
|
16155
16157
|
PDFNetworkStream: r
|
|
16156
|
-
} =
|
|
16158
|
+
} = Le(160), {
|
|
16157
16159
|
PDFFetchStream: l
|
|
16158
|
-
} =
|
|
16160
|
+
} = Le(161);
|
|
16159
16161
|
(0, n.setPDFNetworkStreamFactory)((A) => (0, o.isValidFetchUrl)(A.url) ? new l(A) : new r(A));
|
|
16160
16162
|
}
|
|
16161
16163
|
})(), Qe;
|
|
16162
16164
|
})());
|
|
16163
16165
|
});
|
|
16164
|
-
const
|
|
16165
|
-
|
|
16166
|
-
const
|
|
16166
|
+
const va = /* @__PURE__ */ Ji(Kr), ba = ":host{position:relative;display:inline-flex;width:100%;height:100%}:host(.file-viewer-pdf--view-mode-side-by-side) .file-viewer-pdf__pages{display:grid;grid-template-columns:repeat(2, 1fr);grid-row-gap:var(--s-space-8);grid-column-gap:var(--s-space-8);grid-auto-rows:auto}:host(.file-viewer-pdf--view-mode-side-by-side) .file-viewer-pdf__page{margin:0}:host(.file-viewer-pdf--view-mode-side-by-side) .file-viewer-pdf__page:nth-child(odd){justify-self:end}:host(.file-viewer-pdf--view-mode-side-by-side) .file-viewer-pdf__page:nth-child(even){justify-self:start}:host *{box-sizing:border-box}.file-viewer-pdf__pages{overflow:auto;width:100%;height:100%}@media (min-width: 768px){.file-viewer-pdf__pages{padding:var(--s-space-16)}}.file-viewer-pdf__page{position:relative;margin-right:auto;margin-left:auto;border-bottom:var(--s-border-width-default) solid var(--s-border-default);background-color:#fff}@media (min-width: 768px){.file-viewer-pdf__page{border:var(--s-border-width-default) solid var(--s-border-default)}.file-viewer-pdf__page:not(:last-of-type){margin-bottom:var(--s-space-8)}}.file-viewer-pdf__page-spinner{position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.file-viewer-pdf__canvas{display:flex;width:100%;height:100%;margin-right:auto;margin-left:auto}.file-viewer-pdf__text-container{position:absolute;overflow:hidden;line-height:1;text-align:initial;-webkit-user-select:none;-moz-user-select:none;user-select:none;inset:0;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none}.file-viewer-pdf__text-container>*{position:absolute;color:transparent;white-space:pre;cursor:text;transform-origin:0% 0%}.file-viewer-pdf__text-container>*.markedContent{top:0;height:0}.file-viewer-pdf__text-container>*.highlight{margin:-1px;padding:1px;border-radius:4px;background-color:rgba(180, 0, 170, 1)}.file-viewer-pdf__text-container>*.highlight.appended{position:initial}.file-viewer-pdf__text-container>*.highlight.begin{border-radius:4px 0 0 4px}.file-viewer-pdf__text-container>*.highlight.end{border-radius:0 4px 4px 0}.file-viewer-pdf__text-container>*.highlight.middle{border-radius:0}.file-viewer-pdf__text-container>*.highlight.selected{background-color:rgba(0, 100, 0, 1)}.file-viewer-pdf__text-container>*.endOfContent{position:absolute;z-index:-1;top:100%;right:0;bottom:0;left:0;display:block;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.file-viewer-pdf__text-container>*.endOfContent.active{top:0}.file-viewer-pdf__text-container>br::-moz-selection{background:transparent}.file-viewer-pdf__text-container>br::selection{background:transparent}@media (min-width: 768px){.file-viewer-pdf__text-container{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}}.file-viewer-pdf__spinner{position:absolute;display:flex;justify-content:center;align-items:center;background-color:rgba(0, 0, 0, 0.2);inset:0}.file-viewer-pdf__error{position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.file-viewer-pdf__pagination{position:absolute;bottom:var(--s-space-16);left:50%;padding:var(--s-space-4) var(--s-space-12);border-radius:var(--s-border-radius-base);color:var(--s-text-on-image);background-color:rgba(0, 0, 0, 0.6);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);transform:translateX(-50%);pointer-events:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.file-viewer-pdf__pagination{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}";
|
|
16167
|
+
va.GlobalWorkerOptions.workerSrc = "/pdfjs/pdf.worker.min.js";
|
|
16168
|
+
const ya = class {
|
|
16167
16169
|
constructor(De) {
|
|
16168
|
-
|
|
16169
|
-
var
|
|
16170
|
-
const
|
|
16171
|
-
|
|
16170
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.visiblePagesChange = Rt(this, "visiblePagesChange", 7), this.pages = [], this.renderingPageNumbers = [], this.recentScrollPosition = { x: 0, y: 0 }, this.determineScrollStatus = () => {
|
|
16171
|
+
var we, Ie, Te;
|
|
16172
|
+
const Le = Math.ceil(((we = this.scrollContainer) === null || we === void 0 ? void 0 : we.scrollTop) + ((Ie = this.scrollContainer) === null || Ie === void 0 ? void 0 : Ie.offsetHeight)) >= ((Te = this.scrollContainer) === null || Te === void 0 ? void 0 : Te.scrollHeight);
|
|
16173
|
+
Le !== this.scrolledDown && (this.scrolledDown = Le);
|
|
16172
16174
|
}, this.storeRecentScrollPosition = () => {
|
|
16173
|
-
var
|
|
16175
|
+
var we, Ie, Te, Le;
|
|
16174
16176
|
this.recentScrollPosition = {
|
|
16175
|
-
x: Math.round(((
|
|
16176
|
-
y: Math.round(((
|
|
16177
|
+
x: Math.round(((we = this.scrollContainer) === null || we === void 0 ? void 0 : we.scrollLeft) / ((Ie = this.scrollContainer) === null || Ie === void 0 ? void 0 : Ie.scrollWidth) * 100) / 100,
|
|
16178
|
+
y: Math.round(((Te = this.scrollContainer) === null || Te === void 0 ? void 0 : Te.scrollTop) / ((Le = this.scrollContainer) === null || Le === void 0 ? void 0 : Le.scrollHeight) * 100) / 100
|
|
16177
16179
|
};
|
|
16178
|
-
}, this.onScroll =
|
|
16180
|
+
}, this.onScroll = ea(() => {
|
|
16179
16181
|
this.updateVisiblePages(), this.determineScrollStatus(), this.storeRecentScrollPosition();
|
|
16180
|
-
}, 60), this.errorMessage = "File could not be loaded.", this.file = void 0, this.singlePageMode = void 0, this.zoom = 1, this.doc = void 0, this.error = void 0, this.loading = !0, this.renderedPages = [], this.scrolledDown = !1, this.singlePageModePage = 1, this.visiblePages = [];
|
|
16182
|
+
}, 60), this.errorMessage = "File could not be loaded.", this.file = void 0, this.singlePageMode = void 0, this.viewMode = "single", this.zoom = 1, this.doc = void 0, this.error = void 0, this.loading = !0, this.renderedPages = [], this.scrolledDown = !1, this.singlePageModePage = 1, this.visiblePages = [];
|
|
16181
16183
|
}
|
|
16182
16184
|
async componentWillLoad() {
|
|
16183
16185
|
await this.getPages();
|
|
@@ -16195,11 +16197,29 @@ const ba = class {
|
|
|
16195
16197
|
async watchProps() {
|
|
16196
16198
|
await this.getPages(), await this.updateVisiblePages(), this.determineScrollStatus();
|
|
16197
16199
|
}
|
|
16200
|
+
async watchViewMode() {
|
|
16201
|
+
queueMicrotask(async () => {
|
|
16202
|
+
this.visiblePages = [], this.renderedPages = [], await this.updateVisiblePages(), this.determineScrollStatus();
|
|
16203
|
+
});
|
|
16204
|
+
}
|
|
16198
16205
|
watchZoom() {
|
|
16199
16206
|
queueMicrotask(async () => {
|
|
16200
16207
|
this.restoreScrollPosition(), this.visiblePages = [], this.renderedPages = [], await this.updateVisiblePages(), this.determineScrollStatus();
|
|
16201
16208
|
});
|
|
16202
16209
|
}
|
|
16210
|
+
async getThumbnails() {
|
|
16211
|
+
return await Promise.all(this.pages.filter(Boolean).map((De) => {
|
|
16212
|
+
const we = De.getViewport({ scale: 1 }), Ie = document.createElement("canvas");
|
|
16213
|
+
Ie.width = we.width, Ie.height = we.height;
|
|
16214
|
+
const Te = Math.min(Ie.width / we.width, Ie.height / we.height);
|
|
16215
|
+
return De.render({
|
|
16216
|
+
canvasContext: Ie.getContext("2d"),
|
|
16217
|
+
viewport: De.getViewport({ scale: Te })
|
|
16218
|
+
}).promise.then(function() {
|
|
16219
|
+
return Ie;
|
|
16220
|
+
});
|
|
16221
|
+
}));
|
|
16222
|
+
}
|
|
16203
16223
|
async print() {
|
|
16204
16224
|
this.loading = !0, await this.updateVisiblePages(!0), await this.openPrintDialog(), this.loading = !1;
|
|
16205
16225
|
}
|
|
@@ -16217,8 +16237,8 @@ const ba = class {
|
|
|
16217
16237
|
try {
|
|
16218
16238
|
Boolean(this.doc) && this.doc.destroy(), this.doc = await Kr.getDocument(this.file).promise;
|
|
16219
16239
|
for (let De = 1; De <= this.doc.numPages; De++) {
|
|
16220
|
-
const
|
|
16221
|
-
this.pages[De] =
|
|
16240
|
+
const we = await this.doc.getPage(De);
|
|
16241
|
+
this.pages[De] = we;
|
|
16222
16242
|
}
|
|
16223
16243
|
this.loading = !1;
|
|
16224
16244
|
} catch {
|
|
@@ -16226,9 +16246,9 @@ const ba = class {
|
|
|
16226
16246
|
}
|
|
16227
16247
|
}
|
|
16228
16248
|
async renderVisiblePages(De) {
|
|
16229
|
-
const
|
|
16230
|
-
for (const
|
|
16231
|
-
const
|
|
16249
|
+
const we = Array.from(this.el.shadowRoot.querySelectorAll("canvas")), Ie = [];
|
|
16250
|
+
for (const Te of we) {
|
|
16251
|
+
const Le = Te.closest(".file-viewer-pdf__page"), Qe = this.pages.find((B) => (B == null ? void 0 : B.pageNumber) === +(Le == null ? void 0 : Le.dataset.pageNumber));
|
|
16232
16252
|
if (!(!Boolean(Qe) || this.renderingPageNumbers.includes(Qe.pageNumber))) {
|
|
16233
16253
|
if (!this.visiblePages.includes(Qe.pageNumber)) {
|
|
16234
16254
|
this.destroyPage(Qe);
|
|
@@ -16238,39 +16258,39 @@ const ba = class {
|
|
|
16238
16258
|
Ie.push(Qe.pageNumber);
|
|
16239
16259
|
continue;
|
|
16240
16260
|
}
|
|
16241
|
-
await this.renderPage(Qe,
|
|
16261
|
+
await this.renderPage(Qe, Te, De), Ie.push(Qe.pageNumber);
|
|
16242
16262
|
}
|
|
16243
16263
|
}
|
|
16244
16264
|
this.renderedPages = Ie;
|
|
16245
16265
|
}
|
|
16246
|
-
async renderPage(De,
|
|
16247
|
-
const
|
|
16266
|
+
async renderPage(De, we, Ie) {
|
|
16267
|
+
const Te = we.closest(".file-viewer-pdf__page"), Le = Te == null ? void 0 : Te.querySelector(".file-viewer-pdf__text-container");
|
|
16248
16268
|
this.renderingPageNumbers = [...this.renderingPageNumbers, De.pageNumber];
|
|
16249
|
-
const Qe = Ie ? 2 : this.getScale(De), B = window.devicePixelRatio || 1, v = B !== 1 ? [B, 0, 0, B, 0, 0] : null, n = De.getViewport({ scale: Qe }), o =
|
|
16250
|
-
|
|
16269
|
+
const Qe = Ie ? 2 : this.getScale(De), B = window.devicePixelRatio || 1, v = B !== 1 ? [B, 0, 0, B, 0, 0] : null, n = De.getViewport({ scale: Qe }), o = we.getContext("2d");
|
|
16270
|
+
we.height = Math.floor(n.height * B), we.width = Math.floor(n.width * B);
|
|
16251
16271
|
const c = {
|
|
16252
16272
|
canvasContext: o,
|
|
16253
16273
|
transform: v,
|
|
16254
16274
|
viewport: n
|
|
16255
16275
|
};
|
|
16256
|
-
await De.render(c).promise, De.cleanup(),
|
|
16276
|
+
await De.render(c).promise, De.cleanup(), Le.innerHTML = "", this.renderTextLayer(De, Le), this.renderingPageNumbers = this.renderingPageNumbers.filter((T) => T !== De.pageNumber);
|
|
16257
16277
|
}
|
|
16258
16278
|
destroyPage(De) {
|
|
16259
|
-
const
|
|
16260
|
-
Ie.width = 1, Ie.height = 1, Ie.getContext("2d").clearRect(0, 0, Ie.width, Ie.height),
|
|
16279
|
+
const we = this.el.shadowRoot.querySelector(`[data-page-number="${De.pageNumber}"]`), Ie = we.querySelector("canvas"), Te = we.querySelector(".file-viewer-pdf__text-container");
|
|
16280
|
+
Ie.width = 1, Ie.height = 1, Ie.getContext("2d").clearRect(0, 0, Ie.width, Ie.height), Te.innerHTML = "";
|
|
16261
16281
|
}
|
|
16262
16282
|
async updateVisiblePages(De) {
|
|
16263
|
-
const
|
|
16283
|
+
const we = Array.from(this.el.shadowRoot.querySelectorAll(".file-viewer-pdf__page"));
|
|
16264
16284
|
let Ie = [];
|
|
16265
16285
|
if (this.singlePageMode)
|
|
16266
16286
|
Ie = [this.singlePageModePage];
|
|
16267
|
-
else if (Ie = De ?
|
|
16287
|
+
else if (Ie = De ? we.map((Le) => +Le.dataset.pageNumber) : we.filter((Le) => ta(Le, this.scrollContainer) > 0).map((Le) => +Le.dataset.pageNumber), this.visiblePages.length === Ie.length && this.visiblePages.every((Le) => Ie.includes(Le)))
|
|
16268
16288
|
return;
|
|
16269
|
-
this.visiblePages = Ie, await this.renderVisiblePages(De);
|
|
16289
|
+
this.visiblePages = Ie, await this.renderVisiblePages(De), this.visiblePagesChange.emit(this.visiblePages);
|
|
16270
16290
|
}
|
|
16271
|
-
async renderTextLayer(De,
|
|
16291
|
+
async renderTextLayer(De, we) {
|
|
16272
16292
|
Kr.renderTextLayer({
|
|
16273
|
-
container:
|
|
16293
|
+
container: we,
|
|
16274
16294
|
textContent: await De.getTextContent(),
|
|
16275
16295
|
viewport: De.getViewport({
|
|
16276
16296
|
scale: this.getScale(De)
|
|
@@ -16279,7 +16299,7 @@ const ba = class {
|
|
|
16279
16299
|
}
|
|
16280
16300
|
async openPrintDialog() {
|
|
16281
16301
|
const De = Array.from(this.scrollContainer.querySelectorAll("canvas"));
|
|
16282
|
-
let
|
|
16302
|
+
let we = `
|
|
16283
16303
|
*, *:before, *:after {
|
|
16284
16304
|
margin: 0;
|
|
16285
16305
|
padding: 0;
|
|
@@ -16298,7 +16318,7 @@ const ba = class {
|
|
|
16298
16318
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
16299
16319
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
16300
16320
|
<title>${this.file}</title>
|
|
16301
|
-
<style>${
|
|
16321
|
+
<style>${we}</style>
|
|
16302
16322
|
</head>
|
|
16303
16323
|
<body>
|
|
16304
16324
|
`;
|
|
@@ -16308,31 +16328,31 @@ const ba = class {
|
|
|
16308
16328
|
</body>
|
|
16309
16329
|
</html>
|
|
16310
16330
|
`;
|
|
16311
|
-
const
|
|
16312
|
-
this.el.append(
|
|
16313
|
-
const
|
|
16314
|
-
|
|
16331
|
+
const Te = document.createElement("iframe");
|
|
16332
|
+
this.el.append(Te);
|
|
16333
|
+
const Le = Te.contentWindow;
|
|
16334
|
+
Le.document.write(Ie), Le.focus(), await new Promise((Qe) => setTimeout(Qe, 100)), Le.print(), Te.remove();
|
|
16315
16335
|
}
|
|
16316
16336
|
getScale(De) {
|
|
16317
|
-
var
|
|
16318
|
-
const Ie =
|
|
16319
|
-
return this.zoom === "auto" ? (((
|
|
16337
|
+
var we;
|
|
16338
|
+
const Ie = ra() ? 0 : 32;
|
|
16339
|
+
return this.zoom === "auto" ? (((we = this.scrollContainer) === null || we === void 0 ? void 0 : we.clientWidth) - Ie) / De.view[2] : isNaN(this.zoom) ? 1 : this.zoom;
|
|
16320
16340
|
}
|
|
16321
16341
|
restoreScrollPosition() {
|
|
16322
|
-
var De,
|
|
16323
|
-
this.scrollContainer.scrollTop = this.recentScrollPosition.y * ((De = this.scrollContainer) === null || De === void 0 ? void 0 : De.scrollHeight), this.scrollContainer.scrollLeft = this.recentScrollPosition.x * ((
|
|
16342
|
+
var De, we;
|
|
16343
|
+
this.scrollContainer.scrollTop = this.recentScrollPosition.y * ((De = this.scrollContainer) === null || De === void 0 ? void 0 : De.scrollHeight), this.scrollContainer.scrollLeft = this.recentScrollPosition.x * ((we = this.scrollContainer) === null || we === void 0 ? void 0 : we.scrollWidth);
|
|
16324
16344
|
}
|
|
16325
16345
|
render() {
|
|
16326
|
-
const De = !this.error && !this.loading && this.visiblePages.length > 0,
|
|
16327
|
-
return qe($t, { class:
|
|
16328
|
-
const
|
|
16329
|
-
scale: this.getScale(
|
|
16330
|
-
}),
|
|
16331
|
-
return qe("div", { "aria-label":
|
|
16332
|
-
width: `${
|
|
16333
|
-
height: `${
|
|
16334
|
-
}, tabIndex: 0 }, !
|
|
16335
|
-
})), De && qe("span", { class: "file-viewer-pdf__pagination", id: "pagination", part: "file-viewer-pdf__pagination" }, qe("span", { "aria-current": "page" },
|
|
16346
|
+
const De = !this.error && !this.loading && this.visiblePages.length > 0, we = this.scrolledDown && !this.singlePageMode ? this.pages.length - 1 : this.visiblePages[0], Ie = this.loading, Te = Qi("file-viewer-pdf", `file-viewer-pdf--view-mode-${this.viewMode}`);
|
|
16347
|
+
return qe($t, { class: Te, exportparts: "file-viewer-pdf__pagination" }, this.error && qe("swirl-inline-error", { class: "file-viewer-pdf__error", message: this.errorMessage }), qe("div", { "aria-describedby": "pagination", class: "file-viewer-pdf__pages", onScroll: this.onScroll, ref: (Le) => this.scrollContainer = Le }, this.pages.map((Le) => {
|
|
16348
|
+
const Qe = Le.getViewport({
|
|
16349
|
+
scale: this.getScale(Le)
|
|
16350
|
+
}), B = Qe.height, v = Qe.width, n = this.renderedPages.includes(Le.pageNumber);
|
|
16351
|
+
return qe("div", { "aria-label": Le.pageNumber, class: "file-viewer-pdf__page", "data-page-number": Le.pageNumber, hidden: !this.singlePageMode || Le.pageNumber === this.singlePageModePage ? void 0 : !0, id: `page-${Le.pageNumber}`, key: Le.pageNumber, role: "region", style: {
|
|
16352
|
+
width: `${v}px`,
|
|
16353
|
+
height: `${B}px`
|
|
16354
|
+
}, tabIndex: 0 }, !n && qe("swirl-spinner", { class: "file-viewer-pdf__page-spinner" }), qe("canvas", { class: "file-viewer-pdf__canvas", style: { opacity: n ? "1" : "0" } }), qe("div", { class: "file-viewer-pdf__text-container" }));
|
|
16355
|
+
})), De && qe("span", { class: "file-viewer-pdf__pagination", id: "pagination", part: "file-viewer-pdf__pagination" }, qe("span", { "aria-current": "page" }, we), " / ", this.doc.numPages), Ie && qe("div", { class: "file-viewer-pdf__spinner" }, qe("swirl-spinner", null)));
|
|
16336
16356
|
}
|
|
16337
16357
|
get el() {
|
|
16338
16358
|
return Qt(this);
|
|
@@ -16340,14 +16360,15 @@ const ba = class {
|
|
|
16340
16360
|
static get watchers() {
|
|
16341
16361
|
return {
|
|
16342
16362
|
file: ["watchProps"],
|
|
16363
|
+
viewMode: ["watchViewMode"],
|
|
16343
16364
|
zoom: ["watchZoom"]
|
|
16344
16365
|
};
|
|
16345
16366
|
}
|
|
16346
16367
|
};
|
|
16347
|
-
|
|
16348
|
-
const
|
|
16368
|
+
ya.style = ba;
|
|
16369
|
+
const Sa = ":host{position:relative;display:inline-flex;width:100%;max-height:100%}:host *{box-sizing:border-box}.file-viewer-text__text{overflow:auto;width:100%;max-height:100%;margin:0;padding:0;padding:var(--s-space-16);background-color:var(--s-background-default);font-family:var(--s-font-family-code)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.file-viewer-text__text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.file-viewer-text__spinner{position:absolute;display:flex;justify-content:center;align-items:center;background-color:rgba(0, 0, 0, 0.2);inset:0}.file-viewer-text__error{position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}", Aa = class {
|
|
16349
16370
|
constructor(De) {
|
|
16350
|
-
|
|
16371
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.errorMessage = "File could not be loaded.", this.file = void 0, this.error = void 0, this.loading = void 0, this.text = void 0;
|
|
16351
16372
|
}
|
|
16352
16373
|
componentWillLoad() {
|
|
16353
16374
|
this.updateText();
|
|
@@ -16376,10 +16397,10 @@ const ya = ":host{position:relative;display:inline-flex;width:100%;max-height:10
|
|
|
16376
16397
|
};
|
|
16377
16398
|
}
|
|
16378
16399
|
};
|
|
16379
|
-
|
|
16380
|
-
const
|
|
16400
|
+
Aa.style = Sa;
|
|
16401
|
+
const wa = ":host{display:inline-flex;width:100%;max-height:100%}:host *{box-sizing:border-box}.file-viewer-video__video{width:100%;background-color:rgba(0, 0, 0, 1)}", _a = class {
|
|
16381
16402
|
constructor(De) {
|
|
16382
|
-
|
|
16403
|
+
jt(this, De), this.activate = Rt(this, "activate", 7), this.autoplay = void 0, this.file = void 0, this.type = void 0;
|
|
16383
16404
|
}
|
|
16384
16405
|
componentDidLoad() {
|
|
16385
16406
|
this.activate.emit(this.el);
|
|
@@ -16391,13 +16412,13 @@ const Aa = ":host{display:inline-flex;width:100%;max-height:100%}:host *{box-siz
|
|
|
16391
16412
|
return Qt(this);
|
|
16392
16413
|
}
|
|
16393
16414
|
};
|
|
16394
|
-
|
|
16415
|
+
_a.style = wa;
|
|
16395
16416
|
export {
|
|
16396
|
-
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16417
|
+
aa as swirl_file_viewer,
|
|
16418
|
+
oa as swirl_file_viewer_audio,
|
|
16419
|
+
ua as swirl_file_viewer_csv,
|
|
16420
|
+
ha as swirl_file_viewer_image,
|
|
16421
|
+
ya as swirl_file_viewer_pdf,
|
|
16422
|
+
Aa as swirl_file_viewer_text,
|
|
16423
|
+
_a as swirl_file_viewer_video
|
|
16403
16424
|
};
|