@cntrl-site/components 1.0.101 → 1.0.103
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/README.md +25 -1
- package/dist/Burger-C6jI6C1c.js +661 -0
- package/dist/Burger-EMSn7TPB.mjs +1807 -0
- package/dist/ClickGallerie-D7g093HX.js +36 -0
- package/dist/ClickGallerie-QSOQjSdv.mjs +271 -0
- package/dist/Components/Burger/BurgerComponent.d.ts +0 -1
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +1 -0
- package/dist/Components/ClickGallerie/ClickGallerieComponent.d.ts +0 -1
- package/dist/Components/FAQ/FAQComponent.d.ts +0 -1
- package/dist/Components/Form/FormComponent.d.ts +0 -1
- package/dist/Components/Grid/GridComponent.d.ts +0 -1
- package/dist/Components/Helix/HelixComponent.d.ts +0 -1
- package/dist/Components/Hive/HiveComponent.d.ts +0 -1
- package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +0 -1
- package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +0 -1
- package/dist/Components/List/ListComponent.d.ts +0 -1
- package/dist/Components/Marquee/MarqueeComponent.d.ts +0 -1
- package/dist/Components/MarqueeText/MarqueeTextComponent.d.ts +0 -1
- package/dist/Components/Mercury/MercuryComponent.d.ts +0 -1
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +0 -1
- package/dist/Components/Pretext/PretextComponent.d.ts +0 -1
- package/dist/Components/Scale/Scale.d.ts +2 -0
- package/dist/Components/Scale/ScaleComponent.d.ts +0 -1
- package/dist/Components/SimpleButton/SimpleButtonComponent.d.ts +0 -1
- package/dist/Components/Slider20/Slider20Component.d.ts +0 -1
- package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +0 -1
- package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +0 -1
- package/dist/Components/Waterfall/WaterfallComponent.d.ts +0 -1
- package/dist/ControlSlider-SiOt22l_.js +1 -0
- package/dist/ControlSlider-pZv7H6BU.mjs +334 -0
- package/dist/FAQ-C7823fyi.js +166 -0
- package/dist/FAQ-CZ39u4m8.mjs +588 -0
- package/dist/Form-BX5_41nb.mjs +472 -0
- package/dist/Form-Dn-6A1He.js +153 -0
- package/dist/Grid-CemGhf3F.js +374 -0
- package/dist/Grid-cfQsXW3b.mjs +1553 -0
- package/dist/Helix-2Vr-9WBa.js +43 -0
- package/dist/Helix-BmkAKT1G.mjs +315 -0
- package/dist/Hive-BC6zQBsv.js +321 -0
- package/dist/Hive-BGMWinrW.mjs +1425 -0
- package/dist/HiveLightboxTitles-DhEeFKWs.mjs +507 -0
- package/dist/HiveLightboxTitles-DlyptAaK.js +1 -0
- package/dist/ImageRevealSlider-BBWtFjUF.js +1 -0
- package/dist/ImageRevealSlider-BdFGyVEP.mjs +184 -0
- package/dist/Lightbox-CIss_nOG.js +1 -0
- package/dist/Lightbox-eP9qAZzL.mjs +665 -0
- package/dist/LightboxJournal-D59ex6wH.mjs +1613 -0
- package/dist/LightboxJournal-DAEZOPDi.js +523 -0
- package/dist/LightboxStrip-BDjI1jyH.js +386 -0
- package/dist/LightboxStrip-YspzBP8N.mjs +1574 -0
- package/dist/List-C32WImI3.js +377 -0
- package/dist/List-DW7fyJbf.mjs +1891 -0
- package/dist/Marquee-BYClHHws.mjs +551 -0
- package/dist/Marquee-vmHaTGIP.js +133 -0
- package/dist/MarqueeText-4Rip_sQX.mjs +515 -0
- package/dist/MarqueeText-E6OubMOG.js +132 -0
- package/dist/Mercury-BwF_XW2w.js +267 -0
- package/dist/Mercury-DuKJQ1Zo.mjs +1701 -0
- package/dist/OnelinerForm-BEu7_sho.mjs +434 -0
- package/dist/OnelinerForm-C2Y_XMCY.js +194 -0
- package/dist/Pretext-10CcyP1E.mjs +2762 -0
- package/dist/Pretext-DvQ3xsni.js +231 -0
- package/dist/PretextComponent-CGycuNNn.js +1 -0
- package/dist/PretextComponent-DN8cyZ8x.mjs +11633 -0
- package/dist/RichTextRenderer-B6WtTYlR.mjs +32 -0
- package/dist/RichTextRenderer-CIy6yI8U.js +1 -0
- package/dist/Scale-Bg3bGICG.js +114 -0
- package/dist/Scale-TnkWtRrs.mjs +409 -0
- package/dist/SimpleButton-C-o2W9bS.mjs +451 -0
- package/dist/SimpleButton-nGEcO2gB.js +243 -0
- package/dist/Slider20-C9o2REDl.js +272 -0
- package/dist/Slider20-Dm8BeCli.mjs +851 -0
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/TestimonialGrid-CPu4qQ6B.mjs +492 -0
- package/dist/TestimonialGrid-D4ieiz9e.js +90 -0
- package/dist/TestimonialSingle-CVu15ZtV.js +125 -0
- package/dist/TestimonialSingle-DLdnAVF7.mjs +391 -0
- package/dist/Waterfall-A0FjM2my.mjs +1400 -0
- package/dist/Waterfall-DnPDHbCL.js +287 -0
- package/dist/buildColorVars-CE2D5cQV.js +1 -0
- package/dist/buildColorVars-CLyWQm5K.mjs +21 -0
- package/dist/components-BFJINCME.mjs +2053 -0
- package/dist/components-DTCDEBo0.js +1 -0
- package/dist/components.css +1 -1
- package/dist/elements.d.ts +7 -0
- package/dist/elements.js +1 -0
- package/dist/elements.mjs +63 -0
- package/dist/elements.node.d.ts +6 -0
- package/dist/elements.node.js +1 -0
- package/dist/elements.node.mjs +21 -0
- package/dist/forking.d.ts +1 -0
- package/dist/formFieldValidation-DZl2KVaF.js +1 -0
- package/dist/formFieldValidation-DvihFrq5.mjs +21 -0
- package/dist/getColorAlpha-BVBY0N5x.mjs +39 -0
- package/dist/getColorAlpha-CoSseoCn.js +1 -0
- package/dist/getImageRect-BQhQXvT8.js +1 -0
- package/dist/getImageRect-CBMhFNHM.mjs +109 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -28862
- package/dist/index.mjs +16 -62473
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/panelAvailability-D179wwJx.mjs +27 -0
- package/dist/panelAvailability-DnOe0rQ4.js +1 -0
- package/dist/react-splide.esm-CabaEmHi.js +6 -0
- package/dist/react-splide.esm-DQqds4PL.mjs +1750 -0
- package/dist/readTestimonialTextMeasure-BIXpGFEt.mjs +13 -0
- package/dist/readTestimonialTextMeasure-CEPaB4Sy.js +1 -0
- package/dist/scalingValue-C9JH5L6O.mjs +6 -0
- package/dist/scalingValue-CSHYgTZl.js +1 -0
- package/dist/sources.d.ts +1 -0
- package/dist/sources.js +23865 -0
- package/dist/sources.mjs +23891 -0
- package/dist/textStylesToCss-05Mn6I_2.mjs +32 -0
- package/dist/textStylesToCss-CNN3zZTV.js +1 -0
- package/dist/types/Component.d.ts +0 -1
- package/dist/useLightboxScrollLock-Hf16Eq4g.js +1 -0
- package/dist/useLightboxScrollLock-VQ07s7EJ.mjs +18 -0
- package/dist/useLightboxSwipeDismiss-Br9uE5G0.js +1 -0
- package/dist/useLightboxSwipeDismiss-SGv6Ra33.mjs +95 -0
- package/dist/useScopedStyles-Bf6yohVQ.js +1 -0
- package/dist/useScopedStyles-DhBG3557.mjs +11 -0
- package/dist/utils-033j3qNL.js +1 -0
- package/dist/utils-FxC9rcxw.mjs +247 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +17 -11
- package/package.json +31 -2
- package/dist/index-2JTNRDR1.js +0 -1
- package/dist/index-DA8t6EZ4.mjs +0 -255
- package/dist/panelAvailability-CgSic84c.mjs +0 -126
- package/dist/panelAvailability-D8c7cdbu.js +0 -1
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Rt=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const f=require("./scalingValue-CSHYgTZl.js"),Et=require("./buildColorVars-CE2D5cQV.js"),Xt=require("./useScopedStyles-Bf6yohVQ.js"),s=require("react"),Yt=require("react-dom"),Te=require("./textStylesToCss-CNN3zZTV.js"),Ut=require("./SvgImage-DFlmxAoL.js");function Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ft(e){return((e==null?void 0:e.trim().length)??0)>0}function xt(e,n,i,u){return n!==void 0&&n<(e??.01)?`${i} ${u}`:i}function yt(e,n,i,u){const c=e??.01;return n===void 0||n>=c?{}:{[`--${i}-title-leading-gap`]:f.scalingValue((c-n)/2,u)}}function Zt(e){return`
|
|
2
|
+
.${e}-wrapper {
|
|
3
|
+
display: grid;
|
|
4
|
+
align-items: start;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
min-height: ${Kt(48)};
|
|
7
|
+
}
|
|
8
|
+
.${e}-item {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
.${e}-item-inner {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
outline: 1px solid #FF5C02;
|
|
19
|
+
}
|
|
20
|
+
.${e}-item-inner-hidden {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
.${e}-item-image-wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
align-self: center;
|
|
30
|
+
}
|
|
31
|
+
.${e}-item-image-wrapper-fit-slider {
|
|
32
|
+
display: grid;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer {
|
|
37
|
+
grid-area: 1 / 1;
|
|
38
|
+
width: 100%;
|
|
39
|
+
display: grid;
|
|
40
|
+
visibility: hidden;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer img {
|
|
44
|
+
grid-area: 1 / 1;
|
|
45
|
+
width: auto;
|
|
46
|
+
height: auto;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
object-fit: contain;
|
|
49
|
+
}
|
|
50
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer video {
|
|
51
|
+
grid-area: 1 / 1;
|
|
52
|
+
width: auto;
|
|
53
|
+
height: auto;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
object-fit: contain;
|
|
56
|
+
}
|
|
57
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-slider {
|
|
58
|
+
position: absolute;
|
|
59
|
+
inset: 0;
|
|
60
|
+
width: 100%;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
63
|
+
.${e}-item-slider .splide__track {
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
.${e}-item-image-link {
|
|
67
|
+
width: 100%;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-items: center;
|
|
71
|
+
}
|
|
72
|
+
.${e}-item-text-link {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: center;
|
|
76
|
+
width: 100%;
|
|
77
|
+
color: inherit;
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
.${e}-item-image {
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 100%;
|
|
83
|
+
display: block;
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
}
|
|
86
|
+
.${e}-item-video {
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: 100%;
|
|
89
|
+
display: block;
|
|
90
|
+
max-width: 100%;
|
|
91
|
+
}
|
|
92
|
+
.${e}-item-slider,
|
|
93
|
+
.${e}-item-slider .splide__track,
|
|
94
|
+
.${e}-item-slider .splide__list,
|
|
95
|
+
.${e}-item-slider .splide__slide {
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 100%;
|
|
98
|
+
}
|
|
99
|
+
.${e}-item-slider .splide__slide {
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
.${e}-item-title {
|
|
105
|
+
white-space: normal;
|
|
106
|
+
overflow-wrap: anywhere;
|
|
107
|
+
word-break: break-word;
|
|
108
|
+
text-align: center;
|
|
109
|
+
margin-bottom: 0px;
|
|
110
|
+
margin-top: 0px;
|
|
111
|
+
color: var(--${e}-title-color);
|
|
112
|
+
}
|
|
113
|
+
.${e}-item-subtitle {
|
|
114
|
+
white-space: normal;
|
|
115
|
+
overflow-wrap: anywhere;
|
|
116
|
+
word-break: break-word;
|
|
117
|
+
text-align: center;
|
|
118
|
+
margin-bottom: 0px;
|
|
119
|
+
margin-top: 0px;
|
|
120
|
+
color: var(--${e}-subtitle-color);
|
|
121
|
+
}
|
|
122
|
+
.${e}-text-tight-leading {
|
|
123
|
+
display: block;
|
|
124
|
+
flex-shrink: 0;
|
|
125
|
+
padding-top: var(--${e}-title-leading-gap, 0);
|
|
126
|
+
padding-bottom: var(--${e}-title-leading-gap, 0);
|
|
127
|
+
}
|
|
128
|
+
.${e}-show-text-hover .${e}-item-title,
|
|
129
|
+
.${e}-show-text-hover .${e}-item-subtitle {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transition: opacity 250ms;
|
|
132
|
+
}
|
|
133
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-title,
|
|
134
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-subtitle,
|
|
135
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-title,
|
|
136
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
}
|
|
139
|
+
.${e}-type-a .${e}-item-inner,
|
|
140
|
+
.${e}-type-a .${e}-item-inner-hidden,
|
|
141
|
+
.${e}-type-d .${e}-item-inner,
|
|
142
|
+
.${e}-type-d .${e}-item-inner-hidden {
|
|
143
|
+
align-items: flex-start;
|
|
144
|
+
}
|
|
145
|
+
.${e}-type-b .${e}-item-inner,
|
|
146
|
+
.${e}-type-b .${e}-item-inner-hidden,
|
|
147
|
+
.${e}-type-e .${e}-item-inner,
|
|
148
|
+
.${e}-type-e .${e}-item-inner-hidden {
|
|
149
|
+
align-items: center;
|
|
150
|
+
}
|
|
151
|
+
.${e}-type-c .${e}-item-inner,
|
|
152
|
+
.${e}-type-c .${e}-item-inner-hidden,
|
|
153
|
+
.${e}-type-f .${e}-item-inner,
|
|
154
|
+
.${e}-type-f .${e}-item-inner-hidden {
|
|
155
|
+
align-items: flex-end;
|
|
156
|
+
}
|
|
157
|
+
.${e}-type-a .${e}-item-image-link,
|
|
158
|
+
.${e}-type-b .${e}-item-image-link,
|
|
159
|
+
.${e}-type-c .${e}-item-image-link,
|
|
160
|
+
.${e}-type-d .${e}-item-image-link,
|
|
161
|
+
.${e}-type-e .${e}-item-image-link,
|
|
162
|
+
.${e}-type-f .${e}-item-image-link {
|
|
163
|
+
align-items: center;
|
|
164
|
+
}
|
|
165
|
+
.${e}-type-a .${e}-item-title,
|
|
166
|
+
.${e}-type-a .${e}-item-subtitle,
|
|
167
|
+
.${e}-type-d .${e}-item-title,
|
|
168
|
+
.${e}-type-d .${e}-item-subtitle {
|
|
169
|
+
text-align: left;
|
|
170
|
+
}
|
|
171
|
+
.${e}-type-b .${e}-item-title,
|
|
172
|
+
.${e}-type-b .${e}-item-subtitle,
|
|
173
|
+
.${e}-type-e .${e}-item-title,
|
|
174
|
+
.${e}-type-e .${e}-item-subtitle {
|
|
175
|
+
text-align: center;
|
|
176
|
+
}
|
|
177
|
+
.${e}-type-c .${e}-item-title,
|
|
178
|
+
.${e}-type-c .${e}-item-subtitle,
|
|
179
|
+
.${e}-type-f .${e}-item-title,
|
|
180
|
+
.${e}-type-f .${e}-item-subtitle {
|
|
181
|
+
text-align: right;
|
|
182
|
+
}
|
|
183
|
+
.${e}-item-text-block {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: flex-start;
|
|
187
|
+
width: 100%;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
}
|
|
190
|
+
.${e}-type-d .${e}-item-text-block {
|
|
191
|
+
align-items: flex-start;
|
|
192
|
+
}
|
|
193
|
+
.${e}-type-e .${e}-item-text-block {
|
|
194
|
+
align-items: center;
|
|
195
|
+
}
|
|
196
|
+
.${e}-type-f .${e}-item-text-block {
|
|
197
|
+
align-items: flex-end;
|
|
198
|
+
}
|
|
199
|
+
.${e}-type-a .${e}-item-text-link,
|
|
200
|
+
.${e}-type-d .${e}-item-text-link {
|
|
201
|
+
align-items: flex-start;
|
|
202
|
+
}
|
|
203
|
+
.${e}-type-b .${e}-item-text-link,
|
|
204
|
+
.${e}-type-e .${e}-item-text-link {
|
|
205
|
+
align-items: center;
|
|
206
|
+
}
|
|
207
|
+
.${e}-type-c .${e}-item-text-link,
|
|
208
|
+
.${e}-type-f .${e}-item-text-link {
|
|
209
|
+
align-items: flex-end;
|
|
210
|
+
}
|
|
211
|
+
.${e}-image-align-top .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
212
|
+
align-items: flex-start;
|
|
213
|
+
}
|
|
214
|
+
.${e}-image-align-center .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
215
|
+
align-items: center;
|
|
216
|
+
}
|
|
217
|
+
.${e}-image-align-bottom .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
218
|
+
align-items: flex-end;
|
|
219
|
+
}
|
|
220
|
+
.${e}-image-align-top .${e}-item-slider .splide__slide {
|
|
221
|
+
align-items: flex-start;
|
|
222
|
+
}
|
|
223
|
+
.${e}-image-align-center .${e}-item-slider .splide__slide {
|
|
224
|
+
align-items: center;
|
|
225
|
+
}
|
|
226
|
+
.${e}-image-align-bottom .${e}-item-slider .splide__slide {
|
|
227
|
+
align-items: flex-end;
|
|
228
|
+
}
|
|
229
|
+
.${e}-align-entries .${e}-item {
|
|
230
|
+
display: contents;
|
|
231
|
+
}
|
|
232
|
+
.${e}-align-entries .${e}-item-inner,
|
|
233
|
+
.${e}-align-entries .${e}-item-inner-hidden {
|
|
234
|
+
display: grid;
|
|
235
|
+
grid-template-rows: subgrid;
|
|
236
|
+
grid-row: span 3;
|
|
237
|
+
justify-self: center;
|
|
238
|
+
margin-bottom: var(--${e}-align-entries-row-gap, 0);
|
|
239
|
+
}
|
|
240
|
+
.${e}-align-entries .${e}-item-inner-last-row {
|
|
241
|
+
margin-bottom: 0;
|
|
242
|
+
}
|
|
243
|
+
.${e}-align-entries .${e}-item-text-link {
|
|
244
|
+
display: contents;
|
|
245
|
+
}
|
|
246
|
+
.${e}-align-entries .${e}-item-title-row,
|
|
247
|
+
.${e}-align-entries .${e}-item-subtitle-row {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
width: 100%;
|
|
252
|
+
min-height: 100%;
|
|
253
|
+
}
|
|
254
|
+
.${e}-type-a.${e}-align-entries .${e}-item-title-row,
|
|
255
|
+
.${e}-type-a.${e}-align-entries .${e}-item-subtitle-row,
|
|
256
|
+
.${e}-type-d.${e}-align-entries .${e}-item-title-row,
|
|
257
|
+
.${e}-type-d.${e}-align-entries .${e}-item-subtitle-row {
|
|
258
|
+
align-items: flex-start;
|
|
259
|
+
}
|
|
260
|
+
.${e}-type-b.${e}-align-entries .${e}-item-title-row,
|
|
261
|
+
.${e}-type-b.${e}-align-entries .${e}-item-subtitle-row,
|
|
262
|
+
.${e}-type-e.${e}-align-entries .${e}-item-title-row,
|
|
263
|
+
.${e}-type-e.${e}-align-entries .${e}-item-subtitle-row {
|
|
264
|
+
align-items: center;
|
|
265
|
+
}
|
|
266
|
+
.${e}-type-c.${e}-align-entries .${e}-item-title-row,
|
|
267
|
+
.${e}-type-c.${e}-align-entries .${e}-item-subtitle-row,
|
|
268
|
+
.${e}-type-f.${e}-align-entries .${e}-item-title-row,
|
|
269
|
+
.${e}-type-f.${e}-align-entries .${e}-item-subtitle-row {
|
|
270
|
+
align-items: flex-end;
|
|
271
|
+
}
|
|
272
|
+
.${e}-align-entries .${e}-item-image-link {
|
|
273
|
+
width: 100%;
|
|
274
|
+
height: 100%;
|
|
275
|
+
min-height: 100%;
|
|
276
|
+
display: flex;
|
|
277
|
+
flex-direction: column;
|
|
278
|
+
align-items: center;
|
|
279
|
+
justify-content: flex-start;
|
|
280
|
+
}
|
|
281
|
+
.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
282
|
+
flex-shrink: 0;
|
|
283
|
+
height: auto;
|
|
284
|
+
align-self: auto;
|
|
285
|
+
}
|
|
286
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
287
|
+
margin-top: 0;
|
|
288
|
+
margin-bottom: auto;
|
|
289
|
+
}
|
|
290
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
291
|
+
margin-top: auto;
|
|
292
|
+
margin-bottom: auto;
|
|
293
|
+
}
|
|
294
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
295
|
+
margin-top: auto;
|
|
296
|
+
margin-bottom: 0;
|
|
297
|
+
}
|
|
298
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
299
|
+
align-items: flex-start;
|
|
300
|
+
}
|
|
301
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
302
|
+
align-items: center;
|
|
303
|
+
}
|
|
304
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
305
|
+
align-items: flex-end;
|
|
306
|
+
}
|
|
307
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
308
|
+
align-items: flex-start;
|
|
309
|
+
}
|
|
310
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
311
|
+
align-items: center;
|
|
312
|
+
}
|
|
313
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
314
|
+
align-items: flex-end;
|
|
315
|
+
}
|
|
316
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link {
|
|
317
|
+
justify-content: flex-start;
|
|
318
|
+
}
|
|
319
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link {
|
|
320
|
+
justify-content: center;
|
|
321
|
+
}
|
|
322
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link {
|
|
323
|
+
justify-content: flex-end;
|
|
324
|
+
}
|
|
325
|
+
.${e}-lightbox-counter {
|
|
326
|
+
margin: 0;
|
|
327
|
+
color: var(--${e}-lightbox-counter-color);
|
|
328
|
+
}
|
|
329
|
+
.${e}-lightbox {
|
|
330
|
+
position: fixed;
|
|
331
|
+
inset: 0;
|
|
332
|
+
z-index: 9997;
|
|
333
|
+
overscroll-behavior: none;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
}
|
|
336
|
+
.${e}-lightbox-editor {
|
|
337
|
+
inset: auto;
|
|
338
|
+
top: var(--cntrl-article-top, 0);
|
|
339
|
+
left: var(--cntrl-article-left, 0);
|
|
340
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
341
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
342
|
+
}
|
|
343
|
+
.${e}-control {
|
|
344
|
+
position: relative;
|
|
345
|
+
z-index: 2;
|
|
346
|
+
width: 100%;
|
|
347
|
+
}
|
|
348
|
+
.${e}-close-icon {
|
|
349
|
+
position: relative;
|
|
350
|
+
flex-shrink: 0;
|
|
351
|
+
pointer-events: auto;
|
|
352
|
+
z-index: 2;
|
|
353
|
+
display: flex;
|
|
354
|
+
align-items: center;
|
|
355
|
+
justify-content: center;
|
|
356
|
+
border: none;
|
|
357
|
+
background-color: transparent;
|
|
358
|
+
padding: 0;
|
|
359
|
+
}
|
|
360
|
+
.${e}-close-icon-inner {
|
|
361
|
+
all: unset;
|
|
362
|
+
position: relative;
|
|
363
|
+
cursor: pointer;
|
|
364
|
+
width: 100%;
|
|
365
|
+
height: 100%;
|
|
366
|
+
pointer-events: auto;
|
|
367
|
+
}
|
|
368
|
+
.${e}-close-icon-img {
|
|
369
|
+
position: absolute;
|
|
370
|
+
top: 50%;
|
|
371
|
+
left: 50%;
|
|
372
|
+
transform: translate(-50%, -50%);
|
|
373
|
+
}
|
|
374
|
+
`}function Jt(){return Math.random()<.5?"ltr":"ttb"}function Qt(e){const n=e.Components.Autoplay;n&&(n.pause(!1),n.play())}function Pt(e){const n=Jt();e.options.direction!==n&&(e.options={...e.options,direction:n}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Qt(e)})})}const q=500,en=750,ce="cubic-bezier(0.22, 1, 0.36, 1)",tn=72,nn=50;function rn(e){if(!Array.isArray(e)||e.length===0)return!1;const n=e[0];return n!==null&&typeof n=="object"&&"media"in n&&Array.isArray(n.media)}function sn(e){const[n,i]=e.media;return i!=null&&i.assetId?i:n!=null&&n.assetId?n:null}function ln(e){const[n]=e.media;return n!=null&&n.assetId?n:null}function Mt(e){return!Array.isArray(e)||e.length===0?[]:rn(e)?e.flatMap(n=>{const i=sn(n);if(!i)return[];const u=ln(n);return[{displayMedia:i,lightboxMedia:u!=null&&u.assetId?u:null}]}):e.filter(n=>n==null?void 0:n.assetId).map(n=>({displayMedia:n,lightboxMedia:n}))}function we(e){return e.type==="video"}function on(e){const n=new Set,i=[];for(const u of e){const c=Mt(u.gallery);for(const z of c){const w=z.lightboxMedia;w!=null&&w.assetId&&!n.has(w.assetId)&&(n.add(w.assetId),i.push(w))}}return i}function an({mediaList:e}){return e.length===0?null:t.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(n=>we(n)?t.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):t.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function cn(e){e.pause(),e.removeAttribute("src"),e.load()}function _t({media:e,className:n,style:i,onMediaClick:u}){return we(e)?t.jsx("video",{src:e.assetId,className:n,style:{...i,cursor:u?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:u}):t.jsx("img",{src:e.assetId,alt:e.name,className:n,style:{...i,cursor:u?"pointer":"default"},onClick:u})}function zt(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,left:n.left,top:n.top}}function un(e,n){if(!n||!n.width||!n.height||!e.width||!e.height)return e;const i=n.width/n.height,u=e.width/e.height;if(i>u){const z=e.width/i;return{width:e.width,height:z,left:e.left,top:e.top+(e.height-z)/2}}const c=e.height*i;return{width:c,height:e.height,left:e.left+(e.width-c)/2,top:e.top}}function dn({src:e,phase:n,mediaRef:i,mediaStyle:u,onLoadedMetadata:c,onClick:z,onMouseMove:w}){return s.useEffect(()=>{const T=i.current;if(T)return()=>{cn(T)}},[e,i]),t.jsx("video",{ref:i,src:e,controls:n==="open",playsInline:!0,preload:"auto",onLoadedMetadata:c,onClick:z,onMouseMove:w,style:u})}const gn="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",hn=.004;function mn({prefix:e,closeIcon:n=gn,closeIconMaxWidth:i=.0125,closeIconColor:u="#FFFFFF",closeIconHoverColor:c="#999999",iconMarginRight:z=.01,contentMarginTop:w=.01,isEditor:T,isPreviewMode:ue,isEditMode:l,visible:M,onClose:K}){if(!n)return null;const Z=f.scalingValue(i,T),de=f.scalingValue(z,T),ve=f.scalingValue(w,T),L=f.scalingValue(Math.max(w,hn),T);return t.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:M?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[t.jsx("div",{style:{position:"relative",width:"100%",height:ve,flexShrink:0},children:l&&t.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:L,pointerEvents:M?"auto":"none"}})}),t.jsxs("div",{className:`${e}-close-icon`,style:{width:Z,height:Z,marginRight:de,pointerEvents:M?"auto":"none"},onClick:C=>C.stopPropagation(),children:[t.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:C=>{C.stopPropagation(),K()},children:t.jsx(Ut.SvgImage,{url:n,fill:u,hoverFill:T&&!ue?u:c,className:`${e}-close-icon-img`})}),l&&t.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:de,height:"100%",pointerEvents:M?"auto":"none"}})]})]})}function fn({prefix:e,items:n,index:i,imageDisplay:u,isEditor:c,isPreviewMode:z,isEditMode:w,onClose:T,onPrev:ue,onNext:l,counterClassName:M,counterStyle:K,closeIcon:Z,closeIconMaxWidth:de,closeIconColor:ve,closeIconHoverColor:L,iconMarginRight:C,contentMarginTop:Be}){const Le=u==="cover",Ne=s.useRef(null),ge=s.useRef(null),he=s.useRef(null),N=s.useRef(null),G=s.useRef(0),R=s.useRef(0),F=s.useRef("none"),E=s.useRef(!1),W=s.useRef(!1),qe=s.useRef(null),I=s.useRef(0),D=s.useRef(null),_=s.useRef(!1),se=s.useRef(null),X=s.useRef(null),Re=s.useRef(null),Ge=s.useRef(()=>{}),[d,Fe]=s.useState(null),[a,ot]=s.useState(null),[v,be]=s.useState("opening"),[J,H]=s.useState(0),[le,B]=s.useState(0),[_e,oe]=s.useState(null),[Se,me]=s.useState(!1),[je,fe]=s.useState(!1),[at,Ee]=s.useState(!1),[ct,Xe]=s.useState(null),Ye=s.useRef(i),Ue=s.useRef(void 0),m=n[i],ze=m?we(m):!1,Me=le!==0||Se,Ke=_e!==null,ut=s.useCallback(r=>{const o=r.currentTarget,$=o instanceof HTMLVideoElement?{width:o.videoWidth,height:o.videoHeight}:{width:o.naturalWidth,height:o.naturalHeight};!$.width||!$.height||Xe($)},[]);s.useEffect(()=>{qe.current=a},[a]),s.useEffect(()=>{const r=Ne.current;if(!r)return;const o=()=>ot(zt(r));o();const $=new ResizeObserver(o);return $.observe(r),()=>$.disconnect()},[]);const y=s.useCallback(()=>{se.current!==null&&(window.clearTimeout(se.current),se.current=null)},[]),ae=s.useCallback(()=>{const r=X.current;X.current=null,y(),D.current=null,_.current=!1,oe(null),me(!1),B(0),I.current=0,fe(!1),E.current=!1,R.current=0,F.current="none",r===1?l():r===-1&&ue()},[y,l,ue]),Ve=s.useCallback(()=>{y(),X.current=null,D.current=null,_.current=!1,oe(null),me(!1),B(0),I.current=0},[y]),Ze=s.useCallback(()=>{y(),se.current=window.setTimeout(()=>{X.current!==null&&ae()},q+32)},[y,ae]),Q=s.useCallback((r,o)=>{var V;const $=((V=qe.current)==null?void 0:V.width)??0;if(y(),D.current=r,oe(r),_.current=!0,me(!0),o){X.current=r;const ie=-r*$;I.current=ie,B(ie),Ze();return}I.current=0,B(0),se.current=window.setTimeout(()=>{se.current=null,Ve()},q+32)},[y,Ve,Ze]),P=s.useCallback(r=>{if(!(n.length<=1)){if(_.current){if(X.current===r){Re.current=r,ae();return}Ve()}y(),D.current=r,oe(r),_.current=!1,me(!1),I.current=0,B(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Q(r,!0)})})}},[n.length,Q,ae,Ve,y]);Ge.current=P;const Ce=s.useCallback(r=>{r.propertyName!=="transform"||!_.current||X.current!==null&&ae()},[ae]),pe=s.useCallback(()=>{const r=ge.current;if(!r)return;const o=zt(r);!o.width||!o.height||Fe(o)},[]);s.useEffect(()=>{pe();const r=ge.current;if(!r)return;const o=new ResizeObserver(()=>pe());return o.observe(r),()=>o.disconnect()},[pe]),s.useEffect(()=>{v==="opening"&&d&&be("open")},[v,d]),s.useEffect(()=>{if(v!=="closing")return;const r=setTimeout(()=>T(),q);return()=>clearTimeout(r)},[v,T]),s.useEffect(()=>()=>{y()},[y]),s.useLayoutEffect(()=>{Ye.current===i&&Ue.current===(m==null?void 0:m.assetId)||(y(),X.current=null,oe(null),H(0),B(0),me(!1),Ee(!1),fe(!1),Xe(null),G.current=0,R.current=0,F.current="none",E.current=!1,_.current=!1,I.current=0,D.current=null,N.current=null,W.current=!1,Ye.current=i,Ue.current=m==null?void 0:m.assetId)},[i,m==null?void 0:m.assetId,y]),s.useLayoutEffect(()=>{const r=Re.current;r!==null&&(Re.current=null,requestAnimationFrame(()=>{Ge.current(r)}))},[i,m==null?void 0:m.assetId]),s.useEffect(()=>{if(v!=="open")return;let r=null;const o=()=>{r&&(document.removeEventListener("click",r,!0),r=null)},$=()=>{o(),r=x=>{x.stopPropagation(),x.preventDefault(),o()},document.addEventListener("click",r,!0)},V=x=>{const p=x<0?1:-1;if(Math.abs(x)>nn&&n.length>1){Q(p,!0);return}Q(p,!1)},ie=x=>{if(x.touches.length!==1||_.current)return;const p=x.touches[0];W.current=!0,N.current={x:p.clientX,y:p.clientY},F.current="none",R.current=0,E.current=!1},re=x=>{if(!N.current||x.touches.length!==1||_.current)return;const p=x.touches[0],b=p.clientX-N.current.x,k=p.clientY-N.current.y;if(F.current==="none"){if(Math.abs(b)<10&&Math.abs(k)<10)return;if(Math.abs(b)>Math.abs(k)){if(n.length<=1)return;F.current="horizontal"}else if(k>0)F.current="vertical";else return}if(F.current==="horizontal"){E.current=!0,fe(!0),R.current=b;const A=b<0?1:-1;D.current!==A&&(D.current=A,oe(A)),I.current=b,B(b),x.preventDefault();return}F.current==="vertical"&&(E.current=!0,fe(!0),G.current=k,H(k),x.preventDefault())},Ie=()=>{if(!N.current)return;const x=F.current,p=E.current;if(p&&x==="horizontal")V(R.current),$();else if(p&&x==="vertical")if(G.current>tn){const k=window.innerHeight;G.current=k,Ee(!0),H(k),be("closing")}else G.current=0,H(0),$();else x==="horizontal"&&Math.abs(R.current)>0&&(V(R.current),$());N.current=null,F.current="none",R.current=0,E.current=!1,fe(!1)};return document.addEventListener("touchstart",ie,{passive:!0}),document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",Ie),document.addEventListener("touchcancel",Ie),()=>{document.removeEventListener("touchstart",ie),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",Ie),document.removeEventListener("touchcancel",Ie),o()}},[v,n.length,Q]),s.useEffect(()=>{const r=o=>{o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),v!=="closing"&&be("closing"))};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[v]);const Je=()=>{v!=="closing"&&be("closing")},Y=v==="open",dt=v==="closing",wt=J>0?Math.max(0,1-J/500):1,gt=J>0?Math.max(.35,1-J/500):1,g=d?Le?d:un(d,ct):null,ee=r=>{if(r.stopPropagation(),W.current){W.current=!1;return}if(n.length<=1)return;const o=g??r.currentTarget.getBoundingClientRect(),$=r.clientY-o.top,V=Math.min(52,o.height*.2);if(!($>o.height-V)){if(r.clientX-o.left<o.width/2){P(-1);return}P(1)}},ht=r=>{if(n.length<=1)return;const o=g??r.currentTarget.getBoundingClientRect(),$=r.clientX-o.left,V=r.clientY-o.top,ie=Math.min(52,o.height*.2);if(V>o.height-ie){r.currentTarget.style.cursor="default";return}r.currentTarget.style.cursor=$<o.width/2?"w-resize":"e-resize"},$e={position:"fixed",top:a==null?void 0:a.top,left:a==null?void 0:a.left,width:a==null?void 0:a.width,height:a==null?void 0:a.height,zIndex:9998},ke=Le?"cover":"contain",mt=le!==0||J>0?`translate(${le}px, ${J}px)`:void 0,Qe=je&&!Se?"none":Se?`transform ${q}ms ${ce}`:at?`transform ${q}ms ${ce}, opacity ${q}ms ${ce}`:v==="opening"||dt?`opacity ${q}ms ${ce}`:"none",Pe={...$e,transform:mt,opacity:J>0?gt:v==="opening"||dt?0:1,transition:Qe,pointerEvents:"none"},Ae={position:"absolute",top:((g==null?void 0:g.top)??0)-((a==null?void 0:a.top)??0),left:((g==null?void 0:g.left)??0)-((a==null?void 0:a.left)??0),width:g==null?void 0:g.width,height:g==null?void 0:g.height,objectFit:ke,pointerEvents:ze&&Y&&!Me?"auto":"none",touchAction:ze&&Y?"none":void 0},vt=(a==null?void 0:a.width)??0,Oe=Ke?(i+_e+n.length)%n.length:null,te=Oe!==null?n[Oe]:null,ne={...$e,transform:Ke?`translateX(${_e*vt+le}px)`:void 0,opacity:1,transition:Se?`transform ${q}ms ${ce}`:"none",pointerEvents:"none"},xe={position:"absolute",top:((d==null?void 0:d.top)??0)-((a==null?void 0:a.top)??0),left:((d==null?void 0:d.left)??0)-((a==null?void 0:a.left)??0),width:d==null?void 0:d.width,height:d==null?void 0:d.height,objectFit:ke,pointerEvents:"none"},We=g?{position:"fixed",top:g.top,height:g.height,width:g.width/2,zIndex:9999}:null;return t.jsxs("div",{ref:Ne,className:[`${e}-lightbox`,c?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:v==="open"?"none":void 0},onClick:Je,children:[t.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Y?wt:0,transition:je?"none":`opacity ${q}ms ${ce}`,pointerEvents:"none"}}),t.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:Le?t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:ge,style:{position:"absolute",inset:0}}),t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Y?1:0,transition:`opacity ${q}ms ${ce}`,pointerEvents:"none",zIndex:9999},children:n.length>1&&t.jsxs("p",{className:M,style:K,children:[i+1," / ",n.length]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:"10%"}}),t.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:t.jsx("div",{ref:ge,style:{width:"100%",height:"100%"}})}),t.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Y?1:0,transition:`opacity ${q}ms ${ce}`},children:n.length>1&&t.jsxs("p",{className:M,style:K,children:[i+1," / ",n.length]})})]})}),d&&a&&te&&t.jsx("div",{style:ne,onTransitionEnd:Ce,children:we(te)?t.jsx("video",{src:te.assetId,muted:!0,playsInline:!0,preload:"auto",style:xe},`neighbor-${Oe}-${te.assetId}`):t.jsx("img",{src:te.assetId,alt:te.name,style:xe},`neighbor-${Oe}-${te.assetId}`)}),d&&a&&m&&t.jsx("div",{style:Pe,onTransitionEnd:Ce,children:ze?t.jsx(dn,{src:m.assetId,phase:v,mediaRef:he,mediaStyle:Ae,onLoadedMetadata:ut,onClick:ee,onMouseMove:ht},`${i}-${m.assetId}`):t.jsx("img",{ref:he,src:m.assetId,alt:m.name,onLoad:ut,style:Ae},`${i}-${m.assetId}`)}),Y&&We&&n.length>1&&!ze&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...We,left:g.left,cursor:"w-resize",pointerEvents:je?"none":"auto"},onClick:r=>{if(W.current){W.current=!1;return}r.stopPropagation(),P(-1)}}),t.jsx("div",{style:{...We,left:g.left+g.width/2,cursor:"e-resize",pointerEvents:je?"none":"auto"},onClick:r=>{if(W.current){W.current=!1;return}r.stopPropagation(),P(1)}})]}),t.jsx(mn,{prefix:e,closeIcon:Z,closeIconMaxWidth:de,closeIconColor:ve,closeIconHoverColor:L,iconMarginRight:C,contentMarginTop:Be,isEditor:c,isPreviewMode:z,isEditMode:w,visible:Y,onClose:Je})]})}function pn(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function $n({settings:e,content:n,isEditor:i,isPreviewMode:u,isEditMode:c,metadata:z,activeEvent:w,layoutId:T,portalId:ue}){const{prefix:l}=Xt.useScopedStyles(),{type:M="a",gridLayout:K,textBoxWidth:Z=100,verticalGap:de,entriesCount:ve,lightbox:L,imageDisplay:C,imageCorners:Be,lightboxImageDisplay:Le,slider:Ne,sliderTiming:ge,direction:he,transition:N,titleMarginTop:G,subtitleMarginTop:R,titleColor:F,subtitleColor:E,lightboxCounterColor:W,titleFontFamily:qe,titleFontSettings:I,titleFontSize:D,titleLineHeight:_,titleLetterSpacing:se,titleWordSpacing:X,titleTextAppearance:Re,subtitleFontFamily:Ge,subtitleFontSettings:d,subtitleFontSize:Fe,subtitleLineHeight:a,subtitleLetterSpacing:ot,subtitleWordSpacing:v,subtitleTextAppearance:be,lightboxCounterFontFamily:J,lightboxCounterFontSettings:H,lightboxCounterFontSize:le,lightboxCounterLineHeight:B,lightboxCounterLetterSpacing:_e,lightboxCounterWordSpacing:oe,lightboxCounterTextAppearance:Se,closeIcon:me,closeIconMaxWidth:je,closeIconColor:fe,closeIconHoverColor:at,iconMarginRight:Ee,contentMarginTop:ct,showText:Xe="always",alignEntries:Ye="off",align:Ue="top"}=e,m={fontSettings:{fontFamily:qe,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:D??.01,lineHeight:_,letterSpacing:se??0,wordSpacing:X??0,textAppearance:Re,color:F},Me={...Te.omitTextColors(Te.textStylesToCss(m,i))},Ke={fontSettings:{fontFamily:Ge,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:Fe??.01,lineHeight:a,letterSpacing:ot??0,wordSpacing:v??0,textAppearance:be,color:E},y={...Te.omitTextColors(Te.textStylesToCss(Ke,i))},ae={fontSettings:{fontFamily:J,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:le??.01,lineHeight:B,letterSpacing:_e??0,wordSpacing:oe??0,textAppearance:Se,color:W},Ze={...Te.omitTextColors(Te.textStylesToCss(ae,i)),...yt(le,B,l,i)},Q=xt(D,_,`${l}-item-title`,`${l}-text-tight-leading`),P=xt(Fe,a,`${l}-item-subtitle`,`${l}-text-tight-leading`),Ce=yt(D,_,l,i),pe=yt(Fe,a,l,i),Je=xt(le,B,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Y=Et.buildColorVars(l,{titleColor:F,subtitleColor:E,lightboxCounterColor:W},xn,yn),gt=`${w&&w!=="default"?`${l}-state-${w}`:""}${Xe==="on hover"&&(!i||u)?` ${l}-show-text-hover`:""}`.trim(),g=ve===0?1/0:ve,ee=(n??[]).slice(0,g),ht=s.useMemo(()=>L==="on"?on(ee):[],[ee,L]),$e=K.entryWidth??.2,ke=(C==null?void 0:C.display)==="cover",mt=(C==null?void 0:C.ratioValue)??"1:1",Qe=(C==null?void 0:C.reversed)??!1,[Pe,Ae]=mt.split(":").map(Number),te=`${Qe?Ae:Pe} / ${Qe?Pe:Ae}`,ne=K.columnsCount,xe=f.scalingValue($e??0,i),We=xe,r=!ke&&Ne!=="off",o=ee.length%ne||ne,$=o<ne&&ee.length>0,V=ee.length-o,ie=$?Math.floor((ne-o)/2)+1:1,re=Be?f.scalingValue(Be,i):void 0,Ie={width:We,...ke?{aspectRatio:te,height:"auto",overflow:"hidden"}:{height:"auto"},...re?{borderRadius:re,overflow:"hidden"}:{}},x=`${l}-item-image-wrapper${r?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),p=M==="d"||M==="e"||M==="f",b=Ye==="on",k=`calc(${f.scalingValue($e??0,i)} * (${Z} / 100))`,A=f.scalingValue($e*Z/100,i),bt=ke?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...re?{borderRadius:re}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...re?{borderRadius:re}:{}},[Vt,At]=s.useState(0),et=s.useRef(null),Ot=N==="fade"||he==="horizontal"?"ltr":he==="vertical"?"ttb":"ltr";s.useEffect(()=>{const h=et.current;if(!h)return;const j=new ResizeObserver(O=>{At(Math.round(O[0].contentRect.width))});return j.observe(h),()=>j.disconnect()},[]);const Wt=(()=>{const h={...Y},j=et.current?getComputedStyle(et.current).getPropertyValue("--cntrl-article-width").trim():"";return j&&(h["--cntrl-article-width"]=j),h})(),[ft,pt]=s.useState(!1),[tt,Dt]=s.useState([]),[Ht,$t]=s.useState(0),St=L==="on"&&(!i||u),jt=(h,j)=>{i&&!u||L!=="off"&&(Dt(h),$t(j),pt(!0))};s.useEffect(()=>{if(!ft||L!=="on"||typeof document>"u")return;const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}},[ft,L]),s.useEffect(()=>{!i||u||pt(!1)},[i,u]);const Bt=s.useMemo(()=>Zt(l),[l]);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:Bt}}),L==="on"&&t.jsx(an,{mediaList:ht}),t.jsx("div",{style:Y,children:t.jsx("div",{ref:et,className:`${l}-wrapper ${l}-type-${M}${b?` ${l}-align-entries`:""} ${l}-image-align-${Ue} ${gt}`.trim(),style:{gridTemplateColumns:`repeat(${ne}, ${xe})`,rowGap:b?0:f.scalingValue(de??0,i),columnGap:f.scalingValue(K.horizontalGap??0,i),width:f.scalingValue(K.wrapperWidth??0,i),...b?{[`--${l}-align-entries-row-gap`]:f.scalingValue(de??0,i)}:{}},children:ee.map((h,j)=>{var Nt;const O=Ft(h.title),U=Ft(h.subtitle),ye=(((Nt=h.link)==null?void 0:Nt.length)??0)>0&&L==="off"?h.link:void 0,qt=Math.floor(j/ne)===Math.ceil(ee.length/ne)-1,nt=$&&j>=V?`${ie+(j-V)}`:void 0,Ct=p?t.jsxs("div",{className:`${l}-item-text-block`,children:[O&&t.jsx("p",{className:Q,style:{width:k,...Me,...Ce},children:h.title}),O&&t.jsx("div",{"data-controls":c?"titleMarginTop":void 0,className:c?`${l}-control`:void 0,style:{height:f.scalingValue(G??0,i),width:A}}),U&&t.jsx("p",{className:P,style:{width:k,...y,...pe},children:h.subtitle}),U&&t.jsx("div",{"data-controls":c?"subtitleMarginTop":void 0,className:c?`${l}-control`:void 0,style:{height:f.scalingValue(R??0,i),width:A}})]}):null,kt=b?t.jsxs("div",{className:`${l}-item-title-row`,children:[!p&&t.jsx("div",{"data-controls":c&&O?"titleMarginTop":void 0,className:c&&O?`${l}-control`:void 0,style:{height:O?f.scalingValue(G??0,i):0,width:A}}),O&&t.jsx("p",{className:Q,style:{width:k,...Me,...Ce},children:h.title}),p&&O&&t.jsx("div",{"data-controls":c?"titleMarginTop":void 0,className:c?`${l}-control`:void 0,style:{height:f.scalingValue(G??0,i),width:A}})]}):null,It=b?t.jsxs("div",{className:`${l}-item-subtitle-row`,children:[!p&&t.jsx("div",{"data-controls":c&&U?"subtitleMarginTop":void 0,className:c&&U?`${l}-control`:void 0,style:{height:U?f.scalingValue(R??0,i):0,width:A}}),U&&t.jsx("p",{className:P,style:{width:k,...y,...pe},children:h.subtitle}),p&&U&&t.jsx("div",{"data-controls":c?"subtitleMarginTop":void 0,className:c?`${l}-control`:void 0,style:{height:f.scalingValue(R??0,i),width:A}})]}):null,Tt=ye?t.jsxs("a",{href:ye,target:"_blank",className:`${l}-item-text-link`,children:[kt,It]}):t.jsxs(t.Fragment,{children:[kt,It]}),De=Mt(h.gallery),it=De.filter(S=>S.lightboxMedia).map(S=>S.lightboxMedia),rt=t.jsx("div",{className:x,style:Ie,children:De.length===0?null:Ne==="off"?(()=>{const{displayMedia:S,lightboxMedia:He}=De[0],st=He?it.findIndex(lt=>lt.assetId===He.assetId):-1;return t.jsx(_t,{media:S,className:`${l}-item-${we(S)?"video":"image"}`.trim(),style:bt,onMediaClick:St&&st>=0?()=>jt(it,st):void 0})})():t.jsxs(t.Fragment,{children:[r&&t.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:De.map(({displayMedia:S})=>we(S)?t.jsx("video",{src:S.assetId,muted:!0,playsInline:!0},`sizer-${S.assetId}`):t.jsx("img",{src:S.assetId,alt:""},`sizer-${S.assetId}`))}),t.jsx(Rt.Splide2,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:ge*1e3,width:"100%",height:"100%",speed:en,type:N==="fade"?"fade":"loop",rewind:N==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Ot},onMoved:S=>{he!=="random"||N==="fade"||Pt(S)},children:De.map(({displayMedia:S,lightboxMedia:He},st)=>{const lt=He?it.findIndex(Gt=>Gt.assetId===He.assetId):-1;return t.jsx(Rt.SplideSlide,{children:t.jsx(_t,{media:S,className:`${l}-item-${we(S)?"video":"image"}`.trim(),style:bt,onMediaClick:St&<>=0?()=>jt(it,lt):void 0})},st)})},`${N}-${$e}-${he}-${ge}-${Vt}-${T}`)]})}),Lt=p?null:t.jsxs(t.Fragment,{children:[t.jsx("div",{"data-controls":c&&O?"titleMarginTop":void 0,className:c&&O?`${l}-control`:void 0,style:{height:O?f.scalingValue(G??0,i):0,width:A}}),t.jsx("p",{className:Q,style:{width:k,...Me,...Ce},children:h.title}),t.jsx("div",{"data-controls":c&&U?"subtitleMarginTop":void 0,className:c&&U?`${l}-control`:void 0,style:{height:U?f.scalingValue(R??0,i):0,width:A}}),t.jsx("p",{className:P,style:{width:k,...y,...pe},children:h.subtitle})]});return t.jsx("div",{className:`${l}-item`.trim(),style:nt&&!b?{gridColumn:nt}:void 0,children:t.jsx("div",{className:`${c?`${l}-item-inner`:`${l}-item-inner-hidden`}${b&&qt?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(Z??0)>100?`calc(${xe} * (${Z} / 100))`:xe,...nt&&b?{gridColumn:nt}:{}},children:b?t.jsx(t.Fragment,{children:p?t.jsxs(t.Fragment,{children:[Tt,t.jsx("a",{href:ye,target:"_blank",className:`${l}-item-image-link`,children:rt})]}):t.jsxs(t.Fragment,{children:[t.jsx("a",{href:ye,target:"_blank",className:`${l}-item-image-link`,children:rt}),Tt]})}):ye?t.jsxs(t.Fragment,{children:[t.jsxs("a",{href:ye,target:"_blank",className:`${l}-item-image-link`,children:[Ct,rt]}),!p&&t.jsx("a",{href:ye,target:"_blank",className:`${l}-item-text-link`,children:Lt})]}):t.jsxs(t.Fragment,{children:[Ct,rt,Lt]})})},j)})})}),(!i||u)&&ft&&typeof document<"u"&&L==="on"&&(()=>{const h=(ue?document.getElementById(ue):null)??document.body;return Yt.createPortal(t.jsx("div",{style:Wt,"data-selection":"none",children:t.jsx(fn,{prefix:l,items:tt,index:Ht,imageDisplay:pn(Le),isEditor:i,isPreviewMode:u,isEditMode:c,closeIcon:me,closeIconMaxWidth:je,closeIconColor:fe,closeIconHoverColor:at,iconMarginRight:Ee,contentMarginTop:ct,onClose:()=>pt(!1),onPrev:()=>$t(j=>(j-1+tt.length)%tt.length),onNext:()=>$t(j=>(j+1)%tt.length),counterClassName:Je,counterStyle:Ze})}),h)})()]})}const xn={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},yn=["hover","focus","filled","success","error"];exports.Grid=$n;
|