@cntrl-site/components 1.0.106-alpha.0 → 1.0.107-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ArchivePopup-DMpGP8r2.js +176 -0
- package/dist/ArchivePopup-X4EtTAyA.mjs +694 -0
- package/dist/ArchivePopupComponent-BTniPIfi.js +1 -0
- package/dist/{PretextComponent-j-OsRZTx.mjs → ArchivePopupComponent-GgAT2Avz.mjs} +954 -479
- package/dist/ClickGallerie-CYQMgrIr.js +36 -0
- package/dist/ClickGallerie-o2U6oyOF.mjs +272 -0
- package/dist/Components/ArchivePopup/ArchivePopup.d.ts +154 -0
- package/dist/Components/ArchivePopup/ArchivePopupComponent.d.ts +288 -0
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +2 -1
- package/dist/Components/Helix/Helix.d.ts +4 -1
- package/dist/Components/Hive/Hive.d.ts +4 -1
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +2 -1
- package/dist/Components/List/List.d.ts +6 -2
- package/dist/Components/Marquee/Marquee.d.ts +6 -2
- package/dist/Components/MarqueeText/MarqueeText.d.ts +2 -1
- package/dist/Components/Mercury/Mercury.d.ts +4 -1
- package/dist/Components/Waterfall/WaterfallLightbox.d.ts +4 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +27 -0
- package/dist/Components/utils/LinkWrapper.d.ts +16 -0
- package/dist/Components/utils/embedMedia.d.ts +40 -0
- package/dist/Components/utils/index.d.ts +6 -0
- package/dist/{ControlSlider-SiOt22l_.js → ControlSlider-Kkec-i14.js} +1 -1
- package/dist/{ControlSlider-pZv7H6BU.mjs → ControlSlider-LcZmviGX.mjs} +1 -1
- package/dist/EmbedMediaFrame-DsOTKE4i.js +1 -0
- package/dist/EmbedMediaFrame-DwHeOAy5.mjs +164 -0
- package/dist/{FAQ-C7823fyi.js → FAQ-BxhMo7T8.js} +1 -1
- package/dist/{FAQ-CZ39u4m8.mjs → FAQ-CdwSft5p.mjs} +1 -1
- package/dist/Grid-CFHTP3mb.js +378 -0
- package/dist/Grid-e-gLfsji.mjs +1590 -0
- package/dist/Helix-BpLo9FD3.js +43 -0
- package/dist/Helix-CidI3ucE.mjs +324 -0
- package/dist/{Hive-D6-R6TwM.mjs → Hive-BsmFHk2i.mjs} +505 -475
- package/dist/Hive-D1j6wZpV.js +321 -0
- package/dist/ImageRevealSlider-BuukTGAK.js +1 -0
- package/dist/{ImageRevealSlider-BdFGyVEP.mjs → ImageRevealSlider-Df9sygk9.mjs} +63 -70
- package/dist/{Lightbox-eP9qAZzL.mjs → Lightbox-C_fXsfdz.mjs} +1 -1
- package/dist/{Lightbox-CIss_nOG.js → Lightbox-DaunVrkp.js} +1 -1
- package/dist/LinkWrapper-Ca84iPtg.js +1 -0
- package/dist/LinkWrapper-DZs9hlOn.mjs +13 -0
- package/dist/{List-DW7fyJbf.mjs → List-Bh_-l9vD.mjs} +532 -520
- package/dist/List-DVvpQ24J.js +377 -0
- package/dist/Marquee-DByooiWP.mjs +578 -0
- package/dist/Marquee-DfIP-tIN.js +133 -0
- package/dist/{MarqueeText-Rzt2fJYt.mjs → MarqueeText-D6FNCe6P.mjs} +115 -114
- package/dist/MarqueeText-DsUiV6Zv.js +132 -0
- package/dist/Mercury-B-s2Kvuq.js +267 -0
- package/dist/Mercury-CCW0Es-s.mjs +1700 -0
- package/dist/{RichTextRenderer-B6WtTYlR.mjs → RichTextRenderer-BptwNpbJ.mjs} +10 -9
- package/dist/RichTextRenderer-K90Dd7pt.js +1 -0
- package/dist/{Slider20-Dm8BeCli.mjs → Slider20-CCzixTiN.mjs} +1 -1
- package/dist/{Slider20-C9o2REDl.js → Slider20-fMVeRfgx.js} +1 -1
- package/dist/{TestimonialGrid-CPu4qQ6B.mjs → TestimonialGrid-CbsVxSn9.mjs} +1 -1
- package/dist/{TestimonialGrid-D4ieiz9e.js → TestimonialGrid-CiCagfBU.js} +1 -1
- package/dist/{TestimonialSingle-DLdnAVF7.mjs → TestimonialSingle-BVm3Amrl.mjs} +1 -1
- package/dist/{TestimonialSingle-CVu15ZtV.js → TestimonialSingle-BWXynGjv.js} +1 -1
- package/dist/Waterfall-3kKioKh2.mjs +1432 -0
- package/dist/Waterfall-DII4-WV5.js +288 -0
- package/dist/{components-D2LyuDm-.mjs → components-DKuQ8PUa.mjs} +19 -18
- package/dist/components-SEwSqFrQ.js +1 -0
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +22 -21
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +52 -15
- package/dist/sources.js +1331 -233
- package/dist/sources.mjs +1355 -256
- package/dist/types/SchemaV1.d.ts +53 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +30 -20
- package/package.json +1 -1
- package/dist/ClickGallerie-D7g093HX.js +0 -36
- package/dist/ClickGallerie-QSOQjSdv.mjs +0 -271
- package/dist/Grid-BBpdl60K.js +0 -374
- package/dist/Grid-DS53S_gA.mjs +0 -1576
- package/dist/Helix-BPn9V1sg.mjs +0 -315
- package/dist/Helix-DcgsCc4D.js +0 -43
- package/dist/Hive-n8Fz-j3o.js +0 -321
- package/dist/ImageRevealSlider-BBWtFjUF.js +0 -1
- package/dist/List-C32WImI3.js +0 -377
- package/dist/Marquee-DOIRRCu4.js +0 -133
- package/dist/Marquee-O_PDwlIb.mjs +0 -564
- package/dist/MarqueeText-DkaO2lQ5.js +0 -132
- package/dist/Mercury-C9D10TTT.mjs +0 -1702
- package/dist/Mercury-DynO-NxY.js +0 -267
- package/dist/PretextComponent-BnsS2zJ6.js +0 -1
- package/dist/RichTextRenderer-CIy6yI8U.js +0 -1
- package/dist/Waterfall-DC2WQ3GT.js +0 -287
- package/dist/Waterfall-Yud2VR62.mjs +0 -1404
- package/dist/components-B9Vdjf0w.js +0 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as At, Fragment as Ie, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { s as se } from "./scalingValue-C9JH5L6O.mjs";
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
3
|
+
import { u as hn } from "./useScopedStyles-DhBG3557.mjs";
|
|
4
|
+
import { u as gn } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
5
|
+
import { i as zt, E as Ze, g as pn } from "./EmbedMediaFrame-DwHeOAy5.mjs";
|
|
6
|
+
import { L as mn } from "./LazyVideo-CdAWymKO.mjs";
|
|
7
|
+
import { useRef as w, useState as $, useMemo as xe, useCallback as m, useEffect as B, useLayoutEffect as le } from "react";
|
|
8
|
+
import { createPortal as wn } from "react-dom";
|
|
9
|
+
import { H as vn } from "./HiveLightboxTitles-DhEeFKWs.mjs";
|
|
10
|
+
import { g as yn } from "./getImageRect-CBMhFNHM.mjs";
|
|
11
|
+
function $n(t) {
|
|
11
12
|
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function xn(t) {
|
|
14
15
|
return `
|
|
15
16
|
.${t}-wrapper {
|
|
16
17
|
display: grid;
|
|
17
18
|
align-items: start;
|
|
18
19
|
justify-content: center;
|
|
19
|
-
min-height: ${
|
|
20
|
+
min-height: ${$n(48)};
|
|
20
21
|
}
|
|
21
22
|
.${t}-item {
|
|
22
23
|
display: flex;
|
|
@@ -333,26 +334,26 @@ function wn(t) {
|
|
|
333
334
|
}
|
|
334
335
|
`;
|
|
335
336
|
}
|
|
336
|
-
const
|
|
337
|
-
function
|
|
337
|
+
const Ye = { assetId: "", name: "", objectFit: "cover" }, it = 500, Zt = 650, V = "cubic-bezier(0.22, 1, 0.36, 1)", bn = 72, In = 50, Sn = 1e4, Ln = 650, kn = 500;
|
|
338
|
+
function An(t, e) {
|
|
338
339
|
const i = t.width / e.width, r = t.height / e.height, o = t.left - e.left, l = t.top - e.top;
|
|
339
340
|
return `translate(${o}px, ${l}px) scale(${i}, ${r})`;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
+
function Ke(t, e) {
|
|
342
343
|
if (e === "contain" && t instanceof HTMLImageElement) {
|
|
343
|
-
const r =
|
|
344
|
+
const r = yn(t);
|
|
344
345
|
return { left: r.x, top: r.y, width: r.width, height: r.height };
|
|
345
346
|
}
|
|
346
347
|
const i = t.getBoundingClientRect();
|
|
347
348
|
return { left: i.left, top: i.top, width: i.width, height: i.height };
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function Rn(t, e, i) {
|
|
350
351
|
const r = t.querySelector(`[data-hive-grid-index="${e}"]`);
|
|
351
|
-
return r instanceof HTMLElement ?
|
|
352
|
+
return r instanceof HTMLElement ? Ke(r, i) : null;
|
|
352
353
|
}
|
|
353
|
-
function
|
|
354
|
+
function Tn(t) {
|
|
354
355
|
return t.reduce((e, i, r) => {
|
|
355
|
-
const o =
|
|
356
|
+
const o = Le(i.gallery), g = ke(o).filter((a) => a.lightboxMedia).map((a) => a.lightboxMedia);
|
|
356
357
|
return g.length === 0 || e.push({
|
|
357
358
|
gridIndex: r,
|
|
358
359
|
items: g,
|
|
@@ -364,22 +365,22 @@ function Ln(t) {
|
|
|
364
365
|
}), e;
|
|
365
366
|
}, []);
|
|
366
367
|
}
|
|
367
|
-
function
|
|
368
|
+
function Kt(t, e, i) {
|
|
368
369
|
var o;
|
|
369
370
|
if (t.length <= 1) return null;
|
|
370
371
|
const r = (e + i + t.length) % t.length;
|
|
371
372
|
return ((o = t[r]) == null ? void 0 : o.items[0]) ?? null;
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function qe(t, e, i) {
|
|
374
375
|
if (t.length <= 2) return null;
|
|
375
376
|
const r = (e + i + t.length) % t.length;
|
|
376
|
-
return
|
|
377
|
+
return Kt(t, r, i);
|
|
377
378
|
}
|
|
378
|
-
const
|
|
379
|
-
function
|
|
380
|
-
return t.width *
|
|
379
|
+
const Hn = 0.03;
|
|
380
|
+
function Je(t) {
|
|
381
|
+
return t.width * Hn;
|
|
381
382
|
}
|
|
382
|
-
const
|
|
383
|
+
const be = {
|
|
383
384
|
left: 0,
|
|
384
385
|
top: 0,
|
|
385
386
|
width: typeof window < "u" ? window.innerWidth : 1440,
|
|
@@ -393,27 +394,31 @@ function ae(t, e) {
|
|
|
393
394
|
height: t.height
|
|
394
395
|
};
|
|
395
396
|
}
|
|
396
|
-
function
|
|
397
|
+
function Ue(t) {
|
|
397
398
|
const e = t.getBoundingClientRect();
|
|
398
399
|
return { width: e.width, height: e.height, left: e.left, top: e.top };
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
+
function En(t) {
|
|
401
402
|
return t instanceof HTMLVideoElement ? { width: t.videoWidth, height: t.videoHeight } : { width: t.naturalWidth, height: t.naturalHeight };
|
|
402
403
|
}
|
|
403
|
-
function
|
|
404
|
+
function Se(t, e, i) {
|
|
404
405
|
const r = t.getBoundingClientRect(), o = r.width, l = r.height, g = e / i, a = o / l;
|
|
405
406
|
if (g > a) {
|
|
406
|
-
const
|
|
407
|
-
return { width: o, height:
|
|
407
|
+
const S = o / g;
|
|
408
|
+
return { width: o, height: S, left: r.left, top: r.top + (l - S) / 2 };
|
|
408
409
|
}
|
|
409
|
-
const
|
|
410
|
-
return { width:
|
|
410
|
+
const W = l * g;
|
|
411
|
+
return { width: W, height: l, left: r.left + (o - W) / 2, top: r.top };
|
|
411
412
|
}
|
|
412
|
-
function
|
|
413
|
-
return !t || !(e != null && e.width) || !(e != null && e.height) ? null :
|
|
413
|
+
function Fn(t, e) {
|
|
414
|
+
return !t || !(e != null && e.width) || !(e != null && e.height) ? null : Se(t, e.width, e.height);
|
|
414
415
|
}
|
|
415
|
-
function
|
|
416
|
+
function Cn(t, e) {
|
|
416
417
|
if (zt(t)) {
|
|
418
|
+
e(t.assetId, pn(t), 1);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
if (Dt(t)) {
|
|
417
422
|
const r = document.createElement("video"), o = () => {
|
|
418
423
|
r.videoWidth > 0 && r.videoHeight > 0 && e(t.assetId, r.videoWidth, r.videoHeight), r.removeEventListener("loadedmetadata", o);
|
|
419
424
|
};
|
|
@@ -425,19 +430,21 @@ function Tn(t, e) {
|
|
|
425
430
|
i.naturalWidth > 0 && i.naturalHeight > 0 && e(t.assetId, i.naturalWidth, i.naturalHeight);
|
|
426
431
|
}, i.src = t.assetId;
|
|
427
432
|
}
|
|
428
|
-
function
|
|
433
|
+
function Nn(t) {
|
|
429
434
|
const e = /* @__PURE__ */ new Set(), i = [];
|
|
430
435
|
for (const r of t) {
|
|
431
|
-
const o =
|
|
436
|
+
const o = Le(r.gallery), l = ke(o);
|
|
432
437
|
for (const g of l)
|
|
433
438
|
for (const a of [g.displayMedia, g.lightboxMedia])
|
|
434
439
|
a != null && a.assetId && !e.has(a.assetId) && (e.add(a.assetId), i.push(a));
|
|
435
440
|
}
|
|
436
441
|
return i;
|
|
437
442
|
}
|
|
438
|
-
function
|
|
443
|
+
function Wn({ mediaList: t }) {
|
|
439
444
|
const [e, i] = $(null);
|
|
440
|
-
|
|
445
|
+
gn(e, { preload: "metadata" });
|
|
446
|
+
const r = t.filter((o) => !zt(o));
|
|
447
|
+
return r.length === 0 ? null : /* @__PURE__ */ u(
|
|
441
448
|
"div",
|
|
442
449
|
{
|
|
443
450
|
ref: i,
|
|
@@ -450,35 +457,35 @@ function Cn({ mediaList: t }) {
|
|
|
450
457
|
opacity: 0,
|
|
451
458
|
pointerEvents: "none"
|
|
452
459
|
},
|
|
453
|
-
children:
|
|
460
|
+
children: r.map((o) => Dt(o) ? /* @__PURE__ */ u(
|
|
454
461
|
"video",
|
|
455
462
|
{
|
|
456
|
-
src:
|
|
463
|
+
src: o.assetId,
|
|
457
464
|
preload: "none",
|
|
458
465
|
muted: !0,
|
|
459
466
|
playsInline: !0
|
|
460
467
|
},
|
|
461
|
-
|
|
462
|
-
) : /* @__PURE__ */
|
|
468
|
+
o.assetId
|
|
469
|
+
) : /* @__PURE__ */ u(
|
|
463
470
|
"img",
|
|
464
471
|
{
|
|
465
|
-
src:
|
|
472
|
+
src: o.assetId,
|
|
466
473
|
alt: ""
|
|
467
474
|
},
|
|
468
|
-
|
|
475
|
+
o.assetId
|
|
469
476
|
))
|
|
470
477
|
}
|
|
471
478
|
);
|
|
472
479
|
}
|
|
473
480
|
function Ot(t, e, i) {
|
|
474
|
-
const { width: r, height: o, top: l } = t, { left: g, width: a } = i,
|
|
481
|
+
const { width: r, height: o, top: l } = t, { left: g, width: a } = i, W = Je(i);
|
|
475
482
|
return e === "left" ? {
|
|
476
|
-
left: g +
|
|
483
|
+
left: g + W - r,
|
|
477
484
|
top: l,
|
|
478
485
|
width: r,
|
|
479
486
|
height: o
|
|
480
487
|
} : {
|
|
481
|
-
left: g + a -
|
|
488
|
+
left: g + a - W,
|
|
482
489
|
top: l,
|
|
483
490
|
width: r,
|
|
484
491
|
height: o
|
|
@@ -491,8 +498,8 @@ function ue(t, e, i) {
|
|
|
491
498
|
left: 2 * r.left - t.left
|
|
492
499
|
};
|
|
493
500
|
}
|
|
494
|
-
function
|
|
495
|
-
const { left: r, width: o } = i, l =
|
|
501
|
+
function jn(t, e, i) {
|
|
502
|
+
const { left: r, width: o } = i, l = Je(i);
|
|
496
503
|
return e === "left" ? {
|
|
497
504
|
left: r,
|
|
498
505
|
top: t.top,
|
|
@@ -505,7 +512,7 @@ function Nn(t, e, i) {
|
|
|
505
512
|
height: t.height
|
|
506
513
|
};
|
|
507
514
|
}
|
|
508
|
-
function
|
|
515
|
+
function Qe(t, e, i, r) {
|
|
509
516
|
const o = Ot(t, "left", r), l = Ot(t, "right", r), g = ue(t, "left", r), a = ue(t, "right", r);
|
|
510
517
|
if (i === 1)
|
|
511
518
|
switch (e) {
|
|
@@ -533,54 +540,54 @@ function Ue(t, e, i, r) {
|
|
|
533
540
|
return { start: t, end: t };
|
|
534
541
|
}
|
|
535
542
|
}
|
|
536
|
-
function
|
|
537
|
-
const { start: o, end: l } =
|
|
543
|
+
function On(t, e, i, r) {
|
|
544
|
+
const { start: o, end: l } = Qe(t, e, i, r);
|
|
538
545
|
return {
|
|
539
546
|
x: l.left - o.left,
|
|
540
547
|
y: l.top - o.top
|
|
541
548
|
};
|
|
542
549
|
}
|
|
543
|
-
function
|
|
550
|
+
function zn(t, e, i) {
|
|
544
551
|
const r = Ot(t, e, i), o = ue(t, e, i);
|
|
545
552
|
return {
|
|
546
553
|
x: o.left - r.left,
|
|
547
554
|
y: o.top - r.top
|
|
548
555
|
};
|
|
549
556
|
}
|
|
550
|
-
function
|
|
557
|
+
function Pe(t) {
|
|
551
558
|
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
552
559
|
const e = t[0];
|
|
553
560
|
return e !== null && typeof e == "object" && "media" in e && Array.isArray(e.media);
|
|
554
561
|
}
|
|
555
|
-
function
|
|
562
|
+
function Le(t) {
|
|
556
563
|
if (!t) return;
|
|
557
|
-
if (
|
|
564
|
+
if (Pe(t)) return t;
|
|
558
565
|
if (!Array.isArray(t)) return;
|
|
559
566
|
const [e, i] = t, r = e != null && e.assetId ? e : void 0, o = i != null && i.assetId ? i : void 0;
|
|
560
567
|
if (!(!r && !o))
|
|
561
568
|
return [{
|
|
562
569
|
media: [
|
|
563
|
-
o ?? r ??
|
|
564
|
-
r ?? o ??
|
|
570
|
+
o ?? r ?? Ye,
|
|
571
|
+
r ?? o ?? Ye
|
|
565
572
|
]
|
|
566
573
|
}];
|
|
567
574
|
}
|
|
568
|
-
function
|
|
575
|
+
function Dn(t) {
|
|
569
576
|
const [e, i] = t.media;
|
|
570
577
|
return i != null && i.assetId ? i : e != null && e.assetId ? e : null;
|
|
571
578
|
}
|
|
572
|
-
function
|
|
579
|
+
function Mn(t) {
|
|
573
580
|
const [e] = t.media;
|
|
574
581
|
return e != null && e.assetId ? e : null;
|
|
575
582
|
}
|
|
576
|
-
function
|
|
583
|
+
function ke(t) {
|
|
577
584
|
if (!Array.isArray(t) || t.length === 0) return [];
|
|
578
|
-
if (
|
|
585
|
+
if (Pe(t)) {
|
|
579
586
|
const e = [];
|
|
580
587
|
for (const i of t) {
|
|
581
|
-
const r =
|
|
588
|
+
const r = Dn(i);
|
|
582
589
|
if (!r) continue;
|
|
583
|
-
const o =
|
|
590
|
+
const o = Mn(i);
|
|
584
591
|
e.push({
|
|
585
592
|
displayMedia: r,
|
|
586
593
|
lightboxMedia: o != null && o.assetId ? o : null
|
|
@@ -593,18 +600,32 @@ function Le(t) {
|
|
|
593
600
|
lightboxMedia: e
|
|
594
601
|
}));
|
|
595
602
|
}
|
|
596
|
-
function
|
|
597
|
-
return t.type === "video" ? !0 : /\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(t.assetId);
|
|
603
|
+
function Dt(t) {
|
|
604
|
+
return zt(t) ? !1 : t.type === "video" ? !0 : /\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(t.assetId);
|
|
598
605
|
}
|
|
599
|
-
function
|
|
606
|
+
function _n({
|
|
600
607
|
media: t,
|
|
601
608
|
className: e,
|
|
602
609
|
style: i,
|
|
603
610
|
gridIndex: r,
|
|
604
611
|
onMediaClick: o
|
|
605
612
|
}) {
|
|
606
|
-
return zt(t) ? /* @__PURE__ */
|
|
607
|
-
|
|
613
|
+
return zt(t) ? /* @__PURE__ */ u(
|
|
614
|
+
Ze,
|
|
615
|
+
{
|
|
616
|
+
media: t,
|
|
617
|
+
fit: i.objectFit === "contain" ? "contain" : "cover",
|
|
618
|
+
silentLoop: !0,
|
|
619
|
+
className: e,
|
|
620
|
+
"data-hive-grid-index": r,
|
|
621
|
+
style: {
|
|
622
|
+
...i,
|
|
623
|
+
cursor: o ? "pointer" : "default"
|
|
624
|
+
},
|
|
625
|
+
onClick: o
|
|
626
|
+
}
|
|
627
|
+
) : Dt(t) ? /* @__PURE__ */ u(
|
|
628
|
+
mn,
|
|
608
629
|
{
|
|
609
630
|
src: t.assetId,
|
|
610
631
|
className: e,
|
|
@@ -619,7 +640,7 @@ function On({
|
|
|
619
640
|
playsInline: !0,
|
|
620
641
|
onClick: o
|
|
621
642
|
}
|
|
622
|
-
) : /* @__PURE__ */
|
|
643
|
+
) : /* @__PURE__ */ u(
|
|
623
644
|
"img",
|
|
624
645
|
{
|
|
625
646
|
src: t.assetId,
|
|
@@ -634,32 +655,32 @@ function On({
|
|
|
634
655
|
}
|
|
635
656
|
);
|
|
636
657
|
}
|
|
637
|
-
function
|
|
658
|
+
function Vn({
|
|
638
659
|
src: t,
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
onTransitionEnd: g
|
|
660
|
+
onMediaElement: e,
|
|
661
|
+
wrapperStyle: i,
|
|
662
|
+
videoStyle: r,
|
|
663
|
+
onLoadedMetadata: o,
|
|
664
|
+
onTransitionEnd: l
|
|
645
665
|
}) {
|
|
646
|
-
const
|
|
647
|
-
return
|
|
648
|
-
const
|
|
649
|
-
return
|
|
650
|
-
|
|
666
|
+
const g = w(null);
|
|
667
|
+
return B(() => {
|
|
668
|
+
const a = g.current;
|
|
669
|
+
return e == null || e(a ?? null), () => {
|
|
670
|
+
a == null || a.pause(), e == null || e(null);
|
|
651
671
|
};
|
|
652
|
-
}, [t,
|
|
672
|
+
}, [t, e]), /* @__PURE__ */ u("div", { style: i, onTransitionEnd: l, children: /* @__PURE__ */ u(
|
|
653
673
|
"video",
|
|
654
674
|
{
|
|
655
|
-
ref:
|
|
675
|
+
ref: g,
|
|
656
676
|
src: t,
|
|
657
|
-
|
|
677
|
+
muted: !0,
|
|
678
|
+
autoPlay: !0,
|
|
679
|
+
loop: !0,
|
|
658
680
|
playsInline: !0,
|
|
659
681
|
preload: "auto",
|
|
660
|
-
onLoadedMetadata:
|
|
661
|
-
|
|
662
|
-
style: o
|
|
682
|
+
onLoadedMetadata: o,
|
|
683
|
+
style: r
|
|
663
684
|
},
|
|
664
685
|
t
|
|
665
686
|
) });
|
|
@@ -670,11 +691,13 @@ function ce({
|
|
|
670
691
|
onTransitionEnd: i,
|
|
671
692
|
onMeasure: r
|
|
672
693
|
}) {
|
|
673
|
-
return zt(t) ? /* @__PURE__ */
|
|
694
|
+
return zt(t) ? /* @__PURE__ */ u("img", { src: t.thumbnail, alt: t.name, style: e, onTransitionEnd: i }) : Dt(t) ? /* @__PURE__ */ u(
|
|
674
695
|
"video",
|
|
675
696
|
{
|
|
676
697
|
src: t.assetId,
|
|
677
698
|
muted: !0,
|
|
699
|
+
autoPlay: !0,
|
|
700
|
+
loop: !0,
|
|
678
701
|
playsInline: !0,
|
|
679
702
|
preload: "auto",
|
|
680
703
|
style: e,
|
|
@@ -684,7 +707,7 @@ function ce({
|
|
|
684
707
|
},
|
|
685
708
|
onTransitionEnd: i
|
|
686
709
|
}
|
|
687
|
-
) : /* @__PURE__ */
|
|
710
|
+
) : /* @__PURE__ */ u(
|
|
688
711
|
"img",
|
|
689
712
|
{
|
|
690
713
|
src: t.assetId,
|
|
@@ -698,7 +721,7 @@ function ce({
|
|
|
698
721
|
}
|
|
699
722
|
);
|
|
700
723
|
}
|
|
701
|
-
function
|
|
724
|
+
function Bn({
|
|
702
725
|
prefix: t,
|
|
703
726
|
items: e,
|
|
704
727
|
index: i,
|
|
@@ -707,366 +730,365 @@ function Dn({
|
|
|
707
730
|
isEditor: l,
|
|
708
731
|
isEditMode: g,
|
|
709
732
|
isPreviewMode: a,
|
|
710
|
-
canNavigate:
|
|
711
|
-
lightboxEntries:
|
|
712
|
-
entryIdx:
|
|
713
|
-
layoutId:
|
|
714
|
-
sourceRect:
|
|
715
|
-
resolveCloseSourceRect:
|
|
716
|
-
onClose:
|
|
717
|
-
onPrev:
|
|
718
|
-
onNext:
|
|
733
|
+
canNavigate: W,
|
|
734
|
+
lightboxEntries: S,
|
|
735
|
+
entryIdx: rt,
|
|
736
|
+
layoutId: G,
|
|
737
|
+
sourceRect: j,
|
|
738
|
+
resolveCloseSourceRect: Rt,
|
|
739
|
+
onClose: Mt,
|
|
740
|
+
onPrev: _t,
|
|
741
|
+
onNext: Vt
|
|
719
742
|
}) {
|
|
720
|
-
const
|
|
721
|
-
}),
|
|
722
|
-
const n = yt ?
|
|
723
|
-
return n && n.assetId !==
|
|
724
|
-
})() : null,
|
|
725
|
-
const n = yt ?
|
|
726
|
-
return n && n.assetId !==
|
|
727
|
-
})() : null, Pt =
|
|
728
|
-
if (!n || !s || !
|
|
729
|
-
const c =
|
|
730
|
-
(y == null ? void 0 : y.width) === s && (y == null ? void 0 : y.height) ===
|
|
731
|
-
}, []),
|
|
743
|
+
const Jt = w(null), Tt = w(null), Ht = w(null), Et = w(/* @__PURE__ */ new Map()), [Y, Ft] = $(0), ot = w(null), xt = w(0), O = w(0), N = w("none"), q = w(!1), U = w(!1), st = w(!1), lt = w(null), L = w(null), Ct = w(null), dt = w(() => {
|
|
744
|
+
}), Z = w(null), z = w(null), ft = w(null), at = w(!1), [A, bt] = $(null), [R, Qt] = $(be), [de, fe] = $(0), [h, ht] = $("opening"), [K, It] = $(0), [Bt, k] = $(0), [X, he] = $(!1), [J, gt] = $(null), [St, pt] = $(null), [x, v] = $(null), [mt, T] = $(!1), [wt, Gt] = $(null), [Xt, Q] = $(!1), Lt = w(!1), [D, C] = $(!1), [tn, Ae] = $(!1), Re = w(i), Te = w(void 0), d = e[i], He = d ? Dt(d) : !1, Ee = d ? zt(d) : !1, vt = Bt !== 0 || X, ge = !g && (!l || !!a), ct = W && !g, yt = S.length > 1, Nt = m((n, s) => e.length <= 1 ? null : e[(n + s + e.length) % e.length] ?? null, [e]), H = yt ? Kt(S, rt, -1) : Nt(i, -1), E = yt ? Kt(S, rt, 1) : Nt(i, 1), pe = J === -1 && vt ? yt && St !== null ? Kt(S, St, -1) : x !== null ? Nt(x, -1) : null : null, me = J === 1 && vt ? yt && St !== null ? Kt(S, St, 1) : x !== null ? Nt(x, 1) : null : null, en = pe && pe.assetId !== (H == null ? void 0 : H.assetId) ? pe : null, nn = me && me.assetId !== (E == null ? void 0 : E.assetId) ? me : null, rn = H && ct ? (() => {
|
|
745
|
+
const n = yt ? qe(S, rt, -1) : e.length > 2 ? Nt((i - 1 + e.length) % e.length, -1) : null;
|
|
746
|
+
return n && n.assetId !== H.assetId ? n : null;
|
|
747
|
+
})() : null, on = E && ct ? (() => {
|
|
748
|
+
const n = yt ? qe(S, rt, 1) : e.length > 2 ? Nt((i + 1) % e.length, 1) : null;
|
|
749
|
+
return n && n.assetId !== E.assetId ? n : null;
|
|
750
|
+
})() : null, Pt = en ?? rn, te = nn ?? on, $t = m((n, s, f) => {
|
|
751
|
+
if (!n || !s || !f) return;
|
|
752
|
+
const c = Et.current, y = c.get(n);
|
|
753
|
+
(y == null ? void 0 : y.width) === s && (y == null ? void 0 : y.height) === f || (c.set(n, { width: s, height: f }), Ft((_) => _ + 1));
|
|
754
|
+
}, []), Wt = m((n) => {
|
|
732
755
|
if (!(n != null && n.assetId)) return null;
|
|
733
|
-
const s =
|
|
734
|
-
return
|
|
735
|
-
}, [
|
|
736
|
-
if (!
|
|
737
|
-
const n =
|
|
756
|
+
const s = Et.current.get(n.assetId);
|
|
757
|
+
return Fn(Tt.current, s);
|
|
758
|
+
}, [Y, de]), ee = m(() => {
|
|
759
|
+
if (!d) return;
|
|
760
|
+
const n = Wt(d);
|
|
738
761
|
if (n) {
|
|
739
762
|
bt(n);
|
|
740
763
|
return;
|
|
741
764
|
}
|
|
742
|
-
const s =
|
|
743
|
-
s && bt(
|
|
744
|
-
}, [
|
|
765
|
+
const s = Tt.current;
|
|
766
|
+
s && bt(Ue(s));
|
|
767
|
+
}, [d, Wt]), ne = m((n) => {
|
|
745
768
|
if (yt) {
|
|
746
|
-
const s =
|
|
747
|
-
|
|
769
|
+
const s = S.length;
|
|
770
|
+
pt((rt + n + s) % s), v(null);
|
|
748
771
|
return;
|
|
749
772
|
}
|
|
750
|
-
e.length > 1 && (v((i + n + e.length) % e.length),
|
|
751
|
-
}, [yt,
|
|
752
|
-
|
|
753
|
-
}, []),
|
|
754
|
-
|
|
755
|
-
}, []),
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
},
|
|
759
|
-
}, [
|
|
760
|
-
const n =
|
|
773
|
+
e.length > 1 && (v((i + n + e.length) % e.length), pt(null));
|
|
774
|
+
}, [yt, S.length, rt, e.length, i]), F = m((n) => {
|
|
775
|
+
st.current = n, he(n);
|
|
776
|
+
}, []), b = m(() => {
|
|
777
|
+
lt.current !== null && (window.clearTimeout(lt.current), lt.current = null);
|
|
778
|
+
}, []), Fe = m(() => {
|
|
779
|
+
b(), lt.current = window.setTimeout(() => {
|
|
780
|
+
b(), F(!1);
|
|
781
|
+
}, Zt + 32);
|
|
782
|
+
}, [b, F]), Ce = m(() => {
|
|
783
|
+
const n = Jt.current;
|
|
761
784
|
if (!n) {
|
|
762
|
-
|
|
785
|
+
Qt({
|
|
763
786
|
left: 0,
|
|
764
787
|
top: 0,
|
|
765
|
-
width: typeof window < "u" ? window.innerWidth :
|
|
766
|
-
height: typeof window < "u" ? window.innerHeight :
|
|
788
|
+
width: typeof window < "u" ? window.innerWidth : be.width,
|
|
789
|
+
height: typeof window < "u" ? window.innerHeight : be.height
|
|
767
790
|
});
|
|
768
791
|
return;
|
|
769
792
|
}
|
|
770
793
|
const s = n.getBoundingClientRect();
|
|
771
|
-
|
|
794
|
+
Qt({
|
|
772
795
|
left: s.left,
|
|
773
796
|
top: s.top,
|
|
774
797
|
width: s.width,
|
|
775
798
|
height: s.height
|
|
776
799
|
});
|
|
777
|
-
}, []),
|
|
778
|
-
if (
|
|
779
|
-
if (
|
|
780
|
-
return `translate(${
|
|
781
|
-
if (
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
784
|
-
const { x: c, y } =
|
|
800
|
+
}, []), Ne = m((n, s) => {
|
|
801
|
+
if (vt) {
|
|
802
|
+
if (D && !X)
|
|
803
|
+
return `translate(${Bt}px, 0px)`;
|
|
804
|
+
if (X && J !== null) {
|
|
805
|
+
const f = Wt(n);
|
|
806
|
+
if (!f) return;
|
|
807
|
+
const { x: c, y } = On(f, s, J, R);
|
|
785
808
|
return `translate(${c}px, ${y}px)`;
|
|
786
809
|
}
|
|
787
|
-
if (
|
|
810
|
+
if (X)
|
|
788
811
|
return "translate(0px, 0px)";
|
|
789
812
|
}
|
|
790
813
|
}, [
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
]),
|
|
799
|
-
const n =
|
|
800
|
-
|
|
801
|
-
}, [
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
},
|
|
805
|
-
}, [
|
|
806
|
-
|
|
807
|
-
}, [
|
|
808
|
-
if (!(!
|
|
809
|
-
if (
|
|
810
|
-
if (
|
|
811
|
-
|
|
814
|
+
vt,
|
|
815
|
+
D,
|
|
816
|
+
X,
|
|
817
|
+
Bt,
|
|
818
|
+
J,
|
|
819
|
+
R,
|
|
820
|
+
Wt
|
|
821
|
+
]), jt = m(() => {
|
|
822
|
+
const n = L.current;
|
|
823
|
+
L.current = null, b(), F(!1), gt(null), pt(null), v(null), k(0), C(!1), q.current = !1, O.current = 0, N.current = "none", n === -1 ? _t() : n === 1 && Vt();
|
|
824
|
+
}, [b, F, _t, Vt]), ie = m(() => {
|
|
825
|
+
b(), lt.current = window.setTimeout(() => {
|
|
826
|
+
L.current !== null && jt();
|
|
827
|
+
}, Zt + 32);
|
|
828
|
+
}, [b, jt]), We = m(() => {
|
|
829
|
+
b(), L.current = null, F(!1), gt(null), pt(null), v(null), k(0), C(!1), q.current = !1, O.current = 0, N.current = "none";
|
|
830
|
+
}, [b, F]), je = m((n) => {
|
|
831
|
+
if (!(!ct || !A)) {
|
|
832
|
+
if (st.current) {
|
|
833
|
+
if (L.current === n) {
|
|
834
|
+
Ct.current = n, jt();
|
|
812
835
|
return;
|
|
813
836
|
}
|
|
814
|
-
|
|
837
|
+
We();
|
|
815
838
|
}
|
|
816
|
-
|
|
839
|
+
b(), ne(n), L.current = n, gt(n), F(!0), ie();
|
|
817
840
|
}
|
|
818
841
|
}, [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
842
|
+
ct,
|
|
843
|
+
A,
|
|
844
|
+
jt,
|
|
845
|
+
We,
|
|
846
|
+
b,
|
|
824
847
|
ne,
|
|
825
848
|
F,
|
|
826
849
|
ie
|
|
827
850
|
]);
|
|
828
|
-
|
|
829
|
-
const
|
|
830
|
-
|
|
851
|
+
dt.current = je;
|
|
852
|
+
const ut = m(() => {
|
|
853
|
+
Z.current = null, at.current = !1, z.current !== null && (window.clearInterval(z.current), z.current = null), ft.current !== null && (window.clearTimeout(ft.current), ft.current = null);
|
|
831
854
|
}, []), we = m((n) => {
|
|
832
|
-
|
|
833
|
-
const s =
|
|
834
|
-
|
|
835
|
-
|
|
855
|
+
z.current !== null && window.clearInterval(z.current);
|
|
856
|
+
const s = at.current ? kn : Ln;
|
|
857
|
+
z.current = window.setInterval(() => {
|
|
858
|
+
dt.current(n);
|
|
836
859
|
}, s);
|
|
837
|
-
}, []),
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
},
|
|
841
|
-
}, [
|
|
842
|
-
const n =
|
|
860
|
+
}, []), Oe = m((n) => {
|
|
861
|
+
Z.current !== n && (ut(), Z.current = n, at.current = !1, dt.current(n), we(n), ft.current = window.setTimeout(() => {
|
|
862
|
+
ft.current = null, Z.current === n && (at.current = !0, we(n));
|
|
863
|
+
}, Sn));
|
|
864
|
+
}, [ut, we]), P = m(() => {
|
|
865
|
+
const n = Tt.current;
|
|
843
866
|
if (!n) return;
|
|
844
|
-
const s =
|
|
845
|
-
if (
|
|
846
|
-
bt(
|
|
867
|
+
const s = d == null ? void 0 : d.assetId, f = s ? Et.current.get(s) : void 0;
|
|
868
|
+
if (f != null && f.width && (f != null && f.height)) {
|
|
869
|
+
bt(Se(n, f.width, f.height));
|
|
847
870
|
return;
|
|
848
871
|
}
|
|
849
|
-
const c =
|
|
872
|
+
const c = Ht.current;
|
|
850
873
|
if (c && s && (c.src === s || c.currentSrc === s)) {
|
|
851
|
-
const { width:
|
|
852
|
-
if (
|
|
853
|
-
$t(s,
|
|
874
|
+
const { width: _, height: p } = En(c);
|
|
875
|
+
if (_ && p) {
|
|
876
|
+
$t(s, _, p), bt(Se(n, _, p));
|
|
854
877
|
return;
|
|
855
878
|
}
|
|
856
879
|
}
|
|
857
|
-
const y =
|
|
880
|
+
const y = Ue(n);
|
|
858
881
|
!y.width || !y.height || bt(y);
|
|
859
|
-
}, [
|
|
860
|
-
if (
|
|
882
|
+
}, [d == null ? void 0 : d.assetId, $t]), ze = m((n) => {
|
|
883
|
+
if (Ht.current = n, !!n) {
|
|
861
884
|
if (n instanceof HTMLVideoElement) {
|
|
862
|
-
n.readyState >= 1 && n.videoWidth > 0 &&
|
|
885
|
+
n.readyState >= 1 && n.videoWidth > 0 && P();
|
|
863
886
|
return;
|
|
864
887
|
}
|
|
865
|
-
n.complete && n.naturalWidth > 0 &&
|
|
888
|
+
n.complete && n.naturalWidth > 0 && P();
|
|
866
889
|
}
|
|
867
|
-
}, [
|
|
868
|
-
|
|
869
|
-
}, [
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
const n =
|
|
873
|
-
return n &&
|
|
874
|
-
|
|
890
|
+
}, [P]), Yt = m(() => {
|
|
891
|
+
Ce(), P(), fe((n) => n + 1);
|
|
892
|
+
}, [Ce, P]);
|
|
893
|
+
B(() => {
|
|
894
|
+
Yt();
|
|
895
|
+
const n = Tt.current, s = Jt.current, f = new ResizeObserver(() => Yt());
|
|
896
|
+
return n && f.observe(n), s && f.observe(s), window.addEventListener("resize", Yt), () => {
|
|
897
|
+
f.disconnect(), window.removeEventListener("resize", Yt);
|
|
875
898
|
};
|
|
876
|
-
}, [
|
|
877
|
-
if (!
|
|
878
|
-
const n =
|
|
899
|
+
}, [Yt, i, G]), le(() => {
|
|
900
|
+
if (!d) return;
|
|
901
|
+
const n = Ht.current;
|
|
879
902
|
if (n) {
|
|
880
903
|
if (n instanceof HTMLImageElement && n.complete && n.naturalWidth > 0) {
|
|
881
|
-
|
|
904
|
+
P();
|
|
882
905
|
return;
|
|
883
906
|
}
|
|
884
|
-
n instanceof HTMLVideoElement && n.readyState >= 1 && n.videoWidth > 0 &&
|
|
907
|
+
n instanceof HTMLVideoElement && n.readyState >= 1 && n.videoWidth > 0 && P();
|
|
885
908
|
}
|
|
886
|
-
}, [
|
|
909
|
+
}, [d == null ? void 0 : d.assetId, i, P]), B(() => {
|
|
887
910
|
ee();
|
|
888
|
-
}, [ee,
|
|
889
|
-
const n = /* @__PURE__ */ new Set(), s = [],
|
|
911
|
+
}, [ee, Y]), B(() => {
|
|
912
|
+
const n = /* @__PURE__ */ new Set(), s = [], f = (c) => {
|
|
890
913
|
!(c != null && c.assetId) || n.has(c.assetId) || (n.add(c.assetId), s.push(c));
|
|
891
914
|
};
|
|
892
|
-
e.forEach(
|
|
893
|
-
|
|
915
|
+
e.forEach(f), S.forEach((c) => c.items.forEach(f)), s.forEach((c) => {
|
|
916
|
+
Et.current.has(c.assetId) || Cn(c, $t);
|
|
894
917
|
});
|
|
895
|
-
}, [e,
|
|
896
|
-
if (
|
|
897
|
-
if (!
|
|
898
|
-
|
|
918
|
+
}, [e, S, $t]), B(() => {
|
|
919
|
+
if (h !== "opening" || !A) return;
|
|
920
|
+
if (!j) {
|
|
921
|
+
ht("open");
|
|
899
922
|
return;
|
|
900
923
|
}
|
|
901
|
-
|
|
924
|
+
T(!1);
|
|
902
925
|
const n = requestAnimationFrame(() => {
|
|
903
926
|
requestAnimationFrame(() => {
|
|
904
|
-
|
|
927
|
+
T(!0), ht("open");
|
|
905
928
|
});
|
|
906
929
|
});
|
|
907
930
|
return () => cancelAnimationFrame(n);
|
|
908
|
-
}, [
|
|
909
|
-
if (
|
|
910
|
-
const n = setTimeout(() =>
|
|
931
|
+
}, [h, A, j]), B(() => {
|
|
932
|
+
if (h !== "closing") return;
|
|
933
|
+
const n = setTimeout(() => Mt(), it);
|
|
911
934
|
return () => clearTimeout(n);
|
|
912
|
-
}, [
|
|
913
|
-
|
|
914
|
-
}, [
|
|
915
|
-
|
|
916
|
-
}, [i,
|
|
917
|
-
const n =
|
|
918
|
-
n !== null && (
|
|
919
|
-
|
|
935
|
+
}, [h, Mt]), B(() => () => {
|
|
936
|
+
b();
|
|
937
|
+
}, [b]), le(() => {
|
|
938
|
+
Re.current === i && Te.current === (d == null ? void 0 : d.assetId) || (b(), L.current = null, gt(null), pt(null), v(null), It(0), k(0), F(!1), Ae(!1), C(!1), xt.current = 0, O.current = 0, N.current = "none", q.current = !1, ot.current = null, U.current = !1, Ht.current = null, ee(), Re.current = i, Te.current = d == null ? void 0 : d.assetId);
|
|
939
|
+
}, [i, d == null ? void 0 : d.assetId, F, b, ee]), le(() => {
|
|
940
|
+
const n = Ct.current;
|
|
941
|
+
n !== null && (Ct.current = null, requestAnimationFrame(() => {
|
|
942
|
+
dt.current(n);
|
|
920
943
|
}));
|
|
921
|
-
}, [i,
|
|
922
|
-
if (
|
|
923
|
-
Lt.current = !1,
|
|
944
|
+
}, [i, rt, d == null ? void 0 : d.assetId]), le(() => {
|
|
945
|
+
if (h === "opening") {
|
|
946
|
+
Lt.current = !1, Q(!1);
|
|
924
947
|
return;
|
|
925
948
|
}
|
|
926
|
-
if (
|
|
927
|
-
if (!
|
|
949
|
+
if (h !== "open" || Lt.current) return;
|
|
950
|
+
if (!H && !E) {
|
|
928
951
|
Lt.current = !0;
|
|
929
952
|
return;
|
|
930
953
|
}
|
|
931
|
-
|
|
954
|
+
Q(!1);
|
|
932
955
|
const n = requestAnimationFrame(() => {
|
|
933
956
|
requestAnimationFrame(() => {
|
|
934
|
-
|
|
957
|
+
Q(!0), Lt.current = !0;
|
|
935
958
|
});
|
|
936
959
|
});
|
|
937
960
|
return () => cancelAnimationFrame(n);
|
|
938
|
-
}, [
|
|
939
|
-
if (
|
|
961
|
+
}, [h, H == null ? void 0 : H.assetId, E == null ? void 0 : E.assetId]), B(() => {
|
|
962
|
+
if (h !== "open") return;
|
|
940
963
|
const n = () => {
|
|
941
|
-
const p = (
|
|
942
|
-
|
|
964
|
+
const p = (I) => {
|
|
965
|
+
I.stopPropagation(), I.preventDefault(), document.removeEventListener("click", p, !0);
|
|
943
966
|
};
|
|
944
967
|
document.addEventListener("click", p, !0);
|
|
945
968
|
}, s = (p) => {
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
},
|
|
949
|
-
if (Math.abs(p) >
|
|
969
|
+
const I = p < 0 ? 1 : -1;
|
|
970
|
+
b(), ne(I), L.current = I, gt(I), F(!0), ie();
|
|
971
|
+
}, f = (p) => {
|
|
972
|
+
if (Math.abs(p) > In && ct) {
|
|
950
973
|
s(p);
|
|
951
974
|
return;
|
|
952
975
|
}
|
|
953
|
-
|
|
976
|
+
L.current = null, gt(null), pt(null), v(null), F(!0), k(0), Fe();
|
|
954
977
|
}, c = (p) => {
|
|
955
|
-
if (p.touches.length !== 1 ||
|
|
956
|
-
const
|
|
957
|
-
|
|
978
|
+
if (p.touches.length !== 1 || st.current) return;
|
|
979
|
+
const I = p.touches[0];
|
|
980
|
+
U.current = !0, ot.current = { x: I.clientX, y: I.clientY }, N.current = "none", O.current = 0, q.current = !1;
|
|
958
981
|
}, y = (p) => {
|
|
959
|
-
if (!
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
962
|
-
if (Math.abs(
|
|
963
|
-
if (Math.abs(
|
|
964
|
-
if (!
|
|
965
|
-
|
|
966
|
-
} else if (
|
|
982
|
+
if (!ot.current || p.touches.length !== 1 || st.current) return;
|
|
983
|
+
const I = p.touches[0], et = I.clientX - ot.current.x, nt = I.clientY - ot.current.y;
|
|
984
|
+
if (N.current === "none") {
|
|
985
|
+
if (Math.abs(et) < 10 && Math.abs(nt) < 10) return;
|
|
986
|
+
if (Math.abs(et) > Math.abs(nt)) {
|
|
987
|
+
if (!ct) return;
|
|
988
|
+
N.current = "horizontal";
|
|
989
|
+
} else if (nt > 0) {
|
|
967
990
|
if (!ge) return;
|
|
968
|
-
|
|
991
|
+
N.current = "vertical";
|
|
969
992
|
} else
|
|
970
993
|
return;
|
|
971
994
|
}
|
|
972
|
-
if (
|
|
973
|
-
|
|
995
|
+
if (N.current === "horizontal") {
|
|
996
|
+
q.current = !0, C(!0), O.current = et, k(et), p.preventDefault();
|
|
974
997
|
return;
|
|
975
998
|
}
|
|
976
|
-
|
|
977
|
-
},
|
|
978
|
-
if (!
|
|
979
|
-
const p =
|
|
980
|
-
if (
|
|
981
|
-
|
|
982
|
-
else if (
|
|
983
|
-
const
|
|
984
|
-
if (ge &&
|
|
985
|
-
const
|
|
986
|
-
xt.current =
|
|
999
|
+
N.current === "vertical" && (q.current = !0, C(!0), xt.current = nt, It(nt), p.preventDefault());
|
|
1000
|
+
}, _ = () => {
|
|
1001
|
+
if (!ot.current) return;
|
|
1002
|
+
const p = N.current, I = q.current;
|
|
1003
|
+
if (I && p === "horizontal")
|
|
1004
|
+
f(O.current), n();
|
|
1005
|
+
else if (I && p === "vertical") {
|
|
1006
|
+
const et = xt.current;
|
|
1007
|
+
if (ge && et > bn) {
|
|
1008
|
+
const nt = window.innerHeight;
|
|
1009
|
+
xt.current = nt, Ae(!0), It(nt), ht("closing");
|
|
987
1010
|
} else
|
|
988
1011
|
xt.current = 0, It(0);
|
|
989
1012
|
n();
|
|
990
|
-
} else p === "horizontal" && Math.abs(
|
|
991
|
-
|
|
1013
|
+
} else p === "horizontal" && Math.abs(O.current) > 0 && (f(O.current), n());
|
|
1014
|
+
ot.current = null, N.current = "none", O.current = 0, q.current = !1, C(!1);
|
|
992
1015
|
};
|
|
993
|
-
return document.addEventListener("touchstart", c, { passive: !0 }), document.addEventListener("touchmove", y, { passive: !1 }), document.addEventListener("touchend",
|
|
994
|
-
document.removeEventListener("touchstart", c), document.removeEventListener("touchmove", y), document.removeEventListener("touchend",
|
|
1016
|
+
return document.addEventListener("touchstart", c, { passive: !0 }), document.addEventListener("touchmove", y, { passive: !1 }), document.addEventListener("touchend", _), document.addEventListener("touchcancel", _), () => {
|
|
1017
|
+
document.removeEventListener("touchstart", c), document.removeEventListener("touchmove", y), document.removeEventListener("touchend", _), document.removeEventListener("touchcancel", _);
|
|
995
1018
|
};
|
|
996
|
-
}, [
|
|
1019
|
+
}, [h, ct, F, Fe, b, ge, ie, ne]);
|
|
997
1020
|
const ve = m(() => {
|
|
998
|
-
const n = (
|
|
999
|
-
n &&
|
|
1000
|
-
}, [
|
|
1001
|
-
|
|
1021
|
+
const n = (Rt == null ? void 0 : Rt()) ?? j ?? null;
|
|
1022
|
+
n && A && (Gt(n), T(!0)), ht("closing");
|
|
1023
|
+
}, [Rt, j, A]);
|
|
1024
|
+
B(() => {
|
|
1002
1025
|
const n = (c) => {
|
|
1003
1026
|
if (c.key === "Escape") {
|
|
1004
|
-
if (l && a ||
|
|
1005
|
-
|
|
1027
|
+
if (l && a || h === "closing") return;
|
|
1028
|
+
ut(), ve();
|
|
1006
1029
|
return;
|
|
1007
1030
|
}
|
|
1008
|
-
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight" ||
|
|
1031
|
+
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight" || h !== "open" || !ct) return;
|
|
1009
1032
|
c.preventDefault();
|
|
1010
1033
|
const y = c.key === "ArrowLeft" ? -1 : 1;
|
|
1011
|
-
c.repeat &&
|
|
1034
|
+
c.repeat && Z.current === y || Oe(y);
|
|
1012
1035
|
}, s = (c) => {
|
|
1013
1036
|
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight") return;
|
|
1014
1037
|
const y = c.key === "ArrowLeft" ? -1 : 1;
|
|
1015
|
-
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1038
|
+
Z.current === y && ut();
|
|
1039
|
+
}, f = () => {
|
|
1040
|
+
ut();
|
|
1018
1041
|
};
|
|
1019
|
-
return window.addEventListener("keydown", n), window.addEventListener("keyup", s), window.addEventListener("blur",
|
|
1020
|
-
window.removeEventListener("keydown", n), window.removeEventListener("keyup", s), window.removeEventListener("blur",
|
|
1042
|
+
return window.addEventListener("keydown", n), window.addEventListener("keyup", s), window.addEventListener("blur", f), () => {
|
|
1043
|
+
window.removeEventListener("keydown", n), window.removeEventListener("keyup", s), window.removeEventListener("blur", f), ut();
|
|
1021
1044
|
};
|
|
1022
1045
|
}, [
|
|
1023
|
-
|
|
1046
|
+
h,
|
|
1024
1047
|
l,
|
|
1025
1048
|
a,
|
|
1026
1049
|
ve,
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
]),
|
|
1031
|
-
|
|
1032
|
-
}, [
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
},
|
|
1036
|
-
if (!(n.propertyName !== "transform" || !
|
|
1037
|
-
if (
|
|
1038
|
-
|
|
1050
|
+
ct,
|
|
1051
|
+
Oe,
|
|
1052
|
+
ut
|
|
1053
|
+
]), B(() => {
|
|
1054
|
+
h !== "open" && ut();
|
|
1055
|
+
}, [h, ut]);
|
|
1056
|
+
const De = () => {
|
|
1057
|
+
h === "closing" || g || ve();
|
|
1058
|
+
}, tt = h === "open", re = h === "closing", sn = K > 0 ? Math.max(0, 1 - K / 500) : 1, ln = K > 0 ? Math.max(0.35, 1 - K / 500) : 1, kt = m((n) => {
|
|
1059
|
+
if (!(n.propertyName !== "transform" || !st.current)) {
|
|
1060
|
+
if (L.current !== null) {
|
|
1061
|
+
jt();
|
|
1039
1062
|
return;
|
|
1040
1063
|
}
|
|
1041
|
-
|
|
1064
|
+
b(), F(!1);
|
|
1042
1065
|
}
|
|
1043
|
-
}, [
|
|
1066
|
+
}, [b, F, jt]), ye = h === "closing" ? wt ?? j : j, an = ye && A && (h === "opening" || re) ? An(ye, A) : void 0, cn = vt && d ? Ne(d, "center") : K > 0 ? `translateY(${K}px)` : an, M = A ? ae(A, R) : null, Me = !!(ye && A), un = Me && (h === "closing" || h === "open" && mt), $e = {
|
|
1044
1067
|
position: "absolute",
|
|
1045
|
-
top:
|
|
1046
|
-
left:
|
|
1047
|
-
width:
|
|
1048
|
-
height:
|
|
1068
|
+
top: M == null ? void 0 : M.top,
|
|
1069
|
+
left: M == null ? void 0 : M.left,
|
|
1070
|
+
width: M == null ? void 0 : M.width,
|
|
1071
|
+
height: M == null ? void 0 : M.height,
|
|
1049
1072
|
objectFit: "contain",
|
|
1050
1073
|
transformOrigin: "top left",
|
|
1051
|
-
transform:
|
|
1052
|
-
opacity:
|
|
1053
|
-
transition:
|
|
1054
|
-
pointerEvents:
|
|
1055
|
-
touchAction: Qt && j ? "none" : void 0,
|
|
1074
|
+
transform: cn,
|
|
1075
|
+
opacity: K > 0 ? ln : Me ? 1 : h === "opening" || re ? 0 : 1,
|
|
1076
|
+
transition: D && !X ? "none" : X ? `transform ${Zt}ms ${V}` : tn ? `transform ${it}ms ${V}, opacity ${it}ms ${V}` : un ? `transform ${it}ms ${V}` : h === "opening" || re ? `opacity ${it}ms ${V}` : "none",
|
|
1077
|
+
pointerEvents: "none",
|
|
1056
1078
|
zIndex: 1,
|
|
1057
|
-
overflow:
|
|
1058
|
-
},
|
|
1079
|
+
overflow: He || Ee ? "hidden" : void 0
|
|
1080
|
+
}, _e = {
|
|
1059
1081
|
width: "100%",
|
|
1060
1082
|
height: "100%",
|
|
1061
1083
|
display: "block",
|
|
1062
1084
|
objectFit: "contain",
|
|
1063
|
-
pointerEvents:
|
|
1064
|
-
}, oe = (n, s,
|
|
1065
|
-
const c =
|
|
1085
|
+
pointerEvents: "none"
|
|
1086
|
+
}, oe = (n, s, f = "adjacent") => {
|
|
1087
|
+
const c = Wt(n);
|
|
1066
1088
|
if (!c) return { display: "none" };
|
|
1067
|
-
const y =
|
|
1068
|
-
start:
|
|
1069
|
-
}, p = ae(
|
|
1089
|
+
const y = f === "far" ? s === "left" ? "far-left" : "far-right" : s === "left" ? "left-adjacent" : "right-adjacent", { start: _ } = J !== null ? Qe(c, y, J, R) : {
|
|
1090
|
+
start: f === "far" ? ue(c, s, R) : Ot(c, s, R)
|
|
1091
|
+
}, p = ae(_, R), I = Ne(n, y), et = !vt && f === "adjacent" && tt && !Xt ? zn(c, s, R) : null, nt = f === "far" && vt && J === (s === "left" ? -1 : 1), dn = D && !X ? !1 : X, fn = f === "adjacent" && tt && Xt && !vt;
|
|
1070
1092
|
return {
|
|
1071
1093
|
position: "absolute",
|
|
1072
1094
|
top: p.top,
|
|
@@ -1074,53 +1096,53 @@ function Dn({
|
|
|
1074
1096
|
width: p.width,
|
|
1075
1097
|
height: p.height,
|
|
1076
1098
|
objectFit: "contain",
|
|
1077
|
-
transform:
|
|
1078
|
-
opacity:
|
|
1079
|
-
transition:
|
|
1099
|
+
transform: I ?? (et ? `translate(${et.x}px, ${et.y}px)` : void 0),
|
|
1100
|
+
opacity: f === "far" ? tt && nt ? 1 : 0 : tt ? 1 : 0,
|
|
1101
|
+
transition: dn ? f === "far" ? `transform ${Zt}ms ${V}` : `transform ${Zt}ms ${V}, opacity ${it}ms ${V}` : fn ? `transform ${it}ms ${V}` : h === "opening" || re ? `opacity ${it}ms ${V}` : "none",
|
|
1080
1102
|
pointerEvents: "none",
|
|
1081
1103
|
zIndex: 1
|
|
1082
1104
|
};
|
|
1083
|
-
},
|
|
1084
|
-
const
|
|
1085
|
-
return
|
|
1086
|
-
},
|
|
1105
|
+
}, Ve = (n, s) => {
|
|
1106
|
+
const f = Wt(n);
|
|
1107
|
+
return f ? jn(Ot(f, s, R), s, R) : null;
|
|
1108
|
+
}, Be = (n) => (s) => {
|
|
1087
1109
|
if (!g) {
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1110
|
+
if (U.current) {
|
|
1111
|
+
U.current = !1;
|
|
1090
1112
|
return;
|
|
1091
1113
|
}
|
|
1092
|
-
s.stopPropagation(),
|
|
1114
|
+
s.stopPropagation(), je(n);
|
|
1093
1115
|
}
|
|
1094
|
-
},
|
|
1095
|
-
return /* @__PURE__ */
|
|
1116
|
+
}, Ge = H ? Ve(H, "left") : null, Xe = E ? Ve(E, "right") : null, qt = Ge ? ae(Ge, R) : null, Ut = Xe ? ae(Xe, R) : null;
|
|
1117
|
+
return /* @__PURE__ */ At(
|
|
1096
1118
|
"div",
|
|
1097
1119
|
{
|
|
1098
|
-
ref:
|
|
1120
|
+
ref: Jt,
|
|
1099
1121
|
className: [
|
|
1100
1122
|
`${t}-lightbox`,
|
|
1101
1123
|
l ? `${t}-lightbox-editor` : "",
|
|
1102
1124
|
g ? `${t}-lightbox-edit-mode` : ""
|
|
1103
1125
|
].filter(Boolean).join(" "),
|
|
1104
1126
|
style: {
|
|
1105
|
-
touchAction:
|
|
1127
|
+
touchAction: h === "open" ? "none" : void 0
|
|
1106
1128
|
},
|
|
1107
|
-
onClick:
|
|
1129
|
+
onClick: De,
|
|
1108
1130
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ u(
|
|
1110
1132
|
"div",
|
|
1111
1133
|
{
|
|
1112
1134
|
style: {
|
|
1113
1135
|
position: "absolute",
|
|
1114
1136
|
inset: 0,
|
|
1115
1137
|
background: o.backgroundColor ?? "#FFFFFF",
|
|
1116
|
-
opacity:
|
|
1117
|
-
transition:
|
|
1138
|
+
opacity: tt ? sn : 0,
|
|
1139
|
+
transition: D ? "none" : `opacity ${it}ms ${V}`,
|
|
1118
1140
|
pointerEvents: "none"
|
|
1119
1141
|
}
|
|
1120
1142
|
}
|
|
1121
1143
|
),
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ At("div", { className: `${t}-lightbox-dismiss-area`, children: [
|
|
1145
|
+
/* @__PURE__ */ At(
|
|
1124
1146
|
"div",
|
|
1125
1147
|
{
|
|
1126
1148
|
style: {
|
|
@@ -1133,8 +1155,8 @@ function Dn({
|
|
|
1133
1155
|
justifyContent: "center"
|
|
1134
1156
|
},
|
|
1135
1157
|
children: [
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ u("div", { style: { height: "10%" } }),
|
|
1159
|
+
/* @__PURE__ */ u(
|
|
1138
1160
|
"div",
|
|
1139
1161
|
{
|
|
1140
1162
|
style: {
|
|
@@ -1144,25 +1166,25 @@ function Dn({
|
|
|
1144
1166
|
justifyContent: "center",
|
|
1145
1167
|
alignItems: "center"
|
|
1146
1168
|
},
|
|
1147
|
-
children: /* @__PURE__ */
|
|
1169
|
+
children: /* @__PURE__ */ u("div", { ref: Tt, style: { width: "100%", height: "100%" } })
|
|
1148
1170
|
}
|
|
1149
1171
|
),
|
|
1150
|
-
/* @__PURE__ */
|
|
1172
|
+
/* @__PURE__ */ u("div", { style: { height: "10%" } })
|
|
1151
1173
|
]
|
|
1152
1174
|
}
|
|
1153
1175
|
),
|
|
1154
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ u(
|
|
1155
1177
|
"div",
|
|
1156
1178
|
{
|
|
1157
1179
|
style: {
|
|
1158
1180
|
position: "absolute",
|
|
1159
1181
|
inset: 0,
|
|
1160
|
-
opacity:
|
|
1161
|
-
transition:
|
|
1182
|
+
opacity: tt ? 1 : 0,
|
|
1183
|
+
transition: D ? "none" : `opacity ${it}ms ${V}`,
|
|
1162
1184
|
pointerEvents: "none"
|
|
1163
1185
|
},
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1165
|
-
|
|
1186
|
+
children: /* @__PURE__ */ u(
|
|
1187
|
+
vn,
|
|
1166
1188
|
{
|
|
1167
1189
|
prefix: t,
|
|
1168
1190
|
entry: r,
|
|
@@ -1170,117 +1192,125 @@ function Dn({
|
|
|
1170
1192
|
isEditor: l,
|
|
1171
1193
|
isEditMode: g,
|
|
1172
1194
|
isPreviewMode: a,
|
|
1173
|
-
onClose:
|
|
1195
|
+
onClose: De
|
|
1174
1196
|
}
|
|
1175
1197
|
)
|
|
1176
1198
|
}
|
|
1177
1199
|
)
|
|
1178
1200
|
] }),
|
|
1179
|
-
|
|
1201
|
+
tt && Pt && /* @__PURE__ */ u(
|
|
1180
1202
|
ce,
|
|
1181
1203
|
{
|
|
1182
1204
|
media: Pt,
|
|
1183
1205
|
style: oe(Pt, "left", "far"),
|
|
1184
1206
|
onMeasure: $t,
|
|
1185
|
-
onTransitionEnd:
|
|
1207
|
+
onTransitionEnd: kt
|
|
1186
1208
|
},
|
|
1187
1209
|
`far-prev-${Pt.assetId}`
|
|
1188
1210
|
),
|
|
1189
|
-
|
|
1190
|
-
/* @__PURE__ */
|
|
1211
|
+
tt && H && /* @__PURE__ */ At(Ie, { children: [
|
|
1212
|
+
/* @__PURE__ */ u(
|
|
1191
1213
|
ce,
|
|
1192
1214
|
{
|
|
1193
|
-
media:
|
|
1194
|
-
style: oe(
|
|
1215
|
+
media: H,
|
|
1216
|
+
style: oe(H, "left"),
|
|
1195
1217
|
onMeasure: $t,
|
|
1196
|
-
onTransitionEnd:
|
|
1218
|
+
onTransitionEnd: kt
|
|
1197
1219
|
},
|
|
1198
|
-
`prev-${
|
|
1220
|
+
`prev-${H.assetId}`
|
|
1199
1221
|
),
|
|
1200
|
-
|
|
1222
|
+
qt && /* @__PURE__ */ u(
|
|
1201
1223
|
"div",
|
|
1202
1224
|
{
|
|
1203
1225
|
style: {
|
|
1204
1226
|
position: "absolute",
|
|
1205
|
-
top:
|
|
1206
|
-
left:
|
|
1207
|
-
width:
|
|
1208
|
-
height:
|
|
1209
|
-
cursor: g ||
|
|
1210
|
-
pointerEvents: g ||
|
|
1227
|
+
top: qt.top,
|
|
1228
|
+
left: qt.left,
|
|
1229
|
+
width: qt.width,
|
|
1230
|
+
height: qt.height,
|
|
1231
|
+
cursor: g || D ? "default" : "pointer",
|
|
1232
|
+
pointerEvents: g || D ? "none" : "auto",
|
|
1211
1233
|
zIndex: 3
|
|
1212
1234
|
},
|
|
1213
|
-
onClick:
|
|
1235
|
+
onClick: Be(-1)
|
|
1214
1236
|
}
|
|
1215
1237
|
)
|
|
1216
1238
|
] }),
|
|
1217
|
-
|
|
1218
|
-
/* @__PURE__ */
|
|
1239
|
+
tt && E && /* @__PURE__ */ At(Ie, { children: [
|
|
1240
|
+
/* @__PURE__ */ u(
|
|
1219
1241
|
ce,
|
|
1220
1242
|
{
|
|
1221
|
-
media:
|
|
1222
|
-
style: oe(
|
|
1243
|
+
media: E,
|
|
1244
|
+
style: oe(E, "right"),
|
|
1223
1245
|
onMeasure: $t,
|
|
1224
|
-
onTransitionEnd:
|
|
1246
|
+
onTransitionEnd: kt
|
|
1225
1247
|
},
|
|
1226
|
-
`next-${
|
|
1248
|
+
`next-${E.assetId}`
|
|
1227
1249
|
),
|
|
1228
|
-
|
|
1250
|
+
Ut && /* @__PURE__ */ u(
|
|
1229
1251
|
"div",
|
|
1230
1252
|
{
|
|
1231
1253
|
style: {
|
|
1232
1254
|
position: "absolute",
|
|
1233
|
-
top:
|
|
1234
|
-
left:
|
|
1235
|
-
width:
|
|
1236
|
-
height:
|
|
1237
|
-
cursor: g ||
|
|
1238
|
-
pointerEvents: g ||
|
|
1255
|
+
top: Ut.top,
|
|
1256
|
+
left: Ut.left,
|
|
1257
|
+
width: Ut.width,
|
|
1258
|
+
height: Ut.height,
|
|
1259
|
+
cursor: g || D ? "default" : "pointer",
|
|
1260
|
+
pointerEvents: g || D ? "none" : "auto",
|
|
1239
1261
|
zIndex: 3
|
|
1240
1262
|
},
|
|
1241
|
-
onClick:
|
|
1263
|
+
onClick: Be(1)
|
|
1242
1264
|
}
|
|
1243
1265
|
)
|
|
1244
1266
|
] }),
|
|
1245
|
-
|
|
1267
|
+
tt && te && /* @__PURE__ */ u(
|
|
1246
1268
|
ce,
|
|
1247
1269
|
{
|
|
1248
1270
|
media: te,
|
|
1249
1271
|
style: oe(te, "right", "far"),
|
|
1250
1272
|
onMeasure: $t,
|
|
1251
|
-
onTransitionEnd:
|
|
1273
|
+
onTransitionEnd: kt
|
|
1252
1274
|
},
|
|
1253
1275
|
`far-next-${te.assetId}`
|
|
1254
1276
|
),
|
|
1255
|
-
|
|
1256
|
-
|
|
1277
|
+
A && d && (Ee ? /* @__PURE__ */ u("div", { style: $e, onTransitionEnd: kt, children: /* @__PURE__ */ u(
|
|
1278
|
+
Ze,
|
|
1279
|
+
{
|
|
1280
|
+
media: d,
|
|
1281
|
+
fit: "contain",
|
|
1282
|
+
lazy: !1,
|
|
1283
|
+
startsAtOnce: !0,
|
|
1284
|
+
style: _e
|
|
1285
|
+
}
|
|
1286
|
+
) }, `${i}-${d.assetId}`) : He ? /* @__PURE__ */ u(
|
|
1287
|
+
Vn,
|
|
1257
1288
|
{
|
|
1258
|
-
src:
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
onTransitionEnd: jt
|
|
1289
|
+
src: d.assetId,
|
|
1290
|
+
onMediaElement: ze,
|
|
1291
|
+
wrapperStyle: $e,
|
|
1292
|
+
videoStyle: _e,
|
|
1293
|
+
onLoadedMetadata: P,
|
|
1294
|
+
onTransitionEnd: kt
|
|
1265
1295
|
},
|
|
1266
|
-
`${i}-${
|
|
1267
|
-
) : /* @__PURE__ */
|
|
1296
|
+
`${i}-${d.assetId}`
|
|
1297
|
+
) : /* @__PURE__ */ u(
|
|
1268
1298
|
"img",
|
|
1269
1299
|
{
|
|
1270
|
-
ref:
|
|
1271
|
-
src:
|
|
1272
|
-
alt:
|
|
1273
|
-
onLoad:
|
|
1274
|
-
onTransitionEnd:
|
|
1275
|
-
style:
|
|
1300
|
+
ref: ze,
|
|
1301
|
+
src: d.assetId,
|
|
1302
|
+
alt: d.name,
|
|
1303
|
+
onLoad: P,
|
|
1304
|
+
onTransitionEnd: kt,
|
|
1305
|
+
style: $e
|
|
1276
1306
|
},
|
|
1277
|
-
`${i}-${
|
|
1307
|
+
`${i}-${d.assetId}`
|
|
1278
1308
|
))
|
|
1279
1309
|
]
|
|
1280
1310
|
}
|
|
1281
1311
|
);
|
|
1282
1312
|
}
|
|
1283
|
-
function
|
|
1313
|
+
function ti({
|
|
1284
1314
|
settings: t,
|
|
1285
1315
|
content: e,
|
|
1286
1316
|
isEditor: i,
|
|
@@ -1289,10 +1319,10 @@ function Zn({
|
|
|
1289
1319
|
layoutId: l,
|
|
1290
1320
|
portalId: g
|
|
1291
1321
|
}) {
|
|
1292
|
-
const { prefix: a } =
|
|
1322
|
+
const { prefix: a } = hn(), { gridLayout: W, verticalGap: S, align: rt = "top", imageDisplay: G } = t, j = (G == null ? void 0 : G.display) === "cover", Rt = (G == null ? void 0 : G.ratioValue) ?? "1:1", Mt = (G == null ? void 0 : G.reversed) ?? !1, [_t, Vt] = Rt.split(":").map(Number), Ht = `${Mt ? Vt : _t} / ${Mt ? _t : Vt}`, Et = W.entryWidth ?? 0.2, Y = W.columnsCount, Ft = se(Et, i), ot = se(W.horizontalGap ?? 0, i), xt = Ft, O = Ft, N = {
|
|
1293
1323
|
width: xt,
|
|
1294
|
-
...
|
|
1295
|
-
},
|
|
1324
|
+
...j ? { aspectRatio: Ht, height: "auto", overflow: "hidden" } : { height: "auto" }
|
|
1325
|
+
}, q = j ? {
|
|
1296
1326
|
objectFit: "cover",
|
|
1297
1327
|
pointerEvents: "auto",
|
|
1298
1328
|
width: "100%",
|
|
@@ -1304,116 +1334,116 @@ function Zn({
|
|
|
1304
1334
|
width: "auto",
|
|
1305
1335
|
height: "auto",
|
|
1306
1336
|
maxWidth: "100%"
|
|
1307
|
-
},
|
|
1337
|
+
}, U = w(null), [st, lt] = $(!1), [L, Ct] = $([]), [dt, Z] = $(0), [z, ft] = $(0), [at, A] = $(null), [bt, R] = $({
|
|
1308
1338
|
title1: "",
|
|
1309
1339
|
title2: "",
|
|
1310
1340
|
title3: ""
|
|
1311
|
-
}),
|
|
1312
|
-
const x = {}, v =
|
|
1341
|
+
}), Qt = (() => {
|
|
1342
|
+
const x = {}, v = U.current ? getComputedStyle(U.current).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
1313
1343
|
return v && (x["--cntrl-article-width"] = v), x;
|
|
1314
|
-
})(), de = !i || r || o, fe =
|
|
1344
|
+
})(), de = !i || r || o, fe = xe(() => xn(a), [a]), h = e ?? [], ht = h.length % Y || Y, K = ht < Y && h.length > 0, It = h.length - ht, Bt = K ? Math.floor((Y - ht) / 2) + 1 : 1, k = xe(() => Tn(h), [h]), X = xe(() => Nn(h), [h]), he = (x, v, mt) => {
|
|
1315
1345
|
if (i && !o && !r) return;
|
|
1316
|
-
const
|
|
1317
|
-
if (
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1320
|
-
},
|
|
1321
|
-
|
|
1322
|
-
}, []),
|
|
1323
|
-
const x =
|
|
1324
|
-
return !x || !
|
|
1325
|
-
|
|
1346
|
+
const T = k.findIndex((Gt) => Gt.gridIndex === x);
|
|
1347
|
+
if (T < 0) return;
|
|
1348
|
+
const wt = k[T];
|
|
1349
|
+
ft(T), Ct(wt.items), Z(v), R(wt.entry), A(mt ?? null), lt(!0);
|
|
1350
|
+
}, J = m(() => {
|
|
1351
|
+
lt(!1), A(null);
|
|
1352
|
+
}, []), gt = m(() => {
|
|
1353
|
+
const x = k[z];
|
|
1354
|
+
return !x || !U.current ? at : Rn(
|
|
1355
|
+
U.current,
|
|
1326
1356
|
x.gridIndex,
|
|
1327
|
-
|
|
1328
|
-
) ??
|
|
1329
|
-
}, [
|
|
1330
|
-
if (
|
|
1331
|
-
const v =
|
|
1332
|
-
|
|
1357
|
+
j ? "cover" : "contain"
|
|
1358
|
+
) ?? at;
|
|
1359
|
+
}, [k, z, at, j]), St = m((x) => {
|
|
1360
|
+
if (k.length > 1) {
|
|
1361
|
+
const v = k.length, mt = (z + x + v) % v, T = k[mt], wt = Math.min(dt, T.items.length - 1);
|
|
1362
|
+
ft(mt), Ct(T.items), Z(wt), R(T.entry);
|
|
1333
1363
|
return;
|
|
1334
1364
|
}
|
|
1335
|
-
|
|
1336
|
-
}, [
|
|
1337
|
-
return
|
|
1338
|
-
if (!
|
|
1365
|
+
Z((v) => (v + x + L.length) % L.length);
|
|
1366
|
+
}, [k, z, dt, L.length]), pt = k.length > 1 || L.length > 1;
|
|
1367
|
+
return B(() => {
|
|
1368
|
+
if (!st || typeof document > "u") return;
|
|
1339
1369
|
const x = document.body.style.overflow;
|
|
1340
1370
|
return document.body.style.overflow = "hidden", () => {
|
|
1341
1371
|
document.body.style.overflow = x;
|
|
1342
1372
|
};
|
|
1343
|
-
}, [
|
|
1344
|
-
!i || o || r ||
|
|
1345
|
-
}, [i, o, r]), /* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1373
|
+
}, [st]), B(() => {
|
|
1374
|
+
!i || o || r || lt(!1);
|
|
1375
|
+
}, [i, o, r]), /* @__PURE__ */ At(Ie, { children: [
|
|
1376
|
+
/* @__PURE__ */ u("style", { dangerouslySetInnerHTML: { __html: fe } }),
|
|
1377
|
+
/* @__PURE__ */ u(Wn, { mediaList: X }),
|
|
1378
|
+
/* @__PURE__ */ u(
|
|
1349
1379
|
"div",
|
|
1350
1380
|
{
|
|
1351
|
-
ref:
|
|
1352
|
-
className: `${a}-wrapper ${a}-align-entries ${a}-image-align-${
|
|
1381
|
+
ref: U,
|
|
1382
|
+
className: `${a}-wrapper ${a}-align-entries ${a}-image-align-${rt}`.trim(),
|
|
1353
1383
|
style: {
|
|
1354
|
-
gridTemplateColumns: `repeat(${
|
|
1384
|
+
gridTemplateColumns: `repeat(${Y}, ${Ft})`,
|
|
1355
1385
|
rowGap: 0,
|
|
1356
|
-
columnGap:
|
|
1357
|
-
width: se(
|
|
1358
|
-
[`--${a}-align-entries-row-gap`]: se(
|
|
1386
|
+
columnGap: ot,
|
|
1387
|
+
width: se(W.wrapperWidth ?? 0, i),
|
|
1388
|
+
[`--${a}-align-entries-row-gap`]: se(S ?? 0, i)
|
|
1359
1389
|
},
|
|
1360
|
-
children:
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1390
|
+
children: h.map((x, v) => {
|
|
1391
|
+
const mt = Le(x.gallery), T = ke(mt), wt = T.filter((C) => C.lightboxMedia).map((C) => C.lightboxMedia), Gt = Math.floor(v / Y) === Math.ceil(h.length / Y) - 1, Xt = K && v >= It ? `${Bt + (v - It)}` : void 0, Q = T[0], Lt = Q != null && Q.lightboxMedia ? wt.findIndex((C) => C.assetId === Q.lightboxMedia.assetId) : -1, D = /* @__PURE__ */ u("div", { className: `${a}-item-image-wrapper`, style: N, children: T.length > 0 && /* @__PURE__ */ u(
|
|
1392
|
+
_n,
|
|
1363
1393
|
{
|
|
1364
|
-
media:
|
|
1394
|
+
media: Q.displayMedia,
|
|
1365
1395
|
gridIndex: v,
|
|
1366
|
-
className: `${a}-item-${
|
|
1367
|
-
style:
|
|
1368
|
-
onMediaClick: de && Lt >= 0 ? (
|
|
1396
|
+
className: `${a}-item-${Dt(Q.displayMedia) ? "video" : "image"}`.trim(),
|
|
1397
|
+
style: q,
|
|
1398
|
+
onMediaClick: de && Lt >= 0 ? (C) => he(
|
|
1369
1399
|
v,
|
|
1370
1400
|
Lt,
|
|
1371
|
-
|
|
1401
|
+
Ke(C.currentTarget, j ? "cover" : "contain")
|
|
1372
1402
|
) : void 0
|
|
1373
1403
|
}
|
|
1374
1404
|
) });
|
|
1375
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ u("div", { className: `${a}-item`, children: /* @__PURE__ */ At(
|
|
1376
1406
|
"div",
|
|
1377
1407
|
{
|
|
1378
1408
|
className: [
|
|
1379
1409
|
o ? `${a}-item-inner` : `${a}-item-inner-hidden`,
|
|
1380
|
-
|
|
1410
|
+
Gt ? `${a}-item-inner-last-row` : ""
|
|
1381
1411
|
].filter(Boolean).join(" "),
|
|
1382
1412
|
style: {
|
|
1383
|
-
width:
|
|
1384
|
-
...
|
|
1413
|
+
width: Ft,
|
|
1414
|
+
...Xt ? { gridColumn: Xt } : {}
|
|
1385
1415
|
},
|
|
1386
1416
|
children: [
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ u("div", { className: `${a}-item-title-row`, children: /* @__PURE__ */ u("div", { style: { height: 0, width: O } }) }),
|
|
1418
|
+
/* @__PURE__ */ u("a", { className: `${a}-item-image-link`, children: D }),
|
|
1419
|
+
/* @__PURE__ */ u("div", { className: `${a}-item-subtitle-row`, children: /* @__PURE__ */ u("div", { style: { height: 0, width: O } }) })
|
|
1390
1420
|
]
|
|
1391
1421
|
}
|
|
1392
1422
|
) }, v);
|
|
1393
1423
|
})
|
|
1394
1424
|
}
|
|
1395
1425
|
),
|
|
1396
|
-
|
|
1426
|
+
st && typeof document < "u" && (() => {
|
|
1397
1427
|
const x = (g ? document.getElementById(g) : null) ?? document.body;
|
|
1398
|
-
return
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
|
|
1428
|
+
return wn(
|
|
1429
|
+
/* @__PURE__ */ u("div", { style: Qt, "data-selection": "none", children: /* @__PURE__ */ u(
|
|
1430
|
+
Bn,
|
|
1401
1431
|
{
|
|
1402
1432
|
prefix: a,
|
|
1403
|
-
items:
|
|
1404
|
-
index:
|
|
1433
|
+
items: L,
|
|
1434
|
+
index: dt,
|
|
1405
1435
|
entry: bt,
|
|
1406
1436
|
settings: t,
|
|
1407
1437
|
isEditor: i,
|
|
1408
1438
|
isEditMode: o,
|
|
1409
1439
|
isPreviewMode: r,
|
|
1410
|
-
canNavigate:
|
|
1411
|
-
lightboxEntries:
|
|
1412
|
-
entryIdx:
|
|
1440
|
+
canNavigate: pt,
|
|
1441
|
+
lightboxEntries: k,
|
|
1442
|
+
entryIdx: z,
|
|
1413
1443
|
layoutId: l,
|
|
1414
|
-
sourceRect:
|
|
1415
|
-
resolveCloseSourceRect:
|
|
1416
|
-
onClose:
|
|
1444
|
+
sourceRect: at,
|
|
1445
|
+
resolveCloseSourceRect: gt,
|
|
1446
|
+
onClose: J,
|
|
1417
1447
|
onPrev: () => St(-1),
|
|
1418
1448
|
onNext: () => St(1)
|
|
1419
1449
|
}
|
|
@@ -1424,5 +1454,5 @@ function Zn({
|
|
|
1424
1454
|
] });
|
|
1425
1455
|
}
|
|
1426
1456
|
export {
|
|
1427
|
-
|
|
1457
|
+
ti as Hive
|
|
1428
1458
|
};
|