PluginProbe
Elementor Website Builder – more than just a page builder / 4.1.0-beta3
Elementor Website Builder – more than just a page builder v4.1.0-beta3
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 4.1.0-beta2 All 456 releases
← All changes | assets/js/packages/editor-notifications/editor-notifications.js +2 -2364 4.2.0-dev2 → 4.1.0-beta3 View file →
@@ -1,2365 +1,3 @@
1 -/******/ (function() { // webpackBootstrap
2 -/******/ "use strict";
3 -/******/ var __webpack_modules__ = ({
4 -
5 -/***/ "./node_modules/goober/dist/goober.modern.js":
6 -/*!***************************************************!*\
7 - !*** ./node_modules/goober/dist/goober.modern.js ***!
8 - \***************************************************/
9 -/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
10 -
11 -__webpack_require__.r(__webpack_exports__);
12 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 -/* harmony export */ css: function() { return /* binding */ u; },
14 -/* harmony export */ extractCss: function() { return /* binding */ r; },
15 -/* harmony export */ glob: function() { return /* binding */ b; },
16 -/* harmony export */ keyframes: function() { return /* binding */ h; },
17 -/* harmony export */ setup: function() { return /* binding */ m; },
18 -/* harmony export */ styled: function() { return /* binding */ w; }
19 -/* harmony export */ });
20 -let e={data:""},t=t=>{if("object"==typeof window){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||e},r=e=>{let r=t(e),l=r.data;return r.data="",l},l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";")}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d)}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g,b=u.bind({g:1}),h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l}function w(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
21 -
22 -
23 -/***/ }),
24 -
25 -/***/ "./node_modules/notistack/node_modules/clsx/dist/clsx.m.js":
26 -/*!*****************************************************************!*\
27 - !*** ./node_modules/notistack/node_modules/clsx/dist/clsx.m.js ***!
28 - \*****************************************************************/
29 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
30 -
31 -__webpack_require__.r(__webpack_exports__);
32 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33 -/* harmony export */ clsx: function() { return /* binding */ clsx; }
34 -/* harmony export */ });
35 -function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ __webpack_exports__["default"] = (clsx);
36 -
37 -/***/ }),
38 -
39 -/***/ "./node_modules/notistack/notistack.esm.js":
40 -/*!*************************************************!*\
41 - !*** ./node_modules/notistack/notistack.esm.js ***!
42 - \*************************************************/
43 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
44 -
45 -__webpack_require__.r(__webpack_exports__);
46 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
47 -/* harmony export */ MaterialDesignContent: function() { return /* binding */ MaterialDesignContent$1; },
48 -/* harmony export */ SnackbarContent: function() { return /* binding */ SnackbarContent; },
49 -/* harmony export */ SnackbarProvider: function() { return /* binding */ SnackbarProvider; },
50 -/* harmony export */ Transition: function() { return /* binding */ Transition; },
51 -/* harmony export */ closeSnackbar: function() { return /* binding */ closeSnackbar; },
52 -/* harmony export */ enqueueSnackbar: function() { return /* binding */ enqueueSnackbar; },
53 -/* harmony export */ useSnackbar: function() { return /* binding */ useSnackbar; }
54 -/* harmony export */ });
55 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
56 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
57 -/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom");
58 -/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
59 -/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ "./node_modules/notistack/node_modules/clsx/dist/clsx.m.js");
60 -/* harmony import */ var goober__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! goober */ "./node_modules/goober/dist/goober.modern.js");
61 -
62 -
63 -
64 -
65 -
66 -function _defineProperties(target, props) {
67 - for (var i = 0; i < props.length; i++) {
68 - var descriptor = props[i];
69 - descriptor.enumerable = descriptor.enumerable || false;
70 - descriptor.configurable = true;
71 - if ("value" in descriptor) descriptor.writable = true;
72 - Object.defineProperty(target, descriptor.key, descriptor);
73 - }
74 -}
75 -
76 -function _createClass(Constructor, protoProps, staticProps) {
77 - if (protoProps) _defineProperties(Constructor.prototype, protoProps);
78 - if (staticProps) _defineProperties(Constructor, staticProps);
79 - return Constructor;
80 -}
81 -
82 -function _extends() {
83 - _extends = Object.assign || function (target) {
84 - for (var i = 1; i < arguments.length; i++) {
85 - var source = arguments[i];
86 -
87 - for (var key in source) {
88 - if (Object.prototype.hasOwnProperty.call(source, key)) {
89 - target[key] = source[key];
90 - }
91 - }
92 - }
93 -
94 - return target;
95 - };
96 -
97 - return _extends.apply(this, arguments);
98 -}
99 -
100 -function _inheritsLoose(subClass, superClass) {
101 - subClass.prototype = Object.create(superClass.prototype);
102 - subClass.prototype.constructor = subClass;
103 - subClass.__proto__ = superClass;
104 -}
105 -
106 -function _objectWithoutPropertiesLoose(source, excluded) {
107 - if (source == null) return {};
108 - var target = {};
109 - var sourceKeys = Object.keys(source);
110 - var key, i;
111 -
112 - for (i = 0; i < sourceKeys.length; i++) {
113 - key = sourceKeys[i];
114 - if (excluded.indexOf(key) >= 0) continue;
115 - target[key] = source[key];
116 - }
117 -
118 - return target;
119 -}
120 -
121 -function _assertThisInitialized(self) {
122 - if (self === void 0) {
123 - throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
124 - }
125 -
126 - return self;
127 -}
128 -
129 -var noOp = function noOp() {
130 - return '';
131 -};
132 -
133 -var SnackbarContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({
134 - enqueueSnackbar: noOp,
135 - closeSnackbar: noOp
136 -});
137 -
138 -var breakpoints = {
139 - downXs: '@media (max-width:599.95px)',
140 - upSm: '@media (min-width:600px)'
141 -};
142 -
143 -var capitalise = function capitalise(text) {
144 - return text.charAt(0).toUpperCase() + text.slice(1);
145 -};
146 -
147 -var originKeyExtractor = function originKeyExtractor(anchor) {
148 - return "" + capitalise(anchor.vertical) + capitalise(anchor.horizontal);
149 -};
150 -var isDefined = function isDefined(value) {
151 - return !!value || value === 0;
152 -};
153 -
154 -var UNMOUNTED = 'unmounted';
155 -var EXITED = 'exited';
156 -var ENTERING = 'entering';
157 -var ENTERED = 'entered';
158 -var EXITING = 'exiting';
159 -
160 -var Transition = /*#__PURE__*/function (_React$Component) {
161 - _inheritsLoose(Transition, _React$Component);
162 -
163 - function Transition(props) {
164 - var _this;
165 -
166 - _this = _React$Component.call(this, props) || this;
167 - var appear = props.appear;
168 - var initialStatus;
169 - _this.appearStatus = null;
170 -
171 - if (props["in"]) {
172 - if (appear) {
173 - initialStatus = EXITED;
174 - _this.appearStatus = ENTERING;
175 - } else {
176 - initialStatus = ENTERED;
177 - }
178 - } else if (props.unmountOnExit || props.mountOnEnter) {
179 - initialStatus = UNMOUNTED;
180 - } else {
181 - initialStatus = EXITED;
182 - }
183 -
184 - _this.state = {
185 - status: initialStatus
186 - };
187 - _this.nextCallback = null;
188 - return _this;
189 - }
190 -
191 - Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
192 - var nextIn = _ref["in"];
193 -
194 - if (nextIn && prevState.status === UNMOUNTED) {
195 - return {
196 - status: EXITED
197 - };
198 - }
199 -
200 - return null;
201 - };
202 -
203 - var _proto = Transition.prototype;
204 -
205 - _proto.componentDidMount = function componentDidMount() {
206 - this.updateStatus(true, this.appearStatus);
207 - };
208 -
209 - _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
210 - var nextStatus = null;
211 -
212 - if (prevProps !== this.props) {
213 - var status = this.state.status;
214 -
215 - if (this.props["in"]) {
216 - if (status !== ENTERING && status !== ENTERED) {
217 - nextStatus = ENTERING;
218 - }
219 - } else if (status === ENTERING || status === ENTERED) {
220 - nextStatus = EXITING;
221 - }
222 - }
223 -
224 - this.updateStatus(false, nextStatus);
225 - };
226 -
227 - _proto.componentWillUnmount = function componentWillUnmount() {
228 - this.cancelNextCallback();
229 - };
230 -
231 - _proto.getTimeouts = function getTimeouts() {
232 - var timeout = this.props.timeout;
233 - var enter = timeout;
234 - var exit = timeout;
235 -
236 - if (timeout != null && typeof timeout !== 'number' && typeof timeout !== 'string') {
237 - exit = timeout.exit;
238 - enter = timeout.enter;
239 - }
240 -
241 - return {
242 - exit: exit,
243 - enter: enter
244 - };
245 - };
246 -
247 - _proto.updateStatus = function updateStatus(mounting, nextStatus) {
248 - if (mounting === void 0) {
249 - mounting = false;
250 - }
251 -
252 - if (nextStatus !== null) {
253 - this.cancelNextCallback();
254 -
255 - if (nextStatus === ENTERING) {
256 - this.performEnter(mounting);
257 - } else {
258 - this.performExit();
259 - }
260 - } else if (this.props.unmountOnExit && this.state.status === EXITED) {
261 - this.setState({
262 - status: UNMOUNTED
263 - });
264 - }
265 - };
266 -
267 - _proto.performEnter = function performEnter(mounting) {
268 - var _this2 = this;
269 -
270 - var enter = this.props.enter;
271 - var isAppearing = mounting;
272 - var timeouts = this.getTimeouts();
273 -
274 - if (!mounting && !enter) {
275 - this.safeSetState({
276 - status: ENTERED
277 - }, function () {
278 - if (_this2.props.onEntered) {
279 - _this2.props.onEntered(_this2.node, isAppearing);
280 - }
281 - });
282 - return;
283 - }
284 -
285 - if (this.props.onEnter) {
286 - this.props.onEnter(this.node, isAppearing);
287 - }
288 -
289 - this.safeSetState({
290 - status: ENTERING
291 - }, function () {
292 - if (_this2.props.onEntering) {
293 - _this2.props.onEntering(_this2.node, isAppearing);
294 - }
295 -
296 - _this2.onTransitionEnd(timeouts.enter, function () {
297 - _this2.safeSetState({
298 - status: ENTERED
299 - }, function () {
300 - if (_this2.props.onEntered) {
301 - _this2.props.onEntered(_this2.node, isAppearing);
302 - }
303 - });
304 - });
305 - });
306 - };
307 -
308 - _proto.performExit = function performExit() {
309 - var _this3 = this;
310 -
311 - var exit = this.props.exit;
312 - var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
313 -
314 - if (!exit) {
315 - this.safeSetState({
316 - status: EXITED
317 - }, function () {
318 - if (_this3.props.onExited) {
319 - _this3.props.onExited(_this3.node);
320 - }
321 - });
322 - return;
323 - }
324 -
325 - if (this.props.onExit) {
326 - this.props.onExit(this.node);
327 - }
328 -
329 - this.safeSetState({
330 - status: EXITING
331 - }, function () {
332 - if (_this3.props.onExiting) {
333 - _this3.props.onExiting(_this3.node);
334 - }
335 -
336 - _this3.onTransitionEnd(timeouts.exit, function () {
337 - _this3.safeSetState({
338 - status: EXITED
339 - }, function () {
340 - if (_this3.props.onExited) {
341 - _this3.props.onExited(_this3.node);
342 - }
343 - });
344 - });
345 - });
346 - };
347 -
348 - _proto.cancelNextCallback = function cancelNextCallback() {
349 - if (this.nextCallback !== null && this.nextCallback.cancel) {
350 - this.nextCallback.cancel();
351 - this.nextCallback = null;
352 - }
353 - };
354 -
355 - _proto.safeSetState = function safeSetState(nextState, callback) {
356 - callback = this.setNextCallback(callback);
357 - this.setState(nextState, callback);
358 - };
359 -
360 - _proto.setNextCallback = function setNextCallback(callback) {
361 - var _this4 = this;
362 -
363 - var active = true;
364 -
365 - this.nextCallback = function () {
366 - if (active) {
367 - active = false;
368 - _this4.nextCallback = null;
369 - callback();
370 - }
371 - };
372 -
373 - this.nextCallback.cancel = function () {
374 - active = false;
375 - };
376 -
377 - return this.nextCallback;
378 - };
379 -
380 - _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
381 - this.setNextCallback(handler);
382 - var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
383 -
384 - if (!this.node || doesNotHaveTimeoutOrListener) {
385 - setTimeout(this.nextCallback, 0);
386 - return;
387 - }
388 -
389 - if (this.props.addEndListener) {
390 - this.props.addEndListener(this.node, this.nextCallback);
391 - }
392 -
393 - if (timeout != null) {
394 - setTimeout(this.nextCallback, timeout);
395 - }
396 - };
397 -
398 - _proto.render = function render() {
399 - var status = this.state.status;
400 -
401 - if (status === UNMOUNTED) {
402 - return null;
403 - }
404 -
405 - var _this$props = this.props,
406 - children = _this$props.children,
407 - childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
408 -
409 - return children(status, childProps);
410 - };
411 -
412 - _createClass(Transition, [{
413 - key: "node",
414 - get: function get() {
415 - var _this$props$nodeRef;
416 -
417 - var node = (_this$props$nodeRef = this.props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current;
418 -
419 - if (!node) {
420 - throw new Error('notistack - Custom snackbar is not refForwarding');
421 - }
422 -
423 - return node;
424 - }
425 - }]);
426 -
427 - return Transition;
428 -}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
429 -
430 -function noop() {//
431 -}
432 -
433 -Transition.defaultProps = {
434 - "in": false,
435 - mountOnEnter: false,
436 - unmountOnExit: false,
437 - appear: false,
438 - enter: true,
439 - exit: true,
440 - onEnter: noop,
441 - onEntering: noop,
442 - onEntered: noop,
443 - onExit: noop,
444 - onExiting: noop,
445 - onExited: noop
446 -};
447 -
448 -/**
449 - * Credit to MUI team @ https://mui.com
450 - */
451 -/**
452 - * passes {value} to {ref}
453 - *
454 - * Useful if you want to expose the ref of an inner component to the public API
455 - * while still using it inside the component.
456 - * @param ref A ref callback or ref object. If anything falsy, this is a no-op.
457 - */
458 -
459 -function setRef(ref, value) {
460 - if (typeof ref === 'function') {
461 - ref(value);
462 - } else if (ref) {
463 - ref.current = value;
464 - }
465 -}
466 -
467 -function useForkRef(refA, refB) {
468 - /**
469 - * This will create a new function if the ref props change and are defined.
470 - * This means react will call the old forkRef with `null` and the new forkRef
471 - * with the ref. Cleanup naturally emerges from this behavior.
472 - */
473 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
474 - if (refA == null && refB == null) {
475 - return null;
476 - }
477 -
478 - return function (refValue) {
479 - setRef(refA, refValue);
480 - setRef(refB, refValue);
481 - };
482 - }, [refA, refB]);
483 -}
484 -
485 -function getTransitionProps(props) {
486 - var timeout = props.timeout,
487 - _props$style = props.style,
488 - style = _props$style === void 0 ? {} : _props$style,
489 - mode = props.mode;
490 - return {
491 - duration: typeof timeout === 'object' ? timeout[mode] || 0 : timeout,
492 - easing: style.transitionTimingFunction,
493 - delay: style.transitionDelay
494 - };
495 -}
496 -
497 -/**
498 - * Credit to MUI team @ https://mui.com
499 - */
500 -var defaultEasing = {
501 - // This is the most common easing curve.
502 - easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
503 - // Objects enter the screen at full velocity from off-screen and
504 - // slowly decelerate to a resting point.
505 - easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
506 - // Objects leave the screen at full velocity. They do not decelerate when off-screen.
507 - easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
508 - // The sharp curve is used by objects that may return to the screen at any time.
509 - sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
510 -};
511 -/**
512 - * CSS hack to force a repaint
513 - */
514 -
515 -var reflow = function reflow(node) {
516 - // We have to do something with node.scrollTop.
517 - // Otherwise it's removed from the compiled code by optimisers
518 - // eslint-disable-next-line no-self-assign
519 - node.scrollTop = node.scrollTop;
520 -};
521 -
522 -var formatMs = function formatMs(milliseconds) {
523 - return Math.round(milliseconds) + "ms";
524 -};
525 -
526 -function createTransition(props, options) {
527 - if (props === void 0) {
528 - props = ['all'];
529 - }
530 -
531 - var _ref = options || {},
532 - _ref$duration = _ref.duration,
533 - duration = _ref$duration === void 0 ? 300 : _ref$duration,
534 - _ref$easing = _ref.easing,
535 - easing = _ref$easing === void 0 ? defaultEasing.easeInOut : _ref$easing,
536 - _ref$delay = _ref.delay,
537 - delay = _ref$delay === void 0 ? 0 : _ref$delay;
538 -
539 - var properties = Array.isArray(props) ? props : [props];
540 - return properties.map(function (animatedProp) {
541 - var formattedDuration = typeof duration === 'string' ? duration : formatMs(duration);
542 - var formattedDelay = typeof delay === 'string' ? delay : formatMs(delay);
543 - return animatedProp + " " + formattedDuration + " " + easing + " " + formattedDelay;
544 - }).join(',');
545 -}
546 -
547 -function ownerDocument(node) {
548 - return node && node.ownerDocument || document;
549 -}
550 -
551 -function ownerWindow(node) {
552 - var doc = ownerDocument(node);
553 - return doc.defaultView || window;
554 -}
555 -/**
556 - * Corresponds to 10 frames at 60 Hz.
557 - * A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
558 - */
559 -
560 -
561 -function debounce(func, wait) {
562 - if (wait === void 0) {
563 - wait = 166;
564 - }
565 -
566 - var timeout;
567 -
568 - function debounced() {
569 - var _this = this;
570 -
571 - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
572 - args[_key] = arguments[_key];
573 - }
574 -
575 - var later = function later() {
576 - // @ts-ignore
577 - func.apply(_this, args);
578 - };
579 -
580 - clearTimeout(timeout);
581 - timeout = setTimeout(later, wait);
582 - }
583 -
584 - debounced.clear = function () {
585 - clearTimeout(timeout);
586 - };
587 -
588 - return debounced;
589 -}
590 -/**
591 - * Translate the node so it can't be seen on the screen.
592 - * Later, we're going to translate the node back to its original location with `none`.
593 - */
594 -
595 -
596 -function getTranslateValue(direction, node) {
597 - var rect = node.getBoundingClientRect();
598 - var containerWindow = ownerWindow(node);
599 - var transform;
600 -
601 - if (node.fakeTransform) {
602 - transform = node.fakeTransform;
603 - } else {
604 - var computedStyle = containerWindow.getComputedStyle(node);
605 - transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform');
606 - }
607 -
608 - var offsetX = 0;
609 - var offsetY = 0;
610 -
611 - if (transform && transform !== 'none' && typeof transform === 'string') {
612 - var transformValues = transform.split('(')[1].split(')')[0].split(',');
613 - offsetX = parseInt(transformValues[4], 10);
614 - offsetY = parseInt(transformValues[5], 10);
615 - }
616 -
617 - switch (direction) {
618 - case 'left':
619 - return "translateX(" + (containerWindow.innerWidth + offsetX - rect.left) + "px)";
620 -
621 - case 'right':
622 - return "translateX(-" + (rect.left + rect.width - offsetX) + "px)";
623 -
624 - case 'up':
625 - return "translateY(" + (containerWindow.innerHeight + offsetY - rect.top) + "px)";
626 -
627 - default:
628 - // down
629 - return "translateY(-" + (rect.top + rect.height - offsetY) + "px)";
630 - }
631 -}
632 -
633 -function setTranslateValue(direction, node) {
634 - if (!node) return;
635 - var transform = getTranslateValue(direction, node);
636 -
637 - if (transform) {
638 - node.style.webkitTransform = transform;
639 - node.style.transform = transform;
640 - }
641 -}
642 -
643 -var Slide = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
644 - var children = props.children,
645 - _props$direction = props.direction,
646 - direction = _props$direction === void 0 ? 'down' : _props$direction,
647 - inProp = props["in"],
648 - style = props.style,
649 - _props$timeout = props.timeout,
650 - timeout = _props$timeout === void 0 ? 0 : _props$timeout,
651 - onEnter = props.onEnter,
652 - onEntered = props.onEntered,
653 - onExit = props.onExit,
654 - onExited = props.onExited,
655 - other = _objectWithoutPropertiesLoose(props, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]);
656 -
657 - var nodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
658 - var handleRefIntermediary = useForkRef(children.ref, nodeRef);
659 - var handleRef = useForkRef(handleRefIntermediary, ref);
660 -
661 - var handleEnter = function handleEnter(node, isAppearing) {
662 - setTranslateValue(direction, node);
663 - reflow(node);
664 -
665 - if (onEnter) {
666 - onEnter(node, isAppearing);
667 - }
668 - };
669 -
670 - var handleEntering = function handleEntering(node) {
671 - var easing = (style === null || style === void 0 ? void 0 : style.transitionTimingFunction) || defaultEasing.easeOut;
672 - var transitionProps = getTransitionProps({
673 - timeout: timeout,
674 - mode: 'enter',
675 - style: _extends({}, style, {
676 - transitionTimingFunction: easing
677 - })
678 - });
679 - node.style.webkitTransition = createTransition('-webkit-transform', transitionProps);
680 - node.style.transition = createTransition('transform', transitionProps);
681 - node.style.webkitTransform = 'none';
682 - node.style.transform = 'none';
683 - };
684 -
685 - var handleExit = function handleExit(node) {
686 - var easing = (style === null || style === void 0 ? void 0 : style.transitionTimingFunction) || defaultEasing.sharp;
687 - var transitionProps = getTransitionProps({
688 - timeout: timeout,
689 - mode: 'exit',
690 - style: _extends({}, style, {
691 - transitionTimingFunction: easing
692 - })
693 - });
694 - node.style.webkitTransition = createTransition('-webkit-transform', transitionProps);
695 - node.style.transition = createTransition('transform', transitionProps);
696 - setTranslateValue(direction, node);
697 -
698 - if (onExit) {
699 - onExit(node);
700 - }
701 - };
702 -
703 - var handleExited = function handleExited(node) {
704 - // No need for transitions when the component is hidden
705 - node.style.webkitTransition = '';
706 - node.style.transition = '';
707 -
708 - if (onExited) {
709 - onExited(node);
710 - }
711 - };
712 -
713 - var updatePosition = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
714 - if (nodeRef.current) {
715 - setTranslateValue(direction, nodeRef.current);
716 - }
717 - }, [direction]);
718 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
719 - // Skip configuration where the position is screen size invariant.
720 - if (inProp || direction === 'down' || direction === 'right') {
721 - return undefined;
722 - }
723 -
724 - var handleResize = debounce(function () {
725 - if (nodeRef.current) {
726 - setTranslateValue(direction, nodeRef.current);
727 - }
728 - });
729 - var containerWindow = ownerWindow(nodeRef.current);
730 - containerWindow.addEventListener('resize', handleResize);
731 - return function () {
732 - handleResize.clear();
733 - containerWindow.removeEventListener('resize', handleResize);
734 - };
735 - }, [direction, inProp]);
736 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
737 - if (!inProp) {
738 - // We need to update the position of the drawer when the direction change and
739 - // when it's hidden.
740 - updatePosition();
741 - }
742 - }, [inProp, updatePosition]);
743 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Transition, Object.assign({
744 - appear: true,
745 - nodeRef: nodeRef,
746 - onEnter: handleEnter,
747 - onEntered: onEntered,
748 - onEntering: handleEntering,
749 - onExit: handleExit,
750 - onExited: handleExited,
751 - "in": inProp,
752 - timeout: timeout
753 - }, other), function (state, childProps) {
754 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(children, _extends({
755 - ref: handleRef,
756 - style: _extends({
757 - visibility: state === 'exited' && !inProp ? 'hidden' : undefined
758 - }, style, {}, children.props.style)
759 - }, childProps));
760 - });
761 -});
762 -Slide.displayName = 'Slide';
763 -
764 -var SvgIcon = function SvgIcon(props) {
765 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", Object.assign({
766 - viewBox: "0 0 24 24",
767 - focusable: "false",
768 - style: {
769 - fontSize: 20,
770 - marginInlineEnd: 8,
771 - userSelect: 'none',
772 - width: '1em',
773 - height: '1em',
774 - display: 'inline-block',
775 - fill: 'currentColor',
776 - flexShrink: 0
777 - }
778 - }, props));
779 -};
780 -
781 -var CheckIcon = function CheckIcon() {
782 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SvgIcon, null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
783 - d: "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"
784 - }));
785 -};
786 -
787 -var WarningIcon = function WarningIcon() {
788 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SvgIcon, null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
789 - d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"
790 - }));
791 -};
792 -
793 -var ErrorIcon = function ErrorIcon() {
794 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SvgIcon, null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
795 - d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"
796 - }));
797 -};
798 -
799 -var InfoIcon = function InfoIcon() {
800 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SvgIcon, null, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
801 - d: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"
802 - }));
803 -};
804 -
805 -var defaultIconVariants = {
806 - "default": undefined,
807 - success: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CheckIcon, null),
808 - warning: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WarningIcon, null),
809 - error: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ErrorIcon, null),
810 - info: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(InfoIcon, null)
811 -};
812 -
813 -var defaults = {
814 - maxSnack: 3,
815 - persist: false,
816 - hideIconVariant: false,
817 - disableWindowBlurListener: false,
818 - variant: 'default',
819 - autoHideDuration: 5000,
820 - iconVariant: defaultIconVariants,
821 - anchorOrigin: {
822 - vertical: 'bottom',
823 - horizontal: 'left'
824 - },
825 - TransitionComponent: Slide,
826 - transitionDuration: {
827 - enter: 225,
828 - exit: 195
829 - }
830 -};
831 -/**
832 - * Derives the right autoHideDuration taking into account the following
833 - * prority order: 1: Options, 2: Props, 3: default fallback
834 - */
835 -
836 -var getAutoHideDuration = function getAutoHideDuration(optionsDuration, propsDuration) {
837 - var isNumberOrNull = function isNumberOrNull(numberish) {
838 - return typeof numberish === 'number' || numberish === null;
839 - };
840 -
841 - if (isNumberOrNull(optionsDuration)) return optionsDuration;
842 - if (isNumberOrNull(propsDuration)) return propsDuration;
843 - return defaults.autoHideDuration;
844 -};
845 -/**
846 - * Derives the right transitionDuration taking into account the following
847 - * prority order: 1: Options, 2: Props, 3: default fallback
848 - */
849 -
850 -
851 -var getTransitionDuration = function getTransitionDuration(optionsDuration, propsDuration) {
852 - var is = function is(item, types) {
853 - return types.some(function (t) {
854 - return typeof item === t;
855 - });
856 - };
857 -
858 - if (is(optionsDuration, ['string', 'number'])) {
859 - return optionsDuration;
860 - }
861 -
862 - if (is(optionsDuration, ['object'])) {
863 - return _extends({}, defaults.transitionDuration, {}, is(propsDuration, ['object']) && propsDuration, {}, optionsDuration);
864 - }
865 -
866 - if (is(propsDuration, ['string', 'number'])) {
867 - return propsDuration;
868 - }
869 -
870 - if (is(propsDuration, ['object'])) {
871 - return _extends({}, defaults.transitionDuration, {}, propsDuration);
872 - }
873 -
874 - return defaults.transitionDuration;
875 -};
876 -
877 -var merge = function merge(options, props) {
878 - return function (name, shouldObjectMerge) {
879 - if (shouldObjectMerge === void 0) {
880 - shouldObjectMerge = false;
881 - }
882 -
883 - if (shouldObjectMerge) {
884 - return _extends({}, defaults[name], {}, props[name], {}, options[name]);
885 - }
886 -
887 - if (name === 'autoHideDuration') {
888 - return getAutoHideDuration(options.autoHideDuration, props.autoHideDuration);
889 - }
890 -
891 - if (name === 'transitionDuration') {
892 - return getTransitionDuration(options.transitionDuration, props.transitionDuration);
893 - }
894 -
895 - return options[name] || props[name] || defaults[name];
896 - };
897 -};
898 -
899 -function makeStyles(styles) {
900 - return Object.entries(styles).reduce(function (acc, _ref) {
901 - var _extends2;
902 -
903 - var key = _ref[0],
904 - value = _ref[1];
905 - return _extends({}, acc, (_extends2 = {}, _extends2[key] = (0,goober__WEBPACK_IMPORTED_MODULE_3__.css)(value), _extends2));
906 - }, {});
907 -}
908 -var ComponentClasses = {
909 - SnackbarContainer: 'notistack-SnackbarContainer',
910 - Snackbar: 'notistack-Snackbar',
911 - CollapseWrapper: 'notistack-CollapseWrapper',
912 - MuiContent: 'notistack-MuiContent',
913 - MuiContentVariant: function MuiContentVariant(variant) {
914 - return "notistack-MuiContent-" + variant;
915 - }
916 -};
917 -
918 -var classes = /*#__PURE__*/makeStyles({
919 - root: {
920 - height: 0
921 - },
922 - entered: {
923 - height: 'auto'
924 - }
925 -});
926 -var collapsedSize = '0px';
927 -var timeout = 175;
928 -var Collapse = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
929 - var children = props.children,
930 - inProp = props["in"],
931 - onExited = props.onExited;
932 - var wrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
933 - var nodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
934 - var handleRef = useForkRef(ref, nodeRef);
935 -
936 - var getWrapperSize = function getWrapperSize() {
937 - return wrapperRef.current ? wrapperRef.current.clientHeight : 0;
938 - };
939 -
940 - var handleEnter = function handleEnter(node) {
941 - node.style.height = collapsedSize;
942 - };
943 -
944 - var handleEntering = function handleEntering(node) {
945 - var wrapperSize = getWrapperSize();
946 -
947 - var _getTransitionProps = getTransitionProps({
948 - timeout: timeout,
949 - mode: 'enter'
950 - }),
951 - transitionDuration = _getTransitionProps.duration,
952 - easing = _getTransitionProps.easing;
953 -
954 - node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : transitionDuration + "ms";
955 - node.style.height = wrapperSize + "px";
956 - node.style.transitionTimingFunction = easing || '';
957 - };
958 -
959 - var handleEntered = function handleEntered(node) {
960 - node.style.height = 'auto';
961 - };
962 -
963 - var handleExit = function handleExit(node) {
964 - node.style.height = getWrapperSize() + "px";
965 - };
966 -
967 - var handleExiting = function handleExiting(node) {
968 - reflow(node);
969 -
970 - var _getTransitionProps2 = getTransitionProps({
971 - timeout: timeout,
972 - mode: 'exit'
973 - }),
974 - transitionDuration = _getTransitionProps2.duration,
975 - easing = _getTransitionProps2.easing;
976 -
977 - node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : transitionDuration + "ms";
978 - node.style.height = collapsedSize;
979 - node.style.transitionTimingFunction = easing || '';
980 - };
981 -
982 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Transition, {
983 - "in": inProp,
984 - unmountOnExit: true,
985 - onEnter: handleEnter,
986 - onEntered: handleEntered,
987 - onEntering: handleEntering,
988 - onExit: handleExit,
989 - onExited: onExited,
990 - onExiting: handleExiting,
991 - nodeRef: nodeRef,
992 - timeout: timeout
993 - }, function (state, childProps) {
994 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", Object.assign({
995 - ref: handleRef,
996 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.root, state === 'entered' && classes.entered),
997 - style: _extends({
998 - pointerEvents: 'all',
999 - overflow: 'hidden',
1000 - minHeight: collapsedSize,
1001 - transition: createTransition('height')
1002 - }, state === 'entered' && {
1003 - overflow: 'visible'
1004 - }, {}, state === 'exited' && !inProp && {
1005 - visibility: 'hidden'
1006 - })
1007 - }, childProps), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1008 - ref: wrapperRef,
1009 - className: ComponentClasses.CollapseWrapper,
1010 - // Hack to get children with a negative margin to not falsify the height computation.
1011 - style: {
1012 - display: 'flex',
1013 - width: '100%'
1014 - }
1015 - }, children));
1016 - });
1017 -});
1018 -Collapse.displayName = 'Collapse';
1019 -
1020 -var direction = {
1021 - right: 'left',
1022 - left: 'right',
1023 - bottom: 'up',
1024 - top: 'down'
1025 -};
1026 -var getSlideDirection = function getSlideDirection(anchorOrigin) {
1027 - if (anchorOrigin.horizontal !== 'center') {
1028 - return direction[anchorOrigin.horizontal];
1029 - }
1030 -
1031 - return direction[anchorOrigin.vertical];
1032 -};
1033 -/** Tranforms classes name */
1034 -
1035 -var toSnackbarAnchorOrigin = function toSnackbarAnchorOrigin(anchorOrigin) {
1036 - return "anchorOrigin" + originKeyExtractor(anchorOrigin);
1037 -};
1038 -/**
1039 - * Omit SnackbarContainer class keys that are not needed for SnackbarItem
1040 - */
1041 -
1042 -var keepSnackbarClassKeys = function keepSnackbarClassKeys(classes) {
1043 - if (classes === void 0) {
1044 - classes = {};
1045 - }
1046 -
1047 - var containerClasses = {
1048 - containerRoot: true,
1049 - containerAnchorOriginTopCenter: true,
1050 - containerAnchorOriginBottomCenter: true,
1051 - containerAnchorOriginTopRight: true,
1052 - containerAnchorOriginBottomRight: true,
1053 - containerAnchorOriginTopLeft: true,
1054 - containerAnchorOriginBottomLeft: true
1055 - };
1056 - return Object.keys(classes).filter(function (key) {
1057 - return !containerClasses[key];
1058 - }).reduce(function (obj, key) {
1059 - var _extends2;
1060 -
1061 - return _extends({}, obj, (_extends2 = {}, _extends2[key] = classes[key], _extends2));
1062 - }, {});
1063 -};
1064 -
1065 -var noOp$1 = function noOp() {
1066 - /* */
1067 -};
1068 -/**
1069 - * Credit to MUI team @ https://mui.com
1070 - * Safe chained function.
1071 - *
1072 - * Will only create a new function if needed,
1073 - * otherwise will pass back existing functions or null.
1074 - */
1075 -
1076 -
1077 -function createChainedFunction(funcs, snackbarId) {
1078 - // @ts-ignore
1079 - return funcs.reduce(function (acc, func) {
1080 - if (func === null || func === undefined) {
1081 - return acc;
1082 - }
1083 -
1084 - return function chainedFunction() {
1085 - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1086 - args[_key] = arguments[_key];
1087 - }
1088 -
1089 - var argums = [].concat(args);
1090 -
1091 - if (snackbarId && argums.indexOf(snackbarId) === -1) {
1092 - argums.push(snackbarId);
1093 - } // @ts-ignore
1094 -
1095 -
1096 - acc.apply(this, argums);
1097 - func.apply(this, argums);
1098 - };
1099 - }, noOp$1);
1100 -}
1101 -
1102 -/**
1103 - * Credit to MUI team @ https://mui.com
1104 - * https://github.com/facebook/react/issues/14099#issuecomment-440013892
1105 - */
1106 -var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
1107 -function useEventCallback(fn) {
1108 - var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(fn);
1109 - useEnhancedEffect(function () {
1110 - ref.current = fn;
1111 - });
1112 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
1113 - return (// @ts-expect-error hide `this`
1114 - (ref.current).apply(void 0, arguments)
1115 - );
1116 - }, []);
1117 -}
1118 -
1119 -/**
1120 - * Credit to MUI team @ https://mui.com
1121 - */
1122 -var Snackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
1123 - var children = props.children,
1124 - className = props.className,
1125 - autoHideDuration = props.autoHideDuration,
1126 - _props$disableWindowB = props.disableWindowBlurListener,
1127 - disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,
1128 - onClose = props.onClose,
1129 - id = props.id,
1130 - open = props.open,
1131 - _props$SnackbarProps = props.SnackbarProps,
1132 - SnackbarProps = _props$SnackbarProps === void 0 ? {} : _props$SnackbarProps;
1133 - var timerAutoHide = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
1134 - var handleClose = useEventCallback(function () {
1135 - if (onClose) {
1136 - onClose.apply(void 0, arguments);
1137 - }
1138 - });
1139 - var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {
1140 - if (!onClose || autoHideDurationParam == null) {
1141 - return;
1142 - }
1143 -
1144 - if (timerAutoHide.current) {
1145 - clearTimeout(timerAutoHide.current);
1146 - }
1147 -
1148 - timerAutoHide.current = setTimeout(function () {
1149 - handleClose(null, 'timeout', id);
1150 - }, autoHideDurationParam);
1151 - });
1152 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1153 - if (open) {
1154 - setAutoHideTimer(autoHideDuration);
1155 - }
1156 -
1157 - return function () {
1158 - if (timerAutoHide.current) {
1159 - clearTimeout(timerAutoHide.current);
1160 - }
1161 - };
1162 - }, [open, autoHideDuration, setAutoHideTimer]);
1163 - /**
1164 - * Pause the timer when the user is interacting with the Snackbar
1165 - * or when the user hide the window.
1166 - */
1167 -
1168 - var handlePause = function handlePause() {
1169 - if (timerAutoHide.current) {
1170 - clearTimeout(timerAutoHide.current);
1171 - }
1172 - };
1173 - /**
1174 - * Restart the timer when the user is no longer interacting with the Snackbar
1175 - * or when the window is shown back.
1176 - */
1177 -
1178 -
1179 - var handleResume = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
1180 - if (autoHideDuration != null) {
1181 - setAutoHideTimer(autoHideDuration * 0.5);
1182 - }
1183 - }, [autoHideDuration, setAutoHideTimer]);
1184 -
1185 - var handleMouseEnter = function handleMouseEnter(event) {
1186 - if (SnackbarProps.onMouseEnter) {
1187 - SnackbarProps.onMouseEnter(event);
1188 - }
1189 -
1190 - handlePause();
1191 - };
1192 -
1193 - var handleMouseLeave = function handleMouseLeave(event) {
1194 - if (SnackbarProps.onMouseLeave) {
1195 - SnackbarProps.onMouseLeave(event);
1196 - }
1197 -
1198 - handleResume();
1199 - };
1200 -
1201 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1202 - if (!disableWindowBlurListener && open) {
1203 - window.addEventListener('focus', handleResume);
1204 - window.addEventListener('blur', handlePause);
1205 - return function () {
1206 - window.removeEventListener('focus', handleResume);
1207 - window.removeEventListener('blur', handlePause);
1208 - };
1209 - }
1210 -
1211 - return undefined;
1212 - }, [disableWindowBlurListener, handleResume, open]);
1213 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", Object.assign({
1214 - ref: ref
1215 - }, SnackbarProps, {
1216 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(ComponentClasses.Snackbar, className),
1217 - onMouseEnter: handleMouseEnter,
1218 - onMouseLeave: handleMouseLeave
1219 - }), children);
1220 -});
1221 -Snackbar.displayName = 'Snackbar';
1222 -
1223 -var _root;
1224 -var classes$1 = /*#__PURE__*/makeStyles({
1225 - root: (_root = {
1226 - display: 'flex',
1227 - flexWrap: 'wrap',
1228 - flexGrow: 1
1229 - }, _root[breakpoints.upSm] = {
1230 - flexGrow: 'initial',
1231 - minWidth: '288px'
1232 - }, _root)
1233 -});
1234 -var SnackbarContent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) {
1235 - var className = _ref.className,
1236 - props = _objectWithoutPropertiesLoose(_ref, ["className"]);
1237 -
1238 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", Object.assign({
1239 - ref: ref,
1240 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes$1.root, className)
1241 - }, props));
1242 -});
1243 -SnackbarContent.displayName = 'SnackbarContent';
1244 -
1245 -var classes$2 = /*#__PURE__*/makeStyles({
1246 - root: {
1247 - backgroundColor: '#313131',
1248 - fontSize: '0.875rem',
1249 - lineHeight: 1.43,
1250 - letterSpacing: '0.01071em',
1251 - color: '#fff',
1252 - alignItems: 'center',
1253 - padding: '6px 16px',
1254 - borderRadius: '4px',
1255 - boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)'
1256 - },
1257 - lessPadding: {
1258 - paddingLeft: 8 * 2.5 + "px"
1259 - },
1260 - "default": {
1261 - backgroundColor: '#313131'
1262 - },
1263 - success: {
1264 - backgroundColor: '#43a047'
1265 - },
1266 - error: {
1267 - backgroundColor: '#d32f2f'
1268 - },
1269 - warning: {
1270 - backgroundColor: '#ff9800'
1271 - },
1272 - info: {
1273 - backgroundColor: '#2196f3'
1274 - },
1275 - message: {
1276 - display: 'flex',
1277 - alignItems: 'center',
1278 - padding: '8px 0'
1279 - },
1280 - action: {
1281 - display: 'flex',
1282 - alignItems: 'center',
1283 - marginLeft: 'auto',
1284 - paddingLeft: '16px',
1285 - marginRight: '-8px'
1286 - }
1287 -});
1288 -var ariaDescribedby = 'notistack-snackbar';
1289 -var MaterialDesignContent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, forwardedRef) {
1290 - var id = props.id,
1291 - message = props.message,
1292 - componentOrFunctionAction = props.action,
1293 - iconVariant = props.iconVariant,
1294 - variant = props.variant,
1295 - hideIconVariant = props.hideIconVariant,
1296 - style = props.style,
1297 - className = props.className;
1298 - var icon = iconVariant[variant];
1299 - var action = componentOrFunctionAction;
1300 -
1301 - if (typeof action === 'function') {
1302 - action = action(id);
1303 - }
1304 -
1305 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SnackbarContent, {
1306 - ref: forwardedRef,
1307 - role: "alert",
1308 - "aria-describedby": ariaDescribedby,
1309 - style: style,
1310 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(ComponentClasses.MuiContent, ComponentClasses.MuiContentVariant(variant), classes$2.root, classes$2[variant], className, !hideIconVariant && icon && classes$2.lessPadding)
1311 - }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1312 - id: ariaDescribedby,
1313 - className: classes$2.message
1314 - }, !hideIconVariant ? icon : null, message), action && react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1315 - className: classes$2.action
1316 - }, action));
1317 -});
1318 -MaterialDesignContent.displayName = 'MaterialDesignContent';
1319 -var MaterialDesignContent$1 = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(MaterialDesignContent);
1320 -
1321 -var styles = /*#__PURE__*/makeStyles({
1322 - wrappedRoot: {
1323 - width: '100%',
1324 - position: 'relative',
1325 - transform: 'translateX(0)',
1326 - top: 0,
1327 - right: 0,
1328 - bottom: 0,
1329 - left: 0,
1330 - minWidth: '288px'
1331 - }
1332 -});
1333 -
1334 -var SnackbarItem = function SnackbarItem(props) {
1335 - var timeout = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
1336 -
1337 - var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),
1338 - collapsed = _useState[0],
1339 - setCollapsed = _useState[1];
1340 -
1341 - var handleClose = createChainedFunction([props.snack.onClose, props.onClose]);
1342 -
1343 - var handleEntered = function handleEntered() {
1344 - if (props.snack.requestClose) {
1345 - handleClose(null, 'instructed', props.snack.id);
1346 - }
1347 - };
1348 -
1349 - var handleExitedScreen = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
1350 - timeout.current = setTimeout(function () {
1351 - setCollapsed(function (col) {
1352 - return !col;
1353 - });
1354 - }, 125);
1355 - }, []);
1356 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
1357 - return function () {
1358 - if (timeout.current) {
1359 - clearTimeout(timeout.current);
1360 - }
1361 - };
1362 - }, []);
1363 - var snack = props.snack,
1364 - allClasses = props.classes,
1365 - _props$Component = props.Component,
1366 - Component = _props$Component === void 0 ? MaterialDesignContent$1 : _props$Component;
1367 - var classes = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
1368 - return keepSnackbarClassKeys(allClasses);
1369 - }, [allClasses]);
1370 -
1371 - var open = snack.open,
1372 - SnackbarProps = snack.SnackbarProps,
1373 - TransitionComponent = snack.TransitionComponent,
1374 - TransitionProps = snack.TransitionProps,
1375 - transitionDuration = snack.transitionDuration,
1376 - disableWindowBlurListener = snack.disableWindowBlurListener,
1377 - componentOrFunctionContent = snack.content,
1378 - otherSnack = _objectWithoutPropertiesLoose(snack, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]);
1379 -
1380 - var transitionProps = _extends({
1381 - direction: getSlideDirection(otherSnack.anchorOrigin),
1382 - timeout: transitionDuration
1383 - }, TransitionProps);
1384 -
1385 - var content = componentOrFunctionContent;
1386 -
1387 - if (typeof content === 'function') {
1388 - content = content(otherSnack.id, otherSnack.message);
1389 - }
1390 -
1391 - var callbacks = ['onEnter', 'onEntered', 'onExit', 'onExited'].reduce(function (acc, cbName) {
1392 - var _extends2;
1393 -
1394 - return _extends({}, acc, (_extends2 = {}, _extends2[cbName] = createChainedFunction([props.snack[cbName], props[cbName]], otherSnack.id), _extends2));
1395 - }, {});
1396 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Collapse, {
1397 - "in": collapsed,
1398 - onExited: callbacks.onExited
1399 - }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Snackbar, {
1400 - open: open,
1401 - id: otherSnack.id,
1402 - disableWindowBlurListener: disableWindowBlurListener,
1403 - autoHideDuration: otherSnack.autoHideDuration,
1404 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(styles.wrappedRoot, classes.root, classes[toSnackbarAnchorOrigin(otherSnack.anchorOrigin)]),
1405 - SnackbarProps: SnackbarProps,
1406 - onClose: handleClose
1407 - }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TransitionComponent, Object.assign({}, transitionProps, {
1408 - appear: true,
1409 - "in": open,
1410 - onExit: callbacks.onExit,
1411 - onExited: handleExitedScreen,
1412 - onEnter: callbacks.onEnter,
1413 - // order matters. first callbacks.onEntered to set entered: true,
1414 - // then handleEntered to check if there's a request for closing
1415 - onEntered: createChainedFunction([callbacks.onEntered, handleEntered], otherSnack.id)
1416 - }), content || react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, Object.assign({}, otherSnack)))));
1417 -};
1418 -
1419 -var _root$1, _rootDense, _left, _right, _center;
1420 -var indents = {
1421 - view: {
1422 - "default": 20,
1423 - dense: 4
1424 - },
1425 - snackbar: {
1426 - "default": 6,
1427 - dense: 2
1428 - }
1429 -};
1430 -var collapseWrapper = "." + ComponentClasses.CollapseWrapper;
1431 -var xsWidthMargin = 16;
1432 -var styles$1 = /*#__PURE__*/makeStyles({
1433 - root: (_root$1 = {
1434 - boxSizing: 'border-box',
1435 - display: 'flex',
1436 - maxHeight: '100%',
1437 - position: 'fixed',
1438 - zIndex: 1400,
1439 - height: 'auto',
1440 - width: 'auto',
1441 - transition: /*#__PURE__*/createTransition(['top', 'right', 'bottom', 'left', 'max-width'], {
1442 - duration: 300,
1443 - easing: 'ease'
1444 - }),
1445 - // container itself is invisible and should not block clicks, clicks should be passed to its children
1446 - // a pointerEvents: all is applied in the collapse component
1447 - pointerEvents: 'none'
1448 - }, _root$1[collapseWrapper] = {
1449 - padding: indents.snackbar["default"] + "px 0px",
1450 - transition: 'padding 300ms ease 0ms'
1451 - }, _root$1.maxWidth = "calc(100% - " + indents.view["default"] * 2 + "px)", _root$1[breakpoints.downXs] = {
1452 - width: '100%',
1453 - maxWidth: "calc(100% - " + xsWidthMargin * 2 + "px)"
1454 - }, _root$1),
1455 - rootDense: (_rootDense = {}, _rootDense[collapseWrapper] = {
1456 - padding: indents.snackbar.dense + "px 0px"
1457 - }, _rootDense),
1458 - top: {
1459 - top: indents.view["default"] - indents.snackbar["default"] + "px",
1460 - flexDirection: 'column'
1461 - },
1462 - bottom: {
1463 - bottom: indents.view["default"] - indents.snackbar["default"] + "px",
1464 - flexDirection: 'column-reverse'
1465 - },
1466 - left: (_left = {
1467 - left: indents.view["default"] + "px"
1468 - }, _left[breakpoints.upSm] = {
1469 - alignItems: 'flex-start'
1470 - }, _left[breakpoints.downXs] = {
1471 - left: xsWidthMargin + "px"
1472 - }, _left),
1473 - right: (_right = {
1474 - right: indents.view["default"] + "px"
1475 - }, _right[breakpoints.upSm] = {
1476 - alignItems: 'flex-end'
1477 - }, _right[breakpoints.downXs] = {
1478 - right: xsWidthMargin + "px"
1479 - }, _right),
1480 - center: (_center = {
1481 - left: '50%',
1482 - transform: 'translateX(-50%)'
1483 - }, _center[breakpoints.upSm] = {
1484 - alignItems: 'center'
1485 - }, _center)
1486 -});
1487 -
1488 -var SnackbarContainer = function SnackbarContainer(props) {
1489 - var _props$classes = props.classes,
1490 - classes = _props$classes === void 0 ? {} : _props$classes,
1491 - anchorOrigin = props.anchorOrigin,
1492 - dense = props.dense,
1493 - children = props.children;
1494 - var combinedClassname = (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(ComponentClasses.SnackbarContainer, styles$1[anchorOrigin.vertical], styles$1[anchorOrigin.horizontal], styles$1.root, // root should come after others to override maxWidth
1495 - classes.containerRoot, classes["containerAnchorOrigin" + originKeyExtractor(anchorOrigin)], dense && styles$1.rootDense);
1496 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1497 - className: combinedClassname
1498 - }, children);
1499 -};
1500 -
1501 -var SnackbarContainer$1 = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(SnackbarContainer);
1502 -
1503 -/* eslint-disable */
1504 -var __DEV__ = "development" !== 'production';
1505 -
1506 -var messages = {
1507 - NO_PERSIST_ALL: "Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."
1508 -};
1509 -var warning = (function (messageKey) {
1510 - if (!__DEV__) return;
1511 - var message = messages[messageKey];
1512 -
1513 - if (typeof console !== 'undefined') {
1514 - console.error("WARNING - notistack: " + message);
1515 - }
1516 -
1517 - try {
1518 - throw new Error(message);
1519 - } catch (x) {}
1520 -});
1521 -
1522 -var isOptions = function isOptions(messageOrOptions) {
1523 - var isMessage = typeof messageOrOptions === 'string' || (0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(messageOrOptions);
1524 - return !isMessage;
1525 -};
1526 -
1527 -var enqueueSnackbar;
1528 -var closeSnackbar;
1529 -
1530 -var SnackbarProvider = /*#__PURE__*/function (_Component) {
1531 - _inheritsLoose(SnackbarProvider, _Component);
1532 -
1533 - function SnackbarProvider(props) {
1534 - var _this;
1535 -
1536 - _this = _Component.call(this, props) || this;
1537 - /**
1538 - * Adds a new snackbar to the queue to be presented.
1539 - * Returns generated or user defined key referencing the new snackbar or null
1540 - */
1541 -
1542 - _this.enqueueSnackbar = function (messageOrOptions, optsOrUndefined) {
1543 - if (optsOrUndefined === void 0) {
1544 - optsOrUndefined = {};
1545 - }
1546 -
1547 - if (messageOrOptions === undefined || messageOrOptions === null) {
1548 - throw new Error('enqueueSnackbar called with invalid argument');
1549 - }
1550 -
1551 - var opts = isOptions(messageOrOptions) ? messageOrOptions : optsOrUndefined;
1552 - var message = isOptions(messageOrOptions) ? messageOrOptions.message : messageOrOptions;
1553 -
1554 - var key = opts.key,
1555 - preventDuplicate = opts.preventDuplicate,
1556 - options = _objectWithoutPropertiesLoose(opts, ["key", "preventDuplicate"]);
1557 -
1558 - var hasSpecifiedKey = isDefined(key);
1559 - var id = hasSpecifiedKey ? key : new Date().getTime() + Math.random();
1560 - var merger = merge(options, _this.props);
1561 -
1562 - var snack = _extends({
1563 - id: id
1564 - }, options, {
1565 - message: message,
1566 - open: true,
1567 - entered: false,
1568 - requestClose: false,
1569 - persist: merger('persist'),
1570 - action: merger('action'),
1571 - content: merger('content'),
1572 - variant: merger('variant'),
1573 - anchorOrigin: merger('anchorOrigin'),
1574 - disableWindowBlurListener: merger('disableWindowBlurListener'),
1575 - autoHideDuration: merger('autoHideDuration'),
1576 - hideIconVariant: merger('hideIconVariant'),
1577 - TransitionComponent: merger('TransitionComponent'),
1578 - transitionDuration: merger('transitionDuration'),
1579 - TransitionProps: merger('TransitionProps', true),
1580 - iconVariant: merger('iconVariant', true),
1581 - style: merger('style', true),
1582 - SnackbarProps: merger('SnackbarProps', true),
1583 - className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(_this.props.className, options.className)
1584 - });
1585 -
1586 - if (snack.persist) {
1587 - snack.autoHideDuration = undefined;
1588 - }
1589 -
1590 - _this.setState(function (state) {
1591 - if (preventDuplicate === undefined && _this.props.preventDuplicate || preventDuplicate) {
1592 - var compareFunction = function compareFunction(item) {
1593 - return hasSpecifiedKey ? item.id === id : item.message === message;
1594 - };
1595 -
1596 - var inQueue = state.queue.findIndex(compareFunction) > -1;
1597 - var inView = state.snacks.findIndex(compareFunction) > -1;
1598 -
1599 - if (inQueue || inView) {
1600 - return state;
1601 - }
1602 - }
1603 -
1604 - return _this.handleDisplaySnack(_extends({}, state, {
1605 - queue: [].concat(state.queue, [snack])
1606 - }));
1607 - });
1608 -
1609 - return id;
1610 - };
1611 - /**
1612 - * Reducer: Display snack if there's space for it. Otherwise, immediately
1613 - * begin dismissing the oldest message to start showing the new one.
1614 - */
1615 -
1616 -
1617 - _this.handleDisplaySnack = function (state) {
1618 - var snacks = state.snacks;
1619 -
1620 - if (snacks.length >= _this.maxSnack) {
1621 - return _this.handleDismissOldest(state);
1622 - }
1623 -
1624 - return _this.processQueue(state);
1625 - };
1626 - /**
1627 - * Reducer: Display items (notifications) in the queue if there's space for them.
1628 - */
1629 -
1630 -
1631 - _this.processQueue = function (state) {
1632 - var queue = state.queue,
1633 - snacks = state.snacks;
1634 -
1635 - if (queue.length > 0) {
1636 - return _extends({}, state, {
1637 - snacks: [].concat(snacks, [queue[0]]),
1638 - queue: queue.slice(1, queue.length)
1639 - });
1640 - }
1641 -
1642 - return state;
1643 - };
1644 - /**
1645 - * Reducer: Hide oldest snackbar on the screen because there exists a new one which we have to display.
1646 - * (ignoring the one with 'persist' flag. i.e. explicitly told by user not to get dismissed).
1647 - *
1648 - * Note 1: If there is already a message leaving the screen, no new messages are dismissed.
1649 - * Note 2: If the oldest message has not yet entered the screen, only a request to close the
1650 - * snackbar is made. Once it entered the screen, it will be immediately dismissed.
1651 - */
1652 -
1653 -
1654 - _this.handleDismissOldest = function (state) {
1655 - if (state.snacks.some(function (item) {
1656 - return !item.open || item.requestClose;
1657 - })) {
1658 - return state;
1659 - }
1660 -
1661 - var popped = false;
1662 - var ignore = false;
1663 - var persistentCount = state.snacks.reduce(function (acc, current) {
1664 - return acc + (current.open && current.persist ? 1 : 0);
1665 - }, 0);
1666 -
1667 - if (persistentCount === _this.maxSnack) {
1668 - true ? warning('NO_PERSIST_ALL') : 0;
1669 - ignore = true;
1670 - }
1671 -
1672 - var snacks = state.snacks.map(function (item) {
1673 - if (!popped && (!item.persist || ignore)) {
1674 - popped = true;
1675 -
1676 - if (!item.entered) {
1677 - return _extends({}, item, {
1678 - requestClose: true
1679 - });
1680 - }
1681 -
1682 - if (item.onClose) {
1683 - item.onClose(null, 'maxsnack', item.id);
1684 - }
1685 -
1686 - if (_this.props.onClose) {
1687 - _this.props.onClose(null, 'maxsnack', item.id);
1688 - }
1689 -
1690 - return _extends({}, item, {
1691 - open: false
1692 - });
1693 - }
1694 -
1695 - return _extends({}, item);
1696 - });
1697 - return _extends({}, state, {
1698 - snacks: snacks
1699 - });
1700 - };
1701 - /**
1702 - * Set the entered state of the snackbar with the given key.
1703 - */
1704 -
1705 -
1706 - _this.handleEnteredSnack = function (node, isAppearing, key) {
1707 - if (!isDefined(key)) {
1708 - throw new Error('handleEnteredSnack Cannot be called with undefined key');
1709 - }
1710 -
1711 - _this.setState(function (_ref) {
1712 - var snacks = _ref.snacks;
1713 - return {
1714 - snacks: snacks.map(function (item) {
1715 - return item.id === key ? _extends({}, item, {
1716 - entered: true
1717 - }) : _extends({}, item);
1718 - })
1719 - };
1720 - });
1721 - };
1722 - /**
1723 - * Hide a snackbar after its timeout.
1724 - */
1725 -
1726 -
1727 - _this.handleCloseSnack = function (event, reason, key) {
1728 - // should not use createChainedFunction for onClose.
1729 - // because this.closeSnackbar called this function
1730 - if (_this.props.onClose) {
1731 - _this.props.onClose(event, reason, key);
1732 - }
1733 -
1734 - var shouldCloseAll = key === undefined;
1735 -
1736 - _this.setState(function (_ref2) {
1737 - var snacks = _ref2.snacks,
1738 - queue = _ref2.queue;
1739 - return {
1740 - snacks: snacks.map(function (item) {
1741 - if (!shouldCloseAll && item.id !== key) {
1742 - return _extends({}, item);
1743 - }
1744 -
1745 - return item.entered ? _extends({}, item, {
1746 - open: false
1747 - }) : _extends({}, item, {
1748 - requestClose: true
1749 - });
1750 - }),
1751 - queue: queue.filter(function (item) {
1752 - return item.id !== key;
1753 - })
1754 - };
1755 - });
1756 - };
1757 - /**
1758 - * Close snackbar with the given key
1759 - */
1760 -
1761 -
1762 - _this.closeSnackbar = function (key) {
1763 - // call individual snackbar onClose callback passed through options parameter
1764 - var toBeClosed = _this.state.snacks.find(function (item) {
1765 - return item.id === key;
1766 - });
1767 -
1768 - if (isDefined(key) && toBeClosed && toBeClosed.onClose) {
1769 - toBeClosed.onClose(null, 'instructed', key);
1770 - }
1771 -
1772 - _this.handleCloseSnack(null, 'instructed', key);
1773 - };
1774 - /**
1775 - * When we set open attribute of a snackbar to false (i.e. after we hide a snackbar),
1776 - * it leaves the screen and immediately after leaving animation is done, this method
1777 - * gets called. We remove the hidden snackbar from state and then display notifications
1778 - * waiting in the queue (if any). If after this process the queue is not empty, the
1779 - * oldest message is dismissed.
1780 - */
1781 -
1782 -
1783 - _this.handleExitedSnack = function (node, key) {
1784 - if (!isDefined(key)) {
1785 - throw new Error('handleExitedSnack Cannot be called with undefined key');
1786 - }
1787 -
1788 - _this.setState(function (state) {
1789 - var newState = _this.processQueue(_extends({}, state, {
1790 - snacks: state.snacks.filter(function (item) {
1791 - return item.id !== key;
1792 - })
1793 - }));
1794 -
1795 - if (newState.queue.length === 0) {
1796 - return newState;
1797 - }
1798 -
1799 - return _this.handleDismissOldest(newState);
1800 - });
1801 - };
1802 -
1803 - enqueueSnackbar = _this.enqueueSnackbar;
1804 - closeSnackbar = _this.closeSnackbar;
1805 - _this.state = {
1806 - snacks: [],
1807 - queue: [],
1808 - contextValue: {
1809 - enqueueSnackbar: _this.enqueueSnackbar.bind(_assertThisInitialized(_this)),
1810 - closeSnackbar: _this.closeSnackbar.bind(_assertThisInitialized(_this))
1811 - }
1812 - };
1813 - return _this;
1814 - }
1815 -
1816 - var _proto = SnackbarProvider.prototype;
1817 -
1818 - _proto.render = function render() {
1819 - var _this2 = this;
1820 -
1821 - var contextValue = this.state.contextValue;
1822 - var _this$props = this.props,
1823 - domRoot = _this$props.domRoot,
1824 - children = _this$props.children,
1825 - _this$props$dense = _this$props.dense,
1826 - dense = _this$props$dense === void 0 ? false : _this$props$dense,
1827 - _this$props$Component = _this$props.Components,
1828 - Components = _this$props$Component === void 0 ? {} : _this$props$Component,
1829 - classes = _this$props.classes;
1830 - var categ = this.state.snacks.reduce(function (acc, current) {
1831 - var _extends2;
1832 -
1833 - var category = originKeyExtractor(current.anchorOrigin);
1834 - var existingOfCategory = acc[category] || [];
1835 - return _extends({}, acc, (_extends2 = {}, _extends2[category] = [].concat(existingOfCategory, [current]), _extends2));
1836 - }, {});
1837 - var snackbars = Object.keys(categ).map(function (origin) {
1838 - var snacks = categ[origin];
1839 - var nomineeSnack = snacks[0];
1840 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SnackbarContainer$1, {
1841 - key: origin,
1842 - dense: dense,
1843 - anchorOrigin: nomineeSnack.anchorOrigin,
1844 - classes: classes
1845 - }, snacks.map(function (snack) {
1846 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SnackbarItem, {
1847 - key: snack.id,
1848 - snack: snack,
1849 - classes: classes,
1850 - Component: Components[snack.variant],
1851 - onClose: _this2.handleCloseSnack,
1852 - onEnter: _this2.props.onEnter,
1853 - onExit: _this2.props.onExit,
1854 - onExited: createChainedFunction([_this2.handleExitedSnack, _this2.props.onExited], snack.id),
1855 - onEntered: createChainedFunction([_this2.handleEnteredSnack, _this2.props.onEntered], snack.id)
1856 - });
1857 - }));
1858 - });
1859 - return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SnackbarContext.Provider, {
1860 - value: contextValue
1861 - }, children, domRoot ? (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(snackbars, domRoot) : snackbars);
1862 - };
1863 -
1864 - _createClass(SnackbarProvider, [{
1865 - key: "maxSnack",
1866 - get: function get() {
1867 - return this.props.maxSnack || defaults.maxSnack;
1868 - }
1869 - }]);
1870 -
1871 - return SnackbarProvider;
1872 -}(react__WEBPACK_IMPORTED_MODULE_0__.Component);
1873 -
1874 -var useSnackbar = (function () {
1875 - return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(SnackbarContext);
1876 -});
1877 -
1878 -
1879 -//# sourceMappingURL=notistack.esm.js.map
1880 -
1881 -
1882 -/***/ }),
1883 -
1884 -/***/ "./packages/packages/core/editor-notifications/src/components/notifications.tsx":
1885 -/*!**************************************************************************************!*\
1886 - !*** ./packages/packages/core/editor-notifications/src/components/notifications.tsx ***!
1887 - \**************************************************************************************/
1888 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1889 -
1890 -__webpack_require__.r(__webpack_exports__);
1891 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
1892 -/* harmony export */ NotifyReact: function() { return /* binding */ NotifyReact; },
1893 -/* harmony export */ dismissNotification: function() { return /* binding */ dismissNotification; },
1894 -/* harmony export */ notify: function() { return /* binding */ notify; }
1895 -/* harmony export */ });
1896 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1897 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1898 -/* harmony import */ var notistack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! notistack */ "./node_modules/notistack/notistack.esm.js");
1899 -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
1900 -/* harmony import */ var _elementor_icons__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__);
1901 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elementor/store */ "@elementor/store");
1902 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elementor_store__WEBPACK_IMPORTED_MODULE_3__);
1903 -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1904 -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_4__);
1905 -/* harmony import */ var _hooks_use_enqueue_notifications__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hooks/use-enqueue-notifications */ "./packages/packages/core/editor-notifications/src/hooks/use-enqueue-notifications.tsx");
1906 -/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../slice */ "./packages/packages/core/editor-notifications/src/slice.ts");
1907 -/* harmony import */ var _sync_get_editing_panel_width__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sync/get-editing-panel-width */ "./packages/packages/core/editor-notifications/src/sync/get-editing-panel-width.ts");
1908 -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1909 -
1910 -
1911 -
1912 -
1913 -
1914 -
1915 -
1916 -
1917 -
1918 -// 8 seconds
1919 -const AUTO_HIDE_DURATION = 8000;
1920 -const DefaultCustomSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props, ref) => {
1921 - const filteredProps = getFilteredSnackbarProps(props);
1922 - const panelWidth = (0,_sync_get_editing_panel_width__WEBPACK_IMPORTED_MODULE_7__.getEditingPanelWidth)();
1923 - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_4__.ThemeProvider, {
1924 - palette: "unstable"
1925 - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_4__.SnackbarContent, _extends({
1926 - ref: ref
1927 - }, filteredProps, {
1928 - sx: {
1929 - '&.MuiPaper-root': {
1930 - minWidth: 'max-content'
1931 - },
1932 - ml: panelWidth + 'px'
1933 - }
1934 - })));
1935 -});
1936 -const AlertSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({
1937 - color,
1938 - icon,
1939 - ...props
1940 -}, ref) => {
1941 - const panelWidth = (0,_sync_get_editing_panel_width__WEBPACK_IMPORTED_MODULE_7__.getEditingPanelWidth)();
1942 - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_4__.ThemeProvider, {
1943 - colorScheme: "light",
1944 - palette: "unstable"
1945 - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_4__.Alert, {
1946 - ref: ref,
1947 - variant: "standard",
1948 - color: color,
1949 - icon: icon,
1950 - role: "alert",
1951 - action: props.action,
1952 - onClose: () => (0,notistack__WEBPACK_IMPORTED_MODULE_1__.closeSnackbar)(props.id),
1953 - sx: {
1954 - ml: panelWidth + 'px',
1955 - '& .MuiAlert-message': {
1956 - display: 'flex',
1957 - flexWrap: 'nowrap',
1958 - alignItems: 'center'
1959 - },
1960 - '& .MuiAlert-content': {
1961 - whiteSpace: 'nowrap'
1962 - }
1963 - }
1964 - }, props.message));
1965 -});
1966 -const PromotionSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AlertSnackbar, _extends({
1967 - ref: ref,
1968 - color: "promotion",
1969 - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.CrownFilledIcon, null)
1970 -}, props)));
1971 -const InfoSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AlertSnackbar, _extends({
1972 - ref: ref,
1973 - color: "info",
1974 - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.InfoCircleFilledIcon, null)
1975 -}, props)));
1976 -const SuccessSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AlertSnackbar, _extends({
1977 - ref: ref,
1978 - color: "success",
1979 - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.CircleCheckFilledIcon, null)
1980 -}, props)));
1981 -const ErrorSnackbar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((props, ref) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AlertSnackbar, _extends({
1982 - ref: ref,
1983 - color: "error",
1984 - icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_icons__WEBPACK_IMPORTED_MODULE_2__.AlertCircleFilled, null)
1985 -}, props)));
1986 -const muiToEuiMapper = {
1987 - default: DefaultCustomSnackbar,
1988 - promotion: PromotionSnackbar,
1989 - info: InfoSnackbar,
1990 - success: SuccessSnackbar,
1991 - error: ErrorSnackbar
1992 -};
1993 -const Handler = () => {
1994 - const notifications = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_3__.__useSelector)(state => state.notifications);
1995 - (0,_hooks_use_enqueue_notifications__WEBPACK_IMPORTED_MODULE_5__.useEnqueueNotification)(notifications);
1996 - return null;
1997 -};
1998 -const Wrapper = () => {
1999 - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(notistack__WEBPACK_IMPORTED_MODULE_1__.SnackbarProvider, {
2000 - maxSnack: 3,
2001 - autoHideDuration: AUTO_HIDE_DURATION,
2002 - anchorOrigin: {
2003 - horizontal: 'center',
2004 - vertical: 'bottom'
2005 - },
2006 - Components: muiToEuiMapper
2007 - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Handler, null));
2008 -};
2009 -
2010 -/*
2011 - * This function can be used to trigger notifications from anywhere in the code.
2012 - * even if you're running in a JS environment as opposed to a React environment.
2013 - */
2014 -function notify(notification) {
2015 - const store = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_3__.__getStore)();
2016 - store?.dispatch((0,_slice__WEBPACK_IMPORTED_MODULE_6__.notifyAction)(notification));
2017 -}
2018 -function dismissNotification(id) {
2019 - const store = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_3__.__getStore)();
2020 - (0,notistack__WEBPACK_IMPORTED_MODULE_1__.closeSnackbar)(id);
2021 - store?.dispatch((0,_slice__WEBPACK_IMPORTED_MODULE_6__.clearAction)({
2022 - id
2023 - }));
2024 -}
2025 -
2026 -/*
2027 - * This function can be used to trigger notifications from within a React component.
2028 - * This is the preferred way to trigger notifications.
2029 - */
2030 -function NotifyReact(notification) {
2031 - const dispatch = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_3__.__useDispatch)();
2032 - dispatch((0,_slice__WEBPACK_IMPORTED_MODULE_6__.notifyAction)(notification));
2033 -}
2034 -function getFilteredSnackbarProps(props) {
2035 - const forbiddenProps = ['autoHideDuration', 'persist', 'hideIconVariant', 'iconVariant', 'anchorOrigin'];
2036 - return Object.entries(props).reduce((filteredProps, [key, value]) => {
2037 - if (!forbiddenProps.includes(key)) {
2038 - filteredProps[key] = value;
2039 - }
2040 - return filteredProps;
2041 - }, {});
2042 -}
2043 -/* harmony default export */ __webpack_exports__["default"] = (Wrapper);
2044 -
2045 -/***/ }),
2046 -
2047 -/***/ "./packages/packages/core/editor-notifications/src/hooks/use-enqueue-notifications.tsx":
2048 -/*!*********************************************************************************************!*\
2049 - !*** ./packages/packages/core/editor-notifications/src/hooks/use-enqueue-notifications.tsx ***!
2050 - \*********************************************************************************************/
2051 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2052 -
2053 -__webpack_require__.r(__webpack_exports__);
2054 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2055 -/* harmony export */ useEnqueueNotification: function() { return /* binding */ useEnqueueNotification; }
2056 -/* harmony export */ });
2057 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2058 -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2059 -/* harmony import */ var notistack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! notistack */ "./node_modules/notistack/notistack.esm.js");
2060 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @elementor/store */ "@elementor/store");
2061 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_elementor_store__WEBPACK_IMPORTED_MODULE_2__);
2062 -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
2063 -/* harmony import */ var _elementor_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__);
2064 -/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../slice */ "./packages/packages/core/editor-notifications/src/slice.ts");
2065 -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2066 -
2067 -
2068 -
2069 -
2070 -
2071 -
2072 -const AUTO_HIDE_DURATION = 8000;
2073 -function createDefaultAction(notification, onDismiss) {
2074 - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2075 - key: notification.id
2076 - }, notification.additionalActionProps?.map((additionalAction, index) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Button, _extends({
2077 - key: `${index}`
2078 - }, additionalAction))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.CloseButton, {
2079 - "aria-label": "close",
2080 - color: "inherit",
2081 - onClick: onDismiss
2082 - }));
2083 -}
2084 -function createPromotionAction(notification) {
2085 - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
2086 - key: notification.id
2087 - }, notification.additionalActionProps?.map((additionalAction, index) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_elementor_ui__WEBPACK_IMPORTED_MODULE_3__.Button, _extends({
2088 - key: `${index}`
2089 - }, additionalAction))));
2090 -}
2091 -const useEnqueueNotification = notifications => {
2092 - const {
2093 - enqueueSnackbar
2094 - } = (0,notistack__WEBPACK_IMPORTED_MODULE_1__.useSnackbar)();
2095 - const dispatch = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_2__.__useDispatch)();
2096 - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
2097 - Object.values(notifications).forEach(notification => {
2098 - const dismiss = () => {
2099 - (0,notistack__WEBPACK_IMPORTED_MODULE_1__.closeSnackbar)(notification.id);
2100 - dispatch((0,_slice__WEBPACK_IMPORTED_MODULE_4__.clearAction)({
2101 - id: notification.id
2102 - }));
2103 - };
2104 - const useAlertAction = ['promotion', 'info', 'success', 'error'].includes(notification.type);
2105 - const action = useAlertAction ? createPromotionAction(notification) : createDefaultAction(notification, dismiss);
2106 - enqueueSnackbar(notification.message, {
2107 - variant: notification.type,
2108 - key: notification.id,
2109 - onClose: () => dispatch((0,_slice__WEBPACK_IMPORTED_MODULE_4__.clearAction)({
2110 - id: notification.id
2111 - })),
2112 - preventDuplicate: true,
2113 - action,
2114 - autoHideDuration: notification.autoHideDuration ?? AUTO_HIDE_DURATION
2115 - });
2116 - });
2117 - }, [notifications, enqueueSnackbar, dispatch]);
2118 -};
2119 -
2120 -/***/ }),
2121 -
2122 -/***/ "./packages/packages/core/editor-notifications/src/init.ts":
2123 -/*!*****************************************************************!*\
2124 - !*** ./packages/packages/core/editor-notifications/src/init.ts ***!
2125 - \*****************************************************************/
2126 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2127 -
2128 -__webpack_require__.r(__webpack_exports__);
2129 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2130 -/* harmony export */ init: function() { return /* binding */ init; }
2131 -/* harmony export */ });
2132 -/* harmony import */ var _elementor_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/editor */ "@elementor/editor");
2133 -/* harmony import */ var _elementor_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_editor__WEBPACK_IMPORTED_MODULE_0__);
2134 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elementor/store */ "@elementor/store");
2135 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elementor_store__WEBPACK_IMPORTED_MODULE_1__);
2136 -/* harmony import */ var _components_notifications__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/notifications */ "./packages/packages/core/editor-notifications/src/components/notifications.tsx");
2137 -/* harmony import */ var _slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice */ "./packages/packages/core/editor-notifications/src/slice.ts");
2138 -
2139 -
2140 -
2141 -
2142 -function init() {
2143 - (0,_elementor_store__WEBPACK_IMPORTED_MODULE_1__.__registerSlice)(_slice__WEBPACK_IMPORTED_MODULE_3__.notificationsSlice);
2144 - (0,_elementor_editor__WEBPACK_IMPORTED_MODULE_0__.injectIntoTop)({
2145 - id: 'notifications',
2146 - component: _components_notifications__WEBPACK_IMPORTED_MODULE_2__["default"]
2147 - });
2148 -}
2149 -
2150 -/***/ }),
2151 -
2152 -/***/ "./packages/packages/core/editor-notifications/src/slice.ts":
2153 -/*!******************************************************************!*\
2154 - !*** ./packages/packages/core/editor-notifications/src/slice.ts ***!
2155 - \******************************************************************/
2156 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2157 -
2158 -__webpack_require__.r(__webpack_exports__);
2159 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2160 -/* harmony export */ clearAction: function() { return /* binding */ clearAction; },
2161 -/* harmony export */ notificationsSlice: function() { return /* binding */ notificationsSlice; },
2162 -/* harmony export */ notifyAction: function() { return /* binding */ notifyAction; }
2163 -/* harmony export */ });
2164 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elementor/store */ "@elementor/store");
2165 -/* harmony import */ var _elementor_store__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elementor_store__WEBPACK_IMPORTED_MODULE_0__);
2166 -
2167 -const notificationsSlice = (0,_elementor_store__WEBPACK_IMPORTED_MODULE_0__.__createSlice)({
2168 - name: 'notifications',
2169 - initialState: {},
2170 - reducers: {
2171 - notifyAction: (state, action) => {
2172 - const newState = {
2173 - ...state
2174 - };
2175 - if (!newState[action.payload.id]) {
2176 - newState[action.payload.id] = action.payload;
2177 - }
2178 - return newState;
2179 - },
2180 - clearAction: (state, action) => {
2181 - const newState = {
2182 - ...state
2183 - };
2184 - if (newState[action.payload.id]) {
2185 - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
2186 - delete newState[action.payload.id];
2187 - }
2188 - return newState;
2189 - }
2190 - }
2191 -});
2192 -const {
2193 - notifyAction,
2194 - clearAction
2195 -} = notificationsSlice.actions;
2196 -
2197 -/***/ }),
2198 -
2199 -/***/ "./packages/packages/core/editor-notifications/src/sync/get-editing-panel-width.ts":
2200 -/*!*****************************************************************************************!*\
2201 - !*** ./packages/packages/core/editor-notifications/src/sync/get-editing-panel-width.ts ***!
2202 - \*****************************************************************************************/
2203 -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2204 -
2205 -__webpack_require__.r(__webpack_exports__);
2206 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2207 -/* harmony export */ getEditingPanelWidth: function() { return /* binding */ getEditingPanelWidth; }
2208 -/* harmony export */ });
2209 -function getEditingPanelWidth() {
2210 - return document.querySelector('.elementor-panel')?.clientWidth || 0;
2211 -}
2212 -
2213 -/***/ }),
2214 -
2215 -/***/ "@elementor/editor":
2216 -/*!*****************************************!*\
2217 - !*** external ["elementorV2","editor"] ***!
2218 - \*****************************************/
2219 -/***/ (function(module) {
2220 -
2221 -module.exports = window["elementorV2"]["editor"];
2222 -
2223 -/***/ }),
2224 -
2225 -/***/ "@elementor/icons":
2226 -/*!****************************************!*\
2227 - !*** external ["elementorV2","icons"] ***!
2228 - \****************************************/
2229 -/***/ (function(module) {
2230 -
2231 -module.exports = window["elementorV2"]["icons"];
2232 -
2233 -/***/ }),
2234 -
2235 -/***/ "@elementor/store":
2236 -/*!****************************************!*\
2237 - !*** external ["elementorV2","store"] ***!
2238 - \****************************************/
2239 -/***/ (function(module) {
2240 -
2241 -module.exports = window["elementorV2"]["store"];
2242 -
2243 -/***/ }),
2244 -
2245 -/***/ "@elementor/ui":
2246 -/*!*************************************!*\
2247 - !*** external ["elementorV2","ui"] ***!
2248 - \*************************************/
2249 -/***/ (function(module) {
2250 -
2251 -module.exports = window["elementorV2"]["ui"];
2252 -
2253 -/***/ }),
2254 -
2255 -/***/ "react":
2256 -/*!**************************!*\
2257 - !*** external ["React"] ***!
2258 - \**************************/
2259 -/***/ (function(module) {
2260 -
2261 -module.exports = window["React"];
2262 -
2263 -/***/ }),
2264 -
2265 -/***/ "react-dom":
2266 -/*!*****************************!*\
2267 - !*** external ["ReactDOM"] ***!
2268 - \*****************************/
2269 -/***/ (function(module) {
2270 -
2271 -module.exports = window["ReactDOM"];
2272 -
2273 -/***/ })
2274 -
2275 -/******/ });
2276 -/************************************************************************/
2277 -/******/ // The module cache
2278 -/******/ var __webpack_module_cache__ = {};
2279 -/******/
2280 -/******/ // The require function
2281 -/******/ function __webpack_require__(moduleId) {
2282 -/******/ // Check if module is in cache
2283 -/******/ var cachedModule = __webpack_module_cache__[moduleId];
2284 -/******/ if (cachedModule !== undefined) {
2285 -/******/ return cachedModule.exports;
2286 -/******/ }
2287 -/******/ // Create a new module (and put it into the cache)
2288 -/******/ var module = __webpack_module_cache__[moduleId] = {
2289 -/******/ // no module.id needed
2290 -/******/ // no module.loaded needed
2291 -/******/ exports: {}
2292 -/******/ };
2293 -/******/
2294 -/******/ // Execute the module function
2295 -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2296 -/******/
2297 -/******/ // Return the exports of the module
2298 -/******/ return module.exports;
2299 -/******/ }
2300 -/******/
2301 -/************************************************************************/
2302 -/******/ /* webpack/runtime/compat get default export */
2303 -/******/ !function() {
2304 -/******/ // getDefaultExport function for compatibility with non-harmony modules
2305 -/******/ __webpack_require__.n = function(module) {
2306 -/******/ var getter = module && module.__esModule ?
2307 -/******/ function() { return module['default']; } :
2308 -/******/ function() { return module; };
2309 -/******/ __webpack_require__.d(getter, { a: getter });
2310 -/******/ return getter;
2311 -/******/ };
2312 -/******/ }();
2313 -/******/
2314 -/******/ /* webpack/runtime/define property getters */
2315 -/******/ !function() {
2316 -/******/ // define getter functions for harmony exports
2317 -/******/ __webpack_require__.d = function(exports, definition) {
2318 -/******/ for(var key in definition) {
2319 -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2320 -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2321 -/******/ }
2322 -/******/ }
2323 -/******/ };
2324 -/******/ }();
2325 -/******/
2326 -/******/ /* webpack/runtime/hasOwnProperty shorthand */
2327 -/******/ !function() {
2328 -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
2329 -/******/ }();
2330 -/******/
2331 -/******/ /* webpack/runtime/make namespace object */
2332 -/******/ !function() {
2333 -/******/ // define __esModule on exports
2334 -/******/ __webpack_require__.r = function(exports) {
2335 -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2336 -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2337 -/******/ }
2338 -/******/ Object.defineProperty(exports, '__esModule', { value: true });
2339 -/******/ };
2340 -/******/ }();
2341 -/******/
2342 -/************************************************************************/
2343 -var __webpack_exports__ = {};
2344 -// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
2345 -!function() {
2346 -/*!******************************************************************!*\
2347 - !*** ./packages/packages/core/editor-notifications/src/index.ts ***!
2348 - \******************************************************************/
2349 -__webpack_require__.r(__webpack_exports__);
2350 -/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2351 -/* harmony export */ NotifyReact: function() { return /* reexport safe */ _components_notifications__WEBPACK_IMPORTED_MODULE_1__.NotifyReact; },
2352 -/* harmony export */ dismissNotification: function() { return /* reexport safe */ _components_notifications__WEBPACK_IMPORTED_MODULE_1__.dismissNotification; },
2353 -/* harmony export */ init: function() { return /* reexport safe */ _init__WEBPACK_IMPORTED_MODULE_0__.init; },
2354 -/* harmony export */ notify: function() { return /* reexport safe */ _components_notifications__WEBPACK_IMPORTED_MODULE_1__.notify; }
2355 -/* harmony export */ });
2356 -/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init */ "./packages/packages/core/editor-notifications/src/init.ts");
2357 -/* harmony import */ var _components_notifications__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/notifications */ "./packages/packages/core/editor-notifications/src/components/notifications.tsx");
2358 -
2359 -
2360 -}();
2361 -(window.elementorV2 = window.elementorV2 || {}).editorNotifications = __webpack_exports__;
2362 -/******/ })()
2363 -;
2364 -window.elementorV2.editorNotifications?.init?.();
1 +/*! For license information please see editor-notifications.js.LICENSE.txt */
2 +!function(){"use strict";var e={"./node_modules/goober/dist/goober.modern.js":function(e,n,c){c.r(n),c.d(n,{css:function(){return u},extractCss:function(){return r},glob:function(){return E},keyframes:function(){return v},setup:function(){return m},styled:function(){return w}});let l={data:""},t=e=>{if("object"==typeof window){let n=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return n.nonce=window.__nonce__,n.parentNode||(e||document.head).appendChild(n),n.firstChild}return e||l},r=e=>{let n=t(e),c=n.data;return n.data="",c},d=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,f=/\/\*[^]*?\*\/| +/g,h=/\n+/g,o=(e,n)=>{let c="",l="",d="";for(let f in e){let h=e[f];"@"==f[0]?"i"==f[1]?c=f+" "+h+";":l+="f"==f[1]?o(h,f):f+"{"+o(h,"k"==f[1]?"":n)+"}":"object"==typeof h?l+=o(h,n?n.replace(/([^,])+/g,e=>f.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,n=>/&/.test(n)?n.replace(/&/g,e):e?e+" "+n:n)):f):null!=h&&(f=/^--/.test(f)?f:f.replace(/[A-Z]/g,"-$&").toLowerCase(),d+=o.p?o.p(f,h):f+":"+h+";")}return c+(n&&d?n+"{"+d+"}":d)+l},g={},s=e=>{if("object"==typeof e){let n="";for(let c in e)n+=c+s(e[c]);return n}return e},i=(e,n,c,l,x)=>{let k=s(e),b=g[k]||(g[k]=(e=>{let n=0,c=11;for(;n<e.length;)c=101*c+e.charCodeAt(n++)>>>0;return"go"+c})(k));if(!g[b]){let n=k!==e?e:(e=>{let n,c,l=[{}];for(;n=d.exec(e.replace(f,""));)n[4]?l.shift():n[3]?(c=n[3].replace(h," ").trim(),l.unshift(l[0][c]=l[0][c]||{})):l[0][n[1]]=n[2].replace(h," ").trim();return l[0]})(e);g[b]=o(x?{["@keyframes "+b]:n}:n,c?"":"."+b)}let E=c&&g.g?g.g:null;return c&&(g.g=g[b]),((e,n,c,l)=>{l?n.data=n.data.replace(l,e):-1===n.data.indexOf(e)&&(n.data=c?e+n.data:n.data+e)})(g[b],n,l,E),b},p=(e,n,c)=>e.reduce((e,l,d)=>{let f=n[d];if(f&&f.call){let e=f(c),n=e&&e.props&&e.props.className||/^go/.test(e)&&e;f=n?"."+n:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e}return e+l+(null==f?"":f)},"");function u(e){let n=this||{},c=e.call?e(n.p):e;return i(c.unshift?c.raw?p(c,[].slice.call(arguments,1),n.p):c.reduce((e,c)=>Object.assign(e,c&&c.call?c(n.p):c),{}):c,t(n.target),n.g,n.o,n.k)}let x,k,b,E=u.bind({g:1}),v=u.bind({k:1});function m(e,n,c,l){o.p=n,x=e,k=c,b=l}function w(e,n){let c=this||{};return function(){let l=arguments;function a(d,f){let h=Object.assign({},d),g=h.className||a.className;c.p=Object.assign({theme:k&&k()},h),c.o=/ *go\d+/.test(g),h.className=u.apply(c,l)+(g?" "+g:""),n&&(h.ref=f);let E=e;return e[0]&&(E=h.as||e,delete h.as),b&&E[0]&&b(h),x(E,h)}return n?n(a):a}}},"./node_modules/notistack/node_modules/clsx/dist/clsx.m.js":function(e,n,c){function r(e){var n,c,l="";if("string"==typeof e||"number"==typeof e)l+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(c=r(e[n]))&&(l&&(l+=" "),l+=c);else for(n in e)e[n]&&(l&&(l+=" "),l+=n);return l}function clsx(){for(var e,n,c=0,l="";c<arguments.length;)(e=arguments[c++])&&(n=r(e))&&(l&&(l+=" "),l+=n);return l}c.r(n),c.d(n,{clsx:function(){return clsx}}),n.default=clsx},"./node_modules/notistack/notistack.esm.js":function(e,n,c){c.r(n),c.d(n,{MaterialDesignContent:function(){return xe},SnackbarContent:function(){return ae},SnackbarProvider:function(){return Oe},Transition:function(){return L},closeSnackbar:function(){return ge},enqueueSnackbar:function(){return he},useSnackbar:function(){return useSnackbar}});var l=c("react"),d=c.n(l),f=c("react-dom"),h=c("./node_modules/notistack/node_modules/clsx/dist/clsx.m.js"),g=c("./node_modules/goober/dist/goober.modern.js");function _defineProperties(e,n){for(var c=0;c<n.length;c++){var l=n[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function _createClass(e,n,c){return n&&_defineProperties(e.prototype,n),c&&_defineProperties(e,c),e}function _extends(){return _extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var c=arguments[n];for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&(e[l]=c[l])}return e},_extends.apply(this,arguments)}function _inheritsLoose(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}function _objectWithoutPropertiesLoose(e,n){if(null==e)return{};var c,l,d={},f=Object.keys(e);for(l=0;l<f.length;l++)c=f[l],n.indexOf(c)>=0||(d[c]=e[c]);return d}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var x=function noOp(){return""},k=d().createContext({enqueueSnackbar:x,closeSnackbar:x}),b="@media (max-width:599.95px)",E="@media (min-width:600px)",v=function capitalise(e){return e.charAt(0).toUpperCase()+e.slice(1)},y=function originKeyExtractor(e){return""+v(e.vertical)+v(e.horizontal)},_=function isDefined(e){return!!e||0===e},S="unmounted",C="exited",T="entering",O="entered",P="exiting",L=function(e){function Transition(n){var c;c=e.call(this,n)||this;var l,d=n.appear;return c.appearStatus=null,n.in?d?(l=C,c.appearStatus=T):l=O:l=n.unmountOnExit||n.mountOnEnter?S:C,c.state={status:l},c.nextCallback=null,c}_inheritsLoose(Transition,e),Transition.getDerivedStateFromProps=function getDerivedStateFromProps(e,n){return e.in&&n.status===S?{status:C}:null};var n=Transition.prototype;return n.componentDidMount=function componentDidMount(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function componentDidUpdate(e){var n=null;if(e!==this.props){var c=this.state.status;this.props.in?c!==T&&c!==O&&(n=T):c!==T&&c!==O||(n=P)}this.updateStatus(!1,n)},n.componentWillUnmount=function componentWillUnmount(){this.cancelNextCallback()},n.getTimeouts=function getTimeouts(){var e=this.props.timeout,n=e,c=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(c=e.exit,n=e.enter),{exit:c,enter:n}},n.updateStatus=function updateStatus(e,n){void 0===e&&(e=!1),null!==n?(this.cancelNextCallback(),n===T?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===C&&this.setState({status:S})},n.performEnter=function performEnter(e){var n=this,c=this.props.enter,l=e,d=this.getTimeouts();e||c?(this.props.onEnter&&this.props.onEnter(this.node,l),this.safeSetState({status:T},function(){n.props.onEntering&&n.props.onEntering(n.node,l),n.onTransitionEnd(d.enter,function(){n.safeSetState({status:O},function(){n.props.onEntered&&n.props.onEntered(n.node,l)})})})):this.safeSetState({status:O},function(){n.props.onEntered&&n.props.onEntered(n.node,l)})},n.performExit=function performExit(){var e=this,n=this.props.exit,c=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:P},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(c.exit,function(){e.safeSetState({status:C},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:C},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function cancelNextCallback(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function safeSetState(e,n){n=this.setNextCallback(n),this.setState(e,n)},n.setNextCallback=function setNextCallback(e){var n=this,c=!0;return this.nextCallback=function(){c&&(c=!1,n.nextCallback=null,e())},this.nextCallback.cancel=function(){c=!1},this.nextCallback},n.onTransitionEnd=function onTransitionEnd(e,n){this.setNextCallback(n);var c=null==e&&!this.props.addEndListener;this.node&&!c?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function render(){var e=this.state.status;if(e===S)return null;var n=this.props;return(0,n.children)(e,_objectWithoutPropertiesLoose(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},_createClass(Transition,[{key:"node",get:function get(){var e,n=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),Transition}(d().Component);function noop(){}function setRef(e,n){"function"==typeof e?e(n):e&&(e.current=n)}function useForkRef(e,n){return(0,l.useMemo)(function(){return null==e&&null==n?null:function(c){setRef(e,c),setRef(n,c)}},[e,n])}function getTransitionProps(e){var n=e.timeout,c=e.style,l=void 0===c?{}:c,d=e.mode;return{duration:"object"==typeof n?n[d]||0:n,easing:l.transitionTimingFunction,delay:l.transitionDelay}}L.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop,onEntering:noop,onEntered:noop,onExit:noop,onExiting:noop,onExited:noop};var D="cubic-bezier(0.4, 0, 0.2, 1)",N="cubic-bezier(0.0, 0, 0.2, 1)",j="cubic-bezier(0.4, 0, 0.6, 1)",R=function reflow(e){e.scrollTop=e.scrollTop},q=function formatMs(e){return Math.round(e)+"ms"};function createTransition(e,n){void 0===e&&(e=["all"]);var c=n||{},l=c.duration,d=void 0===l?300:l,f=c.easing,h=void 0===f?D:f,g=c.delay,x=void 0===g?0:g;return(Array.isArray(e)?e:[e]).map(function(e){var n="string"==typeof d?d:q(d),c="string"==typeof x?x:q(x);return e+" "+n+" "+h+" "+c}).join(",")}function ownerWindow(e){var n=function ownerDocument(e){return e&&e.ownerDocument||document}(e);return n.defaultView||window}function setTranslateValue(e,n){if(n){var c=function getTranslateValue(e,n){var c,l=n.getBoundingClientRect(),d=ownerWindow(n);if(n.fakeTransform)c=n.fakeTransform;else{var f=d.getComputedStyle(n);c=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}var h=0,g=0;if(c&&"none"!==c&&"string"==typeof c){var x=c.split("(")[1].split(")")[0].split(",");h=parseInt(x[4],10),g=parseInt(x[5],10)}switch(e){case"left":return"translateX("+(d.innerWidth+h-l.left)+"px)";case"right":return"translateX(-"+(l.left+l.width-h)+"px)";case"up":return"translateY("+(d.innerHeight+g-l.top)+"px)";default:return"translateY(-"+(l.top+l.height-g)+"px)"}}(e,n);c&&(n.style.webkitTransform=c,n.style.transform=c)}}var A=(0,l.forwardRef)(function(e,n){var c=e.children,d=e.direction,f=void 0===d?"down":d,h=e.in,g=e.style,x=e.timeout,k=void 0===x?0:x,b=e.onEnter,E=e.onEntered,v=e.onExit,y=e.onExited,_=_objectWithoutPropertiesLoose(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),S=(0,l.useRef)(null),C=useForkRef(c.ref,S),T=useForkRef(C,n),O=(0,l.useCallback)(function(){S.current&&setTranslateValue(f,S.current)},[f]);return(0,l.useEffect)(function(){if(!h&&"down"!==f&&"right"!==f){var e=function debounce(e,n){var c;function debounced(){for(var l=this,d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];clearTimeout(c),c=setTimeout(function later(){e.apply(l,f)},n)}return void 0===n&&(n=166),debounced.clear=function(){clearTimeout(c)},debounced}(function(){S.current&&setTranslateValue(f,S.current)}),n=ownerWindow(S.current);return n.addEventListener("resize",e),function(){e.clear(),n.removeEventListener("resize",e)}}},[f,h]),(0,l.useEffect)(function(){h||O()},[h,O]),(0,l.createElement)(L,Object.assign({appear:!0,nodeRef:S,onEnter:function handleEnter(e,n){setTranslateValue(f,e),R(e),b&&b(e,n)},onEntered:E,onEntering:function handleEntering(e){var n=(null==g?void 0:g.transitionTimingFunction)||N,c=getTransitionProps({timeout:k,mode:"enter",style:_extends({},g,{transitionTimingFunction:n})});e.style.webkitTransition=createTransition("-webkit-transform",c),e.style.transition=createTransition("transform",c),e.style.webkitTransform="none",e.style.transform="none"},onExit:function handleExit(e){var n=(null==g?void 0:g.transitionTimingFunction)||j,c=getTransitionProps({timeout:k,mode:"exit",style:_extends({},g,{transitionTimingFunction:n})});e.style.webkitTransition=createTransition("-webkit-transform",c),e.style.transition=createTransition("transform",c),setTranslateValue(f,e),v&&v(e)},onExited:function handleExited(e){e.style.webkitTransition="",e.style.transition="",y&&y(e)},in:h,timeout:k},_),function(e,n){return(0,l.cloneElement)(c,_extends({ref:T,style:_extends({visibility:"exited"!==e||h?void 0:"hidden"},g,{},c.props.style)},n))})});A.displayName="Slide";var M=function SvgIcon(e){return d().createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},I=function CheckIcon(){return d().createElement(M,null,d().createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},W=function WarningIcon(){return d().createElement(M,null,d().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},V=function ErrorIcon(){return d().createElement(M,null,d().createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},F=function InfoIcon(){return d().createElement(M,null,d().createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},H={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:d().createElement(I,null),warning:d().createElement(W,null),error:d().createElement(V,null),info:d().createElement(F,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:A,transitionDuration:{enter:225,exit:195}},z=function merge(e,n){return function(c,l){return void 0===l&&(l=!1),l?_extends({},H[c],{},n[c],{},e[c]):"autoHideDuration"===c?function getAutoHideDuration(e,n){var c=function isNumberOrNull(e){return"number"==typeof e||null===e};return c(e)?e:c(n)?n:H.autoHideDuration}(e.autoHideDuration,n.autoHideDuration):"transitionDuration"===c?function getTransitionDuration(e,n){var c=function is(e,n){return n.some(function(n){return typeof e===n})};return c(e,["string","number"])?e:c(e,["object"])?_extends({},H.transitionDuration,{},c(n,["object"])&&n,{},e):c(n,["string","number"])?n:c(n,["object"])?_extends({},H.transitionDuration,{},n):H.transitionDuration}(e.transitionDuration,n.transitionDuration):e[c]||n[c]||H[c]}};function makeStyles(e){return Object.entries(e).reduce(function(e,n){var c,l=n[0],d=n[1];return _extends({},e,((c={})[l]=(0,g.css)(d),c))},{})}var B="notistack-SnackbarContainer",U="notistack-Snackbar",Z="notistack-CollapseWrapper",X="notistack-MuiContent",G=function MuiContentVariant(e){return"notistack-MuiContent-"+e},Q=makeStyles({root:{height:0},entered:{height:"auto"}}),$="0px",K=(0,l.forwardRef)(function(e,n){var c=e.children,d=e.in,f=e.onExited,g=(0,l.useRef)(null),x=(0,l.useRef)(null),k=useForkRef(n,x),b=function getWrapperSize(){return g.current?g.current.clientHeight:0};return(0,l.createElement)(L,{in:d,unmountOnExit:!0,onEnter:function handleEnter(e){e.style.height=$},onEntered:function handleEntered(e){e.style.height="auto"},onEntering:function handleEntering(e){var n=b(),c=getTransitionProps({timeout:175,mode:"enter"}),l=c.duration,d=c.easing;e.style.transitionDuration="string"==typeof l?l:l+"ms",e.style.height=n+"px",e.style.transitionTimingFunction=d||""},onExit:function handleExit(e){e.style.height=b()+"px"},onExited:f,onExiting:function handleExiting(e){R(e);var n=getTransitionProps({timeout:175,mode:"exit"}),c=n.duration,l=n.easing;e.style.transitionDuration="string"==typeof c?c:c+"ms",e.style.height=$,e.style.transitionTimingFunction=l||""},nodeRef:x,timeout:175},function(e,n){return(0,l.createElement)("div",Object.assign({ref:k,className:(0,h.default)(Q.root,"entered"===e&&Q.entered),style:_extends({pointerEvents:"all",overflow:"hidden",minHeight:$,transition:createTransition("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!d&&{visibility:"hidden"})},n),(0,l.createElement)("div",{ref:g,className:Z,style:{display:"flex",width:"100%"}},c))})});K.displayName="Collapse";var Y={right:"left",left:"right",bottom:"up",top:"down"},J=function getSlideDirection(e){return"center"!==e.horizontal?Y[e.horizontal]:Y[e.vertical]},ee=function toSnackbarAnchorOrigin(e){return"anchorOrigin"+y(e)},ne=function noOp(){};function createChainedFunction(e,n){return e.reduce(function(e,c){return null==c?e:function chainedFunction(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var h=[].concat(d);n&&-1===h.indexOf(n)&&h.push(n),e.apply(this,h),c.apply(this,h)}},ne)}var te="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;function useEventCallback(e){var n=(0,l.useRef)(e);return te(function(){n.current=e}),(0,l.useCallback)(function(){return n.current.apply(void 0,arguments)},[])}var re,oe=(0,l.forwardRef)(function(e,n){var c=e.children,d=e.className,f=e.autoHideDuration,g=e.disableWindowBlurListener,x=void 0!==g&&g,k=e.onClose,b=e.id,E=e.open,v=e.SnackbarProps,y=void 0===v?{}:v,_=(0,l.useRef)(),S=useEventCallback(function(){k&&k.apply(void 0,arguments)}),C=useEventCallback(function(e){k&&null!=e&&(_.current&&clearTimeout(_.current),_.current=setTimeout(function(){S(null,"timeout",b)},e))});(0,l.useEffect)(function(){return E&&C(f),function(){_.current&&clearTimeout(_.current)}},[E,f,C]);var T=function handlePause(){_.current&&clearTimeout(_.current)},O=(0,l.useCallback)(function(){null!=f&&C(.5*f)},[f,C]);return(0,l.useEffect)(function(){if(!x&&E)return window.addEventListener("focus",O),window.addEventListener("blur",T),function(){window.removeEventListener("focus",O),window.removeEventListener("blur",T)}},[x,O,E]),(0,l.createElement)("div",Object.assign({ref:n},y,{className:(0,h.default)(U,d),onMouseEnter:function handleMouseEnter(e){y.onMouseEnter&&y.onMouseEnter(e),T()},onMouseLeave:function handleMouseLeave(e){y.onMouseLeave&&y.onMouseLeave(e),O()}}),c)});oe.displayName="Snackbar";var ie=makeStyles({root:(re={display:"flex",flexWrap:"wrap",flexGrow:1},re[E]={flexGrow:"initial",minWidth:"288px"},re)}),ae=(0,l.forwardRef)(function(e,n){var c=e.className,l=_objectWithoutPropertiesLoose(e,["className"]);return d().createElement("div",Object.assign({ref:n,className:(0,h.default)(ie.root,c)},l))});ae.displayName="SnackbarContent";var se=makeStyles({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ce="notistack-snackbar",ue=(0,l.forwardRef)(function(e,n){var c=e.id,l=e.message,f=e.action,g=e.iconVariant,x=e.variant,k=e.hideIconVariant,b=e.style,E=e.className,v=g[x],y=f;return"function"==typeof y&&(y=y(c)),d().createElement(ae,{ref:n,role:"alert","aria-describedby":ce,style:b,className:(0,h.default)(X,G(x),se.root,se[x],E,!k&&v&&se.lessPadding)},d().createElement("div",{id:ce,className:se.message},k?null:v,l),y&&d().createElement("div",{className:se.action},y))});ue.displayName="MaterialDesignContent";var le,de,fe,pe,me,he,ge,xe=(0,l.memo)(ue),ke=makeStyles({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),be=function SnackbarItem(e){var n=(0,l.useRef)(),c=(0,l.useState)(!0),f=c[0],g=c[1],x=createChainedFunction([e.snack.onClose,e.onClose]),k=(0,l.useCallback)(function(){n.current=setTimeout(function(){g(function(e){return!e})},125)},[]);(0,l.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var b=e.snack,E=e.classes,v=e.Component,y=void 0===v?xe:v,_=(0,l.useMemo)(function(){return function keepSnackbarClassKeys(e){void 0===e&&(e={});var n={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!n[e]}).reduce(function(n,c){var l;return _extends({},n,((l={})[c]=e[c],l))},{})}(E)},[E]),S=b.open,C=b.SnackbarProps,T=b.TransitionComponent,O=b.TransitionProps,P=b.transitionDuration,L=b.disableWindowBlurListener,D=b.content,N=_objectWithoutPropertiesLoose(b,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),j=_extends({direction:J(N.anchorOrigin),timeout:P},O),R=D;"function"==typeof R&&(R=R(N.id,N.message));var q=["onEnter","onEntered","onExit","onExited"].reduce(function(n,c){var l;return _extends({},n,((l={})[c]=createChainedFunction([e.snack[c],e[c]],N.id),l))},{});return d().createElement(K,{in:f,onExited:q.onExited},d().createElement(oe,{open:S,id:N.id,disableWindowBlurListener:L,autoHideDuration:N.autoHideDuration,className:(0,h.default)(ke.wrappedRoot,_.root,_[ee(N.anchorOrigin)]),SnackbarProps:C,onClose:x},d().createElement(T,Object.assign({},j,{appear:!0,in:S,onExit:q.onExit,onExited:k,onEnter:q.onEnter,onEntered:createChainedFunction([q.onEntered,function handleEntered(){e.snack.requestClose&&x(null,"instructed",e.snack.id)}],N.id)}),R||d().createElement(y,Object.assign({},N)))))},Ee={default:20,dense:4},ve={default:6,dense:2},ye="."+Z,_e=makeStyles({root:(le={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:createTransition(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},le[ye]={padding:ve.default+"px 0px",transition:"padding 300ms ease 0ms"},le.maxWidth="calc(100% - "+2*Ee.default+"px)",le[b]={width:"100%",maxWidth:"calc(100% - 32px)"},le),rootDense:(de={},de[ye]={padding:ve.dense+"px 0px"},de),top:{top:Ee.default-ve.default+"px",flexDirection:"column"},bottom:{bottom:Ee.default-ve.default+"px",flexDirection:"column-reverse"},left:(fe={left:Ee.default+"px"},fe[E]={alignItems:"flex-start"},fe[b]={left:"16px"},fe),right:(pe={right:Ee.default+"px"},pe[E]={alignItems:"flex-end"},pe[b]={right:"16px"},pe),center:(me={left:"50%",transform:"translateX(-50%)"},me[E]={alignItems:"center"},me)}),we=function SnackbarContainer(e){var n=e.classes,c=void 0===n?{}:n,l=e.anchorOrigin,f=e.dense,g=e.children,x=(0,h.default)(B,_e[l.vertical],_e[l.horizontal],_e.root,c.containerRoot,c["containerAnchorOrigin"+y(l)],f&&_e.rootDense);return d().createElement("div",{className:x},g)},Se=(0,l.memo)(we),Ce={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},Te=function isOptions(e){return!("string"==typeof e||(0,l.isValidElement)(e))},Oe=function(e){function SnackbarProvider(n){var c;return(c=e.call(this,n)||this).enqueueSnackbar=function(e,n){if(void 0===n&&(n={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var l=Te(e)?e:n,d=Te(e)?e.message:e,f=l.key,g=l.preventDuplicate,x=_objectWithoutPropertiesLoose(l,["key","preventDuplicate"]),k=_(f),b=k?f:(new Date).getTime()+Math.random(),E=z(x,c.props),v=_extends({id:b},x,{message:d,open:!0,entered:!1,requestClose:!1,persist:E("persist"),action:E("action"),content:E("content"),variant:E("variant"),anchorOrigin:E("anchorOrigin"),disableWindowBlurListener:E("disableWindowBlurListener"),autoHideDuration:E("autoHideDuration"),hideIconVariant:E("hideIconVariant"),TransitionComponent:E("TransitionComponent"),transitionDuration:E("transitionDuration"),TransitionProps:E("TransitionProps",!0),iconVariant:E("iconVariant",!0),style:E("style",!0),SnackbarProps:E("SnackbarProps",!0),className:(0,h.default)(c.props.className,x.className)});return v.persist&&(v.autoHideDuration=void 0),c.setState(function(e){if(void 0===g&&c.props.preventDuplicate||g){var n=function compareFunction(e){return k?e.id===b:e.message===d},l=e.queue.findIndex(n)>-1,f=e.snacks.findIndex(n)>-1;if(l||f)return e}return c.handleDisplaySnack(_extends({},e,{queue:[].concat(e.queue,[v])}))}),b},c.handleDisplaySnack=function(e){return e.snacks.length>=c.maxSnack?c.handleDismissOldest(e):c.processQueue(e)},c.processQueue=function(e){var n=e.queue,c=e.snacks;return n.length>0?_extends({},e,{snacks:[].concat(c,[n[0]]),queue:n.slice(1,n.length)}):e},c.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var n=!1,l=!1;e.snacks.reduce(function(e,n){return e+(n.open&&n.persist?1:0)},0)===c.maxSnack&&(!function(e){var n=Ce[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+n);try{throw new Error(n)}catch(e){}}("NO_PERSIST_ALL"),l=!0);var d=e.snacks.map(function(e){return n||e.persist&&!l?_extends({},e):(n=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),c.props.onClose&&c.props.onClose(null,"maxsnack",e.id),_extends({},e,{open:!1})):_extends({},e,{requestClose:!0}))});return _extends({},e,{snacks:d})},c.handleEnteredSnack=function(e,n,l){if(!_(l))throw new Error("handleEnteredSnack Cannot be called with undefined key");c.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===l?_extends({},e,{entered:!0}):_extends({},e)})}})},c.handleCloseSnack=function(e,n,l){c.props.onClose&&c.props.onClose(e,n,l);var d=void 0===l;c.setState(function(e){var n=e.snacks,c=e.queue;return{snacks:n.map(function(e){return d||e.id===l?e.entered?_extends({},e,{open:!1}):_extends({},e,{requestClose:!0}):_extends({},e)}),queue:c.filter(function(e){return e.id!==l})}})},c.closeSnackbar=function(e){var n=c.state.snacks.find(function(n){return n.id===e});_(e)&&n&&n.onClose&&n.onClose(null,"instructed",e),c.handleCloseSnack(null,"instructed",e)},c.handleExitedSnack=function(e,n){if(!_(n))throw new Error("handleExitedSnack Cannot be called with undefined key");c.setState(function(e){var l=c.processQueue(_extends({},e,{snacks:e.snacks.filter(function(e){return e.id!==n})}));return 0===l.queue.length?l:c.handleDismissOldest(l)})},he=c.enqueueSnackbar,ge=c.closeSnackbar,c.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:c.enqueueSnackbar.bind(_assertThisInitialized(c)),closeSnackbar:c.closeSnackbar.bind(_assertThisInitialized(c))}},c}return _inheritsLoose(SnackbarProvider,e),SnackbarProvider.prototype.render=function render(){var e=this,n=this.state.contextValue,c=this.props,l=c.domRoot,h=c.children,g=c.dense,x=void 0!==g&&g,b=c.Components,E=void 0===b?{}:b,v=c.classes,_=this.state.snacks.reduce(function(e,n){var c,l=y(n.anchorOrigin),d=e[l]||[];return _extends({},e,((c={})[l]=[].concat(d,[n]),c))},{}),S=Object.keys(_).map(function(n){var c=_[n],l=c[0];return d().createElement(Se,{key:n,dense:x,anchorOrigin:l.anchorOrigin,classes:v},c.map(function(n){return d().createElement(be,{key:n.id,snack:n,classes:v,Component:E[n.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:createChainedFunction([e.handleExitedSnack,e.props.onExited],n.id),onEntered:createChainedFunction([e.handleEnteredSnack,e.props.onEntered],n.id)})}))});return d().createElement(k.Provider,{value:n},h,l?(0,f.createPortal)(S,l):S)},_createClass(SnackbarProvider,[{key:"maxSnack",get:function get(){return this.props.maxSnack||H.maxSnack}}]),SnackbarProvider}(l.Component),useSnackbar=function(){return(0,l.useContext)(k)}},"./packages/packages/core/editor-notifications/src/components/notifications.tsx":function(e,n,c){c.r(n),c.d(n,{NotifyReact:function(){return NotifyReact},dismissNotification:function(){return dismissNotification},notify:function(){return notify}});var l=c("react"),d=c("./node_modules/notistack/notistack.esm.js"),f=c("@elementor/icons"),h=c("@elementor/store"),g=c("@elementor/ui"),x=c("./packages/packages/core/editor-notifications/src/hooks/use-enqueue-notifications.tsx"),k=c("./packages/packages/core/editor-notifications/src/slice.ts"),b=c("./packages/packages/core/editor-notifications/src/sync/get-editing-panel-width.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var c=arguments[n];for(var l in c)({}).hasOwnProperty.call(c,l)&&(e[l]=c[l])}return e},_extends.apply(null,arguments)}const E=(0,l.forwardRef)((e,n)=>{const c=function getFilteredSnackbarProps(e){const n=["autoHideDuration","persist","hideIconVariant","iconVariant","anchorOrigin"];return Object.entries(e).reduce((e,[c,l])=>(n.includes(c)||(e[c]=l),e),{})}(e),d=(0,b.getEditingPanelWidth)();return l.createElement(g.ThemeProvider,{palette:"unstable"},l.createElement(g.SnackbarContent,_extends({ref:n},c,{sx:{"&.MuiPaper-root":{minWidth:"max-content"},ml:d+"px"}})))}),v=(0,l.forwardRef)(({color:e,icon:n,...c},f)=>{const h=(0,b.getEditingPanelWidth)();return l.createElement(g.ThemeProvider,{colorScheme:"light",palette:"unstable"},l.createElement(g.Alert,{ref:f,variant:"standard",color:e,icon:n,role:"alert",action:c.action,onClose:()=>(0,d.closeSnackbar)(c.id),sx:{ml:h+"px","& .MuiAlert-message":{display:"flex",flexWrap:"nowrap",alignItems:"center"},"& .MuiAlert-content":{whiteSpace:"nowrap"}}},c.message))}),y={default:E,promotion:(0,l.forwardRef)((e,n)=>l.createElement(v,_extends({ref:n,color:"promotion",icon:l.createElement(f.CrownFilledIcon,null)},e))),info:(0,l.forwardRef)((e,n)=>l.createElement(v,_extends({ref:n,color:"info",icon:l.createElement(f.InfoCircleFilledIcon,null)},e))),success:(0,l.forwardRef)((e,n)=>l.createElement(v,_extends({ref:n,color:"success",icon:l.createElement(f.CircleCheckFilledIcon,null)},e))),error:(0,l.forwardRef)((e,n)=>l.createElement(v,_extends({ref:n,color:"error",icon:l.createElement(f.AlertCircleFilled,null)},e)))},Handler=()=>{const e=(0,h.__useSelector)(e=>e.notifications);return(0,x.useEnqueueNotification)(e),null};function notify(e){const n=(0,h.__getStore)();n?.dispatch((0,k.notifyAction)(e))}function dismissNotification(e){const n=(0,h.__getStore)();(0,d.closeSnackbar)(e),n?.dispatch((0,k.clearAction)({id:e}))}function NotifyReact(e){(0,h.__useDispatch)()((0,k.notifyAction)(e))}n.default=()=>l.createElement(d.SnackbarProvider,{maxSnack:3,autoHideDuration:8e3,anchorOrigin:{horizontal:"center",vertical:"bottom"},Components:y},l.createElement(Handler,null))},"./packages/packages/core/editor-notifications/src/hooks/use-enqueue-notifications.tsx":function(e,n,c){c.r(n),c.d(n,{useEnqueueNotification:function(){return useEnqueueNotification}});var l=c("react"),d=c("./node_modules/notistack/notistack.esm.js"),f=c("@elementor/store"),h=c("@elementor/ui"),g=c("./packages/packages/core/editor-notifications/src/slice.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var c=arguments[n];for(var l in c)({}).hasOwnProperty.call(c,l)&&(e[l]=c[l])}return e},_extends.apply(null,arguments)}const useEnqueueNotification=e=>{const{enqueueSnackbar:n}=(0,d.useSnackbar)(),c=(0,f.__useDispatch)();(0,l.useEffect)(()=>{Object.values(e).forEach(e=>{const f=["promotion","info","success","error"].includes(e.type)?function createPromotionAction(e){return l.createElement(l.Fragment,{key:e.id},e.additionalActionProps?.map((e,n)=>l.createElement(h.Button,_extends({key:`${n}`},e))))}(e):function createDefaultAction(e,n){return l.createElement(l.Fragment,{key:e.id},e.additionalActionProps?.map((e,n)=>l.createElement(h.Button,_extends({key:`${n}`},e))),l.createElement(h.CloseButton,{"aria-label":"close",color:"inherit",onClick:n}))}(e,()=>{(0,d.closeSnackbar)(e.id),c((0,g.clearAction)({id:e.id}))});n(e.message,{variant:e.type,key:e.id,onClose:()=>c((0,g.clearAction)({id:e.id})),preventDuplicate:!0,action:f,autoHideDuration:e.autoHideDuration??8e3})})},[e,n,c])}},"./packages/packages/core/editor-notifications/src/init.ts":function(e,n,c){c.r(n),c.d(n,{init:function(){return init}});var l=c("@elementor/editor"),d=c("@elementor/store"),f=c("./packages/packages/core/editor-notifications/src/components/notifications.tsx"),h=c("./packages/packages/core/editor-notifications/src/slice.ts");function init(){(0,d.__registerSlice)(h.notificationsSlice),(0,l.injectIntoTop)({id:"notifications",component:f.default})}},"./packages/packages/core/editor-notifications/src/slice.ts":function(e,n,c){c.r(n),c.d(n,{clearAction:function(){return h},notificationsSlice:function(){return d},notifyAction:function(){return f}});var l=c("@elementor/store");const d=(0,l.__createSlice)({name:"notifications",initialState:{},reducers:{notifyAction:(e,n)=>{const c={...e};return c[n.payload.id]||(c[n.payload.id]=n.payload),c},clearAction:(e,n)=>{const c={...e};return c[n.payload.id]&&delete c[n.payload.id],c}}}),{notifyAction:f,clearAction:h}=d.actions},"./packages/packages/core/editor-notifications/src/sync/get-editing-panel-width.ts":function(e,n,c){function getEditingPanelWidth(){return document.querySelector(".elementor-panel")?.clientWidth||0}c.r(n),c.d(n,{getEditingPanelWidth:function(){return getEditingPanelWidth}})},"@elementor/editor":function(e){e.exports=window.elementorV2.editor},"@elementor/icons":function(e){e.exports=window.elementorV2.icons},"@elementor/store":function(e){e.exports=window.elementorV2.store},"@elementor/ui":function(e){e.exports=window.elementorV2.ui},react:function(e){e.exports=window.React},"react-dom":function(e){e.exports=window.ReactDOM}},n={};function __webpack_require__(c){var l=n[c];if(void 0!==l)return l.exports;var d=n[c]={exports:{}};return e[c](d,d.exports,__webpack_require__),d.exports}__webpack_require__.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=function(e,n){for(var c in n)__webpack_require__.o(n,c)&&!__webpack_require__.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:n[c]})},__webpack_require__.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};!function(){__webpack_require__.r(c),__webpack_require__.d(c,{NotifyReact:function(){return n.NotifyReact},dismissNotification:function(){return n.dismissNotification},init:function(){return e.init},notify:function(){return n.notify}});var e=__webpack_require__("./packages/packages/core/editor-notifications/src/init.ts"),n=__webpack_require__("./packages/packages/core/editor-notifications/src/components/notifications.tsx")}(),(window.elementorV2=window.elementorV2||{}).editorNotifications=c}(),window.elementorV2.editorNotifications?.init?.();
2365 3 //# sourceMappingURL=editor-notifications.js.map