From fd7271e10c1316f09d559b60ffc41255c71fcdc0 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 17 Sep 2024 12:33:55 +0200 Subject: [PATCH 01/25] Import fancyapps --- com.woltlab.wcf/templates/attachments.tpl | 2 +- .../templates/headIncludeJavaScript.tpl | 1 - com.woltlab.wcf/templates/imageViewer.tpl | 16 +++++++++++++++- package-lock.json | 6 ++++++ package.json | 1 + ts/WoltLabSuite/Core/BootstrapFrontend.ts | 3 +++ ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 6 ++++++ .../files/js/3rdParty/fancybox/fancybox.css | 1 + .../files/js/3rdParty/fancybox/fancybox.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/cs.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/cs.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/de.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/de.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/en.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/en.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/es.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/es.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/fr.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/fr.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/it.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/it.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/ja.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/ja.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/lv.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/lv.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/pl.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/pl.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/sk.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/sk.umd.js | 1 + .../files/js/3rdParty/fancybox/l10n/zh_CN.esm.js | 1 + .../files/js/3rdParty/fancybox/l10n/zh_CN.umd.js | 1 + .../js/WoltLabSuite/Core/BootstrapFrontend.js | 4 +++- .../WoltLabSuite/Core/Component/Image/Viewer.js | 10 ++++++++++ wcfsetup/install/files/js/require.config.js | 1 + .../lib/system/bbcode/AttachmentBBCode.class.php | 4 ++-- 35 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 ts/WoltLabSuite/Core/Component/Image/Viewer.ts create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/fancybox.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js create mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js create mode 100644 wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js diff --git a/com.woltlab.wcf/templates/attachments.tpl b/com.woltlab.wcf/templates/attachments.tpl index f52a2c5db2d..8a3b56ac4dd 100644 --- a/com.woltlab.wcf/templates/attachments.tpl +++ b/com.woltlab.wcf/templates/attachments.tpl @@ -8,7 +8,7 @@ {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} {if $attachment->showAsImage() && !$attachment->isEmbedded()}
  • - canDownload()} class="jsImageViewer jsTooltip" title="{lang}wcf.attachment.image.title{/lang}"{/if}> + canDownload()} data-fancybox="attachments" data-caption="{lang}wcf.attachment.image.title{/lang}"{/if}>
    {if $attachment->hasThumbnail()} diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 3bb9f141110..5ee0ce5cf96 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -137,7 +137,6 @@ window.addEventListener('pageshow', function(event) { {js application='wcf' file='WCF.ColorPicker' bundle='WCF.Combined' hasTiny=true} -{js application='wcf' file='WCF.ImageViewer' bundle='WCF.Combined' hasTiny=true} {js application='wcf' file='WCF.Label' bundle='WCF.Combined' hasTiny=true} {js application='wcf' file='WCF.Location' bundle='WCF.Combined' hasTiny=true} {js application='wcf' file='WCF.Message' bundle='WCF.Combined' hasTiny=true} diff --git a/com.woltlab.wcf/templates/imageViewer.tpl b/com.woltlab.wcf/templates/imageViewer.tpl index 44182f2e739..bee33709721 100644 --- a/com.woltlab.wcf/templates/imageViewer.tpl +++ b/com.woltlab.wcf/templates/imageViewer.tpl @@ -1,5 +1,5 @@ {if !$__imageViewerLoaded|isset} - *} + {assign var=__imageViewerLoaded value=true} diff --git a/package-lock.json b/package-lock.json index ad8f8f124a6..f6ea73f7e8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "name": "@woltlab/wcf", "dependencies": { "@ckeditor/ckeditor5-inspector": "^4.1.0", + "@fancyapps/ui": "^5.0.36", "@googlemaps/markerclusterer": "^2.0.15", "@types/facebook-js-sdk": "^3.3.7", "@types/google.maps": "^3.54.0", @@ -772,6 +773,11 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fancyapps/ui": { + "version": "5.0.36", + "resolved": "https://registry.npmjs.org/@fancyapps/ui/-/ui-5.0.36.tgz", + "integrity": "sha512-GMygQzp1MBTFNTT6AzpbL6pXTD6bTxwjmmpI1fe8Ozmmiseu8/g82Sudl1YhcbZmS4bJgaBOF5THDFGpXQ1fDw==" + }, "node_modules/@googlemaps/markerclusterer": { "version": "2.0.15", "resolved": "https://registry.npmjs.org/@googlemaps/markerclusterer/-/markerclusterer-2.0.15.tgz", diff --git a/package.json b/package.json index afe846cadf1..97bdfd7739f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@ckeditor/ckeditor5-inspector": "^4.1.0", + "@fancyapps/ui": "^5.0.36", "@googlemaps/markerclusterer": "^2.0.15", "@types/facebook-js-sdk": "^3.3.7", "@types/google.maps": "^3.54.0", diff --git a/ts/WoltLabSuite/Core/BootstrapFrontend.ts b/ts/WoltLabSuite/Core/BootstrapFrontend.ts index be6881d2a14..a10ffc97ee2 100644 --- a/ts/WoltLabSuite/Core/BootstrapFrontend.ts +++ b/ts/WoltLabSuite/Core/BootstrapFrontend.ts @@ -19,6 +19,7 @@ import UiPageMenuMainFrontend from "./Ui/Page/Menu/Main/Frontend"; import { whenFirstSeen } from "./LazyLoader"; import { prepareRequest } from "./Ajax/Backend"; import { setup as serviceWorkerSetup } from "./Notification/ServiceWorker"; +import * as ImageViewer from "./Component/Image/Viewer"; interface BootstrapOptions { backgroundQueue: { @@ -118,6 +119,8 @@ export function setup(options: BootstrapOptions): void { } } + ImageViewer.setup(); + whenFirstSeen("woltlab-core-reaction-summary", () => { void import("./Ui/Reaction/SummaryDetails").then(({ setup }) => setup()); }); diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts new file mode 100644 index 00000000000..96dee8b18aa --- /dev/null +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -0,0 +1,6 @@ +import { Fancybox } from "@fancyapps/ui"; + +export function setup() { + Fancybox.bind("[data-fancybox]"); + Fancybox.bind('[data-fancybox="attachments"]'); +} diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css b/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css new file mode 100644 index 00000000000..f4554404cbc --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css @@ -0,0 +1 @@ +:root{--f-spinner-width: 36px;--f-spinner-height: 36px;--f-spinner-color-1: rgba(0, 0, 0, 0.1);--f-spinner-color-2: rgba(17, 24, 28, 0.8);--f-spinner-stroke: 2.75}.f-spinner{margin:auto;padding:0;width:var(--f-spinner-width);height:var(--f-spinner-height)}.f-spinner svg{width:100%;height:100%;vertical-align:top;animation:f-spinner-rotate 2s linear infinite}.f-spinner svg *{stroke-width:var(--f-spinner-stroke);fill:none}.f-spinner svg *:first-child{stroke:var(--f-spinner-color-1)}.f-spinner svg *:last-child{stroke:var(--f-spinner-color-2);animation:f-spinner-dash 2s ease-in-out infinite}@keyframes f-spinner-rotate{100%{transform:rotate(360deg)}}@keyframes f-spinner-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}.f-throwOutUp{animation:var(--f-throw-out-duration, 0.175s) ease-out both f-throwOutUp}.f-throwOutDown{animation:var(--f-throw-out-duration, 0.175s) ease-out both f-throwOutDown}@keyframes f-throwOutUp{to{transform:translate3d(0, calc(var(--f-throw-out-distance, 150px) * -1), 0);opacity:0}}@keyframes f-throwOutDown{to{transform:translate3d(0, var(--f-throw-out-distance, 150px), 0);opacity:0}}.f-zoomInUp{animation:var(--f-transition-duration, 0.2s) ease .1s both f-zoomInUp}.f-zoomOutDown{animation:var(--f-transition-duration, 0.2s) ease both f-zoomOutDown}@keyframes f-zoomInUp{from{transform:scale(0.975) translate3d(0, 16px, 0);opacity:0}to{transform:scale(1) translate3d(0, 0, 0);opacity:1}}@keyframes f-zoomOutDown{to{transform:scale(0.975) translate3d(0, 16px, 0);opacity:0}}.f-fadeIn{animation:var(--f-transition-duration, 0.2s) var(--f-transition-easing, ease) var(--f-transition-delay, 0s) both f-fadeIn;z-index:2}.f-fadeOut{animation:var(--f-transition-duration, 0.2s) var(--f-transition-easing, ease) var(--f-transition-delay, 0s) both f-fadeOut;z-index:1}@keyframes f-fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes f-fadeOut{100%{opacity:0}}.f-fadeFastIn{animation:var(--f-transition-duration, 0.2s) ease-out both f-fadeFastIn;z-index:2}.f-fadeFastOut{animation:var(--f-transition-duration, 0.1s) ease-out both f-fadeFastOut;z-index:2}@keyframes f-fadeFastIn{0%{opacity:.75}100%{opacity:1}}@keyframes f-fadeFastOut{100%{opacity:0}}.f-fadeSlowIn{animation:var(--f-transition-duration, 0.5s) ease both f-fadeSlowIn;z-index:2}.f-fadeSlowOut{animation:var(--f-transition-duration, 0.5s) ease both f-fadeSlowOut;z-index:1}@keyframes f-fadeSlowIn{0%{opacity:0}100%{opacity:1}}@keyframes f-fadeSlowOut{100%{opacity:0}}.f-crossfadeIn{animation:var(--f-transition-duration, 0.2s) ease-out both f-crossfadeIn;z-index:2}.f-crossfadeOut{animation:calc(var(--f-transition-duration, 0.2s)*.5) linear .1s both f-crossfadeOut;z-index:1}@keyframes f-crossfadeIn{0%{opacity:0}100%{opacity:1}}@keyframes f-crossfadeOut{100%{opacity:0}}.f-slideIn.from-next{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-slideInNext}.f-slideIn.from-prev{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-slideInPrev}.f-slideOut.to-next{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-slideOutNext}.f-slideOut.to-prev{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-slideOutPrev}@keyframes f-slideInPrev{0%{transform:translateX(100%)}100%{transform:translate3d(0, 0, 0)}}@keyframes f-slideInNext{0%{transform:translateX(-100%)}100%{transform:translate3d(0, 0, 0)}}@keyframes f-slideOutNext{100%{transform:translateX(-100%)}}@keyframes f-slideOutPrev{100%{transform:translateX(100%)}}.f-classicIn.from-next{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-classicInNext;z-index:2}.f-classicIn.from-prev{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-classicInPrev;z-index:2}.f-classicOut.to-next{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-classicOutNext;z-index:1}.f-classicOut.to-prev{animation:var(--f-transition-duration, 0.85s) cubic-bezier(0.16, 1, 0.3, 1) f-classicOutPrev;z-index:1}@keyframes f-classicInNext{0%{transform:translateX(-75px);opacity:0}100%{transform:translate3d(0, 0, 0);opacity:1}}@keyframes f-classicInPrev{0%{transform:translateX(75px);opacity:0}100%{transform:translate3d(0, 0, 0);opacity:1}}@keyframes f-classicOutNext{100%{transform:translateX(-75px);opacity:0}}@keyframes f-classicOutPrev{100%{transform:translateX(75px);opacity:0}}:root{--f-button-width: 40px;--f-button-height: 40px;--f-button-border: 0;--f-button-border-radius: 0;--f-button-color: #374151;--f-button-bg: #f8f8f8;--f-button-hover-bg: #e0e0e0;--f-button-active-bg: #d0d0d0;--f-button-shadow: none;--f-button-transition: all 0.15s ease;--f-button-transform: none;--f-button-svg-width: 20px;--f-button-svg-height: 20px;--f-button-svg-stroke-width: 1.5;--f-button-svg-fill: none;--f-button-svg-filter: none;--f-button-svg-disabled-opacity: 0.65}.f-button{display:flex;justify-content:center;align-items:center;box-sizing:content-box;position:relative;margin:0;padding:0;width:var(--f-button-width);height:var(--f-button-height);border:var(--f-button-border);border-radius:var(--f-button-border-radius);color:var(--f-button-color);background:var(--f-button-bg);box-shadow:var(--f-button-shadow);pointer-events:all;cursor:pointer;transition:var(--f-button-transition)}@media(hover: hover){.f-button:hover:not([disabled]){color:var(--f-button-hover-color);background-color:var(--f-button-hover-bg)}}.f-button:active:not([disabled]){background-color:var(--f-button-active-bg)}.f-button:focus:not(:focus-visible){outline:none}.f-button:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--f-button-outline, 2px) var(--f-button-outline-color, var(--f-button-color))}.f-button svg{width:var(--f-button-svg-width);height:var(--f-button-svg-height);fill:var(--f-button-svg-fill);stroke:currentColor;stroke-width:var(--f-button-svg-stroke-width);stroke-linecap:round;stroke-linejoin:round;transition:opacity .15s ease;transform:var(--f-button-transform);filter:var(--f-button-svg-filter);pointer-events:none}.f-button[disabled]{cursor:default}.f-button[disabled] svg{opacity:var(--f-button-svg-disabled-opacity)}.f-carousel__nav .f-button.is-prev,.f-carousel__nav .f-button.is-next,.fancybox__nav .f-button.is-prev,.fancybox__nav .f-button.is-next{position:absolute;z-index:1}.is-horizontal .f-carousel__nav .f-button.is-prev,.is-horizontal .f-carousel__nav .f-button.is-next,.is-horizontal .fancybox__nav .f-button.is-prev,.is-horizontal .fancybox__nav .f-button.is-next{top:50%;transform:translateY(-50%)}.is-horizontal .f-carousel__nav .f-button.is-prev,.is-horizontal .fancybox__nav .f-button.is-prev{left:var(--f-button-prev-pos)}.is-horizontal .f-carousel__nav .f-button.is-next,.is-horizontal .fancybox__nav .f-button.is-next{right:var(--f-button-next-pos)}.is-horizontal.is-rtl .f-carousel__nav .f-button.is-prev,.is-horizontal.is-rtl .fancybox__nav .f-button.is-prev{left:auto;right:var(--f-button-next-pos)}.is-horizontal.is-rtl .f-carousel__nav .f-button.is-next,.is-horizontal.is-rtl .fancybox__nav .f-button.is-next{right:auto;left:var(--f-button-prev-pos)}.is-vertical .f-carousel__nav .f-button.is-prev,.is-vertical .f-carousel__nav .f-button.is-next,.is-vertical .fancybox__nav .f-button.is-prev,.is-vertical .fancybox__nav .f-button.is-next{top:auto;left:50%;transform:translateX(-50%)}.is-vertical .f-carousel__nav .f-button.is-prev,.is-vertical .fancybox__nav .f-button.is-prev{top:var(--f-button-next-pos)}.is-vertical .f-carousel__nav .f-button.is-next,.is-vertical .fancybox__nav .f-button.is-next{bottom:var(--f-button-next-pos)}.is-vertical .f-carousel__nav .f-button.is-prev svg,.is-vertical .f-carousel__nav .f-button.is-next svg,.is-vertical .fancybox__nav .f-button.is-prev svg,.is-vertical .fancybox__nav .f-button.is-next svg{transform:rotate(90deg)}.f-carousel__nav .f-button:disabled,.fancybox__nav .f-button:disabled{pointer-events:none}html.with-fancybox{width:auto;overflow:visible;scroll-behavior:auto}html.with-fancybox body{touch-action:none}html.with-fancybox body.hide-scrollbar{width:auto;margin-right:calc(var(--fancybox-body-margin, 0px) + var(--fancybox-scrollbar-compensate, 0px));overflow:hidden !important;overscroll-behavior-y:none}.fancybox__container{--fancybox-color: #dbdbdb;--fancybox-hover-color: #fff;--fancybox-bg: rgba(24, 24, 27, 0.98);--fancybox-slide-gap: 10px;--f-spinner-width: 50px;--f-spinner-height: 50px;--f-spinner-color-1: rgba(255, 255, 255, 0.1);--f-spinner-color-2: #bbb;--f-spinner-stroke: 3.65;position:fixed;top:0;left:0;bottom:0;right:0;direction:ltr;display:flex;flex-direction:column;box-sizing:border-box;margin:0;padding:0;color:#f8f8f8;-webkit-tap-highlight-color:rgba(0,0,0,0);overflow:visible;z-index:var(--fancybox-zIndex, 1050);outline:none;transform-origin:top left;-webkit-text-size-adjust:100%;-moz-text-size-adjust:none;-ms-text-size-adjust:100%;text-size-adjust:100%;overscroll-behavior-y:contain}.fancybox__container *,.fancybox__container *::before,.fancybox__container *::after{box-sizing:inherit}.fancybox__container::backdrop{background-color:rgba(0,0,0,0)}.fancybox__backdrop{position:fixed;top:0;left:0;bottom:0;right:0;z-index:-1;background:var(--fancybox-bg);opacity:var(--fancybox-opacity, 1);will-change:opacity}.fancybox__carousel{position:relative;box-sizing:border-box;flex:1;min-height:0;z-index:10;overflow-y:visible;overflow-x:clip}.fancybox__viewport{width:100%;height:100%}.fancybox__viewport.is-draggable{cursor:move;cursor:grab}.fancybox__viewport.is-dragging{cursor:move;cursor:grabbing}.fancybox__track{display:flex;margin:0 auto;height:100%}.fancybox__slide{flex:0 0 auto;position:relative;display:flex;flex-direction:column;align-items:center;width:100%;height:100%;margin:0 var(--fancybox-slide-gap) 0 0;padding:4px;overflow:auto;overscroll-behavior:contain;transform:translate3d(0, 0, 0);backface-visibility:hidden}.fancybox__container:not(.is-compact) .fancybox__slide.has-close-btn{padding-top:40px}.fancybox__slide.has-iframe,.fancybox__slide.has-video,.fancybox__slide.has-html5video{overflow:hidden}.fancybox__slide.has-image{overflow:hidden}.fancybox__slide.has-image.is-animating,.fancybox__slide.has-image.is-selected{overflow:visible}.fancybox__slide::before,.fancybox__slide::after{content:"";flex:0 0 0;margin:auto}.fancybox__backdrop:empty,.fancybox__viewport:empty,.fancybox__track:empty,.fancybox__slide:empty{display:block}.fancybox__content{align-self:center;display:flex;flex-direction:column;position:relative;margin:0;padding:2rem;max-width:100%;color:var(--fancybox-content-color, #374151);background:var(--fancybox-content-bg, #fff);cursor:default;border-radius:0;z-index:20}.is-loading .fancybox__content{opacity:0}.is-draggable .fancybox__content{cursor:move;cursor:grab}.can-zoom_in .fancybox__content{cursor:zoom-in}.can-zoom_out .fancybox__content{cursor:zoom-out}.is-dragging .fancybox__content{cursor:move;cursor:grabbing}.fancybox__content [data-selectable],.fancybox__content [contenteditable]{cursor:auto}.fancybox__slide.has-image>.fancybox__content{padding:0;background:rgba(0,0,0,0);min-height:1px;background-repeat:no-repeat;background-size:contain;background-position:center center;transition:none;transform:translate3d(0, 0, 0);backface-visibility:hidden}.fancybox__slide.has-image>.fancybox__content>picture>img{width:100%;height:auto;max-height:100%}.is-animating .fancybox__content,.is-dragging .fancybox__content{will-change:transform,width,height}.fancybox-image{margin:auto;display:block;width:100%;height:100%;min-height:0;object-fit:contain;user-select:none;filter:blur(0px)}.fancybox__caption{align-self:center;max-width:100%;flex-shrink:0;margin:0;padding:14px 0 4px 0;overflow-wrap:anywhere;line-height:1.375;color:var(--fancybox-color, currentColor);opacity:var(--fancybox-opacity, 1);cursor:auto;visibility:visible}.is-loading .fancybox__caption,.is-closing .fancybox__caption{opacity:0;visibility:hidden}.is-compact .fancybox__caption{padding-bottom:0}.f-button.is-close-btn{--f-button-svg-stroke-width: 2;position:absolute;top:0;right:8px;z-index:40}.fancybox__content>.f-button.is-close-btn{--f-button-width: 34px;--f-button-height: 34px;--f-button-border-radius: 4px;--f-button-color: var(--fancybox-color, #fff);--f-button-hover-color: var(--fancybox-color, #fff);--f-button-bg: transparent;--f-button-hover-bg: transparent;--f-button-active-bg: transparent;--f-button-svg-width: 22px;--f-button-svg-height: 22px;position:absolute;top:-38px;right:0;opacity:.75}.is-loading .fancybox__content>.f-button.is-close-btn{visibility:hidden}.is-zooming-out .fancybox__content>.f-button.is-close-btn{visibility:hidden}.fancybox__content>.f-button.is-close-btn:hover{opacity:1}.fancybox__footer{padding:0;margin:0;position:relative}.fancybox__footer .fancybox__caption{width:100%;padding:24px;opacity:var(--fancybox-opacity, 1);transition:all .25s ease}.is-compact .fancybox__footer{position:absolute;bottom:0;left:0;right:0;z-index:20;background:rgba(24,24,27,.5)}.is-compact .fancybox__footer .fancybox__caption{padding:12px}.is-compact .fancybox__content>.f-button.is-close-btn{--f-button-border-radius: 50%;--f-button-color: #fff;--f-button-hover-color: #fff;--f-button-outline-color: #000;--f-button-bg: rgba(0, 0, 0, 0.6);--f-button-active-bg: rgba(0, 0, 0, 0.6);--f-button-hover-bg: rgba(0, 0, 0, 0.6);--f-button-svg-width: 18px;--f-button-svg-height: 18px;--f-button-svg-filter: none;top:5px;right:5px}.fancybox__nav{--f-button-width: 50px;--f-button-height: 50px;--f-button-border: 0;--f-button-border-radius: 50%;--f-button-color: var(--fancybox-color);--f-button-hover-color: var(--fancybox-hover-color);--f-button-bg: transparent;--f-button-hover-bg: rgba(24, 24, 27, 0.3);--f-button-active-bg: rgba(24, 24, 27, 0.5);--f-button-shadow: none;--f-button-transition: all 0.15s ease;--f-button-transform: none;--f-button-svg-width: 26px;--f-button-svg-height: 26px;--f-button-svg-stroke-width: 2.5;--f-button-svg-fill: none;--f-button-svg-filter: drop-shadow(1px 1px 1px rgba(24, 24, 27, 0.5));--f-button-svg-disabled-opacity: 0.65;--f-button-next-pos: 1rem;--f-button-prev-pos: 1rem;opacity:var(--fancybox-opacity, 1)}.fancybox__nav .f-button:before{position:absolute;content:"";top:-30px;right:-20px;left:-20px;bottom:-30px;z-index:1}.is-idle .fancybox__nav{animation:.15s ease-out both f-fadeOut}.is-idle.is-compact .fancybox__footer{pointer-events:none;animation:.15s ease-out both f-fadeOut}.fancybox__slide>.f-spinner{position:absolute;top:50%;left:50%;margin:var(--f-spinner-top, calc(var(--f-spinner-width) * -0.5)) 0 0 var(--f-spinner-left, calc(var(--f-spinner-height) * -0.5));z-index:30;cursor:pointer}.fancybox-protected{position:absolute;top:0;left:0;right:0;bottom:0;z-index:40;user-select:none}.fancybox-ghost{position:absolute;top:0;left:0;width:100%;height:100%;min-height:0;object-fit:contain;z-index:40;user-select:none;pointer-events:none}.fancybox-focus-guard{outline:none;opacity:0;position:fixed;pointer-events:none}.fancybox__container:not([aria-hidden]){opacity:0}.fancybox__container.is-animated[aria-hidden=false]>*:not(.fancybox__backdrop,.fancybox__carousel),.fancybox__container.is-animated[aria-hidden=false] .fancybox__carousel>*:not(.fancybox__viewport),.fancybox__container.is-animated[aria-hidden=false] .fancybox__slide>*:not(.fancybox__content){animation:var(--f-interface-enter-duration, 0.25s) ease .1s backwards f-fadeIn}.fancybox__container.is-animated[aria-hidden=false] .fancybox__backdrop{animation:var(--f-backdrop-enter-duration, 0.35s) ease backwards f-fadeIn}.fancybox__container.is-animated[aria-hidden=true]>*:not(.fancybox__backdrop,.fancybox__carousel),.fancybox__container.is-animated[aria-hidden=true] .fancybox__carousel>*:not(.fancybox__viewport),.fancybox__container.is-animated[aria-hidden=true] .fancybox__slide>*:not(.fancybox__content){animation:var(--f-interface-exit-duration, 0.15s) ease forwards f-fadeOut}.fancybox__container.is-animated[aria-hidden=true] .fancybox__backdrop{animation:var(--f-backdrop-exit-duration, 0.35s) ease forwards f-fadeOut}.has-iframe .fancybox__content,.has-map .fancybox__content,.has-pdf .fancybox__content,.has-youtube .fancybox__content,.has-vimeo .fancybox__content,.has-html5video .fancybox__content{max-width:100%;flex-shrink:1;min-height:1px;overflow:visible}.has-iframe .fancybox__content,.has-map .fancybox__content,.has-pdf .fancybox__content{width:calc(100% - 120px);height:90%}.fancybox__container.is-compact .has-iframe .fancybox__content,.fancybox__container.is-compact .has-map .fancybox__content,.fancybox__container.is-compact .has-pdf .fancybox__content{width:100%;height:100%}.has-youtube .fancybox__content,.has-vimeo .fancybox__content,.has-html5video .fancybox__content{width:960px;height:540px;max-width:100%;max-height:100%}.has-map .fancybox__content,.has-pdf .fancybox__content,.has-youtube .fancybox__content,.has-vimeo .fancybox__content,.has-html5video .fancybox__content{padding:0;background:rgba(24,24,27,.9);color:#fff}.has-map .fancybox__content{background:#e5e3df}.fancybox__html5video,.fancybox__iframe{border:0;display:block;height:100%;width:100%;background:rgba(0,0,0,0)}.fancybox-placeholder{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.f-carousel__thumbs{--f-thumb-width: 96px;--f-thumb-height: 72px;--f-thumb-outline: 0;--f-thumb-outline-color: #5eb0ef;--f-thumb-opacity: 1;--f-thumb-hover-opacity: 1;--f-thumb-selected-opacity: 1;--f-thumb-border-radius: 2px;--f-thumb-offset: 0px;--f-button-next-pos: 0;--f-button-prev-pos: 0}.f-carousel__thumbs.is-classic{--f-thumb-gap: 8px;--f-thumb-opacity: 0.5;--f-thumb-hover-opacity: 1;--f-thumb-selected-opacity: 1}.f-carousel__thumbs.is-modern{--f-thumb-gap: 4px;--f-thumb-extra-gap: 16px;--f-thumb-clip-width: 46px}.f-thumbs{position:relative;flex:0 0 auto;margin:0;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);user-select:none;perspective:1000px;transform:translateZ(0)}.f-thumbs .f-spinner{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:2px;background-image:linear-gradient(#ebeff2, #e2e8f0);z-index:-1}.f-thumbs .f-spinner svg{display:none}.f-thumbs.is-vertical{height:100%}.f-thumbs__viewport{width:100%;height:auto;overflow:hidden;transform:translate3d(0, 0, 0)}.f-thumbs__track{display:flex}.f-thumbs__slide{position:relative;flex:0 0 auto;box-sizing:content-box;display:flex;align-items:center;justify-content:center;padding:0;margin:0;width:var(--f-thumb-width);height:var(--f-thumb-height);overflow:visible;cursor:pointer}.f-thumbs__slide.is-loading img{opacity:0}.is-classic .f-thumbs__viewport{height:100%}.is-modern .f-thumbs__track{width:max-content}.is-modern .f-thumbs__track::before{content:"";position:absolute;top:0;bottom:0;left:calc((var(--f-thumb-clip-width, 0))*-0.5);width:calc(var(--width, 0)*1px + var(--f-thumb-clip-width, 0));cursor:pointer}.is-modern .f-thumbs__slide{width:var(--f-thumb-clip-width);transform:translate3d(calc(var(--shift, 0) * -1px), 0, 0);transition:none;pointer-events:none}.is-modern.is-resting .f-thumbs__slide{transition:transform .33s ease}.is-modern.is-resting .f-thumbs__slide__button{transition:clip-path .33s ease}.is-using-tab .is-modern .f-thumbs__slide:focus-within{filter:drop-shadow(-1px 0px 0px var(--f-thumb-outline-color)) drop-shadow(2px 0px 0px var(--f-thumb-outline-color)) drop-shadow(0px -1px 0px var(--f-thumb-outline-color)) drop-shadow(0px 2px 0px var(--f-thumb-outline-color))}.f-thumbs__slide__button{appearance:none;width:var(--f-thumb-width);height:100%;margin:0 -100% 0 -100%;padding:0;border:0;position:relative;border-radius:var(--f-thumb-border-radius);overflow:hidden;background:rgba(0,0,0,0);outline:none;cursor:pointer;pointer-events:auto;touch-action:manipulation;opacity:var(--f-thumb-opacity);transition:opacity .2s ease}.f-thumbs__slide__button:hover{opacity:var(--f-thumb-hover-opacity)}.f-thumbs__slide__button:focus:not(:focus-visible){outline:none}.f-thumbs__slide__button:focus-visible{outline:none;opacity:var(--f-thumb-selected-opacity)}.is-modern .f-thumbs__slide__button{--clip-path: inset( 0 calc( ((var(--f-thumb-width, 0) - var(--f-thumb-clip-width, 0))) * (1 - var(--progress, 0)) * 0.5 ) round var(--f-thumb-border-radius, 0) );clip-path:var(--clip-path)}.is-classic .is-nav-selected .f-thumbs__slide__button{opacity:var(--f-thumb-selected-opacity)}.is-classic .is-nav-selected .f-thumbs__slide__button::after{content:"";position:absolute;top:0;left:0;right:0;height:auto;bottom:0;border:var(--f-thumb-outline, 0) solid var(--f-thumb-outline-color, transparent);border-radius:var(--f-thumb-border-radius);animation:f-fadeIn .2s ease-out;z-index:10}.f-thumbs__slide__img{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;padding:var(--f-thumb-offset);box-sizing:border-box;pointer-events:none;object-fit:cover;border-radius:var(--f-thumb-border-radius)}.f-thumbs.is-horizontal .f-thumbs__track{padding:8px 0 12px 0}.f-thumbs.is-horizontal .f-thumbs__slide{margin:0 var(--f-thumb-gap) 0 0}.f-thumbs.is-vertical .f-thumbs__track{flex-wrap:wrap;padding:0 8px}.f-thumbs.is-vertical .f-thumbs__slide{margin:0 0 var(--f-thumb-gap) 0}.fancybox__thumbs{--f-thumb-width: 96px;--f-thumb-height: 72px;--f-thumb-border-radius: 2px;--f-thumb-outline: 2px;--f-thumb-outline-color: #ededed;position:relative;opacity:var(--fancybox-opacity, 1);transition:max-height .35s cubic-bezier(0.23, 1, 0.32, 1)}.fancybox__thumbs.is-classic{--f-thumb-gap: 8px;--f-thumb-opacity: 0.5;--f-thumb-hover-opacity: 1}.fancybox__thumbs.is-classic .f-spinner{background-image:linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05))}.fancybox__thumbs.is-modern{--f-thumb-gap: 4px;--f-thumb-extra-gap: 16px;--f-thumb-clip-width: 46px;--f-thumb-opacity: 1;--f-thumb-hover-opacity: 1}.fancybox__thumbs.is-modern .f-spinner{background-image:linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05))}.fancybox__thumbs.is-horizontal{padding:0 var(--f-thumb-gap)}.fancybox__thumbs.is-vertical{padding:var(--f-thumb-gap) 0}.is-compact .fancybox__thumbs{--f-thumb-width: 64px;--f-thumb-clip-width: 32px;--f-thumb-height: 48px;--f-thumb-extra-gap: 10px}.fancybox__thumbs.is-masked{max-height:0px !important}.is-closing .fancybox__thumbs{transition:none !important}.fancybox__toolbar{--f-progress-color: var(--fancybox-color, rgba(255, 255, 255, 0.94));--f-button-width: 46px;--f-button-height: 46px;--f-button-color: var(--fancybox-color);--f-button-hover-color: var(--fancybox-hover-color);--f-button-bg: rgba(24, 24, 27, 0.65);--f-button-hover-bg: rgba(70, 70, 73, 0.65);--f-button-active-bg: rgba(90, 90, 93, 0.65);--f-button-border-radius: 0;--f-button-svg-width: 24px;--f-button-svg-height: 24px;--f-button-svg-stroke-width: 1.5;--f-button-svg-filter: drop-shadow(1px 1px 1px rgba(24, 24, 27, 0.15));--f-button-svg-fill: none;--f-button-svg-disabled-opacity: 0.65;display:flex;flex-direction:row;justify-content:space-between;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;color:var(--fancybox-color, currentColor);opacity:var(--fancybox-opacity, 1);text-shadow:var(--fancybox-toolbar-text-shadow, 1px 1px 1px rgba(0, 0, 0, 0.5));pointer-events:none;z-index:20}.fancybox__toolbar :focus-visible{z-index:1}.fancybox__toolbar.is-absolute,.is-compact .fancybox__toolbar{position:absolute;top:0;left:0;right:0}.is-idle .fancybox__toolbar{pointer-events:none;animation:.15s ease-out both f-fadeOut}.fancybox__toolbar__column{display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start}.fancybox__toolbar__column.is-left,.fancybox__toolbar__column.is-right{flex-grow:1;flex-basis:0}.fancybox__toolbar__column.is-right{display:flex;justify-content:flex-end;flex-wrap:nowrap}.fancybox__infobar{padding:0 5px;line-height:var(--f-button-height);text-align:center;font-size:17px;font-variant-numeric:tabular-nums;-webkit-font-smoothing:subpixel-antialiased;cursor:default;user-select:none}.fancybox__infobar span{padding:0 5px}.fancybox__infobar:not(:first-child):not(:last-child){background:var(--f-button-bg)}[data-fancybox-toggle-slideshow]{position:relative}[data-fancybox-toggle-slideshow] .f-progress{height:100%;opacity:.3}[data-fancybox-toggle-slideshow] svg g:first-child{display:flex}[data-fancybox-toggle-slideshow] svg g:last-child{display:none}.has-slideshow [data-fancybox-toggle-slideshow] svg g:first-child{display:none}.has-slideshow [data-fancybox-toggle-slideshow] svg g:last-child{display:flex}[data-fancybox-toggle-fullscreen] svg g:first-child{display:flex}[data-fancybox-toggle-fullscreen] svg g:last-child{display:none}:fullscreen [data-fancybox-toggle-fullscreen] svg g:first-child{display:none}:fullscreen [data-fancybox-toggle-fullscreen] svg g:last-child{display:flex}.f-progress{position:absolute;top:0;left:0;right:0;height:3px;transform:scaleX(0);transform-origin:0;transition-property:transform;transition-timing-function:linear;background:var(--f-progress-color, var(--f-carousel-theme-color, #0091ff));z-index:30;user-select:none;pointer-events:none} \ No newline at end of file diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.umd.js new file mode 100644 index 00000000000..2acc142effe --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.umd.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,e=1e4)=>(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),i=function(t){if(!(t&&t instanceof Element&&t.offsetParent))return!1;const e=t.scrollHeight>t.clientHeight,i=window.getComputedStyle(t).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&&!n&&!s},n=function(t,e=void 0){return!(!t||t===document.body||e&&t===e)&&(i(t)?t:n(t.parentElement,e))},s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount>1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild},o=t=>`${t||""}`.split(" ").filter((t=>!!t)),a=(t,e,i)=>{t&&o(e).forEach((e=>{t.classList.toggle(e,i||!1)}))};class r{constructor(t){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&&t instanceof Touch?t.identifier:-1,this.time=Date.now()}}const l={passive:!1};class c{constructor(t,{start:e=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(const t of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[t]=this[t].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(t){if(!t.buttons||0!==t.button)return;const e=new r(t);this.currentPointers.some((t=>t.id===e.id))||this.triggerPointerStart(e,t)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerStart(new r(e),t);window.addEventListener("blur",this.onWindowBlur)}onMove(t){const e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((t=>new r(t))):[new r(t)],n=[];for(const t of i){const e=this.currentPointers.findIndex((e=>e.id===t.id));e<0||(n.push(t),this.currentPointers[e]=t)}n.length&&this.moveCallback(t,this.currentPointers.slice(),e)}onPointerEnd(t){t.buttons>0&&0!==t.button||(this.triggerPointerEnd(t,new r(t)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerEnd(t,new r(e))}triggerPointerStart(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&&(this.currentPointers.push(t),this.startPointers.push(t),!0)}triggerPointerEnd(t,e){const i=this.currentPointers.findIndex((t=>t.id===e.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const t=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}),t,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function h(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function d(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}const u=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object]"===Object.prototype.toString.call(t),p=(t,...e)=>{const i=e.length;for(let n=0;n{const n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,{[e]:n}),u(i)?Object.assign(t[e],p(n,i)):Array.isArray(i)?Object.assign(t,{[e]:[...i]}):Object.assign(t,{[e]:i})}))}return t},f=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class g{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?p({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=f(t,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=f(e,t);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&&(s=!0),"false"===s&&(s=!1),s&&"function"==typeof s&&(s=s.call(this,this,t,...n));let a=f(e,this.options);return a&&"function"==typeof a?s=a.call(this,this,t,...n,s):void 0===s&&(s=a),void 0===s?i:s}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=>{let n="";return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;ie))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),this.events||(this.events=new Map),i.forEach((t=>{let i=this.events.get(t);i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&&(i=t),i.forEach((t=>{const i=this.events.get(t);if(Array.isArray(i)){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(g,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(g,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class m extends g{constructor(t={}){super(t),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(t={}){const e=new Map;for(const[i,n]of Object.entries(t)){const t=this.option(i),s=this.plugins[i];s||!1===t?s&&!1===t&&(s.detach(),delete this.plugins[i]):e.set(i,new n(this,t||{}))}for(const[t,i]of e)this.plugins[t]=i,i.attach()}detachPlugins(t){t=t||Object.keys(this.plugins);for(const e of t){const t=this.plugins[e];t&&t.detach(),delete this.plugins[e]}return this.emit("detachPlugins"),this}}var v;!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(v||(v={}));const b=["a","b","c","d","e","f"],y={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},w={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:y},x='',E='
    '+x+x+"
    ",S=t=>t&&null!==t&&t instanceof Element&&"nodeType"in t,P=(t,e)=>{t&&o(e).forEach((e=>{t.classList.remove(e)}))},C=(t,e)=>{t&&o(e).forEach((e=>{t.classList.add(e)}))},T={a:1,b:0,c:0,d:1,e:0,f:0},M=1e5,O=1e4,A="mousemove",L="drag",z="content",R="auto";let k=null,I=null;class D extends m{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===I&&(I=window.matchMedia("(hover: none)").matches),I}get isMobile(){return null===k&&(k=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),k}get panMode(){return this.options.panMode!==A||this.isTouchDevice?L:A}get panOnlyZoomed(){const t=this.options.panOnlyZoomed;return t===R?this.isTouchDevice:t}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:t,b:e}=this.current;return Math.sqrt(t*t+e*e)||1}get targetScale(){const{a:t,b:e}=this.target;return Math.sqrt(t*t+e*e)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:t}=this;return t.fullWidth/t.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:t,contentRect:e}=this,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const t=this.content;return!!(t&&t instanceof HTMLImageElement)&&!t.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const t of b){const e="e"==t||"f"===t?1e-4:1e-5;if(Math.abs(this.target[t]-this.current[t])>e)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(t,e={},i={}){var n;if(super(e),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:v.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},T)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},T)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");this.container=t,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},D.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){t.classList.add(this.cn("isLoading"));const e=s(E);!t.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=t.appendChild(e):this.spinner=(null===(n=o.parentElement)||void 0===n?void 0:n.insertBefore(e,o))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:t}=this,e=this.cn(z);let i=this.option(z)||t.querySelector(`.${e}`);if(i||(i=t.querySelector("img,picture")||t.firstElementChild,i&&C(i,e)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:t,container:e,state:i}=this;t&&(t.remove(),this.spinner=null),this.option("spinner")&&e.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===v.Init?this.enable():this.updateMetrics()}onError(){this.state!==v.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=v.Error,this.emit("error"))}getNextScale(t){const{fullScale:e,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this;let a=o;switch(t){case"toggleMax":a=i-o<.5*(s-o)?s:o;break;case"toggleCover":a=i-o<.5*(n-o)?n:o;break;case"toggleZoom":a=i-o<.5*(e-o)?e:o;break;case"iterateZoom":let t=[1,e,s].sort(((t,e)=>t-e)),r=t.findIndex((t=>t>i+1e-5));a=t[r]||1}return a}attachObserver(){var t;const e=()=>{const{container:t,containerRect:e}=this;return Math.abs(e.width-t.getBoundingClientRect().width)>.1||Math.abs(e.height-t.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(e()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{e()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}detachObserver(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}attachEvents(){const{container:t}=this;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(A,this.onMouseMove)}detachEvents(){var t;const{container:e}=this;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(A,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();const t=this.friction,e=this.option("maxVelocity");for(const i of b)t?(this.velocity[i]*=1-t,e&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],e),-1*e)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const t of b)"e"===t&&this.isBouncingX||"f"===t&&this.isBouncingY||(this.velocity[t]=(1/(1-this.friction)-1)*(this.target[t]-this.current[t]))}checkBounds(t=0,e=0){const{current:i}=this,n=i.e+t,s=i.f+e,o=this.getBounds(),{x:a,y:r}=o,l=a.min,c=a.max,h=r.min,d=r.max;let u=0,p=0;return l!==1/0&&nc&&(u=c-n),h!==1/0&&sd&&(p=d-s),Math.abs(u)<1e-4&&(u=0),Math.abs(p)<1e-4&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){const{target:t}=this,{x:e,y:i}=this.getBounds();e.min!==1/0&&(t.e=Math.max(t.e,e.min)),e.max!==1/0&&(t.e=Math.min(t.e,e.max)),i.min!==1/0&&(t.f=Math.max(t.f,i.min)),i.max!==1/0&&(t.f=Math.min(t.f,i.max))}calculateContentDim(t=this.current){const{content:e,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i;let r=o,l=a;if(this.option("zoom")||0!==this.angle){const i=!(e instanceof HTMLImageElement)&&("none"===window.getComputedStyle(e).maxWidth||"none"===window.getComputedStyle(e).maxHeight),c=i?o:n,h=i?a:s,d=this.getMatrix(t),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+c,0).matrixTransform(d),f=new DOMPoint(0+c,0+h).matrixTransform(d),g=new DOMPoint(0,0+h).matrixTransform(d),m=Math.abs(f.x-u.x),v=Math.abs(f.y-u.y),b=Math.abs(g.x-p.x),y=Math.abs(g.y-p.y);r=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===A||this.targetScale{const t=window.getSelection();return t&&"Range"===t.type})()&&!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&&S(o)?o.dataset:null;if(a){const e=a.panzoomChange,i=a.panzoomAction;if((e||i)&&t.preventDefault(),e){let t={};try{t=JSON.parse(e)}catch(t){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(t)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return t.preventDefault(),void t.stopPropagation();if(i.closest("[data-fancybox]"))return;const r=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(r.x-l.x)>2||Math.abs(r.y-l.y)>2))return;this.dragStart.time=0;const c=e=>{this.option("zoom",t)&&e&&"string"==typeof e&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&&"function"==typeof this[e]&&(t.preventDefault(),this[e]({event:t}))},h=this.option("click",t),d=this.option("dblClick",t);d?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",t),!t.defaultPrevented&&h&&c(h)):(this.emit("dblClick",t),t.defaultPrevented||c(d)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&&h&&c(h))}addTrackingPoint(t){const e=this.trackingPoints.filter((t=>t.time>Date.now()-100));e.push(t),this.trackingPoints=e}onPointerDown(t,e,i){var n;if(!1===this.option("touch",t))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===A&&this.targetScale>1)return t.preventDefault(),t.stopPropagation(),!1;const o=t.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)["A","BUTTON"].includes(o.nodeName)||t.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit("touchStart",t)),!0}onPointerMove(t,i,s){if(!1===this.option("touch",t))return;if(!this.isDragging)return;if(i.length<2&&this.panOnlyZoomed&&e(this.targetScale)<=e(this.minScale))return;if(this.emit("touchMove",t),t.defaultPrevented)return;this.addTrackingPoint(i[0]);const{content:o}=this,a=d(s[0],s[1]),r=d(i[0],i[1]);let l=0,c=0;if(i.length>1){const t=o.getBoundingClientRect();l=a.clientX-t.left-.5*t.width,c=a.clientY-t.top-.5*t.height}const u=h(s[0],s[1]),p=h(i[0],i[1]);let f=u?p/u:1,g=r.clientX-a.clientX,m=r.clientY-a.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=e(this.targetScale)===e(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void t.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=e>45&&e<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(n(t.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&e(this.targetScale)===e(this.minScale))return;t.cancelable&&t.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y<.5*w&&(f=Math.max(f,w)),y>1.5*x&&(f=Math.min(f,x)),"y"===this.lockedAxis&&e(y)===e(w)&&(g=0),"x"===this.lockedAxis&&e(y)===e(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:g,panY:m,scale:f,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(e),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),n(t.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==v.Destroy&&(t.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var t;const i=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of b)this.velocity[t]=0;this.target.e=this.current.e,this.target.f=this.current.f,P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,s=n[0],o=n[n.length-1];let a=0,r=0,l=0;o&&s&&(a=o.clientX-s.clientX,r=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&&(a*=c,r*=c);let h=0,d=0,u=0,p=0,f=this.option("decelFriction");const g=this.targetScale;if(l>0){u=Math.abs(a)>3?a/(l/30):0,p=Math.abs(r)>3?r/(l/30):0;const t=this.option("maxVelocity");t&&(u=Math.max(Math.min(u,t),-1*t),p=Math.max(Math.min(p,t),-1*t))}u&&(h=u/(1/(1-f)-1)),p&&(d=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&e(g)===this.minScale)&&(h=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&e(g)===this.minScale)&&(d=p=0);const m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)this.maxScale+1e-5)||i&&!h&&!d)&&(f=.35),this.applyChange({panX:h,panY:d,friction:f}),this.emit("decel",u,p,m,v)}onWheel(t){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode===A)return;if(t.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&&!1!==this.option("zoom")&&this.zoomWithWheel(t)}onMouseMove(t){this.panWithMouse(t)}onKeydown(t){"Escape"===t.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:t,target:i,content:n,contentRect:s}=this,o=Object.assign({},T);for(const n of b){const s="e"==n||"f"===n?O:M;o[n]=e(t[n],s),Math.abs(i[n]-t[n])<("e"==n||"f"===n?.51:.001)&&(t[n]=i[n])}let{a:a,b:r,c:l,d:c,e:h,f:d}=o,u=`matrix(${a}, ${r}, ${l}, ${c}, ${h}, ${d})`,p=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&&(p=p.parentElement||p),p.style.transform===u)return;p.style.transform=u;const{contentWidth:f,contentHeight:g}=this.calculateContentDim();s.width=f,s.height=g,this.emit("afterTransform")}updateMetrics(t=!1){var i;if(!this||this.state===v.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),{container:s,content:o}=this,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=r.width*n,h=r.height*n;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=h-d;this.containerRect={width:c,height:h,innerWidth:u,innerHeight:p};const f=parseFloat(o.dataset.width||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth),e||0})(o),g=parseFloat(o.dataset.height||"")||(t=>{let e=0;return e=t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight),e||0})(o);let m=this.option("width",f)||R,b=this.option("height",g)||R;const y=m===R,w=b===R;"number"!=typeof m&&(m=f),"number"!=typeof b&&(b=g),y&&(m=f*(b/g)),w&&(b=g/(f/m));let x=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&&(x=x.parentElement||x);const E=x.getAttribute("style")||"";x.style.setProperty("transform","none","important"),a&&(x.style.width="",x.style.height=""),x.offsetHeight;const S=o.getBoundingClientRect();let P=S.width*n,C=S.height*n,T=P,M=C;P=Math.min(P,m),C=Math.min(C,b),a?({width:P,height:C}=((t,e,i,n)=>{const s=i/t,o=n/e,a=Math.min(s,o);return{width:t*=a,height:e*=a}})(m,b,P,C)):(P=Math.min(P,m),C=Math.min(C,b));let O=.5*(M-C),A=.5*(T-P);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:S.top-r.top+O,bottom:r.bottom-S.bottom+O,left:S.left-r.left+A,right:r.right-S.right+A,fitWidth:P,fitHeight:C,width:P,height:C,fullWidth:m,fullHeight:b}),x.style.cssText=E,a&&(x.style.width=`${P}px`,x.style.height=`${C}px`),this.setTransform(),!0!==t&&this.emit("refresh"),this.ignoreBounds||(e(this.targetScale)this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===v.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:t,contentHeight:i}=this.calculateContentDim(this.target),{targetScale:n,lockedAxis:s}=this,{fitWidth:o,fitHeight:a}=this.contentRect;let r=0,l=0,c=0,h=0;const d=this.option("infinite");if(!0===d||s&&d===s)r=-1/0,c=1/0,l=-1/0,h=1/0;else{let{containerRect:s,contentRect:d}=this,u=e(o*n,O),p=e(a*n,O),{innerWidth:f,innerHeight:g}=s;if(s.width===u&&(f=s.width),s.width===p&&(g=s.height),t>f){c=.5*(t-f),r=-1*c;let e=.5*(d.right-d.left);r+=e,c+=e}if(o>f&&tg){h=.5*(i-g),l=-1*h;let t=.5*(d.bottom-d.top);l+=t,h+=t}a>g&&ie(s.fitWidth,1)||e(s.height,1)>e(s.fitHeight,1))&&(p=!0)),e(s.width*o,1)e(o),g=!f&&!p&&d&&e(l)i&&(n=i/t)}y=y.scale(n)}y=y.translate(-o,-a).translate(-f,-g).multiply(m),s&&(y=y.rotate(s)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(const t of b)"e"!==t&&"f"!==t&&(y[t]>this.minScale+1e-5||y[t].1||this.panMode===A||!1===d)&&!h&&this.clampTargetBounds(),u===v.Init?this.animate():this.isResting||(this.state=v.Panning,this.requestTick())}stop(t=!1){if(this.state===v.Init||this.state===v.Destroy)return;const e=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of b)this.velocity[e]=0,"current"===t?this.current[e]=this.target[e]:"target"===t&&(this.target[e]=this.current[e]);this.setTransform(),P(this.container,"is-scaling"),P(this.container,"is-animating"),this.isTicking=!1,this.state=v.Ready,e&&(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),C(this.container,"is-animating"),this.isScaling&&C(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(t,i=this.option("mouseMoveFriction")){if(this.pmme=t,this.panMode!==A||!t)return;if(e(this.targetScale)<=e(this.minScale))return;this.emit("mouseMove",t);const{container:n,containerRect:s,contentRect:o}=this,a=s.width,r=s.height,l=n.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const p=this.option("mouseMoveFactor");p>1&&(d!==a&&(d*=p),u!==r&&(u*=p));let f=.5*(d-a)-c/a*100/100*(d-a);f+=.5*(o.right-o.left);let g=.5*(u-r)-h/r*100/100*(u-r);g+=.5*(o.bottom-o.top),this.applyChange({panX:f-this.target.e,panY:g-this.target.f,friction:i})}zoomWithWheel(t){if(this.state===v.Destroy||this.state===v.Init)return;const i=Date.now();if(i-this.pwt<45)return void t.preventDefault();this.pwt=i;var n=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t}));const s=Math.max(-1,Math.min(1,n)),{targetScale:o,maxScale:a,minScale:r}=this;let l=o*(100+45*s)/100;e(l)e(a)&&e(o)>=e(a)?(this.cwd+=Math.abs(s),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd>this.option("wheelLimit")||(t.preventDefault(),e(l)!==e(o)&&this.zoomTo(l,{event:t}))}canZoomIn(){return this.option("zoom")&&(e(this.contentRect.width,1)e(this.minScale)}zoomIn(t=1.25,e){this.zoomTo(this.targetScale*t,e)}zoomOut(t=.8,e){this.zoomTo(this.targetScale*t,e)}zoomToFit(t){this.zoomTo("fit",t)}zoomToCover(t){this.zoomTo("cover",t)}zoomToFull(t){this.zoomTo("full",t)}zoomToMax(t){this.zoomTo("max",t)}toggleZoom(t){this.zoomTo(this.getNextScale("toggleZoom"),t)}toggleMax(t){this.zoomTo(this.getNextScale("toggleMax"),t)}toggleCover(t){this.zoomTo(this.getNextScale("toggleCover"),t)}iterateZoom(t){this.zoomTo("next",t)}zoomTo(t=1,{friction:e=R,originX:i=R,originY:n=R,event:s}={}){if(this.isContentLoading||this.state===v.Destroy)return;const{targetScale:o,fullScale:a,maxScale:r,coverScale:l}=this;if(this.stop(),this.panMode===A&&(s=this.pmme||s),s||i===R||n===R){const t=this.content.getBoundingClientRect(),e=this.container.getBoundingClientRect(),o=s?s.clientX:e.left+.5*e.width,a=s?s.clientY:e.top+.5*e.height;i=o-t.left-.5*t.width,n=a-t.top-.5*t.height}let c=1;"number"==typeof t?c=t:"full"===t?c=a:"cover"===t?c=l:"max"===t?c=r:"fit"===t?c=1:"next"===t&&(c=this.getNextScale("iterateZoom")),c=c/o||1,e=e===R?c>1?.15:.25:e,this.applyChange({scale:c,originX:i,originY:n,friction:e}),s&&this.panMode===A&&this.panWithMouse(s,e)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHeight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:t}=this,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);const n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(t=this.current){const{a:e,b:i,c:n,d:s,e:o,f:a}=t;return new DOMMatrix([e,i,n,s,o,a])}reset(t){if(this.state!==v.Init&&this.state!==v.Destroy){this.stop("current");for(const t of b)this.target[t]=T[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=v.Panning,this.requestTick())}}destroy(){this.stop(),this.state=v.Destroy,this.detachEvents(),this.detachObserver();const{container:t,content:e}=this,i=this.option("classes")||{};for(const e of Object.values(i))t.classList.remove(e+"");e&&(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(D,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(D,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const F=function(t,e){let i=!0;return(...n)=>{i&&(i=!1,t(...n),setTimeout((()=>{i=!0}),e))}},j=(t,e)=>{let i=[];return t.childNodes.forEach((t=>{t.nodeType!==Node.ELEMENT_NODE||e&&!t.matches(e)||i.push(t)})),i},B={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var H;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(H||(H={}));const N=t=>{if("string"==typeof t||t instanceof HTMLElement)t={html:t};else{const e=t.thumb;void 0!==e&&("string"==typeof e&&(t.thumbSrc=e),e instanceof HTMLImageElement&&(t.thumbEl=e,t.thumbElSrc=e.src,t.thumbSrc=e.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},_=(t={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},t);class $ extends g{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}const W={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'',dynamicFrom:11,maxCount:1/0,minCount:2};class X extends ${constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let t=this.list;if(!t){t=document.createElement("ul"),C(t,this.cn("list")),t.setAttribute("role","tablist");const e=this.instance.container;e.appendChild(t),C(e,this.cn("hasDots")),this.list=t}return t}refresh(){var t;const e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(en)return void this.cleanup();const o="number"==typeof s&&e>5&&e>=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&&this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(let t=0;t=e-1&&s.setAttribute(q,"")))}addBtn(t){var e;const i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${t.toUpperCase()}}}`)),C(n,this.cn("button")+" "+this.cn(t===Y?"isNext":"isPrev"));const s=i.isRTL?t===Y?V:Y:t;var o;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${o=t,o?o.match("^[a-z]")?o.charAt(0).toUpperCase()+o.substring(1):o:""}`]="true",null===(e=this.container)||void 0===e||e.appendChild(n),n}build(){const t=this.instance.container,e=this.cn("container");let{container:i,prev:n,next:s}=this;i||(i=t.querySelector("."+e),this.isDom=!!i),i||(i=document.createElement("div"),C(i,e),t.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(Y)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(V)),this.prev=n}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(Z,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'',prevTpl:''}});class U extends ${constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(t){this.target=this.instance,this.nav=t,this.attachEvents()}addAsNavFor(t){this.nav=this.instance,this.target=t,this.attachEvents()}attachEvents(){const{nav:t,target:e}=this;t&&e&&(t.options.initialSlide=e.options.initialPage,t.state===H.Ready?this.onNavReady(t):t.on("ready",this.onNavReady),e.state===H.Ready?this.onTargetReady(e):e.on("ready",this.onTargetReady))}onNavReady(t){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(t){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(t,e,i){this.onNavTouch(t,t.panzoom,i)}onNavTouch(t,e,i){var n,s;if(Math.abs(e.dragOffset.x)>3||Math.abs(e.dragOffset.y)>3)return;const o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=r.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),r.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(t,e){e.index===this.selectedIndex&&this.markSelectedSlide(e.index)}onTargetChange(){var t,e;const{target:i,nav:n}=this;if(!i||!n)return;if(n.state!==H.Ready||i.state!==H.Ready)return;const s=null===(e=null===(t=i.pages[i.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index,o=n.getPageForSlide(s);this.markSelectedSlide(s),n.slideTo(o,null===n.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(t){const e=this.nav;e&&e.state===H.Ready&&(this.selectedIndex=t,[...e.slides].map((e=>{e.el&&e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}attach(){const t=this;let e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&&t.addAsTargetFor(i)}detach(){const t=this,e=t.nav,i=t.target;e&&(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&&(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const G={Navigation:Z,Dots:X,Sync:U},K="animationend",J="isSelected",Q="slide";class tt extends m{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===H.Ready}get isInfinite(){let t=!1;const{contentDim:e,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&e+o.dim>=i&&(t=this.option("infinite")),t}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(t,e={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:H.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&&(t=document.querySelector(t)),!t||!S(t))throw new Error("No Element found");this.container=t,this.slideNext=F(this.slideNext.bind(this),150),this.slidePrev=F(this.slidePrev.bind(this),150),this.userOptions=e,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){var t,e;const i=p({},tt.defaults,this.userOptions);let n="";const s=i.breakpoints;if(s&&u(s))for(const[t,e]of Object.entries(s))window.matchMedia(t).matches&&u(e)&&(n+=t,p(i,e));n===this.bp&&this.state!==H.Init||(this.bp=n,this.state===H.Ready&&(i.initialSlide=(null===(e=null===(t=this.pages[this.page])||void 0===t?void 0:t.slides[0])||void 0===e?void 0:e.index)||0),this.state!==H.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}init(){this.state=H.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},tt.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=H.Ready,this.emit("ready")}initLayout(){const{container:t}=this,e=this.option("classes");C(t,this.cn("container")),a(t,e.isLTR,!this.isRTL),a(t,e.isRTL,this.isRTL),a(t,e.isVertical,!this.isHorizontal),a(t,e.isHorizontal,this.isHorizontal);let i=this.option("viewport")||t.querySelector(`.${e.viewport}`);i||(i=document.createElement("div"),C(i,e.viewport),i.append(...j(t,`.${e.slide}`)),t.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||t.querySelector(`.${e.track}`);n||(n=document.createElement("div"),C(n,e.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:t}=this;if(!t)return;const e=[...this.slides],i=[];[...j(t,`.${this.cn(Q)}`)].forEach((t=>{if(S(t)){const e=N({el:t,isDom:!0,index:this.slides.length});i.push(e)}}));for(let t of[...this.option("slides",[])||[],...e])i.push(N(t));this.slides=i;for(let t=0;t!(this.pages.length<2&&!t.options.infinite),bounds:()=>this.getBounds(),maxVelocity:t=>Math.abs(t.target[this.axis]-t.current[this.axis])<2*this.viewportDim?100:0},t)),this.panzoom.on("*",((t,e,...i)=>{this.emit(`Panzoom.${e}`,t,...i)})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const t=this.container;t&&(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let t=[];const{contentDim:e,viewportDim:i}=this;let n=this.option("slidesPerPage");n=("auto"===n||e<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,a=0;for(const e of this.slides)(!t.length||o+e.dim-i>.05||a>=n)&&(t.push(_()),s=t.length-1,o=0,a=0),t[s].slides.push(e),o+=e.dim+e.gap,a++;return t}processPages(){const t=this.pages,{contentDim:i,viewportDim:n,isInfinite:s}=this,o=this.option("center"),a=this.option("fill"),r=a&&o&&i>n&&!s;if(t.forEach(((t,e)=>{var s;t.index=e,t.pos=(null===(s=t.slides[0])||void 0===s?void 0:s.pos)||0,t.dim=0;for(const[e,i]of t.slides.entries())t.dim+=i.dim,e=i-.5*n?t.pos=i-n:o&&(t.pos+=-.5*(n-t.dim))})),t.forEach((t=>{a&&!s&&i>n&&(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,i-n)),t.pos=e(t.pos,1e3),t.dim=e(t.dim,1e3),Math.abs(t.pos)<=.1&&(t.pos=0)})),s)return t;const l=[];let c;return t.forEach((t=>{const e=Object.assign({},t);c&&e.pos===c.pos?(c.dim+=e.dim,c.slides=[...c.slides,...e.slides]):(e.index=l.length,c=e,l.push(e))})),l}getPageFromIndex(t=0){const e=this.pages.length;let i;return t=parseInt((t||0).toString())||0,i=this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0),i}getSlideMetrics(t){var i,n;const s=this.isHorizontal?"width":"height";let o=0,a=0,r=t.el;const l=!(!r||r.parentNode);if(r?o=parseFloat(r.dataset[s]||"")||0:(r=document.createElement("div"),r.style.visibility="hidden",(this.track||document.body).prepend(r)),C(r,this.cn(Q)+" "+t.class+" "+t.customClass),o)r.style[s]=`${o}px`,r.style["width"===s?"height":"width"]="";else{l&&(this.track||document.body).prepend(r),o=r.getBoundingClientRect()[s]*Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);let t=r[this.isHorizontal?"offsetWidth":"offsetHeight"];t-1>o&&(o=t)}const c=getComputedStyle(r);return"content-box"===c.boxSizing&&(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=r.parentElement)||void 0===n||n.removeChild(r):t.el||r.remove(),{dim:e(o,1e3),gap:e(a,1e3)}}getBounds(){const{isInfinite:t,isRTL:e,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(t)s={min:-1/0,max:1/0};else if(n.length){const t=n[0].pos,o=n[n.length-1].pos;s=e&&i?{min:t,max:o}:{min:-1*o,max:-1*t}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let t,{isHorizontal:i,isRTL:n,isInfinite:s,viewport:o,viewportDim:a,contentDim:r,page:l,pages:c,slides:h,panzoom:d}=this,u=0,p=0,f=0,g=0;d?g=-1*d.current[this.axis]:c[l]&&(g=c[l].pos||0),t=i?n?"right":"left":"top",n&&i&&(g*=-1);for(const i of h){const n=i.el;n?("top"===t?(n.style.right="",n.style.left=""):n.style.top="",i.index!==u?n.style[t]=0===p?"":`${e(p,1e3)}px`:n.style[t]="",f+=i.dim+i.gap,u++):p+=i.dim+i.gap}if(s&&f&&o){let n=getComputedStyle(o),s="padding",l=i?"Right":"Bottom",c=parseFloat(n[s+(i?"Left":"Top")]);g-=c,a+=c,a+=parseFloat(n[s+l]);for(const i of h)i.el&&(e(i.pos)e(r-a)&&(i.el.style[t]=`${e(p+f,1e3)}px`),e(i.pos+i.gap)>=e(r-a)&&e(i.pos)>e(g+a)&&e(g)1&&(m=c[b[0]],v=c[b[1]]),m&&v){let i=0;for(const n of h)n.el?this.inTransition.has(n.index)&&m.slides.indexOf(n)<0&&(n.el.style[t]=`${e(i+(m.pos-v.pos),1e3)}px`):i+=n.dim+n.gap}}createSlideEl(t){const{track:e,slides:i}=this;if(!e||!t)return;if(t.el&&t.el.parentNode)return;const n=t.el||document.createElement("div");C(n,this.cn(Q)),C(n,t.class),C(n,t.customClass);const s=t.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=t.html+"");const o=[];i.forEach(((t,e)=>{t.el&&o.push(e)}));const a=t.index;let r=null;if(o.length){r=i[o.reduce(((t,e)=>Math.abs(e-a)1)return!1;let h=t>a?1:-1;this.isInfinite&&(0===a&&t===r.length-1&&(h=-1),a===r.length-1&&0===t&&(h=1));const d=r[c].pos*(this.isRTL?1:-1);if(a===c&&Math.abs(d-l.target[this.axis])<1)return!1;this.clearTransitions();const u=l.isResting;C(this.container,this.cn("inTransition"));const p=(null===(s=r[a])||void 0===s?void 0:s.slides[0])||null,f=(null===(o=r[c])||void 0===o?void 0:o.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);let g=p.el,m=f.el;u||e===Q||(e="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(p.index),p.transition=e,g.addEventListener(K,this.onAnimationEnd),g.classList.add(`f-${e}Out`,`to-${h>0?b:v}`)),m&&(f.transition=e,m.addEventListener(K,this.onAnimationEnd),m.classList.add(`f-${e}In`,`from-${h>0?v:b}`)),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?t.add(n):e.add(n);for(const e of this.inTransition)t.add(this.slides[e]);for(const e of t)this.createSlideEl(e),this.lazyLoadSlide(e);for(const i of e)t.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const t="aria-hidden";let e=this.cn(J);if(e)for(const i of this.slides){const n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(t):n.setAttribute(t,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(e)||(C(n,e),this.emit("selectSlide",i)),n.removeAttribute(t)):(n.classList.contains(e)&&(P(n,e),this.emit("unselectSlide",i)),n.setAttribute(t,"true")))}}flipInfiniteTrack(){const{axis:t,isHorizontal:e,isInfinite:i,isRTL:n,viewportDim:s,contentDim:o}=this,a=this.panzoom;if(!a||!i)return;let r=a.current[t],l=a.target[t]-r,c=0,h=.5*s;n&&e?(r<-h&&(c=-1,r+=o),r>o-h&&(c=1,r-=o)):(r>h&&(c=1,r-=o),r<-o+h&&(c=-1,r+=o)),c&&(a.current[t]=r,a.target[t]=r+l)}lazyLoadImg(t,e){const i=this,n="f-fadeIn",o="is-preloading";let a=!1,r=null;const l=()=>{a||(a=!0,r&&(r.remove(),r=null),P(e,o),e.complete&&(C(e,n),setTimeout((()=>{P(e,n)}),350)),this.option("adaptiveHeight")&&t.el&&this.pages[this.page].slides.indexOf(t)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",t))};C(e,o),e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.addEventListener("error",(()=>{l()})),e.addEventListener("load",(()=>{l()})),setTimeout((()=>{const i=e.parentNode;i&&t.el&&(e.complete?l():a||(r=s(E),i.insertBefore(r,e)))}),300)}lazyLoadSlide(t){const e=t&&t.el;if(!e)return;const i=new Set;let n=Array.from(e.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));e.dataset.lazySrc&&n.push(e),n.map((t=>{t instanceof HTMLImageElement?i.add(t):t instanceof HTMLElement&&t.dataset.lazySrc&&(t.style.backgroundImage=`url('${t.dataset.lazySrc}')`,delete t.dataset.lazySrc)}));for(const e of i)this.lazyLoadImg(t,e)}onAnimationEnd(t){var e;const i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(!i||!s||!o)return;const a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&&this.emit("settle")}onDecel(t,e=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180));let d=0;if(d=h>45&&h<135?a?0:i:a?e:0,!c)return;let u=this.page,p=o&&a?1:-1;const f=t.current[r]*p;let{pageIndex:g}=this.getPageFromPosition(f);Math.abs(d)>5?(l[u].dim=t&&(this.page+=d.length),this.updateMetrics(),a){const e=(null===(s=this.pages[this.page])||void 0===s?void 0:s.pos)||0,i=(null===(o=this.pages[this.page])||void 0===o?void 0:o.dim)||0,n=this.pages.length||1,h=this.isRTL?l-i:i-l,d=this.isRTL?r-e:e-r;c&&1===n?(t<=this.page&&(a.current[this.axis]-=h,a.target[this.axis]-=h),a.panTo({[this.isHorizontal?"x":"y"]:-1*e})):d&&t<=this.page&&(a.target[this.axis]-=d,a.current[this.axis]-=d,a.requestTick())}for(const t of d)this.emit("initSlide",t,t.index)}prependSlide(t){this.addSlide(0,t)}appendSlide(t){this.addSlide(this.slides.length,t)}removeSlide(t){const e=this.slides.length;t=(t%e+e)%e;const i=this.slides[t];if(i){this.removeSlideEl(i,!0),this.slides.splice(t,1);for(let t=0;tthis.page?-1:1;let l=-1*o.current.e,c=e((l-r.pos)/(1*r.dim),1e3),h=c,d=c;this.isInfinite&&!0!==n&&(h=e((l-r.pos+a)/(1*r.dim),1e3),d=e((l-r.pos-a)/(1*r.dim),1e3));let u=[c,h,d].reduce((function(t,e){return Math.abs(e)1?1:u<-1?-1:u}setViewportHeight(){const{page:t,pages:e,viewport:i,isHorizontal:n}=this;if(!i||!e[t])return;let s=0;n&&this.track&&(this.track.style.height="auto",e[t].slides.forEach((t=>{t.el&&(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide(t){for(const e of this.pages)for(const i of e.slides)if(i.index===t)return e.index;return-1}getVisibleSlides(t=0){var e;const i=new Set;let{panzoom:n,contentDim:s,viewportDim:o,pages:a,page:r}=this;if(o){s=s+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;let l=0;l=n&&n.state!==v.Init&&n.state!==v.Destroy?-1*n.current[this.axis]:a[r]&&a[r].pos||0,this.isInfinite&&(l-=Math.floor(l/s)*s),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-o*t,h=l+o*(t+1),d=this.isInfinite?[-1,0,1]:[0];for(const t of this.slides)for(const e of d){const n=t.pos+e*s,o=n+t.dim+t.gap;nc&&i.add(t)}}return i}getPageFromPosition(t){const{viewportDim:e,contentDim:i,slides:n,pages:s,panzoom:o}=this,a=s.length,r=n.length,l=n[0],c=n[r-1],h=this.option("center");let d=0,u=0,p=0,f=void 0===t?-1*((null==o?void 0:o.target[this.axis])||0):t;h&&(f+=.5*e),this.isInfinite?(fc.pos+c.dim+.5*c.gap&&(f-=i,p=1)):f=Math.max(l.pos||0,Math.min(f,c.pos));let g=c,m=n.find((t=>{const e=t.pos-.5*g.gap,i=t.pos+t.dim+.5*t.gap;return g=t,f>=e&&f{this.removeSlideEl(t)})),this.detachPlugins(),e&&(e.removeEventListener("scroll",this.onScroll),e.offsetParent&&i&&i.offsetParent&&e.replaceWith(...i.childNodes));for(const[e,i]of Object.entries(o))"container"!==e&&i&&t.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(tt,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(tt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:B}),Object.defineProperty(tt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:G});const et=function(t){if(!S(t))return 0;const e=window.scrollY,i=window.innerHeight,n=e+i,s=t.getBoundingClientRect(),o=s.y+e,a=s.height,r=o+a;if(e>r||nr)return 100;if(on)return 100;let l=a;on&&(l-=r-n);const c=l/i*100;return Math.round(c)},it=!("undefined"==typeof window||!window.document||!window.document.createElement);let nt;const st=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),ot=t=>{if(t&&it){void 0===nt&&document.createElement("div").focus({get preventScroll(){return nt=!0,!1}});try{if(nt)t.focus({preventScroll:!0});else{const e=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch(t){}}},at=()=>{const t=document;let e,i="",n="",s="";return t.fullscreenEnabled?(i="requestFullscreen",n="exitFullscreen",s="fullscreenElement"):t.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",n="webkitExitFullscreen",s="webkitFullscreenElement"),i&&(e={request:function(e=t.documentElement){return"webkitRequestFullscreen"===i?e[i](Element.ALLOW_KEYBOARD_INPUT):e[i]()},exit:function(){return t[s]&&t[n]()},isFullscreen:function(){return t[s]}}),e},rt={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},y),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,tpl:{closeButton:'',main:''},trapFocus:!0,wheel:"zoom"};var lt,ct;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"}(lt||(lt={})),function(t){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}(ct||(ct={}));let ht="",dt=!1,ut=!1,pt=null;const ft=()=>{let t="",e="";const i=Ae.getInstance();if(i){const n=i.carousel,s=i.getSlide();if(n&&s){let o=s.slug||void 0,a=s.triggerEl||void 0;e=o||(i.option("slug")||""),!e&&a&&a.dataset&&(e=a.dataset.fancybox||""),e&&"true"!==e&&(t="#"+e+(!o&&n.slides.length>1?"-"+(s.index+1):""))}}return{hash:t,slug:e,index:1}},gt=()=>{const t=new URL(document.URL).hash,e=t.slice(1).split("-"),i=e[e.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:n}},mt=()=>{const{slug:t,index:e}=gt();if(!t)return;let i=document.querySelector(`[data-slug="${t}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Ae.getInstance())return;const n=document.querySelectorAll(`[data-fancybox="${t}"]`);n.length&&(i=n[e-1],i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},vt=()=>{if(!1===Ae.defaults.Hash)return;const t=Ae.getInstance();if(!1===(null==t?void 0:t.options.Hash))return;const{slug:e,index:i}=gt(),{slug:n}=ft();t&&(e===n?t.jumpTo(i-1):(dt=!0,t.close())),mt()},bt=()=>{pt&&clearTimeout(pt),queueMicrotask((()=>{vt()}))},yt=()=>{window.addEventListener("hashchange",bt,!1),setTimeout((()=>{vt()}),500)};it&&(/complete|interactive|loaded/.test(document.readyState)?yt():document.addEventListener("DOMContentLoaded",yt));const wt="is-zooming-in";class xt extends ${onCreateSlide(t,e,i){const n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&this.setImage(i,n)}onRemoveSlide(t,e,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(t,e,i,n){P(this.instance.container,wt);for(const t of e.slides){const e=t.panzoom;e&&t.index!==i&&e.reset(.35)}}onClose(){var t;const e=this.instance,i=e.container,n=e.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:a,thumbElSrc:r}=n;if(!s||!r||!o||!a||a.isContentLoading||a.state===v.Init||a.state===v.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(n);if(!l)return;this.instance.state=lt.CustomClosing,i.classList.remove(wt),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${r}')`;const c=i.getBoundingClientRect();1===((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${i.offsetTop+window.scrollY}px`,left:`${i.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:h,y:d,scale:u,opacity:p}=l;if(p){const t=((t,e,i,n)=>{const s=e-t,o=n-i;return e=>i+((e-t)/s*o||0)})(a.scale,u,1,0);a.on("afterTransform",(()=>{o.style.opacity=t(a.scale)+""}))}a.on("endAnimation",(()=>{e.destroy()})),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:h,y:d,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&e.destroy()}setImage(t,e){const i=this.instance;t.src=e,this.process(t,e).then((e=>{const{contentEl:n,imageEl:s,thumbElSrc:o,el:a}=t;if(i.isClosing()||!n||!s)return;n.offsetHeight;const r=!!i.isOpeningSlide(t)&&this.getZoomInfo(t);if(this.option("protected")&&a){a.addEventListener("contextmenu",(t=>{t.preventDefault()}));const t=document.createElement("div");C(t,"fancybox-protected"),n.appendChild(t)}if(o&&r){const s=e.contentRect,a=Math.max(s.fullWidth,s.fullHeight);let c=null;!r.opacity&&a>1200&&(c=document.createElement("img"),C(c,"fancybox-ghost"),c.src=o,n.appendChild(c));const h=()=>{c&&(C(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=o,new Promise(((t,e)=>{const i=new Image;i.onload=t,i.onerror=e,i.src=l}))).then((()=>{i.hideLoading(t),t.state=ct.Opening,this.instance.emit("reveal",t),this.zoomIn(t).then((()=>{h(),this.instance.done(t)}),(()=>{})),c&&setTimeout((()=>{h()}),a>2500?800:200)}),(()=>{i.hideLoading(t),i.revealContent(t)}))}else{const n=this.optionFor(t,"initialSize"),s=this.optionFor(t,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0};let a=i.optionFor(t,"showClass")||void 0,r=!0;i.isOpeningSlide(t)&&("full"===n?e.zoomToFull(o):"cover"===n?e.zoomToCover(o):"max"===n?e.zoomToMax(o):r=!1,e.stop("current")),r&&a&&(a=e.isDragging?"f-fadeIn":""),i.hideLoading(t),i.revealContent(t,a)}var l}),(()=>{i.setError(t,"{{IMAGE_ERROR}}")}))}process(t,e){return new Promise(((i,n)=>{var o;const a=this.instance,r=t.el;a.clearContent(t),a.showLoading(t);let l=this.optionFor(t,"content");if("string"==typeof l&&(l=s(l)),!l||!S(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let i="",n=t.caption;i="string"==typeof n&&n?n.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${t.index+1} of ${(null===(o=a.carousel)||void 0===o?void 0:o.pages.length)||1}`,l.src=e||"",l.alt=i,l.draggable=!1,t.srcset&&l.setAttribute("srcset",t.srcset),this.instance.isOpeningSlide(t)&&(l.fetchPriority="high")}t.sizes&&l.setAttribute("sizes",t.sizes)}C(l,"fancybox-image"),t.imageEl=l,a.setContent(t,l,!1);t.panzoom=new D(r,p({transformParent:!0},this.option("Panzoom")||{},{content:l,width:(e,i)=>a.optionFor(t,"width","auto",i)||"auto",height:(e,i)=>a.optionFor(t,"height","auto",i)||"auto",wheel:()=>{const t=a.option("wheel");return("zoom"===t||"pan"==t)&&t},click:(e,i)=>{var n,s;if(a.isCompact||a.isClosing())return!1;if(t.index!==(null===(n=a.getSlide())||void 0===n?void 0:n.index))return!1;if(i){const t=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(t.nodeName))return!1}let o=!i||i.target&&(null===(s=t.contentEl)||void 0===s?void 0:s.contains(i.target));return a.option(o?"contentClick":"backdropClick")||!1},dblClick:()=>a.isCompact?"toggleZoom":a.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:t=>{i(t)},error:()=>{n()},destroy:()=>{n()}}}))}))}zoomIn(t){return new Promise(((e,i)=>{const n=this.instance,s=n.container,{panzoom:o,contentEl:a,el:r}=t;o&&o.updateMetrics();const l=this.getZoomInfo(t);if(!(l&&r&&a&&o&&s))return void i();const{x:c,y:h,scale:d,opacity:u}=l,p=()=>{t.state!==ct.Closing&&(u&&(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-d)),0)+""),o.scale>=1&&o.scale>o.targetScale-.1&&e(o))},f=t=>{(t.scale<.99||t.scale>1.01)&&!t.isDragging||(P(s,wt),a.style.opacity="",t.off("endAnimation",f),t.off("touchStart",f),t.off("afterTransform",p),e(t))};o.on("endAnimation",f),o.on("touchStart",f),o.on("afterTransform",p),o.on(["error","destroy"],(()=>{i()})),o.panTo({x:c,y:h,scale:d,friction:0,ignoreBounds:!0}),o.stop("current");const g={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},m=this.optionFor(t,"initialSize");C(s,wt),n.hideLoading(t),"full"===m?o.zoomToFull(g):"cover"===m?o.zoomToCover(g):"max"===m?o.zoomToMax(g):o.reset(.172)}))}getZoomInfo(t){const{el:e,imageEl:i,thumbEl:n,panzoom:s}=t,o=this.instance,a=o.container;if(!e||!i||!n||!s||et(n)<3||!this.optionFor(t,"zoom")||!a||o.state===lt.Destroy)return!1;if("0"===getComputedStyle(a).getPropertyValue("--f-images-zoom"))return!1;const r=window.visualViewport||null;if(1!==(r?r.scale:1))return!1;let{top:l,left:c,width:h,height:d}=n.getBoundingClientRect(),{top:u,left:p,fitWidth:f,fitHeight:g}=s.contentRect;if(!(h&&d&&f&&g))return!1;const m=s.container.getBoundingClientRect();p+=m.left,u+=m.top;const v=-1*(p+.5*f-(c+.5*h)),b=-1*(u+.5*g-(l+.5*d)),y=h/f;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(h/d-f/g)>.1),{x:v,y:b,scale:y,opacity:w}}attach(){const t=this,e=t.instance;e.on("Carousel.change",t.onChange),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("close",t.onClose)}detach(){const t=this,e=t.instance;e.off("Carousel.change",t.onChange),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("close",t.onClose)}}Object.defineProperty(xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const Et="html",St="image",Pt="map",Ct="youtube",Tt="vimeo",Mt="html5video",Ot=(t,e={})=>{const i=new URL(t),n=new URLSearchParams(i.search),s=new URLSearchParams;for(const[t,i]of[...n,...Object.entries(e)]){let e=i+"";if("t"===t){let t=e.match(/((\d*)m)?(\d*)s?/);t&&s.set("start",60*parseInt(t[2]||"0")+parseInt(t[3]||"0")+"")}else s.set(t,e)}let o=s+"",a=t.match(/#t=((.*)?\d+s)/);return a&&(o+=`#t=${a[1]}`),o},At={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Lt=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class zt extends ${onBeforeInitSlide(t,e,i){this.processType(i)}onCreateSlide(t,e,i){this.setContent(i)}onClearContent(t,e){e.xhr&&(e.xhr.abort(),e.xhr=null);const i=e.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",e.iframeEl=null);const n=e.contentEl,s=e.placeholderEl;if("inline"===e.type&&n&&s)n.classList.remove("fancybox__content"),"none"!==getComputedStyle(n).getPropertyValue("display")&&(n.style.display="none"),setTimeout((()=>{s&&(n&&s.parentNode&&s.parentNode.insertBefore(n,s),s.remove())}),0),e.contentEl=void 0,e.placeholderEl=void 0;else for(;e.el&&e.el.firstChild;)e.el.removeChild(e.el.firstChild)}onSelectSlide(t,e,i){i.state===ct.Ready&&this.playVideo()}onUnselectSlide(t,e,i){var n,s;if(i.type===Mt){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(t){}return}let o;i.type===Tt?o={method:"pause",value:"true"}:i.type===Ct&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(t,e){t.isCurrentSlide(e)&&!t.isClosing()&&this.playVideo()}onRefresh(t,e){e.slides.forEach((t=>{t.el&&(this.resizeIframe(t),this.setAspectRatio(t))}))}onMessage(t){try{let e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event)for(let e of Array.from(document.getElementsByClassName("fancybox__iframe")))e instanceof HTMLIFrameElement&&e.contentWindow===t.source&&(e.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===e.event){const t=document.getElementById(e.id);t&&(t.dataset.ready="true")}}catch(t){}}loadAjaxContent(t){const e=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);const i=this.instance,n=new XMLHttpRequest;i.showLoading(t),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&i.state===lt.Ready&&(i.hideLoading(t),200===n.status?i.setContent(t,n.responseText):i.setError(t,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=t.ajax||null;n.open(s?"POST":"GET",e+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),t.xhr=n}setInlineContent(t){let e=null;if(S(t.src))e=t.src;else if("string"==typeof t.src){const i=t.src.split("#",2).pop();e=i?document.getElementById(i):null}if(e){if("clone"===t.type||e.closest(".fancybox__slide")){e=e.cloneNode(!0);const i=e.dataset.animationName;i&&(e.classList.remove(i),delete e.dataset.animationName);let n=e.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${t.index}`,e.setAttribute("id",n)}else if(e.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(i,e),t.placeholderEl=i}this.instance.setContent(t,e)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(t){const{src:e,el:i}=t;if(!e||"string"!=typeof e||!i)return;i.classList.add("is-loading");const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${t.index}`);for(const[e,i]of Object.entries(this.optionFor(t,"iframeAttr")||{}))s.setAttribute(e,i);s.onerror=()=>{n.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=s;const o=this.optionFor(t,"preload");if("iframe"!==t.type||!1===o)return s.setAttribute("src",t.src+""),n.setContent(t,s,!1),this.resizeIframe(t),void n.revealContent(t);n.showLoading(t),s.onload=()=>{if(!s.src.length)return;const e="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe(t),e?n.revealContent(t):n.hideLoading(t)},s.setAttribute("src",e),n.setContent(t,s,!1)}resizeIframe(t){const{type:e,iframeEl:i}=t;if(e===Ct||e===Tt)return;const n=null==i?void 0:i.parentElement;if(!i||!n)return;let s=t.autoSize;void 0===s&&(s=this.optionFor(t,"autoSize"));let o=t.width||0,a=t.height||0;o&&a&&(s=!1);const r=n&&n.style;if(!1!==t.preload&&!1!==s&&r)try{const t=window.getComputedStyle(n),e=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),s=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),l=i.contentWindow;if(l){const t=l.document,i=t.getElementsByTagName(Et)[0],n=t.body;r.width="",n.style.overflow="hidden",o=o||i.scrollWidth+e,r.width=`${o}px`,n.style.overflow="",r.flex="0 0 auto",r.height=`${n.scrollHeight}px`,a=i.scrollHeight+s}}catch(t){}if(o||a){const t={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(t.width=`${o}px`),a&&"auto"!==a&&(t.height=`${a}px`),Object.assign(r,t)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:e}=t;if(!e||!e.offsetParent)return;if(!this.optionFor(t,"videoAutoplay"))return;if(t.type===Mt)try{const t=e.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(t){}if(t.type!==Ct&&t.type!==Tt)return;const i=()=>{if(t.iframeEl&&t.iframeEl.contentWindow){let e;if("true"===t.iframeEl.dataset.ready)return e=t.type===Ct?{event:"command",func:"playVideo"}:{method:"play",value:"true"},e&&t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"),void(t.poller=void 0);t.type===Ct&&(e={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"))}t.poller=setTimeout(i,250)};i()}processType(t){if(t.html)return t.type=Et,t.src=t.html,void(t.html="");const e=this.instance.optionFor(t,"src","");if(!e||"string"!=typeof e)return;let i=t.type,n=null;if(n=e.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const s=this.optionFor(t,Ct),{nocookie:o}=s,a=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s0?"svembed":"embed"}`,i=Pt):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i=Pt),i=i||this.instance.option("defaultType"),t.type=i,i===St&&(t.thumbSrc=t.thumbSrc||t.src)}setContent(t){const e=this.instance.optionFor(t,"src")||"";if(t&&t.type&&e){switch(t.type){case Et:this.instance.setContent(t,e);break;case Mt:const i=this.option("videoTpl");i&&this.instance.setContent(t,i.replace(/\{\{src\}\}/gi,e+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case Pt:case Ct:case Tt:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}setAspectRatio(t){const e=t.contentEl;if(!(t.el&&e&&t.type&&[Ct,Tt,Mt].includes(t.type)))return;let i,n=t.width||"auto",s=t.height||"auto";if("auto"===n||"auto"===s){i=this.optionFor(t,"videoRatio");const e=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=e&&e.length>2?parseFloat(e[1])/parseFloat(e[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(!i)return;e.style.aspectRatio="",e.style.width="",e.style.height="",e.offsetHeight;const o=e.getBoundingClientRect(),a=o.width||1,r=o.height||1;e.style.aspectRatio=i+"",i
    {t.timer=null,t.inHover||t.onTimerEnd()}),i),t.emit("set")}clear(){const t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==It){if(t.option("pauseOnHover")){const e=t.instance.container;e.addEventListener("mouseenter",t.onMouseEnter,!1),e.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,e=t.state,i=t.instance.container;t.clear(),t.state=It,i.removeEventListener("mouseenter",t.onMouseEnter,!1),i.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),P(i,"has-autoplay"),e!==It&&t.emit("stop")}pause(){const t=this;t.state===Rt&&(t.state=kt,t.clear(),t.emit(kt))}resume(){const t=this,e=t.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(t.state!==Rt){if(t.state===kt&&!t.inHover){const e=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",e),e.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===Rt||this.state===kt?this.stop():this.start()}attach(){const t=this,e=t.instance;e.on("ready",t.onReady),e.on("Panzoom.startAnimation",t.onChange),e.on("Panzoom.endAnimation",t.onSettle),e.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,e=t.instance;e.off("ready",t.onReady),e.off("Panzoom.startAnimation",t.onChange),e.off("Panzoom.endAnimation",t.onSettle),e.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(Dt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Ft extends ${constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(t){const e=t.carousel;if(!e)return;const i=t.container;i&&(e.options.Autoplay=p({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{t.emit("startSlideshow")},set:e=>{var n;i.classList.add("has-slideshow"),(null===(n=t.getSlide())||void 0===n?void 0:n.state)!==ct.Ready&&e.pause()},stop:()=>{i.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(e,i)=>{var n,s,o;!i||!i.cancelable||(null===(n=t.getSlide())||void 0===n?void 0:n.state)===ct.Ready&&(null===(o=null===(s=t.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),e.attachPlugins({Autoplay:Dt}),this.ref=e.plugins.Autoplay)}onReady(t){const e=t.carousel,i=this.ref;i&&e&&this.option("playOnStart")&&(e.isInfinite||e.page{t.isCurrentSlide(e)&&i.stop()})),t.isCurrentSlide(e)&&i.resume()}onKeydown(t,e){var i;const n=this.ref;n&&e===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&n.toggle()}attach(){const t=this,e=t.instance;e.on("Carousel.init",t.onPrepare),e.on("Carousel.ready",t.onReady),e.on("done",t.onDone),e.on("keydown",t.onKeydown)}detach(){const t=this,e=t.instance;e.off("Carousel.init",t.onPrepare),e.off("Carousel.ready",t.onReady),e.off("done",t.onDone),e.off("keydown",t.onKeydown)}}Object.defineProperty(Ft,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=>{var e;return(null===(e=t.instance.container)||void 0===e?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const jt={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'',type:"modern"};var Bt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"}(Bt||(Bt={}));const Ht="isResting",Nt="thumbWidth",_t="thumbHeight",$t="thumbClipWidth";let Wt=class extends ${constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Bt.Init})}get isModern(){return"modern"===this.type}onInitSlide(t,e){const i=e.el?e.el.dataset:void 0;i&&(e.thumbSrc=i.thumbSrc||e.thumbSrc||"",e[$t]=parseFloat(i[$t]||"")||e[$t]||0,e[_t]=parseFloat(i.thumbHeight||"")||e[_t]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var t;if(!this.isModern)return;const e=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,r=i.page;if(n&&s&&o){if(n.isDragging){P(e,this.cn(Ht));let n=(null===(t=s.pages[r])||void 0===t?void 0:t.pos)||0;n+=i.getProgress(r)*(this[$t]+this.thumbGap);let a=o.getBounds();-1*n>a.x.min&&-1*nparseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+e))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[Nt]=e("width")||40,this[$t]=e("clip-width")||40,this[_t]=e("height")||40}build(){const t=this;if(t.state!==Bt.Init)return;if(t.isDisabled())return void t.emit("disabled");const e=t.instance,i=e.container,n=t.getSlides(),s=t.option("type");t.type=s;const o=t.option("parentEl"),a=t.cn("container"),r=t.cn("track");let l=null==o?void 0:o.querySelector("."+a);l||(l=document.createElement("div"),C(l,a),o?o.appendChild(l):i.after(l)),C(l,`is-${s}`),C(i,t.cn("hasThumbs")),t.container=l,t.updateProps();let c=l.querySelector("."+r);c||(c=document.createElement("div"),C(c,t.cn("track")),l.appendChild(c)),t.track=c;const h=p({},{track:c,infinite:!1,center:!0,fill:"classic"===s,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},t.option("Carousel")||{},{Sync:{target:e},slides:n}),d=new e.constructor(l,h);d.on("createSlide",((e,i)=>{t.setProps(i.index),t.emit("createSlide",i,i.el)})),d.on("ready",(()=>{t.shiftModern(),t.emit("ready")})),d.on("refresh",(()=>{t.shiftModern()})),d.on("Panzoom.click",((e,i,n)=>{t.onClick(n)})),t.carousel=d,t.state=Bt.Ready}onClick(t){t.preventDefault(),t.stopPropagation();const e=this.instance,{pages:i,page:n}=e,s=t=>{if(t){const e=t.closest("[data-carousel-index]");if(e)return[parseInt(e.dataset.carouselIndex||"",10)||0,e]}return[-1,void 0]},o=(t,e)=>{const i=document.elementFromPoint(t,e);return i?s(i):[-1,void 0]};let[a,r]=s(t.target);if(a>-1)return;const l=this[$t],c=t.clientX,h=t.clientY;let[d,u]=o(c-l,h),[p,f]=o(c+l,h);u&&f?(a=Math.abs(c-u.getBoundingClientRect().right)-1&&i[a]&&e.slideTo(a)}getShift(t){var e;const i=this,{instance:n}=i,s=i.carousel;if(!n||!s)return 0;const o=i[Nt],a=i[$t],r=i.thumbGap,l=i.thumbExtraGap;if(!(null===(e=s.slides[t])||void 0===e?void 0:e.el))return 0;const c=.5*(o-a),h=n.pages.length-1;let d=n.getProgress(0),u=n.getProgress(h),p=n.getProgress(t,!1,!0),f=0,g=c+l+r;const m=d<0&&d>-1,v=u>0&&u<1;return 0===t?(f=g*Math.abs(d),v&&1===d&&(f-=g*Math.abs(u))):t===h?(f=g*Math.abs(u)*-1,m&&-1===u&&(f+=g*Math.abs(d))):m||v?(f=-1*g,f+=g*Math.abs(d),f+=g*(1-Math.abs(u))):f=g*p,f}setProps(t){var i;const n=this;if(!n.isModern)return;const{instance:s}=n,o=n.carousel;if(s&&o){const a=null===(i=o.slides[t])||void 0===i?void 0:i.el;if(a&&a.childNodes.length){let i=e(1-Math.abs(s.getProgress(t))),o=e(n.getShift(t));a.style.setProperty("--progress",i?i+"":""),a.style.setProperty("--shift",o+"")}}}shiftModern(){const t=this;if(!t.isModern)return;const{instance:e,track:i}=t,n=e.panzoom,s=t.carousel;if(!(e&&i&&n&&s))return;if(n.state===v.Init||n.state===v.Destroy)return;for(const i of e.slides)t.setProps(i.index);let o=(t[$t]+t.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}cleanup(){const t=this;t.carousel&&t.carousel.destroy(),t.carousel=null,t.container&&t.container.remove(),t.container=null,t.track&&t.track.remove(),t.track=null,t.state=Bt.Init,P(t.instance.container,t.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===H.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}};Object.defineProperty(Wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:jt});const Xt=Object.assign(Object.assign({},jt),{key:"t",showOnStart:!0,parentEl:null}),qt="is-masked",Yt="aria-hidden";class Vt extends ${constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&&!t.isDisabled()}get isHidden(){return this.hidden}onClick(t,e){e.stopPropagation()}onCreateSlide(t,e){var i,n,s;const o=(null===(s=null===(n=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===n?void 0:n.slides[e.index])||void 0===s?void 0:s.type)||"",a=e.el;if(a&&o){let t=`for-${o}`;["video","youtube","vimeo","html5video"].includes(o)&&(t+=" for-video"),C(a,t)}}onInit(){var t;const e=this,i=e.instance,n=i.carousel;if(e.ref||!n)return;const s=e.option("parentEl")||i.footer||i.container;if(!s)return;const o=p({},e.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:t=>{const i=t.container;i&&this.hidden&&(e.refresh(),i.style.transition="none",e.hide(),i.offsetHeight,queueMicrotask((()=>{i.style.transition="",e.show()})))}}});o.Carousel=o.Carousel||{},o.Carousel.on=p((null===(t=e.options.Carousel)||void 0===t?void 0:t.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=o,n.attachPlugins({Thumbs:Wt}),e.ref=n.plugins.Thumbs,e.option("showOnStart")||(e.ref.state=Bt.Hidden,e.hidden=!0)}onResize(){var t;const e=null===(t=this.ref)||void 0===t?void 0:t.container;e&&(e.style.maxHeight="")}onKeydown(t,e){const i=this.option("key");i&&i===e&&this.toggle()}toggle(){const t=this.ref;if(t&&!t.isDisabled())return t.state===Bt.Hidden?(t.state=Bt.Init,void t.build()):void(this.hidden?this.show():this.hide())}show(){const t=this.ref;if(!t||t.isDisabled())return;const e=t.container;e&&(this.refresh(),e.offsetHeight,e.removeAttribute(Yt),e.classList.remove(qt),this.hidden=!1)}hide(){const t=this.ref,e=t&&t.container;e&&(this.refresh(),e.offsetHeight,e.classList.add(qt),e.setAttribute(Yt,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||!t.state)return;const e=t.container,i=(null==e?void 0:e.firstChild)||null;e&&i&&i.childNodes.length&&(e.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const t=this,e=t.instance;e.state===lt.Init?e.on("Carousel.init",t.onInit):t.onInit(),e.on("resize",t.onResize),e.on("keydown",t.onKeydown)}detach(){var t;const e=this,i=e.instance;i.off("Carousel.init",e.onInit),i.off("resize",e.onResize),i.off("keydown",e.onKeydown),null===(t=i.carousel)||void 0===t||t.detachPlugins(["Thumbs"]),e.ref=null}}Object.defineProperty(Vt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Xt});const Zt={panLeft:{icon:'',change:{panX:-100}},panRight:{icon:'',change:{panX:100}},panUp:{icon:'',change:{panY:-100}},panDown:{icon:'',change:{panY:100}},zoomIn:{icon:'',action:"zoomIn"},zoomOut:{icon:'',action:"zoomOut"},toggle1to1:{icon:'',action:"toggleZoom"},toggleZoom:{icon:'',action:"toggleZoom"},iterateZoom:{icon:'',action:"iterateZoom"},rotateCCW:{icon:'',action:"rotateCCW"},rotateCW:{icon:'',action:"rotateCW"},flipX:{icon:'',action:"flipX"},flipY:{icon:'',action:"flipY"},fitX:{icon:'',action:"fitX"},fitY:{icon:'',action:"fitY"},reset:{icon:'',action:"reset"},toggleFS:{icon:'',action:"toggleFS"}};var Ut;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"}(Ut||(Ut={}));const Gt={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'
    /
    '},download:{tpl:'
    '},prev:{tpl:''},next:{tpl:''},slideshow:{tpl:''},fullscreen:{tpl:''},thumbs:{tpl:''},close:{tpl:''}},parentEl:null},Kt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Jt="has-toolbar",Qt="fancybox__toolbar";class te extends ${constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ut.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(t){var e;if(!t.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){const t=this.instance.carousel;let e=0;if(t)for(const i of t.slides)(i.panzoom||"image"===i.type)&&e++;e||(s=!1)}s||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const t of["left","middle","right"])for(const n of i[t]){const i=this.createEl(n);i&&(null===(e=a[t])||void 0===e||e.push(i),o++)}let r=null;if(o&&(r=this.createContainer()),r){for(const[t,e]of Object.entries(a)){const i=document.createElement("div");C(i,Qt+"__column is-"+t);for(const t of e)i.appendChild(t);"auto"!==n||"middle"!==t||e.length||(n=!0),r.appendChild(i)}!0===n&&C(r,"is-absolute"),this.state=Ut.Ready,this.onRefresh()}else this.state=Ut.Disabled}onClick(t){var e,i;const n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=t.target,r=a&&S(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return t.preventDefault(),t.stopPropagation(),void(null===(e=n.plugins.Thumbs)||void 0===e||e.toggle());if(void 0!==r.fancyboxToggleFullscreen)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){t.preventDefault(),t.stopPropagation();const e=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay;let s=e.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?e.stop():e.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(t.preventDefault(),t.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(t){}o&&o.applyChange(t)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const e=this.instance.getSlide();if(!e||e.state!==ct.Ready)return;const i=e&&!e.error&&e.panzoom;for(const e of t.querySelectorAll("[data-panzoom-action]"))i?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),s=i&&i.canZoomOut();for(const e of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));const t=e.querySelector("g");t&&(t.style.display=n?"":"none")}}onDone(t,e){var i;null===(i=e.panzoom)||void 0===i||i.on("afterTransform",(()=>{this.instance.isCurrentSlide(e)&&this.onRefresh()})),this.instance.isCurrentSlide(e)&&this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const e=this.option("parentEl")||t;let i=e.querySelector("."+Qt);return i||(i=document.createElement("div"),C(i,Qt),e.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&C(t,Jt),this.container=i,i}createEl(t){const e=this.instance,i=e.carousel;if(!i)return null;if("toggleFS"===t)return null;if("fullscreen"===t&&!at())return null;let n=null;const o=i.slides.length||0;let a=0,r=0;for(const t of i.slides)(t.panzoom||"image"===t.type)&&a++,("image"===t.type||t.downloadSrc)&&r++;if(o<2&&["infobar","prev","next"].includes(t))return n;if(void 0!==Zt[t]&&!a)return null;if("download"===t&&!r)return null;if("thumbs"===t){const t=e.plugins.Thumbs;if(!t||!t.isEnabled)return null}if("slideshow"===t){if(!i.plugins.Autoplay||o<2)return null}if(void 0!==Zt[t]){const e=Zt[t];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),C(n,"f-button"),e.action&&(n.dataset.panzoomAction=e.action),e.change&&(n.dataset.panzoomChange=JSON.stringify(e.change)),n.appendChild(s(this.instance.localize(e.icon)))}else{const e=(this.option("items")||[])[t];e&&(n=s(this.instance.localize(e.tpl)),"function"==typeof e.click&&n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof e.click&&e.click.call(this,this,t)})))}const l=null==n?void 0:n.querySelector("svg");if(l)for(const[t,e]of Object.entries(Kt))l.getAttribute(t)||l.setAttribute(t,String(e));return n}removeContainer(){const t=this.container;t&&t.remove(),this.container=null,this.state=Ut.Disabled;const e=this.instance.container;e&&P(e,Jt)}attach(){const t=this,e=t.instance;e.on("Carousel.initSlides",t.onReady),e.on("done",t.onDone),e.on(["reveal","Carousel.change"],t.onChange),t.onReady(t.instance)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlides",t.onReady),e.off("done",t.onDone),e.off(["reveal","Carousel.change"],t.onChange),t.removeContainer()}}Object.defineProperty(te,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Gt});const ee={Hash:class extends ${onReady(){dt=!1}onChange(t){pt&&clearTimeout(pt);const{hash:e}=ft(),{hash:i}=gt(),n=t.isOpeningSlide(t.getSlide());n&&(ht=i===e?"":i),e&&e!==i&&(pt=setTimeout((()=>{try{if(t.state===lt.Ready){let t="replaceState";n&&!ut&&(t="pushState",ut=!0),window.history[t]({},document.title,window.location.pathname+window.location.search+e)}}catch(t){}}),300))}onClose(t){if(pt&&clearTimeout(pt),!dt&&ut)return ut=!1,dt=!1,void window.history.back();if(!dt)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ht||""))}catch(t){}}attach(){const t=this.instance;t.on("ready",this.onReady),t.on(["Carousel.ready","Carousel.change"],this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance;t.off("ready",this.onReady),t.off(["Carousel.ready","Carousel.change"],this.onChange),t.off("close",this.onClose)}static parseURL(){return gt()}static startFromUrl(){mt()}static destroy(){window.removeEventListener("hashchange",bt,!1)}},Html:zt,Images:xt,Slideshow:Ft,Thumbs:Vt,Toolbar:te},ie="with-fancybox",ne="hide-scrollbar",se="--fancybox-scrollbar-compensate",oe="--fancybox-body-margin",ae="aria-hidden",re="is-using-tab",le="is-animated",ce="is-compact",he="is-loading",de="is-opening",ue="has-caption",pe="disabled",fe="tabindex",ge="download",me="href",ve="src",be=t=>"string"==typeof t,ye=function(){var t=window.getSelection();return!!t&&"Range"===t.type};let we,xe=null,Ee=null,Se=0,Pe=0,Ce=0,Te=0;const Me=new Map;let Oe=0;class Ae extends m{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],e={},i={}){super(e),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:lt.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),we||(we=at()),this.id=e.id||++Oe,Me.set(this.id,this),this.userSlides=t,this.userPlugins=i,queueMicrotask((()=>{this.init()}))}init(){if(this.state===lt.Destroy)return;this.state=lt.Init,this.attachPlugins(Object.assign(Object.assign({},Ae.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!it)return;const t=document,e=t.body,i=t.documentElement;if(e.classList.contains(ne))return;let n=window.innerWidth-i.getBoundingClientRect().width;const s=parseFloat(window.getComputedStyle(e).marginRight);n<0&&(n=0),i.style.setProperty(se,`${n}px`),s&&e.style.setProperty(oe,`${s}px`),e.classList.add(ne)})(),this.initLayout(),this.scale();const t=()=>{this.initCarousel(this.userSlides),this.state=lt.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute(ae,"false")}),16)};this.option("Fullscreen.autoStart")&&we&&!we.isFullscreen()?we.request().then((()=>{this.startedFs=!0,t()})).catch((()=>t())):t()}initLayout(){var t,e;const i=this.option("parentEl")||document.body,n=s(this.localize(this.option("tpl.main")||""));if(n){if(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(ce,this.isCompact),C(n,this.option("mainClass")||""),C(n,de),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),C(document.documentElement,ie),xe&&Ee||(xe=document.createElement("span"),C(xe,"fancybox-focus-guard"),xe.setAttribute(fe,"0"),xe.setAttribute(ae,"true"),xe.setAttribute("aria-label","Focus guard"),Ee=xe.cloneNode(),null===(t=n.parentElement)||void 0===t||t.insertBefore(xe,n),null===(e=n.parentElement)||void 0===e||e.append(Ee)),n.addEventListener("mousedown",(t=>{Se=t.pageX,Pe=t.pageY,P(n,re)})),this.option("closeExisting"))for(const t of Me.values())t.id!==this.id&&t.close();else this.option("animated")&&(C(n,le),setTimeout((()=>{this.isClosing()||P(n,le)}),350));this.emit("initLayout")}}initCarousel(t){const e=this.container;if(!e)return;const n=e.querySelector(".fancybox__carousel");if(!n)return;const s=this.carousel=new tt(n,p({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));s.on("*",((t,e,...i)=>{this.emit(`Carousel.${e}`,t,...i)})),s.on(["ready","change"],(()=>{this.manageCaption()})),this.on("Carousel.removeSlide",((t,e,i)=>{this.clearContent(i),i.state=void 0})),s.on("Panzoom.touchStart",(()=>{var t,e;this.isCompact||this.endIdle(),(null===(t=document.activeElement)||void 0===t?void 0:t.closest(".f-thumbs"))&&(null===(e=this.container)||void 0===e||e.focus())})),s.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()})),this.option("dragToClose")&&(s.on("Panzoom.afterTransform",((t,e)=>{const n=this.getSlide();if(n&&i(n.el))return;const s=this.container;if(s){const t=Math.abs(e.current.f),i=t<1?"":Math.max(.5,Math.min(1,1-t/e.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",i?"0s":""),s.style.setProperty("--fancybox-opacity",i+"")}})),s.on("Panzoom.touchEnd",((t,e,n)=>{var s;const o=this.getSlide();if(o&&i(o.el))return;if(e.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;const a=Math.abs(e.dragOffset.y);"y"===e.lockedAxis&&(a>=200||a>=50&&e.dragOffset.time<300)&&(n&&n.cancelable&&n.preventDefault(),this.close(n,"f-throwOut"+(e.current.f<0?"Up":"Down")))}))),s.on("change",(t=>{var e;let i=null===(e=this.getSlide())||void 0===e?void 0:e.triggerEl;if(i){const e=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:t.page});i.dispatchEvent(e)}})),s.on(["refresh","change"],(t=>{const e=this.container;if(!e)return;for(const i of e.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=t.page+1;for(const i of e.querySelectorAll("[data-fancybox-count]"))i.innerHTML=t.pages.length;if(!t.isInfinite){for(const i of e.querySelectorAll("[data-fancybox-next]"))t.page0?(i.removeAttribute(pe),i.removeAttribute(fe)):(i.setAttribute(pe,""),i.setAttribute(fe,"-1"))}const i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";n||"image"!==i.type||i.error||!be(i[ve])||(n=i[ve]);for(const t of e.querySelectorAll("[data-fancybox-download]")){const e=i.downloadFilename;n?(t.removeAttribute(pe),t.removeAttribute(fe),t.setAttribute(me,n),t.setAttribute(ge,e||n),t.setAttribute("target","_blank")):(t.setAttribute(pe,""),t.setAttribute(fe,"-1"),t.removeAttribute(me),t.removeAttribute(ge))}})),this.emit("initCarousel")}attachEvents(){const t=this,e=t.container;if(!e)return;e.addEventListener("click",t.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",t.onResize),i.addEventListener("resize",t.onResize))}detachEvents(){const t=this,e=t.container;if(!e)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",t.onResize),i.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;const e=window.visualViewport,i=Math.max(1,(null==e?void 0:e.scale)||1);let n="",s="",o="";if(e&&i>1){let t=`${e.offsetLeft}px`,a=`${e.offsetTop}px`;n=e.width*i+"px",s=e.height*i+"px",o=`translate3d(${t}, ${a}, 0) scale(${1/i})`}t.style.transform=o,t.style.width=n,t.style.height=s}onClick(t){var e;const{container:i,isCompact:n}=this;if(!i||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();const s=t.composedPath()[0];if(s.closest(".fancybox-spinner")||s.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(s.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(s.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if("click"===t.type&&0===t.detail)return;if(Math.abs(t.pageX-Se)>30||Math.abs(t.pageY-Pe)>30)return;const o=document.activeElement;if(ye()&&o&&i.contains(o))return;if(n&&"image"===(null===(e=this.getSlide())||void 0===e?void 0:e.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=>{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",t),t.defaultPrevented)return;let a=!1;if(s.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;s.matches(st)||o.blur()}if(ye())return;a=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(st)&&(a=this.option("backdropClick"));"close"===a?(t.preventDefault(),this.close(t)):"next"===a?(t.preventDefault(),this.next()):"prev"===a&&(t.preventDefault(),this.prev())}onWheel(t){const e=t.target;let i=this.option("wheel",t);e.closest(".fancybox__thumbs")&&(i="slide");const s="slide"===i,o=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)>Math.abs(t)?e:t})),a=Math.max(-1,Math.min(1,o)),r=Date.now();this.pwt&&r-this.pwt<300?s&&t.preventDefault():(this.pwt=r,this.emit("wheel",t,a),t.defaultPrevented||("close"===i?(t.preventDefault(),this.close(t)):"slide"===i&&(n(e)||(t.preventDefault(),this[a>0?"prev":"next"]()))))}onScroll(){window.scrollTo(Ce,Te)}onKeydown(t){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const e=t.key,i=this.option("keyboard");if(!i)return;const n=t.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==e&&!o&&S(n)){if(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return}if("Tab"===t.key?C(this.container,re):P(this.container,re),t.ctrlKey||t.altKey||t.shiftKey)return;this.emit("keydown",e,t);const a=i[e];a&&"function"==typeof this[a]&&(t.preventDefault(),this[a]())}onResize(){const t=this.container;if(!t)return;const e=this.isCompact;t.classList.toggle(ce,e),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(t){this.isTopmost()&&this.checkFocus(t)}onMousemove(t){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(t){const e=this.optionFor(t,"closeButton")||!1;if("auto"===e){const t=this.plugins.Toolbar;if(t&&t.state===Ut.Ready)return}if(!e)return;if(!t.contentEl||t.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const e=s(this.localize(i));t.closeBtnEl=t.contentEl.appendChild(e),t.el&&C(t.el,"has-close-btn")}}manageCaption(t=void 0){var e,i;const n="fancybox__caption",s=this.container;if(!s)return;P(s,ue);const o=this.isCompact||this.option("commonCaption"),a=!o;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption)for(const t of(null===(e=this.carousel)||void 0===e?void 0:e.slides)||[])t.captionEl&&(t.captionEl.remove(),t.captionEl=void 0,P(t.el,ue),null===(i=t.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||o&&!this.isCurrentSlide(t))return;const r=t.el;let l=this.optionFor(t,"caption","");if(!l)return void(o&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let c=null;if(a){if(c=t.captionEl||null,r&&!c){const e=n+`_${this.id}_${t.index}`;c=document.createElement("div"),C(c,n),c.setAttribute("id",e),t.captionEl=r.appendChild(c),C(r,ue),r.setAttribute("aria-labelledby",e)}}else{if(c=this.caption,c||(c=s.querySelector("."+n)),!c){c=document.createElement("div"),c.dataset.fancyboxCaption="",C(c,n);(this.footer||s).prepend(c)}C(s,ue),this.caption=c}c&&(c.innerHTML="",be(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}checkFocus(t){this.focus(t)}focus(t){var e;if(this.ignoreFocusChange)return;const i=document.activeElement||null,n=(null==t?void 0:t.target)||null,s=this.container,o=null===(e=this.carousel)||void 0===e?void 0:e.viewport;if(!s||!o)return;if(!t&&i&&s.contains(i))return;const a=this.getSlide(),r=a&&a.state===ct.Ready?a.el:null;if(!r||r.contains(i)||s===i)return;t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(s.querySelectorAll(st));let c=[],h=null;for(let t of l){const e=!t.offsetParent||!!t.closest('[aria-hidden="true"]'),i=r&&r.contains(t),n=!o.contains(t);if(t===s||(i||n)&&!e){c.push(t);const e=t.dataset.origTabindex;void 0!==e&&e&&(t.tabIndex=parseFloat(e)),t.removeAttribute("data-orig-tabindex"),!t.hasAttribute("autoFocus")&&h||(h=t)}else{const e=void 0===t.dataset.origTabindex?t.getAttribute("tabindex")||"":t.dataset.origTabindex;e&&(t.dataset.origTabindex=e),t.tabIndex=-1}}let d=null;t?(!n||c.indexOf(n)<0)&&(d=h||s,c.length&&(i===Ee?d=c[0]:this.lastFocus!==s&&i!==xe||(d=c[c.length-1]))):d=a&&"image"===a.type?s:h||s,d&&ot(d),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const t=this.carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.carousel&&this.carousel.slideTo(...t)}isTopmost(){var t;return(null===(t=Ae.getInstance())||void 0===t?void 0:t.id)==this.id}animate(t=null,e="",i){if(!t||!e)return void(i&&i());this.stop(t);const n=s=>{s.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",n),delete t.dataset.animationName,i&&i(),P(t,e))};t.dataset.animationName=e,t.addEventListener("animationend",n),C(t,e)}stop(t){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,e="",i=!0){if(this.isClosing())return;const n=t.el;if(!n)return;let o=null;if(S(e)?o=e:(o=s(e+""),S(o)||(o=document.createElement("div"),o.innerHTML=e+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){const t=document.createElement("div");t.appendChild(o),o=t}S(o)&&t.filter&&!t.error&&(o=o.querySelector(t.filter)),o&&S(o)?(C(o,"fancybox__content"),t.id&&o.setAttribute("id",t.id),n.classList.add(`has-${t.error?"error":t.type||"unknown"}`),n.prepend(o),"none"===o.style.display&&(o.style.display=""),"none"===getComputedStyle(o).getPropertyValue("display")&&(o.style.display=t.display||this.option("defaultDisplay")||"flex"),t.contentEl=o,i&&this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,e){const i=t.el,n=t.contentEl;i&&n&&(this.emit("reveal",t),this.hideLoading(t),t.state=ct.Opening,(e=this.isOpeningSlide(t)?void 0===e?this.optionFor(t,"showClass"):e:"f-fadeIn")?this.animate(n,e,(()=>{this.done(t)})):this.done(t))}done(t){this.isClosing()||(t.state=ct.Ready,this.emit("done",t),C(t.el,"is-done"),this.isCurrentSlide(t)&&this.option("autoFocus")&&queueMicrotask((()=>{var e;null===(e=t.panzoom)||void 0===e||e.updateControls(),this.option("autoFocus")&&this.focus()})),this.isOpeningSlide(t)&&(P(this.container,de),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(t){const e=this.getSlide();return!(!t||!e)&&e.index===t.index}isOpeningSlide(t){var e,i;return null===(null===(e=this.carousel)||void 0===e?void 0:e.prevPage)&&t&&t.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(t){t.state=ct.Loading;const e=t.el;if(!e)return;C(e,he),this.emit("loading",t),t.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!t.spinnerEl&&t.state===ct.Loading){let i=s(E);C(i,"fancybox-spinner"),t.spinnerEl=i,e.prepend(i),this.animate(i,"f-fadeIn")}}),250)}hideLoading(t){const e=t.el;if(!e)return;const i=t.spinnerEl;this.isClosing()?null==i||i.remove():(P(e,he),i&&this.animate(i,"f-fadeOut",(()=>{i.remove()})),t.state===ct.Loading&&(this.emit("loaded",t),t.state=ct.Ready))}setError(t,e){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,t),i.defaultPrevented)return;t.error=e,this.hideLoading(t),this.clearContent(t);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(e||"

    {{ERROR}}

    "),this.setContent(t,n)}clearContent(t){if(void 0===t.state)return;this.emit("clearContent",t),t.contentEl&&(t.contentEl.remove(),t.contentEl=void 0);const e=t.el;e&&(P(e,"has-error"),P(e,"has-unknown"),P(e,`has-${t.type||"unknown"}`)),t.closeBtnEl&&t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&&t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&&t.spinnerEl.remove(),t.spinnerEl=void 0}getSlide(){var t;const e=this.carousel;return(null===(t=null==e?void 0:e.pages[null==e?void 0:e.page])||void 0===t?void 0:t.slides[0])||void 0}close(t,e){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,t),i.defaultPrevented)return;t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());const n=()=>{this.proceedClose(t,e)};this.startedFs&&we&&we.isFullscreen()?Promise.resolve(we.exit()).then((()=>n())):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const e=()=>{this.clearIdle(),this.idle=!0,C(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)e();else{const t=this.option("idle");t&&(this.idleTimer=setTimeout(e,t))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,P(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){we&&(we.isFullscreen()?we.exit():we.request().then((()=>{this.startedFs=!0})))}isClosing(){return[lt.Closing,lt.CustomClosing,lt.Destroy].includes(this.state)}proceedClose(t,e){var i,n;this.state=lt.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(et(r)?ot(r):r.focus()),s&&(P(s,de),C(s,"is-closing"),s.setAttribute(ae,"true"),this.option("animated")&&C(s,le),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();for(const t of o.slides){t.state=ct.Closing,this.hideLoading(t);const e=t.contentEl;e&&this.stop(e);const i=null==t?void 0:t.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(t)||o.emit("removeSlide",t)}}Ce=window.scrollX,Te=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",t),this.state!==lt.CustomClosing?(void 0===e&&a&&(e=this.optionFor(a,"hideClass")),e&&a?(this.animate(a.contentEl,e,(()=>{o&&o.emit("removeSlide",a)})),setTimeout((()=>{this.destroy()}),500)):this.destroy()):setTimeout((()=>{this.destroy()}),500)}destroy(){var t;if(this.state===lt.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=lt.Destroy,null===(t=this.carousel)||void 0===t||t.destroy();const e=this.container;e&&e.remove(),Me.delete(this.id);const i=Ae.getInstance();i?i.focus():(xe&&(xe.remove(),xe=null),Ee&&(Ee.remove(),Ee=null),P(document.documentElement,ie),(()=>{if(!it)return;const t=document,e=t.body;e.classList.remove(ne),e.style.setProperty(oe,""),t.documentElement.style.setProperty(se,"")})(),this.emit("destroy"))}static bind(t,e,i){if(!it)return;let n,s="",o={};if(void 0===t?n=document.body:be(t)?(n=document.body,s=t,"object"==typeof e&&(o=e||{})):(n=t,be(e)&&(s=e),"object"==typeof i&&(o=i||{})),!n||!S(n))return;s=s||"[data-fancybox]";const a=Ae.openers.get(n)||new Map;a.set(s,o),Ae.openers.set(n,a),1===a.size&&n.addEventListener("click",Ae.fromEvent)}static unbind(t,e){let i,n="";if(be(t)?(i=document.body,n=t):(i=t,be(e)&&(n=e)),!i)return;const s=Ae.openers.get(i);s&&n&&s.delete(n),n&&s||(Ae.openers.delete(i),i.removeEventListener("click",Ae.fromEvent))}static destroy(){let t;for(;t=Ae.getInstance();)t.destroy();for(const t of Ae.openers.keys())t.removeEventListener("click",Ae.fromEvent);Ae.openers=new Map}static fromEvent(t){if(t.defaultPrevented)return;if(t.button&&0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;let e=t.composedPath()[0];const i=e.closest("[data-fancybox-trigger]");if(i){const t=i.dataset.fancyboxTrigger||"",n=document.querySelectorAll(`[data-fancybox="${t}"]`),s=parseInt(i.dataset.fancyboxIndex||"",10)||0;e=n[s]||e}if(!(e&&e instanceof Element))return;let n,s,o,a;if([...Ae.openers].reverse().find((([t,i])=>!(!t.contains(e)||![...i].reverse().find((([i,r])=>{let l=e.closest(i);return!!l&&(n=t,s=i,o=l,a=r,!0)}))))),!n||!s||!o)return;a=a||{},t.preventDefault(),e=o;let r=[],l=p({},rt,a);l.event=t,l.triggerEl=e,l.delegate=i;const c=l.groupAll,h=l.groupAttr,d=h&&e?e.getAttribute(`${h}`):"";if((!e||d||c)&&(r=[].slice.call(n.querySelectorAll(s))),e&&!c&&(r=d?r.filter((t=>t.getAttribute(`${h}`)===d)):[e]),!r.length)return;const u=Ae.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(e&&(l.startIndex=r.indexOf(e)),Ae.fromNodes(r,l))}static fromSelector(t,e,i){let n=null,s="",o={};if(be(t)?(n=document.body,s=t,"object"==typeof e&&(o=e||{})):t instanceof HTMLElement&&be(e)&&(n=t,s=e,"object"==typeof i&&(o=i||{})),!n||!s)return!1;const a=Ae.openers.get(n);return!!a&&(o=p({},a.get(s)||{},o),!!o&&Ae.fromNodes(Array.from(n.querySelectorAll(s)),o))}static fromNodes(t,e){e=p({},rt,e||{});const i=[];for(const n of t){const t=n.dataset||{},s=t[ve]||n.getAttribute(me)||n.getAttribute("currentSrc")||n.getAttribute(ve)||void 0;let o;const a=e.delegate;let r;a&&i.length===e.startIndex&&(o=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),o||(o=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),o&&(r=o.currentSrc||o[ve]||void 0,!r&&o.dataset&&(r=o.dataset.lazySrc||o.dataset[ve]||void 0));const l={src:s,triggerEl:n,thumbEl:o,thumbElSrc:r,thumbSrc:r};for(const e in t){let i=t[e]+"";i="false"!==i&&("true"===i||i),l[e]=i}i.push(l)}return new Ae(i,e)}static getInstance(t){if(t)return Me.get(t);return Array.from(Me.values()).reverse().find((t=>!t.isClosing()&&t))||null}static getSlide(){var t;return(null===(t=Ae.getInstance())||void 0===t?void 0:t.getSlide())||null}static show(t=[],e={}){return new Ae(t,e)}static next(){const t=Ae.getInstance();t&&t.next()}static prev(){const t=Ae.getInstance();t&&t.prev()}static close(t=!0,...e){if(t)for(const t of Me.values())t.close(...e);else{const t=Ae.getInstance();t&&t.close(...e)}}}Object.defineProperty(Ae,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(Ae,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:rt}),Object.defineProperty(Ae,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:ee}),Object.defineProperty(Ae,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),t.Carousel=tt,t.Fancybox=Ae,t.Panzoom=D})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js new file mode 100644 index 00000000000..7ae7efc848d --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js @@ -0,0 +1 @@ +const o={PANUP:"Posunout nahoru",PANDOWN:"Posunout dolů",PANLEFT:"Posunout vlevo",PANRIGHT:"Posunout vpravo",ZOOMIN:"Přiblížit",ZOOMOUT:"Oddálit",TOGGLEZOOM:"Přepnout úroveň přiblížení",TOGGLE1TO1:"Přepnout úroveň přiblížení",ITERATEZOOM:"Přepnout úroveň přiblížení",ROTATECCW:"Otočit směrem vlevo",ROTATECW:"Otočit směrem vpravo",FLIPX:"Převrátit vodorovně",FLIPY:"Převrátit svisle",FITX:"Přizpůsobit na šířku",FITY:"Přizpůsobit na výšku",RESET:"Resetovat",TOGGLEFS:"Režim celé obrazovky",CLOSE:"Zavřít",NEXT:"Další",PREV:"Předchozí",MODAL:"Toto okno lze zavřít klávesou ESC",ERROR:"Někde se stala chyba, zkuste to prosím znovu",IMAGE_ERROR:"Obrázek nenalezen",ELEMENT_NOT_FOUND:"HTML element nenalezen",AJAX_NOT_FOUND:"Chyba AJAX načítání: Nenalezeno",AJAX_FORBIDDEN:"Chyba AJAX načítání: Zamítnuto",IFRAME_ERROR:"Chyba načítání stránky",TOGGLE_ZOOM:"Přepnout úroveň přiblížení",TOGGLE_THUMBS:"Zobrazit/skrýt miniatury",TOGGLE_SLIDESHOW:"Spustit/zastavit automatické přehrávání",TOGGLE_FULLSCREEN:"Režim celé obrazovky",DOWNLOAD:"Stáhnout"};export{o as cs}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js new file mode 100644 index 00000000000..eefcf79c3fd --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js @@ -0,0 +1 @@ +!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((o="undefined"!=typeof globalThis?globalThis:o||self).Fancybox=o.Fancybox||{},o.Fancybox.l10n=o.Fancybox.l10n||{}))}(this,(function(o){"use strict";const e={PANUP:"Posunout nahoru",PANDOWN:"Posunout dolů",PANLEFT:"Posunout vlevo",PANRIGHT:"Posunout vpravo",ZOOMIN:"Přiblížit",ZOOMOUT:"Oddálit",TOGGLEZOOM:"Přepnout úroveň přiblížení",TOGGLE1TO1:"Přepnout úroveň přiblížení",ITERATEZOOM:"Přepnout úroveň přiblížení",ROTATECCW:"Otočit směrem vlevo",ROTATECW:"Otočit směrem vpravo",FLIPX:"Převrátit vodorovně",FLIPY:"Převrátit svisle",FITX:"Přizpůsobit na šířku",FITY:"Přizpůsobit na výšku",RESET:"Resetovat",TOGGLEFS:"Režim celé obrazovky",CLOSE:"Zavřít",NEXT:"Další",PREV:"Předchozí",MODAL:"Toto okno lze zavřít klávesou ESC",ERROR:"Někde se stala chyba, zkuste to prosím znovu",IMAGE_ERROR:"Obrázek nenalezen",ELEMENT_NOT_FOUND:"HTML element nenalezen",AJAX_NOT_FOUND:"Chyba AJAX načítání: Nenalezeno",AJAX_FORBIDDEN:"Chyba AJAX načítání: Zamítnuto",IFRAME_ERROR:"Chyba načítání stránky",TOGGLE_ZOOM:"Přepnout úroveň přiblížení",TOGGLE_THUMBS:"Zobrazit/skrýt miniatury",TOGGLE_SLIDESHOW:"Spustit/zastavit automatické přehrávání",TOGGLE_FULLSCREEN:"Režim celé obrazovky",DOWNLOAD:"Stáhnout"};o.cs=e})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js new file mode 100644 index 00000000000..47318a84e4a --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js @@ -0,0 +1 @@ +const e={PANUP:"Aufwärts bewegen",PANDOWN:"Nach unten bewegen",PANLEFT:"Nach links bewegen",PANRIGHT:"Nach rechts bewegen",ZOOMIN:"Vergrößern",ZOOMOUT:"Verkleinern",TOGGLEZOOM:"Zoomstufe umschalten",TOGGLE1TO1:"Zoomstufe umschalten",ITERATEZOOM:"Zoomstufe umschalten",ROTATECCW:"Gegen den Uhrzeigersinn drehen",ROTATECW:"Im Uhrzeigersinn drehen",FLIPX:"Horizontal spiegeln",FLIPY:"Vertikal spiegeln",FITX:"Horizontal einpassen",FITY:"Vertikal anpassen",RESET:"Zurücksetzen",TOGGLEFS:"Vollbild umschalten",CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",MODAL:"Sie können diesen modalen Inhalt mit der ESC-Taste schließen",ERROR:"Etwas ist schief gelaufen, bitte versuchen Sie es später noch einmal",IMAGE_ERROR:"Bild nicht gefunden",ELEMENT_NOT_FOUND:"HTML-Element nicht gefunden",AJAX_NOT_FOUND:"Fehler beim Laden von AJAX: Nicht gefunden",AJAX_FORBIDDEN:"Fehler beim Laden von AJAX: Verboten",IFRAME_ERROR:"Fehler beim Laden der Seite",TOGGLE_ZOOM:"Zoomstufe umschalten",TOGGLE_THUMBS:"Miniaturansichten umschalten",TOGGLE_SLIDESHOW:"Diashow wechseln",TOGGLE_FULLSCREEN:"Vollbildmodus umschalten",DOWNLOAD:"Herunterladen"};export{e as de}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js new file mode 100644 index 00000000000..b21c6eb4dfb --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Fancybox=e.Fancybox||{},e.Fancybox.l10n=e.Fancybox.l10n||{}))}(this,(function(e){"use strict";const n={PANUP:"Aufwärts bewegen",PANDOWN:"Nach unten bewegen",PANLEFT:"Nach links bewegen",PANRIGHT:"Nach rechts bewegen",ZOOMIN:"Vergrößern",ZOOMOUT:"Verkleinern",TOGGLEZOOM:"Zoomstufe umschalten",TOGGLE1TO1:"Zoomstufe umschalten",ITERATEZOOM:"Zoomstufe umschalten",ROTATECCW:"Gegen den Uhrzeigersinn drehen",ROTATECW:"Im Uhrzeigersinn drehen",FLIPX:"Horizontal spiegeln",FLIPY:"Vertikal spiegeln",FITX:"Horizontal einpassen",FITY:"Vertikal anpassen",RESET:"Zurücksetzen",TOGGLEFS:"Vollbild umschalten",CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",MODAL:"Sie können diesen modalen Inhalt mit der ESC-Taste schließen",ERROR:"Etwas ist schief gelaufen, bitte versuchen Sie es später noch einmal",IMAGE_ERROR:"Bild nicht gefunden",ELEMENT_NOT_FOUND:"HTML-Element nicht gefunden",AJAX_NOT_FOUND:"Fehler beim Laden von AJAX: Nicht gefunden",AJAX_FORBIDDEN:"Fehler beim Laden von AJAX: Verboten",IFRAME_ERROR:"Fehler beim Laden der Seite",TOGGLE_ZOOM:"Zoomstufe umschalten",TOGGLE_THUMBS:"Miniaturansichten umschalten",TOGGLE_SLIDESHOW:"Diashow wechseln",TOGGLE_FULLSCREEN:"Vollbildmodus umschalten",DOWNLOAD:"Herunterladen"};e.de=n})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js new file mode 100644 index 00000000000..813f1cbe682 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js @@ -0,0 +1 @@ +const o=Object.assign(Object.assign({},{PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"}),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"});export{o as en}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js new file mode 100644 index 00000000000..8c02b109381 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js @@ -0,0 +1 @@ +!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((o="undefined"!=typeof globalThis?globalThis:o||self).Fancybox=o.Fancybox||{},o.Fancybox.l10n=o.Fancybox.l10n||{}))}(this,(function(o){"use strict";const e=Object.assign(Object.assign({},{PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"}),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"});o.en=e})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js new file mode 100644 index 00000000000..01857d07a72 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js @@ -0,0 +1 @@ +const a={PANUP:"Mover hacia arriba",PANDOWN:"Mover hacia abajo",PANLEFT:"Mover hacia la izquierda",PANRIGHT:"Mover hacia la derecha",ZOOMIN:"Mover a la derecha",ZOOMOUT:"Disminuir el zoom",TOGGLEZOOM:"Alternar nivel de zoom",TOGGLE1TO1:"Alternar nivel de zoom",ITERATEZOOM:"Alternar nivel de zoom",ROTATECCW:"Girar en sentido antihorario",ROTATECW:"Rotar las agujas del reloj",FLIPX:"Voltear horizontalmente",FLIPY:"Voltear verticalmente",FITX:"Ajustar horizontalmente",FITY:"Ajustar verticalmente",RESET:"Reiniciar",TOGGLEFS:"Alternar pantalla completa",CLOSE:"Cerrar",NEXT:"Siguiente",PREV:"Anterior",MODAL:"Puedes cerrar esta ventana con la tecla ESC",ERROR:"Algo salió mal, inténtalo de nuevo más tarde",IMAGE_ERROR:"Imagen no encontrada",ELEMENT_NOT_FOUND:"Elemento HTML no encontrado",AJAX_NOT_FOUND:"Error al cargar el AJAX : No encontrado",AJAX_FORBIDDEN:"Error al cargar el AJAX : Prohibido",IFRAME_ERROR:"Error al cargar la página",TOGGLE_ZOOM:"Cambiar el nivel de zoom",TOGGLE_THUMBS:"Cambiar a miniaturas",TOGGLE_SLIDESHOW:"Cambiar a modo presentación",TOGGLE_FULLSCREEN:"Cambiar a modo pantalla completa",DOWNLOAD:"Descargar"};export{a as es}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js new file mode 100644 index 00000000000..c25bc3d6768 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((a="undefined"!=typeof globalThis?globalThis:a||self).Fancybox=a.Fancybox||{},a.Fancybox.l10n=a.Fancybox.l10n||{}))}(this,(function(a){"use strict";const e={PANUP:"Mover hacia arriba",PANDOWN:"Mover hacia abajo",PANLEFT:"Mover hacia la izquierda",PANRIGHT:"Mover hacia la derecha",ZOOMIN:"Mover a la derecha",ZOOMOUT:"Disminuir el zoom",TOGGLEZOOM:"Alternar nivel de zoom",TOGGLE1TO1:"Alternar nivel de zoom",ITERATEZOOM:"Alternar nivel de zoom",ROTATECCW:"Girar en sentido antihorario",ROTATECW:"Rotar las agujas del reloj",FLIPX:"Voltear horizontalmente",FLIPY:"Voltear verticalmente",FITX:"Ajustar horizontalmente",FITY:"Ajustar verticalmente",RESET:"Reiniciar",TOGGLEFS:"Alternar pantalla completa",CLOSE:"Cerrar",NEXT:"Siguiente",PREV:"Anterior",MODAL:"Puedes cerrar esta ventana con la tecla ESC",ERROR:"Algo salió mal, inténtalo de nuevo más tarde",IMAGE_ERROR:"Imagen no encontrada",ELEMENT_NOT_FOUND:"Elemento HTML no encontrado",AJAX_NOT_FOUND:"Error al cargar el AJAX : No encontrado",AJAX_FORBIDDEN:"Error al cargar el AJAX : Prohibido",IFRAME_ERROR:"Error al cargar la página",TOGGLE_ZOOM:"Cambiar el nivel de zoom",TOGGLE_THUMBS:"Cambiar a miniaturas",TOGGLE_SLIDESHOW:"Cambiar a modo presentación",TOGGLE_FULLSCREEN:"Cambiar a modo pantalla completa",DOWNLOAD:"Descargar"};a.es=e})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js new file mode 100644 index 00000000000..4b342c8e3d2 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js @@ -0,0 +1 @@ +const e={PANUP:"Déplacer vers le haut",PANDOWN:"Déplacer vers le bas",PANLEFT:"Déplacer vers la gauche",PANRIGHT:"Déplacer vers la droite",ZOOMIN:"Zoom avant",ZOOMOUT:"Zoom arrière",TOGGLEZOOM:"Basculer le niveau de zoom",TOGGLE1TO1:"Basculer le niveau de zoom",ITERATEZOOM:"Basculer le niveau de zoom",ROTATECCW:"Tourner dans le sens antihoraire",ROTATECW:"Le sens des aiguilles d'une montre",FLIPX:"Retourner horizontalement",FLIPY:"Retourner verticalement",FITX:"Ajuster horizontalement",FITY:"Ajuster verticalement",RESET:"Réinitialiser",TOGGLEFS:"Basculer en plein écran",CLOSE:"Fermer",NEXT:"Suivant",PREV:"Précédent",MODAL:"Vous pouvez fermer ce contenu modal avec la touche ESC",ERROR:"Quelque chose s'est mal passé, veuillez réessayer plus tard",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"Élément HTML introuvable",AJAX_NOT_FOUND:"Erreur lors du chargement d'AJAX : introuvable",AJAX_FORBIDDEN:"Erreur lors du chargement d'AJAX : Interdit",IFRAME_ERROR:"Erreur lors du chargement de la page",TOGGLE_ZOOM:"Basculer le niveau de zoom",TOGGLE_THUMBS:"Basculer les vignettes",TOGGLE_SLIDESHOW:"Basculer le diaporama",TOGGLE_FULLSCREEN:"Basculer en mode plein écran",DOWNLOAD:"Télécharger"};export{e as fr}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js new file mode 100644 index 00000000000..1d3c6ef7eaf --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js @@ -0,0 +1 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(((e="undefined"!=typeof globalThis?globalThis:e||self).Fancybox=e.Fancybox||{},e.Fancybox.l10n=e.Fancybox.l10n||{}))}(this,(function(e){"use strict";const r={PANUP:"Déplacer vers le haut",PANDOWN:"Déplacer vers le bas",PANLEFT:"Déplacer vers la gauche",PANRIGHT:"Déplacer vers la droite",ZOOMIN:"Zoom avant",ZOOMOUT:"Zoom arrière",TOGGLEZOOM:"Basculer le niveau de zoom",TOGGLE1TO1:"Basculer le niveau de zoom",ITERATEZOOM:"Basculer le niveau de zoom",ROTATECCW:"Tourner dans le sens antihoraire",ROTATECW:"Le sens des aiguilles d'une montre",FLIPX:"Retourner horizontalement",FLIPY:"Retourner verticalement",FITX:"Ajuster horizontalement",FITY:"Ajuster verticalement",RESET:"Réinitialiser",TOGGLEFS:"Basculer en plein écran",CLOSE:"Fermer",NEXT:"Suivant",PREV:"Précédent",MODAL:"Vous pouvez fermer ce contenu modal avec la touche ESC",ERROR:"Quelque chose s'est mal passé, veuillez réessayer plus tard",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"Élément HTML introuvable",AJAX_NOT_FOUND:"Erreur lors du chargement d'AJAX : introuvable",AJAX_FORBIDDEN:"Erreur lors du chargement d'AJAX : Interdit",IFRAME_ERROR:"Erreur lors du chargement de la page",TOGGLE_ZOOM:"Basculer le niveau de zoom",TOGGLE_THUMBS:"Basculer les vignettes",TOGGLE_SLIDESHOW:"Basculer le diaporama",TOGGLE_FULLSCREEN:"Basculer en mode plein écran",DOWNLOAD:"Télécharger"};e.fr=r})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js new file mode 100644 index 00000000000..b196d649717 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js @@ -0,0 +1 @@ +const t={PANUP:"Sposta su",PANDOWN:"Sposta giù",PANLEFT:"Sposta a sinistra",PANRIGHT:"Sposta a destra",ZOOMIN:"Ingrandisci",ZOOMOUT:"Rimpicciolisci",TOGGLEZOOM:"Alterna il livello di zoom",TOGGLE1TO1:"Alterna il livello di zoom",ITERATEZOOM:"Attiva/disattiva livello di zoom",ROTATECCW:"Ruota in senso antiorario",ROTATECW:"Ruota in senso orario",FLIPX:"Capovolgi orizzontalmente",FLIPY:"Capovolgi verticalmente",FITX:"Adatta orizzontalmente",FITY:"Adatta verticalmente",RESET:"Reimposta",TOGGLEFS:"Attiva/disattiva schermo intero",CLOSE:"Chiudi",NEXT:"Successivo",PREV:"Precedente",MODAL:"Puoi chiudere questo contenuto modale con il tasto ESC",ERROR:"Qualcosa è andato storto, riprova più tardi",IMAGE_ERROR:"Immagine non trovata",ELEMENT_NOT_FOUND:"Elemento HTML non trovato",AJAX_NOT_FOUND:"Errore durante il caricamento di AJAX: Non trovato",AJAX_FORBIDDEN:"Errore durante il caricamento di AJAX: Vietato",IFRAME_ERROR:"Errore durante il caricamento della pagina",TOGGLE_ZOOM:"Attiva/disattiva livello di zoom",TOGGLE_THUMBS:"Attiva/disattiva miniature",TOGGLE_SLIDESHOW:"Attiva/disattiva presentazione",TOGGLE_FULLSCREEN:"Attiva/disattiva modalità a schermo intero",DOWNLOAD:"Scarica"};export{t as it}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js new file mode 100644 index 00000000000..fe7703ff504 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js @@ -0,0 +1 @@ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).Fancybox=t.Fancybox||{},t.Fancybox.l10n=t.Fancybox.l10n||{}))}(this,(function(t){"use strict";const i={PANUP:"Sposta su",PANDOWN:"Sposta giù",PANLEFT:"Sposta a sinistra",PANRIGHT:"Sposta a destra",ZOOMIN:"Ingrandisci",ZOOMOUT:"Rimpicciolisci",TOGGLEZOOM:"Alterna il livello di zoom",TOGGLE1TO1:"Alterna il livello di zoom",ITERATEZOOM:"Attiva/disattiva livello di zoom",ROTATECCW:"Ruota in senso antiorario",ROTATECW:"Ruota in senso orario",FLIPX:"Capovolgi orizzontalmente",FLIPY:"Capovolgi verticalmente",FITX:"Adatta orizzontalmente",FITY:"Adatta verticalmente",RESET:"Reimposta",TOGGLEFS:"Attiva/disattiva schermo intero",CLOSE:"Chiudi",NEXT:"Successivo",PREV:"Precedente",MODAL:"Puoi chiudere questo contenuto modale con il tasto ESC",ERROR:"Qualcosa è andato storto, riprova più tardi",IMAGE_ERROR:"Immagine non trovata",ELEMENT_NOT_FOUND:"Elemento HTML non trovato",AJAX_NOT_FOUND:"Errore durante il caricamento di AJAX: Non trovato",AJAX_FORBIDDEN:"Errore durante il caricamento di AJAX: Vietato",IFRAME_ERROR:"Errore durante il caricamento della pagina",TOGGLE_ZOOM:"Attiva/disattiva livello di zoom",TOGGLE_THUMBS:"Attiva/disattiva miniature",TOGGLE_SLIDESHOW:"Attiva/disattiva presentazione",TOGGLE_FULLSCREEN:"Attiva/disattiva modalità a schermo intero",DOWNLOAD:"Scarica"};t.it=i})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js new file mode 100644 index 00000000000..d3fb0a54960 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js @@ -0,0 +1 @@ +const O={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};export{O as ja}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js new file mode 100644 index 00000000000..b2cef41a51e --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js @@ -0,0 +1 @@ +!function(O,E){"object"==typeof exports&&"undefined"!=typeof module?E(exports):"function"==typeof define&&define.amd?define(["exports"],E):E(((O="undefined"!=typeof globalThis?globalThis:O||self).Fancybox=O.Fancybox||{},O.Fancybox.l10n=O.Fancybox.l10n||{}))}(this,(function(O){"use strict";const E={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};O.ja=E})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js new file mode 100644 index 00000000000..aebc38a0fdf --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js @@ -0,0 +1 @@ +const t={PANUP:"Bīdīt uz augšu",PANDOWN:"Bīdīt uz leju",PANLEFT:"Bīdīt pa kreisi",PANRIGHT:"Bīdīt pa labi",ZOOMIN:"Pietuvināt",ZOOMOUT:"Attālināt",TOGGLEZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE1TO1:"Pārslēgt tālummaiņas līmeni",ITERATEZOOM:"Pārslēgt tālummaiņas līmeni",ROTATECCW:"Pagrieziet pretēji pulksteņrādītāja virzienam",ROTATECW:"Pagrieziet pulksteņrādītāja virzienā",FLIPX:"Apgriezt horizontāli",FLIPY:"Apgriezt vertikāli",FITX:"Ietilpināt horizontāli",FITY:"Ietilpināt vertikāli",RESET:"Atiestatīt",TOGGLEFS:"Pārslēgt pilnekrāna režīmu",CLOSE:"Aizvērt",NEXT:"Nākošais",PREV:"Iepriekšējais",MODAL:"Šo modālo saturu var aizvērt ar ESC taustiņu",ERROR:"Kaut kas nogāja greizi. Lūdzu, vēlāk mēģiniet vēlreiz",IMAGE_ERROR:"Attēls nav atrasts",ELEMENT_NOT_FOUND:"HTML elements nav atrasts",AJAX_NOT_FOUND:"Ielādējot AJAX, radās kļūda: Nav atrasts",AJAX_FORBIDDEN:"Ielādējot AJAX, radās kļūda: Aizliegts",IFRAME_ERROR:"Ielādējot lapu, radās kļūda",TOGGLE_ZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE_THUMBS:"Pārslēgt sīktēlus",TOGGLE_SLIDESHOW:"Pārslēgt slaidrādi",TOGGLE_FULLSCREEN:"Pārslēgt pilnekrāna režīmu",DOWNLOAD:"Lejupielādēt"};export{t as lv}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js new file mode 100644 index 00000000000..415e15b26bd --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js @@ -0,0 +1 @@ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).Fancybox=t.Fancybox||{},t.Fancybox.l10n=t.Fancybox.l10n||{}))}(this,(function(t){"use strict";const i={PANUP:"Bīdīt uz augšu",PANDOWN:"Bīdīt uz leju",PANLEFT:"Bīdīt pa kreisi",PANRIGHT:"Bīdīt pa labi",ZOOMIN:"Pietuvināt",ZOOMOUT:"Attālināt",TOGGLEZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE1TO1:"Pārslēgt tālummaiņas līmeni",ITERATEZOOM:"Pārslēgt tālummaiņas līmeni",ROTATECCW:"Pagrieziet pretēji pulksteņrādītāja virzienam",ROTATECW:"Pagrieziet pulksteņrādītāja virzienā",FLIPX:"Apgriezt horizontāli",FLIPY:"Apgriezt vertikāli",FITX:"Ietilpināt horizontāli",FITY:"Ietilpināt vertikāli",RESET:"Atiestatīt",TOGGLEFS:"Pārslēgt pilnekrāna režīmu",CLOSE:"Aizvērt",NEXT:"Nākošais",PREV:"Iepriekšējais",MODAL:"Šo modālo saturu var aizvērt ar ESC taustiņu",ERROR:"Kaut kas nogāja greizi. Lūdzu, vēlāk mēģiniet vēlreiz",IMAGE_ERROR:"Attēls nav atrasts",ELEMENT_NOT_FOUND:"HTML elements nav atrasts",AJAX_NOT_FOUND:"Ielādējot AJAX, radās kļūda: Nav atrasts",AJAX_FORBIDDEN:"Ielādējot AJAX, radās kļūda: Aizliegts",IFRAME_ERROR:"Ielādējot lapu, radās kļūda",TOGGLE_ZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE_THUMBS:"Pārslēgt sīktēlus",TOGGLE_SLIDESHOW:"Pārslēgt slaidrādi",TOGGLE_FULLSCREEN:"Pārslēgt pilnekrāna režīmu",DOWNLOAD:"Lejupielādēt"};t.lv=i})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js new file mode 100644 index 00000000000..de336eb218a --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js @@ -0,0 +1 @@ +const o={PANUP:"Przesuń w górę",PANDOWN:"Przesuń w dół",PANLEFT:"Przesuń w lewo",PANRIGHT:"Przesuń w prawo",ZOOMIN:"Zbliż",ZOOMOUT:"Oddal",TOGGLEZOOM:"Zbliż/oddal",TOGGLE1TO1:"Zmieść/skala 1:1",ITERATEZOOM:"Zbliż/oddal",ROTATECCW:"Obróć w lewo",ROTATECW:"Obróć w prawo",FLIPX:"Obróć w poziomie",FLIPY:"Obróć w pionie",FITX:"Dopasuj do szerokości ekranu",FITY:"Dopasuj do wysokości ekranu",RESET:"Resetuj",TOGGLEFS:"Włącz/wyłącz tryb pełnego ekranu",CLOSE:"Zamknij",NEXT:"Dalej",PREV:"Wstecz",MODAL:"Wciśnij ESC, by zamknąć",ERROR:"Coś poszło nie tak. Spróbuj ponownie później",IMAGE_ERROR:"Wczytywanie obrazu nie powiodło się",ELEMENT_NOT_FOUND:"Element HTML nie został odnaleziony",AJAX_NOT_FOUND:"Żądanie AJAX nie powiodło się: brak właściwego zasobu",AJAX_FORBIDDEN:"Żądanie AJAX nie powiodło się: braku dostępu",IFRAME_ERROR:"Nie udało się załadować poprawnie tej strony",TOGGLE_ZOOM:"Zbliż/oddal",TOGGLE_THUMBS:"Wyświetl/ukryj miniatury",TOGGLE_SLIDESHOW:"Włącz/wyłącz pokaz slajdów",TOGGLE_FULLSCREEN:"Włącz/wyłącz tryb pełnego ekranu",DOWNLOAD:"Pobierz"};export{o as pl}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js new file mode 100644 index 00000000000..669c8208448 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js @@ -0,0 +1 @@ +!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((o="undefined"!=typeof globalThis?globalThis:o||self).Fancybox=o.Fancybox||{},o.Fancybox.l10n=o.Fancybox.l10n||{}))}(this,(function(o){"use strict";const e={PANUP:"Przesuń w górę",PANDOWN:"Przesuń w dół",PANLEFT:"Przesuń w lewo",PANRIGHT:"Przesuń w prawo",ZOOMIN:"Zbliż",ZOOMOUT:"Oddal",TOGGLEZOOM:"Zbliż/oddal",TOGGLE1TO1:"Zmieść/skala 1:1",ITERATEZOOM:"Zbliż/oddal",ROTATECCW:"Obróć w lewo",ROTATECW:"Obróć w prawo",FLIPX:"Obróć w poziomie",FLIPY:"Obróć w pionie",FITX:"Dopasuj do szerokości ekranu",FITY:"Dopasuj do wysokości ekranu",RESET:"Resetuj",TOGGLEFS:"Włącz/wyłącz tryb pełnego ekranu",CLOSE:"Zamknij",NEXT:"Dalej",PREV:"Wstecz",MODAL:"Wciśnij ESC, by zamknąć",ERROR:"Coś poszło nie tak. Spróbuj ponownie później",IMAGE_ERROR:"Wczytywanie obrazu nie powiodło się",ELEMENT_NOT_FOUND:"Element HTML nie został odnaleziony",AJAX_NOT_FOUND:"Żądanie AJAX nie powiodło się: brak właściwego zasobu",AJAX_FORBIDDEN:"Żądanie AJAX nie powiodło się: braku dostępu",IFRAME_ERROR:"Nie udało się załadować poprawnie tej strony",TOGGLE_ZOOM:"Zbliż/oddal",TOGGLE_THUMBS:"Wyświetl/ukryj miniatury",TOGGLE_SLIDESHOW:"Włącz/wyłącz pokaz slajdów",TOGGLE_FULLSCREEN:"Włącz/wyłącz tryb pełnego ekranu",DOWNLOAD:"Pobierz"};o.pl=e})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js new file mode 100644 index 00000000000..e524f932bf0 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js @@ -0,0 +1 @@ +const a={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky",CLOSE:"Zavrieť",NEXT:"Ďalší",PREV:"Predchádzajúci",MODAL:"Môžete zavrieť toto okno klávesou ESC",ERROR:"Nastala chyba. Skúste to, prosím, znovu",IMAGE_ERROR:"Obrázok sa nenašiel",ELEMENT_NOT_FOUND:"HTML element sa nenašiel",AJAX_NOT_FOUND:"Chyba načítania: nenájdené",AJAX_FORBIDDEN:"Chyba načítania: zamietnuté",IFRAME_ERROR:"Chyba načítania stránky",TOGGLE_ZOOM:"Prepnúť úroveň priblíženia",TOGGLE_THUMBS:"Zobraziť/skryť miniatúry",TOGGLE_SLIDESHOW:"Spustiť/zastaviť automatické prehrávanie",TOGGLE_FULLSCREEN:"Režim celej obrazovky",DOWNLOAD:"Stiahnuť"};export{a as sk}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js new file mode 100644 index 00000000000..ab0f1b56695 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(((e="undefined"!=typeof globalThis?globalThis:e||self).Fancybox=e.Fancybox||{},e.Fancybox.l10n=e.Fancybox.l10n||{}))}(this,(function(e){"use strict";const a={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky",CLOSE:"Zavrieť",NEXT:"Ďalší",PREV:"Predchádzajúci",MODAL:"Môžete zavrieť toto okno klávesou ESC",ERROR:"Nastala chyba. Skúste to, prosím, znovu",IMAGE_ERROR:"Obrázok sa nenašiel",ELEMENT_NOT_FOUND:"HTML element sa nenašiel",AJAX_NOT_FOUND:"Chyba načítania: nenájdené",AJAX_FORBIDDEN:"Chyba načítania: zamietnuté",IFRAME_ERROR:"Chyba načítania stránky",TOGGLE_ZOOM:"Prepnúť úroveň priblíženia",TOGGLE_THUMBS:"Zobraziť/skryť miniatúry",TOGGLE_SLIDESHOW:"Spustiť/zastaviť automatické prehrávanie",TOGGLE_FULLSCREEN:"Režim celej obrazovky",DOWNLOAD:"Stiahnuť"};e.sk=a})); diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js new file mode 100644 index 00000000000..878640c8e74 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js @@ -0,0 +1 @@ +const O={PANUP:"上移",PANDOWN:"下移",PANLEFT:"左移",PANRIGHT:"右移",ZOOMIN:"放大",ZOOMOUT:"缩小",TOGGLEZOOM:"切换缩放级别",TOGGLE1TO1:"切换缩放级别",ITERATEZOOM:"切换缩放级别",ROTATECCW:"逆时针旋转",ROTATECW:"顺时针旋转",FLIPX:"水平翻转",FLIPY:"垂直翻转",FITX:"水平适应",FITY:"垂直适应",RESET:"重置",TOGGLEFS:"切换全屏",CLOSE:"关闭",NEXT:"上一个",PREV:"下一个",MODAL:"使用 ESC 键关闭",ERROR:"发生了错误,请稍后再试",IMAGE_ERROR:"找不到图像",ELEMENT_NOT_FOUND:"找不到 HTML 元素",AJAX_NOT_FOUND:"载入 AJAX 时出错: 未找到",AJAX_FORBIDDEN:"载入 AJAX 时出错: 被阻止",IFRAME_ERROR:"加载页面出错",TOGGLE_ZOOM:"切换缩放级别",TOGGLE_THUMBS:"切换缩略图",TOGGLE_SLIDESHOW:"切换幻灯片",TOGGLE_FULLSCREEN:"切换全屏",DOWNLOAD:"下载"};export{O as zh_CN}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js new file mode 100644 index 00000000000..b4a76adb0a2 --- /dev/null +++ b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js @@ -0,0 +1 @@ +!function(O,E){"object"==typeof exports&&"undefined"!=typeof module?E(exports):"function"==typeof define&&define.amd?define(["exports"],E):E(((O="undefined"!=typeof globalThis?globalThis:O||self).Fancybox=O.Fancybox||{},O.Fancybox.l10n=O.Fancybox.l10n||{}))}(this,(function(O){"use strict";const E={PANUP:"上移",PANDOWN:"下移",PANLEFT:"左移",PANRIGHT:"右移",ZOOMIN:"放大",ZOOMOUT:"缩小",TOGGLEZOOM:"切换缩放级别",TOGGLE1TO1:"切换缩放级别",ITERATEZOOM:"切换缩放级别",ROTATECCW:"逆时针旋转",ROTATECW:"顺时针旋转",FLIPX:"水平翻转",FLIPY:"垂直翻转",FITX:"水平适应",FITY:"垂直适应",RESET:"重置",TOGGLEFS:"切换全屏",CLOSE:"关闭",NEXT:"上一个",PREV:"下一个",MODAL:"使用 ESC 键关闭",ERROR:"发生了错误,请稍后再试",IMAGE_ERROR:"找不到图像",ELEMENT_NOT_FOUND:"找不到 HTML 元素",AJAX_NOT_FOUND:"载入 AJAX 时出错: 未找到",AJAX_FORBIDDEN:"载入 AJAX 时出错: 被阻止",IFRAME_ERROR:"加载页面出错",TOGGLE_ZOOM:"切换缩放级别",TOGGLE_THUMBS:"切换缩略图",TOGGLE_SLIDESHOW:"切换幻灯片",TOGGLE_FULLSCREEN:"切换全屏",DOWNLOAD:"下载"};O.zh_CN=E})); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js index 349aad4c333..2534d80d967 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js @@ -5,7 +5,7 @@ * @copyright 2001-2019 WoltLab GmbH * @license GNU Lesser General Public License */ -define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui/User/Ignore", "./Ui/Page/Header/Menu", "./Ui/Message/UserConsent", "./Ui/Message/Share/Dialog", "./Ui/Message/Share/Providers", "./Ui/Feed/Dialog", "./User", "./Ui/Page/Menu/Main/Frontend", "./LazyLoader", "./Ajax/Backend", "./Notification/ServiceWorker"], function (require, exports, tslib_1, BackgroundQueue, Bootstrap, UiUserIgnore, UiPageHeaderMenu, UiMessageUserConsent, UiMessageShareDialog, Providers_1, UiFeedDialog, User_1, Frontend_1, LazyLoader_1, Backend_1, ServiceWorker_1) { +define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui/User/Ignore", "./Ui/Page/Header/Menu", "./Ui/Message/UserConsent", "./Ui/Message/Share/Dialog", "./Ui/Message/Share/Providers", "./Ui/Feed/Dialog", "./User", "./Ui/Page/Menu/Main/Frontend", "./LazyLoader", "./Ajax/Backend", "./Notification/ServiceWorker", "./Component/Image/Viewer"], function (require, exports, tslib_1, BackgroundQueue, Bootstrap, UiUserIgnore, UiPageHeaderMenu, UiMessageUserConsent, UiMessageShareDialog, Providers_1, UiFeedDialog, User_1, Frontend_1, LazyLoader_1, Backend_1, ServiceWorker_1, ImageViewer) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = void 0; @@ -18,6 +18,7 @@ define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui UiFeedDialog = tslib_1.__importStar(UiFeedDialog); User_1 = tslib_1.__importDefault(User_1); Frontend_1 = tslib_1.__importDefault(Frontend_1); + ImageViewer = tslib_1.__importStar(ImageViewer); /** * Initializes user profile popover. */ @@ -81,6 +82,7 @@ define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui (0, ServiceWorker_1.setup)(options.serviceWorker.publicKey, options.serviceWorker.serviceWorkerJsUrl, options.serviceWorker.registerUrl); } } + ImageViewer.setup(); (0, LazyLoader_1.whenFirstSeen)("woltlab-core-reaction-summary", () => { void new Promise((resolve_3, reject_3) => { require(["./Ui/Reaction/SummaryDetails"], resolve_3, reject_3); }).then(tslib_1.__importStar).then(({ setup }) => setup()); }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js new file mode 100644 index 00000000000..eb56caeb3c7 --- /dev/null +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -0,0 +1,10 @@ +define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.setup = void 0; + function setup() { + ui_1.Fancybox.bind("[data-fancybox]"); + ui_1.Fancybox.bind('[data-fancybox="attachments"]'); + } + exports.setup = setup; +}); diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index 510f522562d..db3acc9f619 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -17,6 +17,7 @@ requirejs.config({ "@woltlab/editor": "3rdParty/ckeditor/ckeditor5.bundle", "ckeditor5-translation": "3rdParty/ckeditor/translations", "diff-match-patch": "3rdParty/diff-match-patch/diff_match_patch.min", + "@fancyapps/ui": "3rdParty/fancybox/fancybox.umd", }, packages: [ { diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 9fee7f279a7..1a272f0e50c 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -93,7 +93,7 @@ private function showImage(Attachment $attachment, string $outputType, array $at if (!$hasParentLink && ($attachment->width > ATTACHMENT_THUMBNAIL_WIDTH || $attachment->height > ATTACHMENT_THUMBNAIL_HEIGHT)) { $result = \sprintf( <<<'HTML' - + %s %s @@ -159,7 +159,7 @@ private function showImageAsThumbnail(Attachment $attachment, string $alignment, if (!$hasParentLink && $attachment->hasThumbnail() && $attachment->canDownload()) { $result = \sprintf( - '%s%s', + '%s%s', StringUtil::encodeHTML($attachment->getLink()), StringUtil::encodeHTML($attachment->filename), $class, From 4f0fe0a25fce00e135990f3b7b3bf85eba5bd387 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 08:48:59 +0200 Subject: [PATCH 02/25] Mark `IImageViewerAction` as deprecated --- wcfsetup/install/files/lib/data/IImageViewerAction.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/data/IImageViewerAction.class.php b/wcfsetup/install/files/lib/data/IImageViewerAction.class.php index b950f0bfe9e..a2e0dae79d0 100644 --- a/wcfsetup/install/files/lib/data/IImageViewerAction.class.php +++ b/wcfsetup/install/files/lib/data/IImageViewerAction.class.php @@ -8,6 +8,8 @@ * @author Alexander Ebert * @copyright 2001-2019 WoltLab GmbH * @license GNU Lesser General Public License + * + * @deprecated 6.2 */ interface IImageViewerAction { From 6801efd00c93a868a458fddb0c6ea466cd0b25b2 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 08:49:07 +0200 Subject: [PATCH 03/25] Run `tsc` --- .../files/js/WoltLabSuite/Core/Component/Image/Viewer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index eb56caeb3c7..fdc9f9f2d46 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -1,10 +1,9 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - exports.setup = void 0; + exports.setup = setup; function setup() { ui_1.Fancybox.bind("[data-fancybox]"); ui_1.Fancybox.bind('[data-fancybox="attachments"]'); } - exports.setup = setup; }); From cf0a9576f906b5864adbf5e2d84f7e815d55d0ae Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 09:37:27 +0200 Subject: [PATCH 04/25] Remove WCF.ImageViewer.js --- .../files/acp/templates/attachmentList.tpl | 2 - .../install/files/acp/templates/styleAdd.tpl | 4 - wcfsetup/install/files/js/WCF.ImageViewer.js | 1378 ----------------- 3 files changed, 1384 deletions(-) delete mode 100644 wcfsetup/install/files/js/WCF.ImageViewer.js diff --git a/wcfsetup/install/files/acp/templates/attachmentList.tpl b/wcfsetup/install/files/acp/templates/attachmentList.tpl index df3f858bc35..11067f8115f 100644 --- a/wcfsetup/install/files/acp/templates/attachmentList.tpl +++ b/wcfsetup/install/files/acp/templates/attachmentList.tpl @@ -1,7 +1,5 @@ {include file='header' pageTitle='wcf.acp.attachment.list'} - -{include file='imageViewer'} - - -{include file="imageViewer"} -

    {lang}wcf.acp.style.{$action}{/lang}

    diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js deleted file mode 100644 index bb6ba1a81df..00000000000 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ /dev/null @@ -1,1378 +0,0 @@ -"use strict"; - -/** - * Enhanced image viewer for WCF. - * - * @author Alexander Ebert - * @copyright 2001-2019 WoltLab GmbH - * @license GNU Lesser General Public License - */ -WCF.ImageViewer = Class.extend({ - /** - * trigger element to mimic a slideshow button - * @var jQuery - */ - _triggerElement: null, - - /** - * Initializes the WCF.ImageViewer class. - */ - init: function() { - this._triggerElement = $('').data('disableSlideshow', true).hide().appendTo(document.body); - this._triggerElement.wcfImageViewer({ - enableSlideshow: 0, - imageSelector: '.jsImageViewerEnabled', - staticViewer: true - }); - - WCF.DOMNodeInsertedHandler.addCallback('WCF.ImageViewer', $.proxy(this._domNodeInserted, this)); - WCF.DOMNodeInsertedHandler.execute(); - }, - - /** - * Executes actions upon DOMNodeInserted events. - */ - _domNodeInserted: function() { - this._initImageSizeCheck(); - this._rebuildImageViewer(); - }, - - /** - * Rebuilds the image viewer. - */ - _rebuildImageViewer: function() { - var $links = $('a.jsImageViewer'); - if ($links.length) { - $links.removeClass('jsImageViewer').addClass('jsImageViewerEnabled').click($.proxy(this._click, this)); - } - }, - - /** - * Handles click on an image with image viewer support. - * - * @param object event - */ - _click: function(event) { - // ignore clicks while ctrl key is being pressed - if (event.ctrlKey) { - return; - } - - event.preventDefault(); - event.stopPropagation(); - // skip if element is in a popover - if ($(event.currentTarget).closest('.popover').length) return; - - this._triggerElement.wcfImageViewer('open', null, $(event.currentTarget).wcfIdentify()); - }, - - /** - * Initializes the image size check. - */ - _initImageSizeCheck: function() { - $('.jsResizeImage').each($.proxy(function(index, image) { - if (image.complete) this._checkImageSize({ currentTarget: image }); - }, this)); - - $('.jsResizeImage').on('load', $.proxy(this._checkImageSize, this)); - }, - - /** - * Checks the image size. - */ - _checkImageSize: function(event) { - var $image = $(event.currentTarget); - if (!$image.is(':visible')) { - $image.off('load'); - - return; - } - - $image.removeClass('jsResizeImage'); - - // check if image falls within the signature, in that case ignore it - if ($image.closest('.messageSignature').length) { - return; - } - - // setting img { max-width: 100% } causes the image to fit within boundaries, but does not reveal the original dimenions - var $imageObject = new Image(); - $imageObject.src = $image.attr('src'); - - var $maxWidth = $image.closest('div.messageText, div.messageTextPreview').width(); - if ($maxWidth < $imageObject.width) { - if (!$image.parents('a').length) { - $image.wrap(''); - $image.parent().click($.proxy(this._click, this)); - - if ($image.css('float') == 'right') { - $image.parent().addClass('messageFloatObjectRight'); - } - else if ($image.css('float') == 'left') { - $image.parent().addClass('messageFloatObjectLeft'); - } - $image[0].style.removeProperty('float'); - $image[0].style.removeProperty('margin'); - } - } - else { - $image.removeClass('embeddedAttachmentLink'); - } - } -}); - -/** - * Provides a focused image viewer for WCF. - * - * Usage: - * $('.triggerElement').wcfImageViewer({ - * shiftBy: 5, - * - * enableSlideshow: 1, - * speed: 5, - * - * className: 'wcf\\data\\foo\\FooAction' - * }); - */ -$.widget('ui.wcfImageViewer', { - /** - * active image index - * @var integer - */ - _active: -1, - - /** - * active image object id - * @var integer - */ - _activeImage: null, - - /** - * image viewer container object - * @var jQuery - */ - _container: null, - - /** - * initialization state - * @var boolean - */ - _didInit: false, - - /** - * overrides slideshow settings unless explicitly enabled by user - * @var boolean - */ - _disableSlideshow: false, - - /** - * event namespace used to distinguish event handlers using $.proxy - * @var string - */ - _eventNamespace: '', - - /** - * list of available images - * @var array - */ - _images: [ ], - - /** - * true if image viewer uses the mobile-optimized UI - * @var boolean - */ - _isMobile: false, - - /** - * true if image viewer is open - * @var boolean - */ - _isOpen: false, - - /** - * @var HTMLElement|null - */ - _messageSignature: null, - - /** - * number of total images - * @var integer - */ - _items: -1, - - /** - * maximum dimensions for enlarged view - * @var object - */ - _maxDimensions: { - height: 0, - width: 0 - }, - - /** - * action proxy object - * @var WCF.Action.Proxy - */ - _proxy: null, - - /** - * true if slideshow is currently running - * @var boolean - */ - _slideshowEnabled: false, - - /** - * visible width of thumbnail container - * @var integer - */ - _thumbnailContainerWidth: 0, - - /** - * right margin of a thumbnail - * @var integer - */ - _thumbnailMarginRight: 0, - - /** - * left offset of thumbnail list - * @var integer - */ - _thumbnailOffset: 0, - - /** - * outer width of a thumbnail (includes margin) - * @var integer - */ - _thumbnailWidth: 0, - - /** - * slideshow timer object - * @var WCF.PeriodicalExecuter - */ - _timer: null, - - /** - * list of interface elements - * @var object - */ - _ui: { - buttonNext: null, - buttonPrevious: null, - header: null, - image: null, - imageContainer: null, - imageList: null, - slideshow: { - container: null, - enlarge: null, - next: null, - previous: null, - toggle: null - } - }, - - /** - * list of options parsed during init - * @var object - */ - options: { - // navigation - shiftBy: 5, // thumbnail slider control - - // slideshow - enableSlideshow: 1, - speed: 5, // time in seconds - - // ajax - className: '', // must be an instance of \wcf\data\IImageViewerAction - - // alternative mode - static view - imageSelector: '', - staticViewer: false - }, - - /** - * Creates a new wcfImageViewer instance. - */ - _create: function() { - this._active = -1; - this._activeImage = null; - this._container = null; - this._didInit = false; - this._disableSlideshow = (this.element.data('disableSlideshow')); - this._eventNamespace = this.element.wcfIdentify(); - this._images = [ ]; - this._isMobile = false; - this._isOpen = false; - this._items = -1; - this._maxDimensions = { - height: document.documentElement.clientHeight, - width: document.documentElement.clientWidth - }; - this._messageSignature = null; - this._proxy = new WCF.Action.Proxy({ - success: $.proxy(this._success, this) - }); - this._slideshowEnabled = false; - this._thumbnailContainerWidth = 0; - this._thumbnailMarginRight = 0; - this._thumbnailOffset = 0; - this._thumbnaiLWidth = 0; - this._timer = null; - this._ui = { }; - - this.element.click($.proxy(this.open, this)); - - window.addEventListener('popstate', (function(event) { - if (event.state != null && event.state.name === 'imageViewer') { - if (event.state.container === this._eventNamespace) { - this.open(event); - this.showImage(event.state.image); - - return; - } - } - - this.close(event); - }).bind(this)); - }, - - /** - * Opens the image viewer. - * - * @param object event - * @param string targetImageElementID - * @return boolean - */ - open: function(event, targetImageElementID) { - if (event) event.preventDefault(); - - if (this._isOpen) { - return false; - } - - if (document.activeElement instanceof HTMLElement) { - document.activeElement.blur(); - } - - // add history item for the image viewer - if (!event || event.type !== 'popstate') { - window.history.pushState({ - name: 'imageViewer' - }, '', ''); - } - - this._messageSignature = null; - if (this.options.staticViewer) { - if (targetImageElementID) { - this._messageSignature = document.getElementById(targetImageElementID).closest(".messageSignature"); - } - - // Reset the internal state because it could refer to a different set of images. - this._active = -1; - if (this._activeImage !== null) { - this._ui.images[this._activeImage].removeClass('active'); - } - this._activeImage = null; - - var $images = this._getStaticImages(); - this._initUI(); - this._createThumbnails($images, true); - this._render(true, undefined, targetImageElementID); - - this._isOpen = true; - - WCF.System.DisableScrolling.disable(); - WCF.System.DisableZoom.disable(); - - // switch to fullscreen mode on smartphones - if ($.browser.touch) { - setTimeout($.proxy(function() { - if (this._isMobile && !this._container.hasClass('maximized')) { - this._toggleView(); - } - }, this), 500); - } - } - else { - if (this._images.length === 0) { - this._loadNextImages(true); - } - else { - this._render(false, this.element.data('targetImageID')); - - if (this._items > 1 && this._slideshowEnabled) { - this.startSlideshow(); - } - - this._isOpen = true; - - WCF.System.DisableScrolling.disable(); - WCF.System.DisableZoom.disable(); - } - } - - this._bindListener(); - - require(['Ui/Screen'], function(UiScreen) { - UiScreen.pageOverlayOpen(); - }); - - return true; - }, - - /** - * Closes the image viewer. - * - * @return boolean - */ - close: function(event) { - if (event) event.preventDefault(); - - // clear history item of the image viewer - if (!event || event.type !== 'popstate') { - window.history.back(); - return; - } - - if (!this._isOpen) { - return false; - } - - this._container.removeClass('open'); - if (this._timer !== null) { - this._timer.stop(); - } - - this._unbindListener(); - - this._isOpen = false; - - WCF.System.DisableScrolling.enable(); - WCF.System.DisableZoom.enable(); - - require(['Ui/Screen'], function(UiScreen) { - UiScreen.pageOverlayClose(); - }); - - return true; - }, - - /** - * Enables the slideshow. - * - * @return boolean - */ - startSlideshow: function() { - if (this._disableSlideshow || this._slideshowEnabled) { - return false; - } - - if (this._timer === null) { - this._timer = new WCF.PeriodicalExecuter($.proxy(function() { - var $index = this._active + 1; - if ($index == this._items) { - $index = 0; - } - - this.showImage($index); - }, this), this.options.speed * 1000); - } - else { - this._timer.resume(); - } - - this._slideshowEnabled = true; - - this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"); - - return true; - }, - - /** - * Disables the slideshow. - * - * @param boolean disableSlideshow - * @return boolean - */ - stopSlideshow: function(disableSlideshow) { - if (!this._slideshowEnabled) { - return false; - } - - this._timer.stop(); - if (disableSlideshow) { - this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"); - } - - this._slideshowEnabled = false; - - return true; - }, - - /** - * Binds event listeners. - */ - _bindListener: function() { - $(document).on('keydown.' + this._eventNamespace, $.proxy(this._keyDown, this)); - $(window).on('resize.' + this._eventNamespace, () => { - // The resize event can trigger before the mobile UI has - // adapted to the new screen size (`screen-sm-down` no - // longer matches or previously did not match). - window.setTimeout(() => this._renderImage(), 0); - }); - }, - - /** - * Unbinds event listeners. - */ - _unbindListener: function() { - $(document).off('keydown.' + this._eventNamespace); - $(window).off('resize.' + this._eventNamespace); - }, - - /** - * Closes the slideshow on escape. - * - * @param object event - * @return boolean - */ - _keyDown: function(event) { - switch (event.which) { - // close slideshow - case $.ui.keyCode.ESCAPE: - this.close(); - break; - - // show previous image - case $.ui.keyCode.LEFT: - this._previousImage(); - break; - - // show next image - case $.ui.keyCode.RIGHT: - this._nextImage(); - break; - - // enable fullscreen mode - case $.ui.keyCode.UP: - if (!this._container.hasClass('maximized')) { - this._toggleView(); - } - break; - - // disable fullscreen mode - case $.ui.keyCode.DOWN: - if (this._container.hasClass('maximized')) { - this._toggleView(); - } - break; - - // jump to image page or full version - case $.ui.keyCode.ENTER: - var $link = this._ui.header.find('h1 > a'); - if ($link.length == 1) { - // forward to image page - window.location = $link.prop('href'); - } - else { - // forward to full version - this._ui.slideshow.full.trigger('click'); - } - break; - - // toggle play/pause (80 = [p]) - case 80: - this._ui.slideshow.toggle.trigger('click'); - break; - - default: - return true; - break; - } - - return false; - }, - - /** - * Renders the image viewer UI. - * - * @param boolean initialized - * @param integer targetImageID - * @param string targetImageElementID - */ - _render: function(initialized, targetImageID, targetImageElementID) { - this._container.addClass('open'); - - var $thumbnail = null; - if (initialized) { - $thumbnail = this._ui.imageList.children('li:eq(0)'); - this._thumbnailMarginRight = parseInt($thumbnail.css('marginRight').replace(/px$/, '')) || 0; - this._thumbnailWidth = $thumbnail.outerWidth(true); - this._thumbnailContainerWidth = this._ui.imageList.parent().innerWidth(); - - if (this._items > 1 && this.options.enableSlideshow && !targetImageID && !targetImageElementID) { - this.startSlideshow(); - } - } - - if (targetImageID) { - this._ui.imageList.children('li').each($.proxy(function(index, item) { - var $item = $(item); - if ($item.data('objectID') == targetImageID) { - $item.trigger('click'); - this.moveToImage($item.data('index')); - - return false; - } - }, this)); - } - else if (targetImageElementID) { - var images = []; - - $(this.options.imageSelector).each((function (_index, image) { - // If the target image is inside a signature, then only include images within - // the same signature. Otherwise this check will exclude images that are within - // a user's signature. - if (image.closest(".messageSignature") !== this._messageSignature) { - return; - } - - images.push(image); - }).bind(this)); - - var $i = 0; - images.forEach(function (image, index) { - if (image.id === targetImageElementID) { - $i = index; - } - }) - - var $item = this._ui.imageList.children('li:eq(' + $i + ')'); - - // check if currently active image does not exist anymore - if (this._active !== -1) { - var $clear = false; - if (this._active != $item.data('index')) { - $clear = true; - } - - if (this._ui.images[this._activeImage].prop('src') != this._images[this._active].image.url) { - $clear = true; - } - - if ($clear) { - // reset active state - this._active = -1; - } - } - - $item.trigger('click'); - this.moveToImage($item.data('index')); - } - else if ($thumbnail !== null) { - $thumbnail.trigger('click'); - } - - this._toggleButtons(); - - // check if there is enough space to load more thumbnails - this._preload(); - }, - - /** - * Attempts to load the next images. - */ - _preload: function() { - if (this._images.length < this._items) { - var $thumbnailsWidth = this._images.length * this._thumbnailWidth; - if ($thumbnailsWidth - this._thumbnailOffset < this._thumbnailContainerWidth) { - this._loadNextImages(false); - } - } - }, - - /** - * Displays image on thumbnail click. - * - * @param object event - */ - _showImage: function(event) { - this.showImage($(event.currentTarget).data('index'), true); - }, - - /** - * Displays an image by index. - * - * @param integer index - * @param boolean disableSlideshow - * @return boolean - */ - showImage: function(index, disableSlideshow) { - if (this._active == index) { - return false; - } - - this.stopSlideshow(disableSlideshow || false); - - // reset active marking - if (this._active != -1) { - this._images[this._active].listItem.removeClass('active'); - } - - this._active = index; - - // store latest image in history entry - window.history.replaceState({ - name: 'imageViewer', - container: this._eventNamespace, - image: this._active - }, '', ''); - - var $image = this._images[index]; - - this._ui.imageList.children('li').removeClass('active'); - $image.listItem.addClass('active'); - - var $dimensions = this._ui.imageContainer.getDimensions('inner'); - var $newImageIndex = (this._activeImage ? 0 : 1); - - if (this._activeImage !== null) { - this._ui.images[this._activeImage].removeClass('active'); - } - - this._activeImage = $newImageIndex; - var $currentActiveImage = this._active; - this._ui.imageContainer.addClass('loading'); - this._ui.images[$newImageIndex].off('load').prop('src', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=='); // 1x1 pixel transparent gif - this._ui.images[$newImageIndex].on('load', $.proxy(function() { - this._imageOnLoad($currentActiveImage, $newImageIndex); - }, this)); - - this._renderImage($newImageIndex, $image, $dimensions); - - // user - if (!this.options.staticViewer) { - var $link = this._ui.header.find('> div > a').prop('href', $image.user.link).prop('title', $image.user.username); - $link.children('img').prop('src', $image.user.avatarURL); - } - - // meta data - var $title = WCF.String.escapeHTML($image.image.title); - if ($image.image.link) $title = '' + $title + ''; - this._ui.header.find('h1').html($title); - - if (!this.options.staticViewer) { - var $seriesTitle = ($image.series && $image.series.title ? WCF.String.escapeHTML($image.series.title) : ''); - if ($image.series.link) $seriesTitle = '' + $seriesTitle + ''; - this._ui.header.find('h2').html($seriesTitle); - } - - this._ui.header.find('h3').text(WCF.Language.get('wcf.imageViewer.seriesIndex').replace(/{x}/, $image.listItem.data('index') + 1).replace(/{y}/, this._items)); - - this._ui.slideshow.full[0].querySelector('a').href = $image.image.fullURL ? $image.image.fullURL : $image.image.url; - - this.moveToImage($image.listItem.data('index')); - - this._toggleButtons(); - - return true; - }, - - /** - * Callback function for the image 'load' event. - * - * @param integer currentActiveImage - * @param integer activeImageIndex - */ - _imageOnLoad: function(currentActiveImage, activeImageIndex) { - // image did not load in time, ignore - if (currentActiveImage != this._active) { - return; - } - - this._ui.imageContainer.removeClass('loading'); - this._ui.images[activeImageIndex].addClass('active'); - - if (this.options.staticViewer) { - this._renderImage(activeImageIndex, null); - } - - this.startSlideshow(); - }, - - /** - * Renders target image, leaving 'imageData' undefined will invoke the rendering process for the currently active image. - * - * @param integer targetIndex - * @param object imageData - * @param object containerDimensions - */ - _renderImage: function(targetIndex, imageData, containerDimensions) { - var $checkForComplete = true; - if (!imageData) { - targetIndex = this._activeImage; - imageData = this._images[this._active]; - - containerDimensions = { - height: $(window).height() - (this._container.hasClass('maximized') || this._container.hasClass('wcfImageViewerMobile') ? 0 : 200), - width: this._ui.imageContainer.innerWidth() - }; - - $checkForComplete = false; - } - - // simulate padding - containerDimensions.height -= 22; - containerDimensions.width -= 20; - - var $image = this._ui.images[targetIndex]; - if ($image.prop('src') !== imageData.image.url) { - // assigning the same exact source again breaks Internet Explorer 10 - $image.prop('src', imageData.image.url); - } - - if ($checkForComplete && $image[0].complete) { - $image.trigger('load'); - } - - if (this.options.staticViewer && !imageData.image.height && $image[0].complete) { - // Firefox and Safari returns bogus values if attempting to read the real dimensions - if ($.browser.mozilla || $.browser.safari) { - var $img = new Image(); - $img.src = imageData.image.url; - - imageData.image.height = $img.height || $image[0].naturalHeight; - imageData.image.width = $img.width || $image[0].naturalWidth; - } - else { - $image.css({ - height: 'auto', - width: 'auto' - }); - - imageData.image.height = $image[0].height; - imageData.image.width = $image[0].width; - } - } - - var $height = imageData.image.height; - var $width = imageData.image.width; - var $ratio = 0.0; - - // check if image exceeds dimensions on the Y axis - if ($height > containerDimensions.height) { - $ratio = containerDimensions.height / $height; - $height = containerDimensions.height; - $width = Math.floor($width * $ratio); - } - - // check if image exceeds dimensions on the X axis - if ($width > containerDimensions.width) { - $ratio = containerDimensions.width / $width; - $width = containerDimensions.width; - $height = Math.floor($height * $ratio); - } - - var $left = Math.floor((containerDimensions.width - $width) / 2); - this._ui.images[targetIndex].css({ - height: $height + 'px', - left: ($left + 10) + 'px', - marginTop: (Math.round($height / 2) * -1) + 'px', - width: $width + 'px' - }); - }, - - /** - * Initializes the user interface. - * - * @return boolean - */ - _initUI: function() { - if (this._didInit) { - return false; - } - - this._didInit = true; - - this._container = $('
    ').appendTo(document.body); - var $imageContainer = $('
    ').appendTo(this._container); - var $imageList = $('
      ').appendTo(this._container); - var $slideshowContainer = $('
        ').appendTo($imageContainer); - var $slideshowButtonPrevious = $('
      • ').appendTo($slideshowContainer); - var $slideshowButtonToggle = $('
      • ').appendTo($slideshowContainer); - var $slideshowButtonNext = $('
      • ').appendTo($slideshowContainer); - var $slideshowButtonEnlarge = $('
      • ').appendTo($slideshowContainer); - var $slideshowButtonFull = $('
      • ').appendTo($slideshowContainer); - - this._ui = { - buttonNext: $imageList.children('span.wcfImageViewerButtonNext'), - buttonPrevious: $imageList.children('span.wcfImageViewerButtonPrevious'), - header: $('
        ' : ' class="box64">' ) + '

      ').appendTo(this._container), - imageContainer: $imageContainer, - images: [ - $imageContainer.children('img:eq(0)').on('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function() { $(this).removeClass('animateTransformation'); }), - $imageContainer.children('img:eq(1)').on('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function() { $(this).removeClass('animateTransformation'); }) - ], - imageList: $imageList.find('> div > ul'), - slideshow: { - container: $slideshowContainer, - enlarge: $slideshowButtonEnlarge, - full: $slideshowButtonFull, - next: $slideshowButtonNext, - previous: $slideshowButtonPrevious, - toggle: $slideshowButtonToggle - } - }; - - this._ui.buttonNext.click($.proxy(this._next, this)); - this._ui.buttonPrevious.click($.proxy(this._previous, this)); - - $slideshowButtonNext.click($.proxy(this._nextImage, this)); - $slideshowButtonPrevious.click($.proxy(this._previousImage, this)); - $slideshowButtonEnlarge.click($.proxy(this._toggleView, this)); - $slideshowButtonToggle.click($.proxy(function() { - if (this._items < 2) { - return; - } - - if (this._slideshowEnabled) { - this.stopSlideshow(true); - } - else { - this._disableSlideshow = false; - this.startSlideshow(); - } - }, this)); - - // close button - $(``).appendTo(this._ui.header).click($.proxy(this.close, this)); - - if (!$.browser.mobile) { - // clicking on the inner container should close the dialog, but it should not be available on mobile due to - // the lack of precision causing accidental closing, the close button is big enough and easily reachable - $imageContainer.click((function(event) { - if (event.target === $imageContainer[0]) { - this.close(); - } - }).bind(this)); - } - - WCF.DOMNodeInsertedHandler.execute(); - - require(['Ui/Screen'], function(UiScreen) { - UiScreen.on('screen-sm-down', { - match: $.proxy(this._enableMobileView, this), - unmatch: $.proxy(this._disableMobileView, this) - }); - }.bind(this)); - - return true; - }, - - /** - * Enables the mobile-optimized UI. - */ - _enableMobileView: function() { - this._container.addClass('wcfImageViewerMobile'); - - var self = this; - this._ui.imageContainer.swipe({ - swipeLeft: function(event) { - if (self._container.hasClass('maximized')) { - self._nextImage(event); - } - }, - swipeRight: function(event) { - if (self._container.hasClass('maximized')) { - self._previousImage(event); - } - }, - tap: function(event, element) { - // tap fires before click, prevent conflicts - switch (element.tagName) { - case 'DIV': - case 'IMG': - self._toggleView(); - break; - } - } - }); - - this._isMobile = true; - }, - - /** - * Disables the mobile-optimized UI. - */ - _disableMobileView: function() { - this._container.removeClass('wcfImageViewerMobile'); - this._ui.imageContainer.swipe('destroy'); - - this._isMobile = false; - }, - - /** - * Toggles between normal and fullscreen view. - */ - _toggleView: function() { - this._ui.images[this._activeImage].addClass('animateTransformation'); - this._container.toggleClass('maximized'); - this._ui.slideshow.enlarge.toggleClass('active'); - this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"); - - this._renderImage(null, undefined, null); - }, - - /** - * Shifts the thumbnail list. - * - * @param object event - * @param integer shiftBy - */ - _next: function(event, shiftBy) { - if (this._ui.buttonNext.hasClass('pointer')) { - if (shiftBy == undefined) { - this.stopSlideshow(true); - } - - var $maximumOffset = Math.max((this._items * this._thumbnailWidth) - this._thumbnailContainerWidth - this._thumbnailMarginRight, 0); - this._thumbnailOffset = Math.min(this._thumbnailOffset + (this._thumbnailWidth * (shiftBy ? shiftBy : this.options.shiftBy)), $maximumOffset); - this._ui.imageList.css('marginLeft', (this._thumbnailOffset * -1)); - } - - this._preload(); - - this._toggleButtons(); - }, - - /** - * Unshifts the thumbnail list. - * - * @param object event - * @param integer shiftBy - */ - _previous: function(event, unshiftBy) { - if (this._ui.buttonPrevious.hasClass('pointer')) { - if (unshiftBy == undefined) { - this.stopSlideshow(true); - } - - this._thumbnailOffset = Math.max(this._thumbnailOffset - (this._thumbnailWidth * (unshiftBy ? unshiftBy : this.options.shiftBy)), 0); - this._ui.imageList.css('marginLeft', (this._thumbnailOffset * -1)); - } - - this._toggleButtons(); - }, - - /** - * Displays the next image. - * - * @param object event - */ - _nextImage: function(event) { - if (this._ui.slideshow.next.hasClass('pointer')) { - this._disableSlideshow = true; - - this.stopSlideshow(true); - this.showImage(this._active + 1); - - if (event) { - event.preventDefault(); - event.stopPropagation(); - } - } - }, - - /** - * Displays the previous image. - * - * @param object event - */ - _previousImage: function(event) { - if (this._ui.slideshow.previous.hasClass('pointer')) { - this._disableSlideshow = true; - - this.stopSlideshow(true); - this.showImage(this._active - 1); - - if (event) { - event.preventDefault(); - event.stopPropagation(); - } - } - }, - - /** - * Moves thumbnail list to target thumbnail. - * - * @param integer seriesIndex - */ - moveToImage: function(seriesIndex) { - // calculate start and end of thumbnail - var $start = (seriesIndex - 3) * this._thumbnailWidth; - var $end = $start + (this._thumbnailWidth * 5); - - // calculate visible offsets - var $left = this._thumbnailOffset; - var $right = this._thumbnailOffset + this._thumbnailContainerWidth; - - // check if thumbnail is within boundaries - var $shouldMove = false; - if ($start < $left || $end > $right) { - $shouldMove = true; - } - - // try to shift until the thumbnail itself and the next/previous 2 thumbnails are visible - if ($shouldMove) { - var $shiftBy = 0; - - // unshift - if ($start < $left) { - while ($start < $left) { - $shiftBy++; - $left -= this._thumbnailWidth; - } - - this._previous(null, $shiftBy); - } - else { - // shift - while ($end > $right) { - $shiftBy++; - $right += this._thumbnailWidth; - } - - this._next(null, $shiftBy); - } - } - }, - - /** - * Toggles control buttons. - */ - _toggleButtons: function() { - // button 'previous' - if (this._thumbnailOffset > 0) { - this._ui.buttonPrevious.addClass('pointer'); - } - else { - this._ui.buttonPrevious.removeClass('pointer'); - } - - // button 'next' - var $maximumOffset = (this._images.length * this._thumbnailWidth) - this._thumbnailContainerWidth - this._thumbnailMarginRight; - if (this._thumbnailOffset >= $maximumOffset) { - this._ui.buttonNext.removeClass('pointer'); - } - else { - this._ui.buttonNext.addClass('pointer'); - } - - // slideshow controls - if (this._active > 0) { - this._ui.slideshow.previous.addClass('pointer'); - } - else { - this._ui.slideshow.previous.removeClass('pointer'); - } - - if (this._active + 1 < this._images.length) { - this._ui.slideshow.next.addClass('pointer'); - } - else { - this._ui.slideshow.next.removeClass('pointer'); - } - - if (this._items < 2) { - this._ui.slideshow.toggle.removeClass('pointer'); - } - else { - this._ui.slideshow.toggle.addClass('pointer'); - } - }, - - /** - * Inserts thumbnails. - * - * @param array images - */ - _createThumbnails: function(images) { - if (this.options.staticViewer) { - this._images = [ ]; - this._ui.imageList.empty(); - } - - for (var $i = 0, $length = images.length; $i < $length; $i++) { - var $image = images[$i]; - - var $listItem = $('
    • ').appendTo(this._ui.imageList); - $listItem.data('index', this._images.length).data('objectID', $image.objectID).click($.proxy(this._showImage, this)); - var $img = $listItem.children('img'); - if ($img.get(0).complete) { - // thumbnail is read from cache - $listItem.removeClass('loading'); - - // fix dimensions - if (this.options.staticViewer) { - this._fixThumbnailDimensions($img); - } - } - else { - var self = this; - $img.on('load', function() { - var $img = $(this); - $img.parent().removeClass('loading'); - - if (self.options.staticViewer) { - self._fixThumbnailDimensions($img); - } - }); - } - - $image.listItem = $listItem; - this._images.push($image); - } - }, - - /** - * Fixes thumbnail dimensions within static mode. - * - * @param jQuery image - */ - _fixThumbnailDimensions: function(image) { - var $image = new Image(); - $image.src = image.prop('src'); - - var $height = $image.height; - var $width = $image.width; - - // quadratic, scale to 80x80 - if ($height == $width) { - $height = $width = 80; - } - else if ($height < $width) { - // landscape, use width as reference - var $scale = 80 / $width; - $width = 80; - $height *= $scale; - } - else { - // portrait, use height as reference - var $scale = 80 / $height; - $height = 80; - $width *= $scale; - } - - image.css({ - height: $height + 'px', - width: $width + 'px' - }); - }, - - /** - * Loads the next images via AJAX. - * - * @param boolean init - */ - _loadNextImages: function(init) { - this._proxy.setOption('data', { - actionName: 'loadNextImages', - className: this.options.className, - interfaceName: 'wcf\\data\\IImageViewerAction', - objectIDs: [ this.element.data('objectID') ], - parameters: { - maximumHeight: this._maxDimensions.height, - maximumWidth: this._maxDimensions.width, - offset: this._images.length, - targetImageID: (init && this.element.data('targetImageID') ? this.element.data('targetImageID') : 0) - } - }); - this._proxy.setOption('showLoadingOverlay', false); - this._proxy.sendRequest(); - }, - - /** - * Builds the list of static images and returns it. - * - * @return array - */ - _getStaticImages: function() { - var $images = [ ]; - - $(this.options.imageSelector).each((function(index, link) { - // If the target image is inside a signature, then only include images within - // the same signature. Otherwise this check will exclude images that are within - // a user's signature. - if (link.closest(".messageSignature") !== this._messageSignature) { - return; - } - - var $link = $(link); - var $thumbnail = $link.find('> img, .attachmentThumbnailImage > img').first(); - if (!$thumbnail.length) { - $thumbnail = $link.parentsUntil('.formAttachmentList').last().find('.attachmentTinyThumbnail'); - } - - let thumbnailSrc = ''; - if ($thumbnail.length === 0) { - const attachmentItem = $link[0].closest(".attachment__item"); - if (attachmentItem !== null) { - const file = attachmentItem.querySelector("woltlab-core-file"); - const thumbnail = file?.thumbnails.find((x) => x.identifier === "tiny"); - thumbnailSrc = thumbnail.link; - } - } else { - thumbnailSrc = $thumbnail.prop("src"); - } - - - $images.push({ - image: { - fullURL: $thumbnail.data('source') ? $thumbnail.data('source').replace(/\\\//g, '/') : $link.prop('href'), - link: '', - title: $link.prop('title'), - url: $link.prop('href') - }, - series: null, - thumbnail: { - url: thumbnailSrc - }, - user: null - }); - }).bind(this)); - - this._items = $images.length; - - return $images; - }, - - /** - * Handles successful AJAX requests. - * - * @param object data - * @param string textStatus - * @param jQuery jqXHR - */ - _success: function(data, textStatus, jqXHR) { - if (data.returnValues.items) { - this._items = data.returnValues.items; - } - - var $initialized = this._initUI(); - - this._createThumbnails(data.returnValues.images); - - var $targetImageID = (data.returnValues.targetImageID ? data.returnValues.targetImageID : 0); - this._render($initialized, $targetImageID); - - if (!this._isOpen) { - this._isOpen = true; - - WCF.System.DisableScrolling.disable(); - WCF.System.DisableZoom.disable(); - } - } -}); From 8260782881733f866acd04a8764d319c640e1752 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 09:37:59 +0200 Subject: [PATCH 05/25] Load localization for fancybox --- .../Core/Component/Image/Viewer.ts | 22 +++++++++- .../files/js/3rdParty/fancybox/l10n/cs.esm.js | 1 - .../fancybox/l10n/{cs.umd.js => cs.js} | 0 .../files/js/3rdParty/fancybox/l10n/de.esm.js | 1 - .../fancybox/l10n/{de.umd.js => de.js} | 0 .../files/js/3rdParty/fancybox/l10n/en.esm.js | 1 - .../fancybox/l10n/{en.umd.js => en.js} | 0 .../files/js/3rdParty/fancybox/l10n/es.esm.js | 1 - .../fancybox/l10n/{es.umd.js => es.js} | 0 .../files/js/3rdParty/fancybox/l10n/fr.esm.js | 1 - .../fancybox/l10n/{fr.umd.js => fr.js} | 0 .../files/js/3rdParty/fancybox/l10n/it.esm.js | 1 - .../fancybox/l10n/{it.umd.js => it.js} | 0 .../files/js/3rdParty/fancybox/l10n/ja.esm.js | 1 - .../fancybox/l10n/{ja.umd.js => ja.js} | 0 .../files/js/3rdParty/fancybox/l10n/lv.esm.js | 1 - .../fancybox/l10n/{lv.umd.js => lv.js} | 0 .../files/js/3rdParty/fancybox/l10n/pl.esm.js | 1 - .../fancybox/l10n/{pl.umd.js => pl.js} | 0 .../files/js/3rdParty/fancybox/l10n/sk.esm.js | 1 - .../fancybox/l10n/{sk.umd.js => sk.js} | 0 .../js/3rdParty/fancybox/l10n/zh_CN.esm.js | 1 - .../js/3rdParty/fancybox/l10n/zh_CN.umd.js | 1 - .../Core/Component/Image/Viewer.js | 42 ++++++++++++++++++- wcfsetup/install/files/js/require.config.js | 6 ++- 25 files changed, 65 insertions(+), 17 deletions(-) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{cs.umd.js => cs.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{de.umd.js => de.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{en.umd.js => en.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{es.umd.js => es.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{fr.umd.js => fr.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{it.umd.js => it.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{ja.umd.js => ja.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{lv.umd.js => lv.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{pl.umd.js => pl.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js rename wcfsetup/install/files/js/3rdParty/fancybox/l10n/{sk.umd.js => sk.js} (100%) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index 96dee8b18aa..dbced788625 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -1,6 +1,24 @@ import { Fancybox } from "@fancyapps/ui"; +const LOCALS = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; + export function setup() { - Fancybox.bind("[data-fancybox]"); - Fancybox.bind('[data-fancybox="attachments"]'); + void getLocalization().then((l10n) => { + Fancybox.bind("[data-fancybox]", { + l10n: l10n, + }); + Fancybox.bind('[data-fancybox="attachments"]', { + l10n: l10n, + }); + }); +} + +export async function getLocalization(): Promise> { + let local = document.documentElement.lang; + + if (!LOCALS.includes(local)) { + local = "en"; + } + + return (await import(`@fancyapps/ui/l10n/${local}`))[local]; } diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js deleted file mode 100644 index 7ae7efc848d..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.esm.js +++ /dev/null @@ -1 +0,0 @@ -const o={PANUP:"Posunout nahoru",PANDOWN:"Posunout dolů",PANLEFT:"Posunout vlevo",PANRIGHT:"Posunout vpravo",ZOOMIN:"Přiblížit",ZOOMOUT:"Oddálit",TOGGLEZOOM:"Přepnout úroveň přiblížení",TOGGLE1TO1:"Přepnout úroveň přiblížení",ITERATEZOOM:"Přepnout úroveň přiblížení",ROTATECCW:"Otočit směrem vlevo",ROTATECW:"Otočit směrem vpravo",FLIPX:"Převrátit vodorovně",FLIPY:"Převrátit svisle",FITX:"Přizpůsobit na šířku",FITY:"Přizpůsobit na výšku",RESET:"Resetovat",TOGGLEFS:"Režim celé obrazovky",CLOSE:"Zavřít",NEXT:"Další",PREV:"Předchozí",MODAL:"Toto okno lze zavřít klávesou ESC",ERROR:"Někde se stala chyba, zkuste to prosím znovu",IMAGE_ERROR:"Obrázek nenalezen",ELEMENT_NOT_FOUND:"HTML element nenalezen",AJAX_NOT_FOUND:"Chyba AJAX načítání: Nenalezeno",AJAX_FORBIDDEN:"Chyba AJAX načítání: Zamítnuto",IFRAME_ERROR:"Chyba načítání stránky",TOGGLE_ZOOM:"Přepnout úroveň přiblížení",TOGGLE_THUMBS:"Zobrazit/skrýt miniatury",TOGGLE_SLIDESHOW:"Spustit/zastavit automatické přehrávání",TOGGLE_FULLSCREEN:"Režim celé obrazovky",DOWNLOAD:"Stáhnout"};export{o as cs}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/cs.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js deleted file mode 100644 index 47318a84e4a..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.esm.js +++ /dev/null @@ -1 +0,0 @@ -const e={PANUP:"Aufwärts bewegen",PANDOWN:"Nach unten bewegen",PANLEFT:"Nach links bewegen",PANRIGHT:"Nach rechts bewegen",ZOOMIN:"Vergrößern",ZOOMOUT:"Verkleinern",TOGGLEZOOM:"Zoomstufe umschalten",TOGGLE1TO1:"Zoomstufe umschalten",ITERATEZOOM:"Zoomstufe umschalten",ROTATECCW:"Gegen den Uhrzeigersinn drehen",ROTATECW:"Im Uhrzeigersinn drehen",FLIPX:"Horizontal spiegeln",FLIPY:"Vertikal spiegeln",FITX:"Horizontal einpassen",FITY:"Vertikal anpassen",RESET:"Zurücksetzen",TOGGLEFS:"Vollbild umschalten",CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",MODAL:"Sie können diesen modalen Inhalt mit der ESC-Taste schließen",ERROR:"Etwas ist schief gelaufen, bitte versuchen Sie es später noch einmal",IMAGE_ERROR:"Bild nicht gefunden",ELEMENT_NOT_FOUND:"HTML-Element nicht gefunden",AJAX_NOT_FOUND:"Fehler beim Laden von AJAX: Nicht gefunden",AJAX_FORBIDDEN:"Fehler beim Laden von AJAX: Verboten",IFRAME_ERROR:"Fehler beim Laden der Seite",TOGGLE_ZOOM:"Zoomstufe umschalten",TOGGLE_THUMBS:"Miniaturansichten umschalten",TOGGLE_SLIDESHOW:"Diashow wechseln",TOGGLE_FULLSCREEN:"Vollbildmodus umschalten",DOWNLOAD:"Herunterladen"};export{e as de}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/de.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js deleted file mode 100644 index 813f1cbe682..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.esm.js +++ /dev/null @@ -1 +0,0 @@ -const o=Object.assign(Object.assign({},{PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"}),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"});export{o as en}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/en.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js deleted file mode 100644 index 01857d07a72..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.esm.js +++ /dev/null @@ -1 +0,0 @@ -const a={PANUP:"Mover hacia arriba",PANDOWN:"Mover hacia abajo",PANLEFT:"Mover hacia la izquierda",PANRIGHT:"Mover hacia la derecha",ZOOMIN:"Mover a la derecha",ZOOMOUT:"Disminuir el zoom",TOGGLEZOOM:"Alternar nivel de zoom",TOGGLE1TO1:"Alternar nivel de zoom",ITERATEZOOM:"Alternar nivel de zoom",ROTATECCW:"Girar en sentido antihorario",ROTATECW:"Rotar las agujas del reloj",FLIPX:"Voltear horizontalmente",FLIPY:"Voltear verticalmente",FITX:"Ajustar horizontalmente",FITY:"Ajustar verticalmente",RESET:"Reiniciar",TOGGLEFS:"Alternar pantalla completa",CLOSE:"Cerrar",NEXT:"Siguiente",PREV:"Anterior",MODAL:"Puedes cerrar esta ventana con la tecla ESC",ERROR:"Algo salió mal, inténtalo de nuevo más tarde",IMAGE_ERROR:"Imagen no encontrada",ELEMENT_NOT_FOUND:"Elemento HTML no encontrado",AJAX_NOT_FOUND:"Error al cargar el AJAX : No encontrado",AJAX_FORBIDDEN:"Error al cargar el AJAX : Prohibido",IFRAME_ERROR:"Error al cargar la página",TOGGLE_ZOOM:"Cambiar el nivel de zoom",TOGGLE_THUMBS:"Cambiar a miniaturas",TOGGLE_SLIDESHOW:"Cambiar a modo presentación",TOGGLE_FULLSCREEN:"Cambiar a modo pantalla completa",DOWNLOAD:"Descargar"};export{a as es}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/es.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js deleted file mode 100644 index 4b342c8e3d2..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.esm.js +++ /dev/null @@ -1 +0,0 @@ -const e={PANUP:"Déplacer vers le haut",PANDOWN:"Déplacer vers le bas",PANLEFT:"Déplacer vers la gauche",PANRIGHT:"Déplacer vers la droite",ZOOMIN:"Zoom avant",ZOOMOUT:"Zoom arrière",TOGGLEZOOM:"Basculer le niveau de zoom",TOGGLE1TO1:"Basculer le niveau de zoom",ITERATEZOOM:"Basculer le niveau de zoom",ROTATECCW:"Tourner dans le sens antihoraire",ROTATECW:"Le sens des aiguilles d'une montre",FLIPX:"Retourner horizontalement",FLIPY:"Retourner verticalement",FITX:"Ajuster horizontalement",FITY:"Ajuster verticalement",RESET:"Réinitialiser",TOGGLEFS:"Basculer en plein écran",CLOSE:"Fermer",NEXT:"Suivant",PREV:"Précédent",MODAL:"Vous pouvez fermer ce contenu modal avec la touche ESC",ERROR:"Quelque chose s'est mal passé, veuillez réessayer plus tard",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"Élément HTML introuvable",AJAX_NOT_FOUND:"Erreur lors du chargement d'AJAX : introuvable",AJAX_FORBIDDEN:"Erreur lors du chargement d'AJAX : Interdit",IFRAME_ERROR:"Erreur lors du chargement de la page",TOGGLE_ZOOM:"Basculer le niveau de zoom",TOGGLE_THUMBS:"Basculer les vignettes",TOGGLE_SLIDESHOW:"Basculer le diaporama",TOGGLE_FULLSCREEN:"Basculer en mode plein écran",DOWNLOAD:"Télécharger"};export{e as fr}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/fr.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js deleted file mode 100644 index b196d649717..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.esm.js +++ /dev/null @@ -1 +0,0 @@ -const t={PANUP:"Sposta su",PANDOWN:"Sposta giù",PANLEFT:"Sposta a sinistra",PANRIGHT:"Sposta a destra",ZOOMIN:"Ingrandisci",ZOOMOUT:"Rimpicciolisci",TOGGLEZOOM:"Alterna il livello di zoom",TOGGLE1TO1:"Alterna il livello di zoom",ITERATEZOOM:"Attiva/disattiva livello di zoom",ROTATECCW:"Ruota in senso antiorario",ROTATECW:"Ruota in senso orario",FLIPX:"Capovolgi orizzontalmente",FLIPY:"Capovolgi verticalmente",FITX:"Adatta orizzontalmente",FITY:"Adatta verticalmente",RESET:"Reimposta",TOGGLEFS:"Attiva/disattiva schermo intero",CLOSE:"Chiudi",NEXT:"Successivo",PREV:"Precedente",MODAL:"Puoi chiudere questo contenuto modale con il tasto ESC",ERROR:"Qualcosa è andato storto, riprova più tardi",IMAGE_ERROR:"Immagine non trovata",ELEMENT_NOT_FOUND:"Elemento HTML non trovato",AJAX_NOT_FOUND:"Errore durante il caricamento di AJAX: Non trovato",AJAX_FORBIDDEN:"Errore durante il caricamento di AJAX: Vietato",IFRAME_ERROR:"Errore durante il caricamento della pagina",TOGGLE_ZOOM:"Attiva/disattiva livello di zoom",TOGGLE_THUMBS:"Attiva/disattiva miniature",TOGGLE_SLIDESHOW:"Attiva/disattiva presentazione",TOGGLE_FULLSCREEN:"Attiva/disattiva modalità a schermo intero",DOWNLOAD:"Scarica"};export{t as it}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/it.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js deleted file mode 100644 index d3fb0a54960..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.esm.js +++ /dev/null @@ -1 +0,0 @@ -const O={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};export{O as ja}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js deleted file mode 100644 index aebc38a0fdf..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.esm.js +++ /dev/null @@ -1 +0,0 @@ -const t={PANUP:"Bīdīt uz augšu",PANDOWN:"Bīdīt uz leju",PANLEFT:"Bīdīt pa kreisi",PANRIGHT:"Bīdīt pa labi",ZOOMIN:"Pietuvināt",ZOOMOUT:"Attālināt",TOGGLEZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE1TO1:"Pārslēgt tālummaiņas līmeni",ITERATEZOOM:"Pārslēgt tālummaiņas līmeni",ROTATECCW:"Pagrieziet pretēji pulksteņrādītāja virzienam",ROTATECW:"Pagrieziet pulksteņrādītāja virzienā",FLIPX:"Apgriezt horizontāli",FLIPY:"Apgriezt vertikāli",FITX:"Ietilpināt horizontāli",FITY:"Ietilpināt vertikāli",RESET:"Atiestatīt",TOGGLEFS:"Pārslēgt pilnekrāna režīmu",CLOSE:"Aizvērt",NEXT:"Nākošais",PREV:"Iepriekšējais",MODAL:"Šo modālo saturu var aizvērt ar ESC taustiņu",ERROR:"Kaut kas nogāja greizi. Lūdzu, vēlāk mēģiniet vēlreiz",IMAGE_ERROR:"Attēls nav atrasts",ELEMENT_NOT_FOUND:"HTML elements nav atrasts",AJAX_NOT_FOUND:"Ielādējot AJAX, radās kļūda: Nav atrasts",AJAX_FORBIDDEN:"Ielādējot AJAX, radās kļūda: Aizliegts",IFRAME_ERROR:"Ielādējot lapu, radās kļūda",TOGGLE_ZOOM:"Pārslēgt tālummaiņas līmeni",TOGGLE_THUMBS:"Pārslēgt sīktēlus",TOGGLE_SLIDESHOW:"Pārslēgt slaidrādi",TOGGLE_FULLSCREEN:"Pārslēgt pilnekrāna režīmu",DOWNLOAD:"Lejupielādēt"};export{t as lv}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/lv.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js deleted file mode 100644 index de336eb218a..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.esm.js +++ /dev/null @@ -1 +0,0 @@ -const o={PANUP:"Przesuń w górę",PANDOWN:"Przesuń w dół",PANLEFT:"Przesuń w lewo",PANRIGHT:"Przesuń w prawo",ZOOMIN:"Zbliż",ZOOMOUT:"Oddal",TOGGLEZOOM:"Zbliż/oddal",TOGGLE1TO1:"Zmieść/skala 1:1",ITERATEZOOM:"Zbliż/oddal",ROTATECCW:"Obróć w lewo",ROTATECW:"Obróć w prawo",FLIPX:"Obróć w poziomie",FLIPY:"Obróć w pionie",FITX:"Dopasuj do szerokości ekranu",FITY:"Dopasuj do wysokości ekranu",RESET:"Resetuj",TOGGLEFS:"Włącz/wyłącz tryb pełnego ekranu",CLOSE:"Zamknij",NEXT:"Dalej",PREV:"Wstecz",MODAL:"Wciśnij ESC, by zamknąć",ERROR:"Coś poszło nie tak. Spróbuj ponownie później",IMAGE_ERROR:"Wczytywanie obrazu nie powiodło się",ELEMENT_NOT_FOUND:"Element HTML nie został odnaleziony",AJAX_NOT_FOUND:"Żądanie AJAX nie powiodło się: brak właściwego zasobu",AJAX_FORBIDDEN:"Żądanie AJAX nie powiodło się: braku dostępu",IFRAME_ERROR:"Nie udało się załadować poprawnie tej strony",TOGGLE_ZOOM:"Zbliż/oddal",TOGGLE_THUMBS:"Wyświetl/ukryj miniatury",TOGGLE_SLIDESHOW:"Włącz/wyłącz pokaz slajdów",TOGGLE_FULLSCREEN:"Włącz/wyłącz tryb pełnego ekranu",DOWNLOAD:"Pobierz"};export{o as pl}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/pl.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js deleted file mode 100644 index e524f932bf0..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.esm.js +++ /dev/null @@ -1 +0,0 @@ -const a={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky",CLOSE:"Zavrieť",NEXT:"Ďalší",PREV:"Predchádzajúci",MODAL:"Môžete zavrieť toto okno klávesou ESC",ERROR:"Nastala chyba. Skúste to, prosím, znovu",IMAGE_ERROR:"Obrázok sa nenašiel",ELEMENT_NOT_FOUND:"HTML element sa nenašiel",AJAX_NOT_FOUND:"Chyba načítania: nenájdené",AJAX_FORBIDDEN:"Chyba načítania: zamietnuté",IFRAME_ERROR:"Chyba načítania stránky",TOGGLE_ZOOM:"Prepnúť úroveň priblíženia",TOGGLE_THUMBS:"Zobraziť/skryť miniatúry",TOGGLE_SLIDESHOW:"Spustiť/zastaviť automatické prehrávanie",TOGGLE_FULLSCREEN:"Režim celej obrazovky",DOWNLOAD:"Stiahnuť"};export{a as sk}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.js similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.umd.js rename to wcfsetup/install/files/js/3rdParty/fancybox/l10n/sk.js diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js deleted file mode 100644 index 878640c8e74..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.esm.js +++ /dev/null @@ -1 +0,0 @@ -const O={PANUP:"上移",PANDOWN:"下移",PANLEFT:"左移",PANRIGHT:"右移",ZOOMIN:"放大",ZOOMOUT:"缩小",TOGGLEZOOM:"切换缩放级别",TOGGLE1TO1:"切换缩放级别",ITERATEZOOM:"切换缩放级别",ROTATECCW:"逆时针旋转",ROTATECW:"顺时针旋转",FLIPX:"水平翻转",FLIPY:"垂直翻转",FITX:"水平适应",FITY:"垂直适应",RESET:"重置",TOGGLEFS:"切换全屏",CLOSE:"关闭",NEXT:"上一个",PREV:"下一个",MODAL:"使用 ESC 键关闭",ERROR:"发生了错误,请稍后再试",IMAGE_ERROR:"找不到图像",ELEMENT_NOT_FOUND:"找不到 HTML 元素",AJAX_NOT_FOUND:"载入 AJAX 时出错: 未找到",AJAX_FORBIDDEN:"载入 AJAX 时出错: 被阻止",IFRAME_ERROR:"加载页面出错",TOGGLE_ZOOM:"切换缩放级别",TOGGLE_THUMBS:"切换缩略图",TOGGLE_SLIDESHOW:"切换幻灯片",TOGGLE_FULLSCREEN:"切换全屏",DOWNLOAD:"下载"};export{O as zh_CN}; diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js deleted file mode 100644 index b4a76adb0a2..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/zh_CN.umd.js +++ /dev/null @@ -1 +0,0 @@ -!function(O,E){"object"==typeof exports&&"undefined"!=typeof module?E(exports):"function"==typeof define&&define.amd?define(["exports"],E):E(((O="undefined"!=typeof globalThis?globalThis:O||self).Fancybox=O.Fancybox||{},O.Fancybox.l10n=O.Fancybox.l10n||{}))}(this,(function(O){"use strict";const E={PANUP:"上移",PANDOWN:"下移",PANLEFT:"左移",PANRIGHT:"右移",ZOOMIN:"放大",ZOOMOUT:"缩小",TOGGLEZOOM:"切换缩放级别",TOGGLE1TO1:"切换缩放级别",ITERATEZOOM:"切换缩放级别",ROTATECCW:"逆时针旋转",ROTATECW:"顺时针旋转",FLIPX:"水平翻转",FLIPY:"垂直翻转",FITX:"水平适应",FITY:"垂直适应",RESET:"重置",TOGGLEFS:"切换全屏",CLOSE:"关闭",NEXT:"上一个",PREV:"下一个",MODAL:"使用 ESC 键关闭",ERROR:"发生了错误,请稍后再试",IMAGE_ERROR:"找不到图像",ELEMENT_NOT_FOUND:"找不到 HTML 元素",AJAX_NOT_FOUND:"载入 AJAX 时出错: 未找到",AJAX_FORBIDDEN:"载入 AJAX 时出错: 被阻止",IFRAME_ERROR:"加载页面出错",TOGGLE_ZOOM:"切换缩放级别",TOGGLE_THUMBS:"切换缩略图",TOGGLE_SLIDESHOW:"切换幻灯片",TOGGLE_FULLSCREEN:"切换全屏",DOWNLOAD:"下载"};O.zh_CN=E})); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index fdc9f9f2d46..8a07541f794 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -1,9 +1,47 @@ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; + exports.getLocalization = getLocalization; + const LOCALS = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; function setup() { - ui_1.Fancybox.bind("[data-fancybox]"); - ui_1.Fancybox.bind('[data-fancybox="attachments"]'); + void getLocalization().then((l10n) => { + ui_1.Fancybox.bind("[data-fancybox]", { + l10n: l10n, + }); + ui_1.Fancybox.bind('[data-fancybox="attachments"]', { + l10n: l10n, + }); + }); + } + async function getLocalization() { + let local = document.documentElement.lang; + if (!LOCALS.includes(local)) { + local = "en"; + } + return (await new Promise((resolve_1, reject_1) => { require([`@fancyapps/ui/l10n/${local}`], resolve_1, reject_1); }).then(__importStar))[local]; } }); diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index db3acc9f619..1a4032c5b08 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -17,7 +17,6 @@ requirejs.config({ "@woltlab/editor": "3rdParty/ckeditor/ckeditor5.bundle", "ckeditor5-translation": "3rdParty/ckeditor/translations", "diff-match-patch": "3rdParty/diff-match-patch/diff_match_patch.min", - "@fancyapps/ui": "3rdParty/fancybox/fancybox.umd", }, packages: [ { @@ -30,6 +29,11 @@ requirejs.config({ location: "3rdParty/visual-dom-diff", main: "index", }, + { + name: "@fancyapps/ui", + location: "3rdParty/fancybox", + main: "fancybox.umd", + }, ], shim: { "perfect-scrollbar": { exports: "PerfectScrollbar" }, From 030f0a11f5bf35a1e2f4740b0f91cc6d033a2c3b Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 09:54:47 +0200 Subject: [PATCH 06/25] Move template `imageViewer` to shared templates --- com.woltlab.wcf/acpTemplateDelete.xml | 1 + com.woltlab.wcf/fileDelete.xml | 1 + com.woltlab.wcf/templateDelete.xml | 1 + com.woltlab.wcf/templates/imageViewer.tpl | 35 ------------------- .../templates/shared_imageViewer.tpl | 18 ++++++++++ extra/migrate-shared-template.php | 1 + .../files/acp/templates/attachmentList.tpl | 3 +- .../files/acp/templates/imageViewer.tpl | 21 ----------- .../install/files/acp/templates/styleAdd.tpl | 2 ++ .../system/template/TemplateEngine.class.php | 1 + 10 files changed, 27 insertions(+), 57 deletions(-) delete mode 100644 com.woltlab.wcf/templates/imageViewer.tpl create mode 100644 com.woltlab.wcf/templates/shared_imageViewer.tpl delete mode 100644 wcfsetup/install/files/acp/templates/imageViewer.tpl diff --git a/com.woltlab.wcf/acpTemplateDelete.xml b/com.woltlab.wcf/acpTemplateDelete.xml index 5552c719d55..f3bc3dd87c5 100644 --- a/com.woltlab.wcf/acpTemplateDelete.xml +++ b/com.woltlab.wcf/acpTemplateDelete.xml @@ -154,5 +154,6 @@ + diff --git a/com.woltlab.wcf/fileDelete.xml b/com.woltlab.wcf/fileDelete.xml index 37f95956d53..faaea3e50d5 100644 --- a/com.woltlab.wcf/fileDelete.xml +++ b/com.woltlab.wcf/fileDelete.xml @@ -1291,6 +1291,7 @@ js/WCF.Comment.min.js js/WCF.Core.min.js js/WCF.ImageViewer.min.js + js/WCF.ImageViewer.js js/WCF.Label.min.js js/WCF.Like.js js/WCF.Like.min.js diff --git a/com.woltlab.wcf/templateDelete.xml b/com.woltlab.wcf/templateDelete.xml index 054f501b384..b173661dd97 100644 --- a/com.woltlab.wcf/templateDelete.xml +++ b/com.woltlab.wcf/templateDelete.xml @@ -116,5 +116,6 @@ + diff --git a/com.woltlab.wcf/templates/imageViewer.tpl b/com.woltlab.wcf/templates/imageViewer.tpl deleted file mode 100644 index bee33709721..00000000000 --- a/com.woltlab.wcf/templates/imageViewer.tpl +++ /dev/null @@ -1,35 +0,0 @@ -{if !$__imageViewerLoaded|isset} -{**} - - - {assign var=__imageViewerLoaded value=true} -{/if} diff --git a/com.woltlab.wcf/templates/shared_imageViewer.tpl b/com.woltlab.wcf/templates/shared_imageViewer.tpl new file mode 100644 index 00000000000..1572e1320e7 --- /dev/null +++ b/com.woltlab.wcf/templates/shared_imageViewer.tpl @@ -0,0 +1,18 @@ +{if !$__imageViewerLoaded|isset} + + + {assign var=__imageViewerLoaded value=true} +{/if} diff --git a/extra/migrate-shared-template.php b/extra/migrate-shared-template.php index 6cb51f22a96..db9bb69cc6a 100644 --- a/extra/migrate-shared-template.php +++ b/extra/migrate-shared-template.php @@ -129,6 +129,7 @@ 'articleBBCodeTag' => 'shared_bbcode_wsa', '__multiPageCondition' => 'shared_multiPageCondition', '__multilineItemListFormField' => 'shared_multilineItemListFormField', + 'imageViewer' => 'shared_imageViewer', ]; if ($argc !== 2) { echo "ERROR: Expected a single argument to the directory that should be used to recursively replace template includes.\n"; diff --git a/wcfsetup/install/files/acp/templates/attachmentList.tpl b/wcfsetup/install/files/acp/templates/attachmentList.tpl index 11067f8115f..6c846d77188 100644 --- a/wcfsetup/install/files/acp/templates/attachmentList.tpl +++ b/wcfsetup/install/files/acp/templates/attachmentList.tpl @@ -1,5 +1,6 @@ {include file='header' pageTitle='wcf.acp.attachment.list'} +{include file='shared_imageViewer'} - - {assign var=__imageViewerLoaded value=true} -{/if} diff --git a/wcfsetup/install/files/acp/templates/styleAdd.tpl b/wcfsetup/install/files/acp/templates/styleAdd.tpl index d29e7fa11d3..aa484420b71 100644 --- a/wcfsetup/install/files/acp/templates/styleAdd.tpl +++ b/wcfsetup/install/files/acp/templates/styleAdd.tpl @@ -31,6 +31,8 @@ }); +{include file='shared_imageViewer'} +

      {lang}wcf.acp.style.{$action}{/lang}

      diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 5bd0e44b0bc..b3c4cfbf270 100755 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -137,6 +137,7 @@ class TemplateEngine extends SingletonFactory 'articleBBCodeTag' => 'shared_bbcode_wsa', '__multiPageCondition' => 'shared_multiPageCondition', '__multilineItemListFormField' => 'shared_multilineItemListFormField', + 'imageViewer' => 'shared_imageViewer', ]; /** From c3729a4920ac191bb67d20210c7451dee6718c58 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 09:59:31 +0200 Subject: [PATCH 07/25] Move ImageViewer setup to global Boostrap script --- ts/WoltLabSuite/Core/Bootstrap.ts | 4 ++++ ts/WoltLabSuite/Core/BootstrapFrontend.ts | 3 --- wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js | 3 +++ .../install/files/js/WoltLabSuite/Core/BootstrapFrontend.js | 4 +--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ts/WoltLabSuite/Core/Bootstrap.ts b/ts/WoltLabSuite/Core/Bootstrap.ts index 3305619a490..c7786d6650f 100644 --- a/ts/WoltLabSuite/Core/Bootstrap.ts +++ b/ts/WoltLabSuite/Core/Bootstrap.ts @@ -176,6 +176,10 @@ export function setup(options: BoostrapOptions): void { void import("./Component/File/Upload").then(({ setup }) => setup()); }); + whenFirstSeen("[data-fancybox]", () => { + void import("./Component/Image/Viewer").then(({ setup }) => setup()); + }); + // Move the reCAPTCHA widget overlay to the `pageOverlayContainer` // when widget form elements are placed in a dialog. const observer = new MutationObserver((mutations) => { diff --git a/ts/WoltLabSuite/Core/BootstrapFrontend.ts b/ts/WoltLabSuite/Core/BootstrapFrontend.ts index a10ffc97ee2..be6881d2a14 100644 --- a/ts/WoltLabSuite/Core/BootstrapFrontend.ts +++ b/ts/WoltLabSuite/Core/BootstrapFrontend.ts @@ -19,7 +19,6 @@ import UiPageMenuMainFrontend from "./Ui/Page/Menu/Main/Frontend"; import { whenFirstSeen } from "./LazyLoader"; import { prepareRequest } from "./Ajax/Backend"; import { setup as serviceWorkerSetup } from "./Notification/ServiceWorker"; -import * as ImageViewer from "./Component/Image/Viewer"; interface BootstrapOptions { backgroundQueue: { @@ -119,8 +118,6 @@ export function setup(options: BootstrapOptions): void { } } - ImageViewer.setup(); - whenFirstSeen("woltlab-core-reaction-summary", () => { void import("./Ui/Reaction/SummaryDetails").then(({ setup }) => setup()); }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js index ba169b79e83..77b0920da25 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js @@ -140,6 +140,9 @@ define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Devtools", void new Promise((resolve_7, reject_7) => { require(["./Component/File/woltlab-core-file"], resolve_7, reject_7); }).then(tslib_1.__importStar); void new Promise((resolve_8, reject_8) => { require(["./Component/File/Upload"], resolve_8, reject_8); }).then(tslib_1.__importStar).then(({ setup }) => setup()); }); + (0, LazyLoader_1.whenFirstSeen)("[data-fancybox]", () => { + void new Promise((resolve_9, reject_9) => { require(["./Component/Image/Viewer"], resolve_9, reject_9); }).then(tslib_1.__importStar).then(({ setup }) => setup()); + }); // Move the reCAPTCHA widget overlay to the `pageOverlayContainer` // when widget form elements are placed in a dialog. const observer = new MutationObserver((mutations) => { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js index 8e7d955df14..2ec14797d0b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js @@ -5,7 +5,7 @@ * @copyright 2001-2019 WoltLab GmbH * @license GNU Lesser General Public License */ -define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui/User/Ignore", "./Ui/Page/Header/Menu", "./Ui/Message/UserConsent", "./Ui/Message/Share/Dialog", "./Ui/Message/Share/Providers", "./Ui/Feed/Dialog", "./User", "./Ui/Page/Menu/Main/Frontend", "./LazyLoader", "./Ajax/Backend", "./Notification/ServiceWorker", "./Component/Image/Viewer"], function (require, exports, tslib_1, BackgroundQueue, Bootstrap, UiUserIgnore, UiPageHeaderMenu, UiMessageUserConsent, UiMessageShareDialog, Providers_1, UiFeedDialog, User_1, Frontend_1, LazyLoader_1, Backend_1, ServiceWorker_1, ImageViewer) { +define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui/User/Ignore", "./Ui/Page/Header/Menu", "./Ui/Message/UserConsent", "./Ui/Message/Share/Dialog", "./Ui/Message/Share/Providers", "./Ui/Feed/Dialog", "./User", "./Ui/Page/Menu/Main/Frontend", "./LazyLoader", "./Ajax/Backend", "./Notification/ServiceWorker"], function (require, exports, tslib_1, BackgroundQueue, Bootstrap, UiUserIgnore, UiPageHeaderMenu, UiMessageUserConsent, UiMessageShareDialog, Providers_1, UiFeedDialog, User_1, Frontend_1, LazyLoader_1, Backend_1, ServiceWorker_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; @@ -18,7 +18,6 @@ define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui UiFeedDialog = tslib_1.__importStar(UiFeedDialog); User_1 = tslib_1.__importDefault(User_1); Frontend_1 = tslib_1.__importDefault(Frontend_1); - ImageViewer = tslib_1.__importStar(ImageViewer); /** * Initializes user profile popover. */ @@ -82,7 +81,6 @@ define(["require", "exports", "tslib", "./BackgroundQueue", "./Bootstrap", "./Ui (0, ServiceWorker_1.setup)(options.serviceWorker.publicKey, options.serviceWorker.serviceWorkerJsUrl, options.serviceWorker.registerUrl); } } - ImageViewer.setup(); (0, LazyLoader_1.whenFirstSeen)("woltlab-core-reaction-summary", () => { void new Promise((resolve_3, reject_3) => { require(["./Ui/Reaction/SummaryDetails"], resolve_3, reject_3); }).then(tslib_1.__importStar).then(({ setup }) => setup()); }); From d212c404d229c0827e6951ad808a787b8de63da0 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 10:00:05 +0200 Subject: [PATCH 08/25] Remove unused `imageViewer.scss` --- .../install/files/style/ui/imageViewer.scss | 434 ------------------ 1 file changed, 434 deletions(-) delete mode 100644 wcfsetup/install/files/style/ui/imageViewer.scss diff --git a/wcfsetup/install/files/style/ui/imageViewer.scss b/wcfsetup/install/files/style/ui/imageViewer.scss deleted file mode 100644 index a42a989e4a4..00000000000 --- a/wcfsetup/install/files/style/ui/imageViewer.scss +++ /dev/null @@ -1,434 +0,0 @@ -/* ImageViewer for WCF */ -.wcfImageViewer { - --wcfImageViewerBorderColor: rgba(51, 51, 51, 1); - --wcfImageViewerBorderColor-rgb: 51 51 51; - --wcfImageViewerFontColor: rgba(211, 211, 211, 1); - - background-color: rgba(0, 0, 0, 1); - bottom: 0; - display: none; - left: 0; - opacity: 0; - position: fixed; - right: 0; - top: 0; - z-index: 399; - - fa-icon { - color: rgb(158, 158, 158); - } - - &.open { - display: block; - opacity: 1; - } - - &.maximized:not(.wcfImageViewerMobile) { - > header { - top: -100px; - } - - > div { - bottom: 0; - border-color: rgba(var(--wcfImageViewerBorderColor-rgb) / 0); - top: 0; - } - - > footer { - bottom: -100px; - } - } - - &.wcfImageViewerMobile { - > header, - > footer { - background-color: rgba(0, 0, 0, 1); - opacity: 1; - position: absolute; - visibility: visible; - z-index: 402; - } - - &.maximized { - > header, - > footer { - opacity: 0; - visibility: hidden; - - transition: - visibility 0s linear 0.24s, - opacity 0.24s linear; - } - - > div > ul > li.pointer { - opacity: 0; - } - } - - > div { - bottom: 0; - top: 0; - - > ul { - > li { - background-color: rgba(224, 224, 224, 1); - border-radius: 30px; - display: block; - margin-top: -24px; - opacity: 0; - position: absolute; - top: 50%; - transition: opacity 0.24s; - - &.pointer { - opacity: 1; - } - - &.wcfImageViewerSlideshowButtonFull, - &.wcfImageViewerSlideshowButtonNext, - &.wcfImageViewerSlideshowButtonPrevious { - /* places buttons above images at all times */ - z-index: 30; - } - - &.wcfImageViewerSlideshowButtonPrevious { - left: 10px; - - > span { - left: -3px; - position: relative; - top: 2px; - } - } - - &.wcfImageViewerSlideshowButtonNext { - right: 10px; - - > span { - position: relative; - right: -1px; - top: 2px; - } - } - - &.wcfImageViewerSlideshowButtonFull { - bottom: 80px; - left: 50%; - top: auto; - transform: translateX(-50%); - - > span { - font-size: 32px; - left: 2px; - position: relative; - top: 3px; - } - } - - &.wcfImageViewerSlideshowButtonToggle, - &.wcfImageViewerSlideshowButtonEnlarge { - display: none; - } - } - } - } - - > footer { - > .wcfImageViewerButtonPrevious, - > .wcfImageViewerButtonNext { - display: none; - } - - > div { - margin: 0; - } - } - } - - > header, - > div, - > footer { - -moz-box-sizing: border-box; - box-sizing: border-box; - left: 0; - position: fixed; - right: 0; - z-index: 400; - } - - > header { - height: 100px; - overflow: hidden; - padding: 1rem; - top: 0; - - > div { - > a > img { - height: 64px; - width: 64px; - } - } - - h1, - h2, - h3 { - color: var(--wcfImageViewerFontColor); - - > a { - color: var(--wcfImageViewerFontColor); - } - } - - h1 { - font-size: 1.75rem; - max-width: calc(100% - 70px); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - h2 { - font-size: 1.25rem; - } - - h3 { - color: var(--wcfImageViewerFontColor); - font-size: 0.85rem; - margin-top: 0.25rem; - } - - > .wcfImageViewerButtonClose { - position: absolute; - right: 26px; - top: 26px; - } - } - - > div { - background-color: rgba(0, 0, 0, 1); - border-bottom: 1px solid var(--wcfImageViewerBorderColor); - border-top: 1px solid var(--wcfImageViewerBorderColor); - bottom: 100px; - top: 100px; - transition-property: top, bottom, border-color; - transition-timing-function: linear; - transition-duration: 0.24s; - z-index: 401; - - &.loading:before { - /* - TODO: Migrate this or replace the image viewer. - @extend .icon48; - @extend .fa-spinner; - */ - - content: "" !important; - display: block; - left: calc(50% - 34px); - position: absolute; - top: calc(50% - 34px); - } - - > img { - opacity: 0; - position: absolute; - top: 50%; - transition: opacity 0.24s linear; - z-index: 10; - - &.animateTransformation { - transition: - left 0.24s, - margin-top 0.24s, - height 0.24s, - width 0.24s, - opacity 0.24s; - } - - &.active { - opacity: 1; - z-index: 20; - } - } - } - - &:not(.wcfImageViewerMobile) { - .pointer:hover fa-icon, - .wcfImageViewerButtonClose:hover fa-icon { - color: rgb(255, 255, 255); - } - - > header { - transition: top 0.24s linear; - } - - > footer { - transition: bottom 0.24s linear; - } - - > div { - cursor: pointer; - - > img, - > ul { - cursor: default; - } - - > ul { - background-color: rgba(0, 0, 0, 0.9); - border: 1px solid var(--wcfImageViewerBorderColor); - border-bottom-width: 0; - border-radius: 2px 2px 0 0; - display: flex; - bottom: 0; - left: 50%; - position: absolute; - transform: translateX(-50%); - z-index: 30; - - > li { - display: flex; - flex: 0 0 auto; - padding: 5px; - - &:not(.pointer) fa-icon { - color: rgb(66, 66, 66) !important; - } - - &.wcfImageViewerSlideshowButtonEnlarge, - &.wcfImageViewerSlideshowButtonFull { - border-left: 1px solid var(--wcfImageViewerBorderColor); - box-sizing: border-box; - } - } - } - } - } - - > footer { - bottom: 0; - height: 100px; - padding: 10px; - - &:hover > div > ul > li > img { - -webkit-filter: none; - filter: none; - } - - > span { - bottom: 0; - font-size: 48px; - padding-top: 26px; - opacity: 0; - position: absolute; - top: 0; - transition: opacity 0.24s; - width: 30px; - z-index: 2; - - &.pointer { - opacity: 0.6; - - &:hover { - opacity: 1; - } - } - - &.wcfImageViewerButtonPrevious { - left: 5px; - } - - &.wcfImageViewerButtonNext { - right: 5px; - } - } - - > div { - height: 80px; - margin: 0 35px; - overflow: hidden; - white-space: nowrap; - - > ul { - display: flex; - font-size: 0; - height: 80px; - z-index: 1; - - transition: margin-left cubic-bezier(0.5, 1.595, 0.56, 0.98) 0.24s; - - > li { - align-items: center; - display: flex; - flex: 0 0 80px; - opacity: 0.6; - position: relative; - transition: opacity 0.24s; - - &.active, - &:hover { - opacity: 1; - } - - &:not(:last-child) { - margin-right: 10px; - } - - &.active > img { - -webkit-filter: none; - filter: none; - } - - &.loading { - &:before { - /* - TODO: Migrate this or replace the image viewer. - @extend .icon48; - @extend .fa-spinner; - */ - } - - > img { - opacity: 0; - } - } - - > img { - max-height: 80px; - max-width: 80px; - object-fit: contain; - } - } - } - } - } -} - -@media only screen and (max-width: 800px) { - .wcfImageViewer { - > header { - height: 80px; - - > .wcfImageViewerButtonClose { - right: 16px; - top: 16px; - } - } - - > footer { - height: 80px; - - > div { - height: 60px; - - > ul { - height: 60px; - - > li { - height: 60px; - } - } - } - } - } -} From 298bc55f89f81f3eb68c12f5c89e0eb7c6ae75dc Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 10:00:56 +0200 Subject: [PATCH 09/25] Move `fancybox.css` to the correct style folder --- .../install/files/{js/3rdParty/fancybox => style}/fancybox.css | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename wcfsetup/install/files/{js/3rdParty/fancybox => style}/fancybox.css (100%) diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css b/wcfsetup/install/files/style/fancybox.css similarity index 100% rename from wcfsetup/install/files/js/3rdParty/fancybox/fancybox.css rename to wcfsetup/install/files/style/fancybox.css From b974bb5184de831b03b3472be94b15d0d3d9c213 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 10:08:42 +0200 Subject: [PATCH 10/25] Remove using of `jsImageViewer` class and set `data-fancybox` --- com.woltlab.wcf/templates/shared_bbcode_wsm.tpl | 2 +- com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl | 2 +- ts/WoltLabSuite/Core/Component/Attachment/Entry.ts | 2 +- .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 2 +- ts/WoltLabSuite/Core/Ui/File/Upload.ts | 2 +- .../files/js/WoltLabSuite/Core/Component/Attachment/Entry.js | 2 +- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 2 +- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl index b53650955ad..89da936e06c 100644 --- a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl +++ b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl @@ -4,7 +4,7 @@ {if $media->isImage} {if $thumbnailSize != 'original'} {if !$removeLinks} - + {/if} {$media->altText} {if !$removeLinks} diff --git a/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl b/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl index 59db9e3fc47..82051998549 100644 --- a/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl +++ b/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl @@ -13,7 +13,7 @@ {foreach from=$uploadFieldFiles item=file}
    • {if $file->isImage()} - + {else} diff --git a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts index 144caf80780..afb4eb36eaf 100644 --- a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts +++ b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts @@ -59,7 +59,7 @@ function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFile if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link!; - link.classList.add("jsImageViewer"); + link.dataset.fancybox = "attachments"; link.title = file.filename; link.textContent = file.filename; diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts index fef5939cb0a..10fe391c012 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -263,7 +263,7 @@ export class FileProcessor { filenameLink.href = element.link; filenameLink.title = element.filename; filenameLink.textContent = element.filename; - filenameLink.classList.add("jsImageViewer"); + filenameLink.dataset.fancybox = ""; // Insert a hidden image element that will be used by the image viewer as the preview image const previewImage = document.createElement("img"); diff --git a/ts/WoltLabSuite/Core/Ui/File/Upload.ts b/ts/WoltLabSuite/Core/Ui/File/Upload.ts index 0e041911cf2..043f5977bb6 100644 --- a/ts/WoltLabSuite/Core/Ui/File/Upload.ts +++ b/ts/WoltLabSuite/Core/Ui/File/Upload.ts @@ -177,7 +177,7 @@ class FileUpload extends Upload implements FileUploadHandler if (fileData.image !== null) { const a = document.createElement("a"); - a.classList.add("jsImageViewer"); + a.dataset.fancybox = ""; a.href = fileData.image; const image = document.createElement("img"); image.classList.add("formUploadHandlerContentListImage"); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js index d5bfeb4d6e5..45eab9a9ff9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js @@ -43,7 +43,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dropdown/Simple", " if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link; - link.classList.add("jsImageViewer"); + link.dataset.fancybox = "attachments"; link.title = file.filename; link.textContent = file.filename; const filename = element.querySelector(".fileList__item__filename"); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js index 2a6816322b0..ace76ed4296 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js @@ -212,7 +212,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui filenameLink.href = element.link; filenameLink.title = element.filename; filenameLink.textContent = element.filename; - filenameLink.classList.add("jsImageViewer"); + filenameLink.dataset.fancybox = ""; // Insert a hidden image element that will be used by the image viewer as the preview image const previewImage = document.createElement("img"); previewImage.src = thumbnail !== undefined ? thumbnail.link : element.link; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js index 3b9ac95de11..cb8454ee345 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js @@ -113,7 +113,7 @@ define(["require", "exports", "tslib", "../../Core", "./Delete", "../../Dom/Util const icon = fileElement.querySelector("fa-icon"); if (fileData.image !== null) { const a = document.createElement("a"); - a.classList.add("jsImageViewer"); + a.dataset.fancybox = ""; a.href = fileData.image; const image = document.createElement("img"); image.classList.add("formUploadHandlerContentListImage"); From 0946d2266930bc5a2402c4252ffd084946273747 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 10:27:32 +0200 Subject: [PATCH 11/25] Use `shared_imageViewer` instead of `imageViewer` template --- com.woltlab.wcf/templates/headIncludeJavaScript.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 5ee0ce5cf96..506a7b51150 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -179,5 +179,5 @@ window.addEventListener('pageshow', function(event) { }); -{include file='imageViewer'} +{include file='shared_imageViewer'} {include file='headIncludeJsonLd'} From eec03a317c697d0692ecef67fad96b428168f9e0 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 12:43:54 +0200 Subject: [PATCH 12/25] Fix typo --- ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 10 +++++----- .../js/WoltLabSuite/Core/Component/Image/Viewer.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index dbced788625..192ec88a233 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -1,6 +1,6 @@ import { Fancybox } from "@fancyapps/ui"; -const LOCALS = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; +const LOCALES = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; export function setup() { void getLocalization().then((l10n) => { @@ -14,11 +14,11 @@ export function setup() { } export async function getLocalization(): Promise> { - let local = document.documentElement.lang; + let locale = document.documentElement.lang; - if (!LOCALS.includes(local)) { - local = "en"; + if (!LOCALES.includes(locale)) { + locale = "en"; } - return (await import(`@fancyapps/ui/l10n/${local}`))[local]; + return (await import(`@fancyapps/ui/l10n/${locale}`))[locale]; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index 8a07541f794..e9b29182e49 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -26,7 +26,7 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; exports.getLocalization = getLocalization; - const LOCALS = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; + const LOCALES = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; function setup() { void getLocalization().then((l10n) => { ui_1.Fancybox.bind("[data-fancybox]", { @@ -38,10 +38,10 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 }); } async function getLocalization() { - let local = document.documentElement.lang; - if (!LOCALS.includes(local)) { - local = "en"; + let locale = document.documentElement.lang; + if (!LOCALES.includes(locale)) { + locale = "en"; } - return (await new Promise((resolve_1, reject_1) => { require([`@fancyapps/ui/l10n/${local}`], resolve_1, reject_1); }).then(__importStar))[local]; + return (await new Promise((resolve_1, reject_1) => { require([`@fancyapps/ui/l10n/${locale}`], resolve_1, reject_1); }).then(__importStar))[locale]; } }); From e8f762ea241e9c86a8fd9fa52c7df9f3a1bb6b0a Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 12:46:53 +0200 Subject: [PATCH 13/25] Remove japanese locale --- ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 2 +- wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index 192ec88a233..9df1ad46e1f 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -1,6 +1,6 @@ import { Fancybox } from "@fancyapps/ui"; -const LOCALES = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; +const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"]; export function setup() { void getLocalization().then((l10n) => { diff --git a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js b/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js deleted file mode 100644 index b2cef41a51e..00000000000 --- a/wcfsetup/install/files/js/3rdParty/fancybox/l10n/ja.js +++ /dev/null @@ -1 +0,0 @@ -!function(O,E){"object"==typeof exports&&"undefined"!=typeof module?E(exports):"function"==typeof define&&define.amd?define(["exports"],E):E(((O="undefined"!=typeof globalThis?globalThis:O||self).Fancybox=O.Fancybox||{},O.Fancybox.l10n=O.Fancybox.l10n||{}))}(this,(function(O){"use strict";const E={PANUP:"上に移動",PANDOWN:"下に移動",PANLEFT:"左に移動",PANRIGHT:"右に動く",ZOOMIN:"ズームイン",ZOOMOUT:"ズームアウトする",TOGGLEZOOM:"ズーム レベルの切り替え",TOGGLE1TO1:"ズーム レベルの切り替え",ITERATEZOOM:"ズーム レベルの切り替え",ROTATECCW:"反時計回りに回転",ROTATECW:"時計回りに回転します",FLIPX:"左右反転",FLIPY:"上下反転",FITX:"水平に合わせる",FITY:"縦に合わせる",RESET:"リセット",TOGGLEFS:"フルスクリーン切り替え",CLOSE:"近い",NEXT:"次",PREV:"前",MODAL:"このモーダル コンテンツは ESC キーで閉じることができます",ERROR:"何かが間違っています。後でもう一度試してください",IMAGE_ERROR:"画像が見つかりません",ELEMENT_NOT_FOUND:"HTML 要素が見つかりません",AJAX_NOT_FOUND:"AJAX の読み込みエラー: 見つかりません",AJAX_FORBIDDEN:"AJAX のロード中にエラーが発生しました: 禁止されています",IFRAME_ERROR:"ページ読み込みエラー",TOGGLE_ZOOM:"ズーム レベルの切り替え",TOGGLE_THUMBS:"サムネイルの切り替え",TOGGLE_SLIDESHOW:"スライドショーの切り替え",TOGGLE_FULLSCREEN:"全画面モードの切り替え",DOWNLOAD:"ダウンロード"};O.ja=E})); From 614f453894f5fa321fccde501af155a7d83c1518 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 13:07:22 +0200 Subject: [PATCH 14/25] Use `data-caption` instead of `title` --- com.woltlab.wcf/templates/shared_bbcode_wsm.tpl | 2 +- com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl | 2 +- ts/WoltLabSuite/Core/Component/Attachment/Entry.ts | 1 + .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 1 + wcfsetup/install/files/acp/templates/attachmentList.tpl | 2 +- .../files/js/WoltLabSuite/Core/Component/Attachment/Entry.js | 1 + .../files/js/WoltLabSuite/Core/Component/Image/Viewer.js | 2 +- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 1 + 8 files changed, 8 insertions(+), 4 deletions(-) diff --git a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl index 89da936e06c..282c4b1dd2c 100644 --- a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl +++ b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl @@ -4,7 +4,7 @@ {if $media->isImage} {if $thumbnailSize != 'original'} {if !$removeLinks} - + {/if} {$media->altText} {if !$removeLinks} diff --git a/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl b/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl index 82051998549..d5a9fe7c05a 100644 --- a/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl +++ b/com.woltlab.wcf/templates/shared_uploadFieldComponent.tpl @@ -13,7 +13,7 @@ {foreach from=$uploadFieldFiles item=file}
    • {if $file->isImage()} - + {else} diff --git a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts index afb4eb36eaf..ab07eb7bad6 100644 --- a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts +++ b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts @@ -61,6 +61,7 @@ function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFile link.href = file.link!; link.dataset.fancybox = "attachments"; link.title = file.filename; + link.dataset.caption = file.filename; link.textContent = file.filename; const filename = element.querySelector(".fileList__item__filename")!; diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts index 10fe391c012..e8d1fab02e8 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -264,6 +264,7 @@ export class FileProcessor { filenameLink.title = element.filename; filenameLink.textContent = element.filename; filenameLink.dataset.fancybox = ""; + filenameLink.dataset.caption = element.filename; // Insert a hidden image element that will be used by the image viewer as the preview image const previewImage = document.createElement("img"); diff --git a/wcfsetup/install/files/acp/templates/attachmentList.tpl b/wcfsetup/install/files/acp/templates/attachmentList.tpl index 6c846d77188..edfc5f0f017 100644 --- a/wcfsetup/install/files/acp/templates/attachmentList.tpl +++ b/wcfsetup/install/files/acp/templates/attachmentList.tpl @@ -112,7 +112,7 @@ {@$attachment->attachmentID}
      - isImage} data-fancybox="attachments" title="{$attachment->filename}"{/if}> + isImage} data-fancybox="attachments" data-caption="{$attachment->filename}"{/if}> {if $attachment->tinyThumbnailType} {else} diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js index 45eab9a9ff9..b91487d63f5 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js @@ -45,6 +45,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dropdown/Simple", " link.href = file.link; link.dataset.fancybox = "attachments"; link.title = file.filename; + link.dataset.caption = file.filename; link.textContent = file.filename; const filename = element.querySelector(".fileList__item__filename"); filename.innerHTML = ""; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index e9b29182e49..80399a7b1d3 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -26,7 +26,7 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; exports.getLocalization = getLocalization; - const LOCALES = ["cs", "de", "en", "es", "fr", "it", "ja", "lv", "pl", "sk"]; + const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"]; function setup() { void getLocalization().then((l10n) => { ui_1.Fancybox.bind("[data-fancybox]", { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js index ace76ed4296..970e561ad27 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js @@ -213,6 +213,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui filenameLink.title = element.filename; filenameLink.textContent = element.filename; filenameLink.dataset.fancybox = ""; + filenameLink.dataset.caption = element.filename; // Insert a hidden image element that will be used by the image viewer as the preview image const previewImage = document.createElement("img"); previewImage.src = thumbnail !== undefined ? thumbnail.link : element.link; From 301602a0cae96cc90a20ba496d703f307ed604a1 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 13:08:38 +0200 Subject: [PATCH 15/25] =?UTF-8?q?Manual=20calling=20of=20`[data-fancybox?= =?UTF-8?q?=3D=E2=80=9Cattachments=E2=80=9D]`=20is=20not=20necessary,=20Fa?= =?UTF-8?q?ncyBox=20groups=20automatically?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 3 --- .../files/js/WoltLabSuite/Core/Component/Image/Viewer.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index 9df1ad46e1f..c6d9a0a5146 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -7,9 +7,6 @@ export function setup() { Fancybox.bind("[data-fancybox]", { l10n: l10n, }); - Fancybox.bind('[data-fancybox="attachments"]', { - l10n: l10n, - }); }); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index 80399a7b1d3..71e4e23ca26 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -32,9 +32,6 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 ui_1.Fancybox.bind("[data-fancybox]", { l10n: l10n, }); - ui_1.Fancybox.bind('[data-fancybox="attachments"]', { - l10n: l10n, - }); }); } async function getLocalization() { From efa25729e59a5ca944f43b3db281b4b100f52337 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 13:32:46 +0200 Subject: [PATCH 16/25] Remove unused language variables `wcf.imageViewer.*` --- wcfsetup/install/lang/de.xml | 16 ++++++++-------- wcfsetup/install/lang/en.xml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 9894e4b4d57..3af91273dc5 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -4119,15 +4119,7 @@ Dateianhänge: Maximale Bildgröße: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} Pixel
      Erlaubte Dateiendungen: gif, jpg, jpeg, png, webp
      Maximale Dateigröße: {$__wcf->session->getPermission($coverPhotoPermissionMaxSize)|filesize}]]>
      - - - - - - - - @@ -7210,6 +7202,14 @@ Benachrichtigungen auf
      {PAGE_TITLE|phra + + + + + + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 6ab91420388..8fc7816586e 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -4065,15 +4065,7 @@ Attachments: Maximum Image Size: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} pixels
      Allowed File Extensions: gif, jpg, jpeg, png, webp
      Maximum Filesize: {$__wcf->session->getPermission($coverPhotoPermissionMaxSize)|filesize}]]>
      - - - - - - - - @@ -7101,6 +7093,14 @@ your notifications on
      {PAGE_TITLE|phras + + + + + + + + From d4166f6a49a8a74ead36817dd2e8bf8fe11dffc8 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 23 Oct 2024 13:36:31 +0200 Subject: [PATCH 17/25] Add a function that creates a new fancybox with given content, using the default config. --- .../Core/Component/Image/Viewer.ts | 21 +++++++++++++++---- .../Core/Component/Image/Viewer.js | 18 ++++++++++++---- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index c6d9a0a5146..14b699b8e95 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -1,15 +1,28 @@ import { Fancybox } from "@fancyapps/ui"; +import { userSlideType } from "@fancyapps/ui/types/Carousel/types"; +import { OptionsType } from "@fancyapps/ui/types/Fancybox/options"; const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"]; export function setup() { - void getLocalization().then((l10n) => { - Fancybox.bind("[data-fancybox]", { - l10n: l10n, - }); + void getDefaultConfig().then((config) => { + Fancybox.bind("[data-fancybox]", config); }); } +export async function createFancybox(userSlides?: Array): Promise { + return new Fancybox(userSlides, await getDefaultConfig()); +} + +async function getDefaultConfig(): Promise> { + return { + l10n: await getLocalization(), + Html: { + videoAutoplay: false, + }, + }; +} + export async function getLocalization(): Promise> { let locale = document.documentElement.lang; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index 71e4e23ca26..af94887533b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -25,15 +25,25 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; + exports.createFancybox = createFancybox; exports.getLocalization = getLocalization; const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"]; function setup() { - void getLocalization().then((l10n) => { - ui_1.Fancybox.bind("[data-fancybox]", { - l10n: l10n, - }); + void getDefaultConfig().then((config) => { + ui_1.Fancybox.bind("[data-fancybox]", config); }); } + async function createFancybox(userSlides) { + return new ui_1.Fancybox(userSlides, await getDefaultConfig()); + } + async function getDefaultConfig() { + return { + l10n: await getLocalization(), + Html: { + videoAutoplay: false, + }, + }; + } async function getLocalization() { let locale = document.documentElement.lang; if (!LOCALES.includes(locale)) { From a6769e0b6a70e2505a21fb5011eea0449f0cc08b Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Thu, 24 Oct 2024 09:14:08 +0200 Subject: [PATCH 18/25] Insert fancybox in the section to check whether the file is up to date --- .github/workflows/javascript.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index e2566dcc3bf..72bdb22026e 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -68,3 +68,6 @@ jobs: - name: "Check '@ckeditor/ckeditor5-inspector'" run: | diff -wu wcfsetup/install/files/js/3rdParty/ckeditor/ckeditor5-inspector/inspector.js node_modules/@ckeditor/ckeditor5-inspector/build/inspector.js + - name: "Check '@fancyapps/ui'" + run: | + diff -wu wcfsetup/install/files/js/3rdParty/fancybox/fancybox.umd.js node_modules/@fancyapps/ui/dist/fancybox/fancybox.umd.js From 37d9ddd0fc9b33fc6b34e3f7befa7bd1072b4fd4 Mon Sep 17 00:00:00 2001 From: Olaf Braun Date: Tue, 12 Nov 2024 09:10:46 +0100 Subject: [PATCH 19/25] Update com.woltlab.wcf/templates/shared_imageViewer.tpl Co-authored-by: Alexander Ebert --- com.woltlab.wcf/templates/shared_imageViewer.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/shared_imageViewer.tpl b/com.woltlab.wcf/templates/shared_imageViewer.tpl index 1572e1320e7..e8a87321b9c 100644 --- a/com.woltlab.wcf/templates/shared_imageViewer.tpl +++ b/com.woltlab.wcf/templates/shared_imageViewer.tpl @@ -9,7 +9,7 @@ stylesheet.href = "{$__wcf->getPath()}style/fancybox.css"; stylesheet.id = "fancybox-stylesheet"; - document.querySelector("link[rel=\"stylesheet\"]").before(stylesheet); + document.querySelector('link[rel="stylesheet"]').before(stylesheet); } } From 76c98c1817d05225457b8590d1d51e664e2f07c8 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 12 Nov 2024 09:40:05 +0100 Subject: [PATCH 20/25] Support `.jsImageViewer` for backwards compatibility. --- ts/WoltLabSuite/Core/Bootstrap.ts | 4 ++++ ts/WoltLabSuite/Core/Component/Image/Viewer.ts | 9 +++++++++ wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js | 4 ++++ .../files/js/WoltLabSuite/Core/Component/Image/Viewer.js | 9 +++++++++ 4 files changed, 26 insertions(+) diff --git a/ts/WoltLabSuite/Core/Bootstrap.ts b/ts/WoltLabSuite/Core/Bootstrap.ts index c7786d6650f..0a31fc2add6 100644 --- a/ts/WoltLabSuite/Core/Bootstrap.ts +++ b/ts/WoltLabSuite/Core/Bootstrap.ts @@ -179,6 +179,10 @@ export function setup(options: BoostrapOptions): void { whenFirstSeen("[data-fancybox]", () => { void import("./Component/Image/Viewer").then(({ setup }) => setup()); }); + whenFirstSeen(".jsImageViewer", () => { + console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead."); + void import("./Component/Image/Viewer").then(({ setupLegacy }) => setupLegacy()); + }); // Move the reCAPTCHA widget overlay to the `pageOverlayContainer` // when widget form elements are placed in a dialog. diff --git a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts index 14b699b8e95..2f3069a7e68 100644 --- a/ts/WoltLabSuite/Core/Component/Image/Viewer.ts +++ b/ts/WoltLabSuite/Core/Component/Image/Viewer.ts @@ -10,6 +10,15 @@ export function setup() { }); } +export function setupLegacy() { + void getDefaultConfig().then((config) => { + Fancybox.bind(".jsImageViewer", { + ...config, + groupAll: true, + }); + }); +} + export async function createFancybox(userSlides?: Array): Promise { return new Fancybox(userSlides, await getDefaultConfig()); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js index 77b0920da25..30bed49592b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js @@ -143,6 +143,10 @@ define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Devtools", (0, LazyLoader_1.whenFirstSeen)("[data-fancybox]", () => { void new Promise((resolve_9, reject_9) => { require(["./Component/Image/Viewer"], resolve_9, reject_9); }).then(tslib_1.__importStar).then(({ setup }) => setup()); }); + (0, LazyLoader_1.whenFirstSeen)(".jsImageViewer", () => { + console.warn("The class `jsImageViewer` is deprecated. Use the attribute `data-fancybox` instead."); + void new Promise((resolve_10, reject_10) => { require(["./Component/Image/Viewer"], resolve_10, reject_10); }).then(tslib_1.__importStar).then(({ setupLegacy }) => setupLegacy()); + }); // Move the reCAPTCHA widget overlay to the `pageOverlayContainer` // when widget form elements are placed in a dialog. const observer = new MutationObserver((mutations) => { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js index af94887533b..8b69900bdd8 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Viewer.js @@ -25,6 +25,7 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = setup; + exports.setupLegacy = setupLegacy; exports.createFancybox = createFancybox; exports.getLocalization = getLocalization; const LOCALES = ["cs", "de", "en", "es", "fr", "it", "lv", "pl", "sk"]; @@ -33,6 +34,14 @@ define(["require", "exports", "@fancyapps/ui"], function (require, exports, ui_1 ui_1.Fancybox.bind("[data-fancybox]", config); }); } + function setupLegacy() { + void getDefaultConfig().then((config) => { + ui_1.Fancybox.bind(".jsImageViewer", { + ...config, + groupAll: true, + }); + }); + } async function createFancybox(userSlides) { return new ui_1.Fancybox(userSlides, await getDefaultConfig()); } From f7139810d7cc892e61a95fc1c3efd2c92ffab935 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 12 Nov 2024 09:42:36 +0100 Subject: [PATCH 21/25] Use a different name for attachments that belong to a form so that they are not grouped together with those from the content --- ts/WoltLabSuite/Core/Component/Attachment/Entry.ts | 2 +- .../files/js/WoltLabSuite/Core/Component/Attachment/Entry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts index ab07eb7bad6..f495f7b1f3c 100644 --- a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts +++ b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts @@ -59,7 +59,7 @@ function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFile if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link!; - link.dataset.fancybox = "attachments"; + link.dataset.fancybox = "uploadedAttachments"; link.title = file.filename; link.dataset.caption = file.filename; link.textContent = file.filename; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js index b91487d63f5..79c9b707390 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js @@ -43,7 +43,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dropdown/Simple", " if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link; - link.dataset.fancybox = "attachments"; + link.dataset.fancybox = "uploadedAttachments"; link.title = file.filename; link.dataset.caption = file.filename; link.textContent = file.filename; From e3cf21b2cd518d774910c41e57e745da2ce85301 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 12 Nov 2024 11:35:23 +0100 Subject: [PATCH 22/25] Group images of a message together and not all from one page --- .../templates/shared_bbcode_wsm.tpl | 2 +- .../Core/Component/Attachment/Entry.ts | 4 +++- .../Core/Component/Attachment/Entry.js | 3 ++- .../lib/data/attachment/Attachment.class.php | 1 + .../system/bbcode/AttachmentBBCode.class.php | 8 ++++++-- .../bbcode/WoltLabSuiteMediaBBCode.class.php | 2 ++ .../AttachmentFileProcessor.class.php | 1 + .../MessageEmbeddedObjectManager.class.php | 20 +++++++++++++++++++ 8 files changed, 36 insertions(+), 5 deletions(-) diff --git a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl index 282c4b1dd2c..b87ac393c24 100644 --- a/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl +++ b/com.woltlab.wcf/templates/shared_bbcode_wsm.tpl @@ -4,7 +4,7 @@ {if $media->isImage} {if $thumbnailSize != 'original'} {if !$removeLinks} - + {/if} {$media->altText} {if !$removeLinks} diff --git a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts index f495f7b1f3c..edd8e504e23 100644 --- a/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts +++ b/ts/WoltLabSuite/Core/Component/Attachment/Entry.ts @@ -13,6 +13,7 @@ import { type FileProcessorData = { attachmentID: number; + messageObjectID: number | null; }; function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFileElement, editor: HTMLElement): void { @@ -59,7 +60,8 @@ function fileInitializationCompleted(element: HTMLElement, file: WoltlabCoreFile if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link!; - link.dataset.fancybox = "uploadedAttachments"; + link.dataset.fancybox = + "attachments" + (data.messageObjectID ? `-${(data as FileProcessorData).messageObjectID}` : ""); link.title = file.filename; link.dataset.caption = file.filename; link.textContent = file.filename; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js index 79c9b707390..1c3d039117c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/Entry.js @@ -43,7 +43,8 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dropdown/Simple", " if (file.link !== undefined && file.filename !== undefined) { const link = document.createElement("a"); link.href = file.link; - link.dataset.fancybox = "uploadedAttachments"; + link.dataset.fancybox = + "attachments" + (data.messageObjectID ? `-${data.messageObjectID}` : ""); link.title = file.filename; link.dataset.caption = file.filename; link.textContent = file.filename; diff --git a/wcfsetup/install/files/lib/data/attachment/Attachment.class.php b/wcfsetup/install/files/lib/data/attachment/Attachment.class.php index c66968aa2d1..1fcef76dcbb 100644 --- a/wcfsetup/install/files/lib/data/attachment/Attachment.class.php +++ b/wcfsetup/install/files/lib/data/attachment/Attachment.class.php @@ -436,6 +436,7 @@ public function toHtmlElement(): ?string { return $this->getFile()?->toHtmlElement([ 'attachmentID' => $this->attachmentID, + 'messageObjectID' => $this->objectID, ]); } diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 1a272f0e50c..b3edb72fa3c 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -93,7 +93,7 @@ private function showImage(Attachment $attachment, string $outputType, array $at if (!$hasParentLink && ($attachment->width > ATTACHMENT_THUMBNAIL_WIDTH || $attachment->height > ATTACHMENT_THUMBNAIL_HEIGHT)) { $result = \sprintf( <<<'HTML' - + %s %s @@ -102,6 +102,8 @@ private function showImage(Attachment $attachment, string $outputType, array $at HTML, $source, $title, + MessageEmbeddedObjectManager::getInstance()->getActiveMessageObjectType(), + MessageEmbeddedObjectManager::getInstance()->getActiveMessageID(), $class, $width, $imageElement, @@ -159,9 +161,11 @@ private function showImageAsThumbnail(Attachment $attachment, string $alignment, if (!$hasParentLink && $attachment->hasThumbnail() && $attachment->canDownload()) { $result = \sprintf( - '%s%s', + '%s%s', StringUtil::encodeHTML($attachment->getLink()), StringUtil::encodeHTML($attachment->filename), + MessageEmbeddedObjectManager::getInstance()->getActiveMessageObjectType(), + MessageEmbeddedObjectManager::getInstance()->getActiveMessageID(), $class, $width, $imageElement, diff --git a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php index cc6e78c02ce..537d56d81d7 100644 --- a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php @@ -78,6 +78,8 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC 'media' => $media->getLocalizedVersion(MessageEmbeddedObjectManager::getInstance()->getActiveMessageLanguageID()), 'thumbnailSize' => $thumbnailSize, 'width' => $width, + 'activeMessageID' => MessageEmbeddedObjectManager::getInstance()->getActiveMessageID(), + 'activeMessageObjectType' => MessageEmbeddedObjectManager::getInstance()->getActiveMessageObjectType(), ], true); } elseif ($media->isVideo() || $media->isAudio()) { return WCF::getTPL()->fetch('shared_bbcode_wsm', 'wcf', [ diff --git a/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php b/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php index 40e7f8587f1..13b1e97c6c9 100644 --- a/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php +++ b/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php @@ -139,6 +139,7 @@ public function getUploadResponse(File $file): array return [ 'attachmentID' => $attachment->attachmentID, + 'messageObjectID' => $attachment->objectID, ]; } diff --git a/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php b/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php index d3d012802c6..3a6cc76debd 100644 --- a/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php +++ b/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php @@ -350,6 +350,26 @@ public function getActiveMessageLanguageID() return $this->activeMessageLanguageID; } + /** + * @since 6.2 + */ + public function getActiveMessageObjectType(): ?string + { + if (!$this->activeMessageObjectTypeID) { + return null; + } + + return ObjectTypeCache::getInstance()->getObjectType($this->activeMessageObjectTypeID)?->objectType; + } + + /** + * @since 6.2 + */ + public function getActiveMessageID(): ?int + { + return $this->activeMessageID; + } + /** * Returns all embedded objects of a specific type. * From 1c283be3df6aa16a334cb983df28f9df6fd44802 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 12 Nov 2024 11:37:42 +0100 Subject: [PATCH 23/25] Remove `WCF.ImageViewer` from `.buildOrder` --- wcfsetup/install/files/js/.buildOrder | 1 - 1 file changed, 1 deletion(-) diff --git a/wcfsetup/install/files/js/.buildOrder b/wcfsetup/install/files/js/.buildOrder index 8dbb87d3567..e0dd770e75b 100644 --- a/wcfsetup/install/files/js/.buildOrder +++ b/wcfsetup/install/files/js/.buildOrder @@ -5,7 +5,6 @@ WCF.Assets WCF WCF.ColorPicker -WCF.ImageViewer WCF.Label WCF.Location WCF.Message From ac1e3dea221922b6542a1695bfc2f8f70484f579 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 23 Nov 2024 23:33:18 +0100 Subject: [PATCH 24/25] Fix the grouping of attachments belonging together --- com.woltlab.wcf/templates/attachments.tpl | 6 +++--- .../lib/data/attachment/GroupedAttachmentList.class.php | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/com.woltlab.wcf/templates/attachments.tpl b/com.woltlab.wcf/templates/attachments.tpl index 8a3b56ac4dd..97082b01a74 100644 --- a/com.woltlab.wcf/templates/attachments.tpl +++ b/com.woltlab.wcf/templates/attachments.tpl @@ -7,8 +7,8 @@ {content} {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} {if $attachment->showAsImage() && !$attachment->isEmbedded()} -
    • - canDownload()} data-fancybox="attachments" data-caption="{lang}wcf.attachment.image.title{/lang}"{/if}> +
    • + canDownload()} data-fancybox="message-{$attachmentList->getObjectTypeName()}-{$objectID}" data-caption="{$attachment->filename}" aria-title="{lang}wcf.attachment.image.title{/lang}"{/if}>
      {if $attachment->hasThumbnail()} @@ -44,7 +44,7 @@