PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev4
Elementor Website Builder – more than just a page builder v3.35.0-dev4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | assets/js/interactions.js +388 -629 4.3.0-beta2 → 3.35.0-dev4 View file →
@@ -1,649 +1,408 @@
1 -'use strict';
1 +/******/ (() => { // webpackBootstrap
2 +/******/ var __webpack_modules__ = ({
2 3
3 -(function() {
4 +/***/ "../modules/interactions/assets/js/interactions-utils.js":
5 +/*!***************************************************************!*\
6 + !*** ../modules/interactions/assets/js/interactions-utils.js ***!
7 + \***************************************************************/
8 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4 9
5 -//#region \0rolldown/runtime.js
6 - var __defProp = Object.defineProperty;
7 - var __name = (target, value) => __defProp(target, "name", {
8 - value,
9 - configurable: true
10 - });
10 +"use strict";
11 11
12 -//#endregion
13 12
14 -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
15 - function _arrayWithHoles(r) {
16 - if (Array.isArray(r)) return r;
17 - }
13 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
14 +Object.defineProperty(exports, "__esModule", ({
15 + value: true
16 +}));
17 +exports.config = void 0;
18 +exports.extractAnimationId = extractAnimationId;
19 +exports.extractInteractionId = extractInteractionId;
20 +exports.getAnimateFunction = getAnimateFunction;
21 +exports.getInViewFunction = getInViewFunction;
22 +exports.getKeyframes = getKeyframes;
23 +exports.parseAnimationName = parseAnimationName;
24 +exports.parseInteractionsData = parseInteractionsData;
25 +exports.waitForAnimateFunction = waitForAnimateFunction;
26 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
27 +var _window$ElementorInte;
28 +var config = exports.config = ((_window$ElementorInte = window.ElementorInteractionsConfig) === null || _window$ElementorInte === void 0 ? void 0 : _window$ElementorInte.constants) || {
29 + defaultDuration: 300,
30 + defaultDelay: 0,
31 + slideDistance: 100,
32 + scaleStart: 0,
33 + ease: 'easeIn'
34 +};
35 +function getKeyframes(effect, type, direction) {
36 + var isIn = 'in' === type;
37 + var keyframes = {};
38 + if ('fade' === effect) {
39 + keyframes.opacity = isIn ? [0, 1] : [1, 0];
40 + }
41 + if ('scale' === effect) {
42 + keyframes.scale = isIn ? [config.scaleStart, 1] : [1, config.scaleStart];
43 + }
44 + if (direction) {
45 + var distance = config.slideDistance;
46 + var movement = {
47 + left: {
48 + x: isIn ? [-distance, 0] : [0, -distance]
49 + },
50 + right: {
51 + x: isIn ? [distance, 0] : [0, distance]
52 + },
53 + top: {
54 + y: isIn ? [-distance, 0] : [0, -distance]
55 + },
56 + bottom: {
57 + y: isIn ? [distance, 0] : [0, distance]
58 + }
59 + };
60 + Object.assign(keyframes, movement[direction]);
61 + }
62 + return keyframes;
63 +}
64 +function parseAnimationName(name) {
65 + var _name$split = name.split('-'),
66 + _name$split2 = (0, _slicedToArray2.default)(_name$split, 6),
67 + trigger = _name$split2[0],
68 + effect = _name$split2[1],
69 + type = _name$split2[2],
70 + direction = _name$split2[3],
71 + duration = _name$split2[4],
72 + delay = _name$split2[5];
73 + return {
74 + trigger: trigger,
75 + effect: effect,
76 + type: type,
77 + direction: direction || null,
78 + duration: duration ? parseInt(duration, 10) : config.defaultDuration,
79 + delay: delay ? parseInt(delay, 10) : config.defaultDelay
80 + };
81 +}
82 +function extractAnimationId(interaction) {
83 + var _interaction$animatio;
84 + if ('string' === typeof interaction) {
85 + return interaction;
86 + }
87 + if ('interaction-item' === (interaction === null || interaction === void 0 ? void 0 : interaction.$$type) && interaction !== null && interaction !== void 0 && interaction.value) {
88 + var _interaction$value = interaction.value,
89 + trigger = _interaction$value.trigger,
90 + animation = _interaction$value.animation;
91 + if ('animation-preset-props' === (animation === null || animation === void 0 ? void 0 : animation.$$type) && animation !== null && animation !== void 0 && animation.value) {
92 + var _timingConfig$value$d, _timingConfig$value, _timingConfig$value$d2, _timingConfig$value2;
93 + var _animation$value = animation.value,
94 + effect = _animation$value.effect,
95 + type = _animation$value.type,
96 + direction = _animation$value.direction,
97 + timingConfig = _animation$value.timing_config;
98 + var triggerVal = (trigger === null || trigger === void 0 ? void 0 : trigger.value) || 'load';
99 + var effectVal = (effect === null || effect === void 0 ? void 0 : effect.value) || 'fade';
100 + var typeVal = (type === null || type === void 0 ? void 0 : type.value) || 'in';
101 + var directionVal = (direction === null || direction === void 0 ? void 0 : direction.value) || '';
102 + var duration = (_timingConfig$value$d = timingConfig === null || timingConfig === void 0 || (_timingConfig$value = timingConfig.value) === null || _timingConfig$value === void 0 || (_timingConfig$value = _timingConfig$value.duration) === null || _timingConfig$value === void 0 ? void 0 : _timingConfig$value.value) !== null && _timingConfig$value$d !== void 0 ? _timingConfig$value$d : 300;
103 + var delay = (_timingConfig$value$d2 = timingConfig === null || timingConfig === void 0 || (_timingConfig$value2 = timingConfig.value) === null || _timingConfig$value2 === void 0 || (_timingConfig$value2 = _timingConfig$value2.delay) === null || _timingConfig$value2 === void 0 ? void 0 : _timingConfig$value2.value) !== null && _timingConfig$value$d2 !== void 0 ? _timingConfig$value$d2 : 0;
104 + return "".concat(triggerVal, "-").concat(effectVal, "-").concat(typeVal, "-").concat(directionVal, "-").concat(duration, "-").concat(delay);
105 + }
106 + }
107 + if (interaction !== null && interaction !== void 0 && (_interaction$animatio = interaction.animation) !== null && _interaction$animatio !== void 0 && _interaction$animatio.animation_id) {
108 + return interaction.animation.animation_id;
109 + }
110 + return null;
111 +}
112 +function extractInteractionId(interaction) {
113 + if ('interaction-item' === (interaction === null || interaction === void 0 ? void 0 : interaction.$$type) && interaction !== null && interaction !== void 0 && interaction.value) {
114 + var _interaction$value$in;
115 + return ((_interaction$value$in = interaction.value.interaction_id) === null || _interaction$value$in === void 0 ? void 0 : _interaction$value$in.value) || null;
116 + }
117 + return null;
118 +}
119 +function getAnimateFunction() {
120 + var _window$Motion;
121 + return 'undefined' !== typeof animate ? animate : (_window$Motion = window.Motion) === null || _window$Motion === void 0 ? void 0 : _window$Motion.animate;
122 +}
123 +function getInViewFunction() {
124 + var _window$Motion2;
125 + return 'undefined' !== typeof inView ? inView : (_window$Motion2 = window.Motion) === null || _window$Motion2 === void 0 ? void 0 : _window$Motion2.inView;
126 +}
127 +function waitForAnimateFunction(callback) {
128 + var maxAttempts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
129 + if (getAnimateFunction()) {
130 + callback();
131 + return;
132 + }
133 + if (maxAttempts > 0) {
134 + setTimeout(function () {
135 + return waitForAnimateFunction(callback, maxAttempts - 1);
136 + }, 100);
137 + }
138 +}
139 +function parseInteractionsData(data) {
140 + if ('string' === typeof data) {
141 + try {
142 + return JSON.parse(data);
143 + } catch (_unused) {
144 + return null;
145 + }
146 + }
147 + return data;
148 +}
18 149
19 -//#endregion
20 -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
21 - function _iterableToArrayLimit(r, l) {
22 - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
23 - if (null != t) {
24 - var e;
25 - var n;
26 - var i;
27 - var u;
28 - var a = [];
29 - var f = !0;
30 - var o = !1;
31 - try {
32 - if (i = (t = t.call(r)).next, 0 === l) {
33 - if (Object(t) !== t) return;
34 - f = !1;
35 - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
36 - } catch (r) {
37 - o = !0, n = r;
38 - } finally {
39 - try {
40 - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
41 - } finally {
42 - if (o) throw n;
43 - }
44 - }
45 - return a;
46 - }
47 - }
150 +/***/ }),
48 151
49 -//#endregion
50 -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
51 - function _arrayLikeToArray$1(r, a) {
52 - (null == a || a > r.length) && (a = r.length);
53 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
54 - return n;
55 - }
56 - __name(_arrayLikeToArray$1, "_arrayLikeToArray");
152 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
153 +/*!******************************************************************!*\
154 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
155 + \******************************************************************/
156 +/***/ ((module) => {
57 157
58 -//#endregion
59 -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
60 - function _unsupportedIterableToArray$1(r, a) {
61 - if (r) {
62 - if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
63 - var t = {}.toString.call(r).slice(8, -1);
64 - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0;
65 - }
66 - }
67 - __name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray");
158 +function _arrayLikeToArray(r, a) {
159 + (null == a || a > r.length) && (a = r.length);
160 + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
161 + return n;
162 +}
163 +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
68 164
69 -//#endregion
70 -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
71 - function _nonIterableRest() {
72 - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73 - }
165 +/***/ }),
74 166
75 -//#endregion
76 -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js
77 - function _slicedToArray(r, e) {
78 - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest();
79 - }
167 +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
168 +/*!****************************************************************!*\
169 + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
170 + \****************************************************************/
171 +/***/ ((module) => {
80 172
81 -//#endregion
82 -//#region node_modules/@babel/runtime/helpers/esm/typeof.js
83 - function _typeof(o) {
84 - "@babel/helpers - typeof";
85 - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
86 - return typeof o;
87 - } : function(o) {
88 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
89 - }, _typeof(o);
90 - }
173 +function _arrayWithHoles(r) {
174 + if (Array.isArray(r)) return r;
175 +}
176 +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
91 177
92 -//#endregion
93 -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
94 - function toPrimitive(t, r) {
95 - if ("object" != _typeof(t) || !t) return t;
96 - var e = t[Symbol.toPrimitive];
97 - if (void 0 !== e) {
98 - var i = e.call(t, r || "default");
99 - if ("object" != _typeof(i)) return i;
100 - throw new TypeError("@@toPrimitive must return a primitive value.");
101 - }
102 - return ("string" === r ? String : Number)(t);
103 - }
178 +/***/ }),
104 179
105 -//#endregion
106 -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
107 - function toPropertyKey(t) {
108 - var i = toPrimitive(t, "string");
109 - return "symbol" == _typeof(i) ? i : i + "";
110 - }
180 +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
181 +/*!***********************************************************************!*\
182 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
183 + \***********************************************************************/
184 +/***/ ((module) => {
111 185
112 -//#endregion
113 -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
114 - function _defineProperty(e, r, t) {
115 - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
116 - value: t,
117 - enumerable: !0,
118 - configurable: !0,
119 - writable: !0
120 - }) : e[r] = t, e;
121 - }
186 +function _interopRequireDefault(e) {
187 + return e && e.__esModule ? e : {
188 + "default": e
189 + };
190 +}
191 +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
122 192
123 -//#endregion
124 -//#region modules/interactions/assets/js/interactions-breakpoints.js
125 - var RESIZE_DEBOUNCE_TIMEOUT = 100;
126 - var breakpoints = {
127 - list: {},
128 - active: {},
129 - onChange: function onChange() {}
130 - };
131 - function getActiveBreakpoint() {
132 - return breakpoints.active;
133 - }
134 - function matchBreakpoint(width) {
135 - for (var label in breakpoints.list) {
136 - var breakpoint = breakpoints.list[label];
137 - if ("min" === breakpoint.direction && width >= breakpoint.value) return label;
138 - if ("max" === breakpoint.direction && breakpoint.value >= width) return label;
139 - }
140 - return "desktop";
141 - }
142 - function attachEventListeners() {
143 - var timeout = null;
144 - window.addEventListener("resize", function onResize() {
145 - if (timeout) {
146 - window.clearTimeout(timeout);
147 - timeout = null;
148 - }
149 - timeout = window.setTimeout(function() {
150 - var currentBreakpoint = matchBreakpoint(window.innerWidth);
151 - if (currentBreakpoint === breakpoints.active) return;
152 - breakpoints.active = currentBreakpoint;
153 - if ("function" === typeof breakpoints.onChange) breakpoints.onChange(breakpoints.active);
154 - }, RESIZE_DEBOUNCE_TIMEOUT);
155 - });
156 - }
157 - function getBreakpointsList() {
158 - var _ElementorInteraction;
159 - return ((_ElementorInteraction = ElementorInteractionsConfig) === null || _ElementorInteraction === void 0 ? void 0 : _ElementorInteraction.breakpoints) || {};
160 - }
161 - function initBreakpoints() {
162 - var onChange = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}).onChange;
163 - breakpoints.list = getBreakpointsList();
164 - breakpoints.active = matchBreakpoint(window.innerWidth);
165 - if ("function" === typeof onChange) breakpoints.onChange = onChange;
166 - attachEventListeners();
167 - }
193 +/***/ }),
168 194
169 -//#endregion
170 -//#region modules/interactions/assets/js/interactions-shared-utils.js
171 - function ownKeys(e, r) {
172 - var t = Object.keys(e);
173 - if (Object.getOwnPropertySymbols) {
174 - var o = Object.getOwnPropertySymbols(e);
175 - r && (o = o.filter(function(r) {
176 - return Object.getOwnPropertyDescriptor(e, r).enumerable;
177 - })), t.push.apply(t, o);
178 - }
179 - return t;
180 - }
181 - function _objectSpread(e) {
182 - for (var r = 1; r < arguments.length; r++) {
183 - var t = null != arguments[r] ? arguments[r] : {};
184 - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
185 - _defineProperty(e, r, t[r]);
186 - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
187 - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
188 - });
189 - }
190 - return e;
191 - }
192 - function _createForOfIteratorHelper(r, e) {
193 - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
194 - if (!t) {
195 - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
196 - t && (r = t);
197 - var _n = 0;
198 - var F = function F() {};
199 - return {
200 - s: F,
201 - n: function n() {
202 - return _n >= r.length ? { done: !0 } : {
203 - done: !1,
204 - value: r[_n++]
205 - };
206 - },
207 - e: function e(r) {
208 - throw r;
209 - },
210 - f: F
211 - };
212 - }
213 - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
214 - }
215 - var o;
216 - var a = !0;
217 - var u = !1;
218 - return {
219 - s: function s() {
220 - t = t.call(r);
221 - },
222 - n: function n() {
223 - var r = t.next();
224 - return a = r.done, r;
225 - },
226 - e: function e(r) {
227 - u = !0, o = r;
228 - },
229 - f: function f() {
230 - try {
231 - a || null == t.return || t.return();
232 - } finally {
233 - if (u) throw o;
234 - }
235 - }
236 - };
237 - }
238 - function _unsupportedIterableToArray(r, a) {
239 - if (r) {
240 - if ("string" == typeof r) return _arrayLikeToArray(r, a);
241 - var t = {}.toString.call(r).slice(8, -1);
242 - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
243 - }
244 - }
245 - function _arrayLikeToArray(r, a) {
246 - (null == a || a > r.length) && (a = r.length);
247 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
248 - return n;
249 - }
250 - function config() {
251 - var _window$ElementorInte;
252 - var _window$ElementorInte2;
253 - return (_window$ElementorInte = (_window$ElementorInte2 = window.ElementorInteractionsConfig) === null || _window$ElementorInte2 === void 0 ? void 0 : _window$ElementorInte2.constants) !== null && _window$ElementorInte !== void 0 ? _window$ElementorInte : {};
254 - }
255 - function skipInteraction$1(interaction) {
256 - var _interaction$breakpoi;
257 - var breakpoint = getActiveBreakpoint();
258 - return interaction === null || interaction === void 0 || (_interaction$breakpoi = interaction.breakpoints) === null || _interaction$breakpoi === void 0 || (_interaction$breakpoi = _interaction$breakpoi.excluded) === null || _interaction$breakpoi === void 0 ? void 0 : _interaction$breakpoi.includes(breakpoint);
259 - }
260 - __name(skipInteraction$1, "skipInteraction");
261 - function extractInteractionId(interaction) {
262 - if ("interaction-item" === (interaction === null || interaction === void 0 ? void 0 : interaction.$$type) && interaction !== null && interaction !== void 0 && interaction.value) {
263 - var _interaction$value$in;
264 - return ((_interaction$value$in = interaction.value.interaction_id) === null || _interaction$value$in === void 0 ? void 0 : _interaction$value$in.value) || null;
265 - }
266 - return null;
267 - }
268 - function motionFunc(name) {
269 - var _window;
270 - var _window2;
271 - if ("function" !== typeof ((_window = window) === null || _window === void 0 || (_window = _window.Motion) === null || _window === void 0 ? void 0 : _window[name])) return;
272 - return (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Motion) === null || _window2 === void 0 ? void 0 : _window2[name];
273 - }
274 - function getAnimateFunction() {
275 - return motionFunc("animate");
276 - }
277 - function getInViewFunction() {
278 - return motionFunc("inView");
279 - }
280 - function waitForAnimateFunction(callback) {
281 - var maxAttempts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
282 - if (getAnimateFunction()) {
283 - callback();
284 - return;
285 - }
286 - if (maxAttempts > 0) setTimeout(function() {
287 - return waitForAnimateFunction(callback, maxAttempts - 1);
288 - }, 100);
289 - }
290 - function parseInteractionsData(data) {
291 - if ("string" === typeof data) try {
292 - return JSON.parse(data);
293 - } catch (_unused) {
294 - return null;
295 - }
296 - return data;
297 - }
298 - function unwrapInteractionValue(propValue) {
299 - var fallback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
300 - if (propValue && "object" === _typeof(propValue) && "$$type" in propValue) return propValue.value;
301 - return propValue !== null && propValue !== void 0 ? propValue : fallback;
302 - }
303 - function timingValueToMs(timingValue, fallbackMs) {
304 - if (null === timingValue || void 0 === timingValue) return fallbackMs;
305 - var unwrapped = unwrapInteractionValue(timingValue);
306 - if ("number" === typeof unwrapped) return unwrapped;
307 - var sizeObj = unwrapInteractionValue(unwrapped);
308 - var size = sizeObj === null || sizeObj === void 0 ? void 0 : sizeObj.size;
309 - var unit = (sizeObj === null || sizeObj === void 0 ? void 0 : sizeObj.unit) || "ms";
310 - if ("number" !== typeof size) return fallbackMs;
311 - if ("s" === unit) return size * 1e3;
312 - return size;
313 - }
314 - function resetElementStyles(element) {
315 - if (!element) return;
316 - element.style.transition = "";
317 - element.style.transform = "";
318 - element.style.opacity = "";
319 - }
320 - var TRANSFORM_EPSILON = .001;
321 - var radiansToDegrees = function radiansToDegrees(radians) {
322 - return radians * (180 / Math.PI);
323 - };
324 - var isNear = function isNear(value, expected) {
325 - return Math.abs(value - expected) <= TRANSFORM_EPSILON;
326 - };
327 - var isNearZero = function isNearZero(value) {
328 - return isNear(value, 0);
329 - };
330 - var isNearOne = function isNearOne(value) {
331 - return isNear(value, 1);
332 - };
333 - function parseMatrixValues(transformValue) {
334 - var match = transformValue.match(/^matrix(3d)?\((.+)\)$/);
335 - if (!match) return null;
336 - return match[2].split(",").map(function(token) {
337 - return Number.parseFloat(token.trim());
338 - }).filter(function(value) {
339 - return Number.isFinite(value);
340 - });
341 - }
342 - function createMatrixFromTransform(transformValue) {
343 - if (!transformValue || "none" === transformValue) return null;
344 - var _iterator = _createForOfIteratorHelper([window.DOMMatrixReadOnly, window.DOMMatrix].filter(function(Factory) {
345 - return "function" === typeof Factory;
346 - }));
347 - var _step;
348 - try {
349 - for (_iterator.s(); !(_step = _iterator.n()).done;) {
350 - var MatrixFactory = _step.value;
351 - try {
352 - var _ref;
353 - var _matrix$a;
354 - var _ref2;
355 - var _matrix$b;
356 - var _ref3;
357 - var _matrix$c;
358 - var _ref4;
359 - var _matrix$d;
360 - var _ref5;
361 - var _matrix$e;
362 - var _ref6;
363 - var _matrix$f;
364 - var matrix = new MatrixFactory(transformValue);
365 - var compactMatrix = {
366 - matrixXfromX: (_ref = (_matrix$a = matrix.a) !== null && _matrix$a !== void 0 ? _matrix$a : matrix.m11) !== null && _ref !== void 0 ? _ref : 1,
367 - matrixYfromX: (_ref2 = (_matrix$b = matrix.b) !== null && _matrix$b !== void 0 ? _matrix$b : matrix.m12) !== null && _ref2 !== void 0 ? _ref2 : 0,
368 - matrixXfromY: (_ref3 = (_matrix$c = matrix.c) !== null && _matrix$c !== void 0 ? _matrix$c : matrix.m21) !== null && _ref3 !== void 0 ? _ref3 : 0,
369 - matrixYfromY: (_ref4 = (_matrix$d = matrix.d) !== null && _matrix$d !== void 0 ? _matrix$d : matrix.m22) !== null && _ref4 !== void 0 ? _ref4 : 1,
370 - matrixTranslateX: (_ref5 = (_matrix$e = matrix.e) !== null && _matrix$e !== void 0 ? _matrix$e : matrix.m41) !== null && _ref5 !== void 0 ? _ref5 : 0,
371 - matrixTranslateY: (_ref6 = (_matrix$f = matrix.f) !== null && _matrix$f !== void 0 ? _matrix$f : matrix.m42) !== null && _ref6 !== void 0 ? _ref6 : 0
372 - };
373 - if (Object.values(compactMatrix).every(Number.isFinite)) return compactMatrix;
374 - } catch (_unused2) {}
375 - }
376 - } catch (err) {
377 - _iterator.e(err);
378 - } finally {
379 - _iterator.f();
380 - }
381 - var parsedValues = parseMatrixValues(transformValue);
382 - if (!parsedValues) return null;
383 - if (6 === parsedValues.length) {
384 - var _parsedValues = _slicedToArray(parsedValues, 6);
385 - return {
386 - matrixXfromX: _parsedValues[0],
387 - matrixYfromX: _parsedValues[1],
388 - matrixXfromY: _parsedValues[2],
389 - matrixYfromY: _parsedValues[3],
390 - matrixTranslateX: _parsedValues[4],
391 - matrixTranslateY: _parsedValues[5]
392 - };
393 - }
394 - if (16 === parsedValues.length) {
395 - var _parsedValues2 = _slicedToArray(parsedValues, 14);
396 - return {
397 - matrixXfromX: _parsedValues2[0],
398 - matrixYfromX: _parsedValues2[1],
399 - matrixXfromY: _parsedValues2[4],
400 - matrixYfromY: _parsedValues2[5],
401 - matrixTranslateX: _parsedValues2[12],
402 - matrixTranslateY: _parsedValues2[13]
403 - };
404 - }
405 - return null;
406 - }
407 - function getTransformBaselineFromComputedStyle(element) {
408 - if (!element) return null;
409 - var computedStyle = window.getComputedStyle(element);
410 - var matrix = createMatrixFromTransform((computedStyle === null || computedStyle === void 0 ? void 0 : computedStyle.transform) || "");
411 - if (!matrix) return null;
412 - var matrixXfromX = matrix.matrixXfromX;
413 - var matrixYfromX = matrix.matrixYfromX;
414 - var matrixXfromY = matrix.matrixXfromY;
415 - var matrixYfromY = matrix.matrixYfromY;
416 - var matrixTranslateX = matrix.matrixTranslateX;
417 - var matrixTranslateY = matrix.matrixTranslateY;
418 - var scaleX = Math.hypot(matrixXfromX, matrixYfromX);
419 - var determinant = matrixXfromX * matrixYfromY - matrixYfromX * matrixXfromY;
420 - var scaleY = scaleX ? determinant / scaleX : Math.hypot(matrixXfromY, matrixYfromY);
421 - var rotate = radiansToDegrees(Math.atan2(matrixYfromX, matrixXfromX));
422 - var shear = scaleX ? (matrixXfromX * matrixXfromY + matrixYfromX * matrixYfromY) / (scaleX * scaleX) : 0;
423 - var skewX = radiansToDegrees(Math.atan(shear));
424 - return {
425 - x: matrixTranslateX,
426 - y: matrixTranslateY,
427 - scaleX: Number.isFinite(scaleX) ? scaleX : 1,
428 - scaleY: Number.isFinite(scaleY) ? scaleY : 1,
429 - rotate: Number.isFinite(rotate) ? rotate : 0,
430 - skewX: Number.isFinite(skewX) ? skewX : 0
431 - };
432 - }
433 - function preserveTransformKeyframes(keyframes, baseline) {
434 - if (!baseline) return keyframes;
435 - var mergedKeyframes = _objectSpread({}, keyframes);
436 - var hasScaleShorthand = mergedKeyframes.scale !== void 0;
437 - var canSetScaleX = mergedKeyframes.scaleX === void 0 && !isNearOne(baseline.scaleX);
438 - var canSetScaleY = mergedKeyframes.scaleY === void 0 && !isNearOne(baseline.scaleY);
439 - if (mergedKeyframes.x === void 0 && !isNearZero(baseline.x)) mergedKeyframes.x = [baseline.x, baseline.x];
440 - if (mergedKeyframes.y === void 0 && !isNearZero(baseline.y)) mergedKeyframes.y = [baseline.y, baseline.y];
441 - if (!hasScaleShorthand) if (canSetScaleX && canSetScaleY && isNear(baseline.scaleX, baseline.scaleY)) mergedKeyframes.scale = [baseline.scaleX, baseline.scaleX];
442 - else {
443 - if (canSetScaleX) mergedKeyframes.scaleX = [baseline.scaleX, baseline.scaleX];
444 - if (canSetScaleY) mergedKeyframes.scaleY = [baseline.scaleY, baseline.scaleY];
445 - }
446 - if (mergedKeyframes.rotate === void 0 && mergedKeyframes.rotateZ === void 0 && !isNearZero(baseline.rotate)) mergedKeyframes.rotate = [baseline.rotate, baseline.rotate];
447 - if (mergedKeyframes.skew === void 0 && mergedKeyframes.skewX === void 0 && !isNearZero(baseline.skewX)) mergedKeyframes.skewX = [baseline.skewX, baseline.skewX];
448 - return mergedKeyframes;
449 - }
450 - window.elementorModules = window.elementorModules || {};
451 - window.elementorModules.interactions = {
452 - config,
453 - skipInteraction: skipInteraction$1,
454 - extractInteractionId,
455 - getAnimateFunction,
456 - getInViewFunction,
457 - waitForAnimateFunction,
458 - parseInteractionsData,
459 - unwrapInteractionValue,
460 - timingValueToMs,
461 - resetElementStyles,
462 - getTransformBaselineFromComputedStyle,
463 - preserveTransformKeyframes
464 - };
195 +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
196 +/*!**********************************************************************!*\
197 + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
198 + \**********************************************************************/
199 +/***/ ((module) => {
465 200
466 -//#endregion
467 -//#region modules/interactions/assets/js/interactions-utils.js
468 - function isSupportedInteraction(animationConfig) {
469 - if (![
470 - "load",
471 - "scrollIn",
472 - "scrollOut"
473 - ].includes(animationConfig.trigger)) return false;
474 - if ("custom" === animationConfig.effect) return false;
475 - return true;
476 - }
477 - function skipInteraction(animationConfig) {
478 - if (!isSupportedInteraction(animationConfig)) return true;
479 - return skipInteraction$1(animationConfig);
480 - }
481 - function getKeyframes(effect, type, direction) {
482 - var isIn = "in" === type;
483 - var keyframes = {};
484 - if ("fade" === effect) keyframes.opacity = isIn ? [0, 1] : [1, 0];
485 - var config$1 = config();
486 - if ("scale" === effect) keyframes.scale = isIn ? [config$1.scaleStart, 1] : [1, config$1.scaleStart];
487 - if (direction && "string" === typeof direction) {
488 - var distance = config$1.slideDistance;
489 - var movement = {
490 - left: { x: isIn ? [-distance, 0] : [0, -distance] },
491 - right: { x: isIn ? [distance, 0] : [0, distance] },
492 - top: { y: isIn ? [-distance, 0] : [0, -distance] },
493 - bottom: { y: isIn ? [distance, 0] : [0, distance] }
494 - };
495 - direction.split("-").forEach(function(part) {
496 - if (movement[part]) Object.assign(keyframes, movement[part]);
497 - });
498 - }
499 - return keyframes;
500 - }
501 - function parseAnimationName(name) {
502 - var _name$split2 = _slicedToArray(name.split("-"), 8);
503 - var trigger = _name$split2[0];
504 - var effect = _name$split2[1];
505 - var type = _name$split2[2];
506 - var direction = _name$split2[3];
507 - var duration = _name$split2[4];
508 - var delay = _name$split2[5];
509 - var config$2 = config();
510 - return {
511 - trigger,
512 - effect,
513 - type,
514 - direction: direction || null,
515 - duration: duration ? parseInt(duration, 10) : config$2.defaultDuration,
516 - delay: delay ? parseInt(delay, 10) : config$2.defaultDelay,
517 - replay: false,
518 - easing: config$2.defaultEasing
519 - };
520 - }
521 - function unwrapInteractionBreakpoints(propValue) {
522 - var breakpointsConfig = unwrapInteractionValue(propValue, {});
523 - var excluded = unwrapInteractionValue(breakpointsConfig === null || breakpointsConfig === void 0 ? void 0 : breakpointsConfig.excluded, []);
524 - if (1 > excluded.length) return {};
525 - return { excluded: excluded.map(function(breakpoint) {
526 - return unwrapInteractionValue(breakpoint, "");
527 - }) };
528 - }
529 - function extractAnimationConfig(interaction) {
530 - var _payload$animation;
531 - if ("string" === typeof interaction) return parseAnimationName(interaction);
532 - var payload = "interaction-item" === (interaction === null || interaction === void 0 ? void 0 : interaction.$$type) && interaction !== null && interaction !== void 0 && interaction.value ? interaction.value : interaction;
533 - if (!payload) return null;
534 - if (payload !== null && payload !== void 0 && (_payload$animation = payload.animation) !== null && _payload$animation !== void 0 && _payload$animation.animation_id) return parseAnimationName(payload.animation.animation_id);
535 - var trigger = unwrapInteractionValue(payload.trigger) || payload.trigger || "load";
536 - var animation = payload.animation;
537 - animation = unwrapInteractionValue(animation);
538 - if (!animation) return null;
539 - var breakpoints = unwrapInteractionBreakpoints(payload.breakpoints);
540 - var config$3 = config();
541 - var effect = unwrapInteractionValue(animation.effect) || animation.effect || "fade";
542 - var type = unwrapInteractionValue(animation.type) || animation.type || "in";
543 - var directionUnwrapped = unwrapInteractionValue(animation.direction);
544 - var direction = "string" === typeof directionUnwrapped ? directionUnwrapped : "";
545 - var easing = config$3.defaultEasing;
546 - var replay = false;
547 - var timingConfig = unwrapInteractionValue(animation.timing_config) || animation.timing_config || {};
548 - return {
549 - trigger,
550 - breakpoints,
551 - effect,
552 - type,
553 - direction,
554 - duration: timingValueToMs(timingConfig === null || timingConfig === void 0 ? void 0 : timingConfig.duration, config$3.defaultDuration),
555 - delay: timingValueToMs(timingConfig === null || timingConfig === void 0 ? void 0 : timingConfig.delay, config$3.defaultDelay),
556 - easing,
557 - replay
558 - };
559 - }
201 +function _iterableToArrayLimit(r, l) {
202 + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
203 + if (null != t) {
204 + var e,
205 + n,
206 + i,
207 + u,
208 + a = [],
209 + f = !0,
210 + o = !1;
211 + try {
212 + if (i = (t = t.call(r)).next, 0 === l) {
213 + if (Object(t) !== t) return;
214 + f = !1;
215 + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
216 + } catch (r) {
217 + o = !0, n = r;
218 + } finally {
219 + try {
220 + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
221 + } finally {
222 + if (o) throw n;
223 + }
224 + }
225 + return a;
226 + }
227 +}
228 +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
560 229
561 -//#endregion
562 -//#region modules/interactions/assets/js/interactions.js
563 - function scrollOutAnimation(element, transition, animConfig, keyframes, resetKeyframes, options, animateFunc, inViewFunc) {
564 - var viewOptions = {
565 - amount: .85,
566 - root: null
567 - };
568 - animateFunc(element, resetKeyframes, { duration: 0 });
569 - var stop = inViewFunc(element, function() {
570 - return function() {
571 - animateFunc(element, keyframes, options).then(function() {
572 - element.style.transition = transition;
573 - });
574 - if (false === animConfig.replay) Promise.resolve().then(function() {
575 - return stop();
576 - });
577 - };
578 - }, viewOptions);
579 - }
580 - function scrollInAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc) {
581 - var stop = inViewFunc(element, function() {
582 - animateFunc(element, keyframes, options).then(function() {
583 - element.style.transition = transition;
584 - });
585 - if (false === animConfig.replay) stop();
586 - }, {
587 - amount: 0,
588 - root: null
589 - });
590 - }
591 - function defaultAnimation(element, transition, keyframes, options, animateFunc) {
592 - animateFunc(element, keyframes, options).then(function() {
593 - element.style.transition = transition;
594 - });
595 - }
596 - function applyAnimation(element, animConfig, animateFunc, inViewFunc) {
597 - var baseline = getTransformBaselineFromComputedStyle(element);
598 - var keyframes = preserveTransformKeyframes(getKeyframes(animConfig.effect, animConfig.type, animConfig.direction), baseline);
599 - var resetKeyframes = preserveTransformKeyframes(getKeyframes(animConfig.effect, "in", animConfig.direction), baseline);
600 - var options = {
601 - duration: animConfig.duration / 1e3,
602 - delay: animConfig.delay / 1e3,
603 - ease: config().defaultEasing
604 - };
605 - var transition = element.style.transition;
606 - element.style.transition = "none";
607 - if ("scrollOut" === animConfig.trigger) scrollOutAnimation(element, transition, animConfig, keyframes, resetKeyframes, options, animateFunc, inViewFunc);
608 - else if ("scrollIn" === animConfig.trigger) scrollInAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc);
609 - else defaultAnimation(element, transition, keyframes, options, animateFunc);
610 - }
611 - function processElementInteractions(element, interactions, animateFunc, inViewFunc) {
612 - if (!interactions || !Array.isArray(interactions)) return;
613 - interactions.forEach(function(interaction) {
614 - var animConfig = extractAnimationConfig(interaction);
615 - if (animConfig && !skipInteraction(animConfig)) applyAnimation(element, animConfig, animateFunc, inViewFunc);
616 - });
617 - }
618 - function initInteractions() {
619 - waitForAnimateFunction(function() {
620 - var animateFunc = getAnimateFunction();
621 - var inViewFunc = getInViewFunction();
622 - if (!inViewFunc || !animateFunc) return;
623 - var dataScript = document.getElementById("elementor-interactions-data");
624 - if (dataScript) {
625 - JSON.parse(dataScript.textContent).forEach(function(elementData) {
626 - var elementId = elementData.elementId;
627 - var interactions = elementData.interactions;
628 - if (!elementId || !interactions || !Array.isArray(interactions)) return;
629 - document.querySelectorAll("[data-interaction-id=\"".concat(elementId, "\"]")).forEach(function(element) {
630 - processElementInteractions(element, interactions, animateFunc, inViewFunc);
631 - });
632 - });
633 - return;
634 - }
635 - document.querySelectorAll("[data-interactions]").forEach(function(element) {
636 - processElementInteractions(element, parseInteractionsData(element.getAttribute("data-interactions")), animateFunc, inViewFunc);
637 - });
638 - });
639 - }
640 - function init() {
641 - initBreakpoints();
642 - initInteractions();
643 - }
644 - if ("loading" === document.readyState) document.addEventListener("DOMContentLoaded", init);
645 - else init();
230 +/***/ }),
646 231
647 -//#endregion
232 +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
233 +/*!*****************************************************************!*\
234 + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
235 + \*****************************************************************/
236 +/***/ ((module) => {
237 +
238 +function _nonIterableRest() {
239 + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
240 +}
241 +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
242 +
243 +/***/ }),
244 +
245 +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
246 +/*!***************************************************************!*\
247 + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
248 + \***************************************************************/
249 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
250 +
251 +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
252 +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
253 +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
254 +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
255 +function _slicedToArray(r, e) {
256 + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
257 +}
258 +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
259 +
260 +/***/ }),
261 +
262 +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
263 +/*!****************************************************************************!*\
264 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
265 + \****************************************************************************/
266 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
267 +
268 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
269 +function _unsupportedIterableToArray(r, a) {
270 + if (r) {
271 + if ("string" == typeof r) return arrayLikeToArray(r, a);
272 + var t = {}.toString.call(r).slice(8, -1);
273 + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
274 + }
275 +}
276 +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
277 +
278 +/***/ })
279 +
280 +/******/ });
281 +/************************************************************************/
282 +/******/ // The module cache
283 +/******/ var __webpack_module_cache__ = {};
284 +/******/
285 +/******/ // The require function
286 +/******/ function __webpack_require__(moduleId) {
287 +/******/ // Check if module is in cache
288 +/******/ var cachedModule = __webpack_module_cache__[moduleId];
289 +/******/ if (cachedModule !== undefined) {
290 +/******/ return cachedModule.exports;
291 +/******/ }
292 +/******/ // Create a new module (and put it into the cache)
293 +/******/ var module = __webpack_module_cache__[moduleId] = {
294 +/******/ // no module.id needed
295 +/******/ // no module.loaded needed
296 +/******/ exports: {}
297 +/******/ };
298 +/******/
299 +/******/ // Execute the module function
300 +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
301 +/******/
302 +/******/ // Return the exports of the module
303 +/******/ return module.exports;
304 +/******/ }
305 +/******/
306 +/************************************************************************/
307 +var __webpack_exports__ = {};
308 +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
309 +(() => {
310 +"use strict";
311 +/*!*********************************************************!*\
312 + !*** ../modules/interactions/assets/js/interactions.js ***!
313 + \*********************************************************/
314 +
315 +
316 +var _interactionsUtils = __webpack_require__(/*! ./interactions-utils.js */ "../modules/interactions/assets/js/interactions-utils.js");
317 +function scrollOutAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc) {
318 + var viewOptions = {
319 + amount: 0.85,
320 + root: null
321 + };
322 + var resetKeyframes = (0, _interactionsUtils.getKeyframes)(animConfig.effect, 'in', animConfig.direction);
323 + animateFunc(element, resetKeyframes, {
324 + duration: 0
325 + });
326 + var stop = inViewFunc(element, function () {
327 + return function () {
328 + animateFunc(element, keyframes, options).then(function () {
329 + element.style.transition = transition;
330 + });
331 + if (false === animConfig.replay) {
332 + stop();
333 + }
334 + };
335 + }, viewOptions);
336 +}
337 +function scrollInAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc) {
338 + var viewOptions = {
339 + amount: 0,
340 + root: null
341 + };
342 + var stop = inViewFunc(element, function () {
343 + animateFunc(element, keyframes, options).then(function () {
344 + element.style.transition = transition;
345 + });
346 + if (false === animConfig.replay) {
347 + stop();
348 + }
349 + }, viewOptions);
350 +}
351 +function defaultAnimation(element, transition, keyframes, options, animateFunc) {
352 + animateFunc(element, keyframes, options).then(function () {
353 + element.style.transition = transition;
354 + });
355 +}
356 +function applyAnimation(element, animConfig, animateFunc, inViewFunc) {
357 + var keyframes = (0, _interactionsUtils.getKeyframes)(animConfig.effect, animConfig.type, animConfig.direction);
358 + var options = {
359 + duration: animConfig.duration / 1000,
360 + delay: animConfig.delay / 1000,
361 + ease: _interactionsUtils.config.ease
362 + };
363 +
364 + // WHY - Transition can be set on elements but once it sets it destroys all animations, so we basically put it aside.
365 + var transition = element.style.transition;
366 + element.style.transition = 'none';
367 + if ('scrollOut' === animConfig.trigger) {
368 + scrollOutAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc);
369 + } else if ('scrollIn' === animConfig.trigger) {
370 + scrollInAnimation(element, transition, animConfig, keyframes, options, animateFunc, inViewFunc);
371 + } else {
372 + defaultAnimation(element, transition, keyframes, options, animateFunc);
373 + }
374 +}
375 +function initInteractions() {
376 + (0, _interactionsUtils.waitForAnimateFunction)(function () {
377 + var animateFunc = (0, _interactionsUtils.getAnimateFunction)();
378 + var inViewFunc = (0, _interactionsUtils.getInViewFunction)();
379 + if (!inViewFunc || !animateFunc) {
380 + return;
381 + }
382 + var elements = document.querySelectorAll('[data-interactions]');
383 + elements.forEach(function (element) {
384 + var interactionsData = element.getAttribute('data-interactions');
385 + var parsedData = (0, _interactionsUtils.parseInteractionsData)(interactionsData);
386 + if (!parsedData || !Array.isArray(parsedData)) {
387 + return;
388 + }
389 + parsedData.forEach(function (interaction) {
390 + var animationName = (0, _interactionsUtils.extractAnimationId)(interaction);
391 + var animConfig = animationName && (0, _interactionsUtils.parseAnimationName)(animationName);
392 + if (animConfig) {
393 + applyAnimation(element, animConfig, animateFunc, inViewFunc);
394 + }
395 + });
396 + });
397 + });
398 +}
399 +if ('loading' === document.readyState) {
400 + document.addEventListener('DOMContentLoaded', initInteractions);
401 +} else {
402 + initInteractions();
403 +}
648 404 })();
405 +
406 +/******/ })()
407 +;
649 408 //# sourceMappingURL=interactions.js.map