Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/elementor/assets/js/editor-one-menu.js
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
/******/ (() => { // webpackBootstrap
2
+
/******/ var __webpack_modules__ = ({
3
+
4
+
/***/ "../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js":
5
+
/*!****************************************************************************************!*\
6
+
!*** ../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js ***!
7
+
\****************************************************************************************/
8
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9
+
10
+
"use strict";
11
+
12
+
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.FlyoutInteractionHandler = void 0;
18
+
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
19
+
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
20
+
var FlyoutInteractionHandler = exports.FlyoutInteractionHandler = /*#__PURE__*/function () {
21
+
function FlyoutInteractionHandler() {
22
+
(0, _classCallCheck2.default)(this, FlyoutInteractionHandler);
23
+
this.activeMenu = null;
24
+
this.activeParent = null;
25
+
this.closeTimeout = null;
26
+
this.lastMousePos = null;
27
+
this.exitPoint = null;
28
+
this.mouseMoveHandler = null;
29
+
}
30
+
return (0, _createClass2.default)(FlyoutInteractionHandler, [{
31
+
key: "handle",
32
+
value: function handle() {
33
+
this.setupFlyoutMenus();
34
+
this.setupMobileSupport();
35
+
}
36
+
}, {
37
+
key: "setupFlyoutMenus",
38
+
value: function setupFlyoutMenus() {
39
+
var _this = this;
40
+
var menuItems = document.querySelectorAll('#adminmenu li.elementor-has-flyout');
41
+
menuItems.forEach(function (parentLi) {
42
+
var flyoutMenu = parentLi.querySelector('.elementor-submenu-flyout');
43
+
if (!flyoutMenu) {
44
+
return;
45
+
}
46
+
_this.attachHoverEvents(parentLi, flyoutMenu);
47
+
_this.attachFocusEvents(parentLi, flyoutMenu);
48
+
_this.attachKeyboardEvents(parentLi, flyoutMenu);
49
+
});
50
+
}
51
+
}, {
52
+
key: "attachHoverEvents",
53
+
value: function attachHoverEvents(parentLi, flyoutMenu) {
54
+
var _this2 = this;
55
+
parentLi.addEventListener('mouseenter', function () {
56
+
// If moving to a new parent that is NOT part of the current active tree
57
+
if (_this2.activeMenu && !_this2.activeMenu.contains(parentLi) && _this2.activeMenu !== flyoutMenu) {
58
+
// If we are moving to a sibling or unrelated menu, close the current one immediately
59
+
// UNLESS we are in the safe zone triangle of the parent
60
+
if (!_this2.isCursorInSafeZone()) {
61
+
_this2.hideFlyout(_this2.activeMenu);
62
+
}
63
+
}
64
+
_this2.clearCloseTimeout();
65
+
_this2.showFlyout(parentLi, flyoutMenu);
66
+
});
67
+
parentLi.addEventListener('mouseleave', function (event) {
68
+
_this2.exitPoint = {
69
+
x: event.clientX,
70
+
y: event.clientY
71
+
};
72
+
_this2.scheduleClose(parentLi, flyoutMenu);
73
+
});
74
+
flyoutMenu.addEventListener('mouseenter', function () {
75
+
_this2.clearCloseTimeout();
76
+
_this2.stopMouseTracking();
77
+
});
78
+
flyoutMenu.addEventListener('mouseleave', function (event) {
79
+
_this2.exitPoint = {
80
+
x: event.clientX,
81
+
y: event.clientY
82
+
};
83
+
_this2.scheduleClose(parentLi, flyoutMenu);
84
+
});
85
+
}
86
+
}, {
87
+
key: "attachFocusEvents",
88
+
value: function attachFocusEvents(parentLi, flyoutMenu) {
89
+
var _this3 = this;
90
+
var parentLink = parentLi.querySelector(':scope > a');
91
+
if (parentLink) {
92
+
parentLink.addEventListener('focus', function () {
93
+
_this3.showFlyout(parentLi, flyoutMenu);
94
+
});
95
+
}
96
+
flyoutMenu.addEventListener('focusout', function (event) {
97
+
if (!parentLi.contains(event.relatedTarget)) {
98
+
_this3.hideFlyout(flyoutMenu);
99
+
}
100
+
});
101
+
}
102
+
}, {
103
+
key: "attachKeyboardEvents",
104
+
value: function attachKeyboardEvents(parentLi, flyoutMenu) {
105
+
var _this4 = this;
106
+
parentLi.addEventListener('keydown', function (event) {
107
+
_this4.handleKeyNavigation(event, parentLi, flyoutMenu);
108
+
});
109
+
}
110
+
}, {
111
+
key: "showFlyout",
112
+
value: function showFlyout(parentLi, flyoutMenu) {
113
+
if (this.activeMenu && this.activeMenu !== flyoutMenu) {
114
+
this.hideFlyout(this.activeMenu);
115
+
}
116
+
this.exitPoint = null;
117
+
this.positionFlyout(parentLi, flyoutMenu);
118
+
flyoutMenu.classList.add('elementor-submenu-flyout-visible');
119
+
this.activeMenu = flyoutMenu;
120
+
this.activeParent = parentLi;
121
+
}
122
+
}, {
123
+
key: "hideFlyout",
124
+
value: function hideFlyout(flyoutMenu) {
125
+
flyoutMenu.classList.remove('elementor-submenu-flyout-visible');
126
+
if (this.activeMenu === flyoutMenu) {
127
+
this.activeMenu = null;
128
+
this.activeParent = null;
129
+
this.exitPoint = null;
130
+
this.stopMouseTracking();
131
+
}
132
+
}
133
+
}, {
134
+
key: "scheduleClose",
135
+
value: function scheduleClose(parentLi, flyoutMenu) {
136
+
var _this5 = this;
137
+
this.clearCloseTimeout();
138
+
this.startMouseTracking(parentLi, flyoutMenu);
139
+
this.closeTimeout = setTimeout(function () {
140
+
_this5.checkAndClose(flyoutMenu);
141
+
}, 300);
142
+
}
143
+
}, {
144
+
key: "checkAndClose",
145
+
value: function checkAndClose(flyoutMenu) {
146
+
var _this6 = this;
147
+
if (!this.activeMenu) {
148
+
return;
149
+
}
150
+
if (!this.isCursorInSafeZone()) {
151
+
this.hideFlyout(flyoutMenu);
152
+
} else {
153
+
this.closeTimeout = setTimeout(function () {
154
+
_this6.checkAndClose(flyoutMenu);
155
+
}, 300);
156
+
}
157
+
}
158
+
}, {
159
+
key: "clearCloseTimeout",
160
+
value: function clearCloseTimeout() {
161
+
if (this.closeTimeout) {
162
+
clearTimeout(this.closeTimeout);
163
+
this.closeTimeout = null;
164
+
}
165
+
}
166
+
}, {
167
+
key: "startMouseTracking",
168
+
value: function startMouseTracking() {
169
+
var _this7 = this;
170
+
this.stopMouseTracking();
171
+
this.mouseMoveHandler = function (event) {
172
+
_this7.lastMousePos = {
173
+
x: event.clientX,
174
+
y: event.clientY
175
+
};
176
+
};
177
+
document.addEventListener('mousemove', this.mouseMoveHandler);
178
+
}
179
+
}, {
180
+
key: "stopMouseTracking",
181
+
value: function stopMouseTracking() {
182
+
if (this.mouseMoveHandler) {
183
+
document.removeEventListener('mousemove', this.mouseMoveHandler);
184
+
this.mouseMoveHandler = null;
185
+
}
186
+
this.lastMousePos = null;
187
+
}
188
+
}, {
189
+
key: "isCursorInSafeZone",
190
+
value: function isCursorInSafeZone() {
191
+
if (!this.lastMousePos || !this.activeMenu || !this.activeParent) {
192
+
return false;
193
+
}
194
+
var cursor = this.lastMousePos;
195
+
var parentRect = this.activeParent.getBoundingClientRect();
196
+
if (this.isPointInRect(cursor, parentRect)) {
197
+
return true;
198
+
}
199
+
var flyoutRect = this.activeMenu.getBoundingClientRect();
200
+
if (this.isPointInRect(cursor, flyoutRect)) {
201
+
return true;
202
+
}
203
+
return this.isPointInTriangle(cursor, parentRect, flyoutRect);
204
+
}
205
+
}, {
206
+
key: "isPointInRect",
207
+
value: function isPointInRect(point, rect) {
208
+
return point.x >= rect.left && point.x <= rect.right && point.y >= rect.top && point.y <= rect.bottom;
209
+
}
210
+
}, {
211
+
key: "isPointInTriangle",
212
+
value: function isPointInTriangle(cursor, parentRect, flyoutRect) {
213
+
var exitX = this.exitPoint ? this.exitPoint.x : parentRect.right;
214
+
var distParent = Math.abs(exitX - parentRect.right);
215
+
var distFlyout = Math.abs(exitX - flyoutRect.left);
216
+
var triangleApex, baseTop, baseBottom;
217
+
218
+
// Determine direction: Moving towards Flyout (default) or towards Parent (backwards)
219
+
if (distParent < distFlyout) {
220
+
// Moving towards Flyout
221
+
triangleApex = this.exitPoint || {
222
+
x: parentRect.right,
223
+
y: parentRect.top + parentRect.height / 2
224
+
};
225
+
baseTop = {
226
+
x: flyoutRect.left,
227
+
y: flyoutRect.top - 100
228
+
};
229
+
baseBottom = {
230
+
x: flyoutRect.left,
231
+
y: flyoutRect.bottom + 100
232
+
};
233
+
} else {
234
+
// Moving towards Parent
235
+
triangleApex = this.exitPoint || {
236
+
x: flyoutRect.left,
237
+
y: flyoutRect.top + flyoutRect.height / 2
238
+
};
239
+
baseTop = {
240
+
x: parentRect.right,
241
+
y: parentRect.top - 100
242
+
};
243
+
baseBottom = {
244
+
x: parentRect.right,
245
+
y: parentRect.bottom + 100
246
+
};
247
+
}
248
+
return this.pointInTriangle(cursor, triangleApex, baseTop, baseBottom);
249
+
}
250
+
}, {
251
+
key: "pointInTriangle",
252
+
value: function pointInTriangle(p, v1, v2, v3) {
253
+
var sign = function sign(p1, p2, p3) {
254
+
return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);
255
+
};
256
+
var d1 = sign(p, v1, v2);
257
+
var d2 = sign(p, v2, v3);
258
+
var d3 = sign(p, v3, v1);
259
+
var hasNeg = 0 > d1 || 0 > d2 || 0 > d3;
260
+
var hasPos = 0 < d1 || 0 < d2 || 0 < d3;
261
+
return !(hasNeg && hasPos);
262
+
}
263
+
}, {
264
+
key: "positionFlyout",
265
+
value: function positionFlyout(parentLi, flyoutMenu) {
266
+
var windowHeight = window.innerHeight;
267
+
var flyoutHeight = flyoutMenu.offsetHeight;
268
+
var parentRect = parentLi.getBoundingClientRect();
269
+
var relativeTop = parentRect.top;
270
+
if (relativeTop + flyoutHeight > windowHeight) {
271
+
var newTop = windowHeight - flyoutHeight - relativeTop;
272
+
if (newTop < -relativeTop) {
273
+
newTop = -relativeTop + 10;
274
+
}
275
+
flyoutMenu.style.top = newTop + 'px';
276
+
} else {
277
+
delete flyoutMenu.style.top;
278
+
}
279
+
}
280
+
}, {
281
+
key: "handleKeyNavigation",
282
+
value: function handleKeyNavigation(event, parentLi, flyoutMenu) {
283
+
var allLinks = flyoutMenu.querySelectorAll('a');
284
+
var focusedLink = flyoutMenu.querySelector('a:focus');
285
+
var currentIndex = Array.from(allLinks).indexOf(focusedLink);
286
+
var isVisible = flyoutMenu.classList.contains('elementor-submenu-flyout-visible');
287
+
switch (event.key) {
288
+
case 'ArrowRight':
289
+
if (!isVisible) {
290
+
var _allLinks$;
291
+
event.preventDefault();
292
+
this.showFlyout(parentLi, flyoutMenu);
293
+
(_allLinks$ = allLinks[0]) === null || _allLinks$ === void 0 || _allLinks$.focus();
294
+
}
295
+
break;
296
+
case 'ArrowLeft':
297
+
if (isVisible) {
298
+
var _parentLi$querySelect;
299
+
event.preventDefault();
300
+
this.hideFlyout(flyoutMenu);
301
+
(_parentLi$querySelect = parentLi.querySelector(':scope > a')) === null || _parentLi$querySelect === void 0 || _parentLi$querySelect.focus();
302
+
}
303
+
break;
304
+
case 'ArrowDown':
305
+
if (isVisible && currentIndex >= 0) {
306
+
var _allLinks$nextIndex;
307
+
event.preventDefault();
308
+
var nextIndex = (currentIndex + 1) % allLinks.length;
309
+
(_allLinks$nextIndex = allLinks[nextIndex]) === null || _allLinks$nextIndex === void 0 || _allLinks$nextIndex.focus();
310
+
}
311
+
break;
312
+
case 'ArrowUp':
313
+
if (isVisible && currentIndex >= 0) {
314
+
var _allLinks$prevIndex;
315
+
event.preventDefault();
316
+
var prevIndex = (currentIndex - 1 + allLinks.length) % allLinks.length;
317
+
(_allLinks$prevIndex = allLinks[prevIndex]) === null || _allLinks$prevIndex === void 0 || _allLinks$prevIndex.focus();
318
+
}
319
+
break;
320
+
case 'Escape':
321
+
if (isVisible) {
322
+
var _parentLi$querySelect2;
323
+
event.preventDefault();
324
+
this.hideFlyout(flyoutMenu);
325
+
(_parentLi$querySelect2 = parentLi.querySelector(':scope > a')) === null || _parentLi$querySelect2 === void 0 || _parentLi$querySelect2.focus();
326
+
}
327
+
break;
328
+
}
329
+
}
330
+
}, {
331
+
key: "setupMobileSupport",
332
+
value: function setupMobileSupport() {
333
+
var _this8 = this;
334
+
if (window.innerWidth > 782) {
335
+
return;
336
+
}
337
+
var menuLinks = document.querySelectorAll('#adminmenu li.elementor-has-flyout > a');
338
+
menuLinks.forEach(function (link) {
339
+
link.addEventListener('click', function (event) {
340
+
_this8.handleMobileClick(event, link);
341
+
});
342
+
});
343
+
document.addEventListener('click', function (event) {
344
+
_this8.handleDocumentClick(event);
345
+
});
346
+
}
347
+
}, {
348
+
key: "handleMobileClick",
349
+
value: function handleMobileClick(event, link) {
350
+
var parentLi = link.parentElement;
351
+
var flyoutMenu = parentLi.querySelector('.elementor-submenu-flyout');
352
+
if (!flyoutMenu) {
353
+
return;
354
+
}
355
+
if (parentLi.classList.contains('elementor-flyout-open')) {
356
+
return;
357
+
}
358
+
event.preventDefault();
359
+
document.querySelectorAll('#adminmenu li.elementor-has-flyout').forEach(function (item) {
360
+
item.classList.remove('elementor-flyout-open');
361
+
});
362
+
parentLi.classList.add('elementor-flyout-open');
363
+
}
364
+
}, {
365
+
key: "handleDocumentClick",
366
+
value: function handleDocumentClick(event) {
367
+
if (!event.target.closest('#adminmenu li.elementor-has-flyout')) {
368
+
document.querySelectorAll('#adminmenu li.elementor-has-flyout').forEach(function (item) {
369
+
item.classList.remove('elementor-flyout-open');
370
+
});
371
+
}
372
+
}
373
+
}]);
374
+
}();
375
+
376
+
/***/ }),
377
+
378
+
/***/ "../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js":
379
+
/*!**********************************************************************************!*\
380
+
!*** ../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js ***!
381
+
\**********************************************************************************/
382
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
383
+
384
+
"use strict";
385
+
386
+
387
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
388
+
Object.defineProperty(exports, "__esModule", ({
389
+
value: true
390
+
}));
391
+
exports.FlyoutMenuRenderer = void 0;
392
+
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
393
+
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
394
+
var FlyoutMenuRenderer = exports.FlyoutMenuRenderer = /*#__PURE__*/function () {
395
+
function FlyoutMenuRenderer(config) {
396
+
(0, _classCallCheck2.default)(this, FlyoutMenuRenderer);
397
+
this.config = config;
398
+
}
399
+
return (0, _createClass2.default)(FlyoutMenuRenderer, [{
400
+
key: "render",
401
+
value: function render() {
402
+
var editorFlyout = this.config.editorFlyout;
403
+
if (!editorFlyout || !editorFlyout.items || !editorFlyout.items.length) {
404
+
return false;
405
+
}
406
+
var editorLi = this.findEditorMenuItem();
407
+
if (!editorLi) {
408
+
return false;
409
+
}
410
+
editorLi.classList.add('elementor-has-flyout');
411
+
var editorFlyoutUl = document.createElement('ul');
412
+
editorFlyoutUl.className = 'elementor-submenu-flyout elementor-level-3';
413
+
editorFlyout.items.forEach(function (item) {
414
+
var li = document.createElement('li');
415
+
li.setAttribute('data-group-id', item.group_id || '');
416
+
var a = document.createElement('a');
417
+
a.href = item.url;
418
+
a.textContent = item.label;
419
+
li.appendChild(a);
420
+
editorFlyoutUl.appendChild(li);
421
+
});
422
+
editorLi.appendChild(editorFlyoutUl);
423
+
return true;
424
+
}
425
+
}, {
426
+
key: "findEditorMenuItem",
427
+
value: function findEditorMenuItem() {
428
+
var elementorMenu = document.querySelector('#adminmenu a[href="admin.php?page=elementor"]');
429
+
if (!elementorMenu) {
430
+
elementorMenu = document.querySelector('#adminmenu .toplevel_page_elementor');
431
+
}
432
+
if (!elementorMenu) {
433
+
return null;
434
+
}
435
+
var menuItem = elementorMenu.closest('li.menu-top');
436
+
if (!menuItem) {
437
+
return null;
438
+
}
439
+
var submenu = menuItem.querySelector('.wp-submenu');
440
+
if (!submenu) {
441
+
return null;
442
+
}
443
+
var editorItem = submenu.querySelector('a[href*="elementor-editor"]');
444
+
if (!editorItem) {
445
+
return null;
446
+
}
447
+
return editorItem.closest('li');
448
+
}
449
+
}]);
450
+
}();
451
+
452
+
/***/ }),
453
+
454
+
/***/ "../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js":
455
+
/*!**********************************************************************************!*\
456
+
!*** ../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js ***!
457
+
\**********************************************************************************/
458
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
459
+
460
+
"use strict";
461
+
462
+
463
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
464
+
Object.defineProperty(exports, "__esModule", ({
465
+
value: true
466
+
}));
467
+
exports.SidebarMenuHandler = void 0;
468
+
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
469
+
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
470
+
var SidebarMenuHandler = exports.SidebarMenuHandler = /*#__PURE__*/function () {
471
+
function SidebarMenuHandler() {
472
+
(0, _classCallCheck2.default)(this, SidebarMenuHandler);
473
+
this.elementorMenu = document.querySelector('#toplevel_page_elementor');
474
+
}
475
+
return (0, _createClass2.default)(SidebarMenuHandler, [{
476
+
key: "handle",
477
+
value: function handle() {
478
+
if (!this.elementorMenu) {
479
+
return;
480
+
}
481
+
this.deactivateOtherMenus();
482
+
this.activateElementorMenu();
483
+
this.highlightSubmenu();
484
+
}
485
+
}, {
486
+
key: "deactivateOtherMenus",
487
+
value: function deactivateOtherMenus() {
488
+
var _this = this;
489
+
document.querySelectorAll('#adminmenu li.wp-has-current-submenu').forEach(function (item) {
490
+
if (item !== _this.elementorMenu) {
491
+
item.classList.remove('wp-has-current-submenu', 'wp-menu-open', 'selected');
492
+
item.classList.add('wp-not-current-submenu');
493
+
var link = item.querySelector(':scope > a');
494
+
if (link) {
495
+
link.classList.remove('wp-has-current-submenu', 'wp-menu-open', 'current');
496
+
}
497
+
}
498
+
});
499
+
}
500
+
}, {
501
+
key: "activateElementorMenu",
502
+
value: function activateElementorMenu() {
503
+
this.elementorMenu.classList.remove('wp-not-current-submenu');
504
+
this.elementorMenu.classList.add('wp-has-current-submenu', 'wp-menu-open', 'selected');
505
+
var elementorLink = this.elementorMenu.querySelector(':scope > a.menu-top');
506
+
if (elementorLink) {
507
+
elementorLink.classList.add('wp-has-current-submenu', 'wp-menu-open');
508
+
}
509
+
}
510
+
}, {
511
+
key: "highlightSubmenu",
512
+
value: function highlightSubmenu() {
513
+
var currentUrl = new URL(window.location.href);
514
+
var searchParams = currentUrl.searchParams;
515
+
var page = searchParams.get('page');
516
+
var targetSlug = 'elementor-editor';
517
+
if ('elementor' === page) {
518
+
targetSlug = 'elementor-editor';
519
+
} else if ('e-form-submissions' === page) {
520
+
targetSlug = 'e-form-submissions';
521
+
} else if ('elementor-theme-builder' === page) {
522
+
targetSlug = 'elementor-theme-builder';
523
+
}
524
+
var submenuItems = this.elementorMenu.querySelectorAll('.wp-submenu li');
525
+
submenuItems.forEach(function (item) {
526
+
var link = item.querySelector('a');
527
+
if (!link) {
528
+
return;
529
+
}
530
+
item.classList.remove('current');
531
+
link.classList.remove('current');
532
+
link.setAttribute('aria-current', '');
533
+
var linkUrl = new URL(link.href, window.location.origin);
534
+
var linkPage = linkUrl.searchParams.get('page');
535
+
if (linkPage === targetSlug) {
536
+
item.classList.add('current');
537
+
link.classList.add('current');
538
+
link.setAttribute('aria-current', 'page');
539
+
}
540
+
});
541
+
}
542
+
}]);
543
+
}();
544
+
545
+
/***/ }),
546
+
547
+
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
548
+
/*!****************************************************************!*\
549
+
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
550
+
\****************************************************************/
551
+
/***/ ((module) => {
552
+
553
+
function _classCallCheck(a, n) {
554
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
555
+
}
556
+
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
557
+
558
+
/***/ }),
559
+
560
+
/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
561
+
/*!*************************************************************!*\
562
+
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
563
+
\*************************************************************/
564
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
565
+
566
+
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
567
+
function _defineProperties(e, r) {
568
+
for (var t = 0; t < r.length; t++) {
569
+
var o = r[t];
570
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
571
+
}
572
+
}
573
+
function _createClass(e, r, t) {
574
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
575
+
writable: !1
576
+
}), e;
577
+
}
578
+
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
579
+
580
+
/***/ }),
581
+
582
+
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
583
+
/*!***********************************************************************!*\
584
+
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
585
+
\***********************************************************************/
586
+
/***/ ((module) => {
587
+
588
+
function _interopRequireDefault(e) {
589
+
return e && e.__esModule ? e : {
590
+
"default": e
591
+
};
592
+
}
593
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
594
+
595
+
/***/ }),
596
+
597
+
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
598
+
/*!*************************************************************!*\
599
+
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
600
+
\*************************************************************/
601
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
602
+
603
+
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
604
+
function toPrimitive(t, r) {
605
+
if ("object" != _typeof(t) || !t) return t;
606
+
var e = t[Symbol.toPrimitive];
607
+
if (void 0 !== e) {
608
+
var i = e.call(t, r || "default");
609
+
if ("object" != _typeof(i)) return i;
610
+
throw new TypeError("@@toPrimitive must return a primitive value.");
611
+
}
612
+
return ("string" === r ? String : Number)(t);
613
+
}
614
+
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
615
+
616
+
/***/ }),
617
+
618
+
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
619
+
/*!***************************************************************!*\
620
+
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
621
+
\***************************************************************/
622
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
623
+
624
+
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
625
+
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
626
+
function toPropertyKey(t) {
627
+
var i = toPrimitive(t, "string");
628
+
return "symbol" == _typeof(i) ? i : i + "";
629
+
}
630
+
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
631
+
632
+
/***/ }),
633
+
634
+
/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
635
+
/*!********************************************************!*\
636
+
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
637
+
\********************************************************/
638
+
/***/ ((module) => {
639
+
640
+
function _typeof(o) {
641
+
"@babel/helpers - typeof";
642
+
643
+
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
644
+
return typeof o;
645
+
} : function (o) {
646
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
647
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
648
+
}
649
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
650
+
651
+
/***/ })
652
+
653
+
/******/ });
654
+
/************************************************************************/
655
+
/******/ // The module cache
656
+
/******/ var __webpack_module_cache__ = {};
657
+
/******/
658
+
/******/ // The require function
659
+
/******/ function __webpack_require__(moduleId) {
660
+
/******/ // Check if module is in cache
661
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
662
+
/******/ if (cachedModule !== undefined) {
663
+
/******/ return cachedModule.exports;
664
+
/******/ }
665
+
/******/ // Create a new module (and put it into the cache)
666
+
/******/ var module = __webpack_module_cache__[moduleId] = {
667
+
/******/ // no module.id needed
668
+
/******/ // no module.loaded needed
669
+
/******/ exports: {}
670
+
/******/ };
671
+
/******/
672
+
/******/ // Execute the module function
673
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
674
+
/******/
675
+
/******/ // Return the exports of the module
676
+
/******/ return module.exports;
677
+
/******/ }
678
+
/******/
679
+
/************************************************************************/
680
+
var __webpack_exports__ = {};
681
+
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
682
+
(() => {
683
+
"use strict";
684
+
/*!*********************************************************!*\
685
+
!*** ../modules/editor-one/assets/js/admin-menu/app.js ***!
686
+
\*********************************************************/
687
+
688
+
689
+
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
690
+
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
691
+
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
692
+
var _flyoutMenuRenderer = __webpack_require__(/*! ./classes/flyout-menu-renderer */ "../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js");
693
+
var _sidebarMenuHandler = __webpack_require__(/*! ./classes/sidebar-menu-handler */ "../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js");
694
+
var _flyoutInteractionHandler = __webpack_require__(/*! ./classes/flyout-interaction-handler */ "../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js");
695
+
var EditorOneMenu = /*#__PURE__*/function () {
696
+
function EditorOneMenu() {
697
+
(0, _classCallCheck2.default)(this, EditorOneMenu);
698
+
// eslint-disable-next-line no-undef
699
+
this.config = editorOneMenuConfig || {};
700
+
}
701
+
return (0, _createClass2.default)(EditorOneMenu, [{
702
+
key: "init",
703
+
value: function init() {
704
+
if (this.isSidebarNavigationActive()) {
705
+
new _sidebarMenuHandler.SidebarMenuHandler().handle();
706
+
return;
707
+
}
708
+
this.buildFlyoutMenus();
709
+
}
710
+
}, {
711
+
key: "isSidebarNavigationActive",
712
+
value: function isSidebarNavigationActive() {
713
+
return document.body.classList.contains('e-has-sidebar-navigation');
714
+
}
715
+
}, {
716
+
key: "buildFlyoutMenus",
717
+
value: function buildFlyoutMenus() {
718
+
var renderer = new _flyoutMenuRenderer.FlyoutMenuRenderer(this.config);
719
+
if (renderer.render()) {
720
+
new _flyoutInteractionHandler.FlyoutInteractionHandler().handle();
721
+
}
722
+
}
723
+
}]);
724
+
}();
725
+
var initEditorOneMenu = function initEditorOneMenu() {
726
+
var editorOneMenu = new EditorOneMenu();
727
+
editorOneMenu.init();
728
+
};
729
+
if ('loading' === document.readyState) {
730
+
document.addEventListener('DOMContentLoaded', initEditorOneMenu);
731
+
} else {
732
+
initEditorOneMenu();
733
+
}
734
+
})();
735
+
736
+
/******/ })()
737
+
;
738
+
//# sourceMappingURL=editor-one-menu.js.map