PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.0-beta1
Elementor Website Builder – more than just a page builder v3.30.0-beta1
4.3.4 4.3.3 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 All 457 releases
elementor / assets / js / e-react-promotions.js

e-react-promotions.js in Elementor Website Builder – more than just a page builder 3.30.0-beta1, at assets/js/e-react-promotions.js

3,158 lines 121.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.30.0 - 10-06-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js":
6 /*!***************************************************************************!*\
7 !*** ../assets/dev/js/editor/components/dynamic-tags/control-behavior.js ***!
8 \***************************************************************************/
9 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10
11 "use strict";
12 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
13
14
15 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
16 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
17 var TagPanelView = __webpack_require__(/*! elementor-dynamic-tags/tag-panel-view */ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js");
18 module.exports = Marionette.Behavior.extend({
19 tagView: null,
20 listenerAttached: false,
21 initialize: function initialize() {
22 if (!this.listenerAttached) {
23 this.listenTo(this.view.options.container.settings, 'change:external:__dynamic__', this.onAfterExternalChange);
24 this.listenerAttached = true;
25 }
26 },
27 shouldRenderTools: function shouldRenderTools() {
28 var hasDefault = this.getOption('dynamicSettings').default;
29 if (hasDefault) {
30 return false;
31 }
32 var isFeatureAvailableToUser = elementor.helpers.hasPro() && !elementor.helpers.hasProAndNotConnected(),
33 hasTags = this.getOption('tags').length > 0;
34 return !isFeatureAvailableToUser || hasTags;
35 },
36 renderTools: function renderTools() {
37 var _this = this;
38 if (!this.shouldRenderTools()) {
39 return;
40 }
41 var $dynamicSwitcher = jQuery(Marionette.Renderer.render('#tmpl-elementor-control-dynamic-switcher'));
42 $dynamicSwitcher.on('click', function (event) {
43 return _this.onDynamicSwitcherClick(event);
44 });
45 this.$el.find('.elementor-control-dynamic-switcher-wrapper').append($dynamicSwitcher);
46 this.ui.dynamicSwitcher = $dynamicSwitcher;
47 if ('color' === this.view.model.get('type')) {
48 if (this.view.colorPicker) {
49 this.moveDynamicSwitcherToColorPicker();
50 } else {
51 setTimeout(function () {
52 return _this.moveDynamicSwitcherToColorPicker();
53 });
54 }
55 }
56
57 // Add a Tipsy Tooltip to the Dynamic Switcher
58 this.ui.dynamicSwitcher.tipsy({
59 title: function title() {
60 return this.getAttribute('data-tooltip');
61 },
62 gravity: 's'
63 });
64 },
65 moveDynamicSwitcherToColorPicker: function moveDynamicSwitcherToColorPicker() {
66 var $colorPickerToolsContainer = this.view.colorPicker.$pickerToolsContainer;
67 this.ui.dynamicSwitcher.removeClass('elementor-control-unit-1').addClass('e-control-tool');
68 var $eyedropper = $colorPickerToolsContainer.find('.elementor-control-element-color-picker');
69 if ($eyedropper.length) {
70 this.ui.dynamicSwitcher.insertBefore($eyedropper);
71 } else {
72 $colorPickerToolsContainer.append(this.ui.dynamicSwitcher);
73 }
74 },
75 toggleDynamicClass: function toggleDynamicClass() {
76 this.$el.toggleClass('elementor-control-dynamic-value', this.isDynamicMode());
77 },
78 isDynamicMode: function isDynamicMode() {
79 var dynamicSettings = this.view.container.settings.get('__dynamic__');
80 return !!(dynamicSettings && dynamicSettings[this.view.model.get('name')]);
81 },
82 createTagsList: function createTagsList() {
83 var tags = _.groupBy(this.getOption('tags'), 'group'),
84 groups = elementor.dynamicTags.getConfig('groups'),
85 $tagsList = this.ui.tagsList = jQuery('<div>', {
86 class: 'elementor-tags-list'
87 }),
88 $tagsListInner = jQuery('<div>', {
89 class: 'elementor-tags-list__inner'
90 });
91 $tagsList.append($tagsListInner);
92 jQuery.each(groups, function (groupName) {
93 var groupTags = tags[groupName];
94 if (!groupTags) {
95 return;
96 }
97 var group = this,
98 $groupTitle = jQuery('<div>', {
99 class: 'elementor-tags-list__group-title'
100 }).text(group.title);
101 $tagsListInner.append($groupTitle);
102 groupTags.forEach(function (tag) {
103 var $tag = jQuery('<div>', {
104 class: 'elementor-tags-list__item'
105 });
106 $tag.text(tag.title).attr('data-tag-name', tag.name);
107 $tagsListInner.append($tag);
108 });
109 });
110
111 // Create and inject pro dynamic teaser template if Pro is not installed
112 if (!elementor.helpers.hasPro() && Object.keys(tags).length) {
113 var proTeaser = Marionette.Renderer.render('#tmpl-elementor-dynamic-tags-promo', {
114 promotionUrl: elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name'))
115 });
116 $tagsListInner.append(proTeaser);
117 }
118 $tagsListInner.on('click', '.elementor-tags-list__item', this.onTagsListItemClick.bind(this));
119 elementorCommon.elements.$body.append($tagsList);
120 },
121 getTagsList: function getTagsList() {
122 if (!this.ui.tagsList) {
123 this.createTagsList();
124 }
125 return this.ui.tagsList;
126 },
127 toggleTagsList: function toggleTagsList() {
128 var $tagsList = this.getTagsList();
129 if ($tagsList.is(':visible')) {
130 $tagsList.hide();
131 return;
132 }
133 var direction = elementorCommon.config.isRTL ? 'left' : 'right';
134 $tagsList.show().position({
135 my: "".concat(direction, " top"),
136 at: "".concat(direction, " bottom+5"),
137 of: this.ui.dynamicSwitcher
138 });
139 },
140 setTagView: function setTagView(id, name, settings) {
141 if (this.tagView) {
142 this.tagView.destroy();
143 }
144 var tagView = this.tagView = new TagPanelView({
145 id: id,
146 name: name,
147 settings: settings,
148 controlName: this.view.model.get('name'),
149 dynamicSettings: this.getOption('dynamicSettings')
150 }),
151 elementContainer = this.view.options.container,
152 tagViewLabel = elementContainer.controls[tagView.options.controlName].label;
153 tagView.options.container = new elementorModules.editor.Container({
154 type: 'dynamic',
155 id: id,
156 model: tagView.model,
157 settings: tagView.model,
158 view: tagView,
159 parent: elementContainer,
160 label: elementContainer.label + ' ' + tagViewLabel,
161 controls: tagView.model.options.controls,
162 renderer: elementContainer
163 });
164 tagView.render();
165 this.$el.find('.elementor-control-tag-area').after(tagView.el);
166 this.listenTo(tagView, 'remove', this.onTagViewRemove.bind(this));
167 },
168 setDefaultTagView: function setDefaultTagView() {
169 var tagData = elementor.dynamicTags.tagTextToTagData(this.getDynamicValue());
170 this.setTagView(tagData.id, tagData.name, tagData.settings);
171 },
172 tagViewToTagText: function tagViewToTagText() {
173 var tagView = this.tagView;
174 return elementor.dynamicTags.tagDataToTagText(tagView.getOption('id'), tagView.getOption('name'), tagView.model);
175 },
176 getDynamicValue: function getDynamicValue() {
177 return this.view.container.dynamic.get(this.view.model.get('name'));
178 },
179 destroyTagView: function destroyTagView() {
180 if (this.tagView) {
181 this.tagView.destroy();
182 this.tagView = null;
183 }
184 },
185 showPromotion: function showPromotion() {
186 var hasProAndNotConnected = elementor.helpers.hasProAndNotConnected(),
187 dialogOptions = {
188 title: __('Dynamic Content', 'elementor'),
189 content: __('Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.', 'elementor'),
190 targetElement: this.ui.dynamicSwitcher,
191 position: {
192 blockStart: '-10'
193 },
194 actionButton: {
195 url: hasProAndNotConnected ? elementorProEditorConfig.urls.connect : elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name')),
196 text: hasProAndNotConnected ? __('Connect & Activate', 'elementor') : __('Upgrade', 'elementor')
197 }
198 };
199 elementor.promotion.showDialog(dialogOptions);
200 },
201 onRender: function onRender() {
202 this.$el.addClass('elementor-control-dynamic');
203 this.renderTools();
204 this.toggleDynamicClass();
205 if (this.isDynamicMode()) {
206 this.setDefaultTagView();
207 }
208 },
209 onDynamicSwitcherClick: function onDynamicSwitcherClick(event) {
210 event.stopPropagation();
211 if (this.getOption('tags').length) {
212 this.toggleTagsList();
213 } else {
214 this.showPromotion();
215 }
216 },
217 onTagsListItemClick: function onTagsListItemClick(event) {
218 var $tag = jQuery(event.currentTarget);
219 this.setTagView(elementorCommon.helpers.getUniqueId(), $tag.data('tagName'), {});
220
221 // If an element has an active global value, disable it before applying the dynamic value.
222 if (this.view.getGlobalKey()) {
223 this.view.triggerMethod('unset:global:value');
224 }
225 if (this.isDynamicMode()) {
226 $e.run('document/dynamic/settings', {
227 container: this.view.options.container,
228 settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
229 });
230 } else {
231 $e.run('document/dynamic/enable', {
232 container: this.view.options.container,
233 settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
234 });
235 }
236 this.toggleDynamicClass();
237 this.toggleTagsList();
238 if (this.tagView.getTagConfig().settings_required) {
239 this.tagView.showSettingsPopup();
240 }
241 },
242 onTagViewRemove: function onTagViewRemove() {
243 $e.run('document/dynamic/disable', {
244 container: this.view.options.container,
245 settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
246 });
247 this.toggleDynamicClass();
248 },
249 onAfterExternalChange: function onAfterExternalChange() {
250 this.destroyTagView();
251 if (this.isDynamicMode()) {
252 this.setDefaultTagView();
253 }
254 this.toggleDynamicClass();
255 },
256 onDestroy: function onDestroy() {
257 this.destroyTagView();
258 if (this.ui.tagsList) {
259 this.ui.tagsList.remove();
260 }
261 }
262 });
263
264 /***/ }),
265
266 /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js":
267 /*!***********************************************************************************!*\
268 !*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js ***!
269 \***********************************************************************************/
270 /***/ ((module) => {
271
272 "use strict";
273
274
275 module.exports = Marionette.ItemView.extend({
276 className: 'elementor-tag-controls-stack-empty',
277 template: '#tmpl-elementor-tag-controls-stack-empty'
278 });
279
280 /***/ }),
281
282 /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js":
283 /*!*****************************************************************************!*\
284 !*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js ***!
285 \*****************************************************************************/
286 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
287
288 "use strict";
289
290
291 var EmptyView = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack-empty */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js");
292 module.exports = elementorModules.editor.views.ControlsStack.extend({
293 activeTab: 'content',
294 template: _.noop,
295 emptyView: EmptyView,
296 isEmpty: function isEmpty() {
297 // Ignore the section control
298 return this.collection.length < 2;
299 },
300 childViewOptions: function childViewOptions() {
301 return {
302 container: this.options.container
303 };
304 },
305 getNamespaceArray: function getNamespaceArray() {
306 var currentPageView = elementor.getPanelView().getCurrentPageView(),
307 eventNamespace = currentPageView.getNamespaceArray();
308 eventNamespace.push(currentPageView.activeSection);
309 eventNamespace.push(this.getOption('controlName'));
310 eventNamespace.push(this.getOption('name'));
311 return eventNamespace;
312 },
313 onRenderTemplate: function onRenderTemplate() {
314 this.activateFirstSection();
315 }
316 });
317
318 /***/ }),
319
320 /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js":
321 /*!*************************************************************************!*\
322 !*** ../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js ***!
323 \*************************************************************************/
324 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
325
326 "use strict";
327
328
329 var TagControlsStack = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js");
330 module.exports = Marionette.ItemView.extend({
331 className: 'elementor-dynamic-cover e-input-style',
332 tagControlsStack: null,
333 templateHelpers: function templateHelpers() {
334 var helpers = {};
335 if (this.model) {
336 helpers.controls = this.model.options.controls;
337 }
338 return helpers;
339 },
340 ui: {
341 remove: '.elementor-dynamic-cover__remove'
342 },
343 events: function events() {
344 var events = {
345 'click @ui.remove': 'onRemoveClick'
346 };
347 if (this.hasSettings()) {
348 events.click = 'onClick';
349 }
350 return events;
351 },
352 getTemplate: function getTemplate() {
353 var config = this.getTagConfig(),
354 templateFunction = Marionette.TemplateCache.get('#tmpl-elementor-control-dynamic-cover'),
355 renderedTemplate = Marionette.Renderer.render(templateFunction, {
356 hasSettings: this.hasSettings(),
357 isRemovable: !this.getOption('dynamicSettings').default,
358 title: config.title,
359 content: config.panel_template
360 });
361 return Marionette.TemplateCache.prototype.compileTemplate(renderedTemplate.trim());
362 },
363 getTagConfig: function getTagConfig() {
364 return elementor.dynamicTags.getConfig('tags.' + this.getOption('name'));
365 },
366 initSettingsPopup: function initSettingsPopup() {
367 var settingsPopupOptions = {
368 className: 'elementor-tag-settings-popup',
369 position: {
370 my: 'left top+5',
371 at: 'left bottom',
372 of: this.$el,
373 autoRefresh: true
374 },
375 hide: {
376 ignore: '.select2-container'
377 }
378 };
379 var settingsPopup = elementorCommon.dialogsManager.createWidget('buttons', settingsPopupOptions);
380 this.getSettingsPopup = function () {
381 return settingsPopup;
382 };
383 },
384 hasSettings: function hasSettings() {
385 return !!Object.values(this.getTagConfig().controls).length;
386 },
387 showSettingsPopup: function showSettingsPopup() {
388 if (!this.tagControlsStack) {
389 this.initTagControlsStack();
390 }
391 var settingsPopup = this.getSettingsPopup();
392 if (settingsPopup.isVisible()) {
393 return;
394 }
395 settingsPopup.show();
396 },
397 initTagControlsStack: function initTagControlsStack() {
398 this.tagControlsStack = new TagControlsStack({
399 model: this.model,
400 controls: this.model.controls,
401 name: this.options.name,
402 controlName: this.options.controlName,
403 container: this.options.container,
404 el: this.getSettingsPopup().getElements('message')[0]
405 });
406 this.tagControlsStack.render();
407 },
408 initModel: function initModel() {
409 this.model = new elementorModules.editor.elements.models.BaseSettings(this.getOption('settings'), {
410 controls: this.getTagConfig().controls
411 });
412 },
413 initialize: function initialize() {
414 // The `model` should always be available.
415 this.initModel();
416 if (!this.hasSettings()) {
417 return;
418 }
419 this.initSettingsPopup();
420 this.listenTo(this.model, 'change', this.render);
421 },
422 onClick: function onClick() {
423 this.showSettingsPopup();
424 },
425 onRemoveClick: function onRemoveClick(event) {
426 event.stopPropagation();
427 this.destroy();
428 this.trigger('remove');
429 },
430 onDestroy: function onDestroy() {
431 if (this.hasSettings()) {
432 this.getSettingsPopup().destroy();
433 }
434 if (this.tagControlsStack) {
435 this.tagControlsStack.destroy();
436 }
437 }
438 });
439
440 /***/ }),
441
442 /***/ "../assets/dev/js/editor/components/validator/base.js":
443 /*!************************************************************!*\
444 !*** ../assets/dev/js/editor/components/validator/base.js ***!
445 \************************************************************/
446 /***/ ((module) => {
447
448 "use strict";
449
450
451 module.exports = elementorModules.Module.extend({
452 errors: [],
453 __construct: function __construct(settings) {
454 var customValidationMethod = settings.customValidationMethod;
455 if (customValidationMethod) {
456 this.validationMethod = customValidationMethod;
457 }
458 },
459 getDefaultSettings: function getDefaultSettings() {
460 return {
461 validationTerms: {}
462 };
463 },
464 isValid: function isValid() {
465 var validationErrors = this.validationMethod.apply(this, arguments);
466 if (validationErrors.length) {
467 this.errors = validationErrors;
468 return false;
469 }
470 return true;
471 },
472 validationMethod: function validationMethod(newValue) {
473 var validationTerms = this.getSettings('validationTerms'),
474 errors = [];
475 if (validationTerms.required) {
476 if (!('' + newValue).length) {
477 errors.push('Required value is empty');
478 }
479 }
480 return errors;
481 }
482 });
483
484 /***/ }),
485
486 /***/ "../assets/dev/js/editor/components/validator/breakpoint.js":
487 /*!******************************************************************!*\
488 !*** ../assets/dev/js/editor/components/validator/breakpoint.js ***!
489 \******************************************************************/
490 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
491
492 "use strict";
493
494
495 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
496 Object.defineProperty(exports, "__esModule", ({
497 value: true
498 }));
499 exports["default"] = void 0;
500 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
501 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
502 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
503 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
504 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
505 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
506 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
507 var NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js");
508 var BreakpointValidator = exports["default"] = /*#__PURE__*/function (_NumberValidator) {
509 function BreakpointValidator() {
510 (0, _classCallCheck2.default)(this, BreakpointValidator);
511 return _callSuper(this, BreakpointValidator, arguments);
512 }
513 (0, _inherits2.default)(BreakpointValidator, _NumberValidator);
514 return (0, _createClass2.default)(BreakpointValidator, [{
515 key: "getDefaultSettings",
516 value: function getDefaultSettings() {
517 return {
518 validationTerms: {
519 // Max width we allow in general
520 max: 5120
521 }
522 };
523 }
524
525 /**
526 * Get Panel Active Breakpoints
527 *
528 * Since the active kit used in the Site Settings panel could be a draft, we need to use the panel's active
529 * breakpoints settings and not the elementorFrontend.config values (which come from the DB).
530 *
531 * @return {*} Object
532 */
533 }, {
534 key: "getPanelActiveBreakpoints",
535 value: function getPanelActiveBreakpoints() {
536 var panelBreakpoints = elementor.documents.currentDocument.config.settings.settings.active_breakpoints.map(function (breakpointName) {
537 return breakpointName.replace('viewport_', '');
538 }),
539 panelActiveBreakpoints = {};
540 panelBreakpoints.forEach(function (breakpointName) {
541 panelActiveBreakpoints[breakpointName] = elementorFrontend.config.responsive.breakpoints[breakpointName];
542 });
543 return panelActiveBreakpoints;
544 }
545 }, {
546 key: "initBreakpointProperties",
547 value: function initBreakpointProperties() {
548 var _activeBreakpoints$br, _activeBreakpoints$br2;
549 var validationTerms = this.getSettings('validationTerms'),
550 activeBreakpoints = this.getPanelActiveBreakpoints(),
551 breakpointKeys = Object.keys(activeBreakpoints);
552 this.breakpointIndex = breakpointKeys.indexOf(validationTerms.breakpointName);
553 this.topBreakpoint = (_activeBreakpoints$br = activeBreakpoints[breakpointKeys[this.breakpointIndex + 1]]) === null || _activeBreakpoints$br === void 0 ? void 0 : _activeBreakpoints$br.value;
554 this.bottomBreakpoint = (_activeBreakpoints$br2 = activeBreakpoints[breakpointKeys[this.breakpointIndex - 1]]) === null || _activeBreakpoints$br2 === void 0 ? void 0 : _activeBreakpoints$br2.value;
555 }
556 }, {
557 key: "validationMethod",
558 value: function validationMethod(newValue) {
559 var validationTerms = this.getSettings('validationTerms'),
560 errors = NumberValidator.prototype.validationMethod.call(this, newValue);
561
562 // Validate both numeric and empty values, since breakpoints utilize default values when empty.
563 if (_.isFinite(newValue) || '' === newValue) {
564 if (!this.validateMinMaxForBreakpoint(newValue, validationTerms)) {
565 errors.push('Value is not between the breakpoints above or under the edited breakpoint');
566 }
567 }
568 return errors;
569 }
570 }, {
571 key: "validateMinMaxForBreakpoint",
572 value: function validateMinMaxForBreakpoint(newValue, validationTerms) {
573 var breakpointDefaultValue = elementorFrontend.config.responsive.breakpoints[validationTerms.breakpointName].default_value;
574 var isValid = true;
575 this.initBreakpointProperties();
576
577 // Since the following comparison is <=, allow usage of the 320px value for the mobile breakpoint.
578 if ('mobile' === validationTerms.breakpointName && 320 === this.bottomBreakpoint) {
579 this.bottomBreakpoint -= 1;
580 }
581
582 // If there is a breakpoint below the currently edited breakpoint
583 if (this.bottomBreakpoint) {
584 // Check that the new value is not under the bottom breakpoint's value.
585 if ('' !== newValue && newValue <= this.bottomBreakpoint) {
586 isValid = false;
587 }
588
589 // If the new value is empty, check that the default breakpoint value is not below the bottom breakpoint.
590 if ('' === newValue && breakpointDefaultValue <= this.bottomBreakpoint) {
591 isValid = false;
592 }
593 }
594
595 // If there is a breakpoint above the currently edited breakpoint.
596 if (this.topBreakpoint) {
597 // Check that the value is not above the top breakpoint's value.
598 if ('' !== newValue && newValue >= this.topBreakpoint) {
599 isValid = false;
600 }
601
602 // If the new value is empty, check that the default breakpoint value is not above the top breakpoint.
603 if ('' === newValue && breakpointDefaultValue >= this.topBreakpoint) {
604 isValid = false;
605 }
606 }
607 return isValid;
608 }
609 }]);
610 }(NumberValidator);
611
612 /***/ }),
613
614 /***/ "../assets/dev/js/editor/components/validator/number.js":
615 /*!**************************************************************!*\
616 !*** ../assets/dev/js/editor/components/validator/number.js ***!
617 \**************************************************************/
618 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
619
620 "use strict";
621
622
623 var Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js");
624 module.exports = Validator.extend({
625 validationMethod: function validationMethod(newValue) {
626 var validationTerms = this.getSettings('validationTerms'),
627 errors = [];
628 if (_.isFinite(newValue)) {
629 if (undefined !== validationTerms.min && newValue < validationTerms.min) {
630 errors.push('Value is less than minimum');
631 }
632 if (undefined !== validationTerms.max && newValue > validationTerms.max) {
633 errors.push('Value is greater than maximum');
634 }
635 }
636 return errors;
637 }
638 });
639
640 /***/ }),
641
642 /***/ "../assets/dev/js/editor/controls/base-data.js":
643 /*!*****************************************************!*\
644 !*** ../assets/dev/js/editor/controls/base-data.js ***!
645 \*****************************************************/
646 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
647
648 "use strict";
649
650
651 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
652 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
653 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
654 var _breakpoint = _interopRequireDefault(__webpack_require__(/*! elementor-validator/breakpoint */ "../assets/dev/js/editor/components/validator/breakpoint.js"));
655 function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
656 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
657 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
658 var ControlBaseView = __webpack_require__(/*! elementor-controls/base */ "../assets/dev/js/editor/controls/base.js"),
659 TagsBehavior = __webpack_require__(/*! elementor-dynamic-tags/control-behavior */ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js"),
660 Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js"),
661 NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js"),
662 ControlBaseDataView;
663 ControlBaseDataView = ControlBaseView.extend({
664 validatorTypes: {
665 Base: Validator,
666 Number: NumberValidator,
667 Breakpoint: _breakpoint.default
668 },
669 ui: function ui() {
670 var ui = ControlBaseView.prototype.ui.apply(this, arguments);
671 _.extend(ui, {
672 input: 'input[data-setting][type!="checkbox"][type!="radio"]',
673 checkbox: 'input[data-setting][type="checkbox"]',
674 radio: 'input[data-setting][type="radio"]',
675 select: 'select[data-setting]',
676 textarea: 'textarea[data-setting]',
677 responsiveSwitchersSibling: "".concat(ui.controlTitle, "[data-e-responsive-switcher-sibling!=\"false\"]"),
678 responsiveSwitchers: '.elementor-responsive-switcher',
679 contentEditable: '[contenteditable="true"]'
680 });
681 return ui;
682 },
683 templateHelpers: function templateHelpers() {
684 var controlData = ControlBaseView.prototype.templateHelpers.apply(this, arguments);
685 controlData.data.controlValue = this.getControlValue();
686 return controlData;
687 },
688 events: function events() {
689 return {
690 'input @ui.input': 'onBaseInputTextChange',
691 'change @ui.checkbox': 'onBaseInputChange',
692 'change @ui.radio': 'onBaseInputChange',
693 'input @ui.textarea': 'onBaseInputTextChange',
694 'change @ui.select': 'onBaseInputChange',
695 'input @ui.contentEditable': 'onBaseInputTextChange',
696 'click @ui.responsiveSwitchers': 'onResponsiveSwitchersClick'
697 };
698 },
699 behaviors: function behaviors() {
700 var behaviors = ControlBaseView.prototype.behaviors.apply(this, arguments),
701 dynamicSettings = this.options.model.get('dynamic');
702 if (dynamicSettings && dynamicSettings.active) {
703 var tags = _.filter(elementor.dynamicTags.getConfig('tags'), function (tag) {
704 return tag.editable && _.intersection(tag.categories, dynamicSettings.categories).length;
705 });
706 if (tags.length || elementor.config.user.is_administrator) {
707 behaviors.tags = {
708 behaviorClass: TagsBehavior,
709 tags: tags,
710 dynamicSettings: dynamicSettings
711 };
712 }
713 }
714 return behaviors;
715 },
716 initialize: function initialize() {
717 ControlBaseView.prototype.initialize.apply(this, arguments);
718 this.registerValidators();
719 if (this.model.get('responsive')) {
720 this.setPlaceholderFromParent();
721 }
722 if (undefined === this.model.get('inherit_placeholders')) {
723 this.model.set('inherit_placeholders', true);
724 }
725
726 // TODO: this.elementSettingsModel is deprecated since 2.8.0.
727 var settings = this.container ? this.container.settings : this.elementSettingsModel;
728 this.listenTo(settings, 'change:external:' + this.model.get('name'), this.onAfterExternalChange);
729 },
730 getControlValue: function getControlValue() {
731 return this.container.settings.get(this.model.get('name'));
732 },
733 getGlobalKey: function getGlobalKey() {
734 return this.container.globals.get(this.model.get('name'));
735 },
736 getGlobalValue: function getGlobalValue() {
737 return this.globalValue;
738 },
739 getGlobalDefault: function getGlobalDefault() {
740 var controlGlobalArgs = this.model.get('global');
741 if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) {
742 // If the control is a color/typography control and default colors/typography are disabled, don't return the global value.
743 if (!elementor.config.globals.defaults_enabled[this.getGlobalMeta().controlType]) {
744 return '';
745 }
746 var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default),
747 command = _$e$data$commandExtra.command,
748 args = _$e$data$commandExtra.args,
749 result = $e.data.getCache($e.components.get('globals'), command, args.query);
750 return result === null || result === void 0 ? void 0 : result.value;
751 }
752
753 // No global default.
754 return '';
755 },
756 getCurrentValue: function getCurrentValue() {
757 if (this.getGlobalKey() && !this.globalValue) {
758 return '';
759 }
760 if (this.globalValue) {
761 return this.globalValue;
762 }
763 var controlValue = this.getControlValue();
764 if (controlValue) {
765 return controlValue;
766 }
767 return this.getGlobalDefault();
768 },
769 isGlobalActive: function isGlobalActive() {
770 var _this$options$model$g;
771 return (_this$options$model$g = this.options.model.get('global')) === null || _this$options$model$g === void 0 ? void 0 : _this$options$model$g.active;
772 },
773 setValue: function setValue(value) {
774 this.setSettingsModel(value);
775 },
776 setSettingsModel: function setSettingsModel(value) {
777 var key = this.model.get('name');
778 $e.run('document/elements/settings', {
779 container: this.options.container,
780 settings: (0, _defineProperty2.default)({}, key, value)
781 });
782 this.triggerMethod('settings:change');
783 },
784 applySavedValue: function applySavedValue() {
785 this.setInputValue('[data-setting="' + this.model.get('name') + '"]', this.getControlValue());
786 },
787 getEditSettings: function getEditSettings(setting) {
788 var settings = this.getOption('elementEditSettings').toJSON();
789 if (setting) {
790 return settings[setting];
791 }
792 return settings;
793 },
794 setEditSetting: function setEditSetting(settingKey, settingValue) {
795 var settings = this.getOption('elementEditSettings') || this.getOption('container').settings;
796 settings.set(settingKey, settingValue);
797 },
798 /**
799 * Get the placeholder for the current control.
800 *
801 * @return {*} placeholder
802 */
803 getControlPlaceholder: function getControlPlaceholder() {
804 var placeholder = this.model.get('placeholder');
805 if (this.model.get('responsive') && this.model.get('inherit_placeholders')) {
806 placeholder = placeholder || this.container.placeholders[this.model.get('name')];
807 }
808 return placeholder;
809 },
810 /**
811 * Get the responsive parent view if exists.
812 *
813 * @return {ControlBaseDataView|undefined} responsive parent view if exists
814 */
815 getResponsiveParentView: function getResponsiveParentView() {
816 var parent = this.model.get('parent');
817 try {
818 return parent && this.container.panel.getControlView(parent);
819 // eslint-disable-next-line no-empty
820 } catch (e) {}
821 },
822 /**
823 * Get the responsive children views if exists.
824 *
825 * @return {ControlBaseDataView|null} responsive children views if exists
826 */
827 getResponsiveChildrenViews: function getResponsiveChildrenViews() {
828 var children = this.model.get('inheritors'),
829 views = [];
830 try {
831 var _iterator = _createForOfIteratorHelper(children),
832 _step;
833 try {
834 for (_iterator.s(); !(_step = _iterator.n()).done;) {
835 var child = _step.value;
836 views.push(this.container.panel.getControlView(child));
837 }
838 // eslint-disable-next-line no-empty
839 } catch (err) {
840 _iterator.e(err);
841 } finally {
842 _iterator.f();
843 }
844 } catch (e) {}
845 return views;
846 },
847 /**
848 * Get prepared placeholder from the responsive parent, and put it into current
849 * control model as placeholder.
850 */
851 setPlaceholderFromParent: function setPlaceholderFromParent() {
852 var parent = this.getResponsiveParentView();
853 if (parent) {
854 this.container.placeholders[this.model.get('name')] = parent.preparePlaceholderForChildren();
855 }
856 },
857 /**
858 * Returns the value of the current control if exists, or the parent value if not,
859 * so responsive children can set it as their placeholder. When there are multiple
860 * inputs, the inputs which are empty on this control will inherit their values
861 * from the responsive parent.
862 * For example, if on desktop the padding of all edges is 10, and on tablet only
863 * padding right and left is set to 15, the mobile control placeholder will
864 * eventually be: { top: 10, right: 15, left: 15, bottom: 10 }, because of the
865 * inheritance of multiple values.
866 *
867 * @return {*} value of the current control if exists, or the parent value if not
868 */
869 preparePlaceholderForChildren: function preparePlaceholderForChildren() {
870 var _this$getResponsivePa;
871 var cleanValue = this.getCleanControlValue(),
872 parentValue = (_this$getResponsivePa = this.getResponsiveParentView()) === null || _this$getResponsivePa === void 0 ? void 0 : _this$getResponsivePa.preparePlaceholderForChildren();
873 if (cleanValue instanceof Object) {
874 return Object.assign({}, parentValue, cleanValue);
875 }
876 return cleanValue || parentValue;
877 },
878 /**
879 * Start the re-rendering recursive chain from the responsive child of this
880 * control. It's useful when the current control value is changed and we want
881 * to update all responsive children. In this case, the re-rendering is supposed
882 * to be applied only from the responsive child of this control and on.
883 */
884 propagatePlaceholder: function propagatePlaceholder() {
885 var children = this.getResponsiveChildrenViews();
886 var _iterator2 = _createForOfIteratorHelper(children),
887 _step2;
888 try {
889 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
890 var child = _step2.value;
891 child.renderWithChildren();
892 }
893 } catch (err) {
894 _iterator2.e(err);
895 } finally {
896 _iterator2.f();
897 }
898 },
899 /**
900 * Re-render current control and trigger this method on the responsive child.
901 * The purpose of those actions is to recursively re-render all responsive
902 * children.
903 */
904 renderWithChildren: function renderWithChildren() {
905 this.render();
906 this.propagatePlaceholder();
907 },
908 /**
909 * Get control value without empty properties, and without default values.
910 *
911 * @return {{}} control value without empty properties, and without default values
912 */
913 getCleanControlValue: function getCleanControlValue() {
914 var value = this.getControlValue();
915 return value && value !== this.model.get('default') ? value : undefined;
916 },
917 onAfterChange: function onAfterChange(control) {
918 if (Object.keys(control.changed).includes(this.model.get('name'))) {
919 this.propagatePlaceholder();
920 }
921 ControlBaseView.prototype.onAfterChange.apply(this, arguments);
922 },
923 getInputValue: function getInputValue(input) {
924 var $input = this.$(input);
925 if ($input.is('[contenteditable="true"]')) {
926 return $input.html();
927 }
928 var inputValue = $input.val(),
929 inputType = $input.attr('type');
930 if (-1 !== ['radio', 'checkbox'].indexOf(inputType)) {
931 return $input.prop('checked') ? inputValue : '';
932 }
933 if ('number' === inputType && _.isFinite(inputValue)) {
934 return +inputValue;
935 }
936
937 // Temp fix for jQuery (< 3.0) that return null instead of empty array
938 if ('SELECT' === input.tagName && $input.prop('multiple') && null === inputValue) {
939 inputValue = [];
940 }
941 return inputValue;
942 },
943 setInputValue: function setInputValue(input, value) {
944 var $input = this.$(input),
945 inputType = $input.attr('type');
946 if ('checkbox' === inputType) {
947 $input.prop('checked', !!value);
948 } else if ('radio' === inputType) {
949 $input.filter('[value="' + value + '"]').prop('checked', true);
950 } else {
951 $input.val(value);
952 }
953 },
954 addValidator: function addValidator(validator) {
955 this.validators.push(validator);
956 },
957 registerValidators: function registerValidators() {
958 var _this = this;
959 this.validators = [];
960 var validationTerms = {};
961 if (this.model.get('required')) {
962 validationTerms.required = true;
963 }
964 if (!jQuery.isEmptyObject(validationTerms)) {
965 this.addValidator(new this.validatorTypes.Base({
966 validationTerms: validationTerms
967 }));
968 }
969 var validators = this.model.get('validators');
970 if (validators) {
971 Object.entries(validators).forEach(function (_ref) {
972 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
973 key = _ref2[0],
974 args = _ref2[1];
975 _this.addValidator(new _this.validatorTypes[key]({
976 validationTerms: args
977 }));
978 });
979 }
980 },
981 onBeforeRender: function onBeforeRender() {
982 this.setPlaceholderFromParent();
983 },
984 onRender: function onRender() {
985 ControlBaseView.prototype.onRender.apply(this, arguments);
986 if (this.model.get('responsive')) {
987 this.renderResponsiveSwitchers();
988 }
989 this.applySavedValue();
990 this.triggerMethod('ready');
991 this.toggleControlVisibility();
992 this.addTooltip();
993 },
994 onBaseInputTextChange: function onBaseInputTextChange(event) {
995 this.onBaseInputChange(event);
996 },
997 onBaseInputChange: function onBaseInputChange(event) {
998 clearTimeout(this.correctionTimeout);
999 var input = event.currentTarget,
1000 value = this.getInputValue(input),
1001 validators = this.validators.slice(0),
1002 settingsValidators = this.container.settings.validators[this.model.get('name')];
1003 if (settingsValidators) {
1004 validators = validators.concat(settingsValidators);
1005 }
1006 if (validators) {
1007 var oldValue = this.getControlValue(input.dataset.setting);
1008 var isValidValue = validators.every(function (validator) {
1009 return validator.isValid(value, oldValue);
1010 });
1011 if (!isValidValue) {
1012 this.correctionTimeout = setTimeout(this.setInputValue.bind(this, input, oldValue), 1200);
1013 return;
1014 }
1015 }
1016 this.updateElementModel(value, input);
1017 this.triggerMethod('input:change', event);
1018 },
1019 onResponsiveSwitchersClick: function onResponsiveSwitchersClick(event) {
1020 var $switcher = jQuery(event.currentTarget),
1021 device = $switcher.data('device'),
1022 $switchersWrapper = this.ui.responsiveSwitchersWrapper,
1023 selectedOption = $switcher.index();
1024 $switchersWrapper.toggleClass('elementor-responsive-switchers-open');
1025 $switchersWrapper[0].style.setProperty('--selected-option', selectedOption);
1026 this.triggerMethod('responsive:switcher:click', device);
1027 elementor.changeDeviceMode(device);
1028 },
1029 renderResponsiveSwitchers: function renderResponsiveSwitchers() {
1030 var templateHtml = Marionette.Renderer.render('#tmpl-elementor-control-responsive-switchers', this.model.attributes);
1031 this.ui.responsiveSwitchersSibling.after(templateHtml);
1032 this.ui.responsiveSwitchersWrapper = this.$el.find('.elementor-control-responsive-switchers');
1033 },
1034 onAfterExternalChange: function onAfterExternalChange() {
1035 this.hideTooltip();
1036 this.applySavedValue();
1037 },
1038 addTooltip: function addTooltip() {
1039 this.ui.tooltipTargets = this.$el.find('.tooltip-target');
1040 if (!this.ui.tooltipTargets.length) {
1041 return;
1042 }
1043
1044 // Create tooltip on controls
1045 this.ui.tooltipTargets.tipsy({
1046 gravity: function gravity() {
1047 // `n` for down, `s` for up
1048 var gravity = jQuery(this).data('tooltip-pos');
1049 if (undefined !== gravity) {
1050 return gravity;
1051 }
1052 return 's';
1053 },
1054 title: function title() {
1055 return this.getAttribute('data-tooltip');
1056 }
1057 });
1058 },
1059 hideTooltip: function hideTooltip() {
1060 if (this.ui.tooltipTargets.length) {
1061 this.ui.tooltipTargets.tipsy('hide');
1062 }
1063 },
1064 updateElementModel: function updateElementModel(value) {
1065 this.setValue(value);
1066 }
1067 }, {
1068 // Static methods
1069 getStyleValue: function getStyleValue(placeholder, controlValue, controlData) {
1070 if ('DEFAULT' === placeholder) {
1071 return controlData.default;
1072 }
1073 return controlValue;
1074 },
1075 onPasteStyle: function onPasteStyle() {
1076 return true;
1077 }
1078 });
1079 module.exports = ControlBaseDataView;
1080
1081 /***/ }),
1082
1083 /***/ "../assets/dev/js/editor/controls/base.js":
1084 /*!************************************************!*\
1085 !*** ../assets/dev/js/editor/controls/base.js ***!
1086 \************************************************/
1087 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1088
1089 "use strict";
1090
1091
1092 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1093 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1094 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1095 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1096 var ControlBaseView;
1097 ControlBaseView = Marionette.CompositeView.extend({
1098 ui: function ui() {
1099 return {
1100 controlTitle: '.elementor-control-title'
1101 };
1102 },
1103 behaviors: function behaviors() {
1104 var behaviors = {};
1105 return elementor.hooks.applyFilters('controls/base/behaviors', behaviors, this);
1106 },
1107 getBehavior: function getBehavior(name) {
1108 return this._behaviors[Object.keys(this.behaviors()).indexOf(name)];
1109 },
1110 className: function className() {
1111 // TODO: Any better classes for that?
1112 var classes = 'elementor-control elementor-control-' + this.model.get('name') + ' elementor-control-type-' + this.model.get('type'),
1113 modelClasses = this.model.get('classes'),
1114 responsive = this.model.get('responsive');
1115 if (!_.isEmpty(modelClasses)) {
1116 classes += ' ' + modelClasses;
1117 }
1118 if (!_.isEmpty(responsive)) {
1119 var responsiveControlName = responsive.max || responsive.min;
1120 classes += ' elementor-control-responsive-' + responsiveControlName;
1121 }
1122 return classes;
1123 },
1124 templateHelpers: function templateHelpers() {
1125 var controlData = {
1126 _cid: this.model.cid
1127 };
1128 return {
1129 view: this,
1130 data: _.extend({}, this.model.toJSON(), controlData)
1131 };
1132 },
1133 getTemplate: function getTemplate() {
1134 return Marionette.TemplateCache.get('#tmpl-elementor-control-' + this.model.get('type') + '-content');
1135 },
1136 initialize: function initialize(options) {
1137 var label = this.model.get('label');
1138
1139 // TODO: Temp backwards compatibility. since 2.8.0.
1140 Object.defineProperty(this, 'container', {
1141 get: function get() {
1142 if (!options.container) {
1143 var settingsModel = options.elementSettingsModel,
1144 view = $e.components.get('document').utils.findViewById(settingsModel.id);
1145
1146 // Element control.
1147 if (view && view.getContainer) {
1148 options.container = view.getContainer();
1149 } else {
1150 if (!settingsModel.id) {
1151 settingsModel.id = 'bc-' + elementorCommon.helpers.getUniqueId();
1152 }
1153
1154 // Document/General/Other control.
1155 options.container = new elementorModules.editor.Container({
1156 type: 'bc-container',
1157 id: settingsModel.id,
1158 model: settingsModel,
1159 settings: settingsModel,
1160 label: label,
1161 view: false,
1162 parent: false,
1163 renderer: false,
1164 controls: settingsModel.options.controls
1165 });
1166 }
1167 }
1168 return options.container;
1169 }
1170 });
1171
1172 // Use `defineProperty` because `get elementSettingsModel()` fails during the `Marionette.CompositeView.extend`.
1173 Object.defineProperty(this, 'elementSettingsModel', {
1174 get: function get() {
1175 elementorDevTools.deprecation.deprecated('elementSettingsModel', '2.8.0', 'container.settings');
1176 return options.container ? options.container.settings : options.elementSettingsModel;
1177 }
1178 });
1179 var controlType = this.model.get('type'),
1180 controlSettings = jQuery.extend(true, {}, elementor.config.controls[controlType], this.model.attributes);
1181 this.model.set(controlSettings);
1182
1183 // TODO: this.elementSettingsModel is deprecated since 2.8.0.
1184 var settings = this.container ? this.container.settings : this.elementSettingsModel;
1185 this.listenTo(settings, 'change', this.onAfterChange);
1186 if (this.model.attributes.responsive) {
1187 this.onDeviceModeChange = this.onDeviceModeChange.bind(this);
1188 elementor.listenTo(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
1189 }
1190 },
1191 onDestroy: function onDestroy() {
1192 elementor.stopListening(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
1193 },
1194 onDeviceModeChange: function onDeviceModeChange() {
1195 this.toggleControlVisibility();
1196 },
1197 onAfterChange: function onAfterChange() {
1198 this.toggleControlVisibility();
1199 },
1200 toggleControlVisibility: function toggleControlVisibility() {
1201 // TODO: this.elementSettingsModel is deprecated since 2.8.0.
1202 var settings = this.container ? this.container.settings : this.elementSettingsModel;
1203 var isVisible = elementor.helpers.isActiveControl(this.model, settings.attributes, settings.controls);
1204 this.$el.toggleClass('elementor-hidden-control', !isVisible);
1205 elementor.getPanelView().updateScrollbar();
1206 },
1207 onRender: function onRender() {
1208 var layoutType = this.model.get('label_block') ? 'block' : 'inline',
1209 showLabel = this.model.get('show_label'),
1210 elClasses = 'elementor-label-' + layoutType;
1211 elClasses += ' elementor-control-separator-' + this.model.get('separator');
1212 if (!showLabel) {
1213 elClasses += ' elementor-control-hidden-label';
1214 }
1215 this.$el.addClass(elClasses);
1216 this.toggleControlVisibility();
1217 },
1218 reRoute: function reRoute(controlActive) {
1219 $e.route($e.routes.getCurrent('panel'), this.getControlInRouteArgs(controlActive ? this.getControlPath() : ''), {
1220 history: false
1221 });
1222 },
1223 getControlInRouteArgs: function getControlInRouteArgs(path) {
1224 return _objectSpread(_objectSpread({}, $e.routes.getCurrentArgs('panel')), {}, {
1225 activeControl: path
1226 });
1227 },
1228 getControlPath: function getControlPath() {
1229 var controlPath = this.model.get('name'),
1230 parent = this._parent;
1231 while (!parent.$el.hasClass('elementor-controls-stack')) {
1232 var parentName = parent.model.get('name') || parent.model.get('_id');
1233 controlPath = parentName + '/' + controlPath;
1234 parent = parent._parent;
1235 }
1236 return controlPath;
1237 }
1238 });
1239 module.exports = ControlBaseView;
1240
1241 /***/ }),
1242
1243 /***/ "../modules/promotions/assets/js/react/app-manager.js":
1244 /*!************************************************************!*\
1245 !*** ../modules/promotions/assets/js/react/app-manager.js ***!
1246 \************************************************************/
1247 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1248
1249 "use strict";
1250
1251
1252 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1253 Object.defineProperty(exports, "__esModule", ({
1254 value: true
1255 }));
1256 exports.AppManager = void 0;
1257 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1258 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1259 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1260 var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/promotions/assets/js/react/app.js"));
1261 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
1262 var AppManager = exports.AppManager = /*#__PURE__*/function () {
1263 function AppManager() {
1264 (0, _classCallCheck2.default)(this, AppManager);
1265 this.promotionInfoTip = null;
1266 this.onRoute = function () {};
1267 }
1268 return (0, _createClass2.default)(AppManager, [{
1269 key: "getPromotionData",
1270 value: function getPromotionData(promotionType) {
1271 return elementorPromotionsData[promotionType] || {};
1272 }
1273 }, {
1274 key: "mount",
1275 value: function mount(targetNode, selectors) {
1276 var _elementor,
1277 _elementor$getPrefere,
1278 _rootElement$getAttri,
1279 _this = this;
1280 if (this.promotionInfoTip) {
1281 return;
1282 }
1283 var wrapperElement = targetNode === null || targetNode === void 0 ? void 0 : targetNode.closest(selectors.wrapperElement);
1284 var rootElement = wrapperElement === null || wrapperElement === void 0 ? void 0 : wrapperElement.querySelector(selectors.reactAnchor);
1285 if (!rootElement) {
1286 return;
1287 }
1288 this.attachEditorEventListeners();
1289 this.promotionInfoTip = (0, _client.createRoot)(rootElement);
1290 var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 || (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto';
1291 var isRTL = elementorCommon.config.isRTL;
1292 var promotionType = (_rootElement$getAttri = rootElement.getAttribute('data-promotion')) === null || _rootElement$getAttri === void 0 ? void 0 : _rootElement$getAttri.replace('_promotion', '');
1293 this.promotionInfoTip.render(/*#__PURE__*/_react.default.createElement(_app.default, {
1294 colorScheme: colorScheme,
1295 isRTL: isRTL,
1296 promotionsData: this.getPromotionData(promotionType),
1297 onClose: function onClose() {
1298 return _this.unmount();
1299 }
1300 }));
1301 }
1302 }, {
1303 key: "unmount",
1304 value: function unmount() {
1305 if (this.promotionInfoTip) {
1306 this.detachEditorEventListeners();
1307 this.promotionInfoTip.unmount();
1308 }
1309 this.promotionInfoTip = null;
1310 }
1311 }, {
1312 key: "attachEditorEventListeners",
1313 value: function attachEditorEventListeners() {
1314 var _this2 = this;
1315 this.onRoute = function (component, route) {
1316 if (route !== 'panel/elements/categories' && route !== 'panel/editor/content') {
1317 return;
1318 }
1319 _this2.unmount();
1320 };
1321 $e.routes.on('run:after', this.onRoute);
1322 }
1323 }, {
1324 key: "detachEditorEventListeners",
1325 value: function detachEditorEventListeners() {
1326 $e.routes.off('run:after', this.onRoute);
1327 }
1328 }]);
1329 }();
1330
1331 /***/ }),
1332
1333 /***/ "../modules/promotions/assets/js/react/app.js":
1334 /*!****************************************************!*\
1335 !*** ../modules/promotions/assets/js/react/app.js ***!
1336 \****************************************************/
1337 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1338
1339 "use strict";
1340 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1341
1342
1343 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1344 Object.defineProperty(exports, "__esModule", ({
1345 value: true
1346 }));
1347 exports["default"] = void 0;
1348 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1349 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1350 var _promotionCard = _interopRequireDefault(__webpack_require__(/*! ./components/promotion-card */ "../modules/promotions/assets/js/react/components/promotion-card.js"));
1351 var App = function App(props) {
1352 return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
1353 rtl: props.isRTL
1354 }, /*#__PURE__*/_react.default.createElement(_ui.LocalizationProvider, null, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
1355 colorScheme: props.colorScheme
1356 }, /*#__PURE__*/_react.default.createElement(_ui.Infotip, {
1357 content: /*#__PURE__*/_react.default.createElement(_promotionCard.default, {
1358 doClose: props.onClose,
1359 promotionsData: props.promotionsData
1360 }),
1361 placement: "right",
1362 arrow: true,
1363 open: true,
1364 disableHoverListener: true,
1365 PopperProps: {
1366 modifiers: [{
1367 name: 'offset',
1368 options: {
1369 offset: [-24, 8]
1370 }
1371 }]
1372 }
1373 }, /*#__PURE__*/_react.default.createElement("span", null)))));
1374 };
1375 App.propTypes = {
1376 colorScheme: PropTypes.oneOf(['auto', 'light', 'dark']),
1377 isRTL: PropTypes.bool,
1378 promotionsData: PropTypes.object,
1379 onClose: PropTypes.func.isRequired
1380 };
1381 var _default = exports["default"] = App;
1382
1383 /***/ }),
1384
1385 /***/ "../modules/promotions/assets/js/react/components/promotion-card.js":
1386 /*!**************************************************************************!*\
1387 !*** ../modules/promotions/assets/js/react/components/promotion-card.js ***!
1388 \**************************************************************************/
1389 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1390
1391 "use strict";
1392 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1393
1394
1395 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1396 Object.defineProperty(exports, "__esModule", ({
1397 value: true
1398 }));
1399 exports["default"] = void 0;
1400 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1401 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1402 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1403 var PromotionCard = function PromotionCard(_ref) {
1404 var doClose = _ref.doClose,
1405 promotionsData = _ref.promotionsData;
1406 var title = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.title,
1407 description = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.description,
1408 imgSrc = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image,
1409 imgAlt = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image_alt,
1410 ctaText = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_text,
1411 ctaUrl = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_url;
1412 var redirectHandler = function redirectHandler() {
1413 window.open(ctaUrl, '_blank');
1414 return doClose();
1415 };
1416 return /*#__PURE__*/_react.default.createElement(_ui.ClickAwayListener, {
1417 disableReactTree: true,
1418 mouseEvent: "onMouseDown",
1419 touchEvent: "onTouchStart",
1420 onClickAway: doClose
1421 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
1422 sx: {
1423 width: 296
1424 },
1425 "data-testid": "e-promotion-card"
1426 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1427 direction: "row",
1428 alignItems: "center",
1429 py: 1,
1430 px: 2
1431 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1432 variant: "subtitle2"
1433 }, title), /*#__PURE__*/_react.default.createElement(_ui.Chip, {
1434 label: (0, _i18n.__)('PRO', 'elementor'),
1435 size: "small",
1436 variant: "outlined",
1437 color: "promotion",
1438 sx: {
1439 ml: 1
1440 }
1441 }), /*#__PURE__*/_react.default.createElement(_ui.CloseButton, {
1442 edge: "end",
1443 sx: {
1444 ml: 'auto'
1445 },
1446 slotProps: {
1447 icon: {
1448 fontSize: 'small'
1449 }
1450 },
1451 onClick: doClose
1452 })), /*#__PURE__*/_react.default.createElement(_ui.Image, {
1453 src: imgSrc,
1454 alt: imgAlt,
1455 sx: {
1456 height: 150,
1457 width: '100%'
1458 }
1459 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1460 px: 2
1461 }, 1 === description.length ? /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1462 variant: "body2",
1463 color: "secondary",
1464 sx: {
1465 pt: 1.5,
1466 pb: 1
1467 }
1468 }, description[0]) : /*#__PURE__*/_react.default.createElement(_ui.List, {
1469 sx: {
1470 pl: 2
1471 }
1472 }, description.map(function (text, index) {
1473 return /*#__PURE__*/_react.default.createElement(_ui.ListItem, {
1474 key: index,
1475 sx: {
1476 listStyle: 'disc',
1477 display: 'list-item',
1478 color: 'text.secondary',
1479 p: 0
1480 }
1481 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1482 variant: "body2",
1483 color: "secondary"
1484 }, text));
1485 }))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1486 pt: 1,
1487 pb: 1.5,
1488 px: 2
1489 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
1490 variant: "contained",
1491 size: "small",
1492 color: "promotion",
1493 onClick: redirectHandler,
1494 sx: {
1495 ml: 'auto'
1496 }
1497 }, ctaText))));
1498 };
1499 PromotionCard.propTypes = {
1500 doClose: PropTypes.func,
1501 promotionsData: PropTypes.object
1502 };
1503 var _default = exports["default"] = PromotionCard;
1504
1505 /***/ }),
1506
1507 /***/ "../modules/promotions/assets/js/react/controls/promotion.js":
1508 /*!*******************************************************************!*\
1509 !*** ../modules/promotions/assets/js/react/controls/promotion.js ***!
1510 \*******************************************************************/
1511 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1512
1513 "use strict";
1514
1515
1516 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1517 Object.defineProperty(exports, "__esModule", ({
1518 value: true
1519 }));
1520 exports["default"] = void 0;
1521 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1522 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1523 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1524 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1525 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1526 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1527 var _baseData = _interopRequireDefault(__webpack_require__(/*! elementor-controls/base-data */ "../assets/dev/js/editor/controls/base-data.js"));
1528 var _appManager = __webpack_require__(/*! ../app-manager */ "../modules/promotions/assets/js/react/app-manager.js");
1529 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
1530 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1531 var _default = exports["default"] = /*#__PURE__*/function (_ControlBaseDataView) {
1532 function _default(options) {
1533 var _this;
1534 (0, _classCallCheck2.default)(this, _default);
1535 _this = _callSuper(this, _default, [options]);
1536 (0, _defineProperty2.default)(_this, "promotionInfoTip", null);
1537 (0, _defineProperty2.default)(_this, "selectors", {
1538 wrapperElement: '.elementor-control-type-switcher',
1539 reactAnchor: '.e-promotion-react-wrapper'
1540 });
1541 _this.AppManager = new _appManager.AppManager();
1542 return _this;
1543 }
1544 (0, _inherits2.default)(_default, _ControlBaseDataView);
1545 return (0, _createClass2.default)(_default, [{
1546 key: "ui",
1547 value: function ui() {
1548 return {
1549 switcher: '[data-promotion].elementor-control-type-switcher'
1550 };
1551 }
1552 }, {
1553 key: "events",
1554 value: function events() {
1555 return {
1556 'click @ui.switcher': 'onClickControlSwitcher'
1557 };
1558 }
1559 }, {
1560 key: "promotionData",
1561 value: function promotionData(promotionType) {
1562 return elementorPromotionsData[promotionType] || {};
1563 }
1564 }, {
1565 key: "onClickControlSwitcher",
1566 value: function onClickControlSwitcher(event) {
1567 event.stopPropagation();
1568 this.AppManager.mount(event.target, this.selectors);
1569 }
1570 }]);
1571 }(_baseData.default);
1572
1573 /***/ }),
1574
1575 /***/ "../modules/promotions/assets/js/react/module.js":
1576 /*!*******************************************************!*\
1577 !*** ../modules/promotions/assets/js/react/module.js ***!
1578 \*******************************************************/
1579 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1580
1581 "use strict";
1582
1583
1584 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1585 Object.defineProperty(exports, "__esModule", ({
1586 value: true
1587 }));
1588 exports["default"] = void 0;
1589 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1590 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1591 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1592 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1593 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1594 var _promotion = _interopRequireDefault(__webpack_require__(/*! ./controls/promotion */ "../modules/promotions/assets/js/react/controls/promotion.js"));
1595 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
1596 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1597 var Module = exports["default"] = /*#__PURE__*/function (_elementorModules$edi) {
1598 function Module() {
1599 (0, _classCallCheck2.default)(this, Module);
1600 return _callSuper(this, Module, arguments);
1601 }
1602 (0, _inherits2.default)(Module, _elementorModules$edi);
1603 return (0, _createClass2.default)(Module, [{
1604 key: "onElementorInit",
1605 value: function onElementorInit() {
1606 elementor.addControlView('promotion_control', _promotion.default);
1607 }
1608 }]);
1609 }(elementorModules.editor.utils.Module);
1610
1611 /***/ }),
1612
1613 /***/ "../node_modules/object-assign/index.js":
1614 /*!**********************************************!*\
1615 !*** ../node_modules/object-assign/index.js ***!
1616 \**********************************************/
1617 /***/ ((module) => {
1618
1619 "use strict";
1620 /*
1621 object-assign
1622 (c) Sindre Sorhus
1623 @license MIT
1624 */
1625
1626
1627 /* eslint-disable no-unused-vars */
1628 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1629 var hasOwnProperty = Object.prototype.hasOwnProperty;
1630 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1631
1632 function toObject(val) {
1633 if (val === null || val === undefined) {
1634 throw new TypeError('Object.assign cannot be called with null or undefined');
1635 }
1636
1637 return Object(val);
1638 }
1639
1640 function shouldUseNative() {
1641 try {
1642 if (!Object.assign) {
1643 return false;
1644 }
1645
1646 // Detect buggy property enumeration order in older V8 versions.
1647
1648 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1649 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1650 test1[5] = 'de';
1651 if (Object.getOwnPropertyNames(test1)[0] === '5') {
1652 return false;
1653 }
1654
1655 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1656 var test2 = {};
1657 for (var i = 0; i < 10; i++) {
1658 test2['_' + String.fromCharCode(i)] = i;
1659 }
1660 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1661 return test2[n];
1662 });
1663 if (order2.join('') !== '0123456789') {
1664 return false;
1665 }
1666
1667 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1668 var test3 = {};
1669 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1670 test3[letter] = letter;
1671 });
1672 if (Object.keys(Object.assign({}, test3)).join('') !==
1673 'abcdefghijklmnopqrst') {
1674 return false;
1675 }
1676
1677 return true;
1678 } catch (err) {
1679 // We don't expect any of the above to throw, but better to be safe.
1680 return false;
1681 }
1682 }
1683
1684 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
1685 var from;
1686 var to = toObject(target);
1687 var symbols;
1688
1689 for (var s = 1; s < arguments.length; s++) {
1690 from = Object(arguments[s]);
1691
1692 for (var key in from) {
1693 if (hasOwnProperty.call(from, key)) {
1694 to[key] = from[key];
1695 }
1696 }
1697
1698 if (getOwnPropertySymbols) {
1699 symbols = getOwnPropertySymbols(from);
1700 for (var i = 0; i < symbols.length; i++) {
1701 if (propIsEnumerable.call(from, symbols[i])) {
1702 to[symbols[i]] = from[symbols[i]];
1703 }
1704 }
1705 }
1706 }
1707
1708 return to;
1709 };
1710
1711
1712 /***/ }),
1713
1714 /***/ "../node_modules/prop-types/checkPropTypes.js":
1715 /*!****************************************************!*\
1716 !*** ../node_modules/prop-types/checkPropTypes.js ***!
1717 \****************************************************/
1718 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1719
1720 "use strict";
1721 /**
1722 * Copyright (c) 2013-present, Facebook, Inc.
1723 *
1724 * This source code is licensed under the MIT license found in the
1725 * LICENSE file in the root directory of this source tree.
1726 */
1727
1728
1729
1730 var printWarning = function() {};
1731
1732 if (true) {
1733 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1734 var loggedTypeFailures = {};
1735 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1736
1737 printWarning = function(text) {
1738 var message = 'Warning: ' + text;
1739 if (typeof console !== 'undefined') {
1740 console.error(message);
1741 }
1742 try {
1743 // --- Welcome to debugging React ---
1744 // This error was thrown as a convenience so that you can use this stack
1745 // to find the callsite that caused this warning to fire.
1746 throw new Error(message);
1747 } catch (x) { /**/ }
1748 };
1749 }
1750
1751 /**
1752 * Assert that the values match with the type specs.
1753 * Error messages are memorized and will only be shown once.
1754 *
1755 * @param {object} typeSpecs Map of name to a ReactPropType
1756 * @param {object} values Runtime values that need to be type-checked
1757 * @param {string} location e.g. "prop", "context", "child context"
1758 * @param {string} componentName Name of the component for error messages.
1759 * @param {?Function} getStack Returns the component stack.
1760 * @private
1761 */
1762 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1763 if (true) {
1764 for (var typeSpecName in typeSpecs) {
1765 if (has(typeSpecs, typeSpecName)) {
1766 var error;
1767 // Prop type validation may throw. In case they do, we don't want to
1768 // fail the render phase where it didn't fail before. So we log it.
1769 // After these have been cleaned up, we'll let them throw.
1770 try {
1771 // This is intentionally an invariant that gets caught. It's the same
1772 // behavior as without this statement except with a better message.
1773 if (typeof typeSpecs[typeSpecName] !== 'function') {
1774 var err = Error(
1775 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1776 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1777 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1778 );
1779 err.name = 'Invariant Violation';
1780 throw err;
1781 }
1782 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1783 } catch (ex) {
1784 error = ex;
1785 }
1786 if (error && !(error instanceof Error)) {
1787 printWarning(
1788 (componentName || 'React class') + ': type specification of ' +
1789 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1790 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1791 'You may have forgotten to pass an argument to the type checker ' +
1792 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1793 'shape all require an argument).'
1794 );
1795 }
1796 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1797 // Only monitor this failure once because there tends to be a lot of the
1798 // same error.
1799 loggedTypeFailures[error.message] = true;
1800
1801 var stack = getStack ? getStack() : '';
1802
1803 printWarning(
1804 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1805 );
1806 }
1807 }
1808 }
1809 }
1810 }
1811
1812 /**
1813 * Resets warning cache when testing.
1814 *
1815 * @private
1816 */
1817 checkPropTypes.resetWarningCache = function() {
1818 if (true) {
1819 loggedTypeFailures = {};
1820 }
1821 }
1822
1823 module.exports = checkPropTypes;
1824
1825
1826 /***/ }),
1827
1828 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
1829 /*!*************************************************************!*\
1830 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
1831 \*************************************************************/
1832 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1833
1834 "use strict";
1835 /**
1836 * Copyright (c) 2013-present, Facebook, Inc.
1837 *
1838 * This source code is licensed under the MIT license found in the
1839 * LICENSE file in the root directory of this source tree.
1840 */
1841
1842
1843
1844 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1845 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
1846
1847 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1848 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1849 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
1850
1851 var printWarning = function() {};
1852
1853 if (true) {
1854 printWarning = function(text) {
1855 var message = 'Warning: ' + text;
1856 if (typeof console !== 'undefined') {
1857 console.error(message);
1858 }
1859 try {
1860 // --- Welcome to debugging React ---
1861 // This error was thrown as a convenience so that you can use this stack
1862 // to find the callsite that caused this warning to fire.
1863 throw new Error(message);
1864 } catch (x) {}
1865 };
1866 }
1867
1868 function emptyFunctionThatReturnsNull() {
1869 return null;
1870 }
1871
1872 module.exports = function(isValidElement, throwOnDirectAccess) {
1873 /* global Symbol */
1874 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1875 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1876
1877 /**
1878 * Returns the iterator method function contained on the iterable object.
1879 *
1880 * Be sure to invoke the function with the iterable as context:
1881 *
1882 * var iteratorFn = getIteratorFn(myIterable);
1883 * if (iteratorFn) {
1884 * var iterator = iteratorFn.call(myIterable);
1885 * ...
1886 * }
1887 *
1888 * @param {?object} maybeIterable
1889 * @return {?function}
1890 */
1891 function getIteratorFn(maybeIterable) {
1892 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1893 if (typeof iteratorFn === 'function') {
1894 return iteratorFn;
1895 }
1896 }
1897
1898 /**
1899 * Collection of methods that allow declaration and validation of props that are
1900 * supplied to React components. Example usage:
1901 *
1902 * var Props = require('ReactPropTypes');
1903 * var MyArticle = React.createClass({
1904 * propTypes: {
1905 * // An optional string prop named "description".
1906 * description: Props.string,
1907 *
1908 * // A required enum prop named "category".
1909 * category: Props.oneOf(['News','Photos']).isRequired,
1910 *
1911 * // A prop named "dialog" that requires an instance of Dialog.
1912 * dialog: Props.instanceOf(Dialog).isRequired
1913 * },
1914 * render: function() { ... }
1915 * });
1916 *
1917 * A more formal specification of how these methods are used:
1918 *
1919 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1920 * decl := ReactPropTypes.{type}(.isRequired)?
1921 *
1922 * Each and every declaration produces a function with the same signature. This
1923 * allows the creation of custom validation functions. For example:
1924 *
1925 * var MyLink = React.createClass({
1926 * propTypes: {
1927 * // An optional string or URI prop named "href".
1928 * href: function(props, propName, componentName) {
1929 * var propValue = props[propName];
1930 * if (propValue != null && typeof propValue !== 'string' &&
1931 * !(propValue instanceof URI)) {
1932 * return new Error(
1933 * 'Expected a string or an URI for ' + propName + ' in ' +
1934 * componentName
1935 * );
1936 * }
1937 * }
1938 * },
1939 * render: function() {...}
1940 * });
1941 *
1942 * @internal
1943 */
1944
1945 var ANONYMOUS = '<<anonymous>>';
1946
1947 // Important!
1948 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1949 var ReactPropTypes = {
1950 array: createPrimitiveTypeChecker('array'),
1951 bigint: createPrimitiveTypeChecker('bigint'),
1952 bool: createPrimitiveTypeChecker('boolean'),
1953 func: createPrimitiveTypeChecker('function'),
1954 number: createPrimitiveTypeChecker('number'),
1955 object: createPrimitiveTypeChecker('object'),
1956 string: createPrimitiveTypeChecker('string'),
1957 symbol: createPrimitiveTypeChecker('symbol'),
1958
1959 any: createAnyTypeChecker(),
1960 arrayOf: createArrayOfTypeChecker,
1961 element: createElementTypeChecker(),
1962 elementType: createElementTypeTypeChecker(),
1963 instanceOf: createInstanceTypeChecker,
1964 node: createNodeChecker(),
1965 objectOf: createObjectOfTypeChecker,
1966 oneOf: createEnumTypeChecker,
1967 oneOfType: createUnionTypeChecker,
1968 shape: createShapeTypeChecker,
1969 exact: createStrictShapeTypeChecker,
1970 };
1971
1972 /**
1973 * inlined Object.is polyfill to avoid requiring consumers ship their own
1974 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1975 */
1976 /*eslint-disable no-self-compare*/
1977 function is(x, y) {
1978 // SameValue algorithm
1979 if (x === y) {
1980 // Steps 1-5, 7-10
1981 // Steps 6.b-6.e: +0 != -0
1982 return x !== 0 || 1 / x === 1 / y;
1983 } else {
1984 // Step 6.a: NaN == NaN
1985 return x !== x && y !== y;
1986 }
1987 }
1988 /*eslint-enable no-self-compare*/
1989
1990 /**
1991 * We use an Error-like object for backward compatibility as people may call
1992 * PropTypes directly and inspect their output. However, we don't use real
1993 * Errors anymore. We don't inspect their stack anyway, and creating them
1994 * is prohibitively expensive if they are created too often, such as what
1995 * happens in oneOfType() for any type before the one that matched.
1996 */
1997 function PropTypeError(message, data) {
1998 this.message = message;
1999 this.data = data && typeof data === 'object' ? data: {};
2000 this.stack = '';
2001 }
2002 // Make `instanceof Error` still work for returned errors.
2003 PropTypeError.prototype = Error.prototype;
2004
2005 function createChainableTypeChecker(validate) {
2006 if (true) {
2007 var manualPropTypeCallCache = {};
2008 var manualPropTypeWarningCount = 0;
2009 }
2010 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
2011 componentName = componentName || ANONYMOUS;
2012 propFullName = propFullName || propName;
2013
2014 if (secret !== ReactPropTypesSecret) {
2015 if (throwOnDirectAccess) {
2016 // New behavior only for users of `prop-types` package
2017 var err = new Error(
2018 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2019 'Use `PropTypes.checkPropTypes()` to call them. ' +
2020 'Read more at http://fb.me/use-check-prop-types'
2021 );
2022 err.name = 'Invariant Violation';
2023 throw err;
2024 } else if ( true && typeof console !== 'undefined') {
2025 // Old behavior for people using React.PropTypes
2026 var cacheKey = componentName + ':' + propName;
2027 if (
2028 !manualPropTypeCallCache[cacheKey] &&
2029 // Avoid spamming the console because they are often not actionable except for lib authors
2030 manualPropTypeWarningCount < 3
2031 ) {
2032 printWarning(
2033 'You are manually calling a React.PropTypes validation ' +
2034 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
2035 'and will throw in the standalone `prop-types` package. ' +
2036 'You may be seeing this warning due to a third-party PropTypes ' +
2037 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
2038 );
2039 manualPropTypeCallCache[cacheKey] = true;
2040 manualPropTypeWarningCount++;
2041 }
2042 }
2043 }
2044 if (props[propName] == null) {
2045 if (isRequired) {
2046 if (props[propName] === null) {
2047 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2048 }
2049 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2050 }
2051 return null;
2052 } else {
2053 return validate(props, propName, componentName, location, propFullName);
2054 }
2055 }
2056
2057 var chainedCheckType = checkType.bind(null, false);
2058 chainedCheckType.isRequired = checkType.bind(null, true);
2059
2060 return chainedCheckType;
2061 }
2062
2063 function createPrimitiveTypeChecker(expectedType) {
2064 function validate(props, propName, componentName, location, propFullName, secret) {
2065 var propValue = props[propName];
2066 var propType = getPropType(propValue);
2067 if (propType !== expectedType) {
2068 // `propValue` being instance of, say, date/regexp, pass the 'object'
2069 // check, but we can offer a more precise error message here rather than
2070 // 'of type `object`'.
2071 var preciseType = getPreciseType(propValue);
2072
2073 return new PropTypeError(
2074 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
2075 {expectedType: expectedType}
2076 );
2077 }
2078 return null;
2079 }
2080 return createChainableTypeChecker(validate);
2081 }
2082
2083 function createAnyTypeChecker() {
2084 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
2085 }
2086
2087 function createArrayOfTypeChecker(typeChecker) {
2088 function validate(props, propName, componentName, location, propFullName) {
2089 if (typeof typeChecker !== 'function') {
2090 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2091 }
2092 var propValue = props[propName];
2093 if (!Array.isArray(propValue)) {
2094 var propType = getPropType(propValue);
2095 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2096 }
2097 for (var i = 0; i < propValue.length; i++) {
2098 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
2099 if (error instanceof Error) {
2100 return error;
2101 }
2102 }
2103 return null;
2104 }
2105 return createChainableTypeChecker(validate);
2106 }
2107
2108 function createElementTypeChecker() {
2109 function validate(props, propName, componentName, location, propFullName) {
2110 var propValue = props[propName];
2111 if (!isValidElement(propValue)) {
2112 var propType = getPropType(propValue);
2113 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2114 }
2115 return null;
2116 }
2117 return createChainableTypeChecker(validate);
2118 }
2119
2120 function createElementTypeTypeChecker() {
2121 function validate(props, propName, componentName, location, propFullName) {
2122 var propValue = props[propName];
2123 if (!ReactIs.isValidElementType(propValue)) {
2124 var propType = getPropType(propValue);
2125 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
2126 }
2127 return null;
2128 }
2129 return createChainableTypeChecker(validate);
2130 }
2131
2132 function createInstanceTypeChecker(expectedClass) {
2133 function validate(props, propName, componentName, location, propFullName) {
2134 if (!(props[propName] instanceof expectedClass)) {
2135 var expectedClassName = expectedClass.name || ANONYMOUS;
2136 var actualClassName = getClassName(props[propName]);
2137 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2138 }
2139 return null;
2140 }
2141 return createChainableTypeChecker(validate);
2142 }
2143
2144 function createEnumTypeChecker(expectedValues) {
2145 if (!Array.isArray(expectedValues)) {
2146 if (true) {
2147 if (arguments.length > 1) {
2148 printWarning(
2149 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
2150 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
2151 );
2152 } else {
2153 printWarning('Invalid argument supplied to oneOf, expected an array.');
2154 }
2155 }
2156 return emptyFunctionThatReturnsNull;
2157 }
2158
2159 function validate(props, propName, componentName, location, propFullName) {
2160 var propValue = props[propName];
2161 for (var i = 0; i < expectedValues.length; i++) {
2162 if (is(propValue, expectedValues[i])) {
2163 return null;
2164 }
2165 }
2166
2167 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
2168 var type = getPreciseType(value);
2169 if (type === 'symbol') {
2170 return String(value);
2171 }
2172 return value;
2173 });
2174 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2175 }
2176 return createChainableTypeChecker(validate);
2177 }
2178
2179 function createObjectOfTypeChecker(typeChecker) {
2180 function validate(props, propName, componentName, location, propFullName) {
2181 if (typeof typeChecker !== 'function') {
2182 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2183 }
2184 var propValue = props[propName];
2185 var propType = getPropType(propValue);
2186 if (propType !== 'object') {
2187 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2188 }
2189 for (var key in propValue) {
2190 if (has(propValue, key)) {
2191 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2192 if (error instanceof Error) {
2193 return error;
2194 }
2195 }
2196 }
2197 return null;
2198 }
2199 return createChainableTypeChecker(validate);
2200 }
2201
2202 function createUnionTypeChecker(arrayOfTypeCheckers) {
2203 if (!Array.isArray(arrayOfTypeCheckers)) {
2204 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
2205 return emptyFunctionThatReturnsNull;
2206 }
2207
2208 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2209 var checker = arrayOfTypeCheckers[i];
2210 if (typeof checker !== 'function') {
2211 printWarning(
2212 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
2213 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
2214 );
2215 return emptyFunctionThatReturnsNull;
2216 }
2217 }
2218
2219 function validate(props, propName, componentName, location, propFullName) {
2220 var expectedTypes = [];
2221 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2222 var checker = arrayOfTypeCheckers[i];
2223 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
2224 if (checkerResult == null) {
2225 return null;
2226 }
2227 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
2228 expectedTypes.push(checkerResult.data.expectedType);
2229 }
2230 }
2231 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
2232 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
2233 }
2234 return createChainableTypeChecker(validate);
2235 }
2236
2237 function createNodeChecker() {
2238 function validate(props, propName, componentName, location, propFullName) {
2239 if (!isNode(props[propName])) {
2240 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2241 }
2242 return null;
2243 }
2244 return createChainableTypeChecker(validate);
2245 }
2246
2247 function invalidValidatorError(componentName, location, propFullName, key, type) {
2248 return new PropTypeError(
2249 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
2250 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
2251 );
2252 }
2253
2254 function createShapeTypeChecker(shapeTypes) {
2255 function validate(props, propName, componentName, location, propFullName) {
2256 var propValue = props[propName];
2257 var propType = getPropType(propValue);
2258 if (propType !== 'object') {
2259 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2260 }
2261 for (var key in shapeTypes) {
2262 var checker = shapeTypes[key];
2263 if (typeof checker !== 'function') {
2264 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2265 }
2266 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2267 if (error) {
2268 return error;
2269 }
2270 }
2271 return null;
2272 }
2273 return createChainableTypeChecker(validate);
2274 }
2275
2276 function createStrictShapeTypeChecker(shapeTypes) {
2277 function validate(props, propName, componentName, location, propFullName) {
2278 var propValue = props[propName];
2279 var propType = getPropType(propValue);
2280 if (propType !== 'object') {
2281 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2282 }
2283 // We need to check all keys in case some are required but missing from props.
2284 var allKeys = assign({}, props[propName], shapeTypes);
2285 for (var key in allKeys) {
2286 var checker = shapeTypes[key];
2287 if (has(shapeTypes, key) && typeof checker !== 'function') {
2288 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2289 }
2290 if (!checker) {
2291 return new PropTypeError(
2292 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
2293 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
2294 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
2295 );
2296 }
2297 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2298 if (error) {
2299 return error;
2300 }
2301 }
2302 return null;
2303 }
2304
2305 return createChainableTypeChecker(validate);
2306 }
2307
2308 function isNode(propValue) {
2309 switch (typeof propValue) {
2310 case 'number':
2311 case 'string':
2312 case 'undefined':
2313 return true;
2314 case 'boolean':
2315 return !propValue;
2316 case 'object':
2317 if (Array.isArray(propValue)) {
2318 return propValue.every(isNode);
2319 }
2320 if (propValue === null || isValidElement(propValue)) {
2321 return true;
2322 }
2323
2324 var iteratorFn = getIteratorFn(propValue);
2325 if (iteratorFn) {
2326 var iterator = iteratorFn.call(propValue);
2327 var step;
2328 if (iteratorFn !== propValue.entries) {
2329 while (!(step = iterator.next()).done) {
2330 if (!isNode(step.value)) {
2331 return false;
2332 }
2333 }
2334 } else {
2335 // Iterator will provide entry [k,v] tuples rather than values.
2336 while (!(step = iterator.next()).done) {
2337 var entry = step.value;
2338 if (entry) {
2339 if (!isNode(entry[1])) {
2340 return false;
2341 }
2342 }
2343 }
2344 }
2345 } else {
2346 return false;
2347 }
2348
2349 return true;
2350 default:
2351 return false;
2352 }
2353 }
2354
2355 function isSymbol(propType, propValue) {
2356 // Native Symbol.
2357 if (propType === 'symbol') {
2358 return true;
2359 }
2360
2361 // falsy value can't be a Symbol
2362 if (!propValue) {
2363 return false;
2364 }
2365
2366 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2367 if (propValue['@@toStringTag'] === 'Symbol') {
2368 return true;
2369 }
2370
2371 // Fallback for non-spec compliant Symbols which are polyfilled.
2372 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2373 return true;
2374 }
2375
2376 return false;
2377 }
2378
2379 // Equivalent of `typeof` but with special handling for array and regexp.
2380 function getPropType(propValue) {
2381 var propType = typeof propValue;
2382 if (Array.isArray(propValue)) {
2383 return 'array';
2384 }
2385 if (propValue instanceof RegExp) {
2386 // Old webkits (at least until Android 4.0) return 'function' rather than
2387 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2388 // passes PropTypes.object.
2389 return 'object';
2390 }
2391 if (isSymbol(propType, propValue)) {
2392 return 'symbol';
2393 }
2394 return propType;
2395 }
2396
2397 // This handles more types than `getPropType`. Only used for error messages.
2398 // See `createPrimitiveTypeChecker`.
2399 function getPreciseType(propValue) {
2400 if (typeof propValue === 'undefined' || propValue === null) {
2401 return '' + propValue;
2402 }
2403 var propType = getPropType(propValue);
2404 if (propType === 'object') {
2405 if (propValue instanceof Date) {
2406 return 'date';
2407 } else if (propValue instanceof RegExp) {
2408 return 'regexp';
2409 }
2410 }
2411 return propType;
2412 }
2413
2414 // Returns a string that is postfixed to a warning about an invalid type.
2415 // For example, "undefined" or "of type array"
2416 function getPostfixForTypeWarning(value) {
2417 var type = getPreciseType(value);
2418 switch (type) {
2419 case 'array':
2420 case 'object':
2421 return 'an ' + type;
2422 case 'boolean':
2423 case 'date':
2424 case 'regexp':
2425 return 'a ' + type;
2426 default:
2427 return type;
2428 }
2429 }
2430
2431 // Returns class name of the object, if any.
2432 function getClassName(propValue) {
2433 if (!propValue.constructor || !propValue.constructor.name) {
2434 return ANONYMOUS;
2435 }
2436 return propValue.constructor.name;
2437 }
2438
2439 ReactPropTypes.checkPropTypes = checkPropTypes;
2440 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
2441 ReactPropTypes.PropTypes = ReactPropTypes;
2442
2443 return ReactPropTypes;
2444 };
2445
2446
2447 /***/ }),
2448
2449 /***/ "../node_modules/prop-types/index.js":
2450 /*!*******************************************!*\
2451 !*** ../node_modules/prop-types/index.js ***!
2452 \*******************************************/
2453 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2454
2455 /**
2456 * Copyright (c) 2013-present, Facebook, Inc.
2457 *
2458 * This source code is licensed under the MIT license found in the
2459 * LICENSE file in the root directory of this source tree.
2460 */
2461
2462 if (true) {
2463 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
2464
2465 // By explicitly using `prop-types` you are opting into new development behavior.
2466 // http://fb.me/prop-types-in-prod
2467 var throwOnDirectAccess = true;
2468 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
2469 } else {}
2470
2471
2472 /***/ }),
2473
2474 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
2475 /*!**************************************************************!*\
2476 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
2477 \**************************************************************/
2478 /***/ ((module) => {
2479
2480 "use strict";
2481 /**
2482 * Copyright (c) 2013-present, Facebook, Inc.
2483 *
2484 * This source code is licensed under the MIT license found in the
2485 * LICENSE file in the root directory of this source tree.
2486 */
2487
2488
2489
2490 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2491
2492 module.exports = ReactPropTypesSecret;
2493
2494
2495 /***/ }),
2496
2497 /***/ "../node_modules/prop-types/lib/has.js":
2498 /*!*********************************************!*\
2499 !*** ../node_modules/prop-types/lib/has.js ***!
2500 \*********************************************/
2501 /***/ ((module) => {
2502
2503 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
2504
2505
2506 /***/ }),
2507
2508 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
2509 /*!************************************************************************************!*\
2510 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
2511 \************************************************************************************/
2512 /***/ ((__unused_webpack_module, exports) => {
2513
2514 "use strict";
2515 /** @license React v16.13.1
2516 * react-is.development.js
2517 *
2518 * Copyright (c) Facebook, Inc. and its affiliates.
2519 *
2520 * This source code is licensed under the MIT license found in the
2521 * LICENSE file in the root directory of this source tree.
2522 */
2523
2524
2525
2526
2527
2528 if (true) {
2529 (function() {
2530 'use strict';
2531
2532 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
2533 // nor polyfill, then a plain number is used for performance.
2534 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
2535 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
2536 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
2537 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
2538 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
2539 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
2540 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
2541 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
2542 // (unstable) APIs that have been removed. Can we remove the symbols?
2543
2544 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
2545 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
2546 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
2547 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
2548 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
2549 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
2550 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
2551 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
2552 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
2553 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
2554 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
2555
2556 function isValidElementType(type) {
2557 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2558 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
2559 }
2560
2561 function typeOf(object) {
2562 if (typeof object === 'object' && object !== null) {
2563 var $$typeof = object.$$typeof;
2564
2565 switch ($$typeof) {
2566 case REACT_ELEMENT_TYPE:
2567 var type = object.type;
2568
2569 switch (type) {
2570 case REACT_ASYNC_MODE_TYPE:
2571 case REACT_CONCURRENT_MODE_TYPE:
2572 case REACT_FRAGMENT_TYPE:
2573 case REACT_PROFILER_TYPE:
2574 case REACT_STRICT_MODE_TYPE:
2575 case REACT_SUSPENSE_TYPE:
2576 return type;
2577
2578 default:
2579 var $$typeofType = type && type.$$typeof;
2580
2581 switch ($$typeofType) {
2582 case REACT_CONTEXT_TYPE:
2583 case REACT_FORWARD_REF_TYPE:
2584 case REACT_LAZY_TYPE:
2585 case REACT_MEMO_TYPE:
2586 case REACT_PROVIDER_TYPE:
2587 return $$typeofType;
2588
2589 default:
2590 return $$typeof;
2591 }
2592
2593 }
2594
2595 case REACT_PORTAL_TYPE:
2596 return $$typeof;
2597 }
2598 }
2599
2600 return undefined;
2601 } // AsyncMode is deprecated along with isAsyncMode
2602
2603 var AsyncMode = REACT_ASYNC_MODE_TYPE;
2604 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
2605 var ContextConsumer = REACT_CONTEXT_TYPE;
2606 var ContextProvider = REACT_PROVIDER_TYPE;
2607 var Element = REACT_ELEMENT_TYPE;
2608 var ForwardRef = REACT_FORWARD_REF_TYPE;
2609 var Fragment = REACT_FRAGMENT_TYPE;
2610 var Lazy = REACT_LAZY_TYPE;
2611 var Memo = REACT_MEMO_TYPE;
2612 var Portal = REACT_PORTAL_TYPE;
2613 var Profiler = REACT_PROFILER_TYPE;
2614 var StrictMode = REACT_STRICT_MODE_TYPE;
2615 var Suspense = REACT_SUSPENSE_TYPE;
2616 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
2617
2618 function isAsyncMode(object) {
2619 {
2620 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
2621 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
2622
2623 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
2624 }
2625 }
2626
2627 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
2628 }
2629 function isConcurrentMode(object) {
2630 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
2631 }
2632 function isContextConsumer(object) {
2633 return typeOf(object) === REACT_CONTEXT_TYPE;
2634 }
2635 function isContextProvider(object) {
2636 return typeOf(object) === REACT_PROVIDER_TYPE;
2637 }
2638 function isElement(object) {
2639 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2640 }
2641 function isForwardRef(object) {
2642 return typeOf(object) === REACT_FORWARD_REF_TYPE;
2643 }
2644 function isFragment(object) {
2645 return typeOf(object) === REACT_FRAGMENT_TYPE;
2646 }
2647 function isLazy(object) {
2648 return typeOf(object) === REACT_LAZY_TYPE;
2649 }
2650 function isMemo(object) {
2651 return typeOf(object) === REACT_MEMO_TYPE;
2652 }
2653 function isPortal(object) {
2654 return typeOf(object) === REACT_PORTAL_TYPE;
2655 }
2656 function isProfiler(object) {
2657 return typeOf(object) === REACT_PROFILER_TYPE;
2658 }
2659 function isStrictMode(object) {
2660 return typeOf(object) === REACT_STRICT_MODE_TYPE;
2661 }
2662 function isSuspense(object) {
2663 return typeOf(object) === REACT_SUSPENSE_TYPE;
2664 }
2665
2666 exports.AsyncMode = AsyncMode;
2667 exports.ConcurrentMode = ConcurrentMode;
2668 exports.ContextConsumer = ContextConsumer;
2669 exports.ContextProvider = ContextProvider;
2670 exports.Element = Element;
2671 exports.ForwardRef = ForwardRef;
2672 exports.Fragment = Fragment;
2673 exports.Lazy = Lazy;
2674 exports.Memo = Memo;
2675 exports.Portal = Portal;
2676 exports.Profiler = Profiler;
2677 exports.StrictMode = StrictMode;
2678 exports.Suspense = Suspense;
2679 exports.isAsyncMode = isAsyncMode;
2680 exports.isConcurrentMode = isConcurrentMode;
2681 exports.isContextConsumer = isContextConsumer;
2682 exports.isContextProvider = isContextProvider;
2683 exports.isElement = isElement;
2684 exports.isForwardRef = isForwardRef;
2685 exports.isFragment = isFragment;
2686 exports.isLazy = isLazy;
2687 exports.isMemo = isMemo;
2688 exports.isPortal = isPortal;
2689 exports.isProfiler = isProfiler;
2690 exports.isStrictMode = isStrictMode;
2691 exports.isSuspense = isSuspense;
2692 exports.isValidElementType = isValidElementType;
2693 exports.typeOf = typeOf;
2694 })();
2695 }
2696
2697
2698 /***/ }),
2699
2700 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
2701 /*!*****************************************************************!*\
2702 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
2703 \*****************************************************************/
2704 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2705
2706 "use strict";
2707
2708
2709 if (false) {} else {
2710 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
2711 }
2712
2713
2714 /***/ }),
2715
2716 /***/ "../node_modules/react-dom/client.js":
2717 /*!*******************************************!*\
2718 !*** ../node_modules/react-dom/client.js ***!
2719 \*******************************************/
2720 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2721
2722 "use strict";
2723
2724
2725 var m = __webpack_require__(/*! react-dom */ "react-dom");
2726 if (false) {} else {
2727 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2728 exports.createRoot = function(c, o) {
2729 i.usingClientEntryPoint = true;
2730 try {
2731 return m.createRoot(c, o);
2732 } finally {
2733 i.usingClientEntryPoint = false;
2734 }
2735 };
2736 exports.hydrateRoot = function(c, h, o) {
2737 i.usingClientEntryPoint = true;
2738 try {
2739 return m.hydrateRoot(c, h, o);
2740 } finally {
2741 i.usingClientEntryPoint = false;
2742 }
2743 };
2744 }
2745
2746
2747 /***/ }),
2748
2749 /***/ "react":
2750 /*!************************!*\
2751 !*** external "React" ***!
2752 \************************/
2753 /***/ ((module) => {
2754
2755 "use strict";
2756 module.exports = React;
2757
2758 /***/ }),
2759
2760 /***/ "react-dom":
2761 /*!***************************!*\
2762 !*** external "ReactDOM" ***!
2763 \***************************/
2764 /***/ ((module) => {
2765
2766 "use strict";
2767 module.exports = ReactDOM;
2768
2769 /***/ }),
2770
2771 /***/ "@elementor/ui":
2772 /*!*********************************!*\
2773 !*** external "elementorV2.ui" ***!
2774 \*********************************/
2775 /***/ ((module) => {
2776
2777 "use strict";
2778 module.exports = elementorV2.ui;
2779
2780 /***/ }),
2781
2782 /***/ "@wordpress/i18n":
2783 /*!**************************!*\
2784 !*** external "wp.i18n" ***!
2785 \**************************/
2786 /***/ ((module) => {
2787
2788 "use strict";
2789 module.exports = wp.i18n;
2790
2791 /***/ }),
2792
2793 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
2794 /*!******************************************************************!*\
2795 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
2796 \******************************************************************/
2797 /***/ ((module) => {
2798
2799 function _arrayLikeToArray(r, a) {
2800 (null == a || a > r.length) && (a = r.length);
2801 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
2802 return n;
2803 }
2804 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2805
2806 /***/ }),
2807
2808 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
2809 /*!****************************************************************!*\
2810 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
2811 \****************************************************************/
2812 /***/ ((module) => {
2813
2814 function _arrayWithHoles(r) {
2815 if (Array.isArray(r)) return r;
2816 }
2817 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
2818
2819 /***/ }),
2820
2821 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
2822 /*!***********************************************************************!*\
2823 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
2824 \***********************************************************************/
2825 /***/ ((module) => {
2826
2827 function _assertThisInitialized(e) {
2828 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2829 return e;
2830 }
2831 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
2832
2833 /***/ }),
2834
2835 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
2836 /*!****************************************************************!*\
2837 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
2838 \****************************************************************/
2839 /***/ ((module) => {
2840
2841 function _classCallCheck(a, n) {
2842 if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
2843 }
2844 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
2845
2846 /***/ }),
2847
2848 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
2849 /*!*************************************************************!*\
2850 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
2851 \*************************************************************/
2852 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2853
2854 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
2855 function _defineProperties(e, r) {
2856 for (var t = 0; t < r.length; t++) {
2857 var o = r[t];
2858 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
2859 }
2860 }
2861 function _createClass(e, r, t) {
2862 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
2863 writable: !1
2864 }), e;
2865 }
2866 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
2867
2868 /***/ }),
2869
2870 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
2871 /*!****************************************************************!*\
2872 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
2873 \****************************************************************/
2874 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2875
2876 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
2877 function _defineProperty(e, r, t) {
2878 return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
2879 value: t,
2880 enumerable: !0,
2881 configurable: !0,
2882 writable: !0
2883 }) : e[r] = t, e;
2884 }
2885 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
2886
2887 /***/ }),
2888
2889 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
2890 /*!****************************************************************!*\
2891 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
2892 \****************************************************************/
2893 /***/ ((module) => {
2894
2895 function _getPrototypeOf(t) {
2896 return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
2897 return t.__proto__ || Object.getPrototypeOf(t);
2898 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
2899 }
2900 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
2901
2902 /***/ }),
2903
2904 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
2905 /*!**********************************************************!*\
2906 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
2907 \**********************************************************/
2908 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2909
2910 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2911 function _inherits(t, e) {
2912 if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
2913 t.prototype = Object.create(e && e.prototype, {
2914 constructor: {
2915 value: t,
2916 writable: !0,
2917 configurable: !0
2918 }
2919 }), Object.defineProperty(t, "prototype", {
2920 writable: !1
2921 }), e && setPrototypeOf(t, e);
2922 }
2923 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
2924
2925 /***/ }),
2926
2927 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
2928 /*!***********************************************************************!*\
2929 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
2930 \***********************************************************************/
2931 /***/ ((module) => {
2932
2933 function _interopRequireDefault(e) {
2934 return e && e.__esModule ? e : {
2935 "default": e
2936 };
2937 }
2938 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
2939
2940 /***/ }),
2941
2942 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
2943 /*!**********************************************************************!*\
2944 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
2945 \**********************************************************************/
2946 /***/ ((module) => {
2947
2948 function _iterableToArrayLimit(r, l) {
2949 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
2950 if (null != t) {
2951 var e,
2952 n,
2953 i,
2954 u,
2955 a = [],
2956 f = !0,
2957 o = !1;
2958 try {
2959 if (i = (t = t.call(r)).next, 0 === l) {
2960 if (Object(t) !== t) return;
2961 f = !1;
2962 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
2963 } catch (r) {
2964 o = !0, n = r;
2965 } finally {
2966 try {
2967 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
2968 } finally {
2969 if (o) throw n;
2970 }
2971 }
2972 return a;
2973 }
2974 }
2975 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
2976
2977 /***/ }),
2978
2979 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
2980 /*!*****************************************************************!*\
2981 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
2982 \*****************************************************************/
2983 /***/ ((module) => {
2984
2985 function _nonIterableRest() {
2986 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2987 }
2988 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
2989
2990 /***/ }),
2991
2992 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
2993 /*!***************************************************************************!*\
2994 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
2995 \***************************************************************************/
2996 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2997
2998 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2999 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
3000 function _possibleConstructorReturn(t, e) {
3001 if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
3002 if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
3003 return assertThisInitialized(t);
3004 }
3005 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
3006
3007 /***/ }),
3008
3009 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
3010 /*!****************************************************************!*\
3011 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
3012 \****************************************************************/
3013 /***/ ((module) => {
3014
3015 function _setPrototypeOf(t, e) {
3016 return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
3017 return t.__proto__ = e, t;
3018 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
3019 }
3020 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
3021
3022 /***/ }),
3023
3024 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
3025 /*!***************************************************************!*\
3026 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
3027 \***************************************************************/
3028 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3029
3030 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
3031 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
3032 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3033 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
3034 function _slicedToArray(r, e) {
3035 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
3036 }
3037 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3038
3039 /***/ }),
3040
3041 /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
3042 /*!*************************************************************!*\
3043 !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
3044 \*************************************************************/
3045 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3046
3047 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
3048 function toPrimitive(t, r) {
3049 if ("object" != _typeof(t) || !t) return t;
3050 var e = t[Symbol.toPrimitive];
3051 if (void 0 !== e) {
3052 var i = e.call(t, r || "default");
3053 if ("object" != _typeof(i)) return i;
3054 throw new TypeError("@@toPrimitive must return a primitive value.");
3055 }
3056 return ("string" === r ? String : Number)(t);
3057 }
3058 module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
3059
3060 /***/ }),
3061
3062 /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
3063 /*!***************************************************************!*\
3064 !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
3065 \***************************************************************/
3066 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3067
3068 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
3069 var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
3070 function toPropertyKey(t) {
3071 var i = toPrimitive(t, "string");
3072 return "symbol" == _typeof(i) ? i : i + "";
3073 }
3074 module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
3075
3076 /***/ }),
3077
3078 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
3079 /*!********************************************************!*\
3080 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
3081 \********************************************************/
3082 /***/ ((module) => {
3083
3084 function _typeof(o) {
3085 "@babel/helpers - typeof";
3086
3087 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3088 return typeof o;
3089 } : function (o) {
3090 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3091 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
3092 }
3093 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3094
3095 /***/ }),
3096
3097 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
3098 /*!****************************************************************************!*\
3099 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
3100 \****************************************************************************/
3101 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3102
3103 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
3104 function _unsupportedIterableToArray(r, a) {
3105 if (r) {
3106 if ("string" == typeof r) return arrayLikeToArray(r, a);
3107 var t = {}.toString.call(r).slice(8, -1);
3108 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;
3109 }
3110 }
3111 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3112
3113 /***/ })
3114
3115 /******/ });
3116 /************************************************************************/
3117 /******/ // The module cache
3118 /******/ var __webpack_module_cache__ = {};
3119 /******/
3120 /******/ // The require function
3121 /******/ function __webpack_require__(moduleId) {
3122 /******/ // Check if module is in cache
3123 /******/ var cachedModule = __webpack_module_cache__[moduleId];
3124 /******/ if (cachedModule !== undefined) {
3125 /******/ return cachedModule.exports;
3126 /******/ }
3127 /******/ // Create a new module (and put it into the cache)
3128 /******/ var module = __webpack_module_cache__[moduleId] = {
3129 /******/ // no module.id needed
3130 /******/ // no module.loaded needed
3131 /******/ exports: {}
3132 /******/ };
3133 /******/
3134 /******/ // Execute the module function
3135 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3136 /******/
3137 /******/ // Return the exports of the module
3138 /******/ return module.exports;
3139 /******/ }
3140 /******/
3141 /************************************************************************/
3142 var __webpack_exports__ = {};
3143 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
3144 (() => {
3145 "use strict";
3146 /*!******************************************************!*\
3147 !*** ../modules/promotions/assets/js/react/index.js ***!
3148 \******************************************************/
3149
3150
3151 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3152 var _module = _interopRequireDefault(__webpack_require__(/*! ./module.js */ "../modules/promotions/assets/js/react/module.js"));
3153 new _module.default();
3154 })();
3155
3156 /******/ })()
3157 ;
3158 //# sourceMappingURL=e-react-promotions.js.map