@cntrl-site/components 1.0.118-alpha.3 → 1.0.118-alpha.4
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/{Burger-C3yVbQcq.js → Burger-B4kXX9aY.js} +1 -1
- package/dist/{Burger-BkVgNMGU.mjs → Burger-DyORh_vF.mjs} +1 -1
- package/dist/{ChroniclesComponent-DD3tqNNm.mjs → ChroniclesComponent-DVoJ0kdT.mjs} +442 -512
- package/dist/ChroniclesComponent-Nm_yIRmr.js +1 -0
- package/dist/Components/Grid/Grid.d.ts +7 -25
- package/dist/Components/PopupMenu/PopupMenu.d.ts +73 -0
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +594 -0
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +203 -0
- package/dist/Components/PopupMenu/popupMenuSnap.d.ts +61 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +7 -0
- package/dist/{ControlSlider-BBAXRDLP.mjs → ControlSlider-3w-bHQEg.mjs} +4 -3
- package/dist/ControlSlider-DB4nbVLT.js +1 -0
- package/dist/{FAQ-DLh63Utr.js → FAQ-7HEkaoU6.js} +1 -1
- package/dist/{FAQ-CJHCMSBa.mjs → FAQ-GmiwRdFq.mjs} +1 -1
- package/dist/Grid-BuRdth9A.mjs +1622 -0
- package/dist/Grid-tqSSYh2-.js +408 -0
- package/dist/{Hive-CzabuuCc.js → Hive-34KvKNsa.js} +1 -1
- package/dist/{Hive-DyxYd5eg.mjs → Hive-7xHXyMM1.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DhEeFKWs.mjs → HiveLightboxTitles-BCoL46-V.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DlyptAaK.js → HiveLightboxTitles-DEeyQGcf.js} +1 -1
- package/dist/{Lightbox-DZckgBzK.js → Lightbox-Cb7lyaNt.js} +1 -1
- package/dist/{Lightbox-BY99NS14.mjs → Lightbox-DzPqgKP4.mjs} +1 -1
- package/dist/{LightboxJournal-Bf_rZzmz.js → LightboxJournal-B-vul_be.js} +1 -1
- package/dist/{LightboxJournal-BDUs6T0B.mjs → LightboxJournal-DisD2DLv.mjs} +1 -1
- package/dist/{LightboxStrip-RA4ABUC-.js → LightboxStrip-YDyEPEb6.js} +1 -1
- package/dist/{LightboxStrip-Cuhb2fIR.mjs → LightboxStrip-wCHUhAqN.mjs} +1 -1
- package/dist/{Mercury-B-s2Kvuq.js → Mercury-BmhtFYOw.js} +1 -1
- package/dist/{Mercury-CCW0Es-s.mjs → Mercury-Q788wrYQ.mjs} +1 -1
- package/dist/{OnelinerForm-C2Y_XMCY.js → OnelinerForm-CUmY-bXL.js} +1 -1
- package/dist/{OnelinerForm-BEu7_sho.mjs → OnelinerForm-D8WIB9Qy.mjs} +1 -1
- package/dist/PopupMenu-CYdDyzEt.mjs +1372 -0
- package/dist/PopupMenu-Di1fHgho.js +409 -0
- package/dist/{SimpleButton-C-o2W9bS.mjs → SimpleButton-DTpzfmb6.mjs} +1 -1
- package/dist/{SimpleButton-nGEcO2gB.js → SimpleButton-DtaCYa3y.js} +1 -1
- package/dist/{Slider20-DUi6qwnd.mjs → Slider20-CKngROrc.mjs} +1 -1
- package/dist/{Slider20-BOmjDRf2.js → Slider20-q0iGgnE3.js} +1 -1
- package/dist/SvgImage-CwRq9-ec.mjs +56 -0
- package/dist/SvgImage-_QN8ngad.js +1 -0
- package/dist/{TestimonialSingle-DrnyReim.mjs → TestimonialSingle-Bax71Hyo.mjs} +1 -1
- package/dist/{TestimonialSingle-BORQom3u.js → TestimonialSingle-CpEUendN.js} +1 -1
- package/dist/{Waterfall-DII4-WV5.js → Waterfall-B9YWMhrg.js} +1 -1
- package/dist/{Waterfall-3kKioKh2.mjs → Waterfall-znaoynn5.mjs} +1 -1
- package/dist/components-BYoTPJk3.js +1 -0
- package/dist/{components-BwAmTGJp.mjs → components-eK82xypT.mjs} +653 -30
- package/dist/components.css +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +24 -24
- 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 +63 -36
- package/dist/loadSvgMaskUrl-B6kHUyof.js +1 -0
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +39 -0
- package/dist/sources.js +233 -514
- package/dist/sources.mjs +273 -555
- package/dist/types/Component.d.ts +7 -0
- package/dist/types/SchemaV1.d.ts +3 -0
- package/package.json +1 -1
- package/dist/ChroniclesComponent-BMbUwzk6.js +0 -1
- package/dist/Components/Grid/CustomGridComponent.d.ts +0 -41
- package/dist/ControlSlider-BCkVFl4w.js +0 -1
- package/dist/Grid-CUaVUaRa.js +0 -441
- package/dist/Grid-D19xZ_mh.mjs +0 -1800
- package/dist/SvgImage-B5mR9y6q.mjs +0 -51
- package/dist/SvgImage-DFlmxAoL.js +0 -1
- package/dist/components-D8RelPGE.js +0 -1
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +0 -1
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +0 -20
package/dist/Grid-D19xZ_mh.mjs
DELETED
|
@@ -1,1800 +0,0 @@
|
|
|
1
|
-
import { jsxs as W, Fragment as dt, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { s as x } from "./scalingValue-C9JH5L6O.mjs";
|
|
3
|
-
import { b as Tn } from "./buildColorVars-CLyWQm5K.mjs";
|
|
4
|
-
import { u as Ln } from "./useScopedStyles-DhBG3557.mjs";
|
|
5
|
-
import { u as an } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
6
|
-
import { L as xe } from "./LinkWrapper-5kQHiGJQ.mjs";
|
|
7
|
-
import { i as Xt, g as cn, E as mn, a as Nn } from "./EmbedMediaFrame-DwHeOAy5.mjs";
|
|
8
|
-
import { useMemo as $t, useRef as N, useState as A, useLayoutEffect as He, useEffect as Z, memo as Mn, useCallback as bt } from "react";
|
|
9
|
-
import { createPortal as zn } from "react-dom";
|
|
10
|
-
import { o as Re, t as Oe } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
11
|
-
import { S as An } from "./SvgImage-B5mR9y6q.mjs";
|
|
12
|
-
import { L as dn } from "./LazyVideo-CdAWymKO.mjs";
|
|
13
|
-
function Rn(t) {
|
|
14
|
-
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
15
|
-
}
|
|
16
|
-
function rn(t) {
|
|
17
|
-
return ((t == null ? void 0 : t.trim().length) ?? 0) > 0;
|
|
18
|
-
}
|
|
19
|
-
function We(t, n, e, l) {
|
|
20
|
-
return n !== void 0 && n < (t ?? 0.01) ? `${e} ${l}` : e;
|
|
21
|
-
}
|
|
22
|
-
function _e(t, n, e, l) {
|
|
23
|
-
const s = t ?? 0.01;
|
|
24
|
-
return n === void 0 || n >= s ? {} : {
|
|
25
|
-
[`--${e}-title-leading-gap`]: x((s - n) / 2, l)
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const De = 400, Ge = "cubic-bezier(0.25, 0.1, 0.25, 1)", On = 1.1, un = "--grid-media-radius";
|
|
29
|
-
function Wn(t) {
|
|
30
|
-
return `
|
|
31
|
-
.${t}-wrapper {
|
|
32
|
-
display: grid;
|
|
33
|
-
align-items: start;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
min-height: ${Rn(48)};
|
|
36
|
-
}
|
|
37
|
-
.${t}-item {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
align-items: center;
|
|
42
|
-
}
|
|
43
|
-
.${t}-item-inner {
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
align-items: center;
|
|
47
|
-
outline: 1px solid #FF5C02;
|
|
48
|
-
}
|
|
49
|
-
.${t}-item-inner-hidden {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
align-items: center;
|
|
53
|
-
}
|
|
54
|
-
.${t}-item-image-wrapper {
|
|
55
|
-
display: flex;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
align-items: center;
|
|
58
|
-
align-self: center;
|
|
59
|
-
}
|
|
60
|
-
.${t}-item-image-wrapper-fit-slider {
|
|
61
|
-
display: grid;
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
position: relative;
|
|
64
|
-
}
|
|
65
|
-
.${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer {
|
|
66
|
-
grid-area: 1 / 1;
|
|
67
|
-
width: 100%;
|
|
68
|
-
display: grid;
|
|
69
|
-
visibility: hidden;
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
}
|
|
72
|
-
.${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer img {
|
|
73
|
-
grid-area: 1 / 1;
|
|
74
|
-
width: auto;
|
|
75
|
-
height: auto;
|
|
76
|
-
max-width: 100%;
|
|
77
|
-
object-fit: contain;
|
|
78
|
-
}
|
|
79
|
-
.${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer video {
|
|
80
|
-
grid-area: 1 / 1;
|
|
81
|
-
width: auto;
|
|
82
|
-
height: auto;
|
|
83
|
-
max-width: 100%;
|
|
84
|
-
object-fit: contain;
|
|
85
|
-
}
|
|
86
|
-
.${t}-item-image-wrapper-fit-slider > .${t}-item-image-wrapper-sizer div {
|
|
87
|
-
grid-area: 1 / 1;
|
|
88
|
-
width: 100%;
|
|
89
|
-
}
|
|
90
|
-
.${t}-item-image-wrapper-fit-slider > .${t}-item-slider {
|
|
91
|
-
position: absolute;
|
|
92
|
-
inset: 0;
|
|
93
|
-
width: 100%;
|
|
94
|
-
overflow: hidden;
|
|
95
|
-
}
|
|
96
|
-
.${t}-item-image-link {
|
|
97
|
-
width: 100%;
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
align-items: center;
|
|
101
|
-
}
|
|
102
|
-
.${t}-custom-layout .${t}-item-image-link {
|
|
103
|
-
flex: 1 1 0%;
|
|
104
|
-
min-height: 0;
|
|
105
|
-
}
|
|
106
|
-
.${t}-custom-layout.${t}-text-outside .${t}-item-image-link {
|
|
107
|
-
flex: none;
|
|
108
|
-
}
|
|
109
|
-
.${t}-item-text-link {
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
align-items: center;
|
|
113
|
-
width: 100%;
|
|
114
|
-
color: inherit;
|
|
115
|
-
text-decoration: none;
|
|
116
|
-
}
|
|
117
|
-
.${t}-item-image {
|
|
118
|
-
width: 100%;
|
|
119
|
-
height: 100%;
|
|
120
|
-
display: block;
|
|
121
|
-
max-width: 100%;
|
|
122
|
-
}
|
|
123
|
-
.${t}-item-video {
|
|
124
|
-
width: 100%;
|
|
125
|
-
height: 100%;
|
|
126
|
-
display: block;
|
|
127
|
-
max-width: 100%;
|
|
128
|
-
}
|
|
129
|
-
.${t}-item-slider {
|
|
130
|
-
position: relative;
|
|
131
|
-
width: 100%;
|
|
132
|
-
height: 100%;
|
|
133
|
-
overflow: hidden;
|
|
134
|
-
}
|
|
135
|
-
.${t}-item-slider-list {
|
|
136
|
-
position: relative;
|
|
137
|
-
display: flex;
|
|
138
|
-
flex-direction: row;
|
|
139
|
-
width: 100%;
|
|
140
|
-
height: 100%;
|
|
141
|
-
will-change: transform;
|
|
142
|
-
}
|
|
143
|
-
.${t}-item-slider-list-vertical {
|
|
144
|
-
flex-direction: column;
|
|
145
|
-
}
|
|
146
|
-
.${t}-item-slider-list-fade {
|
|
147
|
-
display: block;
|
|
148
|
-
will-change: auto;
|
|
149
|
-
}
|
|
150
|
-
.${t}-item-slide {
|
|
151
|
-
position: relative;
|
|
152
|
-
flex: 0 0 100%;
|
|
153
|
-
width: 100%;
|
|
154
|
-
height: 100%;
|
|
155
|
-
display: flex;
|
|
156
|
-
justify-content: center;
|
|
157
|
-
align-items: center;
|
|
158
|
-
}
|
|
159
|
-
.${t}-item-slider-list-fade .${t}-item-slide {
|
|
160
|
-
position: absolute;
|
|
161
|
-
top: 0;
|
|
162
|
-
left: 0;
|
|
163
|
-
opacity: 0;
|
|
164
|
-
transition: opacity ${je}ms ${hn};
|
|
165
|
-
}
|
|
166
|
-
.${t}-item-slider-list-fade .${t}-item-slide-active {
|
|
167
|
-
opacity: 1;
|
|
168
|
-
z-index: 1;
|
|
169
|
-
}
|
|
170
|
-
.${t}-item-title {
|
|
171
|
-
white-space: normal;
|
|
172
|
-
overflow-wrap: anywhere;
|
|
173
|
-
word-break: break-word;
|
|
174
|
-
text-align: center;
|
|
175
|
-
margin-bottom: 0px;
|
|
176
|
-
margin-top: 0px;
|
|
177
|
-
color: var(--${t}-title-color);
|
|
178
|
-
}
|
|
179
|
-
.${t}-item-subtitle {
|
|
180
|
-
white-space: normal;
|
|
181
|
-
overflow-wrap: anywhere;
|
|
182
|
-
word-break: break-word;
|
|
183
|
-
text-align: center;
|
|
184
|
-
margin-bottom: 0px;
|
|
185
|
-
margin-top: 0px;
|
|
186
|
-
color: var(--${t}-subtitle-color);
|
|
187
|
-
}
|
|
188
|
-
.${t}-text-tight-leading {
|
|
189
|
-
display: block;
|
|
190
|
-
flex-shrink: 0;
|
|
191
|
-
padding-top: var(--${t}-title-leading-gap, 0);
|
|
192
|
-
padding-bottom: var(--${t}-title-leading-gap, 0);
|
|
193
|
-
}
|
|
194
|
-
.${t}-show-text-hover .${t}-item-title,
|
|
195
|
-
.${t}-show-text-hover .${t}-item-subtitle {
|
|
196
|
-
opacity: 0;
|
|
197
|
-
transition: opacity 250ms;
|
|
198
|
-
}
|
|
199
|
-
.${t}-show-text-hover .${t}-item-inner:hover .${t}-item-title,
|
|
200
|
-
.${t}-show-text-hover .${t}-item-inner:hover .${t}-item-subtitle,
|
|
201
|
-
.${t}-show-text-hover .${t}-item-inner-hidden:hover .${t}-item-title,
|
|
202
|
-
.${t}-show-text-hover .${t}-item-inner-hidden:hover .${t}-item-subtitle {
|
|
203
|
-
opacity: 1;
|
|
204
|
-
}
|
|
205
|
-
@property --${t}-hover-zoom {
|
|
206
|
-
syntax: '<number>';
|
|
207
|
-
inherits: false;
|
|
208
|
-
initial-value: 1;
|
|
209
|
-
}
|
|
210
|
-
.${t}-hover-zoom-in .${t}-item-image,
|
|
211
|
-
.${t}-hover-zoom-in .${t}-item-video {
|
|
212
|
-
transform: scale(var(--${t}-hover-zoom));
|
|
213
|
-
clip-path: inset(calc(50% - 50% / var(--${t}-hover-zoom)) round calc(var(${un}, 0px) / var(--${t}-hover-zoom)));
|
|
214
|
-
transition: --${t}-hover-zoom ${De}ms ${Ge};
|
|
215
|
-
}
|
|
216
|
-
.${t}-hover-scale-down .${t}-item-image,
|
|
217
|
-
.${t}-hover-scale-down .${t}-item-video {
|
|
218
|
-
transition: transform ${De}ms ${Ge};
|
|
219
|
-
}
|
|
220
|
-
.${t}-hover-greyscale .${t}-item-image-wrapper {
|
|
221
|
-
transition: filter ${De}ms ${Ge};
|
|
222
|
-
}
|
|
223
|
-
@media (hover: hover) {
|
|
224
|
-
.${t}-hover-zoom-in .${t}-item-image-wrapper:has(.${t}-item-image:hover, .${t}-item-video:hover) :is(.${t}-item-image, .${t}-item-video) {
|
|
225
|
-
--${t}-hover-zoom: ${On};
|
|
226
|
-
}
|
|
227
|
-
.${t}-hover-scale-down .${t}-item-image-wrapper:hover .${t}-item-image,
|
|
228
|
-
.${t}-hover-scale-down .${t}-item-image-wrapper:hover .${t}-item-video {
|
|
229
|
-
transform: scale(0.9);
|
|
230
|
-
}
|
|
231
|
-
.${t}-hover-greyscale:has(.${t}-item-image:hover, .${t}-item-video:hover) .${t}-item-image-wrapper:not(:has(.${t}-item-image:hover, .${t}-item-video:hover)) {
|
|
232
|
-
filter: grayscale(1);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
.${t}-type-a .${t}-item-inner,
|
|
236
|
-
.${t}-type-a .${t}-item-inner-hidden,
|
|
237
|
-
.${t}-type-d .${t}-item-inner,
|
|
238
|
-
.${t}-type-d .${t}-item-inner-hidden {
|
|
239
|
-
align-items: flex-start;
|
|
240
|
-
}
|
|
241
|
-
.${t}-type-b .${t}-item-inner,
|
|
242
|
-
.${t}-type-b .${t}-item-inner-hidden,
|
|
243
|
-
.${t}-type-e .${t}-item-inner,
|
|
244
|
-
.${t}-type-e .${t}-item-inner-hidden {
|
|
245
|
-
align-items: center;
|
|
246
|
-
}
|
|
247
|
-
.${t}-type-c .${t}-item-inner,
|
|
248
|
-
.${t}-type-c .${t}-item-inner-hidden,
|
|
249
|
-
.${t}-type-f .${t}-item-inner,
|
|
250
|
-
.${t}-type-f .${t}-item-inner-hidden {
|
|
251
|
-
align-items: flex-end;
|
|
252
|
-
}
|
|
253
|
-
.${t}-type-a .${t}-item-image-link,
|
|
254
|
-
.${t}-type-b .${t}-item-image-link,
|
|
255
|
-
.${t}-type-c .${t}-item-image-link,
|
|
256
|
-
.${t}-type-d .${t}-item-image-link,
|
|
257
|
-
.${t}-type-e .${t}-item-image-link,
|
|
258
|
-
.${t}-type-f .${t}-item-image-link {
|
|
259
|
-
align-items: center;
|
|
260
|
-
}
|
|
261
|
-
.${t}-type-a .${t}-item-title,
|
|
262
|
-
.${t}-type-a .${t}-item-subtitle,
|
|
263
|
-
.${t}-type-d .${t}-item-title,
|
|
264
|
-
.${t}-type-d .${t}-item-subtitle {
|
|
265
|
-
text-align: left;
|
|
266
|
-
}
|
|
267
|
-
.${t}-type-b .${t}-item-title,
|
|
268
|
-
.${t}-type-b .${t}-item-subtitle,
|
|
269
|
-
.${t}-type-e .${t}-item-title,
|
|
270
|
-
.${t}-type-e .${t}-item-subtitle {
|
|
271
|
-
text-align: center;
|
|
272
|
-
}
|
|
273
|
-
.${t}-type-c .${t}-item-title,
|
|
274
|
-
.${t}-type-c .${t}-item-subtitle,
|
|
275
|
-
.${t}-type-f .${t}-item-title,
|
|
276
|
-
.${t}-type-f .${t}-item-subtitle {
|
|
277
|
-
text-align: right;
|
|
278
|
-
}
|
|
279
|
-
.${t}-item-text-block {
|
|
280
|
-
display: flex;
|
|
281
|
-
flex-direction: column;
|
|
282
|
-
align-items: flex-start;
|
|
283
|
-
width: 100%;
|
|
284
|
-
flex-shrink: 0;
|
|
285
|
-
}
|
|
286
|
-
.${t}-type-d .${t}-item-text-block {
|
|
287
|
-
align-items: flex-start;
|
|
288
|
-
}
|
|
289
|
-
.${t}-type-e .${t}-item-text-block {
|
|
290
|
-
align-items: center;
|
|
291
|
-
}
|
|
292
|
-
.${t}-type-f .${t}-item-text-block {
|
|
293
|
-
align-items: flex-end;
|
|
294
|
-
}
|
|
295
|
-
.${t}-type-a .${t}-item-text-link,
|
|
296
|
-
.${t}-type-d .${t}-item-text-link {
|
|
297
|
-
align-items: flex-start;
|
|
298
|
-
}
|
|
299
|
-
.${t}-type-b .${t}-item-text-link,
|
|
300
|
-
.${t}-type-e .${t}-item-text-link {
|
|
301
|
-
align-items: center;
|
|
302
|
-
}
|
|
303
|
-
.${t}-type-c .${t}-item-text-link,
|
|
304
|
-
.${t}-type-f .${t}-item-text-link {
|
|
305
|
-
align-items: flex-end;
|
|
306
|
-
}
|
|
307
|
-
.${t}-image-align-top .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
308
|
-
align-items: flex-start;
|
|
309
|
-
}
|
|
310
|
-
.${t}-image-align-center .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
311
|
-
align-items: center;
|
|
312
|
-
}
|
|
313
|
-
.${t}-image-align-bottom .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
314
|
-
align-items: flex-end;
|
|
315
|
-
}
|
|
316
|
-
.${t}-image-align-top .${t}-item-slider .${t}-item-slide {
|
|
317
|
-
align-items: flex-start;
|
|
318
|
-
}
|
|
319
|
-
.${t}-image-align-center .${t}-item-slider .${t}-item-slide {
|
|
320
|
-
align-items: center;
|
|
321
|
-
}
|
|
322
|
-
.${t}-image-align-bottom .${t}-item-slider .${t}-item-slide {
|
|
323
|
-
align-items: flex-end;
|
|
324
|
-
}
|
|
325
|
-
.${t}-align-entries .${t}-item {
|
|
326
|
-
display: contents;
|
|
327
|
-
}
|
|
328
|
-
.${t}-align-entries .${t}-item-inner,
|
|
329
|
-
.${t}-align-entries .${t}-item-inner-hidden {
|
|
330
|
-
display: grid;
|
|
331
|
-
grid-template-rows: subgrid;
|
|
332
|
-
grid-row: span 3;
|
|
333
|
-
justify-self: center;
|
|
334
|
-
margin-bottom: var(--${t}-align-entries-row-gap, 0);
|
|
335
|
-
}
|
|
336
|
-
.${t}-align-entries .${t}-item-inner-last-row {
|
|
337
|
-
margin-bottom: 0;
|
|
338
|
-
}
|
|
339
|
-
.${t}-align-entries .${t}-item-text-link {
|
|
340
|
-
display: contents;
|
|
341
|
-
}
|
|
342
|
-
.${t}-align-entries .${t}-item-title-row,
|
|
343
|
-
.${t}-align-entries .${t}-item-subtitle-row {
|
|
344
|
-
display: flex;
|
|
345
|
-
flex-direction: column;
|
|
346
|
-
align-items: flex-start;
|
|
347
|
-
width: 100%;
|
|
348
|
-
min-height: 100%;
|
|
349
|
-
}
|
|
350
|
-
.${t}-type-a.${t}-align-entries .${t}-item-title-row,
|
|
351
|
-
.${t}-type-a.${t}-align-entries .${t}-item-subtitle-row,
|
|
352
|
-
.${t}-type-d.${t}-align-entries .${t}-item-title-row,
|
|
353
|
-
.${t}-type-d.${t}-align-entries .${t}-item-subtitle-row {
|
|
354
|
-
align-items: flex-start;
|
|
355
|
-
}
|
|
356
|
-
.${t}-type-b.${t}-align-entries .${t}-item-title-row,
|
|
357
|
-
.${t}-type-b.${t}-align-entries .${t}-item-subtitle-row,
|
|
358
|
-
.${t}-type-e.${t}-align-entries .${t}-item-title-row,
|
|
359
|
-
.${t}-type-e.${t}-align-entries .${t}-item-subtitle-row {
|
|
360
|
-
align-items: center;
|
|
361
|
-
}
|
|
362
|
-
.${t}-type-c.${t}-align-entries .${t}-item-title-row,
|
|
363
|
-
.${t}-type-c.${t}-align-entries .${t}-item-subtitle-row,
|
|
364
|
-
.${t}-type-f.${t}-align-entries .${t}-item-title-row,
|
|
365
|
-
.${t}-type-f.${t}-align-entries .${t}-item-subtitle-row {
|
|
366
|
-
align-items: flex-end;
|
|
367
|
-
}
|
|
368
|
-
.${t}-align-entries .${t}-item-image-link {
|
|
369
|
-
width: 100%;
|
|
370
|
-
height: 100%;
|
|
371
|
-
min-height: 100%;
|
|
372
|
-
display: flex;
|
|
373
|
-
flex-direction: column;
|
|
374
|
-
align-items: center;
|
|
375
|
-
justify-content: flex-start;
|
|
376
|
-
}
|
|
377
|
-
.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
378
|
-
flex-shrink: 0;
|
|
379
|
-
height: auto;
|
|
380
|
-
align-self: auto;
|
|
381
|
-
}
|
|
382
|
-
.${t}-image-align-top.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
383
|
-
margin-top: 0;
|
|
384
|
-
margin-bottom: auto;
|
|
385
|
-
}
|
|
386
|
-
.${t}-image-align-center.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
387
|
-
margin-top: auto;
|
|
388
|
-
margin-bottom: auto;
|
|
389
|
-
}
|
|
390
|
-
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-link > .${t}-item-image-wrapper {
|
|
391
|
-
margin-top: auto;
|
|
392
|
-
margin-bottom: 0;
|
|
393
|
-
}
|
|
394
|
-
.${t}-image-align-top.${t}-align-entries .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
395
|
-
align-items: flex-start;
|
|
396
|
-
}
|
|
397
|
-
.${t}-image-align-center.${t}-align-entries .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
398
|
-
align-items: center;
|
|
399
|
-
}
|
|
400
|
-
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-wrapper:not(.${t}-item-image-wrapper-fit-slider) {
|
|
401
|
-
align-items: flex-end;
|
|
402
|
-
}
|
|
403
|
-
.${t}-image-align-top.${t}-align-entries .${t}-item-slider .${t}-item-slide {
|
|
404
|
-
align-items: flex-start;
|
|
405
|
-
}
|
|
406
|
-
.${t}-image-align-center.${t}-align-entries .${t}-item-slider .${t}-item-slide {
|
|
407
|
-
align-items: center;
|
|
408
|
-
}
|
|
409
|
-
.${t}-image-align-bottom.${t}-align-entries .${t}-item-slider .${t}-item-slide {
|
|
410
|
-
align-items: flex-end;
|
|
411
|
-
}
|
|
412
|
-
.${t}-image-align-top.${t}-align-entries .${t}-item-image-link {
|
|
413
|
-
justify-content: flex-start;
|
|
414
|
-
}
|
|
415
|
-
.${t}-image-align-center.${t}-align-entries .${t}-item-image-link {
|
|
416
|
-
justify-content: center;
|
|
417
|
-
}
|
|
418
|
-
.${t}-image-align-bottom.${t}-align-entries .${t}-item-image-link {
|
|
419
|
-
justify-content: flex-end;
|
|
420
|
-
}
|
|
421
|
-
.${t}-lightbox-counter {
|
|
422
|
-
margin: 0;
|
|
423
|
-
color: var(--${t}-lightbox-counter-color);
|
|
424
|
-
}
|
|
425
|
-
.${t}-lightbox {
|
|
426
|
-
position: fixed;
|
|
427
|
-
inset: 0;
|
|
428
|
-
z-index: 9997;
|
|
429
|
-
overscroll-behavior: none;
|
|
430
|
-
overflow: hidden;
|
|
431
|
-
}
|
|
432
|
-
.${t}-lightbox-editor {
|
|
433
|
-
inset: auto;
|
|
434
|
-
top: var(--cntrl-article-top, 0);
|
|
435
|
-
left: var(--cntrl-article-left, 0);
|
|
436
|
-
width: var(--cntrl-article-width, 100vw) !important;
|
|
437
|
-
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
438
|
-
}
|
|
439
|
-
.${t}-control {
|
|
440
|
-
position: relative;
|
|
441
|
-
z-index: 2;
|
|
442
|
-
width: 100%;
|
|
443
|
-
}
|
|
444
|
-
.${t}-close-icon {
|
|
445
|
-
position: relative;
|
|
446
|
-
flex-shrink: 0;
|
|
447
|
-
pointer-events: auto;
|
|
448
|
-
z-index: 2;
|
|
449
|
-
display: flex;
|
|
450
|
-
align-items: center;
|
|
451
|
-
justify-content: center;
|
|
452
|
-
border: none;
|
|
453
|
-
background-color: transparent;
|
|
454
|
-
padding: 0;
|
|
455
|
-
}
|
|
456
|
-
.${t}-close-icon-inner {
|
|
457
|
-
all: unset;
|
|
458
|
-
position: relative;
|
|
459
|
-
cursor: pointer;
|
|
460
|
-
width: 100%;
|
|
461
|
-
height: 100%;
|
|
462
|
-
pointer-events: auto;
|
|
463
|
-
}
|
|
464
|
-
.${t}-close-icon-img {
|
|
465
|
-
position: absolute;
|
|
466
|
-
top: 50%;
|
|
467
|
-
left: 50%;
|
|
468
|
-
transform: translate(-50%, -50%);
|
|
469
|
-
}
|
|
470
|
-
`;
|
|
471
|
-
}
|
|
472
|
-
function _n() {
|
|
473
|
-
return Math.random() < 0.5 ? "ltr" : "ttb";
|
|
474
|
-
}
|
|
475
|
-
function on(t, n) {
|
|
476
|
-
return n <= 0 ? 0 : (t % n + n) % n;
|
|
477
|
-
}
|
|
478
|
-
const mt = 500, je = 750, hn = "cubic-bezier(0.25, 1, 0.5, 1)", Dn = 5e3, Mt = "cubic-bezier(0.22, 1, 0.36, 1)", Gn = 72, Fn = 50;
|
|
479
|
-
function Hn(t) {
|
|
480
|
-
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
481
|
-
const n = t[0];
|
|
482
|
-
return n !== null && typeof n == "object" && "media" in n && Array.isArray(n.media);
|
|
483
|
-
}
|
|
484
|
-
function jn(t) {
|
|
485
|
-
const [n, e] = t.media;
|
|
486
|
-
return e != null && e.assetId ? e : n != null && n.assetId ? n : null;
|
|
487
|
-
}
|
|
488
|
-
function Vn(t) {
|
|
489
|
-
const [n] = t.media;
|
|
490
|
-
return n != null && n.assetId ? n : null;
|
|
491
|
-
}
|
|
492
|
-
function gn(t) {
|
|
493
|
-
return !Array.isArray(t) || t.length === 0 ? [] : Hn(t) ? t.flatMap((n) => {
|
|
494
|
-
const e = jn(n);
|
|
495
|
-
if (!e) return [];
|
|
496
|
-
const l = Vn(n);
|
|
497
|
-
return [{
|
|
498
|
-
displayMedia: e,
|
|
499
|
-
lightboxMedia: l != null && l.assetId ? l : null
|
|
500
|
-
}];
|
|
501
|
-
}) : t.filter((n) => n == null ? void 0 : n.assetId).map((n) => ({
|
|
502
|
-
displayMedia: n,
|
|
503
|
-
lightboxMedia: n
|
|
504
|
-
}));
|
|
505
|
-
}
|
|
506
|
-
function _t(t) {
|
|
507
|
-
return !Xt(t) && t.type === "video";
|
|
508
|
-
}
|
|
509
|
-
function En(t) {
|
|
510
|
-
const n = /* @__PURE__ */ new Set(), e = [];
|
|
511
|
-
for (const l of t) {
|
|
512
|
-
const s = gn(l.gallery);
|
|
513
|
-
for (const c of s) {
|
|
514
|
-
const u = c.lightboxMedia;
|
|
515
|
-
u != null && u.assetId && !n.has(u.assetId) && (n.add(u.assetId), e.push(u));
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
return e;
|
|
519
|
-
}
|
|
520
|
-
const Bn = Mn(function({ mediaList: n }) {
|
|
521
|
-
const [e, l] = A(null);
|
|
522
|
-
an(e, { preload: "metadata" });
|
|
523
|
-
const s = n.filter((c) => !Xt(c));
|
|
524
|
-
return s.length === 0 ? null : /* @__PURE__ */ r(
|
|
525
|
-
"div",
|
|
526
|
-
{
|
|
527
|
-
ref: l,
|
|
528
|
-
"aria-hidden": !0,
|
|
529
|
-
style: {
|
|
530
|
-
position: "absolute",
|
|
531
|
-
width: 0,
|
|
532
|
-
height: 0,
|
|
533
|
-
overflow: "hidden",
|
|
534
|
-
opacity: 0,
|
|
535
|
-
pointerEvents: "none"
|
|
536
|
-
},
|
|
537
|
-
children: s.map((c) => _t(c) ? /* @__PURE__ */ r(
|
|
538
|
-
"video",
|
|
539
|
-
{
|
|
540
|
-
src: c.assetId,
|
|
541
|
-
preload: "none",
|
|
542
|
-
muted: !0,
|
|
543
|
-
playsInline: !0
|
|
544
|
-
},
|
|
545
|
-
c.assetId
|
|
546
|
-
) : /* @__PURE__ */ r(
|
|
547
|
-
"img",
|
|
548
|
-
{
|
|
549
|
-
src: c.assetId,
|
|
550
|
-
alt: ""
|
|
551
|
-
},
|
|
552
|
-
c.assetId
|
|
553
|
-
))
|
|
554
|
-
}
|
|
555
|
-
);
|
|
556
|
-
});
|
|
557
|
-
function Un(t) {
|
|
558
|
-
t.pause(), t.removeAttribute("src"), t.load();
|
|
559
|
-
}
|
|
560
|
-
const pn = "cntrl-grid-slide", fn = "cntrl-grid-slide-playing", Xn = `.${pn} video`;
|
|
561
|
-
function qn(t) {
|
|
562
|
-
return t.closest(`.${fn}`) !== null;
|
|
563
|
-
}
|
|
564
|
-
function Yn({ prefix: t, slides: n, isFade: e, direction: l, intervalMs: s }) {
|
|
565
|
-
const c = n.length, u = !e && c > 1, _ = !e && l === "random", J = Number.isFinite(s) && s > 0 ? s : Dn, [i, M] = A(u ? 1 : 0), [S, j] = A(!e && l === "vertical" ? "ttb" : "ltr"), [X, rt] = A(!1), [Q, b] = A(!1), [ut, P] = A(0), ht = N(!1);
|
|
566
|
-
Z(() => {
|
|
567
|
-
if (c < 2) return;
|
|
568
|
-
const v = window.setTimeout(() => {
|
|
569
|
-
if (ht.current) {
|
|
570
|
-
P(($) => $ + 1);
|
|
571
|
-
return;
|
|
572
|
-
}
|
|
573
|
-
ht.current = !0, rt(!0), b(!1), M(($) => u ? $ + 1 : on($ + 1, c)), _ || P(($) => $ + 1);
|
|
574
|
-
}, J);
|
|
575
|
-
return () => window.clearTimeout(v);
|
|
576
|
-
}, [c, ut, J, u, _]), Z(() => {
|
|
577
|
-
if (!X) return;
|
|
578
|
-
const v = window.setTimeout(() => {
|
|
579
|
-
const $ = u && i === c + 1, k = _ ? _n() : S;
|
|
580
|
-
($ || k !== S) && (b(!0), $ && M(1), j(k)), ht.current = !1, rt(!1), _ && P((G) => G + 1);
|
|
581
|
-
}, je);
|
|
582
|
-
return () => window.clearTimeout(v);
|
|
583
|
-
}, [S, c, u, X, _, i]), Z(() => {
|
|
584
|
-
if (!Q) return;
|
|
585
|
-
let v = 0;
|
|
586
|
-
const $ = requestAnimationFrame(() => {
|
|
587
|
-
v = requestAnimationFrame(() => b(!1));
|
|
588
|
-
});
|
|
589
|
-
return () => {
|
|
590
|
-
cancelAnimationFrame($), cancelAnimationFrame(v);
|
|
591
|
-
};
|
|
592
|
-
}, [Q]);
|
|
593
|
-
const tt = u ? c + 2 : c, a = (v) => u ? on(v - 1, c) : v, m = (v) => u && (v === 0 || v === c + 1), y = a(i), R = i + 1 < tt ? i + 1 : -1, z = (v) => e || v === i && !m(v) || v === R || R >= 0 && !m(v) && a(v) === a(R), O = !e && S === "ttb", et = e ? void 0 : {
|
|
594
|
-
transform: O ? `translate3d(0, ${-i * 100}%, 0)` : `translate3d(${-i * 100}%, 0, 0)`,
|
|
595
|
-
transition: Q ? "none" : `transform ${je}ms ${hn}`
|
|
596
|
-
};
|
|
597
|
-
return /* @__PURE__ */ r("div", { className: `${t}-item-slider`, children: /* @__PURE__ */ r(
|
|
598
|
-
"div",
|
|
599
|
-
{
|
|
600
|
-
className: `${t}-item-slider-list${e ? ` ${t}-item-slider-list-fade` : ""}${O ? ` ${t}-item-slider-list-vertical` : ""}`,
|
|
601
|
-
style: et,
|
|
602
|
-
children: Array.from({ length: tt }, (v, $) => {
|
|
603
|
-
const k = a($), G = m($), Y = e ? k === y : $ === i;
|
|
604
|
-
return /* @__PURE__ */ r(
|
|
605
|
-
"div",
|
|
606
|
-
{
|
|
607
|
-
className: `${t}-item-slide ${pn}${e && Y ? ` ${t}-item-slide-active` : ""}${z($) ? ` ${fn}` : ""}`,
|
|
608
|
-
"aria-hidden": Y ? void 0 : !0,
|
|
609
|
-
children: n[k]
|
|
610
|
-
},
|
|
611
|
-
G ? `clone-${$ === 0 ? "start" : "end"}` : `slide-${k}`
|
|
612
|
-
);
|
|
613
|
-
})
|
|
614
|
-
}
|
|
615
|
-
) });
|
|
616
|
-
}
|
|
617
|
-
function sn({
|
|
618
|
-
media: t,
|
|
619
|
-
className: n,
|
|
620
|
-
style: e,
|
|
621
|
-
hasLightbox: l,
|
|
622
|
-
isSliderSlide: s = !1,
|
|
623
|
-
onMediaClick: c
|
|
624
|
-
}) {
|
|
625
|
-
if (Xt(t))
|
|
626
|
-
return /* @__PURE__ */ r(
|
|
627
|
-
mn,
|
|
628
|
-
{
|
|
629
|
-
media: t,
|
|
630
|
-
fit: e.objectFit === "contain" ? "contain" : "cover",
|
|
631
|
-
silentLoop: l,
|
|
632
|
-
className: n,
|
|
633
|
-
style: {
|
|
634
|
-
...e,
|
|
635
|
-
cursor: c ? "pointer" : "default"
|
|
636
|
-
},
|
|
637
|
-
onClick: c
|
|
638
|
-
}
|
|
639
|
-
);
|
|
640
|
-
if (_t(t)) {
|
|
641
|
-
const u = {
|
|
642
|
-
src: t.assetId,
|
|
643
|
-
className: n,
|
|
644
|
-
style: {
|
|
645
|
-
...e,
|
|
646
|
-
cursor: c ? "pointer" : "default"
|
|
647
|
-
},
|
|
648
|
-
muted: !0,
|
|
649
|
-
loop: !0,
|
|
650
|
-
playsInline: !0,
|
|
651
|
-
onClick: c
|
|
652
|
-
};
|
|
653
|
-
return s ? /* @__PURE__ */ r("video", { ...u, preload: "none" }) : /* @__PURE__ */ r(dn, { ...u, autoPlay: !0 });
|
|
654
|
-
}
|
|
655
|
-
return /* @__PURE__ */ r(
|
|
656
|
-
"img",
|
|
657
|
-
{
|
|
658
|
-
src: t.assetId,
|
|
659
|
-
alt: t.name,
|
|
660
|
-
className: n,
|
|
661
|
-
style: {
|
|
662
|
-
...e,
|
|
663
|
-
cursor: c ? "pointer" : "default"
|
|
664
|
-
},
|
|
665
|
-
onClick: c
|
|
666
|
-
}
|
|
667
|
-
);
|
|
668
|
-
}
|
|
669
|
-
function Kn({
|
|
670
|
-
className: t,
|
|
671
|
-
style: n,
|
|
672
|
-
children: e
|
|
673
|
-
}) {
|
|
674
|
-
const [l, s] = A(null);
|
|
675
|
-
return an(l, { autoPlay: !0, selector: Xn, shouldPlay: qn }), /* @__PURE__ */ r("div", { ref: s, className: t, style: n, children: e });
|
|
676
|
-
}
|
|
677
|
-
function ln(t) {
|
|
678
|
-
const n = t.getBoundingClientRect();
|
|
679
|
-
return { width: n.width, height: n.height, left: n.left, top: n.top };
|
|
680
|
-
}
|
|
681
|
-
function Zn(t, n) {
|
|
682
|
-
if (!n || !n.width || !n.height || !t.width || !t.height) return t;
|
|
683
|
-
const e = n.width / n.height, l = t.width / t.height;
|
|
684
|
-
if (e > l) {
|
|
685
|
-
const c = t.width / e;
|
|
686
|
-
return { width: t.width, height: c, left: t.left, top: t.top + (t.height - c) / 2 };
|
|
687
|
-
}
|
|
688
|
-
const s = t.height * e;
|
|
689
|
-
return { width: s, height: t.height, left: t.left + (t.width - s) / 2, top: t.top };
|
|
690
|
-
}
|
|
691
|
-
function Jn({
|
|
692
|
-
src: t,
|
|
693
|
-
mediaRef: n,
|
|
694
|
-
mediaStyle: e,
|
|
695
|
-
onLoadedMetadata: l
|
|
696
|
-
}) {
|
|
697
|
-
return Z(() => {
|
|
698
|
-
const s = n.current;
|
|
699
|
-
if (s)
|
|
700
|
-
return () => {
|
|
701
|
-
Un(s);
|
|
702
|
-
};
|
|
703
|
-
}, [t, n]), /* @__PURE__ */ r(
|
|
704
|
-
"video",
|
|
705
|
-
{
|
|
706
|
-
ref: n,
|
|
707
|
-
src: t,
|
|
708
|
-
muted: !0,
|
|
709
|
-
autoPlay: !0,
|
|
710
|
-
loop: !0,
|
|
711
|
-
playsInline: !0,
|
|
712
|
-
preload: "auto",
|
|
713
|
-
onLoadedMetadata: l,
|
|
714
|
-
style: e
|
|
715
|
-
}
|
|
716
|
-
);
|
|
717
|
-
}
|
|
718
|
-
const Qn = "https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg", Pn = 4e-3;
|
|
719
|
-
function ti({
|
|
720
|
-
prefix: t,
|
|
721
|
-
closeIcon: n = Qn,
|
|
722
|
-
closeIconMaxWidth: e = 0.0125,
|
|
723
|
-
closeIconColor: l = "#FFFFFF",
|
|
724
|
-
closeIconHoverColor: s = "#999999",
|
|
725
|
-
iconMarginRight: c = 0.01,
|
|
726
|
-
contentMarginTop: u = 0.01,
|
|
727
|
-
isEditor: _,
|
|
728
|
-
isPreviewMode: J,
|
|
729
|
-
isEditMode: i,
|
|
730
|
-
visible: M,
|
|
731
|
-
onClose: S
|
|
732
|
-
}) {
|
|
733
|
-
if (!n) return null;
|
|
734
|
-
const j = x(e, _), X = x(c, _), rt = x(u, _), Q = x(Math.max(u, Pn), _);
|
|
735
|
-
return /* @__PURE__ */ W(
|
|
736
|
-
"div",
|
|
737
|
-
{
|
|
738
|
-
style: {
|
|
739
|
-
position: "absolute",
|
|
740
|
-
top: 0,
|
|
741
|
-
left: 0,
|
|
742
|
-
right: 0,
|
|
743
|
-
zIndex: 1e4,
|
|
744
|
-
display: "flex",
|
|
745
|
-
flexDirection: "column",
|
|
746
|
-
alignItems: "flex-end",
|
|
747
|
-
pointerEvents: "none",
|
|
748
|
-
opacity: M ? 1 : 0,
|
|
749
|
-
transition: "opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
750
|
-
},
|
|
751
|
-
children: [
|
|
752
|
-
/* @__PURE__ */ r(
|
|
753
|
-
"div",
|
|
754
|
-
{
|
|
755
|
-
style: {
|
|
756
|
-
position: "relative",
|
|
757
|
-
width: "100%",
|
|
758
|
-
height: rt,
|
|
759
|
-
flexShrink: 0
|
|
760
|
-
},
|
|
761
|
-
children: i && /* @__PURE__ */ r(
|
|
762
|
-
"div",
|
|
763
|
-
{
|
|
764
|
-
"data-controls": "contentMarginTop",
|
|
765
|
-
"data-controls-axis": "y",
|
|
766
|
-
"data-controls-min": "0",
|
|
767
|
-
className: `${t}-control`,
|
|
768
|
-
style: {
|
|
769
|
-
position: "absolute",
|
|
770
|
-
top: 0,
|
|
771
|
-
left: 0,
|
|
772
|
-
width: "100%",
|
|
773
|
-
height: Q,
|
|
774
|
-
pointerEvents: M ? "auto" : "none"
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
)
|
|
778
|
-
}
|
|
779
|
-
),
|
|
780
|
-
/* @__PURE__ */ W(
|
|
781
|
-
"div",
|
|
782
|
-
{
|
|
783
|
-
className: `${t}-close-icon`,
|
|
784
|
-
style: {
|
|
785
|
-
width: j,
|
|
786
|
-
height: j,
|
|
787
|
-
marginRight: X,
|
|
788
|
-
pointerEvents: M ? "auto" : "none"
|
|
789
|
-
},
|
|
790
|
-
onClick: (b) => b.stopPropagation(),
|
|
791
|
-
children: [
|
|
792
|
-
/* @__PURE__ */ r(
|
|
793
|
-
"button",
|
|
794
|
-
{
|
|
795
|
-
type: "button",
|
|
796
|
-
className: `${t}-close-icon-inner`,
|
|
797
|
-
"aria-label": "Close",
|
|
798
|
-
onClick: (b) => {
|
|
799
|
-
b.stopPropagation(), S();
|
|
800
|
-
},
|
|
801
|
-
children: /* @__PURE__ */ r(
|
|
802
|
-
An,
|
|
803
|
-
{
|
|
804
|
-
url: n,
|
|
805
|
-
fill: l,
|
|
806
|
-
hoverFill: _ && !J ? l : s,
|
|
807
|
-
className: `${t}-close-icon-img`
|
|
808
|
-
}
|
|
809
|
-
)
|
|
810
|
-
}
|
|
811
|
-
),
|
|
812
|
-
i && /* @__PURE__ */ r(
|
|
813
|
-
"div",
|
|
814
|
-
{
|
|
815
|
-
"data-controls": "iconMarginRight",
|
|
816
|
-
"data-controls-axis": "x",
|
|
817
|
-
"data-controls-reverse": "",
|
|
818
|
-
className: `${t}-control`,
|
|
819
|
-
style: {
|
|
820
|
-
position: "absolute",
|
|
821
|
-
top: 0,
|
|
822
|
-
left: "100%",
|
|
823
|
-
width: X,
|
|
824
|
-
height: "100%",
|
|
825
|
-
pointerEvents: M ? "auto" : "none"
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
)
|
|
829
|
-
]
|
|
830
|
-
}
|
|
831
|
-
)
|
|
832
|
-
]
|
|
833
|
-
}
|
|
834
|
-
);
|
|
835
|
-
}
|
|
836
|
-
function ei({
|
|
837
|
-
prefix: t,
|
|
838
|
-
items: n,
|
|
839
|
-
index: e,
|
|
840
|
-
imageDisplay: l,
|
|
841
|
-
isEditor: s,
|
|
842
|
-
isPreviewMode: c,
|
|
843
|
-
isEditMode: u,
|
|
844
|
-
onClose: _,
|
|
845
|
-
onPrev: J,
|
|
846
|
-
onNext: i,
|
|
847
|
-
counterClassName: M,
|
|
848
|
-
counterStyle: S,
|
|
849
|
-
closeIcon: j,
|
|
850
|
-
closeIconMaxWidth: X,
|
|
851
|
-
closeIconColor: rt,
|
|
852
|
-
closeIconHoverColor: Q,
|
|
853
|
-
iconMarginRight: b,
|
|
854
|
-
contentMarginTop: ut
|
|
855
|
-
}) {
|
|
856
|
-
const P = l === "cover", ht = N(null), tt = N(null), a = N(null), m = N(null), y = N(0), R = N(0), z = N("none"), O = N(!1), et = N(!1), v = N(null), $ = N(0), k = N(null), G = N(!1), Y = N(null), st = N(null), Dt = N(null), qt = N(() => {
|
|
857
|
-
}), [T, yt] = A(null), [d, Gt] = A(null), [F, zt] = A("opening"), [gt, At] = A(0), [lt, ot] = A(0), [St, vt] = A(null), [Ft, It] = A(!1), [Ht, Rt] = A(!1), [be, re] = A(!1), [Se, oe] = A(null), se = N(e), Yt = N(void 0), f = n[e], Ie = f ? _t(f) : !1, Kt = f ? Xt(f) : !1, jt = St !== null, Vt = bt((o) => {
|
|
858
|
-
const w = o.currentTarget, q = w instanceof HTMLVideoElement ? { width: w.videoWidth, height: w.videoHeight } : { width: w.naturalWidth, height: w.naturalHeight };
|
|
859
|
-
!q.width || !q.height || oe(q);
|
|
860
|
-
}, []);
|
|
861
|
-
Z(() => {
|
|
862
|
-
v.current = d;
|
|
863
|
-
}, [d]), Z(() => {
|
|
864
|
-
const o = ht.current;
|
|
865
|
-
if (!o) return;
|
|
866
|
-
const w = () => Gt(ln(o));
|
|
867
|
-
w();
|
|
868
|
-
const q = new ResizeObserver(w);
|
|
869
|
-
return q.observe(o), () => q.disconnect();
|
|
870
|
-
}, []);
|
|
871
|
-
const V = bt(() => {
|
|
872
|
-
Y.current !== null && (window.clearTimeout(Y.current), Y.current = null);
|
|
873
|
-
}, []), pt = bt(() => {
|
|
874
|
-
const o = st.current;
|
|
875
|
-
st.current = null, V(), k.current = null, G.current = !1, vt(null), It(!1), ot(0), $.current = 0, Rt(!1), O.current = !1, R.current = 0, z.current = "none", o === 1 ? i() : o === -1 && J();
|
|
876
|
-
}, [V, i, J]), Ct = bt(() => {
|
|
877
|
-
V(), st.current = null, k.current = null, G.current = !1, vt(null), It(!1), ot(0), $.current = 0;
|
|
878
|
-
}, [V]), le = bt(() => {
|
|
879
|
-
V(), Y.current = window.setTimeout(() => {
|
|
880
|
-
st.current !== null && pt();
|
|
881
|
-
}, mt + 32);
|
|
882
|
-
}, [V, pt]), kt = bt((o, w) => {
|
|
883
|
-
var wt;
|
|
884
|
-
const q = ((wt = v.current) == null ? void 0 : wt.width) ?? 0;
|
|
885
|
-
if (V(), k.current = o, vt(o), G.current = !0, It(!0), w) {
|
|
886
|
-
st.current = o;
|
|
887
|
-
const Lt = -o * q;
|
|
888
|
-
$.current = Lt, ot(Lt), le();
|
|
889
|
-
return;
|
|
890
|
-
}
|
|
891
|
-
$.current = 0, ot(0), Y.current = window.setTimeout(() => {
|
|
892
|
-
Y.current = null, Ct();
|
|
893
|
-
}, mt + 32);
|
|
894
|
-
}, [V, Ct, le]), Zt = bt((o) => {
|
|
895
|
-
if (!(n.length <= 1)) {
|
|
896
|
-
if (G.current) {
|
|
897
|
-
if (st.current === o) {
|
|
898
|
-
Dt.current = o, pt();
|
|
899
|
-
return;
|
|
900
|
-
}
|
|
901
|
-
Ct();
|
|
902
|
-
}
|
|
903
|
-
V(), k.current = o, vt(o), G.current = !1, It(!1), $.current = 0, ot(0), requestAnimationFrame(() => {
|
|
904
|
-
requestAnimationFrame(() => {
|
|
905
|
-
kt(o, !0);
|
|
906
|
-
});
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
}, [n.length, kt, pt, Ct, V]);
|
|
910
|
-
qt.current = Zt;
|
|
911
|
-
const ae = bt((o) => {
|
|
912
|
-
o.propertyName !== "transform" || !G.current || st.current !== null && pt();
|
|
913
|
-
}, [pt]), Jt = bt(() => {
|
|
914
|
-
const o = tt.current;
|
|
915
|
-
if (!o) return;
|
|
916
|
-
const w = ln(o);
|
|
917
|
-
!w.width || !w.height || yt(w);
|
|
918
|
-
}, []);
|
|
919
|
-
Z(() => {
|
|
920
|
-
Jt();
|
|
921
|
-
const o = tt.current;
|
|
922
|
-
if (!o) return;
|
|
923
|
-
const w = new ResizeObserver(() => Jt());
|
|
924
|
-
return w.observe(o), () => w.disconnect();
|
|
925
|
-
}, [Jt]), Z(() => {
|
|
926
|
-
F === "opening" && T && zt("open");
|
|
927
|
-
}, [F, T]), Z(() => {
|
|
928
|
-
if (F !== "closing") return;
|
|
929
|
-
const o = setTimeout(() => _(), mt);
|
|
930
|
-
return () => clearTimeout(o);
|
|
931
|
-
}, [F, _]), Z(() => () => {
|
|
932
|
-
V();
|
|
933
|
-
}, [V]), He(() => {
|
|
934
|
-
se.current === e && Yt.current === (f == null ? void 0 : f.assetId) || (V(), st.current = null, vt(null), At(0), ot(0), It(!1), re(!1), Rt(!1), oe(null), y.current = 0, R.current = 0, z.current = "none", O.current = !1, G.current = !1, $.current = 0, k.current = null, m.current = null, et.current = !1, se.current = e, Yt.current = f == null ? void 0 : f.assetId);
|
|
935
|
-
}, [e, f == null ? void 0 : f.assetId, V]), He(() => {
|
|
936
|
-
const o = Dt.current;
|
|
937
|
-
o !== null && (Dt.current = null, requestAnimationFrame(() => {
|
|
938
|
-
qt.current(o);
|
|
939
|
-
}));
|
|
940
|
-
}, [e, f == null ? void 0 : f.assetId]), Z(() => {
|
|
941
|
-
if (F !== "open") return;
|
|
942
|
-
let o = null;
|
|
943
|
-
const w = () => {
|
|
944
|
-
o && (document.removeEventListener("click", o, !0), o = null);
|
|
945
|
-
}, q = () => {
|
|
946
|
-
w(), o = (C) => {
|
|
947
|
-
C.stopPropagation(), C.preventDefault(), w();
|
|
948
|
-
}, document.addEventListener("click", o, !0);
|
|
949
|
-
}, wt = (C) => {
|
|
950
|
-
const nt = C < 0 ? 1 : -1;
|
|
951
|
-
if (Math.abs(C) > Fn && n.length > 1) {
|
|
952
|
-
kt(nt, !0);
|
|
953
|
-
return;
|
|
954
|
-
}
|
|
955
|
-
kt(nt, !1);
|
|
956
|
-
}, Lt = (C) => {
|
|
957
|
-
if (C.touches.length !== 1 || G.current) return;
|
|
958
|
-
const nt = C.touches[0];
|
|
959
|
-
et.current = !0, m.current = { x: nt.clientX, y: nt.clientY }, z.current = "none", R.current = 0, O.current = !1;
|
|
960
|
-
}, ee = (C) => {
|
|
961
|
-
if (!m.current || C.touches.length !== 1 || G.current) return;
|
|
962
|
-
const nt = C.touches[0], xt = nt.clientX - m.current.x, H = nt.clientY - m.current.y;
|
|
963
|
-
if (z.current === "none") {
|
|
964
|
-
if (Math.abs(xt) < 10 && Math.abs(H) < 10) return;
|
|
965
|
-
if (Math.abs(xt) > Math.abs(H)) {
|
|
966
|
-
if (n.length <= 1) return;
|
|
967
|
-
z.current = "horizontal";
|
|
968
|
-
} else if (H > 0)
|
|
969
|
-
z.current = "vertical";
|
|
970
|
-
else
|
|
971
|
-
return;
|
|
972
|
-
}
|
|
973
|
-
if (z.current === "horizontal") {
|
|
974
|
-
O.current = !0, Rt(!0), R.current = xt;
|
|
975
|
-
const it = xt < 0 ? 1 : -1;
|
|
976
|
-
k.current !== it && (k.current = it, vt(it)), $.current = xt, ot(xt), C.preventDefault();
|
|
977
|
-
return;
|
|
978
|
-
}
|
|
979
|
-
z.current === "vertical" && (O.current = !0, Rt(!0), y.current = H, At(H), C.preventDefault());
|
|
980
|
-
}, Et = () => {
|
|
981
|
-
if (!m.current) return;
|
|
982
|
-
const C = z.current, nt = O.current;
|
|
983
|
-
if (nt && C === "horizontal")
|
|
984
|
-
wt(R.current), q();
|
|
985
|
-
else if (nt && C === "vertical")
|
|
986
|
-
if (y.current > Gn) {
|
|
987
|
-
const H = window.innerHeight;
|
|
988
|
-
y.current = H, re(!0), At(H), zt("closing");
|
|
989
|
-
} else
|
|
990
|
-
y.current = 0, At(0), q();
|
|
991
|
-
else C === "horizontal" && Math.abs(R.current) > 0 && (wt(R.current), q());
|
|
992
|
-
m.current = null, z.current = "none", R.current = 0, O.current = !1, Rt(!1);
|
|
993
|
-
};
|
|
994
|
-
return document.addEventListener("touchstart", Lt, { passive: !0 }), document.addEventListener("touchmove", ee, { passive: !1 }), document.addEventListener("touchend", Et), document.addEventListener("touchcancel", Et), () => {
|
|
995
|
-
document.removeEventListener("touchstart", Lt), document.removeEventListener("touchmove", ee), document.removeEventListener("touchend", Et), document.removeEventListener("touchcancel", Et), w();
|
|
996
|
-
};
|
|
997
|
-
}, [F, n.length, kt]), Z(() => {
|
|
998
|
-
const o = (w) => {
|
|
999
|
-
w.key === "Escape" && (w.preventDefault(), w.stopPropagation(), F !== "closing" && zt("closing"));
|
|
1000
|
-
};
|
|
1001
|
-
return window.addEventListener("keydown", o, !0), () => window.removeEventListener("keydown", o, !0);
|
|
1002
|
-
}, [F]);
|
|
1003
|
-
const ce = () => {
|
|
1004
|
-
F !== "closing" && zt("closing");
|
|
1005
|
-
}, p = F === "open", Qt = F === "closing", Pt = gt > 0 ? Math.max(0, 1 - gt / 500) : 1, me = gt > 0 ? Math.max(0.35, 1 - gt / 500) : 1, de = Kt && f ? { width: cn(f), height: 1 } : Se, I = T ? P ? T : Zn(T, de) : null, D = {
|
|
1006
|
-
position: "fixed",
|
|
1007
|
-
top: d == null ? void 0 : d.top,
|
|
1008
|
-
left: d == null ? void 0 : d.left,
|
|
1009
|
-
width: d == null ? void 0 : d.width,
|
|
1010
|
-
height: d == null ? void 0 : d.height,
|
|
1011
|
-
zIndex: 9998
|
|
1012
|
-
}, ue = P ? "cover" : "contain", Ce = lt !== 0 || gt > 0 ? `translate(${lt}px, ${gt}px)` : void 0, he = Ht && !Ft ? "none" : Ft ? `transform ${mt}ms ${Mt}` : be ? `transform ${mt}ms ${Mt}, opacity ${mt}ms ${Mt}` : F === "opening" || Qt ? `opacity ${mt}ms ${Mt}` : "none", at = {
|
|
1013
|
-
...D,
|
|
1014
|
-
transform: Ce,
|
|
1015
|
-
opacity: gt > 0 ? me : F === "opening" || Qt ? 0 : 1,
|
|
1016
|
-
transition: he,
|
|
1017
|
-
pointerEvents: "none"
|
|
1018
|
-
}, Ot = {
|
|
1019
|
-
position: "absolute",
|
|
1020
|
-
top: ((I == null ? void 0 : I.top) ?? 0) - ((d == null ? void 0 : d.top) ?? 0),
|
|
1021
|
-
left: ((I == null ? void 0 : I.left) ?? 0) - ((d == null ? void 0 : d.left) ?? 0),
|
|
1022
|
-
width: I == null ? void 0 : I.width,
|
|
1023
|
-
height: I == null ? void 0 : I.height,
|
|
1024
|
-
objectFit: ue,
|
|
1025
|
-
pointerEvents: "none"
|
|
1026
|
-
}, ke = (d == null ? void 0 : d.width) ?? 0, Tt = jt ? (e + St + n.length) % n.length : null, K = Tt !== null ? n[Tt] : null, ge = {
|
|
1027
|
-
...D,
|
|
1028
|
-
transform: jt ? `translateX(${St * ke + lt}px)` : void 0,
|
|
1029
|
-
opacity: 1,
|
|
1030
|
-
transition: Ft ? `transform ${mt}ms ${Mt}` : "none",
|
|
1031
|
-
pointerEvents: "none"
|
|
1032
|
-
}, pe = {
|
|
1033
|
-
position: "absolute",
|
|
1034
|
-
top: ((T == null ? void 0 : T.top) ?? 0) - ((d == null ? void 0 : d.top) ?? 0),
|
|
1035
|
-
left: ((T == null ? void 0 : T.left) ?? 0) - ((d == null ? void 0 : d.left) ?? 0),
|
|
1036
|
-
width: T == null ? void 0 : T.width,
|
|
1037
|
-
height: T == null ? void 0 : T.height,
|
|
1038
|
-
objectFit: ue,
|
|
1039
|
-
pointerEvents: "none"
|
|
1040
|
-
}, Ee = Kt && f && Nn(f).controls && I ? Math.min(52, I.height * 0.2) : 0, te = I ? {
|
|
1041
|
-
position: "fixed",
|
|
1042
|
-
top: I.top,
|
|
1043
|
-
height: I.height - Ee,
|
|
1044
|
-
width: I.width / 2,
|
|
1045
|
-
zIndex: 9999
|
|
1046
|
-
} : null;
|
|
1047
|
-
return /* @__PURE__ */ W(
|
|
1048
|
-
"div",
|
|
1049
|
-
{
|
|
1050
|
-
ref: ht,
|
|
1051
|
-
className: [
|
|
1052
|
-
`${t}-lightbox`,
|
|
1053
|
-
s ? `${t}-lightbox-editor` : ""
|
|
1054
|
-
].filter(Boolean).join(" "),
|
|
1055
|
-
style: {
|
|
1056
|
-
touchAction: F === "open" ? "none" : void 0
|
|
1057
|
-
},
|
|
1058
|
-
onClick: ce,
|
|
1059
|
-
children: [
|
|
1060
|
-
/* @__PURE__ */ r(
|
|
1061
|
-
"div",
|
|
1062
|
-
{
|
|
1063
|
-
style: {
|
|
1064
|
-
position: "absolute",
|
|
1065
|
-
inset: 0,
|
|
1066
|
-
background: "rgba(28,31,34,0.9)",
|
|
1067
|
-
opacity: p ? Pt : 0,
|
|
1068
|
-
transition: Ht ? "none" : `opacity ${mt}ms ${Mt}`,
|
|
1069
|
-
pointerEvents: "none"
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
),
|
|
1073
|
-
/* @__PURE__ */ r(
|
|
1074
|
-
"div",
|
|
1075
|
-
{
|
|
1076
|
-
style: {
|
|
1077
|
-
position: "relative",
|
|
1078
|
-
width: "100%",
|
|
1079
|
-
height: "100%",
|
|
1080
|
-
display: "flex",
|
|
1081
|
-
flexDirection: "column",
|
|
1082
|
-
alignItems: "center",
|
|
1083
|
-
justifyContent: "center"
|
|
1084
|
-
},
|
|
1085
|
-
children: P ? /* @__PURE__ */ W(dt, { children: [
|
|
1086
|
-
/* @__PURE__ */ r("div", { ref: tt, style: { position: "absolute", inset: 0 } }),
|
|
1087
|
-
/* @__PURE__ */ r(
|
|
1088
|
-
"div",
|
|
1089
|
-
{
|
|
1090
|
-
style: {
|
|
1091
|
-
position: "absolute",
|
|
1092
|
-
bottom: 0,
|
|
1093
|
-
left: 0,
|
|
1094
|
-
right: 0,
|
|
1095
|
-
display: "flex",
|
|
1096
|
-
flexDirection: "row",
|
|
1097
|
-
justifyContent: "center",
|
|
1098
|
-
alignItems: "center",
|
|
1099
|
-
height: "10%",
|
|
1100
|
-
opacity: p ? 1 : 0,
|
|
1101
|
-
transition: `opacity ${mt}ms ${Mt}`,
|
|
1102
|
-
pointerEvents: "none",
|
|
1103
|
-
zIndex: 9999
|
|
1104
|
-
},
|
|
1105
|
-
children: n.length > 1 && /* @__PURE__ */ W("p", { className: M, style: S, children: [
|
|
1106
|
-
e + 1,
|
|
1107
|
-
" / ",
|
|
1108
|
-
n.length
|
|
1109
|
-
] })
|
|
1110
|
-
}
|
|
1111
|
-
)
|
|
1112
|
-
] }) : /* @__PURE__ */ W(dt, { children: [
|
|
1113
|
-
/* @__PURE__ */ r("div", { style: { height: "10%" } }),
|
|
1114
|
-
/* @__PURE__ */ r(
|
|
1115
|
-
"div",
|
|
1116
|
-
{
|
|
1117
|
-
style: {
|
|
1118
|
-
width: "70%",
|
|
1119
|
-
height: "80%",
|
|
1120
|
-
display: "flex",
|
|
1121
|
-
justifyContent: "center",
|
|
1122
|
-
alignItems: "center"
|
|
1123
|
-
},
|
|
1124
|
-
children: /* @__PURE__ */ r("div", { ref: tt, style: { width: "100%", height: "100%" } })
|
|
1125
|
-
}
|
|
1126
|
-
),
|
|
1127
|
-
/* @__PURE__ */ r(
|
|
1128
|
-
"div",
|
|
1129
|
-
{
|
|
1130
|
-
style: {
|
|
1131
|
-
display: "flex",
|
|
1132
|
-
flexDirection: "row",
|
|
1133
|
-
justifyContent: "center",
|
|
1134
|
-
alignItems: "center",
|
|
1135
|
-
height: "10%",
|
|
1136
|
-
opacity: p ? 1 : 0,
|
|
1137
|
-
transition: `opacity ${mt}ms ${Mt}`
|
|
1138
|
-
},
|
|
1139
|
-
children: n.length > 1 && /* @__PURE__ */ W("p", { className: M, style: S, children: [
|
|
1140
|
-
e + 1,
|
|
1141
|
-
" / ",
|
|
1142
|
-
n.length
|
|
1143
|
-
] })
|
|
1144
|
-
}
|
|
1145
|
-
)
|
|
1146
|
-
] })
|
|
1147
|
-
}
|
|
1148
|
-
),
|
|
1149
|
-
T && d && K && /* @__PURE__ */ r("div", { style: ge, onTransitionEnd: ae, children: Xt(K) ? /* @__PURE__ */ r(
|
|
1150
|
-
"img",
|
|
1151
|
-
{
|
|
1152
|
-
src: K.thumbnail,
|
|
1153
|
-
alt: K.name,
|
|
1154
|
-
style: pe
|
|
1155
|
-
},
|
|
1156
|
-
`neighbor-${Tt}-${K.assetId}`
|
|
1157
|
-
) : _t(K) ? /* @__PURE__ */ r(
|
|
1158
|
-
"video",
|
|
1159
|
-
{
|
|
1160
|
-
src: K.assetId,
|
|
1161
|
-
muted: !0,
|
|
1162
|
-
autoPlay: !0,
|
|
1163
|
-
loop: !0,
|
|
1164
|
-
playsInline: !0,
|
|
1165
|
-
preload: "auto",
|
|
1166
|
-
style: pe
|
|
1167
|
-
},
|
|
1168
|
-
`neighbor-${Tt}-${K.assetId}`
|
|
1169
|
-
) : /* @__PURE__ */ r(
|
|
1170
|
-
"img",
|
|
1171
|
-
{
|
|
1172
|
-
src: K.assetId,
|
|
1173
|
-
alt: K.name,
|
|
1174
|
-
style: pe
|
|
1175
|
-
},
|
|
1176
|
-
`neighbor-${Tt}-${K.assetId}`
|
|
1177
|
-
) }),
|
|
1178
|
-
T && d && f && /* @__PURE__ */ r("div", { style: at, onTransitionEnd: ae, children: Kt ? /* @__PURE__ */ r(
|
|
1179
|
-
mn,
|
|
1180
|
-
{
|
|
1181
|
-
media: f,
|
|
1182
|
-
fit: P ? "cover" : "contain",
|
|
1183
|
-
lazy: !1,
|
|
1184
|
-
startsAtOnce: !0,
|
|
1185
|
-
style: Ot
|
|
1186
|
-
},
|
|
1187
|
-
`${e}-${f.assetId}`
|
|
1188
|
-
) : Ie ? /* @__PURE__ */ r(
|
|
1189
|
-
Jn,
|
|
1190
|
-
{
|
|
1191
|
-
src: f.assetId,
|
|
1192
|
-
mediaRef: a,
|
|
1193
|
-
mediaStyle: Ot,
|
|
1194
|
-
onLoadedMetadata: Vt
|
|
1195
|
-
},
|
|
1196
|
-
`${e}-${f.assetId}`
|
|
1197
|
-
) : /* @__PURE__ */ r(
|
|
1198
|
-
"img",
|
|
1199
|
-
{
|
|
1200
|
-
ref: a,
|
|
1201
|
-
src: f.assetId,
|
|
1202
|
-
alt: f.name,
|
|
1203
|
-
onLoad: Vt,
|
|
1204
|
-
style: Ot
|
|
1205
|
-
},
|
|
1206
|
-
`${e}-${f.assetId}`
|
|
1207
|
-
) }),
|
|
1208
|
-
p && te && n.length > 1 && /* @__PURE__ */ W(dt, { children: [
|
|
1209
|
-
/* @__PURE__ */ r(
|
|
1210
|
-
"div",
|
|
1211
|
-
{
|
|
1212
|
-
style: {
|
|
1213
|
-
...te,
|
|
1214
|
-
left: I.left,
|
|
1215
|
-
cursor: "w-resize",
|
|
1216
|
-
pointerEvents: Ht ? "none" : "auto"
|
|
1217
|
-
},
|
|
1218
|
-
onClick: (o) => {
|
|
1219
|
-
if (et.current) {
|
|
1220
|
-
et.current = !1;
|
|
1221
|
-
return;
|
|
1222
|
-
}
|
|
1223
|
-
o.stopPropagation(), Zt(-1);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
),
|
|
1227
|
-
/* @__PURE__ */ r(
|
|
1228
|
-
"div",
|
|
1229
|
-
{
|
|
1230
|
-
style: {
|
|
1231
|
-
...te,
|
|
1232
|
-
left: I.left + I.width / 2,
|
|
1233
|
-
cursor: "e-resize",
|
|
1234
|
-
pointerEvents: Ht ? "none" : "auto"
|
|
1235
|
-
},
|
|
1236
|
-
onClick: (o) => {
|
|
1237
|
-
if (et.current) {
|
|
1238
|
-
et.current = !1;
|
|
1239
|
-
return;
|
|
1240
|
-
}
|
|
1241
|
-
o.stopPropagation(), Zt(1);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
)
|
|
1245
|
-
] }),
|
|
1246
|
-
/* @__PURE__ */ r(
|
|
1247
|
-
ti,
|
|
1248
|
-
{
|
|
1249
|
-
prefix: t,
|
|
1250
|
-
closeIcon: j,
|
|
1251
|
-
closeIconMaxWidth: X,
|
|
1252
|
-
closeIconColor: rt,
|
|
1253
|
-
closeIconHoverColor: Q,
|
|
1254
|
-
iconMarginRight: b,
|
|
1255
|
-
contentMarginTop: ut,
|
|
1256
|
-
isEditor: s,
|
|
1257
|
-
isPreviewMode: c,
|
|
1258
|
-
isEditMode: u,
|
|
1259
|
-
visible: p,
|
|
1260
|
-
onClose: ce
|
|
1261
|
-
}
|
|
1262
|
-
)
|
|
1263
|
-
]
|
|
1264
|
-
}
|
|
1265
|
-
);
|
|
1266
|
-
}
|
|
1267
|
-
function ni(t) {
|
|
1268
|
-
return typeof t == "string" ? t === "cover" ? "cover" : "fit" : (t == null ? void 0 : t.display) === "cover" ? "cover" : "fit";
|
|
1269
|
-
}
|
|
1270
|
-
function Ve(t, n) {
|
|
1271
|
-
return t.columnWidth * n + t.gutterWidth * Math.max(0, n - 1);
|
|
1272
|
-
}
|
|
1273
|
-
function ii(t) {
|
|
1274
|
-
return t.blocks.reduce((n, e) => Math.max(n, Math.max(0, e.top) + Math.max(0, e.height)), 0);
|
|
1275
|
-
}
|
|
1276
|
-
function ri(t) {
|
|
1277
|
-
return typeof t.verticalGap == "number" ? Math.max(0, t.verticalGap) : Math.max(0, (t.repeatHeight ?? 0) - ii(t));
|
|
1278
|
-
}
|
|
1279
|
-
function $n(t, n) {
|
|
1280
|
-
const e = t.blocks[n % t.blocks.length], l = Math.min(Math.max(1, Math.round(e.span)), t.columnsCount), s = Math.min(Math.max(0, Math.round(e.column)), t.columnsCount - l);
|
|
1281
|
-
return {
|
|
1282
|
-
column: s,
|
|
1283
|
-
span: l,
|
|
1284
|
-
width: Ve(t, l),
|
|
1285
|
-
top: Math.max(0, e.top),
|
|
1286
|
-
height: Math.max(0, e.height),
|
|
1287
|
-
gridColumn: `${s + 1} / span ${l}`
|
|
1288
|
-
};
|
|
1289
|
-
}
|
|
1290
|
-
const Fe = 1e-6;
|
|
1291
|
-
function oi(t, n, e) {
|
|
1292
|
-
const l = t.beat ?? 0, s = l > 0 && !!e, c = (i) => Math.ceil(i / l - 1e-3) * l, u = [], _ = [], J = ri(t);
|
|
1293
|
-
for (let i = 0; i < n; i += t.blocks.length) {
|
|
1294
|
-
i > 0 && J > 0 && u.push(J);
|
|
1295
|
-
const M = Array.from(
|
|
1296
|
-
{ length: Math.min(t.blocks.length, n - i) },
|
|
1297
|
-
(a, m) => $n(t, i + m)
|
|
1298
|
-
), S = M.map((a) => {
|
|
1299
|
-
const m = M.filter((y) => y.column < a.column + a.span && a.column < y.column + y.span && y.top >= a.top + a.height - Fe);
|
|
1300
|
-
return m.length > 0 ? Math.min(...m.map((y) => y.top)) : void 0;
|
|
1301
|
-
}), j = [0, ...M.map((a) => a.top)].sort((a, m) => a - m).filter((a, m, y) => m === 0 || a - y[m - 1] > Fe), X = (a, m) => Math.abs(a - m) <= Fe, rt = (a) => j.findIndex((m) => X(m, a)), Q = [];
|
|
1302
|
-
let b = 0;
|
|
1303
|
-
const ut = (a) => {
|
|
1304
|
-
const m = M.flatMap((z, O) => a(S[O]) ? [{ slot: z, entry: i + O }] : []);
|
|
1305
|
-
if (m.length === 0) return;
|
|
1306
|
-
if (!s) {
|
|
1307
|
-
u.push("auto");
|
|
1308
|
-
return;
|
|
1309
|
-
}
|
|
1310
|
-
const y = Math.max(...m.map(({ slot: z, entry: O }) => Q[rt(z.top)] + (e[O] ?? 0))), R = Math.max(0, c(y) - b);
|
|
1311
|
-
u.push(R), b += R;
|
|
1312
|
-
}, P = j.map((a, m) => (m > 0 && (u.push(a - j[m - 1]), b += a - j[m - 1]), ut((y) => y !== void 0 && X(y, a)), Q.push(b), u.length + 1));
|
|
1313
|
-
ut((a) => a === void 0);
|
|
1314
|
-
const ht = u.length + 1, tt = (a) => P[rt(a)];
|
|
1315
|
-
M.forEach((a, m) => {
|
|
1316
|
-
const y = S[m];
|
|
1317
|
-
_.push(`${tt(a.top)} / ${y === void 0 ? ht : tt(y)}`);
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
return { tracks: u, gridRows: _ };
|
|
1321
|
-
}
|
|
1322
|
-
function wi({ settings: t, content: n, isEditor: e, isPreviewMode: l, isEditMode: s, metadata: c, activeEvent: u, layoutId: _, portalId: J }) {
|
|
1323
|
-
const { prefix: i } = Ln(), {
|
|
1324
|
-
type: M = "a",
|
|
1325
|
-
gridLayout: S,
|
|
1326
|
-
customGrid: j,
|
|
1327
|
-
textBoxWidth: X = 100,
|
|
1328
|
-
verticalGap: rt,
|
|
1329
|
-
entriesCount: Q,
|
|
1330
|
-
lightbox: b,
|
|
1331
|
-
imageDisplay: ut,
|
|
1332
|
-
imageCorners: P,
|
|
1333
|
-
lightboxImageDisplay: ht,
|
|
1334
|
-
slider: tt,
|
|
1335
|
-
sliderTiming: a,
|
|
1336
|
-
direction: m,
|
|
1337
|
-
transition: y,
|
|
1338
|
-
titleMarginTop: R,
|
|
1339
|
-
subtitleMarginTop: z,
|
|
1340
|
-
titleColor: O,
|
|
1341
|
-
subtitleColor: et,
|
|
1342
|
-
lightboxCounterColor: v,
|
|
1343
|
-
titleFontFamily: $,
|
|
1344
|
-
titleFontSettings: k,
|
|
1345
|
-
titleFontSize: G,
|
|
1346
|
-
titleLineHeight: Y,
|
|
1347
|
-
titleLetterSpacing: st,
|
|
1348
|
-
titleWordSpacing: Dt,
|
|
1349
|
-
titleTextAppearance: qt,
|
|
1350
|
-
subtitleFontFamily: T,
|
|
1351
|
-
subtitleFontSettings: yt,
|
|
1352
|
-
subtitleFontSize: d,
|
|
1353
|
-
subtitleLineHeight: Gt,
|
|
1354
|
-
subtitleLetterSpacing: F,
|
|
1355
|
-
subtitleWordSpacing: zt,
|
|
1356
|
-
subtitleTextAppearance: gt,
|
|
1357
|
-
lightboxCounterFontFamily: At,
|
|
1358
|
-
lightboxCounterFontSettings: lt,
|
|
1359
|
-
lightboxCounterFontSize: ot,
|
|
1360
|
-
lightboxCounterLineHeight: St,
|
|
1361
|
-
lightboxCounterLetterSpacing: vt,
|
|
1362
|
-
lightboxCounterWordSpacing: Ft,
|
|
1363
|
-
lightboxCounterTextAppearance: It,
|
|
1364
|
-
closeIcon: Ht,
|
|
1365
|
-
closeIconMaxWidth: Rt,
|
|
1366
|
-
closeIconColor: be,
|
|
1367
|
-
closeIconHoverColor: re,
|
|
1368
|
-
iconMarginRight: Se,
|
|
1369
|
-
contentMarginTop: oe,
|
|
1370
|
-
showText: se = "always",
|
|
1371
|
-
hover: Yt = "none",
|
|
1372
|
-
alignEntries: f = "off",
|
|
1373
|
-
align: Ie = "top",
|
|
1374
|
-
textGrowth: Kt = "inside"
|
|
1375
|
-
} = t, jt = $t(() => ({
|
|
1376
|
-
...Re(Oe({
|
|
1377
|
-
fontSettings: {
|
|
1378
|
-
fontFamily: $,
|
|
1379
|
-
fontWeight: (k == null ? void 0 : k.fontWeight) ?? 400,
|
|
1380
|
-
fontStyle: (k == null ? void 0 : k.fontStyle) ?? "normal"
|
|
1381
|
-
},
|
|
1382
|
-
fontSize: G ?? 0.01,
|
|
1383
|
-
lineHeight: Y,
|
|
1384
|
-
letterSpacing: st ?? 0,
|
|
1385
|
-
wordSpacing: Dt ?? 0,
|
|
1386
|
-
textAppearance: qt,
|
|
1387
|
-
color: O
|
|
1388
|
-
}, e)),
|
|
1389
|
-
..._e(G, Y, i, e)
|
|
1390
|
-
}), [
|
|
1391
|
-
$,
|
|
1392
|
-
k,
|
|
1393
|
-
G,
|
|
1394
|
-
Y,
|
|
1395
|
-
st,
|
|
1396
|
-
Dt,
|
|
1397
|
-
qt,
|
|
1398
|
-
O,
|
|
1399
|
-
e,
|
|
1400
|
-
i
|
|
1401
|
-
]), Vt = $t(() => ({
|
|
1402
|
-
...Re(Oe({
|
|
1403
|
-
fontSettings: {
|
|
1404
|
-
fontFamily: T,
|
|
1405
|
-
fontWeight: (yt == null ? void 0 : yt.fontWeight) ?? 400,
|
|
1406
|
-
fontStyle: (yt == null ? void 0 : yt.fontStyle) ?? "normal"
|
|
1407
|
-
},
|
|
1408
|
-
fontSize: d ?? 0.01,
|
|
1409
|
-
lineHeight: Gt,
|
|
1410
|
-
letterSpacing: F ?? 0,
|
|
1411
|
-
wordSpacing: zt ?? 0,
|
|
1412
|
-
textAppearance: gt,
|
|
1413
|
-
color: et
|
|
1414
|
-
}, e)),
|
|
1415
|
-
..._e(d, Gt, i, e)
|
|
1416
|
-
}), [
|
|
1417
|
-
T,
|
|
1418
|
-
yt,
|
|
1419
|
-
d,
|
|
1420
|
-
Gt,
|
|
1421
|
-
F,
|
|
1422
|
-
zt,
|
|
1423
|
-
gt,
|
|
1424
|
-
et,
|
|
1425
|
-
e,
|
|
1426
|
-
i
|
|
1427
|
-
]), V = $t(() => ({
|
|
1428
|
-
...Re(Oe({
|
|
1429
|
-
fontSettings: {
|
|
1430
|
-
fontFamily: At,
|
|
1431
|
-
fontWeight: (lt == null ? void 0 : lt.fontWeight) ?? 400,
|
|
1432
|
-
fontStyle: (lt == null ? void 0 : lt.fontStyle) ?? "normal"
|
|
1433
|
-
},
|
|
1434
|
-
fontSize: ot ?? 0.01,
|
|
1435
|
-
lineHeight: St,
|
|
1436
|
-
letterSpacing: vt ?? 0,
|
|
1437
|
-
wordSpacing: Ft ?? 0,
|
|
1438
|
-
textAppearance: It,
|
|
1439
|
-
color: v
|
|
1440
|
-
}, e)),
|
|
1441
|
-
..._e(ot, St, i, e)
|
|
1442
|
-
}), [
|
|
1443
|
-
At,
|
|
1444
|
-
lt,
|
|
1445
|
-
ot,
|
|
1446
|
-
St,
|
|
1447
|
-
vt,
|
|
1448
|
-
Ft,
|
|
1449
|
-
It,
|
|
1450
|
-
v,
|
|
1451
|
-
e,
|
|
1452
|
-
i
|
|
1453
|
-
]), pt = We(
|
|
1454
|
-
G,
|
|
1455
|
-
Y,
|
|
1456
|
-
`${i}-item-title`,
|
|
1457
|
-
`${i}-text-tight-leading`
|
|
1458
|
-
), Ct = We(
|
|
1459
|
-
d,
|
|
1460
|
-
Gt,
|
|
1461
|
-
`${i}-item-subtitle`,
|
|
1462
|
-
`${i}-text-tight-leading`
|
|
1463
|
-
), le = We(
|
|
1464
|
-
ot,
|
|
1465
|
-
St,
|
|
1466
|
-
`${i}-lightbox-counter`,
|
|
1467
|
-
`${i}-text-tight-leading`
|
|
1468
|
-
), kt = $t(() => Tn(i, {
|
|
1469
|
-
titleColor: O,
|
|
1470
|
-
subtitleColor: et,
|
|
1471
|
-
lightboxCounterColor: v
|
|
1472
|
-
}, si, li), [i, O, et, v]), Zt = u && u !== "default" ? `${i}-state-${u}` : "", ae = se === "on hover" && (!e || l), Jt = Yt !== "none" && (!e || l) ? ` ${i}-hover-${Yt}` : "", ce = `${Zt}${ae ? ` ${i}-show-text-hover` : ""}${Jt}`.trim(), p = j && Array.isArray(j.blocks) && j.blocks.length > 0 ? j : void 0, Qt = p || Q === 0 ? 1 / 0 : Q, Pt = !!p && Kt === "outside", me = N([]), [de, I] = A([]), D = $t(() => (n ?? []).slice(0, Qt), [n, Qt]), ue = $t(
|
|
1473
|
-
() => b === "on" ? En(D) : [],
|
|
1474
|
-
[D, b]
|
|
1475
|
-
), Ce = $t(() => D.map((h) => {
|
|
1476
|
-
const g = gn(h.gallery), E = g.filter((L) => L.lightboxMedia).map((L) => L.lightboxMedia), B = g.map(({ lightboxMedia: L }) => L ? E.findIndex((Wt) => Wt.assetId === L.assetId) : -1);
|
|
1477
|
-
return { displayItems: g, lightboxItemsForEntry: E, lightboxIndexes: B };
|
|
1478
|
-
}), [D]), he = (S == null ? void 0 : S.entryWidth) ?? 0.2, at = typeof ut == "string" ? { display: ut } : ut, Ot = (at == null ? void 0 : at.display) === "cover", ke = (at == null ? void 0 : at.ratioValue) ?? "1:1", Tt = (at == null ? void 0 : at.reversed) ?? !1, [K, ge] = ke.split(":").map(Number), te = `${Tt ? ge : K} / ${Tt ? K : ge}`, o = (S == null ? void 0 : S.columnsCount) ?? 1, w = x(he ?? 0, e), q = !p && !Ot && tt !== "off", wt = D.length % o || o, Lt = !p && wt < o && D.length > 0, ee = D.length - wt, Et = Lt ? Math.floor((o - wt) / 2) + 1 : 1, C = P ? x(P, e) : void 0, nt = (h, g) => ({
|
|
1479
|
-
width: h,
|
|
1480
|
-
...g ? Pt ? { height: x(g.height, e), flexShrink: 0, overflow: "hidden" } : { flex: "1 1 0%", minHeight: 0, overflow: "hidden" } : Ot ? { aspectRatio: te, height: "auto", overflow: "hidden" } : { height: "auto" },
|
|
1481
|
-
...C ? { borderRadius: C, overflow: "hidden" } : {}
|
|
1482
|
-
}), xt = `${i}-item-image-wrapper${q ? ` ${i}-item-image-wrapper-fit-slider` : ""}`.trim(), H = M === "d" || M === "e" || M === "f", it = !p && f === "on", Be = C ? { borderRadius: C, [un]: C } : {}, Ue = Ot ? {
|
|
1483
|
-
objectFit: "cover",
|
|
1484
|
-
pointerEvents: "auto",
|
|
1485
|
-
width: "100%",
|
|
1486
|
-
height: "100%",
|
|
1487
|
-
maxWidth: "100%",
|
|
1488
|
-
...Be
|
|
1489
|
-
} : {
|
|
1490
|
-
objectFit: "contain",
|
|
1491
|
-
pointerEvents: "auto",
|
|
1492
|
-
width: "auto",
|
|
1493
|
-
height: "auto",
|
|
1494
|
-
maxWidth: "100%",
|
|
1495
|
-
...p ? { maxHeight: "100%" } : {},
|
|
1496
|
-
...Be
|
|
1497
|
-
}, Te = ((p == null ? void 0 : p.beat) ?? 0) > 0, Le = p ? Ve(p, p.columnsCount) : 0;
|
|
1498
|
-
He(() => {
|
|
1499
|
-
if (!Te) {
|
|
1500
|
-
I((L) => L.length > 0 ? [] : L);
|
|
1501
|
-
return;
|
|
1502
|
-
}
|
|
1503
|
-
const h = fe.current, g = me.current.slice(0, D.length), E = () => {
|
|
1504
|
-
const L = h && Le > 0 ? h.offsetWidth / Le : 0;
|
|
1505
|
-
if (L <= 0) return;
|
|
1506
|
-
const Wt = g.map((ct) => ct ? ct.offsetHeight / L : 0);
|
|
1507
|
-
I((ct) => ct.length === Wt.length && ct.every((ft, ne) => Math.abs(ft - Wt[ne]) < 1e-5) ? ct : Wt);
|
|
1508
|
-
};
|
|
1509
|
-
E();
|
|
1510
|
-
const B = new ResizeObserver(E);
|
|
1511
|
-
return h && B.observe(h), g.forEach((L) => L && B.observe(L)), () => B.disconnect();
|
|
1512
|
-
}, [Te, D.length, Le, i]);
|
|
1513
|
-
const Xe = Te && de.length === D.length ? de : void 0, Bt = $t(() => {
|
|
1514
|
-
if (!p) return;
|
|
1515
|
-
const h = oi(p, D.length, Xe);
|
|
1516
|
-
return {
|
|
1517
|
-
gridRows: h.gridRows,
|
|
1518
|
-
gridTemplateRows: h.tracks.length ? h.tracks.map((g) => g === "auto" ? "auto" : x(g, e)).join(" ") : "auto"
|
|
1519
|
-
};
|
|
1520
|
-
}, [p, D.length, Xe, e]), Ne = $t(
|
|
1521
|
-
() => p ? D.map((h, g) => $n(p, g)) : void 0,
|
|
1522
|
-
[p, D.length]
|
|
1523
|
-
), yn = p ? {
|
|
1524
|
-
gridTemplateColumns: `repeat(${p.columnsCount}, ${x(p.columnWidth, e)})`,
|
|
1525
|
-
gridTemplateRows: (Bt == null ? void 0 : Bt.gridTemplateRows) ?? "auto",
|
|
1526
|
-
rowGap: 0,
|
|
1527
|
-
columnGap: x(p.gutterWidth, e),
|
|
1528
|
-
width: x(Ve(p, p.columnsCount), e)
|
|
1529
|
-
} : {
|
|
1530
|
-
gridTemplateColumns: `repeat(${o}, ${w})`,
|
|
1531
|
-
rowGap: it ? 0 : x(rt ?? 0, e),
|
|
1532
|
-
columnGap: x((S == null ? void 0 : S.horizontalGap) ?? 0, e),
|
|
1533
|
-
width: x((S == null ? void 0 : S.wrapperWidth) ?? 0, e),
|
|
1534
|
-
...it ? { [`--${i}-align-entries-row-gap`]: x(rt ?? 0, e) } : {}
|
|
1535
|
-
}, fe = N(null), vn = () => {
|
|
1536
|
-
const h = { ...kt }, g = fe.current ? getComputedStyle(fe.current).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
1537
|
-
return g && (h["--cntrl-article-width"] = g), h;
|
|
1538
|
-
}, [Me, ze] = A(!1), [$e, wn] = A([]), [xn, Ae] = A(0), qe = b === "on" && (!e || l), Ye = (h, g) => {
|
|
1539
|
-
e && !l || b !== "off" && (wn(h), Ae(g), ze(!0));
|
|
1540
|
-
};
|
|
1541
|
-
Z(() => {
|
|
1542
|
-
if (!Me || b !== "on" || typeof document > "u") return;
|
|
1543
|
-
const h = document.body.style.overflow;
|
|
1544
|
-
return document.body.style.overflow = "hidden", () => {
|
|
1545
|
-
document.body.style.overflow = h;
|
|
1546
|
-
};
|
|
1547
|
-
}, [Me, b]), Z(() => {
|
|
1548
|
-
!e || l || ze(!1);
|
|
1549
|
-
}, [e, l]);
|
|
1550
|
-
const bn = $t(() => Wn(i), [i]);
|
|
1551
|
-
return /* @__PURE__ */ W(dt, { children: [
|
|
1552
|
-
/* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: bn } }),
|
|
1553
|
-
b === "on" && /* @__PURE__ */ r(Bn, { mediaList: ue }),
|
|
1554
|
-
/* @__PURE__ */ r("div", { style: kt, children: /* @__PURE__ */ r(
|
|
1555
|
-
"div",
|
|
1556
|
-
{
|
|
1557
|
-
ref: fe,
|
|
1558
|
-
className: `${i}-wrapper ${i}-type-${M}${it ? ` ${i}-align-entries` : ""}${p ? ` ${i}-custom-layout` : ""}${Pt ? ` ${i}-text-outside` : ""} ${i}-image-align-${Ie} ${ce}`.trim(),
|
|
1559
|
-
style: yn,
|
|
1560
|
-
children: D.map((h, g) => {
|
|
1561
|
-
var en;
|
|
1562
|
-
const E = rn(h.title), B = rn(h.subtitle), L = b === "off" && ((en = h.link) != null && en.value) ? h.link : void 0, Wt = Math.floor(g / o) === Math.ceil(D.length / o) - 1, ct = Lt && g >= ee ? `${Et + (g - ee)}` : void 0, ft = Ne == null ? void 0 : Ne[g], ne = (ft == null ? void 0 : ft.width) ?? he, ye = x(ne, e), Ut = `calc(${ye} * (${X} / 100))`, Nt = x(ne * X / 100, e), Sn = nt(ye, ft), In = ft ? {
|
|
1563
|
-
gridColumn: ft.gridColumn,
|
|
1564
|
-
gridRow: Bt == null ? void 0 : Bt.gridRows[g],
|
|
1565
|
-
alignSelf: "start"
|
|
1566
|
-
} : ct && !it ? { gridColumn: ct } : void 0, Ke = H ? /* @__PURE__ */ W("div", { className: `${i}-item-text-block`, children: [
|
|
1567
|
-
E && /* @__PURE__ */ r("p", { className: pt, style: { width: Ut, ...jt }, children: h.title }),
|
|
1568
|
-
E && /* @__PURE__ */ r(
|
|
1569
|
-
"div",
|
|
1570
|
-
{
|
|
1571
|
-
"data-controls": s ? "titleMarginTop" : void 0,
|
|
1572
|
-
className: s ? `${i}-control` : void 0,
|
|
1573
|
-
style: {
|
|
1574
|
-
height: x(R ?? 0, e),
|
|
1575
|
-
width: Nt
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
),
|
|
1579
|
-
B && /* @__PURE__ */ r("p", { className: Ct, style: { width: Ut, ...Vt }, children: h.subtitle }),
|
|
1580
|
-
B && /* @__PURE__ */ r(
|
|
1581
|
-
"div",
|
|
1582
|
-
{
|
|
1583
|
-
"data-controls": s ? "subtitleMarginTop" : void 0,
|
|
1584
|
-
className: s ? `${i}-control` : void 0,
|
|
1585
|
-
style: {
|
|
1586
|
-
height: x(z ?? 0, e),
|
|
1587
|
-
width: Nt
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
)
|
|
1591
|
-
] }) : null, Cn = it ? /* @__PURE__ */ W("div", { className: `${i}-item-title-row`, children: [
|
|
1592
|
-
!H && /* @__PURE__ */ r(
|
|
1593
|
-
"div",
|
|
1594
|
-
{
|
|
1595
|
-
"data-controls": s && E ? "titleMarginTop" : void 0,
|
|
1596
|
-
className: s && E ? `${i}-control` : void 0,
|
|
1597
|
-
style: {
|
|
1598
|
-
height: E ? x(R ?? 0, e) : 0,
|
|
1599
|
-
width: Nt
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
),
|
|
1603
|
-
E && /* @__PURE__ */ r("p", { className: pt, style: { width: Ut, ...jt }, children: h.title }),
|
|
1604
|
-
H && E && /* @__PURE__ */ r(
|
|
1605
|
-
"div",
|
|
1606
|
-
{
|
|
1607
|
-
"data-controls": s ? "titleMarginTop" : void 0,
|
|
1608
|
-
className: s ? `${i}-control` : void 0,
|
|
1609
|
-
style: {
|
|
1610
|
-
height: x(R ?? 0, e),
|
|
1611
|
-
width: Nt
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
)
|
|
1615
|
-
] }) : null, kn = it ? /* @__PURE__ */ W("div", { className: `${i}-item-subtitle-row`, children: [
|
|
1616
|
-
!H && /* @__PURE__ */ r(
|
|
1617
|
-
"div",
|
|
1618
|
-
{
|
|
1619
|
-
"data-controls": s && B ? "subtitleMarginTop" : void 0,
|
|
1620
|
-
className: s && B ? `${i}-control` : void 0,
|
|
1621
|
-
style: {
|
|
1622
|
-
height: B ? x(z ?? 0, e) : 0,
|
|
1623
|
-
width: Nt
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
),
|
|
1627
|
-
B && /* @__PURE__ */ r("p", { className: Ct, style: { width: Ut, ...Vt }, children: h.subtitle }),
|
|
1628
|
-
H && B && /* @__PURE__ */ r(
|
|
1629
|
-
"div",
|
|
1630
|
-
{
|
|
1631
|
-
"data-controls": s ? "subtitleMarginTop" : void 0,
|
|
1632
|
-
className: s ? `${i}-control` : void 0,
|
|
1633
|
-
style: {
|
|
1634
|
-
height: x(z ?? 0, e),
|
|
1635
|
-
width: Nt
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
)
|
|
1639
|
-
] }) : null, Ze = /* @__PURE__ */ W(xe, { link: L, className: `${i}-item-text-link`, children: [
|
|
1640
|
-
Cn,
|
|
1641
|
-
kn
|
|
1642
|
-
] }), { displayItems: ie, lightboxItemsForEntry: Je, lightboxIndexes: Qe } = Ce[g], ve = /* @__PURE__ */ r(Kn, { className: xt, style: Sn, children: ie.length === 0 ? null : tt === "off" ? (() => {
|
|
1643
|
-
const { displayMedia: U } = ie[0], we = Qe[0];
|
|
1644
|
-
return /* @__PURE__ */ r(
|
|
1645
|
-
sn,
|
|
1646
|
-
{
|
|
1647
|
-
media: U,
|
|
1648
|
-
className: `${i}-item-${_t(U) ? "video" : "image"}`.trim(),
|
|
1649
|
-
style: Ue,
|
|
1650
|
-
hasLightbox: b === "on",
|
|
1651
|
-
onMediaClick: qe && we >= 0 ? () => Ye(Je, we) : void 0
|
|
1652
|
-
}
|
|
1653
|
-
);
|
|
1654
|
-
})() : /* @__PURE__ */ W(dt, { children: [
|
|
1655
|
-
q && /* @__PURE__ */ r("div", { className: `${i}-item-image-wrapper-sizer`, "aria-hidden": "true", children: ie.map(({ displayMedia: U }) => Xt(U) ? /* @__PURE__ */ r("div", { style: { aspectRatio: `${cn(U)}` } }, `sizer-${U.assetId}`) : _t(U) ? /* @__PURE__ */ r(dn, { src: U.assetId, nearPreload: "metadata", muted: !0, playsInline: !0 }, `sizer-${U.assetId}`) : /* @__PURE__ */ r("img", { src: U.assetId, alt: "" }, `sizer-${U.assetId}`)) }),
|
|
1656
|
-
/* @__PURE__ */ r(
|
|
1657
|
-
Yn,
|
|
1658
|
-
{
|
|
1659
|
-
prefix: i,
|
|
1660
|
-
isFade: y === "fade",
|
|
1661
|
-
direction: m,
|
|
1662
|
-
intervalMs: a * 1e3,
|
|
1663
|
-
slides: ie.map(({ displayMedia: U }, we) => {
|
|
1664
|
-
const nn = Qe[we];
|
|
1665
|
-
return /* @__PURE__ */ r(
|
|
1666
|
-
sn,
|
|
1667
|
-
{
|
|
1668
|
-
media: U,
|
|
1669
|
-
className: `${i}-item-${_t(U) ? "video" : "image"}`.trim(),
|
|
1670
|
-
style: Ue,
|
|
1671
|
-
hasLightbox: b === "on",
|
|
1672
|
-
isSliderSlide: !0,
|
|
1673
|
-
onMediaClick: qe && nn >= 0 ? () => Ye(Je, nn) : void 0
|
|
1674
|
-
}
|
|
1675
|
-
);
|
|
1676
|
-
})
|
|
1677
|
-
},
|
|
1678
|
-
`${y}-${ne}-${m}-${a}-${_}-${ie.length}`
|
|
1679
|
-
)
|
|
1680
|
-
] }) }), Pe = H ? null : /* @__PURE__ */ W(dt, { children: [
|
|
1681
|
-
/* @__PURE__ */ r(
|
|
1682
|
-
"div",
|
|
1683
|
-
{
|
|
1684
|
-
"data-controls": s && E ? "titleMarginTop" : void 0,
|
|
1685
|
-
className: s && E ? `${i}-control` : void 0,
|
|
1686
|
-
style: {
|
|
1687
|
-
height: E ? x(R ?? 0, e) : 0,
|
|
1688
|
-
width: Nt
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
),
|
|
1692
|
-
/* @__PURE__ */ r(
|
|
1693
|
-
"p",
|
|
1694
|
-
{
|
|
1695
|
-
className: pt,
|
|
1696
|
-
style: { width: Ut, ...jt },
|
|
1697
|
-
children: h.title
|
|
1698
|
-
}
|
|
1699
|
-
),
|
|
1700
|
-
/* @__PURE__ */ r(
|
|
1701
|
-
"div",
|
|
1702
|
-
{
|
|
1703
|
-
"data-controls": s && B ? "subtitleMarginTop" : void 0,
|
|
1704
|
-
className: s && B ? `${i}-control` : void 0,
|
|
1705
|
-
style: {
|
|
1706
|
-
height: B ? x(z ?? 0, e) : 0,
|
|
1707
|
-
width: Nt
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
),
|
|
1711
|
-
/* @__PURE__ */ r(
|
|
1712
|
-
"p",
|
|
1713
|
-
{
|
|
1714
|
-
className: Ct,
|
|
1715
|
-
style: { width: Ut, ...Vt },
|
|
1716
|
-
children: h.subtitle
|
|
1717
|
-
}
|
|
1718
|
-
)
|
|
1719
|
-
] }), tn = L ? /* @__PURE__ */ r(xe, { link: L, className: `${i}-item-image-link`, children: ve }) : /* @__PURE__ */ r("a", { className: `${i}-item-image-link`, children: ve });
|
|
1720
|
-
return /* @__PURE__ */ r(
|
|
1721
|
-
"div",
|
|
1722
|
-
{
|
|
1723
|
-
className: `${i}-item`.trim(),
|
|
1724
|
-
style: In,
|
|
1725
|
-
children: /* @__PURE__ */ r(
|
|
1726
|
-
"div",
|
|
1727
|
-
{
|
|
1728
|
-
ref: (U) => {
|
|
1729
|
-
me.current[g] = U;
|
|
1730
|
-
},
|
|
1731
|
-
className: `${s ? `${i}-item-inner` : `${i}-item-inner-hidden`}${it && Wt ? ` ${i}-item-inner-last-row` : ""}`.trim(),
|
|
1732
|
-
style: {
|
|
1733
|
-
width: (X ?? 0) > 100 ? `calc(${ye} * (${X} / 100))` : ye,
|
|
1734
|
-
...ft && !Pt ? { height: x(ft.height, e) } : {},
|
|
1735
|
-
...ct && it ? { gridColumn: ct } : {}
|
|
1736
|
-
},
|
|
1737
|
-
children: it ? /* @__PURE__ */ r(dt, { children: H ? /* @__PURE__ */ W(dt, { children: [
|
|
1738
|
-
Ze,
|
|
1739
|
-
tn
|
|
1740
|
-
] }) : /* @__PURE__ */ W(dt, { children: [
|
|
1741
|
-
tn,
|
|
1742
|
-
Ze
|
|
1743
|
-
] }) }) : L ? /* @__PURE__ */ W(dt, { children: [
|
|
1744
|
-
/* @__PURE__ */ W(xe, { link: L, className: `${i}-item-image-link`, children: [
|
|
1745
|
-
Ke,
|
|
1746
|
-
ve
|
|
1747
|
-
] }),
|
|
1748
|
-
!H && /* @__PURE__ */ r(xe, { link: L, className: `${i}-item-text-link`, children: Pe })
|
|
1749
|
-
] }) : /* @__PURE__ */ W(dt, { children: [
|
|
1750
|
-
Ke,
|
|
1751
|
-
ve,
|
|
1752
|
-
Pe
|
|
1753
|
-
] })
|
|
1754
|
-
}
|
|
1755
|
-
)
|
|
1756
|
-
},
|
|
1757
|
-
g
|
|
1758
|
-
);
|
|
1759
|
-
})
|
|
1760
|
-
}
|
|
1761
|
-
) }),
|
|
1762
|
-
(!e || l) && Me && typeof document < "u" && b === "on" && (() => {
|
|
1763
|
-
const h = (J ? document.getElementById(J) : null) ?? document.body;
|
|
1764
|
-
return zn(
|
|
1765
|
-
/* @__PURE__ */ r("div", { style: vn(), "data-selection": "none", children: /* @__PURE__ */ r(
|
|
1766
|
-
ei,
|
|
1767
|
-
{
|
|
1768
|
-
prefix: i,
|
|
1769
|
-
items: $e,
|
|
1770
|
-
index: xn,
|
|
1771
|
-
imageDisplay: ni(ht),
|
|
1772
|
-
isEditor: e,
|
|
1773
|
-
isPreviewMode: l,
|
|
1774
|
-
isEditMode: s,
|
|
1775
|
-
closeIcon: Ht,
|
|
1776
|
-
closeIconMaxWidth: Rt,
|
|
1777
|
-
closeIconColor: be,
|
|
1778
|
-
closeIconHoverColor: re,
|
|
1779
|
-
iconMarginRight: Se,
|
|
1780
|
-
contentMarginTop: oe,
|
|
1781
|
-
onClose: () => ze(!1),
|
|
1782
|
-
onPrev: () => Ae((g) => (g - 1 + $e.length) % $e.length),
|
|
1783
|
-
onNext: () => Ae((g) => (g + 1) % $e.length),
|
|
1784
|
-
counterClassName: le,
|
|
1785
|
-
counterStyle: V
|
|
1786
|
-
}
|
|
1787
|
-
) }),
|
|
1788
|
-
h
|
|
1789
|
-
);
|
|
1790
|
-
})()
|
|
1791
|
-
] });
|
|
1792
|
-
}
|
|
1793
|
-
const si = {
|
|
1794
|
-
titleColor: "title-color",
|
|
1795
|
-
subtitleColor: "subtitle-color",
|
|
1796
|
-
lightboxCounterColor: "lightbox-counter-color"
|
|
1797
|
-
}, li = ["hover", "focus", "filled", "success", "error"];
|
|
1798
|
-
export {
|
|
1799
|
-
wi as Grid
|
|
1800
|
-
};
|