PluginProbe
Elementor Website Builder – more than just a page builder / 3.21.0-beta2
Elementor Website Builder – more than just a page builder v3.21.0-beta2
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/editor-notifications.js +6934 -1521 4.3.2 → 3.21.0-beta2 View file →
@@ -1,1578 +1,6991 @@
1 -(function(_wordpress_i18n, react, react_dom, _elementor_ui, _elementor_query, _elementor_icons, _elementor_editor_app_bar, _elementor_icons_SpeakerphoneIcon) {
1 +/*! elementor - v3.21.0 - 08-04-2024 */
2 +/******/ (() => { // webpackBootstrap
3 +/******/ var __webpack_modules__ = ({
2 4
3 -//#region \0rolldown/runtime.js
4 - var __create = Object.create;
5 - var __defProp = Object.defineProperty;
6 - var __name = (target, value) => __defProp(target, "name", {
7 - value,
8 - configurable: true
9 - });
10 - var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11 - var __getOwnPropNames = Object.getOwnPropertyNames;
12 - var __getProtoOf = Object.getPrototypeOf;
13 - var __hasOwnProp = Object.prototype.hasOwnProperty;
14 - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15 - var __copyProps = (to, from, except, desc) => {
16 - if (from && typeof from === "object" || typeof from === "function") {
17 - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18 - key = keys[i];
19 - if (!__hasOwnProp.call(to, key) && key !== except) {
20 - __defProp(to, key, {
21 - get: ((k) => from[k]).bind(null, key),
22 - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23 - });
24 - }
25 - }
5 +/***/ "../node_modules/@elementor/query/dist/index.js":
6 +/*!******************************************************!*\
7 + !*** ../node_modules/@elementor/query/dist/index.js ***!
8 + \******************************************************/
9 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10 +
11 +"use strict";
12 +
13 +var __defProp = Object.defineProperty;
14 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15 +var __getOwnPropNames = Object.getOwnPropertyNames;
16 +var __hasOwnProp = Object.prototype.hasOwnProperty;
17 +var __export = (target, all) => {
18 + for (var name in all)
19 + __defProp(target, name, { get: all[name], enumerable: true });
20 +};
21 +var __copyProps = (to, from, except, desc) => {
22 + if (from && typeof from === "object" || typeof from === "function") {
23 + for (let key of __getOwnPropNames(from))
24 + if (!__hasOwnProp.call(to, key) && key !== except)
25 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26 + }
27 + return to;
28 +};
29 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30 +
31 +// src/index.ts
32 +var src_exports = {};
33 +__export(src_exports, {
34 + QueryClient: () => import_react_query2.QueryClient,
35 + QueryClientProvider: () => import_react_query2.QueryClientProvider,
36 + createQueryClient: () => createQueryClient,
37 + useInfiniteQuery: () => import_react_query2.useInfiniteQuery,
38 + useMutation: () => import_react_query2.useMutation,
39 + useQuery: () => import_react_query2.useQuery,
40 + useQueryClient: () => import_react_query2.useQueryClient
41 +});
42 +module.exports = __toCommonJS(src_exports);
43 +var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
44 +var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
45 +function createQueryClient() {
46 + return new import_react_query.QueryClient({
47 + defaultOptions: {
48 + queries: {
49 + refetchOnWindowFocus: false,
50 + refetchOnReconnect: false
51 + }
52 + }
53 + });
54 +}
55 +// Annotate the CommonJS export names for ESM import in node:
56 +0 && (0);
57 +//# sourceMappingURL=index.js.map
58 +
59 +/***/ }),
60 +
61 +/***/ "../assets/dev/js/utils/react.js":
62 +/*!***************************************!*\
63 + !*** ../assets/dev/js/utils/react.js ***!
64 + \***************************************/
65 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
66 +
67 +"use strict";
68 +
69 +
70 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
71 +Object.defineProperty(exports, "__esModule", ({
72 + value: true
73 +}));
74 +exports["default"] = void 0;
75 +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
76 +var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
77 +var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
78 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
79 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
80 +/**
81 + * Support conditional rendering of a React App to the DOM, based on the React version.
82 + * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
83 + *
84 + * @param { React.ReactElement } app The app to render.
85 + * @param { HTMLElement } domElement The DOM element to render the app into.
86 + *
87 + * @return {{ unmount: () => void }} The unmount function.
88 + */
89 +function render(app, domElement) {
90 + var unmountFunction;
91 + try {
92 + var root = (0, _client.createRoot)(domElement);
93 + root.render(app);
94 + unmountFunction = function unmountFunction() {
95 + root.unmount();
96 + };
97 + } catch (e) {
98 + // eslint-disable-next-line react/no-deprecated
99 + ReactDOM.render(app, domElement);
100 + unmountFunction = function unmountFunction() {
101 + // eslint-disable-next-line react/no-deprecated
102 + ReactDOM.unmountComponentAtNode(domElement);
103 + };
104 + }
105 + return {
106 + unmount: unmountFunction
107 + };
108 +}
109 +var _default = {
110 + render: render
111 +};
112 +exports["default"] = _default;
113 +
114 +/***/ }),
115 +
116 +/***/ "../modules/notifications/assets/js/api/index.js":
117 +/*!*******************************************************!*\
118 + !*** ../modules/notifications/assets/js/api/index.js ***!
119 + \*******************************************************/
120 +/***/ ((__unused_webpack_module, exports) => {
121 +
122 +"use strict";
123 +
124 +
125 +Object.defineProperty(exports, "__esModule", ({
126 + value: true
127 +}));
128 +exports.getNotifications = void 0;
129 +var request = function request(endpoint) {
130 + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
131 + return new Promise(function (resolve, reject) {
132 + elementorCommon.ajax.addRequest(endpoint, {
133 + success: resolve,
134 + error: reject,
135 + data: data
136 + });
137 + });
138 +};
139 +var getNotifications = function getNotifications() {
140 + return request('notifications_get');
141 +};
142 +exports.getNotifications = getNotifications;
143 +
144 +/***/ }),
145 +
146 +/***/ "../modules/notifications/assets/js/components/editor-drawer.js":
147 +/*!**********************************************************************!*\
148 + !*** ../modules/notifications/assets/js/components/editor-drawer.js ***!
149 + \**********************************************************************/
150 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
151 +
152 +"use strict";
153 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
154 +
155 +
156 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
157 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
158 +Object.defineProperty(exports, "__esModule", ({
159 + value: true
160 +}));
161 +exports.EditorDrawer = void 0;
162 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
163 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
164 +var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
165 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
166 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
167 +var EditorDrawer = function EditorDrawer(_ref) {
168 + var _ref$anchorPosition = _ref.anchorPosition,
169 + anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition;
170 + var _useState = (0, _react.useState)(true),
171 + _useState2 = (0, _slicedToArray2.default)(_useState, 2),
172 + isOpen = _useState2[0],
173 + setIsOpen = _useState2[1];
174 + (0, _react.useEffect)(function () {
175 + elementor.on('elementor/editor/panel/whats-new/clicked', function () {
176 + return setIsOpen(true);
177 + });
178 + }, []);
179 + return /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
180 + isOpen: isOpen,
181 + setIsOpen: setIsOpen,
182 + setIsRead: function setIsRead() {
183 + return document.body.classList.remove('e-has-notification');
184 + },
185 + anchorPosition: anchorPosition
186 + });
187 +};
188 +exports.EditorDrawer = EditorDrawer;
189 +EditorDrawer.propTypes = {
190 + anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
191 +};
192 +
193 +/***/ }),
194 +
195 +/***/ "../modules/notifications/assets/js/components/editor-on-button-clicked.js":
196 +/*!*********************************************************************************!*\
197 + !*** ../modules/notifications/assets/js/components/editor-on-button-clicked.js ***!
198 + \*********************************************************************************/
199 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
200 +
201 +"use strict";
202 +
203 +
204 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
205 +Object.defineProperty(exports, "__esModule", ({
206 + value: true
207 +}));
208 +exports.editorOnButtonClicked = void 0;
209 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
210 +var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
211 +var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js");
212 +var isRendered = false;
213 +var editorOnButtonClicked = function editorOnButtonClicked() {
214 + var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left';
215 + if (!isRendered) {
216 + isRendered = true;
217 + var container = document.createElement('div');
218 + document.body.append(container);
219 + _react2.default.render( /*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
220 + anchorPosition: anchorPosition
221 + }), container);
222 + return;
223 + }
224 + elementor.trigger('elementor/editor/panel/whats-new/clicked');
225 +};
226 +exports.editorOnButtonClicked = editorOnButtonClicked;
227 +
228 +/***/ }),
229 +
230 +/***/ "../modules/notifications/assets/js/components/editor-v1.js":
231 +/*!******************************************************************!*\
232 + !*** ../modules/notifications/assets/js/components/editor-v1.js ***!
233 + \******************************************************************/
234 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
235 +
236 +"use strict";
237 +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
238 +
239 +
240 +Object.defineProperty(exports, "__esModule", ({
241 + value: true
242 +}));
243 +exports.editorV1 = void 0;
244 +var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
245 +var editorV1 = function editorV1() {
246 + elementor.on('panel:init', function () {
247 + if (elementorNotifications.is_unread) {
248 + document.body.classList.add('e-has-notification');
249 + }
250 + elementor.getPanelView().getPages('menu').view.addItem({
251 + name: 'notification-center',
252 + icon: 'eicon-notification',
253 + title: __('What\'s New', 'elementor'),
254 + callback: _editorOnButtonClicked.editorOnButtonClicked
255 + }, 'navigate_from_page', 'view-page');
256 + });
257 +};
258 +exports.editorV1 = editorV1;
259 +
260 +/***/ }),
261 +
262 +/***/ "../modules/notifications/assets/js/components/editor-v2.js":
263 +/*!******************************************************************!*\
264 + !*** ../modules/notifications/assets/js/components/editor-v2.js ***!
265 + \******************************************************************/
266 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
267 +
268 +"use strict";
269 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
270 +
271 +
272 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
273 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
274 +Object.defineProperty(exports, "__esModule", ({
275 + value: true
276 +}));
277 +exports.editorV2 = void 0;
278 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
279 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
280 +var _giftIcon = __webpack_require__(/*! ../icons/gift-icon */ "../modules/notifications/assets/js/icons/gift-icon.js");
281 +var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
282 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
283 +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
284 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
285 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
286 +var IconWithBadge = function IconWithBadge(_ref) {
287 + var invisible = _ref.invisible;
288 + return /*#__PURE__*/_react.default.createElement(_ui.Badge, {
289 + color: "primary",
290 + variant: "dot",
291 + invisible: invisible
292 + }, /*#__PURE__*/_react.default.createElement(_giftIcon.GiftIcon, null));
293 +};
294 +IconWithBadge.propTypes = {
295 + invisible: PropTypes.bool
296 +};
297 +var editorV2 = function editorV2() {
298 + var utilitiesMenu = window.elementorV2.editorAppBar.utilitiesMenu;
299 + utilitiesMenu.registerLink({
300 + id: 'app-bar-menu-item-whats-new',
301 + priority: 25,
302 + useProps: function useProps() {
303 + var _useState = (0, _react.useState)(!elementorNotifications.is_unread),
304 + _useState2 = (0, _slicedToArray2.default)(_useState, 2),
305 + isRead = _useState2[0],
306 + setIsRead = _useState2[1];
307 + return {
308 + title: (0, _i18n.__)("What's New", 'elementor'),
309 + icon: function icon() {
310 + return /*#__PURE__*/_react.default.createElement(IconWithBadge, {
311 + invisible: isRead
312 + });
313 + },
314 + onClick: function onClick() {
315 + setIsRead(true);
316 + elementorNotifications.is_unread = false;
317 + (0, _editorOnButtonClicked.editorOnButtonClicked)('right');
318 + }
319 + };
320 + }
321 + });
322 +};
323 +exports.editorV2 = editorV2;
324 +
325 +/***/ }),
326 +
327 +/***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
328 +/*!*********************************************************************************!*\
329 + !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
330 + \*********************************************************************************/
331 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
332 +
333 +"use strict";
334 +
335 +
336 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
337 +Object.defineProperty(exports, "__esModule", ({
338 + value: true
339 +}));
340 +exports.WhatsNewDrawerContent = void 0;
341 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
342 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
343 +var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
344 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
345 +var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
346 +var WhatsNewDrawerContent = function WhatsNewDrawerContent() {
347 + var _useQuery = (0, _query.useQuery)({
348 + queryKey: ['e-notifications'],
349 + queryFn: _api.getNotifications
350 + }),
351 + isPending = _useQuery.isPending,
352 + error = _useQuery.error,
353 + items = _useQuery.data;
354 + if (isPending) {
355 + return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
356 + color: "secondary"
357 + }));
358 + }
359 + if (error) {
360 + return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error);
361 + }
362 + return items.map(function (item, itemIndex) {
363 + return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
364 + key: itemIndex,
365 + item: item,
366 + itemIndex: itemIndex,
367 + itemsLength: items.length
368 + });
369 + });
370 +};
371 +exports.WhatsNewDrawerContent = WhatsNewDrawerContent;
372 +
373 +/***/ }),
374 +
375 +/***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
376 +/*!*****************************************************************************!*\
377 + !*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***!
378 + \*****************************************************************************/
379 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
380 +
381 +"use strict";
382 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
383 +
384 +
385 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
386 +Object.defineProperty(exports, "__esModule", ({
387 + value: true
388 +}));
389 +exports.WhatsNewItemChips = void 0;
390 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
391 +var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
392 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
393 +var WhatsNewItemChips = function WhatsNewItemChips(_ref) {
394 + var chipPlan = _ref.chipPlan,
395 + chipTags = _ref.chipTags,
396 + itemIndex = _ref.itemIndex;
397 + var chips = [];
398 + if (chipPlan) {
399 + chips.push({
400 + color: 'promotion',
401 + size: 'small',
402 + label: chipPlan
403 + });
404 + }
405 + if (chipTags) {
406 + chipTags.forEach(function (chipTag) {
407 + chips.push({
408 + variant: 'outlined',
409 + size: 'small',
410 + label: chipTag
411 + });
412 + });
413 + }
414 + if (!chips.length) {
415 + return null;
416 + }
417 + return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
418 + direction: "row",
419 + flexWrap: "wrap",
420 + gap: 1,
421 + sx: {
422 + pb: 1
423 + }
424 + }, chips.map(function (chip, chipIndex) {
425 + return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({
426 + key: "chip-".concat(itemIndex).concat(chipIndex)
427 + }, chip));
428 + }));
429 +};
430 +exports.WhatsNewItemChips = WhatsNewItemChips;
431 +WhatsNewItemChips.propTypes = {
432 + chipPlan: PropTypes.string,
433 + chipTags: PropTypes.array,
434 + itemIndex: PropTypes.number.isRequired
435 +};
436 +
437 +/***/ }),
438 +
439 +/***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
440 +/*!*********************************************************************************!*\
441 + !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
442 + \*********************************************************************************/
443 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
444 +
445 +"use strict";
446 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
447 +
448 +
449 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
450 +Object.defineProperty(exports, "__esModule", ({
451 + value: true
452 +}));
453 +exports.WhatsNewItemThumbnail = void 0;
454 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
455 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
456 +var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
457 +var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
458 + var imageSrc = _ref.imageSrc,
459 + title = _ref.title,
460 + link = _ref.link;
461 + return /*#__PURE__*/_react.default.createElement(_ui.Box, {
462 + sx: {
463 + pb: 2
464 + }
465 + }, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
466 + link: link
467 + }, /*#__PURE__*/_react.default.createElement("img", {
468 + src: imageSrc,
469 + alt: title,
470 + style: {
471 + maxWidth: '100%'
472 + }
473 + })));
474 +};
475 +exports.WhatsNewItemThumbnail = WhatsNewItemThumbnail;
476 +WhatsNewItemThumbnail.propTypes = {
477 + imageSrc: PropTypes.string.isRequired,
478 + title: PropTypes.string.isRequired,
479 + link: PropTypes.string
480 +};
481 +
482 +/***/ }),
483 +
484 +/***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js":
485 +/*!**********************************************************************************!*\
486 + !*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***!
487 + \**********************************************************************************/
488 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
489 +
490 +"use strict";
491 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
492 +
493 +
494 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
495 +Object.defineProperty(exports, "__esModule", ({
496 + value: true
497 +}));
498 +exports.WhatsNewItemTopicLine = void 0;
499 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
500 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
501 +var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
502 + var topic = _ref.topic,
503 + date = _ref.date;
504 + return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
505 + direction: "row",
506 + divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, {
507 + orientation: "vertical",
508 + flexItem: true
509 + }),
510 + spacing: 1,
511 + color: "text.tertiary",
512 + sx: {
513 + pb: 1
514 + }
515 + }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
516 +};
517 +exports.WhatsNewItemTopicLine = WhatsNewItemTopicLine;
518 +WhatsNewItemTopicLine.propTypes = {
519 + topic: PropTypes.string,
520 + date: PropTypes.string
521 +};
522 +
523 +/***/ }),
524 +
525 +/***/ "../modules/notifications/assets/js/components/whats-new-item.js":
526 +/*!***********************************************************************!*\
527 + !*** ../modules/notifications/assets/js/components/whats-new-item.js ***!
528 + \***********************************************************************/
529 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
530 +
531 +"use strict";
532 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
533 +
534 +
535 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
536 +Object.defineProperty(exports, "__esModule", ({
537 + value: true
538 +}));
539 +exports.WhatsNewItem = void 0;
540 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
541 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
542 +var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
543 +var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
544 +var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
545 +var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
546 +var WhatsNewItem = function WhatsNewItem(_ref) {
547 + var item = _ref.item,
548 + itemIndex = _ref.itemIndex,
549 + itemsLength = _ref.itemsLength;
550 + return /*#__PURE__*/_react.default.createElement(_ui.Box, {
551 + key: itemIndex,
552 + display: "flex",
553 + flexDirection: "column",
554 + sx: {
555 + pt: 2
556 + }
557 + }, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, {
558 + topic: item.topic,
559 + date: item.date
560 + }), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
561 + link: item.link
562 + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
563 + variant: "subtitle1",
564 + sx: {
565 + pb: 2
566 + }
567 + }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
568 + imageSrc: item.imageSrc,
569 + link: item.link,
570 + title: item.title
571 + }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
572 + chipPlan: item.chipPlan,
573 + chipTags: item.chipTags,
574 + itemIndex: itemIndex
575 + }), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, {
576 + variant: "body2",
577 + color: "text.secondary",
578 + sx: {
579 + pb: 2
580 + }
581 + }, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
582 + href: item.link,
583 + color: "info.main",
584 + target: "_blank"
585 + }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, {
586 + sx: {
587 + pb: 2
588 + }
589 + }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
590 + href: item.ctaLink,
591 + target: "_blank",
592 + variant: "contained",
593 + size: "small",
594 + color: "promotion"
595 + }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
596 + sx: {
597 + my: 1
598 + }
599 + }));
600 +};
601 +exports.WhatsNewItem = WhatsNewItem;
602 +WhatsNewItem.propTypes = {
603 + item: PropTypes.object.isRequired,
604 + itemIndex: PropTypes.number.isRequired,
605 + itemsLength: PropTypes.number.isRequired
606 +};
607 +
608 +/***/ }),
609 +
610 +/***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js":
611 +/*!**************************************************************************!*\
612 + !*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***!
613 + \**************************************************************************/
614 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
615 +
616 +"use strict";
617 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
618 +
619 +
620 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
621 +Object.defineProperty(exports, "__esModule", ({
622 + value: true
623 +}));
624 +exports.WhatsNewTopBar = void 0;
625 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
626 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
627 +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
628 +var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
629 +var WhatsNewTopBar = function WhatsNewTopBar(props) {
630 + var setIsOpen = props.setIsOpen;
631 + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
632 + elevation: 0,
633 + position: "sticky",
634 + sx: {
635 + backgroundColor: 'background.default'
636 + }
637 + }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, {
638 + variant: "dense"
639 + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
640 + variant: "overline",
641 + sx: {
642 + flexGrow: 1
643 + }
644 + }, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
645 + "aria-label": 'close',
646 + size: "small",
647 + onClick: function onClick() {
648 + return setIsOpen(false);
649 + }
650 + }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
651 +};
652 +exports.WhatsNewTopBar = WhatsNewTopBar;
653 +WhatsNewTopBar.propTypes = {
654 + setIsOpen: PropTypes.func.isRequired
655 +};
656 +
657 +/***/ }),
658 +
659 +/***/ "../modules/notifications/assets/js/components/whats-new.js":
660 +/*!******************************************************************!*\
661 + !*** ../modules/notifications/assets/js/components/whats-new.js ***!
662 + \******************************************************************/
663 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
664 +
665 +"use strict";
666 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
667 +
668 +
669 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
670 +Object.defineProperty(exports, "__esModule", ({
671 + value: true
672 +}));
673 +exports.WhatsNew = void 0;
674 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
675 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
676 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
677 +var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
678 +var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
679 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
680 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
681 +var queryClient = new _query.QueryClient({
682 + defaultOptions: {
683 + queries: {
684 + refetchOnWindowFocus: false,
685 + retry: false,
686 + staleTime: 1000 * 60 * 30 // 30 minutes
687 + }
688 + }
689 +});
690 +
691 +var WhatsNew = function WhatsNew(props) {
692 + var _window$elementor, _window$elementor$get;
693 + var isOpen = props.isOpen,
694 + setIsOpen = props.setIsOpen,
695 + setIsRead = props.setIsRead,
696 + _props$anchorPosition = props.anchorPosition,
697 + anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition;
698 + (0, _react.useEffect)(function () {
699 + if (!isOpen) {
700 + return;
701 + }
702 + setIsRead(true);
703 + }, [isOpen, setIsRead]);
704 + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
705 + client: queryClient
706 + }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
707 + rtl: elementorCommon.config.isRTL
708 + }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
709 + colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 ? void 0 : (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, 'ui_theme')) || 'auto'
710 + }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
711 + anchor: anchorPosition,
712 + open: isOpen,
713 + onClose: function onClose() {
714 + return setIsOpen(false);
715 + },
716 + ModalProps: {
717 + style: {
718 + // Above the WordPress Admin Top Bar.
719 + zIndex: 999999
720 + }
721 + }
722 + }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
723 + sx: {
724 + width: 320,
725 + backgroundColor: 'background.default'
726 + },
727 + role: "presentation"
728 + }, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, {
729 + setIsOpen: setIsOpen
730 + }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
731 + sx: {
732 + padding: '16px'
733 + }
734 + }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, null))))))));
735 +};
736 +exports.WhatsNew = WhatsNew;
737 +WhatsNew.propTypes = {
738 + isOpen: PropTypes.bool.isRequired,
739 + setIsOpen: PropTypes.func.isRequired,
740 + setIsRead: PropTypes.func.isRequired,
741 + anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
742 +};
743 +
744 +/***/ }),
745 +
746 +/***/ "../modules/notifications/assets/js/components/wrapper-with-link.js":
747 +/*!**************************************************************************!*\
748 + !*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***!
749 + \**************************************************************************/
750 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
751 +
752 +"use strict";
753 +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
754 +
755 +
756 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
757 +Object.defineProperty(exports, "__esModule", ({
758 + value: true
759 +}));
760 +exports.WrapperWithLink = void 0;
761 +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
762 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
763 +var WrapperWithLink = function WrapperWithLink(props) {
764 + var link = props.link,
765 + children = props.children;
766 + if (!link) {
767 + return children;
768 + }
769 + return /*#__PURE__*/_react.default.createElement(_ui.Link, {
770 + href: link,
771 + target: "_blank",
772 + underline: "none",
773 + color: "inherit",
774 + sx: {
775 + '&:hover': {
776 + color: 'inherit'
777 + }
778 + }
779 + }, children);
780 +};
781 +exports.WrapperWithLink = WrapperWithLink;
782 +WrapperWithLink.propTypes = {
783 + link: PropTypes.string,
784 + children: PropTypes.any.isRequired
785 +};
786 +
787 +/***/ }),
788 +
789 +/***/ "../modules/notifications/assets/js/icons/gift-icon.js":
790 +/*!*************************************************************!*\
791 + !*** ../modules/notifications/assets/js/icons/gift-icon.js ***!
792 + \*************************************************************/
793 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
794 +
795 +"use strict";
796 +
797 +
798 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
799 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
800 +Object.defineProperty(exports, "__esModule", ({
801 + value: true
802 +}));
803 +exports.GiftIcon = void 0;
804 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
805 +var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
806 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
807 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
808 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
809 +var GiftIcon = (0, _react.forwardRef)(function (props, ref) {
810 + return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
811 + viewBox: "0 0 24 24"
812 + }, props, {
813 + ref: ref
814 + }), /*#__PURE__*/_react.default.createElement("path", {
815 + fillRule: "evenodd",
816 + clipRule: "evenodd",
817 + d: "M9.65527 4.84484C8.95951 4.07178 8.20923 3.73771 7.51306 3.74984L7.5 3.75007C7.03587 3.75007 6.59075 3.93433 6.26256 4.26252C5.93437 4.59071 5.75 5.03583 5.75 5.49995C5.75 5.96408 5.93437 6.4092 6.26256 6.73739C6.59075 7.06558 7.03587 7.24995 7.5 7.24995C7.50295 7.24995 7.5059 7.24997 7.50884 7.25001H11.0002C10.6592 6.26394 10.1939 5.44328 9.65527 4.84484ZM11.25 8.75001V11.25H4C3.86193 11.25 3.75 11.1381 3.75 11V9.00001C3.75 8.86193 3.86193 8.75001 4 8.75001H11.25ZM4.25 12.75H4C3.0335 12.75 2.25 11.9665 2.25 11V9.00001C2.25 8.03351 3.0335 7.25001 4 7.25001H4.76141C4.43004 6.73144 4.25 6.12498 4.25 5.49995C4.25 4.638 4.59241 3.81135 5.2019 3.20186C5.80984 2.59392 6.63384 2.2517 7.49342 2.24996C8.72414 2.23069 9.86213 2.83242 10.7702 3.84139C11.2484 4.37275 11.6608 5.01284 12 5.73103C12.3392 5.01284 12.7516 4.37275 13.2298 3.84139C14.1379 2.83242 15.2759 2.23069 16.5066 2.24996C17.3662 2.2517 18.1902 2.59392 18.7981 3.20186C19.4076 3.81135 19.75 4.638 19.75 5.49995C19.75 6.12498 19.57 6.73144 19.2386 7.25001H20C20.9665 7.25001 21.75 8.03351 21.75 9.00001V11C21.75 11.9665 20.9665 12.75 20 12.75H19.75V19C19.75 19.7294 19.4603 20.4288 18.9445 20.9445C18.4288 21.4603 17.7293 21.75 17 21.75H7C6.27065 21.75 5.57118 21.4603 5.05546 20.9445C4.53973 20.4288 4.25 19.7294 4.25 19V12.75ZM11.25 20.25H7C6.66848 20.25 6.35054 20.1183 6.11612 19.8839C5.8817 19.6495 5.75 19.3315 5.75 19V12.75H11.25V20.25ZM12.75 20.25H17C17.3315 20.25 17.6495 20.1183 17.8839 19.8839C18.1183 19.6495 18.25 19.3315 18.25 19V12.75H12.75V20.25ZM12.75 11.25V8.75001H20C20.1381 8.75001 20.25 8.86193 20.25 9.00001V11C20.25 11.1381 20.1381 11.25 20 11.25H12.75ZM16.4912 7.25001C16.4941 7.24997 16.497 7.24995 16.5 7.24995C16.9641 7.24995 17.4092 7.06558 17.7374 6.73739C18.0656 6.4092 18.25 5.96408 18.25 5.49995C18.25 5.03583 18.0656 4.59071 17.7374 4.26252C17.4092 3.93433 16.9641 3.74995 16.5 3.74995H16.4869C15.7908 3.73783 15.0405 4.07178 14.3447 4.84484C13.8061 5.44328 13.3408 6.26394 12.9998 7.25001H16.4912Z"
818 + }));
819 +});
820 +exports.GiftIcon = GiftIcon;
821 +
822 +/***/ }),
823 +
824 +/***/ "../modules/notifications/assets/js/icons/x-icon.js":
825 +/*!**********************************************************!*\
826 + !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
827 + \**********************************************************/
828 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
829 +
830 +"use strict";
831 +
832 +
833 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
834 +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
835 +Object.defineProperty(exports, "__esModule", ({
836 + value: true
837 +}));
838 +exports.XIcon = void 0;
839 +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
840 +var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
841 +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
842 +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
843 +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
844 +var XIcon = (0, _react.forwardRef)(function (props, ref) {
845 + return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
846 + viewBox: "0 0 24 24"
847 + }, props, {
848 + ref: ref
849 + }), /*#__PURE__*/_react.default.createElement("path", {
850 + fillRule: "evenodd",
851 + clipRule: "evenodd",
852 + d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
853 + }), /*#__PURE__*/_react.default.createElement("path", {
854 + fillRule: "evenodd",
855 + clipRule: "evenodd",
856 + d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z"
857 + }));
858 +});
859 +exports.XIcon = XIcon;
860 +
861 +/***/ }),
862 +
863 +/***/ "../node_modules/object-assign/index.js":
864 +/*!**********************************************!*\
865 + !*** ../node_modules/object-assign/index.js ***!
866 + \**********************************************/
867 +/***/ ((module) => {
868 +
869 +"use strict";
870 +/*
871 +object-assign
872 +(c) Sindre Sorhus
873 +@license MIT
874 +*/
875 +
876 +
877 +/* eslint-disable no-unused-vars */
878 +var getOwnPropertySymbols = Object.getOwnPropertySymbols;
879 +var hasOwnProperty = Object.prototype.hasOwnProperty;
880 +var propIsEnumerable = Object.prototype.propertyIsEnumerable;
881 +
882 +function toObject(val) {
883 + if (val === null || val === undefined) {
884 + throw new TypeError('Object.assign cannot be called with null or undefined');
885 + }
886 +
887 + return Object(val);
888 +}
889 +
890 +function shouldUseNative() {
891 + try {
892 + if (!Object.assign) {
893 + return false;
26 894 }
27 - return to;
28 - };
29 - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30 - value: mod,
31 - enumerable: true
32 - }) : target, mod));
33 895
34 -//#endregion
35 -react = __toESM(react);
36 -react_dom = __toESM(react_dom);
37 -_elementor_editor_app_bar = __toESM(_elementor_editor_app_bar);
38 -_elementor_icons_SpeakerphoneIcon = __toESM(_elementor_icons_SpeakerphoneIcon);
896 + // Detect buggy property enumeration order in older V8 versions.
39 897
40 -//#region node_modules/react-dom/client.js
41 - var require_client = /* @__PURE__ */ __commonJSMin(((exports) => {
42 - var m = (globalThis.ReactDOM);
43 - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
44 - exports.createRoot = function(c, o) {
45 - i.usingClientEntryPoint = true;
46 - try {
47 - return m.createRoot(c, o);
48 - } finally {
49 - i.usingClientEntryPoint = false;
50 - }
51 - };
52 - }));
898 + // https://bugs.chromium.org/p/v8/issues/detail?id=4118
899 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
900 + test1[5] = 'de';
901 + if (Object.getOwnPropertyNames(test1)[0] === '5') {
902 + return false;
903 + }
53 904
54 -//#endregion
55 -//#region assets/dev/js/utils/react.js
56 - var import_client = require_client();
57 - /**
58 - * Support conditional rendering of a React App to the DOM, based on the React version.
59 - * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
60 - *
61 - * @param {Promise.resolve(React).ReactElement} app The app to render.
62 - * @param {HTMLElement} domElement The DOM element to render the app into.
63 - *
64 - * @return {{ unmount: () => void }} The unmount function.
65 - */
66 - function render(app, domElement) {
67 - var unmountFunction;
68 - try {
69 - var root = (0, import_client.createRoot)(domElement);
70 - root.render(app);
71 - unmountFunction = function unmountFunction() {
72 - root.unmount();
73 - };
74 - } catch (e) {
75 - react_dom.render(app, domElement);
76 - unmountFunction = function unmountFunction() {
77 - react_dom.unmountComponentAtNode(domElement);
78 - };
905 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
906 + var test2 = {};
907 + for (var i = 0; i < 10; i++) {
908 + test2['_' + String.fromCharCode(i)] = i;
79 909 }
80 - return { unmount: unmountFunction };
910 + var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
911 + return test2[n];
912 + });
913 + if (order2.join('') !== '0123456789') {
914 + return false;
915 + }
916 +
917 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
918 + var test3 = {};
919 + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
920 + test3[letter] = letter;
921 + });
922 + if (Object.keys(Object.assign({}, test3)).join('') !==
923 + 'abcdefghijklmnopqrst') {
924 + return false;
925 + }
926 +
927 + return true;
928 + } catch (err) {
929 + // We don't expect any of the above to throw, but better to be safe.
930 + return false;
81 931 }
82 - var react_default = { render };
932 +}
83 933
84 -//#endregion
85 -//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
86 -/** @license React v16.13.1
87 - * react-is.development.js
88 - *
89 - * Copyright (c) Facebook, Inc. and its affiliates.
90 - *
91 - * This source code is licensed under the MIT license found in the
92 - * LICENSE file in the root directory of this source tree.
93 - */
94 - var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
95 - (function() {
96 - "use strict";
97 - var hasSymbol = typeof Symbol === "function" && Symbol.for;
98 - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
99 - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
100 - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
101 - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
102 - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
103 - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
104 - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
105 - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
106 - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
107 - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
108 - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
109 - var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
110 - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
111 - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
112 - var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
113 - var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
114 - var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
115 - var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
116 - function isValidElementType(type) {
117 - return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
118 - }
119 - function typeOf(object) {
120 - if (typeof object === "object" && object !== null) {
121 - var $$typeof = object.$$typeof;
122 - switch ($$typeof) {
123 - case REACT_ELEMENT_TYPE:
124 - var type = object.type;
125 - switch (type) {
126 - case REACT_ASYNC_MODE_TYPE:
127 - case REACT_CONCURRENT_MODE_TYPE:
128 - case REACT_FRAGMENT_TYPE:
129 - case REACT_PROFILER_TYPE:
130 - case REACT_STRICT_MODE_TYPE:
131 - case REACT_SUSPENSE_TYPE: return type;
132 - default:
133 - var $$typeofType = type && type.$$typeof;
134 - switch ($$typeofType) {
135 - case REACT_CONTEXT_TYPE:
136 - case REACT_FORWARD_REF_TYPE:
137 - case REACT_LAZY_TYPE:
138 - case REACT_MEMO_TYPE:
139 - case REACT_PROVIDER_TYPE: return $$typeofType;
140 - default: return $$typeof;
141 - }
142 - }
143 - case REACT_PORTAL_TYPE: return $$typeof;
144 - }
145 - }
146 - }
147 - var AsyncMode = REACT_ASYNC_MODE_TYPE;
148 - var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
149 - var ContextConsumer = REACT_CONTEXT_TYPE;
150 - var ContextProvider = REACT_PROVIDER_TYPE;
151 - var Element = REACT_ELEMENT_TYPE;
152 - var ForwardRef = REACT_FORWARD_REF_TYPE;
153 - var Fragment = REACT_FRAGMENT_TYPE;
154 - var Lazy = REACT_LAZY_TYPE;
155 - var Memo = REACT_MEMO_TYPE;
156 - var Portal = REACT_PORTAL_TYPE;
157 - var Profiler = REACT_PROFILER_TYPE;
158 - var StrictMode = REACT_STRICT_MODE_TYPE;
159 - var Suspense = REACT_SUSPENSE_TYPE;
160 - var hasWarnedAboutDeprecatedIsAsyncMode = false;
161 - function isAsyncMode(object) {
162 - if (!hasWarnedAboutDeprecatedIsAsyncMode) {
163 - hasWarnedAboutDeprecatedIsAsyncMode = true;
164 - console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
165 - }
166 - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
167 - }
168 - function isConcurrentMode(object) {
169 - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
170 - }
171 - function isContextConsumer(object) {
172 - return typeOf(object) === REACT_CONTEXT_TYPE;
173 - }
174 - function isContextProvider(object) {
175 - return typeOf(object) === REACT_PROVIDER_TYPE;
176 - }
177 - function isElement(object) {
178 - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
179 - }
180 - function isForwardRef(object) {
181 - return typeOf(object) === REACT_FORWARD_REF_TYPE;
182 - }
183 - function isFragment(object) {
184 - return typeOf(object) === REACT_FRAGMENT_TYPE;
185 - }
186 - function isLazy(object) {
187 - return typeOf(object) === REACT_LAZY_TYPE;
188 - }
189 - function isMemo(object) {
190 - return typeOf(object) === REACT_MEMO_TYPE;
191 - }
192 - function isPortal(object) {
193 - return typeOf(object) === REACT_PORTAL_TYPE;
194 - }
195 - function isProfiler(object) {
196 - return typeOf(object) === REACT_PROFILER_TYPE;
197 - }
198 - function isStrictMode(object) {
199 - return typeOf(object) === REACT_STRICT_MODE_TYPE;
200 - }
201 - function isSuspense(object) {
202 - return typeOf(object) === REACT_SUSPENSE_TYPE;
203 - }
204 - exports.AsyncMode = AsyncMode;
205 - exports.ConcurrentMode = ConcurrentMode;
206 - exports.ContextConsumer = ContextConsumer;
207 - exports.ContextProvider = ContextProvider;
208 - exports.Element = Element;
209 - exports.ForwardRef = ForwardRef;
210 - exports.Fragment = Fragment;
211 - exports.Lazy = Lazy;
212 - exports.Memo = Memo;
213 - exports.Portal = Portal;
214 - exports.Profiler = Profiler;
215 - exports.StrictMode = StrictMode;
216 - exports.Suspense = Suspense;
217 - exports.isAsyncMode = isAsyncMode;
218 - exports.isConcurrentMode = isConcurrentMode;
219 - exports.isContextConsumer = isContextConsumer;
220 - exports.isContextProvider = isContextProvider;
221 - exports.isElement = isElement;
222 - exports.isForwardRef = isForwardRef;
223 - exports.isFragment = isFragment;
224 - exports.isLazy = isLazy;
225 - exports.isMemo = isMemo;
226 - exports.isPortal = isPortal;
227 - exports.isProfiler = isProfiler;
228 - exports.isStrictMode = isStrictMode;
229 - exports.isSuspense = isSuspense;
230 - exports.isValidElementType = isValidElementType;
231 - exports.typeOf = typeOf;
232 - })();
233 - }));
934 +module.exports = shouldUseNative() ? Object.assign : function (target, source) {
935 + var from;
936 + var to = toObject(target);
937 + var symbols;
234 938
235 -//#endregion
236 -//#region node_modules/prop-types/node_modules/react-is/index.js
237 - var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
238 - module.exports = require_react_is_development();
239 - }));
939 + for (var s = 1; s < arguments.length; s++) {
940 + from = Object(arguments[s]);
240 941
241 -//#endregion
242 -//#region node_modules/object-assign/index.js
243 -/*
244 - object-assign
245 - (c) Sindre Sorhus
246 - @license MIT
247 - */
248 - var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
249 - var getOwnPropertySymbols = Object.getOwnPropertySymbols;
250 - var hasOwnProperty = Object.prototype.hasOwnProperty;
251 - var propIsEnumerable = Object.prototype.propertyIsEnumerable;
252 - function toObject(val) {
253 - if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined");
254 - return Object(val);
255 - }
256 - function shouldUseNative() {
257 - try {
258 - if (!Object.assign) return false;
259 - var test1 = /* @__PURE__ */ new String("abc");
260 - test1[5] = "de";
261 - if (Object.getOwnPropertyNames(test1)[0] === "5") return false;
262 - var test2 = {};
263 - for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
264 - if (Object.getOwnPropertyNames(test2).map(function(n) {
265 - return test2[n];
266 - }).join("") !== "0123456789") return false;
267 - var test3 = {};
268 - "abcdefghijklmnopqrst".split("").forEach(function(letter) {
269 - test3[letter] = letter;
270 - });
271 - if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false;
272 - return true;
273 - } catch (err) {
274 - return false;
942 + for (var key in from) {
943 + if (hasOwnProperty.call(from, key)) {
944 + to[key] = from[key];
275 945 }
276 946 }
277 - module.exports = shouldUseNative() ? Object.assign : function(target, source) {
278 - var from;
279 - var to = toObject(target);
280 - var symbols;
281 - for (var s = 1; s < arguments.length; s++) {
282 - from = Object(arguments[s]);
283 - for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
284 - if (getOwnPropertySymbols) {
285 - symbols = getOwnPropertySymbols(from);
286 - for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]];
947 +
948 + if (getOwnPropertySymbols) {
949 + symbols = getOwnPropertySymbols(from);
950 + for (var i = 0; i < symbols.length; i++) {
951 + if (propIsEnumerable.call(from, symbols[i])) {
952 + to[symbols[i]] = from[symbols[i]];
287 953 }
288 954 }
289 - return to;
290 - };
291 - }));
955 + }
956 + }
292 957
293 -//#endregion
294 -//#region node_modules/prop-types/lib/ReactPropTypesSecret.js
958 + return to;
959 +};
960 +
961 +
962 +/***/ }),
963 +
964 +/***/ "../node_modules/prop-types/checkPropTypes.js":
965 +/*!****************************************************!*\
966 + !*** ../node_modules/prop-types/checkPropTypes.js ***!
967 + \****************************************************/
968 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
969 +
970 +"use strict";
295 971 /**
296 - * Copyright (c) 2013-present, Facebook, Inc.
297 - *
298 - * This source code is licensed under the MIT license found in the
299 - * LICENSE file in the root directory of this source tree.
300 - */
301 - var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => {
302 - var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
303 - module.exports = ReactPropTypesSecret;
304 - }));
972 + * Copyright (c) 2013-present, Facebook, Inc.
973 + *
974 + * This source code is licensed under the MIT license found in the
975 + * LICENSE file in the root directory of this source tree.
976 + */
305 977
306 -//#endregion
307 -//#region node_modules/prop-types/lib/has.js
308 - var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => {
309 - module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
310 - }));
311 978
312 -//#endregion
313 -//#region node_modules/prop-types/checkPropTypes.js
979 +
980 +var printWarning = function() {};
981 +
982 +if (true) {
983 + var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
984 + var loggedTypeFailures = {};
985 + var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
986 +
987 + printWarning = function(text) {
988 + var message = 'Warning: ' + text;
989 + if (typeof console !== 'undefined') {
990 + console.error(message);
991 + }
992 + try {
993 + // --- Welcome to debugging React ---
994 + // This error was thrown as a convenience so that you can use this stack
995 + // to find the callsite that caused this warning to fire.
996 + throw new Error(message);
997 + } catch (x) { /**/ }
998 + };
999 +}
1000 +
314 1001 /**
315 - * Copyright (c) 2013-present, Facebook, Inc.
316 - *
317 - * This source code is licensed under the MIT license found in the
318 - * LICENSE file in the root directory of this source tree.
319 - */
320 - var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
321 - var printWarning = function() {};
322 - var ReactPropTypesSecret = require_ReactPropTypesSecret();
323 - var loggedTypeFailures = {};
324 - var has = require_has();
325 - printWarning = function(text) {
326 - var message = "Warning: " + text;
327 - if (typeof console !== "undefined") console.error(message);
328 - try {
329 - throw new Error(message);
330 - } catch (x) {}
331 - };
332 - /**
333 - * Assert that the values match with the type specs.
334 - * Error messages are memorized and will only be shown once.
335 - *
336 - * @param {object} typeSpecs Map of name to a ReactPropType
337 - * @param {object} values Runtime values that need to be type-checked
338 - * @param {string} location e.g. "prop", "context", "child context"
339 - * @param {string} componentName Name of the component for error messages.
340 - * @param {?Function} getStack Returns the component stack.
341 - * @private
342 - */
343 - function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
344 - for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
345 - var error;
346 - try {
347 - if (typeof typeSpecs[typeSpecName] !== "function") {
348 - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349 - err.name = "Invariant Violation";
350 - throw err;
351 - }
352 - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
353 - } catch (ex) {
354 - error = ex;
355 - }
356 - if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).");
357 - if (error instanceof Error && !(error.message in loggedTypeFailures)) {
358 - loggedTypeFailures[error.message] = true;
359 - var stack = getStack ? getStack() : "";
360 - printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : ""));
361 - }
362 - }
363 - }
364 - /**
365 - * Resets warning cache when testing.
366 - *
367 - * @private
368 - */
369 - checkPropTypes.resetWarningCache = function() {
370 - loggedTypeFailures = {};
371 - };
372 - module.exports = checkPropTypes;
373 - }));
1002 + * Assert that the values match with the type specs.
1003 + * Error messages are memorized and will only be shown once.
1004 + *
1005 + * @param {object} typeSpecs Map of name to a ReactPropType
1006 + * @param {object} values Runtime values that need to be type-checked
1007 + * @param {string} location e.g. "prop", "context", "child context"
1008 + * @param {string} componentName Name of the component for error messages.
1009 + * @param {?Function} getStack Returns the component stack.
1010 + * @private
1011 + */
1012 +function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1013 + if (true) {
1014 + for (var typeSpecName in typeSpecs) {
1015 + if (has(typeSpecs, typeSpecName)) {
1016 + var error;
1017 + // Prop type validation may throw. In case they do, we don't want to
1018 + // fail the render phase where it didn't fail before. So we log it.
1019 + // After these have been cleaned up, we'll let them throw.
1020 + try {
1021 + // This is intentionally an invariant that gets caught. It's the same
1022 + // behavior as without this statement except with a better message.
1023 + if (typeof typeSpecs[typeSpecName] !== 'function') {
1024 + var err = Error(
1025 + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1026 + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1027 + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1028 + );
1029 + err.name = 'Invariant Violation';
1030 + throw err;
1031 + }
1032 + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1033 + } catch (ex) {
1034 + error = ex;
1035 + }
1036 + if (error && !(error instanceof Error)) {
1037 + printWarning(
1038 + (componentName || 'React class') + ': type specification of ' +
1039 + location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1040 + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1041 + 'You may have forgotten to pass an argument to the type checker ' +
1042 + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1043 + 'shape all require an argument).'
1044 + );
1045 + }
1046 + if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1047 + // Only monitor this failure once because there tends to be a lot of the
1048 + // same error.
1049 + loggedTypeFailures[error.message] = true;
374 1050
375 -//#endregion
376 -//#region node_modules/prop-types/factoryWithTypeCheckers.js
1051 + var stack = getStack ? getStack() : '';
1052 +
1053 + printWarning(
1054 + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1055 + );
1056 + }
1057 + }
1058 + }
1059 + }
1060 +}
1061 +
377 1062 /**
378 - * Copyright (c) 2013-present, Facebook, Inc.
379 - *
380 - * This source code is licensed under the MIT license found in the
381 - * LICENSE file in the root directory of this source tree.
382 - */
383 - var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
384 - var ReactIs = require_react_is();
385 - var assign = require_object_assign();
386 - var ReactPropTypesSecret = require_ReactPropTypesSecret();
387 - var has = require_has();
388 - var checkPropTypes = require_checkPropTypes();
389 - var printWarning = function() {};
390 - printWarning = function(text) {
391 - var message = "Warning: " + text;
392 - if (typeof console !== "undefined") console.error(message);
393 - try {
394 - throw new Error(message);
395 - } catch (x) {}
396 - };
397 - function emptyFunctionThatReturnsNull() {
398 - return null;
399 - }
400 - module.exports = function(isValidElement, throwOnDirectAccess) {
401 - var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
402 - var FAUX_ITERATOR_SYMBOL = "@@iterator";
403 - /**
404 - * Returns the iterator method function contained on the iterable object.
405 - *
406 - * Be sure to invoke the function with the iterable as context:
407 - *
408 - * var iteratorFn = getIteratorFn(myIterable);
409 - * if (iteratorFn) {
410 - * var iterator = iteratorFn.call(myIterable);
411 - * ...
412 - * }
413 - *
414 - * @param {?object} maybeIterable
415 - * @return {?function}
416 - */
417 - function getIteratorFn(maybeIterable) {
418 - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
419 - if (typeof iteratorFn === "function") return iteratorFn;
420 - }
421 - /**
422 - * Collection of methods that allow declaration and validation of props that are
423 - * supplied to React components. Example usage:
424 - *
425 - * var Props = require('ReactPropTypes');
426 - * var MyArticle = React.createClass({
427 - * propTypes: {
428 - * // An optional string prop named "description".
429 - * description: Props.string,
430 - *
431 - * // A required enum prop named "category".
432 - * category: Props.oneOf(['News','Photos']).isRequired,
433 - *
434 - * // A prop named "dialog" that requires an instance of Dialog.
435 - * dialog: Props.instanceOf(Dialog).isRequired
436 - * },
437 - * render: function() { ... }
438 - * });
439 - *
440 - * A more formal specification of how these methods are used:
441 - *
442 - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
443 - * decl := ReactPropTypes.{type}(.isRequired)?
444 - *
445 - * Each and every declaration produces a function with the same signature. This
446 - * allows the creation of custom validation functions. For example:
447 - *
448 - * var MyLink = React.createClass({
449 - * propTypes: {
450 - * // An optional string or URI prop named "href".
451 - * href: function(props, propName, componentName) {
452 - * var propValue = props[propName];
453 - * if (propValue != null && typeof propValue !== 'string' &&
454 - * !(propValue instanceof URI)) {
455 - * return new Error(
456 - * 'Expected a string or an URI for ' + propName + ' in ' +
457 - * componentName
458 - * );
459 - * }
460 - * }
461 - * },
462 - * render: function() {...}
463 - * });
464 - *
465 - * @internal
466 - */
467 - var ANONYMOUS = "<<anonymous>>";
468 - var ReactPropTypes = {
469 - array: createPrimitiveTypeChecker("array"),
470 - bigint: createPrimitiveTypeChecker("bigint"),
471 - bool: createPrimitiveTypeChecker("boolean"),
472 - func: createPrimitiveTypeChecker("function"),
473 - number: createPrimitiveTypeChecker("number"),
474 - object: createPrimitiveTypeChecker("object"),
475 - string: createPrimitiveTypeChecker("string"),
476 - symbol: createPrimitiveTypeChecker("symbol"),
477 - any: createAnyTypeChecker(),
478 - arrayOf: createArrayOfTypeChecker,
479 - element: createElementTypeChecker(),
480 - elementType: createElementTypeTypeChecker(),
481 - instanceOf: createInstanceTypeChecker,
482 - node: createNodeChecker(),
483 - objectOf: createObjectOfTypeChecker,
484 - oneOf: createEnumTypeChecker,
485 - oneOfType: createUnionTypeChecker,
486 - shape: createShapeTypeChecker,
487 - exact: createStrictShapeTypeChecker
488 - };
489 - /**
490 - * inlined Object.is polyfill to avoid requiring consumers ship their own
491 - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
492 - */
493 - function is(x, y) {
494 - if (x === y) return x !== 0 || 1 / x === 1 / y;
495 - else return x !== x && y !== y;
496 - }
497 - /**
498 - * We use an Error-like object for backward compatibility as people may call
499 - * PropTypes directly and inspect their output. However, we don't use real
500 - * Errors anymore. We don't inspect their stack anyway, and creating them
501 - * is prohibitively expensive if they are created too often, such as what
502 - * happens in oneOfType() for any type before the one that matched.
503 - */
504 - function PropTypeError(message, data) {
505 - this.message = message;
506 - this.data = data && typeof data === "object" ? data : {};
507 - this.stack = "";
508 - }
509 - PropTypeError.prototype = Error.prototype;
510 - function createChainableTypeChecker(validate) {
511 - var manualPropTypeCallCache = {};
512 - var manualPropTypeWarningCount = 0;
513 - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
514 - componentName = componentName || ANONYMOUS;
515 - propFullName = propFullName || propName;
516 - if (secret !== ReactPropTypesSecret) {
517 - if (throwOnDirectAccess) {
518 - var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
519 - err.name = "Invariant Violation";
520 - throw err;
521 - } else if (typeof console !== "undefined") {
522 - var cacheKey = componentName + ":" + propName;
523 - if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) {
524 - printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.");
525 - manualPropTypeCallCache[cacheKey] = true;
526 - manualPropTypeWarningCount++;
527 - }
528 - }
529 - }
530 - if (props[propName] == null) {
531 - if (isRequired) {
532 - if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
533 - return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
534 - }
535 - return null;
536 - } else return validate(props, propName, componentName, location, propFullName);
537 - }
538 - var chainedCheckType = checkType.bind(null, false);
539 - chainedCheckType.isRequired = checkType.bind(null, true);
540 - return chainedCheckType;
541 - }
542 - function createPrimitiveTypeChecker(expectedType) {
543 - function validate(props, propName, componentName, location, propFullName, secret) {
544 - var propValue = props[propName];
545 - if (getPropType(propValue) !== expectedType) {
546 - var preciseType = getPreciseType(propValue);
547 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType });
548 - }
549 - return null;
550 - }
551 - return createChainableTypeChecker(validate);
552 - }
553 - function createAnyTypeChecker() {
554 - return createChainableTypeChecker(emptyFunctionThatReturnsNull);
555 - }
556 - function createArrayOfTypeChecker(typeChecker) {
557 - function validate(props, propName, componentName, location, propFullName) {
558 - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
559 - var propValue = props[propName];
560 - if (!Array.isArray(propValue)) {
561 - var propType = getPropType(propValue);
562 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
563 - }
564 - for (var i = 0; i < propValue.length; i++) {
565 - var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
566 - if (error instanceof Error) return error;
567 - }
568 - return null;
569 - }
570 - return createChainableTypeChecker(validate);
571 - }
572 - function createElementTypeChecker() {
573 - function validate(props, propName, componentName, location, propFullName) {
574 - var propValue = props[propName];
575 - if (!isValidElement(propValue)) {
576 - var propType = getPropType(propValue);
577 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
578 - }
579 - return null;
580 - }
581 - return createChainableTypeChecker(validate);
582 - }
583 - function createElementTypeTypeChecker() {
584 - function validate(props, propName, componentName, location, propFullName) {
585 - var propValue = props[propName];
586 - if (!ReactIs.isValidElementType(propValue)) {
587 - var propType = getPropType(propValue);
588 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
589 - }
590 - return null;
591 - }
592 - return createChainableTypeChecker(validate);
593 - }
594 - function createInstanceTypeChecker(expectedClass) {
595 - function validate(props, propName, componentName, location, propFullName) {
596 - if (!(props[propName] instanceof expectedClass)) {
597 - var expectedClassName = expectedClass.name || ANONYMOUS;
598 - var actualClassName = getClassName(props[propName]);
599 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
600 - }
601 - return null;
602 - }
603 - return createChainableTypeChecker(validate);
604 - }
605 - function createEnumTypeChecker(expectedValues) {
606 - if (!Array.isArray(expectedValues)) {
607 - if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).");
608 - else printWarning("Invalid argument supplied to oneOf, expected an array.");
609 - return emptyFunctionThatReturnsNull;
610 - }
611 - function validate(props, propName, componentName, location, propFullName) {
612 - var propValue = props[propName];
613 - for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
614 - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
615 - if (getPreciseType(value) === "symbol") return String(value);
616 - return value;
617 - });
618 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
619 - }
620 - return createChainableTypeChecker(validate);
621 - }
622 - function createObjectOfTypeChecker(typeChecker) {
623 - function validate(props, propName, componentName, location, propFullName) {
624 - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
625 - var propValue = props[propName];
626 - var propType = getPropType(propValue);
627 - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
628 - for (var key in propValue) if (has(propValue, key)) {
629 - var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
630 - if (error instanceof Error) return error;
631 - }
632 - return null;
633 - }
634 - return createChainableTypeChecker(validate);
635 - }
636 - function createUnionTypeChecker(arrayOfTypeCheckers) {
637 - if (!Array.isArray(arrayOfTypeCheckers)) {
638 - printWarning("Invalid argument supplied to oneOfType, expected an instance of array.");
639 - return emptyFunctionThatReturnsNull;
640 - }
641 - for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
642 - var checker = arrayOfTypeCheckers[i];
643 - if (typeof checker !== "function") {
644 - printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + ".");
645 - return emptyFunctionThatReturnsNull;
646 - }
647 - }
648 - function validate(props, propName, componentName, location, propFullName) {
649 - var expectedTypes = [];
650 - for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
651 - var checker = arrayOfTypeCheckers[i];
652 - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
653 - if (checkerResult == null) return null;
654 - if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType);
655 - }
656 - var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
657 - return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
658 - }
659 - return createChainableTypeChecker(validate);
660 - }
661 - function createNodeChecker() {
662 - function validate(props, propName, componentName, location, propFullName) {
663 - if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
664 - return null;
665 - }
666 - return createChainableTypeChecker(validate);
667 - }
668 - function invalidValidatorError(componentName, location, propFullName, key, type) {
669 - return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`.");
670 - }
671 - function createShapeTypeChecker(shapeTypes) {
672 - function validate(props, propName, componentName, location, propFullName) {
673 - var propValue = props[propName];
674 - var propType = getPropType(propValue);
675 - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
676 - for (var key in shapeTypes) {
677 - var checker = shapeTypes[key];
678 - if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
679 - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
680 - if (error) return error;
681 - }
682 - return null;
683 - }
684 - return createChainableTypeChecker(validate);
685 - }
686 - function createStrictShapeTypeChecker(shapeTypes) {
687 - function validate(props, propName, componentName, location, propFullName) {
688 - var propValue = props[propName];
689 - var propType = getPropType(propValue);
690 - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
691 - for (var key in assign({}, props[propName], shapeTypes)) {
692 - var checker = shapeTypes[key];
693 - if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
694 - if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " "));
695 - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
696 - if (error) return error;
697 - }
698 - return null;
699 - }
700 - return createChainableTypeChecker(validate);
701 - }
702 - function isNode(propValue) {
703 - switch (typeof propValue) {
704 - case "number":
705 - case "string":
706 - case "undefined": return true;
707 - case "boolean": return !propValue;
708 - case "object":
709 - if (Array.isArray(propValue)) return propValue.every(isNode);
710 - if (propValue === null || isValidElement(propValue)) return true;
711 - var iteratorFn = getIteratorFn(propValue);
712 - if (iteratorFn) {
713 - var iterator = iteratorFn.call(propValue);
714 - var step;
715 - if (iteratorFn !== propValue.entries) {
716 - while (!(step = iterator.next()).done) if (!isNode(step.value)) return false;
717 - } else while (!(step = iterator.next()).done) {
718 - var entry = step.value;
719 - if (entry) {
720 - if (!isNode(entry[1])) return false;
721 - }
722 - }
723 - } else return false;
724 - return true;
725 - default: return false;
726 - }
727 - }
728 - function isSymbol(propType, propValue) {
729 - if (propType === "symbol") return true;
730 - if (!propValue) return false;
731 - if (propValue["@@toStringTag"] === "Symbol") return true;
732 - if (typeof Symbol === "function" && propValue instanceof Symbol) return true;
733 - return false;
734 - }
735 - function getPropType(propValue) {
736 - var propType = typeof propValue;
737 - if (Array.isArray(propValue)) return "array";
738 - if (propValue instanceof RegExp) return "object";
739 - if (isSymbol(propType, propValue)) return "symbol";
740 - return propType;
741 - }
742 - function getPreciseType(propValue) {
743 - if (typeof propValue === "undefined" || propValue === null) return "" + propValue;
744 - var propType = getPropType(propValue);
745 - if (propType === "object") {
746 - if (propValue instanceof Date) return "date";
747 - else if (propValue instanceof RegExp) return "regexp";
748 - }
749 - return propType;
750 - }
751 - function getPostfixForTypeWarning(value) {
752 - var type = getPreciseType(value);
753 - switch (type) {
754 - case "array":
755 - case "object": return "an " + type;
756 - case "boolean":
757 - case "date":
758 - case "regexp": return "a " + type;
759 - default: return type;
760 - }
761 - }
762 - function getClassName(propValue) {
763 - if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS;
764 - return propValue.constructor.name;
765 - }
766 - ReactPropTypes.checkPropTypes = checkPropTypes;
767 - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
768 - ReactPropTypes.PropTypes = ReactPropTypes;
769 - return ReactPropTypes;
770 - };
771 - }));
1063 + * Resets warning cache when testing.
1064 + *
1065 + * @private
1066 + */
1067 +checkPropTypes.resetWarningCache = function() {
1068 + if (true) {
1069 + loggedTypeFailures = {};
1070 + }
1071 +}
772 1072
773 -//#endregion
774 -//#region node_modules/prop-types/index.js
775 - var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
776 - var ReactIs = require_react_is();
777 - var throwOnDirectAccess = true;
778 - module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
779 - }));
1073 +module.exports = checkPropTypes;
780 1074
781 -//#endregion
782 -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
783 -var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types());
784 - function _arrayWithHoles(r) {
785 - if (Array.isArray(r)) return r;
786 - }
787 1075
788 -//#endregion
789 -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
790 - function _iterableToArrayLimit(r, l) {
791 - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
792 - if (null != t) {
793 - var e;
794 - var n;
795 - var i;
796 - var u;
797 - var a = [];
798 - var f = !0;
799 - var o = !1;
800 - try {
801 - if (i = (t = t.call(r)).next, 0 === l) {
802 - if (Object(t) !== t) return;
803 - f = !1;
804 - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
805 - } catch (r) {
806 - o = !0, n = r;
807 - } finally {
808 - try {
809 - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
810 - } finally {
811 - if (o) throw n;
812 - }
813 - }
814 - return a;
815 - }
816 - }
1076 +/***/ }),
817 1077
818 -//#endregion
819 -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
820 - function _arrayLikeToArray(r, a) {
821 - (null == a || a > r.length) && (a = r.length);
822 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
823 - return n;
824 - }
1078 +/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
1079 +/*!*************************************************************!*\
1080 + !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
1081 + \*************************************************************/
1082 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
825 1083
826 -//#endregion
827 -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
828 - function _unsupportedIterableToArray(r, a) {
829 - if (r) {
830 - if ("string" == typeof r) return _arrayLikeToArray(r, a);
831 - var t = {}.toString.call(r).slice(8, -1);
832 - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
833 - }
834 - }
1084 +"use strict";
1085 +/**
1086 + * Copyright (c) 2013-present, Facebook, Inc.
1087 + *
1088 + * This source code is licensed under the MIT license found in the
1089 + * LICENSE file in the root directory of this source tree.
1090 + */
835 1091
836 -//#endregion
837 -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
838 - function _nonIterableRest() {
839 - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
840 - }
841 1092
842 -//#endregion
843 -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js
844 - function _slicedToArray(r, e) {
845 - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
846 - }
847 1093
848 -//#endregion
849 -//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
850 - function _arrayWithoutHoles(r) {
851 - if (Array.isArray(r)) return _arrayLikeToArray(r);
852 - }
1094 +var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1095 +var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
853 1096
854 -//#endregion
855 -//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js
856 - function _iterableToArray(r) {
857 - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
858 - }
1097 +var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1098 +var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1099 +var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
859 1100
860 -//#endregion
861 -//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
862 - function _nonIterableSpread() {
863 - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
864 - }
1101 +var printWarning = function() {};
865 1102
866 -//#endregion
867 -//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
868 - function _toConsumableArray(r) {
869 - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
870 - }
1103 +if (true) {
1104 + printWarning = function(text) {
1105 + var message = 'Warning: ' + text;
1106 + if (typeof console !== 'undefined') {
1107 + console.error(message);
1108 + }
1109 + try {
1110 + // --- Welcome to debugging React ---
1111 + // This error was thrown as a convenience so that you can use this stack
1112 + // to find the callsite that caused this warning to fire.
1113 + throw new Error(message);
1114 + } catch (x) {}
1115 + };
1116 +}
871 1117
872 -//#endregion
873 -//#region node_modules/@babel/runtime/helpers/esm/extends.js
874 - function _extends() {
875 - return _extends = Object.assign ? Object.assign.bind() : function(n) {
876 - for (var e = 1; e < arguments.length; e++) {
877 - var t = arguments[e];
878 - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
879 - }
880 - return n;
881 - }, _extends.apply(null, arguments);
882 - }
1118 +function emptyFunctionThatReturnsNull() {
1119 + return null;
1120 +}
883 1121
884 -//#endregion
885 -//#region modules/notifications/assets/js/icons/x-icon.js
886 - var XIcon = (0, react.forwardRef)(function(props, ref) {
887 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({ viewBox: "0 0 24 24" }, props, { ref }), /*#__PURE__*/ react.default.createElement("path", {
888 - fillRule: "evenodd",
889 - clipRule: "evenodd",
890 - d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
891 - }), /*#__PURE__*/ react.default.createElement("path", {
892 - fillRule: "evenodd",
893 - clipRule: "evenodd",
894 - d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z"
895 - }));
896 - });
1122 +module.exports = function(isValidElement, throwOnDirectAccess) {
1123 + /* global Symbol */
1124 + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1125 + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
897 1126
898 -//#endregion
899 -//#region modules/notifications/assets/js/components/whats-new-top-bar.js
900 - var WhatsNewTopBar = function WhatsNewTopBar(props) {
901 - var setIsOpen = props.setIsOpen;
902 - return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.AppBar, {
903 - elevation: 0,
904 - position: "sticky",
905 - sx: { backgroundColor: "background.default" }
906 - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Toolbar, { variant: "dense" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
907 - variant: "overline",
908 - sx: { flexGrow: 1 }
909 - }, (0, _wordpress_i18n.__)("What's New", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.IconButton, {
910 - "aria-label": "close",
911 - size: "small",
912 - onClick: function onClick() {
913 - return setIsOpen(false);
914 - }
915 - }, /*#__PURE__*/ react.default.createElement(XIcon, null)))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null));
916 - };
917 - WhatsNewTopBar.propTypes = { setIsOpen: import_prop_types.default.func.isRequired };
1127 + /**
1128 + * Returns the iterator method function contained on the iterable object.
1129 + *
1130 + * Be sure to invoke the function with the iterable as context:
1131 + *
1132 + * var iteratorFn = getIteratorFn(myIterable);
1133 + * if (iteratorFn) {
1134 + * var iterator = iteratorFn.call(myIterable);
1135 + * ...
1136 + * }
1137 + *
1138 + * @param {?object} maybeIterable
1139 + * @return {?function}
1140 + */
1141 + function getIteratorFn(maybeIterable) {
1142 + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1143 + if (typeof iteratorFn === 'function') {
1144 + return iteratorFn;
1145 + }
1146 + }
918 1147
919 -//#endregion
920 -//#region modules/notifications/assets/js/api/index.js
921 - var request = function request(endpoint) {
922 - var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
923 - return new Promise(function(resolve, reject) {
924 - elementorCommon.ajax.addRequest(endpoint, {
925 - success: resolve,
926 - error: reject,
927 - data
928 - });
929 - });
930 - };
931 - var getNotifications = function getNotifications() {
932 - return request("notifications_get");
933 - };
1148 + /**
1149 + * Collection of methods that allow declaration and validation of props that are
1150 + * supplied to React components. Example usage:
1151 + *
1152 + * var Props = require('ReactPropTypes');
1153 + * var MyArticle = React.createClass({
1154 + * propTypes: {
1155 + * // An optional string prop named "description".
1156 + * description: Props.string,
1157 + *
1158 + * // A required enum prop named "category".
1159 + * category: Props.oneOf(['News','Photos']).isRequired,
1160 + *
1161 + * // A prop named "dialog" that requires an instance of Dialog.
1162 + * dialog: Props.instanceOf(Dialog).isRequired
1163 + * },
1164 + * render: function() { ... }
1165 + * });
1166 + *
1167 + * A more formal specification of how these methods are used:
1168 + *
1169 + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1170 + * decl := ReactPropTypes.{type}(.isRequired)?
1171 + *
1172 + * Each and every declaration produces a function with the same signature. This
1173 + * allows the creation of custom validation functions. For example:
1174 + *
1175 + * var MyLink = React.createClass({
1176 + * propTypes: {
1177 + * // An optional string or URI prop named "href".
1178 + * href: function(props, propName, componentName) {
1179 + * var propValue = props[propName];
1180 + * if (propValue != null && typeof propValue !== 'string' &&
1181 + * !(propValue instanceof URI)) {
1182 + * return new Error(
1183 + * 'Expected a string or an URI for ' + propName + ' in ' +
1184 + * componentName
1185 + * );
1186 + * }
1187 + * }
1188 + * },
1189 + * render: function() {...}
1190 + * });
1191 + *
1192 + * @internal
1193 + */
934 1194
935 -//#endregion
936 -//#region node_modules/@babel/runtime/helpers/esm/typeof.js
937 - function _typeof(o) {
938 - "@babel/helpers - typeof";
939 - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
940 - return typeof o;
941 - } : function(o) {
942 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
943 - }, _typeof(o);
944 - }
1195 + var ANONYMOUS = '<<anonymous>>';
945 1196
946 -//#endregion
947 -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
948 - function toPrimitive(t, r) {
949 - if ("object" != _typeof(t) || !t) return t;
950 - var e = t[Symbol.toPrimitive];
951 - if (void 0 !== e) {
952 - var i = e.call(t, r || "default");
953 - if ("object" != _typeof(i)) return i;
954 - throw new TypeError("@@toPrimitive must return a primitive value.");
955 - }
956 - return ("string" === r ? String : Number)(t);
957 - }
1197 + // Important!
1198 + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1199 + var ReactPropTypes = {
1200 + array: createPrimitiveTypeChecker('array'),
1201 + bigint: createPrimitiveTypeChecker('bigint'),
1202 + bool: createPrimitiveTypeChecker('boolean'),
1203 + func: createPrimitiveTypeChecker('function'),
1204 + number: createPrimitiveTypeChecker('number'),
1205 + object: createPrimitiveTypeChecker('object'),
1206 + string: createPrimitiveTypeChecker('string'),
1207 + symbol: createPrimitiveTypeChecker('symbol'),
958 1208
959 -//#endregion
960 -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
961 - function toPropertyKey(t) {
962 - var i = toPrimitive(t, "string");
963 - return "symbol" == _typeof(i) ? i : i + "";
964 - }
1209 + any: createAnyTypeChecker(),
1210 + arrayOf: createArrayOfTypeChecker,
1211 + element: createElementTypeChecker(),
1212 + elementType: createElementTypeTypeChecker(),
1213 + instanceOf: createInstanceTypeChecker,
1214 + node: createNodeChecker(),
1215 + objectOf: createObjectOfTypeChecker,
1216 + oneOf: createEnumTypeChecker,
1217 + oneOfType: createUnionTypeChecker,
1218 + shape: createShapeTypeChecker,
1219 + exact: createStrictShapeTypeChecker,
1220 + };
965 1221
966 -//#endregion
967 -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
968 - function _defineProperty(e, r, t) {
969 - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
970 - value: t,
971 - enumerable: !0,
972 - configurable: !0,
973 - writable: !0
974 - }) : e[r] = t, e;
975 - }
1222 + /**
1223 + * inlined Object.is polyfill to avoid requiring consumers ship their own
1224 + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1225 + */
1226 + /*eslint-disable no-self-compare*/
1227 + function is(x, y) {
1228 + // SameValue algorithm
1229 + if (x === y) {
1230 + // Steps 1-5, 7-10
1231 + // Steps 6.b-6.e: +0 != -0
1232 + return x !== 0 || 1 / x === 1 / y;
1233 + } else {
1234 + // Step 6.a: NaN == NaN
1235 + return x !== x && y !== y;
1236 + }
1237 + }
1238 + /*eslint-enable no-self-compare*/
976 1239
977 -//#endregion
978 -//#region modules/notifications/assets/js/components/whats-new-item-topic-line.js
979 - var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
980 - var topic = _ref.topic;
981 - var date = _ref.date;
982 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
983 - direction: "row",
984 - divider: /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, {
985 - orientation: "vertical",
986 - flexItem: true
987 - }),
988 - spacing: 1,
989 - color: "text.tertiary",
990 - sx: { pb: 1 }
991 - }, topic && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, topic), date && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, date));
992 - };
993 - WhatsNewItemTopicLine.propTypes = {
994 - topic: import_prop_types.default.string,
995 - date: import_prop_types.default.string
996 - };
1240 + /**
1241 + * We use an Error-like object for backward compatibility as people may call
1242 + * PropTypes directly and inspect their output. However, we don't use real
1243 + * Errors anymore. We don't inspect their stack anyway, and creating them
1244 + * is prohibitively expensive if they are created too often, such as what
1245 + * happens in oneOfType() for any type before the one that matched.
1246 + */
1247 + function PropTypeError(message, data) {
1248 + this.message = message;
1249 + this.data = data && typeof data === 'object' ? data: {};
1250 + this.stack = '';
1251 + }
1252 + // Make `instanceof Error` still work for returned errors.
1253 + PropTypeError.prototype = Error.prototype;
997 1254
998 -//#endregion
999 -//#region modules/notifications/assets/js/components/wrapper-with-link.js
1000 - var WrapperWithLink = function WrapperWithLink(props) {
1001 - var link = props.link;
1002 - var children = props.children;
1003 - if (!link) return children;
1004 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
1005 - href: link,
1006 - target: "_blank",
1007 - underline: "none",
1008 - color: "inherit",
1009 - sx: { "&:hover": { color: "inherit" } }
1010 - }, children);
1011 - };
1012 - WrapperWithLink.propTypes = {
1013 - link: import_prop_types.default.string,
1014 - children: import_prop_types.default.any.isRequired
1015 - };
1255 + function createChainableTypeChecker(validate) {
1256 + if (true) {
1257 + var manualPropTypeCallCache = {};
1258 + var manualPropTypeWarningCount = 0;
1259 + }
1260 + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1261 + componentName = componentName || ANONYMOUS;
1262 + propFullName = propFullName || propName;
1016 1263
1017 -//#endregion
1018 -//#region modules/notifications/assets/js/components/whats-new-item-thumbnail.js
1019 - var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
1020 - var imageSrc = _ref.imageSrc;
1021 - var title = _ref.title;
1022 - var link = _ref.link;
1023 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(WrapperWithLink, { link }, /*#__PURE__*/ react.default.createElement("img", {
1024 - src: imageSrc,
1025 - alt: title || "",
1026 - style: { maxWidth: "100%" }
1027 - })));
1028 - };
1029 - WhatsNewItemThumbnail.propTypes = {
1030 - imageSrc: import_prop_types.default.string.isRequired,
1031 - title: import_prop_types.default.string,
1032 - link: import_prop_types.default.string
1033 - };
1264 + if (secret !== ReactPropTypesSecret) {
1265 + if (throwOnDirectAccess) {
1266 + // New behavior only for users of `prop-types` package
1267 + var err = new Error(
1268 + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1269 + 'Use `PropTypes.checkPropTypes()` to call them. ' +
1270 + 'Read more at http://fb.me/use-check-prop-types'
1271 + );
1272 + err.name = 'Invariant Violation';
1273 + throw err;
1274 + } else if ( true && typeof console !== 'undefined') {
1275 + // Old behavior for people using React.PropTypes
1276 + var cacheKey = componentName + ':' + propName;
1277 + if (
1278 + !manualPropTypeCallCache[cacheKey] &&
1279 + // Avoid spamming the console because they are often not actionable except for lib authors
1280 + manualPropTypeWarningCount < 3
1281 + ) {
1282 + printWarning(
1283 + 'You are manually calling a React.PropTypes validation ' +
1284 + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1285 + 'and will throw in the standalone `prop-types` package. ' +
1286 + 'You may be seeing this warning due to a third-party PropTypes ' +
1287 + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1288 + );
1289 + manualPropTypeCallCache[cacheKey] = true;
1290 + manualPropTypeWarningCount++;
1291 + }
1292 + }
1293 + }
1294 + if (props[propName] == null) {
1295 + if (isRequired) {
1296 + if (props[propName] === null) {
1297 + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1298 + }
1299 + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1300 + }
1301 + return null;
1302 + } else {
1303 + return validate(props, propName, componentName, location, propFullName);
1304 + }
1305 + }
1034 1306
1035 -//#endregion
1036 -//#region modules/notifications/assets/js/components/whats-new-item-media.js
1037 - var WhatsNewItemMedia = function WhatsNewItemMedia(_ref) {
1038 - var item = _ref.item;
1039 - if (item.youtubeEmbedId) {
1040 - var videoId = item.youtubeEmbedId.split("?")[0];
1041 - var src = "https://www.youtube.com/embed/".concat(videoId).concat(item.youtubeAutoplay ? "?autoplay=1&mute=1" : "");
1042 - var allow = "encrypted-media; picture-in-picture".concat(item.youtubeAutoplay ? "; autoplay" : "");
1043 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1044 - component: "iframe",
1045 - src,
1046 - title: item.title || "Video",
1047 - allow,
1048 - allowFullScreen: true,
1049 - sx: {
1050 - aspectRatio: "16/9",
1051 - width: "100%",
1052 - display: "block",
1053 - border: "none"
1054 - }
1055 - }));
1056 - }
1057 - var mediaSrc = item.gifSrc || item.imageSrc;
1058 - if (!mediaSrc) return null;
1059 - return /*#__PURE__*/ react.default.createElement(WhatsNewItemThumbnail, {
1060 - imageSrc: mediaSrc,
1061 - link: item.link,
1062 - title: item.title
1063 - });
1064 - };
1307 + var chainedCheckType = checkType.bind(null, false);
1308 + chainedCheckType.isRequired = checkType.bind(null, true);
1065 1309
1066 -//#endregion
1067 -//#region modules/notifications/assets/js/components/whats-new-item-chips.js
1068 - var WhatsNewItemChips = function WhatsNewItemChips(_ref) {
1069 - var chipPlan = _ref.chipPlan;
1070 - var chipTags = _ref.chipTags;
1071 - var itemIndex = _ref.itemIndex;
1072 - var chips = [];
1073 - if (chipPlan) chips.push({
1074 - color: "promotion",
1075 - size: "small",
1076 - label: chipPlan
1077 - });
1078 - if (chipTags) chipTags.forEach(function(chipTag) {
1079 - chips.push({
1080 - variant: "outlined",
1081 - size: "small",
1082 - label: chipTag
1083 - });
1084 - });
1085 - if (!chips.length) return null;
1086 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, {
1087 - direction: "row",
1088 - flexWrap: "wrap",
1089 - gap: 1,
1090 - sx: { pb: 1 }
1091 - }, chips.map(function(chip, chipIndex) {
1092 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Chip, _extends({ key: "chip-".concat(itemIndex).concat(chipIndex) }, chip));
1093 - }));
1094 - };
1095 - WhatsNewItemChips.propTypes = {
1096 - chipPlan: import_prop_types.default.string,
1097 - chipTags: import_prop_types.default.array,
1098 - itemIndex: import_prop_types.default.number.isRequired
1099 - };
1310 + return chainedCheckType;
1311 + }
1100 1312
1101 -//#endregion
1102 -//#region modules/notifications/assets/js/components/is-image-only.js
1103 - var isImageOnly = function isImageOnly(item) {
1104 - return !item.title && !item.description && (item.imageSrc || item.gifSrc || item.youtubeEmbedId);
1105 - };
1313 + function createPrimitiveTypeChecker(expectedType) {
1314 + function validate(props, propName, componentName, location, propFullName, secret) {
1315 + var propValue = props[propName];
1316 + var propType = getPropType(propValue);
1317 + if (propType !== expectedType) {
1318 + // `propValue` being instance of, say, date/regexp, pass the 'object'
1319 + // check, but we can offer a more precise error message here rather than
1320 + // 'of type `object`'.
1321 + var preciseType = getPreciseType(propValue);
1106 1322
1107 -//#endregion
1108 -//#region modules/notifications/assets/js/components/whats-new-item.js
1109 - function ownKeys(e, r) {
1110 - var t = Object.keys(e);
1111 - if (Object.getOwnPropertySymbols) {
1112 - var o = Object.getOwnPropertySymbols(e);
1113 - r && (o = o.filter(function(r) {
1114 - return Object.getOwnPropertyDescriptor(e, r).enumerable;
1115 - })), t.push.apply(t, o);
1116 - }
1117 - return t;
1118 - }
1119 - function _objectSpread(e) {
1120 - for (var r = 1; r < arguments.length; r++) {
1121 - var t = null != arguments[r] ? arguments[r] : {};
1122 - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
1123 - _defineProperty(e, r, t[r]);
1124 - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
1125 - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
1126 - });
1127 - }
1128 - return e;
1129 - }
1130 - var WhatsNewItem = function WhatsNewItem(_ref) {
1131 - var item = _ref.item;
1132 - var itemIndex = _ref.itemIndex;
1133 - var itemsLength = _ref.itemsLength;
1134 - var setIsOpen = _ref.setIsOpen;
1135 - var _ref$featured = _ref.featured;
1136 - var featured = _ref$featured === void 0 ? false : _ref$featured;
1137 - var hasMedia = item.imageSrc || item.gifSrc || item.youtubeEmbedId;
1138 - if (isImageOnly(item)) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1139 - key: itemIndex,
1140 - display: "flex",
1141 - flexDirection: "column",
1142 - sx: _objectSpread({ pt: 2 }, featured && { px: 1 })
1143 - }, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), itemIndex !== itemsLength - 1 && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1 } }));
1144 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1145 - key: itemIndex,
1146 - display: "flex",
1147 - flexDirection: "column",
1148 - sx: _objectSpread({ pt: 2 }, featured && { px: 1 })
1149 - }, (item.topic || item.date) && /*#__PURE__*/ react.default.createElement(WhatsNewItemTopicLine, {
1150 - topic: item.topic,
1151 - date: item.date
1152 - }), /*#__PURE__*/ react.default.createElement(WrapperWithLink, { link: item.link }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1153 - variant: featured ? "h6" : "subtitle1",
1154 - sx: { pb: 2 }
1155 - }, item.title)), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { position: "relative" } }, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), featured && item.chipPlan && hasMedia && /*#__PURE__*/ react.default.createElement(_elementor_ui.Chip, {
1156 - label: item.chipPlan,
1157 - color: "promotion",
1158 - size: "small",
1159 - sx: {
1160 - position: "absolute",
1161 - top: 8,
1162 - insetInlineStart: 8
1163 - }
1164 - })), /*#__PURE__*/ react.default.createElement(WhatsNewItemChips, {
1165 - chipPlan: featured && hasMedia ? null : item.chipPlan,
1166 - chipTags: item.chipTags,
1167 - itemIndex
1168 - }), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1169 - variant: "body2",
1170 - color: "text.secondary",
1171 - sx: { pb: 2 }
1172 - }, item.description, item.readMoreText && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
1173 - href: item.link,
1174 - color: "info.main",
1175 - target: "_blank"
1176 - }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
1177 - href: item.ctaLink,
1178 - target: item.ctaLink.startsWith("#") ? "_self" : "_blank",
1179 - variant: "contained",
1180 - size: "small",
1181 - color: "promotion",
1182 - onClick: item.ctaLink.startsWith("#") ? function() {
1183 - return setIsOpen(false);
1184 - } : void 0
1185 - }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1 } }));
1186 - };
1187 - WhatsNewItem.propTypes = {
1188 - item: import_prop_types.default.object.isRequired,
1189 - itemIndex: import_prop_types.default.number.isRequired,
1190 - itemsLength: import_prop_types.default.number.isRequired,
1191 - setIsOpen: import_prop_types.default.func.isRequired,
1192 - featured: import_prop_types.default.bool
1193 - };
1323 + return new PropTypeError(
1324 + 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1325 + {expectedType: expectedType}
1326 + );
1327 + }
1328 + return null;
1329 + }
1330 + return createChainableTypeChecker(validate);
1331 + }
1194 1332
1195 -//#endregion
1196 -//#region modules/notifications/assets/js/components/whats-new-item-collapsed.js
1197 - var WhatsNewItemCollapsed = function WhatsNewItemCollapsed(_ref) {
1198 - var item = _ref.item;
1199 - var itemIndex = _ref.itemIndex;
1200 - var isNew = _ref.isNew;
1201 - var onSeen = _ref.onSeen;
1202 - var setIsOpen = _ref.setIsOpen;
1203 - var _useState2 = _slicedToArray((0, react.useState)(false), 2);
1204 - var expanded = _useState2[0];
1205 - var setExpanded = _useState2[1];
1206 - var handleToggle = function handleToggle() {
1207 - if (!expanded && isNew && onSeen) onSeen(item.id);
1208 - setExpanded(!expanded);
1209 - };
1210 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1211 - role: "button",
1212 - tabIndex: 0,
1213 - "aria-expanded": expanded,
1214 - onClick: handleToggle,
1215 - onKeyDown: function handleKeyDown(event) {
1216 - if ("Enter" === event.key || " " === event.key) {
1217 - event.preventDefault();
1218 - handleToggle();
1219 - }
1220 - },
1221 - sx: {
1222 - position: "relative",
1223 - display: "flex",
1224 - alignItems: "flex-start",
1225 - gap: 1,
1226 - cursor: "pointer",
1227 - py: 2,
1228 - paddingInlineStart: 1
1229 - }
1230 - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1231 - component: "span",
1232 - sx: {
1233 - position: "absolute",
1234 - insetInlineStart: "-6px",
1235 - top: "23px",
1236 - width: 6,
1237 - height: 6,
1238 - borderRadius: "50%",
1239 - backgroundColor: "primary.main",
1240 - opacity: isNew ? 1 : 0,
1241 - transition: "opacity 0.2s ease",
1242 - pointerEvents: "none"
1243 - }
1244 - }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: {
1245 - flex: 1,
1246 - minWidth: 0
1247 - } }, item.topic && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1248 - variant: "caption",
1249 - color: "text.tertiary",
1250 - display: "block"
1251 - }, item.topic), /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1252 - variant: "subtitle2",
1253 - noWrap: true
1254 - }, item.title), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: {
1255 - maxHeight: expanded ? 0 : "3em",
1256 - opacity: expanded ? 0 : 1,
1257 - overflow: "hidden",
1258 - transition: "max-height 0.2s ease, opacity 0.15s ease"
1259 - } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1260 - variant: "caption",
1261 - color: "text.secondary",
1262 - sx: {
1263 - display: "-webkit-box",
1264 - WebkitLineClamp: 2,
1265 - WebkitBoxOrient: "vertical",
1266 - overflow: "hidden"
1267 - }
1268 - }, item.description))), /*#__PURE__*/ react.default.createElement(_elementor_icons.ChevronDownIcon, { sx: {
1269 - flexShrink: 0,
1270 - color: "secondary.main",
1271 - fontSize: "small",
1272 - mt: .25,
1273 - transform: expanded ? "rotate(180deg)" : "rotate(0deg)",
1274 - transition: "transform 0.2s"
1275 - } })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Collapse, { in: expanded }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: {
1276 - pb: 2,
1277 - paddingInlineStart: 1
1278 - } }, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), /*#__PURE__*/ react.default.createElement(WhatsNewItemChips, {
1279 - chipPlan: item.chipPlan,
1280 - chipTags: item.chipTags,
1281 - itemIndex
1282 - }), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1283 - variant: "body2",
1284 - color: "text.secondary",
1285 - sx: { pb: 2 }
1286 - }, item.description, item.readMoreText && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, {
1287 - href: item.link,
1288 - color: "info.main",
1289 - target: "_blank"
1290 - }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, {
1291 - href: item.ctaLink,
1292 - target: item.ctaLink.startsWith("#") ? "_self" : "_blank",
1293 - variant: "contained",
1294 - size: "small",
1295 - color: "promotion",
1296 - onClick: item.ctaLink.startsWith("#") ? function() {
1297 - return setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(false);
1298 - } : void 0
1299 - }, item.cta)))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null));
1300 - };
1301 - WhatsNewItemCollapsed.propTypes = {
1302 - item: import_prop_types.default.object.isRequired,
1303 - itemIndex: import_prop_types.default.number.isRequired,
1304 - isNew: import_prop_types.default.bool,
1305 - onSeen: import_prop_types.default.func,
1306 - setIsOpen: import_prop_types.default.func
1307 - };
1333 + function createAnyTypeChecker() {
1334 + return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1335 + }
1308 1336
1309 -//#endregion
1310 -//#region modules/notifications/assets/js/components/whats-new-drawer-content.js
1311 - var WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
1312 - var _items$find$listLabel;
1313 - var _items$find;
1314 - var setIsOpen = _ref.setIsOpen;
1315 - var seenItemIds = _ref.seenItemIds;
1316 - var onSeen = _ref.onSeen;
1317 - var initialHasUnread = _ref.initialHasUnread;
1318 - var _useQuery = (0, _elementor_query.useQuery)({
1319 - queryKey: ["e-notifications"],
1320 - queryFn: getNotifications
1321 - });
1322 - var isPending = _useQuery.isPending;
1323 - var error = _useQuery.error;
1324 - var items = _useQuery.data;
1325 - var seenItemIdsRef = (0, react.useRef)(seenItemIds);
1326 - seenItemIdsRef.current = seenItemIds;
1327 - (0, react.useEffect)(function() {
1328 - if (!items) return;
1329 - (items.some(function(item) {
1330 - return item.featured;
1331 - }) ? items.filter(function(item) {
1332 - return item.featured;
1333 - }) : items).filter(function(item) {
1334 - return !seenItemIdsRef.current.has(item.id);
1335 - }).forEach(function(item) {
1336 - return onSeen(item.id);
1337 - });
1338 - }, [items, onSeen]);
1339 - if (isPending) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.LinearProgress, { color: "secondary" }));
1340 - if (error) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, "An error has occurred: ", error);
1341 - var featuredItems = items.filter(function(item) {
1342 - return item.featured;
1343 - });
1344 - var nonFeaturedItems = items.filter(function(item) {
1345 - return !item.featured && !isImageOnly(item);
1346 - });
1347 - var listLabel = (_items$find$listLabel = (_items$find = items.find(function(item) {
1348 - return item.listLabel;
1349 - })) === null || _items$find === void 0 ? void 0 : _items$find.listLabel) !== null && _items$find$listLabel !== void 0 ? _items$find$listLabel : null;
1350 - return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, featuredItems.map(function(item, index) {
1351 - return /*#__PURE__*/ react.default.createElement(WhatsNewItem, {
1352 - key: item.id,
1353 - item,
1354 - itemIndex: index,
1355 - itemsLength: featuredItems.length,
1356 - setIsOpen,
1357 - featured: true
1358 - });
1359 - }), featuredItems.length > 0 && nonFeaturedItems.length > 0 && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, listLabel ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1.5 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, {
1360 - variant: "caption",
1361 - color: "text.secondary",
1362 - sx: {
1363 - px: 1,
1364 - textTransform: "uppercase",
1365 - letterSpacing: "0.08em"
1366 - }
1367 - }, listLabel)) : /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1.5 } }), nonFeaturedItems.map(function(item, index) {
1368 - return /*#__PURE__*/ react.default.createElement(WhatsNewItemCollapsed, {
1369 - key: item.id,
1370 - item,
1371 - itemIndex: index,
1372 - isNew: initialHasUnread && !seenItemIds.has(item.id),
1373 - onSeen,
1374 - setIsOpen
1375 - });
1376 - })), 0 === featuredItems.length && nonFeaturedItems.map(function(item, itemIndex) {
1377 - return /*#__PURE__*/ react.default.createElement(WhatsNewItem, {
1378 - key: item.id,
1379 - item,
1380 - itemIndex,
1381 - itemsLength: nonFeaturedItems.length,
1382 - setIsOpen
1383 - });
1384 - }));
1385 - };
1386 - WhatsNewDrawerContent.propTypes = {
1387 - setIsOpen: import_prop_types.default.func.isRequired,
1388 - seenItemIds: import_prop_types.default.instanceOf(Set).isRequired,
1389 - onSeen: import_prop_types.default.func.isRequired,
1390 - initialHasUnread: import_prop_types.default.bool.isRequired
1391 - };
1337 + function createArrayOfTypeChecker(typeChecker) {
1338 + function validate(props, propName, componentName, location, propFullName) {
1339 + if (typeof typeChecker !== 'function') {
1340 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1341 + }
1342 + var propValue = props[propName];
1343 + if (!Array.isArray(propValue)) {
1344 + var propType = getPropType(propValue);
1345 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1346 + }
1347 + for (var i = 0; i < propValue.length; i++) {
1348 + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1349 + if (error instanceof Error) {
1350 + return error;
1351 + }
1352 + }
1353 + return null;
1354 + }
1355 + return createChainableTypeChecker(validate);
1356 + }
1392 1357
1393 -//#endregion
1394 -//#region modules/notifications/assets/js/components/whats-new.js
1395 - var _window$elementorNoti;
1396 - var _window$elementorNoti2;
1397 - var queryClient = new _elementor_query.QueryClient({ defaultOptions: { queries: {
1398 - refetchOnWindowFocus: false,
1399 - retry: false,
1400 - staleTime: 1e3 * 60 * 30
1401 - } } });
1402 - var initialHasUnread = ((_window$elementorNoti = (_window$elementorNoti2 = window.elementorNotifications) === null || _window$elementorNoti2 === void 0 ? void 0 : _window$elementorNoti2.unread_count) !== null && _window$elementorNoti !== void 0 ? _window$elementorNoti : 0) > 0;
1403 - var WhatsNew = function WhatsNew(props) {
1404 - var _window$elementor;
1405 - var _window$elementor$get;
1406 - var isOpen = props.isOpen;
1407 - var setIsOpen = props.setIsOpen;
1408 - var _props$setIsRead = props.setIsRead;
1409 - var setIsRead = _props$setIsRead === void 0 ? function() {} : _props$setIsRead;
1410 - var _props$anchorPosition = props.anchorPosition;
1411 - var anchorPosition = _props$anchorPosition === void 0 ? "right" : _props$anchorPosition;
1412 - var _useState2 = _slicedToArray((0, react.useState)(function() {
1413 - return /* @__PURE__ */ new Set();
1414 - }), 2);
1415 - var seenItemIds = _useState2[0];
1416 - var setSeenItemIds = _useState2[1];
1417 - (0, react.useEffect)(function() {
1418 - if (!isOpen) return;
1419 - setIsRead(true);
1420 - }, [isOpen, setIsRead]);
1421 - var handleSeen = (0, react.useCallback)(function(itemId) {
1422 - setSeenItemIds(function(prev) {
1423 - if (prev.has(itemId)) return prev;
1424 - window.dispatchEvent(new CustomEvent("e-notification-item-seen"));
1425 - return new Set([].concat(_toConsumableArray(prev), [itemId]));
1426 - });
1427 - }, []);
1428 - return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_query.QueryClientProvider, { client: queryClient }, /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: elementorCommon.config.isRTL }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, "ui_theme")) || "auto" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Drawer, {
1429 - anchor: anchorPosition,
1430 - open: isOpen,
1431 - onClose: function onClose() {
1432 - return setIsOpen(false);
1433 - },
1434 - BackdropProps: { invisible: true },
1435 - ModalProps: { style: { zIndex: 999999 } }
1436 - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, {
1437 - sx: {
1438 - width: 360,
1439 - backgroundColor: "background.default"
1440 - },
1441 - role: "presentation"
1442 - }, /*#__PURE__*/ react.default.createElement(WhatsNewTopBar, { setIsOpen }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { padding: "16px" } }, /*#__PURE__*/ react.default.createElement(WhatsNewDrawerContent, {
1443 - setIsOpen,
1444 - seenItemIds,
1445 - onSeen: handleSeen,
1446 - initialHasUnread
1447 - }))))))));
1448 - };
1449 - WhatsNew.propTypes = {
1450 - isOpen: import_prop_types.default.bool.isRequired,
1451 - setIsOpen: import_prop_types.default.func.isRequired,
1452 - setIsRead: import_prop_types.default.func,
1453 - anchorPosition: import_prop_types.default.oneOf([
1454 - "left",
1455 - "top",
1456 - "right",
1457 - "bottom"
1458 - ])
1459 - };
1358 + function createElementTypeChecker() {
1359 + function validate(props, propName, componentName, location, propFullName) {
1360 + var propValue = props[propName];
1361 + if (!isValidElement(propValue)) {
1362 + var propType = getPropType(propValue);
1363 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1364 + }
1365 + return null;
1366 + }
1367 + return createChainableTypeChecker(validate);
1368 + }
1460 1369
1461 -//#endregion
1462 -//#region modules/notifications/assets/js/components/editor-drawer.js
1463 - var EditorDrawer = function EditorDrawer(_ref) {
1464 - var _ref$anchorPosition = _ref.anchorPosition;
1465 - var anchorPosition = _ref$anchorPosition === void 0 ? "left" : _ref$anchorPosition;
1466 - var _useState2 = _slicedToArray((0, react.useState)(true), 2);
1467 - var isOpen = _useState2[0];
1468 - var setIsOpen = _useState2[1];
1469 - (0, react.useEffect)(function() {
1470 - elementor.on("elementor/editor/panel/whats-new/clicked", function() {
1471 - return setIsOpen(true);
1472 - });
1473 - }, []);
1474 - return /*#__PURE__*/ react.default.createElement(WhatsNew, {
1475 - isOpen,
1476 - setIsOpen,
1477 - setIsRead: function setIsRead() {
1478 - return document.body.classList.remove("e-has-notification");
1479 - },
1480 - anchorPosition
1481 - });
1482 - };
1483 - EditorDrawer.propTypes = { anchorPosition: import_prop_types.default.oneOf([
1484 - "left",
1485 - "top",
1486 - "right",
1487 - "bottom"
1488 - ]) };
1370 + function createElementTypeTypeChecker() {
1371 + function validate(props, propName, componentName, location, propFullName) {
1372 + var propValue = props[propName];
1373 + if (!ReactIs.isValidElementType(propValue)) {
1374 + var propType = getPropType(propValue);
1375 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1376 + }
1377 + return null;
1378 + }
1379 + return createChainableTypeChecker(validate);
1380 + }
1489 1381
1490 -//#endregion
1491 -//#region modules/notifications/assets/js/components/editor-on-button-clicked.js
1492 - var isRendered = false;
1493 - var editorOnButtonClicked = function editorOnButtonClicked() {
1494 - var anchorPosition = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "left";
1495 - if (!isRendered) {
1496 - isRendered = true;
1497 - var container = document.createElement("div");
1498 - document.body.append(container);
1499 - react_default.render(/*#__PURE__*/ react.default.createElement(EditorDrawer, { anchorPosition }), container);
1500 - return;
1501 - }
1502 - elementor.trigger("elementor/editor/panel/whats-new/clicked");
1503 - };
1382 + function createInstanceTypeChecker(expectedClass) {
1383 + function validate(props, propName, componentName, location, propFullName) {
1384 + if (!(props[propName] instanceof expectedClass)) {
1385 + var expectedClassName = expectedClass.name || ANONYMOUS;
1386 + var actualClassName = getClassName(props[propName]);
1387 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1388 + }
1389 + return null;
1390 + }
1391 + return createChainableTypeChecker(validate);
1392 + }
1504 1393
1505 -//#endregion
1506 -//#region modules/notifications/assets/js/components/editor-v1.js
1507 - var editorV1 = function editorV1() {
1508 - elementor.on("panel:init", function() {
1509 - if (elementorNotifications.is_unread) document.body.classList.add("e-has-notification");
1510 - elementor.getPanelView().getPages("menu").view.addItem({
1511 - name: "notification-center",
1512 - icon: "eicon-speakerphone",
1513 - title: (0, _wordpress_i18n.__)("What's New", "elementor"),
1514 - callback: editorOnButtonClicked
1515 - }, "navigate_from_page", "view-page");
1516 - });
1517 - };
1394 + function createEnumTypeChecker(expectedValues) {
1395 + if (!Array.isArray(expectedValues)) {
1396 + if (true) {
1397 + if (arguments.length > 1) {
1398 + printWarning(
1399 + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1400 + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1401 + );
1402 + } else {
1403 + printWarning('Invalid argument supplied to oneOf, expected an array.');
1404 + }
1405 + }
1406 + return emptyFunctionThatReturnsNull;
1407 + }
1518 1408
1519 -//#endregion
1520 -//#region modules/notifications/assets/js/components/editor-app-bar-link.js
1521 - var IconWithBadge = function IconWithBadge(_ref) {
1522 - var count = _ref.count;
1523 - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Badge, {
1524 - color: "primary",
1525 - badgeContent: count,
1526 - invisible: 0 === count
1527 - }, /*#__PURE__*/ react.default.createElement(_elementor_icons_SpeakerphoneIcon.default, null));
1528 - };
1529 - IconWithBadge.propTypes = { count: import_prop_types.default.number };
1530 - var useWhatsNewLinkProps = function useWhatsNewLinkProps() {
1531 - var _window$elementorNoti;
1532 - var _useState2 = _slicedToArray((0, react.useState)(parseInt((_window$elementorNoti = window.elementorNotifications) === null || _window$elementorNoti === void 0 ? void 0 : _window$elementorNoti.unread_count, 10) || 0), 2);
1533 - var unreadCount = _useState2[0];
1534 - var setUnreadCount = _useState2[1];
1535 - (0, react.useEffect)(function() {
1536 - var handler = function handler() {
1537 - return setUnreadCount(function(prev) {
1538 - return Math.max(0, prev - 1);
1539 - });
1540 - };
1541 - window.addEventListener("e-notification-item-seen", handler);
1542 - return function() {
1543 - return window.removeEventListener("e-notification-item-seen", handler);
1544 - };
1545 - }, []);
1546 - return {
1547 - title: (0, _wordpress_i18n.__)("What's New", "elementor"),
1548 - icon: function icon() {
1549 - return /*#__PURE__*/ react.default.createElement(IconWithBadge, { count: unreadCount });
1550 - },
1551 - onClick: function onClick() {
1552 - editorOnButtonClicked("right");
1553 - elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar.whatsNew, {
1554 - location: elementorCommon.eventsManager.config.locations.topBar,
1555 - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations["whats-new"],
1556 - trigger: elementorCommon.eventsManager.config.triggers.click,
1557 - element: elementorCommon.eventsManager.config.elements.buttonIcon
1558 - });
1559 - }
1560 - };
1561 - };
1562 - var editorAppBarLink = function editorAppBarLink() {
1563 - _elementor_editor_app_bar.utilitiesMenu.registerLink({
1564 - id: "app-bar-menu-item-whats-new",
1565 - priority: 10,
1566 - useProps: useWhatsNewLinkProps
1567 - });
1568 - };
1409 + function validate(props, propName, componentName, location, propFullName) {
1410 + var propValue = props[propName];
1411 + for (var i = 0; i < expectedValues.length; i++) {
1412 + if (is(propValue, expectedValues[i])) {
1413 + return null;
1414 + }
1415 + }
1569 1416
1570 -//#endregion
1571 -//#region modules/notifications/assets/js/editor.js
1572 - var _window;
1573 - if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) editorAppBarLink();
1574 - else editorV1();
1417 + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1418 + var type = getPreciseType(value);
1419 + if (type === 'symbol') {
1420 + return String(value);
1421 + }
1422 + return value;
1423 + });
1424 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1425 + }
1426 + return createChainableTypeChecker(validate);
1427 + }
1575 1428
1576 -//#endregion
1577 -})(wp.i18n, React, ReactDOM, elementorV2.ui, elementorV2.query, elementorV2.icons, elementorV2.editorAppBar, elementorV2.icons['SpeakerphoneIcon']);
1429 + function createObjectOfTypeChecker(typeChecker) {
1430 + function validate(props, propName, componentName, location, propFullName) {
1431 + if (typeof typeChecker !== 'function') {
1432 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1433 + }
1434 + var propValue = props[propName];
1435 + var propType = getPropType(propValue);
1436 + if (propType !== 'object') {
1437 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1438 + }
1439 + for (var key in propValue) {
1440 + if (has(propValue, key)) {
1441 + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1442 + if (error instanceof Error) {
1443 + return error;
1444 + }
1445 + }
1446 + }
1447 + return null;
1448 + }
1449 + return createChainableTypeChecker(validate);
1450 + }
1451 +
1452 + function createUnionTypeChecker(arrayOfTypeCheckers) {
1453 + if (!Array.isArray(arrayOfTypeCheckers)) {
1454 + true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1455 + return emptyFunctionThatReturnsNull;
1456 + }
1457 +
1458 + for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1459 + var checker = arrayOfTypeCheckers[i];
1460 + if (typeof checker !== 'function') {
1461 + printWarning(
1462 + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1463 + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1464 + );
1465 + return emptyFunctionThatReturnsNull;
1466 + }
1467 + }
1468 +
1469 + function validate(props, propName, componentName, location, propFullName) {
1470 + var expectedTypes = [];
1471 + for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1472 + var checker = arrayOfTypeCheckers[i];
1473 + var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1474 + if (checkerResult == null) {
1475 + return null;
1476 + }
1477 + if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1478 + expectedTypes.push(checkerResult.data.expectedType);
1479 + }
1480 + }
1481 + var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1482 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1483 + }
1484 + return createChainableTypeChecker(validate);
1485 + }
1486 +
1487 + function createNodeChecker() {
1488 + function validate(props, propName, componentName, location, propFullName) {
1489 + if (!isNode(props[propName])) {
1490 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1491 + }
1492 + return null;
1493 + }
1494 + return createChainableTypeChecker(validate);
1495 + }
1496 +
1497 + function invalidValidatorError(componentName, location, propFullName, key, type) {
1498 + return new PropTypeError(
1499 + (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1500 + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1501 + );
1502 + }
1503 +
1504 + function createShapeTypeChecker(shapeTypes) {
1505 + function validate(props, propName, componentName, location, propFullName) {
1506 + var propValue = props[propName];
1507 + var propType = getPropType(propValue);
1508 + if (propType !== 'object') {
1509 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1510 + }
1511 + for (var key in shapeTypes) {
1512 + var checker = shapeTypes[key];
1513 + if (typeof checker !== 'function') {
1514 + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1515 + }
1516 + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1517 + if (error) {
1518 + return error;
1519 + }
1520 + }
1521 + return null;
1522 + }
1523 + return createChainableTypeChecker(validate);
1524 + }
1525 +
1526 + function createStrictShapeTypeChecker(shapeTypes) {
1527 + function validate(props, propName, componentName, location, propFullName) {
1528 + var propValue = props[propName];
1529 + var propType = getPropType(propValue);
1530 + if (propType !== 'object') {
1531 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1532 + }
1533 + // We need to check all keys in case some are required but missing from props.
1534 + var allKeys = assign({}, props[propName], shapeTypes);
1535 + for (var key in allKeys) {
1536 + var checker = shapeTypes[key];
1537 + if (has(shapeTypes, key) && typeof checker !== 'function') {
1538 + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1539 + }
1540 + if (!checker) {
1541 + return new PropTypeError(
1542 + 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1543 + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1544 + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1545 + );
1546 + }
1547 + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1548 + if (error) {
1549 + return error;
1550 + }
1551 + }
1552 + return null;
1553 + }
1554 +
1555 + return createChainableTypeChecker(validate);
1556 + }
1557 +
1558 + function isNode(propValue) {
1559 + switch (typeof propValue) {
1560 + case 'number':
1561 + case 'string':
1562 + case 'undefined':
1563 + return true;
1564 + case 'boolean':
1565 + return !propValue;
1566 + case 'object':
1567 + if (Array.isArray(propValue)) {
1568 + return propValue.every(isNode);
1569 + }
1570 + if (propValue === null || isValidElement(propValue)) {
1571 + return true;
1572 + }
1573 +
1574 + var iteratorFn = getIteratorFn(propValue);
1575 + if (iteratorFn) {
1576 + var iterator = iteratorFn.call(propValue);
1577 + var step;
1578 + if (iteratorFn !== propValue.entries) {
1579 + while (!(step = iterator.next()).done) {
1580 + if (!isNode(step.value)) {
1581 + return false;
1582 + }
1583 + }
1584 + } else {
1585 + // Iterator will provide entry [k,v] tuples rather than values.
1586 + while (!(step = iterator.next()).done) {
1587 + var entry = step.value;
1588 + if (entry) {
1589 + if (!isNode(entry[1])) {
1590 + return false;
1591 + }
1592 + }
1593 + }
1594 + }
1595 + } else {
1596 + return false;
1597 + }
1598 +
1599 + return true;
1600 + default:
1601 + return false;
1602 + }
1603 + }
1604 +
1605 + function isSymbol(propType, propValue) {
1606 + // Native Symbol.
1607 + if (propType === 'symbol') {
1608 + return true;
1609 + }
1610 +
1611 + // falsy value can't be a Symbol
1612 + if (!propValue) {
1613 + return false;
1614 + }
1615 +
1616 + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1617 + if (propValue['@@toStringTag'] === 'Symbol') {
1618 + return true;
1619 + }
1620 +
1621 + // Fallback for non-spec compliant Symbols which are polyfilled.
1622 + if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1623 + return true;
1624 + }
1625 +
1626 + return false;
1627 + }
1628 +
1629 + // Equivalent of `typeof` but with special handling for array and regexp.
1630 + function getPropType(propValue) {
1631 + var propType = typeof propValue;
1632 + if (Array.isArray(propValue)) {
1633 + return 'array';
1634 + }
1635 + if (propValue instanceof RegExp) {
1636 + // Old webkits (at least until Android 4.0) return 'function' rather than
1637 + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1638 + // passes PropTypes.object.
1639 + return 'object';
1640 + }
1641 + if (isSymbol(propType, propValue)) {
1642 + return 'symbol';
1643 + }
1644 + return propType;
1645 + }
1646 +
1647 + // This handles more types than `getPropType`. Only used for error messages.
1648 + // See `createPrimitiveTypeChecker`.
1649 + function getPreciseType(propValue) {
1650 + if (typeof propValue === 'undefined' || propValue === null) {
1651 + return '' + propValue;
1652 + }
1653 + var propType = getPropType(propValue);
1654 + if (propType === 'object') {
1655 + if (propValue instanceof Date) {
1656 + return 'date';
1657 + } else if (propValue instanceof RegExp) {
1658 + return 'regexp';
1659 + }
1660 + }
1661 + return propType;
1662 + }
1663 +
1664 + // Returns a string that is postfixed to a warning about an invalid type.
1665 + // For example, "undefined" or "of type array"
1666 + function getPostfixForTypeWarning(value) {
1667 + var type = getPreciseType(value);
1668 + switch (type) {
1669 + case 'array':
1670 + case 'object':
1671 + return 'an ' + type;
1672 + case 'boolean':
1673 + case 'date':
1674 + case 'regexp':
1675 + return 'a ' + type;
1676 + default:
1677 + return type;
1678 + }
1679 + }
1680 +
1681 + // Returns class name of the object, if any.
1682 + function getClassName(propValue) {
1683 + if (!propValue.constructor || !propValue.constructor.name) {
1684 + return ANONYMOUS;
1685 + }
1686 + return propValue.constructor.name;
1687 + }
1688 +
1689 + ReactPropTypes.checkPropTypes = checkPropTypes;
1690 + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1691 + ReactPropTypes.PropTypes = ReactPropTypes;
1692 +
1693 + return ReactPropTypes;
1694 +};
1695 +
1696 +
1697 +/***/ }),
1698 +
1699 +/***/ "../node_modules/prop-types/index.js":
1700 +/*!*******************************************!*\
1701 + !*** ../node_modules/prop-types/index.js ***!
1702 + \*******************************************/
1703 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1704 +
1705 +/**
1706 + * Copyright (c) 2013-present, Facebook, Inc.
1707 + *
1708 + * This source code is licensed under the MIT license found in the
1709 + * LICENSE file in the root directory of this source tree.
1710 + */
1711 +
1712 +if (true) {
1713 + var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1714 +
1715 + // By explicitly using `prop-types` you are opting into new development behavior.
1716 + // http://fb.me/prop-types-in-prod
1717 + var throwOnDirectAccess = true;
1718 + module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1719 +} else {}
1720 +
1721 +
1722 +/***/ }),
1723 +
1724 +/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1725 +/*!**************************************************************!*\
1726 + !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1727 + \**************************************************************/
1728 +/***/ ((module) => {
1729 +
1730 +"use strict";
1731 +/**
1732 + * Copyright (c) 2013-present, Facebook, Inc.
1733 + *
1734 + * This source code is licensed under the MIT license found in the
1735 + * LICENSE file in the root directory of this source tree.
1736 + */
1737 +
1738 +
1739 +
1740 +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1741 +
1742 +module.exports = ReactPropTypesSecret;
1743 +
1744 +
1745 +/***/ }),
1746 +
1747 +/***/ "../node_modules/prop-types/lib/has.js":
1748 +/*!*********************************************!*\
1749 + !*** ../node_modules/prop-types/lib/has.js ***!
1750 + \*********************************************/
1751 +/***/ ((module) => {
1752 +
1753 +module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1754 +
1755 +
1756 +/***/ }),
1757 +
1758 +/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1759 +/*!************************************************************************************!*\
1760 + !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1761 + \************************************************************************************/
1762 +/***/ ((__unused_webpack_module, exports) => {
1763 +
1764 +"use strict";
1765 +/** @license React v16.13.1
1766 + * react-is.development.js
1767 + *
1768 + * Copyright (c) Facebook, Inc. and its affiliates.
1769 + *
1770 + * This source code is licensed under the MIT license found in the
1771 + * LICENSE file in the root directory of this source tree.
1772 + */
1773 +
1774 +
1775 +
1776 +
1777 +
1778 +if (true) {
1779 + (function() {
1780 +'use strict';
1781 +
1782 +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1783 +// nor polyfill, then a plain number is used for performance.
1784 +var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1785 +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1786 +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1787 +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1788 +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1789 +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1790 +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1791 +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1792 +// (unstable) APIs that have been removed. Can we remove the symbols?
1793 +
1794 +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1795 +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1796 +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1797 +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1798 +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1799 +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1800 +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1801 +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1802 +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1803 +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1804 +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1805 +
1806 +function isValidElementType(type) {
1807 + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1808 + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1809 +}
1810 +
1811 +function typeOf(object) {
1812 + if (typeof object === 'object' && object !== null) {
1813 + var $$typeof = object.$$typeof;
1814 +
1815 + switch ($$typeof) {
1816 + case REACT_ELEMENT_TYPE:
1817 + var type = object.type;
1818 +
1819 + switch (type) {
1820 + case REACT_ASYNC_MODE_TYPE:
1821 + case REACT_CONCURRENT_MODE_TYPE:
1822 + case REACT_FRAGMENT_TYPE:
1823 + case REACT_PROFILER_TYPE:
1824 + case REACT_STRICT_MODE_TYPE:
1825 + case REACT_SUSPENSE_TYPE:
1826 + return type;
1827 +
1828 + default:
1829 + var $$typeofType = type && type.$$typeof;
1830 +
1831 + switch ($$typeofType) {
1832 + case REACT_CONTEXT_TYPE:
1833 + case REACT_FORWARD_REF_TYPE:
1834 + case REACT_LAZY_TYPE:
1835 + case REACT_MEMO_TYPE:
1836 + case REACT_PROVIDER_TYPE:
1837 + return $$typeofType;
1838 +
1839 + default:
1840 + return $$typeof;
1841 + }
1842 +
1843 + }
1844 +
1845 + case REACT_PORTAL_TYPE:
1846 + return $$typeof;
1847 + }
1848 + }
1849 +
1850 + return undefined;
1851 +} // AsyncMode is deprecated along with isAsyncMode
1852 +
1853 +var AsyncMode = REACT_ASYNC_MODE_TYPE;
1854 +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1855 +var ContextConsumer = REACT_CONTEXT_TYPE;
1856 +var ContextProvider = REACT_PROVIDER_TYPE;
1857 +var Element = REACT_ELEMENT_TYPE;
1858 +var ForwardRef = REACT_FORWARD_REF_TYPE;
1859 +var Fragment = REACT_FRAGMENT_TYPE;
1860 +var Lazy = REACT_LAZY_TYPE;
1861 +var Memo = REACT_MEMO_TYPE;
1862 +var Portal = REACT_PORTAL_TYPE;
1863 +var Profiler = REACT_PROFILER_TYPE;
1864 +var StrictMode = REACT_STRICT_MODE_TYPE;
1865 +var Suspense = REACT_SUSPENSE_TYPE;
1866 +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1867 +
1868 +function isAsyncMode(object) {
1869 + {
1870 + if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1871 + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1872 +
1873 + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1874 + }
1875 + }
1876 +
1877 + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1878 +}
1879 +function isConcurrentMode(object) {
1880 + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1881 +}
1882 +function isContextConsumer(object) {
1883 + return typeOf(object) === REACT_CONTEXT_TYPE;
1884 +}
1885 +function isContextProvider(object) {
1886 + return typeOf(object) === REACT_PROVIDER_TYPE;
1887 +}
1888 +function isElement(object) {
1889 + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1890 +}
1891 +function isForwardRef(object) {
1892 + return typeOf(object) === REACT_FORWARD_REF_TYPE;
1893 +}
1894 +function isFragment(object) {
1895 + return typeOf(object) === REACT_FRAGMENT_TYPE;
1896 +}
1897 +function isLazy(object) {
1898 + return typeOf(object) === REACT_LAZY_TYPE;
1899 +}
1900 +function isMemo(object) {
1901 + return typeOf(object) === REACT_MEMO_TYPE;
1902 +}
1903 +function isPortal(object) {
1904 + return typeOf(object) === REACT_PORTAL_TYPE;
1905 +}
1906 +function isProfiler(object) {
1907 + return typeOf(object) === REACT_PROFILER_TYPE;
1908 +}
1909 +function isStrictMode(object) {
1910 + return typeOf(object) === REACT_STRICT_MODE_TYPE;
1911 +}
1912 +function isSuspense(object) {
1913 + return typeOf(object) === REACT_SUSPENSE_TYPE;
1914 +}
1915 +
1916 +exports.AsyncMode = AsyncMode;
1917 +exports.ConcurrentMode = ConcurrentMode;
1918 +exports.ContextConsumer = ContextConsumer;
1919 +exports.ContextProvider = ContextProvider;
1920 +exports.Element = Element;
1921 +exports.ForwardRef = ForwardRef;
1922 +exports.Fragment = Fragment;
1923 +exports.Lazy = Lazy;
1924 +exports.Memo = Memo;
1925 +exports.Portal = Portal;
1926 +exports.Profiler = Profiler;
1927 +exports.StrictMode = StrictMode;
1928 +exports.Suspense = Suspense;
1929 +exports.isAsyncMode = isAsyncMode;
1930 +exports.isConcurrentMode = isConcurrentMode;
1931 +exports.isContextConsumer = isContextConsumer;
1932 +exports.isContextProvider = isContextProvider;
1933 +exports.isElement = isElement;
1934 +exports.isForwardRef = isForwardRef;
1935 +exports.isFragment = isFragment;
1936 +exports.isLazy = isLazy;
1937 +exports.isMemo = isMemo;
1938 +exports.isPortal = isPortal;
1939 +exports.isProfiler = isProfiler;
1940 +exports.isStrictMode = isStrictMode;
1941 +exports.isSuspense = isSuspense;
1942 +exports.isValidElementType = isValidElementType;
1943 +exports.typeOf = typeOf;
1944 + })();
1945 +}
1946 +
1947 +
1948 +/***/ }),
1949 +
1950 +/***/ "../node_modules/prop-types/node_modules/react-is/index.js":
1951 +/*!*****************************************************************!*\
1952 + !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
1953 + \*****************************************************************/
1954 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1955 +
1956 +"use strict";
1957 +
1958 +
1959 +if (false) {} else {
1960 + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1961 +}
1962 +
1963 +
1964 +/***/ }),
1965 +
1966 +/***/ "../node_modules/react-dom/client.js":
1967 +/*!*******************************************!*\
1968 + !*** ../node_modules/react-dom/client.js ***!
1969 + \*******************************************/
1970 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1971 +
1972 +"use strict";
1973 +
1974 +
1975 +var m = __webpack_require__(/*! react-dom */ "react-dom");
1976 +if (false) {} else {
1977 + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1978 + exports.createRoot = function(c, o) {
1979 + i.usingClientEntryPoint = true;
1980 + try {
1981 + return m.createRoot(c, o);
1982 + } finally {
1983 + i.usingClientEntryPoint = false;
1984 + }
1985 + };
1986 + exports.hydrateRoot = function(c, h, o) {
1987 + i.usingClientEntryPoint = true;
1988 + try {
1989 + return m.hydrateRoot(c, h, o);
1990 + } finally {
1991 + i.usingClientEntryPoint = false;
1992 + }
1993 + };
1994 +}
1995 +
1996 +
1997 +/***/ }),
1998 +
1999 +/***/ "react":
2000 +/*!************************!*\
2001 + !*** external "React" ***!
2002 + \************************/
2003 +/***/ ((module) => {
2004 +
2005 +"use strict";
2006 +module.exports = React;
2007 +
2008 +/***/ }),
2009 +
2010 +/***/ "react-dom":
2011 +/*!***************************!*\
2012 + !*** external "ReactDOM" ***!
2013 + \***************************/
2014 +/***/ ((module) => {
2015 +
2016 +"use strict";
2017 +module.exports = ReactDOM;
2018 +
2019 +/***/ }),
2020 +
2021 +/***/ "@elementor/ui":
2022 +/*!*********************************!*\
2023 + !*** external "elementorV2.ui" ***!
2024 + \*********************************/
2025 +/***/ ((module) => {
2026 +
2027 +"use strict";
2028 +module.exports = elementorV2.ui;
2029 +
2030 +/***/ }),
2031 +
2032 +/***/ "@wordpress/i18n":
2033 +/*!**************************!*\
2034 + !*** external "wp.i18n" ***!
2035 + \**************************/
2036 +/***/ ((module) => {
2037 +
2038 +"use strict";
2039 +module.exports = wp.i18n;
2040 +
2041 +/***/ }),
2042 +
2043 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
2044 +/*!******************************************************************!*\
2045 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
2046 + \******************************************************************/
2047 +/***/ ((module) => {
2048 +
2049 +function _arrayLikeToArray(arr, len) {
2050 + if (len == null || len > arr.length) len = arr.length;
2051 + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2052 + return arr2;
2053 +}
2054 +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2055 +
2056 +/***/ }),
2057 +
2058 +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
2059 +/*!****************************************************************!*\
2060 + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
2061 + \****************************************************************/
2062 +/***/ ((module) => {
2063 +
2064 +function _arrayWithHoles(arr) {
2065 + if (Array.isArray(arr)) return arr;
2066 +}
2067 +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
2068 +
2069 +/***/ }),
2070 +
2071 +/***/ "../node_modules/@babel/runtime/helpers/extends.js":
2072 +/*!*********************************************************!*\
2073 + !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
2074 + \*********************************************************/
2075 +/***/ ((module) => {
2076 +
2077 +function _extends() {
2078 + module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
2079 + for (var i = 1; i < arguments.length; i++) {
2080 + var source = arguments[i];
2081 + for (var key in source) {
2082 + if (Object.prototype.hasOwnProperty.call(source, key)) {
2083 + target[key] = source[key];
2084 + }
2085 + }
2086 + }
2087 + return target;
2088 + }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2089 + return _extends.apply(this, arguments);
2090 +}
2091 +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
2092 +
2093 +/***/ }),
2094 +
2095 +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
2096 +/*!***********************************************************************!*\
2097 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
2098 + \***********************************************************************/
2099 +/***/ ((module) => {
2100 +
2101 +function _interopRequireDefault(obj) {
2102 + return obj && obj.__esModule ? obj : {
2103 + "default": obj
2104 + };
2105 +}
2106 +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
2107 +
2108 +/***/ }),
2109 +
2110 +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
2111 +/*!**********************************************************************!*\
2112 + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
2113 + \**********************************************************************/
2114 +/***/ ((module) => {
2115 +
2116 +function _iterableToArrayLimit(r, l) {
2117 + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
2118 + if (null != t) {
2119 + var e,
2120 + n,
2121 + i,
2122 + u,
2123 + a = [],
2124 + f = !0,
2125 + o = !1;
2126 + try {
2127 + if (i = (t = t.call(r)).next, 0 === l) {
2128 + if (Object(t) !== t) return;
2129 + f = !1;
2130 + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
2131 + } catch (r) {
2132 + o = !0, n = r;
2133 + } finally {
2134 + try {
2135 + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
2136 + } finally {
2137 + if (o) throw n;
2138 + }
2139 + }
2140 + return a;
2141 + }
2142 +}
2143 +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
2144 +
2145 +/***/ }),
2146 +
2147 +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
2148 +/*!*****************************************************************!*\
2149 + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
2150 + \*****************************************************************/
2151 +/***/ ((module) => {
2152 +
2153 +function _nonIterableRest() {
2154 + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2155 +}
2156 +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
2157 +
2158 +/***/ }),
2159 +
2160 +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
2161 +/*!***************************************************************!*\
2162 + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
2163 + \***************************************************************/
2164 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2165 +
2166 +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
2167 +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
2168 +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
2169 +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
2170 +function _slicedToArray(arr, i) {
2171 + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
2172 +}
2173 +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2174 +
2175 +/***/ }),
2176 +
2177 +/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
2178 +/*!********************************************************!*\
2179 + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
2180 + \********************************************************/
2181 +/***/ ((module) => {
2182 +
2183 +function _typeof(o) {
2184 + "@babel/helpers - typeof";
2185 +
2186 + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
2187 + return typeof o;
2188 + } : function (o) {
2189 + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
2190 + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
2191 +}
2192 +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
2193 +
2194 +/***/ }),
2195 +
2196 +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
2197 +/*!****************************************************************************!*\
2198 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
2199 + \****************************************************************************/
2200 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2201 +
2202 +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
2203 +function _unsupportedIterableToArray(o, minLen) {
2204 + if (!o) return;
2205 + if (typeof o === "string") return arrayLikeToArray(o, minLen);
2206 + var n = Object.prototype.toString.call(o).slice(8, -1);
2207 + if (n === "Object" && o.constructor) n = o.constructor.name;
2208 + if (n === "Map" || n === "Set") return Array.from(o);
2209 + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
2210 +}
2211 +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2212 +
2213 +/***/ }),
2214 +
2215 +/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
2216 +/*!**************************************************************************!*\
2217 + !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
2218 + \**************************************************************************/
2219 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2220 +
2221 +"use strict";
2222 +
2223 +var __defProp = Object.defineProperty;
2224 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2225 +var __getOwnPropNames = Object.getOwnPropertyNames;
2226 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2227 +var __export = (target, all) => {
2228 + for (var name in all)
2229 + __defProp(target, name, { get: all[name], enumerable: true });
2230 +};
2231 +var __copyProps = (to, from, except, desc) => {
2232 + if (from && typeof from === "object" || typeof from === "function") {
2233 + for (let key of __getOwnPropNames(from))
2234 + if (!__hasOwnProp.call(to, key) && key !== except)
2235 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2236 + }
2237 + return to;
2238 +};
2239 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2240 +
2241 +// src/focusManager.ts
2242 +var focusManager_exports = {};
2243 +__export(focusManager_exports, {
2244 + FocusManager: () => FocusManager,
2245 + focusManager: () => focusManager
2246 +});
2247 +module.exports = __toCommonJS(focusManager_exports);
2248 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
2249 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2250 +var FocusManager = class extends import_subscribable.Subscribable {
2251 + #focused;
2252 + #cleanup;
2253 + #setup;
2254 + constructor() {
2255 + super();
2256 + this.#setup = (onFocus) => {
2257 + if (!import_utils.isServer && window.addEventListener) {
2258 + const listener = () => onFocus();
2259 + window.addEventListener("visibilitychange", listener, false);
2260 + return () => {
2261 + window.removeEventListener("visibilitychange", listener);
2262 + };
2263 + }
2264 + return;
2265 + };
2266 + }
2267 + onSubscribe() {
2268 + if (!this.#cleanup) {
2269 + this.setEventListener(this.#setup);
2270 + }
2271 + }
2272 + onUnsubscribe() {
2273 + if (!this.hasListeners()) {
2274 + this.#cleanup?.();
2275 + this.#cleanup = void 0;
2276 + }
2277 + }
2278 + setEventListener(setup) {
2279 + this.#setup = setup;
2280 + this.#cleanup?.();
2281 + this.#cleanup = setup((focused) => {
2282 + if (typeof focused === "boolean") {
2283 + this.setFocused(focused);
2284 + } else {
2285 + this.onFocus();
2286 + }
2287 + });
2288 + }
2289 + setFocused(focused) {
2290 + const changed = this.#focused !== focused;
2291 + if (changed) {
2292 + this.#focused = focused;
2293 + this.onFocus();
2294 + }
2295 + }
2296 + onFocus() {
2297 + this.listeners.forEach((listener) => {
2298 + listener();
2299 + });
2300 + }
2301 + isFocused() {
2302 + if (typeof this.#focused === "boolean") {
2303 + return this.#focused;
2304 + }
2305 + return globalThis.document?.visibilityState !== "hidden";
2306 + }
2307 +};
2308 +var focusManager = new FocusManager();
2309 +// Annotate the CommonJS export names for ESM import in node:
2310 +0 && (0);
2311 +//# sourceMappingURL=focusManager.cjs.map
2312 +
2313 +/***/ }),
2314 +
2315 +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
2316 +/*!***********************************************************************!*\
2317 + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
2318 + \***********************************************************************/
2319 +/***/ ((module) => {
2320 +
2321 +"use strict";
2322 +
2323 +var __defProp = Object.defineProperty;
2324 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2325 +var __getOwnPropNames = Object.getOwnPropertyNames;
2326 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2327 +var __export = (target, all) => {
2328 + for (var name in all)
2329 + __defProp(target, name, { get: all[name], enumerable: true });
2330 +};
2331 +var __copyProps = (to, from, except, desc) => {
2332 + if (from && typeof from === "object" || typeof from === "function") {
2333 + for (let key of __getOwnPropNames(from))
2334 + if (!__hasOwnProp.call(to, key) && key !== except)
2335 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2336 + }
2337 + return to;
2338 +};
2339 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2340 +
2341 +// src/hydration.ts
2342 +var hydration_exports = {};
2343 +__export(hydration_exports, {
2344 + defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
2345 + defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
2346 + dehydrate: () => dehydrate,
2347 + hydrate: () => hydrate
2348 +});
2349 +module.exports = __toCommonJS(hydration_exports);
2350 +function dehydrateMutation(mutation) {
2351 + return {
2352 + mutationKey: mutation.options.mutationKey,
2353 + state: mutation.state,
2354 + ...mutation.meta && { meta: mutation.meta }
2355 + };
2356 +}
2357 +function dehydrateQuery(query) {
2358 + return {
2359 + state: query.state,
2360 + queryKey: query.queryKey,
2361 + queryHash: query.queryHash,
2362 + ...query.meta && { meta: query.meta }
2363 + };
2364 +}
2365 +function defaultShouldDehydrateMutation(mutation) {
2366 + return mutation.state.isPaused;
2367 +}
2368 +function defaultShouldDehydrateQuery(query) {
2369 + return query.state.status === "success";
2370 +}
2371 +function dehydrate(client, options = {}) {
2372 + const filterMutation = options.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
2373 + const mutations = client.getMutationCache().getAll().flatMap(
2374 + (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
2375 + );
2376 + const filterQuery = options.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
2377 + const queries = client.getQueryCache().getAll().flatMap((query) => filterQuery(query) ? [dehydrateQuery(query)] : []);
2378 + return { mutations, queries };
2379 +}
2380 +function hydrate(client, dehydratedState, options) {
2381 + if (typeof dehydratedState !== "object" || dehydratedState === null) {
2382 + return;
2383 + }
2384 + const mutationCache = client.getMutationCache();
2385 + const queryCache = client.getQueryCache();
2386 + const mutations = dehydratedState.mutations || [];
2387 + const queries = dehydratedState.queries || [];
2388 + mutations.forEach((dehydratedMutation) => {
2389 + mutationCache.build(
2390 + client,
2391 + {
2392 + ...options?.defaultOptions?.mutations,
2393 + mutationKey: dehydratedMutation.mutationKey,
2394 + meta: dehydratedMutation.meta
2395 + },
2396 + dehydratedMutation.state
2397 + );
2398 + });
2399 + queries.forEach(({ queryKey, state, queryHash, meta }) => {
2400 + const query = queryCache.get(queryHash);
2401 + if (query) {
2402 + if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
2403 + const { fetchStatus: _ignored, ...dehydratedQueryState } = state;
2404 + query.setState(dehydratedQueryState);
2405 + }
2406 + return;
2407 + }
2408 + queryCache.build(
2409 + client,
2410 + {
2411 + ...options?.defaultOptions?.queries,
2412 + queryKey,
2413 + queryHash,
2414 + meta
2415 + },
2416 + // Reset fetch status to idle to avoid
2417 + // query being stuck in fetching state upon hydration
2418 + {
2419 + ...state,
2420 + fetchStatus: "idle"
2421 + }
2422 + );
2423 + });
2424 +}
2425 +// Annotate the CommonJS export names for ESM import in node:
2426 +0 && (0);
2427 +//# sourceMappingURL=hydration.cjs.map
2428 +
2429 +/***/ }),
2430 +
2431 +/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
2432 +/*!*******************************************************************!*\
2433 + !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
2434 + \*******************************************************************/
2435 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2436 +
2437 +"use strict";
2438 +
2439 +var __defProp = Object.defineProperty;
2440 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2441 +var __getOwnPropNames = Object.getOwnPropertyNames;
2442 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2443 +var __export = (target, all) => {
2444 + for (var name in all)
2445 + __defProp(target, name, { get: all[name], enumerable: true });
2446 +};
2447 +var __copyProps = (to, from, except, desc) => {
2448 + if (from && typeof from === "object" || typeof from === "function") {
2449 + for (let key of __getOwnPropNames(from))
2450 + if (!__hasOwnProp.call(to, key) && key !== except)
2451 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2452 + }
2453 + return to;
2454 +};
2455 +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
2456 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2457 +
2458 +// src/index.ts
2459 +var src_exports = {};
2460 +__export(src_exports, {
2461 + CancelledError: () => import_retryer.CancelledError,
2462 + InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
2463 + MutationCache: () => import_mutationCache.MutationCache,
2464 + MutationObserver: () => import_mutationObserver.MutationObserver,
2465 + QueriesObserver: () => import_queriesObserver.QueriesObserver,
2466 + Query: () => import_query.Query,
2467 + QueryCache: () => import_queryCache.QueryCache,
2468 + QueryClient: () => import_queryClient.QueryClient,
2469 + QueryObserver: () => import_queryObserver.QueryObserver,
2470 + defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
2471 + defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
2472 + dehydrate: () => import_hydration.dehydrate,
2473 + focusManager: () => import_focusManager.focusManager,
2474 + hashKey: () => import_utils.hashKey,
2475 + hydrate: () => import_hydration.hydrate,
2476 + isCancelledError: () => import_retryer2.isCancelledError,
2477 + isServer: () => import_utils.isServer,
2478 + keepPreviousData: () => import_utils.keepPreviousData,
2479 + matchQuery: () => import_utils.matchQuery,
2480 + notifyManager: () => import_notifyManager.notifyManager,
2481 + onlineManager: () => import_onlineManager.onlineManager,
2482 + replaceEqualDeep: () => import_utils.replaceEqualDeep
2483 +});
2484 +module.exports = __toCommonJS(src_exports);
2485 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2486 +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
2487 +var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
2488 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
2489 +var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
2490 +var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
2491 +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
2492 +var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
2493 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2494 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
2495 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
2496 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2497 +var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2498 +var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
2499 +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
2500 +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
2501 +// Annotate the CommonJS export names for ESM import in node:
2502 +0 && (0);
2503 +//# sourceMappingURL=index.cjs.map
2504 +
2505 +/***/ }),
2506 +
2507 +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
2508 +/*!***********************************************************************************!*\
2509 + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
2510 + \***********************************************************************************/
2511 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2512 +
2513 +"use strict";
2514 +
2515 +var __defProp = Object.defineProperty;
2516 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2517 +var __getOwnPropNames = Object.getOwnPropertyNames;
2518 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2519 +var __export = (target, all) => {
2520 + for (var name in all)
2521 + __defProp(target, name, { get: all[name], enumerable: true });
2522 +};
2523 +var __copyProps = (to, from, except, desc) => {
2524 + if (from && typeof from === "object" || typeof from === "function") {
2525 + for (let key of __getOwnPropNames(from))
2526 + if (!__hasOwnProp.call(to, key) && key !== except)
2527 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2528 + }
2529 + return to;
2530 +};
2531 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2532 +
2533 +// src/infiniteQueryBehavior.ts
2534 +var infiniteQueryBehavior_exports = {};
2535 +__export(infiniteQueryBehavior_exports, {
2536 + hasNextPage: () => hasNextPage,
2537 + hasPreviousPage: () => hasPreviousPage,
2538 + infiniteQueryBehavior: () => infiniteQueryBehavior
2539 +});
2540 +module.exports = __toCommonJS(infiniteQueryBehavior_exports);
2541 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
2542 +function infiniteQueryBehavior(pages) {
2543 + return {
2544 + onFetch: (context, query) => {
2545 + const fetchFn = async () => {
2546 + const options = context.options;
2547 + const direction = context.fetchOptions?.meta?.fetchMore?.direction;
2548 + const oldPages = context.state.data?.pages || [];
2549 + const oldPageParams = context.state.data?.pageParams || [];
2550 + const empty = { pages: [], pageParams: [] };
2551 + let cancelled = false;
2552 + const addSignalProperty = (object) => {
2553 + Object.defineProperty(object, "signal", {
2554 + enumerable: true,
2555 + get: () => {
2556 + if (context.signal.aborted) {
2557 + cancelled = true;
2558 + } else {
2559 + context.signal.addEventListener("abort", () => {
2560 + cancelled = true;
2561 + });
2562 + }
2563 + return context.signal;
2564 + }
2565 + });
2566 + };
2567 + const queryFn = context.options.queryFn || (() => Promise.reject(
2568 + new Error(`Missing queryFn: '${context.options.queryHash}'`)
2569 + ));
2570 + const fetchPage = async (data, param, previous) => {
2571 + if (cancelled) {
2572 + return Promise.reject();
2573 + }
2574 + if (param == null && data.pages.length) {
2575 + return Promise.resolve(data);
2576 + }
2577 + const queryFnContext = {
2578 + queryKey: context.queryKey,
2579 + pageParam: param,
2580 + direction: previous ? "backward" : "forward",
2581 + meta: context.options.meta
2582 + };
2583 + addSignalProperty(queryFnContext);
2584 + const page = await queryFn(
2585 + queryFnContext
2586 + );
2587 + const { maxPages } = context.options;
2588 + const addTo = previous ? import_utils.addToStart : import_utils.addToEnd;
2589 + return {
2590 + pages: addTo(data.pages, page, maxPages),
2591 + pageParams: addTo(data.pageParams, param, maxPages)
2592 + };
2593 + };
2594 + let result;
2595 + if (direction && oldPages.length) {
2596 + const previous = direction === "backward";
2597 + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
2598 + const oldData = {
2599 + pages: oldPages,
2600 + pageParams: oldPageParams
2601 + };
2602 + const param = pageParamFn(options, oldData);
2603 + result = await fetchPage(oldData, param, previous);
2604 + } else {
2605 + result = await fetchPage(
2606 + empty,
2607 + oldPageParams[0] ?? options.initialPageParam
2608 + );
2609 + const remainingPages = pages ?? oldPages.length;
2610 + for (let i = 1; i < remainingPages; i++) {
2611 + const param = getNextPageParam(options, result);
2612 + result = await fetchPage(result, param);
2613 + }
2614 + }
2615 + return result;
2616 + };
2617 + if (context.options.persister) {
2618 + context.fetchFn = () => {
2619 + return context.options.persister?.(
2620 + fetchFn,
2621 + {
2622 + queryKey: context.queryKey,
2623 + meta: context.options.meta,
2624 + signal: context.signal
2625 + },
2626 + query
2627 + );
2628 + };
2629 + } else {
2630 + context.fetchFn = fetchFn;
2631 + }
2632 + }
2633 + };
2634 +}
2635 +function getNextPageParam(options, { pages, pageParams }) {
2636 + const lastIndex = pages.length - 1;
2637 + return options.getNextPageParam(
2638 + pages[lastIndex],
2639 + pages,
2640 + pageParams[lastIndex],
2641 + pageParams
2642 + );
2643 +}
2644 +function getPreviousPageParam(options, { pages, pageParams }) {
2645 + return options.getPreviousPageParam?.(
2646 + pages[0],
2647 + pages,
2648 + pageParams[0],
2649 + pageParams
2650 + );
2651 +}
2652 +function hasNextPage(options, data) {
2653 + if (!data)
2654 + return false;
2655 + return getNextPageParam(options, data) != null;
2656 +}
2657 +function hasPreviousPage(options, data) {
2658 + if (!data || !options.getPreviousPageParam)
2659 + return false;
2660 + return getPreviousPageParam(options, data) != null;
2661 +}
2662 +// Annotate the CommonJS export names for ESM import in node:
2663 +0 && (0);
2664 +//# sourceMappingURL=infiniteQueryBehavior.cjs.map
2665 +
2666 +/***/ }),
2667 +
2668 +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
2669 +/*!***********************************************************************************!*\
2670 + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
2671 + \***********************************************************************************/
2672 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2673 +
2674 +"use strict";
2675 +
2676 +var __defProp = Object.defineProperty;
2677 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2678 +var __getOwnPropNames = Object.getOwnPropertyNames;
2679 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2680 +var __export = (target, all) => {
2681 + for (var name in all)
2682 + __defProp(target, name, { get: all[name], enumerable: true });
2683 +};
2684 +var __copyProps = (to, from, except, desc) => {
2685 + if (from && typeof from === "object" || typeof from === "function") {
2686 + for (let key of __getOwnPropNames(from))
2687 + if (!__hasOwnProp.call(to, key) && key !== except)
2688 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2689 + }
2690 + return to;
2691 +};
2692 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2693 +
2694 +// src/infiniteQueryObserver.ts
2695 +var infiniteQueryObserver_exports = {};
2696 +__export(infiniteQueryObserver_exports, {
2697 + InfiniteQueryObserver: () => InfiniteQueryObserver
2698 +});
2699 +module.exports = __toCommonJS(infiniteQueryObserver_exports);
2700 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
2701 +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
2702 +var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
2703 + // eslint-disable-next-line @typescript-eslint/no-useless-constructor
2704 + constructor(client, options) {
2705 + super(client, options);
2706 + }
2707 + bindMethods() {
2708 + super.bindMethods();
2709 + this.fetchNextPage = this.fetchNextPage.bind(this);
2710 + this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
2711 + }
2712 + setOptions(options, notifyOptions) {
2713 + super.setOptions(
2714 + {
2715 + ...options,
2716 + behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
2717 + },
2718 + notifyOptions
2719 + );
2720 + }
2721 + getOptimisticResult(options) {
2722 + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
2723 + return super.getOptimisticResult(options);
2724 + }
2725 + fetchNextPage(options) {
2726 + return this.fetch({
2727 + ...options,
2728 + meta: {
2729 + fetchMore: { direction: "forward" }
2730 + }
2731 + });
2732 + }
2733 + fetchPreviousPage(options) {
2734 + return this.fetch({
2735 + ...options,
2736 + meta: {
2737 + fetchMore: { direction: "backward" }
2738 + }
2739 + });
2740 + }
2741 + createResult(query, options) {
2742 + const { state } = query;
2743 + const result = super.createResult(query, options);
2744 + const { isFetching, isRefetching } = result;
2745 + const isFetchingNextPage = isFetching && state.fetchMeta?.fetchMore?.direction === "forward";
2746 + const isFetchingPreviousPage = isFetching && state.fetchMeta?.fetchMore?.direction === "backward";
2747 + return {
2748 + ...result,
2749 + fetchNextPage: this.fetchNextPage,
2750 + fetchPreviousPage: this.fetchPreviousPage,
2751 + hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
2752 + hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
2753 + isFetchingNextPage,
2754 + isFetchingPreviousPage,
2755 + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
2756 + };
2757 + }
2758 +};
2759 +// Annotate the CommonJS export names for ESM import in node:
2760 +0 && (0);
2761 +//# sourceMappingURL=infiniteQueryObserver.cjs.map
2762 +
2763 +/***/ }),
2764 +
2765 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
2766 +/*!**********************************************************************!*\
2767 + !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
2768 + \**********************************************************************/
2769 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2770 +
2771 +"use strict";
2772 +
2773 +var __defProp = Object.defineProperty;
2774 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2775 +var __getOwnPropNames = Object.getOwnPropertyNames;
2776 +var __hasOwnProp = Object.prototype.hasOwnProperty;
2777 +var __export = (target, all) => {
2778 + for (var name in all)
2779 + __defProp(target, name, { get: all[name], enumerable: true });
2780 +};
2781 +var __copyProps = (to, from, except, desc) => {
2782 + if (from && typeof from === "object" || typeof from === "function") {
2783 + for (let key of __getOwnPropNames(from))
2784 + if (!__hasOwnProp.call(to, key) && key !== except)
2785 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
2786 + }
2787 + return to;
2788 +};
2789 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2790 +
2791 +// src/mutation.ts
2792 +var mutation_exports = {};
2793 +__export(mutation_exports, {
2794 + Mutation: () => Mutation,
2795 + getDefaultState: () => getDefaultState
2796 +});
2797 +module.exports = __toCommonJS(mutation_exports);
2798 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
2799 +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
2800 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
2801 +var Mutation = class extends import_removable.Removable {
2802 + constructor(config) {
2803 + super();
2804 + this.mutationId = config.mutationId;
2805 + this.#defaultOptions = config.defaultOptions;
2806 + this.#mutationCache = config.mutationCache;
2807 + this.#observers = [];
2808 + this.state = config.state || getDefaultState();
2809 + this.setOptions(config.options);
2810 + this.scheduleGc();
2811 + }
2812 + #observers;
2813 + #defaultOptions;
2814 + #mutationCache;
2815 + #retryer;
2816 + setOptions(options) {
2817 + this.options = { ...this.#defaultOptions, ...options };
2818 + this.updateGcTime(this.options.gcTime);
2819 + }
2820 + get meta() {
2821 + return this.options.meta;
2822 + }
2823 + addObserver(observer) {
2824 + if (!this.#observers.includes(observer)) {
2825 + this.#observers.push(observer);
2826 + this.clearGcTimeout();
2827 + this.#mutationCache.notify({
2828 + type: "observerAdded",
2829 + mutation: this,
2830 + observer
2831 + });
2832 + }
2833 + }
2834 + removeObserver(observer) {
2835 + this.#observers = this.#observers.filter((x) => x !== observer);
2836 + this.scheduleGc();
2837 + this.#mutationCache.notify({
2838 + type: "observerRemoved",
2839 + mutation: this,
2840 + observer
2841 + });
2842 + }
2843 + optionalRemove() {
2844 + if (!this.#observers.length) {
2845 + if (this.state.status === "pending") {
2846 + this.scheduleGc();
2847 + } else {
2848 + this.#mutationCache.remove(this);
2849 + }
2850 + }
2851 + }
2852 + continue() {
2853 + return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
2854 + this.execute(this.state.variables);
2855 + }
2856 + async execute(variables) {
2857 + const executeMutation = () => {
2858 + this.#retryer = (0, import_retryer.createRetryer)({
2859 + fn: () => {
2860 + if (!this.options.mutationFn) {
2861 + return Promise.reject(new Error("No mutationFn found"));
2862 + }
2863 + return this.options.mutationFn(variables);
2864 + },
2865 + onFail: (failureCount, error) => {
2866 + this.#dispatch({ type: "failed", failureCount, error });
2867 + },
2868 + onPause: () => {
2869 + this.#dispatch({ type: "pause" });
2870 + },
2871 + onContinue: () => {
2872 + this.#dispatch({ type: "continue" });
2873 + },
2874 + retry: this.options.retry ?? 0,
2875 + retryDelay: this.options.retryDelay,
2876 + networkMode: this.options.networkMode
2877 + });
2878 + return this.#retryer.promise;
2879 + };
2880 + const restored = this.state.status === "pending";
2881 + try {
2882 + if (!restored) {
2883 + this.#dispatch({ type: "pending", variables });
2884 + await this.#mutationCache.config.onMutate?.(
2885 + variables,
2886 + this
2887 + );
2888 + const context = await this.options.onMutate?.(variables);
2889 + if (context !== this.state.context) {
2890 + this.#dispatch({
2891 + type: "pending",
2892 + context,
2893 + variables
2894 + });
2895 + }
2896 + }
2897 + const data = await executeMutation();
2898 + await this.#mutationCache.config.onSuccess?.(
2899 + data,
2900 + variables,
2901 + this.state.context,
2902 + this
2903 + );
2904 + await this.options.onSuccess?.(data, variables, this.state.context);
2905 + await this.#mutationCache.config.onSettled?.(
2906 + data,
2907 + null,
2908 + this.state.variables,
2909 + this.state.context,
2910 + this
2911 + );
2912 + await this.options.onSettled?.(data, null, variables, this.state.context);
2913 + this.#dispatch({ type: "success", data });
2914 + return data;
2915 + } catch (error) {
2916 + try {
2917 + await this.#mutationCache.config.onError?.(
2918 + error,
2919 + variables,
2920 + this.state.context,
2921 + this
2922 + );
2923 + await this.options.onError?.(
2924 + error,
2925 + variables,
2926 + this.state.context
2927 + );
2928 + await this.#mutationCache.config.onSettled?.(
2929 + void 0,
2930 + error,
2931 + this.state.variables,
2932 + this.state.context,
2933 + this
2934 + );
2935 + await this.options.onSettled?.(
2936 + void 0,
2937 + error,
2938 + variables,
2939 + this.state.context
2940 + );
2941 + throw error;
2942 + } finally {
2943 + this.#dispatch({ type: "error", error });
2944 + }
2945 + }
2946 + }
2947 + #dispatch(action) {
2948 + const reducer = (state) => {
2949 + switch (action.type) {
2950 + case "failed":
2951 + return {
2952 + ...state,
2953 + failureCount: action.failureCount,
2954 + failureReason: action.error
2955 + };
2956 + case "pause":
2957 + return {
2958 + ...state,
2959 + isPaused: true
2960 + };
2961 + case "continue":
2962 + return {
2963 + ...state,
2964 + isPaused: false
2965 + };
2966 + case "pending":
2967 + return {
2968 + ...state,
2969 + context: action.context,
2970 + data: void 0,
2971 + failureCount: 0,
2972 + failureReason: null,
2973 + error: null,
2974 + isPaused: !(0, import_retryer.canFetch)(this.options.networkMode),
2975 + status: "pending",
2976 + variables: action.variables,
2977 + submittedAt: Date.now()
2978 + };
2979 + case "success":
2980 + return {
2981 + ...state,
2982 + data: action.data,
2983 + failureCount: 0,
2984 + failureReason: null,
2985 + error: null,
2986 + status: "success",
2987 + isPaused: false
2988 + };
2989 + case "error":
2990 + return {
2991 + ...state,
2992 + data: void 0,
2993 + error: action.error,
2994 + failureCount: state.failureCount + 1,
2995 + failureReason: action.error,
2996 + isPaused: false,
2997 + status: "error"
2998 + };
2999 + }
3000 + };
3001 + this.state = reducer(this.state);
3002 + import_notifyManager.notifyManager.batch(() => {
3003 + this.#observers.forEach((observer) => {
3004 + observer.onMutationUpdate(action);
3005 + });
3006 + this.#mutationCache.notify({
3007 + mutation: this,
3008 + type: "updated",
3009 + action
3010 + });
3011 + });
3012 + }
3013 +};
3014 +function getDefaultState() {
3015 + return {
3016 + context: void 0,
3017 + data: void 0,
3018 + error: null,
3019 + failureCount: 0,
3020 + failureReason: null,
3021 + isPaused: false,
3022 + status: "idle",
3023 + variables: void 0,
3024 + submittedAt: 0
3025 + };
3026 +}
3027 +// Annotate the CommonJS export names for ESM import in node:
3028 +0 && (0);
3029 +//# sourceMappingURL=mutation.cjs.map
3030 +
3031 +/***/ }),
3032 +
3033 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
3034 +/*!***************************************************************************!*\
3035 + !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
3036 + \***************************************************************************/
3037 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3038 +
3039 +"use strict";
3040 +
3041 +var __defProp = Object.defineProperty;
3042 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3043 +var __getOwnPropNames = Object.getOwnPropertyNames;
3044 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3045 +var __export = (target, all) => {
3046 + for (var name in all)
3047 + __defProp(target, name, { get: all[name], enumerable: true });
3048 +};
3049 +var __copyProps = (to, from, except, desc) => {
3050 + if (from && typeof from === "object" || typeof from === "function") {
3051 + for (let key of __getOwnPropNames(from))
3052 + if (!__hasOwnProp.call(to, key) && key !== except)
3053 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3054 + }
3055 + return to;
3056 +};
3057 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3058 +
3059 +// src/mutationCache.ts
3060 +var mutationCache_exports = {};
3061 +__export(mutationCache_exports, {
3062 + MutationCache: () => MutationCache
3063 +});
3064 +module.exports = __toCommonJS(mutationCache_exports);
3065 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3066 +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
3067 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3068 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3069 +var MutationCache = class extends import_subscribable.Subscribable {
3070 + constructor(config = {}) {
3071 + super();
3072 + this.config = config;
3073 + this.#mutations = [];
3074 + this.#mutationId = 0;
3075 + }
3076 + #mutations;
3077 + #mutationId;
3078 + #resuming;
3079 + build(client, options, state) {
3080 + const mutation = new import_mutation.Mutation({
3081 + mutationCache: this,
3082 + mutationId: ++this.#mutationId,
3083 + options: client.defaultMutationOptions(options),
3084 + state
3085 + });
3086 + this.add(mutation);
3087 + return mutation;
3088 + }
3089 + add(mutation) {
3090 + this.#mutations.push(mutation);
3091 + this.notify({ type: "added", mutation });
3092 + }
3093 + remove(mutation) {
3094 + this.#mutations = this.#mutations.filter((x) => x !== mutation);
3095 + this.notify({ type: "removed", mutation });
3096 + }
3097 + clear() {
3098 + import_notifyManager.notifyManager.batch(() => {
3099 + this.#mutations.forEach((mutation) => {
3100 + this.remove(mutation);
3101 + });
3102 + });
3103 + }
3104 + getAll() {
3105 + return this.#mutations;
3106 + }
3107 + find(filters) {
3108 + const defaultedFilters = { exact: true, ...filters };
3109 + return this.#mutations.find(
3110 + (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
3111 + );
3112 + }
3113 + findAll(filters = {}) {
3114 + return this.#mutations.filter(
3115 + (mutation) => (0, import_utils.matchMutation)(filters, mutation)
3116 + );
3117 + }
3118 + notify(event) {
3119 + import_notifyManager.notifyManager.batch(() => {
3120 + this.listeners.forEach((listener) => {
3121 + listener(event);
3122 + });
3123 + });
3124 + }
3125 + resumePausedMutations() {
3126 + this.#resuming = (this.#resuming ?? Promise.resolve()).then(() => {
3127 + const pausedMutations = this.#mutations.filter((x) => x.state.isPaused);
3128 + return import_notifyManager.notifyManager.batch(
3129 + () => pausedMutations.reduce(
3130 + (promise, mutation) => promise.then(() => mutation.continue().catch(import_utils.noop)),
3131 + Promise.resolve()
3132 + )
3133 + );
3134 + }).then(() => {
3135 + this.#resuming = void 0;
3136 + });
3137 + return this.#resuming;
3138 + }
3139 +};
3140 +// Annotate the CommonJS export names for ESM import in node:
3141 +0 && (0);
3142 +//# sourceMappingURL=mutationCache.cjs.map
3143 +
3144 +/***/ }),
3145 +
3146 +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
3147 +/*!******************************************************************************!*\
3148 + !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
3149 + \******************************************************************************/
3150 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3151 +
3152 +"use strict";
3153 +
3154 +var __defProp = Object.defineProperty;
3155 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3156 +var __getOwnPropNames = Object.getOwnPropertyNames;
3157 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3158 +var __export = (target, all) => {
3159 + for (var name in all)
3160 + __defProp(target, name, { get: all[name], enumerable: true });
3161 +};
3162 +var __copyProps = (to, from, except, desc) => {
3163 + if (from && typeof from === "object" || typeof from === "function") {
3164 + for (let key of __getOwnPropNames(from))
3165 + if (!__hasOwnProp.call(to, key) && key !== except)
3166 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3167 + }
3168 + return to;
3169 +};
3170 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3171 +
3172 +// src/mutationObserver.ts
3173 +var mutationObserver_exports = {};
3174 +__export(mutationObserver_exports, {
3175 + MutationObserver: () => MutationObserver
3176 +});
3177 +module.exports = __toCommonJS(mutationObserver_exports);
3178 +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
3179 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3180 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3181 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3182 +var MutationObserver = class extends import_subscribable.Subscribable {
3183 + constructor(client, options) {
3184 + super();
3185 + this.#currentResult = void 0;
3186 + this.#client = client;
3187 + this.setOptions(options);
3188 + this.bindMethods();
3189 + this.#updateResult();
3190 + }
3191 + #client;
3192 + #currentResult;
3193 + #currentMutation;
3194 + #mutateOptions;
3195 + bindMethods() {
3196 + this.mutate = this.mutate.bind(this);
3197 + this.reset = this.reset.bind(this);
3198 + }
3199 + setOptions(options) {
3200 + const prevOptions = this.options;
3201 + this.options = this.#client.defaultMutationOptions(options);
3202 + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) {
3203 + this.#client.getMutationCache().notify({
3204 + type: "observerOptionsUpdated",
3205 + mutation: this.#currentMutation,
3206 + observer: this
3207 + });
3208 + }
3209 + this.#currentMutation?.setOptions(this.options);
3210 + }
3211 + onUnsubscribe() {
3212 + if (!this.hasListeners()) {
3213 + this.#currentMutation?.removeObserver(this);
3214 + }
3215 + }
3216 + onMutationUpdate(action) {
3217 + this.#updateResult();
3218 + this.#notify(action);
3219 + }
3220 + getCurrentResult() {
3221 + return this.#currentResult;
3222 + }
3223 + reset() {
3224 + this.#currentMutation = void 0;
3225 + this.#updateResult();
3226 + this.#notify();
3227 + }
3228 + mutate(variables, options) {
3229 + this.#mutateOptions = options;
3230 + this.#currentMutation?.removeObserver(this);
3231 + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
3232 + this.#currentMutation.addObserver(this);
3233 + return this.#currentMutation.execute(variables);
3234 + }
3235 + #updateResult() {
3236 + const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)();
3237 + this.#currentResult = {
3238 + ...state,
3239 + isPending: state.status === "pending",
3240 + isSuccess: state.status === "success",
3241 + isError: state.status === "error",
3242 + isIdle: state.status === "idle",
3243 + mutate: this.mutate,
3244 + reset: this.reset
3245 + };
3246 + }
3247 + #notify(action) {
3248 + import_notifyManager.notifyManager.batch(() => {
3249 + if (this.#mutateOptions && this.hasListeners()) {
3250 + if (action?.type === "success") {
3251 + this.#mutateOptions.onSuccess?.(
3252 + action.data,
3253 + this.#currentResult.variables,
3254 + this.#currentResult.context
3255 + );
3256 + this.#mutateOptions.onSettled?.(
3257 + action.data,
3258 + null,
3259 + this.#currentResult.variables,
3260 + this.#currentResult.context
3261 + );
3262 + } else if (action?.type === "error") {
3263 + this.#mutateOptions.onError?.(
3264 + action.error,
3265 + this.#currentResult.variables,
3266 + this.#currentResult.context
3267 + );
3268 + this.#mutateOptions.onSettled?.(
3269 + void 0,
3270 + action.error,
3271 + this.#currentResult.variables,
3272 + this.#currentResult.context
3273 + );
3274 + }
3275 + }
3276 + this.listeners.forEach((listener) => {
3277 + listener(this.#currentResult);
3278 + });
3279 + });
3280 + }
3281 +};
3282 +// Annotate the CommonJS export names for ESM import in node:
3283 +0 && (0);
3284 +//# sourceMappingURL=mutationObserver.cjs.map
3285 +
3286 +/***/ }),
3287 +
3288 +/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
3289 +/*!***************************************************************************!*\
3290 + !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
3291 + \***************************************************************************/
3292 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3293 +
3294 +"use strict";
3295 +
3296 +var __defProp = Object.defineProperty;
3297 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3298 +var __getOwnPropNames = Object.getOwnPropertyNames;
3299 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3300 +var __export = (target, all) => {
3301 + for (var name in all)
3302 + __defProp(target, name, { get: all[name], enumerable: true });
3303 +};
3304 +var __copyProps = (to, from, except, desc) => {
3305 + if (from && typeof from === "object" || typeof from === "function") {
3306 + for (let key of __getOwnPropNames(from))
3307 + if (!__hasOwnProp.call(to, key) && key !== except)
3308 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3309 + }
3310 + return to;
3311 +};
3312 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3313 +
3314 +// src/notifyManager.ts
3315 +var notifyManager_exports = {};
3316 +__export(notifyManager_exports, {
3317 + createNotifyManager: () => createNotifyManager,
3318 + notifyManager: () => notifyManager
3319 +});
3320 +module.exports = __toCommonJS(notifyManager_exports);
3321 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3322 +function createNotifyManager() {
3323 + let queue = [];
3324 + let transactions = 0;
3325 + let notifyFn = (callback) => {
3326 + callback();
3327 + };
3328 + let batchNotifyFn = (callback) => {
3329 + callback();
3330 + };
3331 + const batch = (callback) => {
3332 + let result;
3333 + transactions++;
3334 + try {
3335 + result = callback();
3336 + } finally {
3337 + transactions--;
3338 + if (!transactions) {
3339 + flush();
3340 + }
3341 + }
3342 + return result;
3343 + };
3344 + const schedule = (callback) => {
3345 + if (transactions) {
3346 + queue.push(callback);
3347 + } else {
3348 + (0, import_utils.scheduleMicrotask)(() => {
3349 + notifyFn(callback);
3350 + });
3351 + }
3352 + };
3353 + const batchCalls = (callback) => {
3354 + return (...args) => {
3355 + schedule(() => {
3356 + callback(...args);
3357 + });
3358 + };
3359 + };
3360 + const flush = () => {
3361 + const originalQueue = queue;
3362 + queue = [];
3363 + if (originalQueue.length) {
3364 + (0, import_utils.scheduleMicrotask)(() => {
3365 + batchNotifyFn(() => {
3366 + originalQueue.forEach((callback) => {
3367 + notifyFn(callback);
3368 + });
3369 + });
3370 + });
3371 + }
3372 + };
3373 + const setNotifyFunction = (fn) => {
3374 + notifyFn = fn;
3375 + };
3376 + const setBatchNotifyFunction = (fn) => {
3377 + batchNotifyFn = fn;
3378 + };
3379 + return {
3380 + batch,
3381 + batchCalls,
3382 + schedule,
3383 + setNotifyFunction,
3384 + setBatchNotifyFunction
3385 + };
3386 +}
3387 +var notifyManager = createNotifyManager();
3388 +// Annotate the CommonJS export names for ESM import in node:
3389 +0 && (0);
3390 +//# sourceMappingURL=notifyManager.cjs.map
3391 +
3392 +/***/ }),
3393 +
3394 +/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
3395 +/*!***************************************************************************!*\
3396 + !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
3397 + \***************************************************************************/
3398 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3399 +
3400 +"use strict";
3401 +
3402 +var __defProp = Object.defineProperty;
3403 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3404 +var __getOwnPropNames = Object.getOwnPropertyNames;
3405 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3406 +var __export = (target, all) => {
3407 + for (var name in all)
3408 + __defProp(target, name, { get: all[name], enumerable: true });
3409 +};
3410 +var __copyProps = (to, from, except, desc) => {
3411 + if (from && typeof from === "object" || typeof from === "function") {
3412 + for (let key of __getOwnPropNames(from))
3413 + if (!__hasOwnProp.call(to, key) && key !== except)
3414 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3415 + }
3416 + return to;
3417 +};
3418 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3419 +
3420 +// src/onlineManager.ts
3421 +var onlineManager_exports = {};
3422 +__export(onlineManager_exports, {
3423 + OnlineManager: () => OnlineManager,
3424 + onlineManager: () => onlineManager
3425 +});
3426 +module.exports = __toCommonJS(onlineManager_exports);
3427 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3428 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3429 +var OnlineManager = class extends import_subscribable.Subscribable {
3430 + #online = true;
3431 + #cleanup;
3432 + #setup;
3433 + constructor() {
3434 + super();
3435 + this.#setup = (onOnline) => {
3436 + if (!import_utils.isServer && window.addEventListener) {
3437 + const onlineListener = () => onOnline(true);
3438 + const offlineListener = () => onOnline(false);
3439 + window.addEventListener("online", onlineListener, false);
3440 + window.addEventListener("offline", offlineListener, false);
3441 + return () => {
3442 + window.removeEventListener("online", onlineListener);
3443 + window.removeEventListener("offline", offlineListener);
3444 + };
3445 + }
3446 + return;
3447 + };
3448 + }
3449 + onSubscribe() {
3450 + if (!this.#cleanup) {
3451 + this.setEventListener(this.#setup);
3452 + }
3453 + }
3454 + onUnsubscribe() {
3455 + if (!this.hasListeners()) {
3456 + this.#cleanup?.();
3457 + this.#cleanup = void 0;
3458 + }
3459 + }
3460 + setEventListener(setup) {
3461 + this.#setup = setup;
3462 + this.#cleanup?.();
3463 + this.#cleanup = setup(this.setOnline.bind(this));
3464 + }
3465 + setOnline(online) {
3466 + const changed = this.#online !== online;
3467 + if (changed) {
3468 + this.#online = online;
3469 + this.listeners.forEach((listener) => {
3470 + listener(online);
3471 + });
3472 + }
3473 + }
3474 + isOnline() {
3475 + return this.#online;
3476 + }
3477 +};
3478 +var onlineManager = new OnlineManager();
3479 +// Annotate the CommonJS export names for ESM import in node:
3480 +0 && (0);
3481 +//# sourceMappingURL=onlineManager.cjs.map
3482 +
3483 +/***/ }),
3484 +
3485 +/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
3486 +/*!*****************************************************************************!*\
3487 + !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
3488 + \*****************************************************************************/
3489 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3490 +
3491 +"use strict";
3492 +
3493 +var __defProp = Object.defineProperty;
3494 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3495 +var __getOwnPropNames = Object.getOwnPropertyNames;
3496 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3497 +var __export = (target, all) => {
3498 + for (var name in all)
3499 + __defProp(target, name, { get: all[name], enumerable: true });
3500 +};
3501 +var __copyProps = (to, from, except, desc) => {
3502 + if (from && typeof from === "object" || typeof from === "function") {
3503 + for (let key of __getOwnPropNames(from))
3504 + if (!__hasOwnProp.call(to, key) && key !== except)
3505 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3506 + }
3507 + return to;
3508 +};
3509 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3510 +
3511 +// src/queriesObserver.ts
3512 +var queriesObserver_exports = {};
3513 +__export(queriesObserver_exports, {
3514 + QueriesObserver: () => QueriesObserver
3515 +});
3516 +module.exports = __toCommonJS(queriesObserver_exports);
3517 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3518 +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3519 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3520 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3521 +function difference(array1, array2) {
3522 + return array1.filter((x) => !array2.includes(x));
3523 +}
3524 +function replaceAt(array, index, value) {
3525 + const copy = array.slice(0);
3526 + copy[index] = value;
3527 + return copy;
3528 +}
3529 +var QueriesObserver = class extends import_subscribable.Subscribable {
3530 + #client;
3531 + #result;
3532 + #queries;
3533 + #observers;
3534 + #options;
3535 + #combinedResult;
3536 + constructor(client, queries, options) {
3537 + super();
3538 + this.#client = client;
3539 + this.#queries = [];
3540 + this.#observers = [];
3541 + this.#setResult([]);
3542 + this.setQueries(queries, options);
3543 + }
3544 + #setResult(value) {
3545 + this.#result = value;
3546 + this.#combinedResult = this.#combineResult(value);
3547 + }
3548 + onSubscribe() {
3549 + if (this.listeners.size === 1) {
3550 + this.#observers.forEach((observer) => {
3551 + observer.subscribe((result) => {
3552 + this.#onUpdate(observer, result);
3553 + });
3554 + });
3555 + }
3556 + }
3557 + onUnsubscribe() {
3558 + if (!this.listeners.size) {
3559 + this.destroy();
3560 + }
3561 + }
3562 + destroy() {
3563 + this.listeners = /* @__PURE__ */ new Set();
3564 + this.#observers.forEach((observer) => {
3565 + observer.destroy();
3566 + });
3567 + }
3568 + setQueries(queries, options, notifyOptions) {
3569 + this.#queries = queries;
3570 + this.#options = options;
3571 + import_notifyManager.notifyManager.batch(() => {
3572 + const prevObservers = this.#observers;
3573 + const newObserverMatches = this.#findMatchingObservers(this.#queries);
3574 + newObserverMatches.forEach(
3575 + (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
3576 + );
3577 + const newObservers = newObserverMatches.map((match) => match.observer);
3578 + const newResult = newObservers.map(
3579 + (observer) => observer.getCurrentResult()
3580 + );
3581 + const hasIndexChange = newObservers.some(
3582 + (observer, index) => observer !== prevObservers[index]
3583 + );
3584 + if (prevObservers.length === newObservers.length && !hasIndexChange) {
3585 + return;
3586 + }
3587 + this.#observers = newObservers;
3588 + this.#setResult(newResult);
3589 + if (!this.hasListeners()) {
3590 + return;
3591 + }
3592 + difference(prevObservers, newObservers).forEach((observer) => {
3593 + observer.destroy();
3594 + });
3595 + difference(newObservers, prevObservers).forEach((observer) => {
3596 + observer.subscribe((result) => {
3597 + this.#onUpdate(observer, result);
3598 + });
3599 + });
3600 + this.#notify();
3601 + });
3602 + }
3603 + getCurrentResult() {
3604 + return this.#combinedResult;
3605 + }
3606 + getQueries() {
3607 + return this.#observers.map((observer) => observer.getCurrentQuery());
3608 + }
3609 + getObservers() {
3610 + return this.#observers;
3611 + }
3612 + getOptimisticResult(queries) {
3613 + const matches = this.#findMatchingObservers(queries);
3614 + const result = matches.map(
3615 + (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
3616 + );
3617 + return [
3618 + result,
3619 + (r) => {
3620 + return this.#combineResult(r ?? result);
3621 + },
3622 + () => {
3623 + return matches.map((match, index) => {
3624 + const observerResult = result[index];
3625 + return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult) : observerResult;
3626 + });
3627 + }
3628 + ];
3629 + }
3630 + #combineResult(input) {
3631 + const combine = this.#options?.combine;
3632 + if (combine) {
3633 + return (0, import_utils.replaceEqualDeep)(this.#combinedResult, combine(input));
3634 + }
3635 + return input;
3636 + }
3637 + #findMatchingObservers(queries) {
3638 + const prevObservers = this.#observers;
3639 + const prevObserversMap = new Map(
3640 + prevObservers.map((observer) => [observer.options.queryHash, observer])
3641 + );
3642 + const defaultedQueryOptions = queries.map(
3643 + (options) => this.#client.defaultQueryOptions(options)
3644 + );
3645 + const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => {
3646 + const match = prevObserversMap.get(defaultedOptions.queryHash);
3647 + if (match != null) {
3648 + return [{ defaultedQueryOptions: defaultedOptions, observer: match }];
3649 + }
3650 + return [];
3651 + });
3652 + const matchedQueryHashes = new Set(
3653 + matchingObservers.map((match) => match.defaultedQueryOptions.queryHash)
3654 + );
3655 + const unmatchedQueries = defaultedQueryOptions.filter(
3656 + (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash)
3657 + );
3658 + const getObserver = (options) => {
3659 + const defaultedOptions = this.#client.defaultQueryOptions(options);
3660 + const currentObserver = this.#observers.find(
3661 + (o) => o.options.queryHash === defaultedOptions.queryHash
3662 + );
3663 + return currentObserver ?? new import_queryObserver.QueryObserver(this.#client, defaultedOptions);
3664 + };
3665 + const newOrReusedObservers = unmatchedQueries.map((options) => {
3666 + return {
3667 + defaultedQueryOptions: options,
3668 + observer: getObserver(options)
3669 + };
3670 + });
3671 + const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions);
3672 + return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries);
3673 + }
3674 + #onUpdate(observer, result) {
3675 + const index = this.#observers.indexOf(observer);
3676 + if (index !== -1) {
3677 + this.#setResult(replaceAt(this.#result, index, result));
3678 + this.#notify();
3679 + }
3680 + }
3681 + #notify() {
3682 + import_notifyManager.notifyManager.batch(() => {
3683 + this.listeners.forEach((listener) => {
3684 + listener(this.#result);
3685 + });
3686 + });
3687 + }
3688 +};
3689 +// Annotate the CommonJS export names for ESM import in node:
3690 +0 && (0);
3691 +//# sourceMappingURL=queriesObserver.cjs.map
3692 +
3693 +/***/ }),
3694 +
3695 +/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
3696 +/*!*******************************************************************!*\
3697 + !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
3698 + \*******************************************************************/
3699 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3700 +
3701 +"use strict";
3702 +
3703 +var __defProp = Object.defineProperty;
3704 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3705 +var __getOwnPropNames = Object.getOwnPropertyNames;
3706 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3707 +var __export = (target, all) => {
3708 + for (var name in all)
3709 + __defProp(target, name, { get: all[name], enumerable: true });
3710 +};
3711 +var __copyProps = (to, from, except, desc) => {
3712 + if (from && typeof from === "object" || typeof from === "function") {
3713 + for (let key of __getOwnPropNames(from))
3714 + if (!__hasOwnProp.call(to, key) && key !== except)
3715 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3716 + }
3717 + return to;
3718 +};
3719 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3720 +
3721 +// src/query.ts
3722 +var query_exports = {};
3723 +__export(query_exports, {
3724 + Query: () => Query
3725 +});
3726 +module.exports = __toCommonJS(query_exports);
3727 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3728 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3729 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3730 +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
3731 +var Query = class extends import_removable.Removable {
3732 + constructor(config) {
3733 + super();
3734 + this.#abortSignalConsumed = false;
3735 + this.#defaultOptions = config.defaultOptions;
3736 + this.#setOptions(config.options);
3737 + this.#observers = [];
3738 + this.#cache = config.cache;
3739 + this.queryKey = config.queryKey;
3740 + this.queryHash = config.queryHash;
3741 + this.#initialState = config.state || getDefaultState(this.options);
3742 + this.state = this.#initialState;
3743 + this.scheduleGc();
3744 + }
3745 + #initialState;
3746 + #revertState;
3747 + #cache;
3748 + #promise;
3749 + #retryer;
3750 + #observers;
3751 + #defaultOptions;
3752 + #abortSignalConsumed;
3753 + get meta() {
3754 + return this.options.meta;
3755 + }
3756 + #setOptions(options) {
3757 + this.options = { ...this.#defaultOptions, ...options };
3758 + this.updateGcTime(this.options.gcTime);
3759 + }
3760 + optionalRemove() {
3761 + if (!this.#observers.length && this.state.fetchStatus === "idle") {
3762 + this.#cache.remove(this);
3763 + }
3764 + }
3765 + setData(newData, options) {
3766 + const data = (0, import_utils.replaceData)(this.state.data, newData, this.options);
3767 + this.#dispatch({
3768 + data,
3769 + type: "success",
3770 + dataUpdatedAt: options?.updatedAt,
3771 + manual: options?.manual
3772 + });
3773 + return data;
3774 + }
3775 + setState(state, setStateOptions) {
3776 + this.#dispatch({ type: "setState", state, setStateOptions });
3777 + }
3778 + cancel(options) {
3779 + const promise = this.#promise;
3780 + this.#retryer?.cancel(options);
3781 + return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
3782 + }
3783 + destroy() {
3784 + super.destroy();
3785 + this.cancel({ silent: true });
3786 + }
3787 + reset() {
3788 + this.destroy();
3789 + this.setState(this.#initialState);
3790 + }
3791 + isActive() {
3792 + return this.#observers.some(
3793 + (observer) => observer.options.enabled !== false
3794 + );
3795 + }
3796 + isDisabled() {
3797 + return this.getObserversCount() > 0 && !this.isActive();
3798 + }
3799 + isStale() {
3800 + return this.state.isInvalidated || !this.state.dataUpdatedAt || this.#observers.some((observer) => observer.getCurrentResult().isStale);
3801 + }
3802 + isStaleByTime(staleTime = 0) {
3803 + return this.state.isInvalidated || !this.state.dataUpdatedAt || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
3804 + }
3805 + onFocus() {
3806 + const observer = this.#observers.find((x) => x.shouldFetchOnWindowFocus());
3807 + observer?.refetch({ cancelRefetch: false });
3808 + this.#retryer?.continue();
3809 + }
3810 + onOnline() {
3811 + const observer = this.#observers.find((x) => x.shouldFetchOnReconnect());
3812 + observer?.refetch({ cancelRefetch: false });
3813 + this.#retryer?.continue();
3814 + }
3815 + addObserver(observer) {
3816 + if (!this.#observers.includes(observer)) {
3817 + this.#observers.push(observer);
3818 + this.clearGcTimeout();
3819 + this.#cache.notify({ type: "observerAdded", query: this, observer });
3820 + }
3821 + }
3822 + removeObserver(observer) {
3823 + if (this.#observers.includes(observer)) {
3824 + this.#observers = this.#observers.filter((x) => x !== observer);
3825 + if (!this.#observers.length) {
3826 + if (this.#retryer) {
3827 + if (this.#abortSignalConsumed) {
3828 + this.#retryer.cancel({ revert: true });
3829 + } else {
3830 + this.#retryer.cancelRetry();
3831 + }
3832 + }
3833 + this.scheduleGc();
3834 + }
3835 + this.#cache.notify({ type: "observerRemoved", query: this, observer });
3836 + }
3837 + }
3838 + getObserversCount() {
3839 + return this.#observers.length;
3840 + }
3841 + invalidate() {
3842 + if (!this.state.isInvalidated) {
3843 + this.#dispatch({ type: "invalidate" });
3844 + }
3845 + }
3846 + fetch(options, fetchOptions) {
3847 + if (this.state.fetchStatus !== "idle") {
3848 + if (this.state.dataUpdatedAt && fetchOptions?.cancelRefetch) {
3849 + this.cancel({ silent: true });
3850 + } else if (this.#promise) {
3851 + this.#retryer?.continueRetry();
3852 + return this.#promise;
3853 + }
3854 + }
3855 + if (options) {
3856 + this.#setOptions(options);
3857 + }
3858 + if (!this.options.queryFn) {
3859 + const observer = this.#observers.find((x) => x.options.queryFn);
3860 + if (observer) {
3861 + this.#setOptions(observer.options);
3862 + }
3863 + }
3864 + if (true) {
3865 + if (!Array.isArray(this.options.queryKey)) {
3866 + console.error(
3867 + `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
3868 + );
3869 + }
3870 + }
3871 + const abortController = new AbortController();
3872 + const queryFnContext = {
3873 + queryKey: this.queryKey,
3874 + meta: this.meta
3875 + };
3876 + const addSignalProperty = (object) => {
3877 + Object.defineProperty(object, "signal", {
3878 + enumerable: true,
3879 + get: () => {
3880 + this.#abortSignalConsumed = true;
3881 + return abortController.signal;
3882 + }
3883 + });
3884 + };
3885 + addSignalProperty(queryFnContext);
3886 + const fetchFn = () => {
3887 + if (!this.options.queryFn) {
3888 + return Promise.reject(
3889 + new Error(`Missing queryFn: '${this.options.queryHash}'`)
3890 + );
3891 + }
3892 + this.#abortSignalConsumed = false;
3893 + if (this.options.persister) {
3894 + return this.options.persister(
3895 + this.options.queryFn,
3896 + queryFnContext,
3897 + this
3898 + );
3899 + }
3900 + return this.options.queryFn(
3901 + queryFnContext
3902 + );
3903 + };
3904 + const context = {
3905 + fetchOptions,
3906 + options: this.options,
3907 + queryKey: this.queryKey,
3908 + state: this.state,
3909 + fetchFn
3910 + };
3911 + addSignalProperty(context);
3912 + this.options.behavior?.onFetch(
3913 + context,
3914 + this
3915 + );
3916 + this.#revertState = this.state;
3917 + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
3918 + this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
3919 + }
3920 + const onError = (error) => {
3921 + if (!((0, import_retryer.isCancelledError)(error) && error.silent)) {
3922 + this.#dispatch({
3923 + type: "error",
3924 + error
3925 + });
3926 + }
3927 + if (!(0, import_retryer.isCancelledError)(error)) {
3928 + this.#cache.config.onError?.(
3929 + error,
3930 + this
3931 + );
3932 + this.#cache.config.onSettled?.(
3933 + this.state.data,
3934 + error,
3935 + this
3936 + );
3937 + }
3938 + if (!this.isFetchingOptimistic) {
3939 + this.scheduleGc();
3940 + }
3941 + this.isFetchingOptimistic = false;
3942 + };
3943 + this.#retryer = (0, import_retryer.createRetryer)({
3944 + fn: context.fetchFn,
3945 + abort: abortController.abort.bind(abortController),
3946 + onSuccess: (data) => {
3947 + if (typeof data === "undefined") {
3948 + if (true) {
3949 + console.error(
3950 + `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
3951 + );
3952 + }
3953 + onError(new Error(`${this.queryHash} data is undefined`));
3954 + return;
3955 + }
3956 + this.setData(data);
3957 + this.#cache.config.onSuccess?.(data, this);
3958 + this.#cache.config.onSettled?.(
3959 + data,
3960 + this.state.error,
3961 + this
3962 + );
3963 + if (!this.isFetchingOptimistic) {
3964 + this.scheduleGc();
3965 + }
3966 + this.isFetchingOptimistic = false;
3967 + },
3968 + onError,
3969 + onFail: (failureCount, error) => {
3970 + this.#dispatch({ type: "failed", failureCount, error });
3971 + },
3972 + onPause: () => {
3973 + this.#dispatch({ type: "pause" });
3974 + },
3975 + onContinue: () => {
3976 + this.#dispatch({ type: "continue" });
3977 + },
3978 + retry: context.options.retry,
3979 + retryDelay: context.options.retryDelay,
3980 + networkMode: context.options.networkMode
3981 + });
3982 + this.#promise = this.#retryer.promise;
3983 + return this.#promise;
3984 + }
3985 + #dispatch(action) {
3986 + const reducer = (state) => {
3987 + switch (action.type) {
3988 + case "failed":
3989 + return {
3990 + ...state,
3991 + fetchFailureCount: action.failureCount,
3992 + fetchFailureReason: action.error
3993 + };
3994 + case "pause":
3995 + return {
3996 + ...state,
3997 + fetchStatus: "paused"
3998 + };
3999 + case "continue":
4000 + return {
4001 + ...state,
4002 + fetchStatus: "fetching"
4003 + };
4004 + case "fetch":
4005 + return {
4006 + ...state,
4007 + fetchFailureCount: 0,
4008 + fetchFailureReason: null,
4009 + fetchMeta: action.meta ?? null,
4010 + fetchStatus: (0, import_retryer.canFetch)(this.options.networkMode) ? "fetching" : "paused",
4011 + ...!state.dataUpdatedAt && {
4012 + error: null,
4013 + status: "pending"
4014 + }
4015 + };
4016 + case "success":
4017 + return {
4018 + ...state,
4019 + data: action.data,
4020 + dataUpdateCount: state.dataUpdateCount + 1,
4021 + dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
4022 + error: null,
4023 + isInvalidated: false,
4024 + status: "success",
4025 + ...!action.manual && {
4026 + fetchStatus: "idle",
4027 + fetchFailureCount: 0,
4028 + fetchFailureReason: null
4029 + }
4030 + };
4031 + case "error":
4032 + const error = action.error;
4033 + if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) {
4034 + return { ...this.#revertState, fetchStatus: "idle" };
4035 + }
4036 + return {
4037 + ...state,
4038 + error,
4039 + errorUpdateCount: state.errorUpdateCount + 1,
4040 + errorUpdatedAt: Date.now(),
4041 + fetchFailureCount: state.fetchFailureCount + 1,
4042 + fetchFailureReason: error,
4043 + fetchStatus: "idle",
4044 + status: "error"
4045 + };
4046 + case "invalidate":
4047 + return {
4048 + ...state,
4049 + isInvalidated: true
4050 + };
4051 + case "setState":
4052 + return {
4053 + ...state,
4054 + ...action.state
4055 + };
4056 + }
4057 + };
4058 + this.state = reducer(this.state);
4059 + import_notifyManager.notifyManager.batch(() => {
4060 + this.#observers.forEach((observer) => {
4061 + observer.onQueryUpdate();
4062 + });
4063 + this.#cache.notify({ query: this, type: "updated", action });
4064 + });
4065 + }
4066 +};
4067 +function getDefaultState(options) {
4068 + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
4069 + const hasData = typeof data !== "undefined";
4070 + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
4071 + return {
4072 + data,
4073 + dataUpdateCount: 0,
4074 + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
4075 + error: null,
4076 + errorUpdateCount: 0,
4077 + errorUpdatedAt: 0,
4078 + fetchFailureCount: 0,
4079 + fetchFailureReason: null,
4080 + fetchMeta: null,
4081 + isInvalidated: false,
4082 + status: hasData ? "success" : "pending",
4083 + fetchStatus: "idle"
4084 + };
4085 +}
4086 +// Annotate the CommonJS export names for ESM import in node:
4087 +0 && (0);
4088 +//# sourceMappingURL=query.cjs.map
4089 +
4090 +/***/ }),
4091 +
4092 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
4093 +/*!************************************************************************!*\
4094 + !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
4095 + \************************************************************************/
4096 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4097 +
4098 +"use strict";
4099 +
4100 +var __defProp = Object.defineProperty;
4101 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4102 +var __getOwnPropNames = Object.getOwnPropertyNames;
4103 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4104 +var __export = (target, all) => {
4105 + for (var name in all)
4106 + __defProp(target, name, { get: all[name], enumerable: true });
4107 +};
4108 +var __copyProps = (to, from, except, desc) => {
4109 + if (from && typeof from === "object" || typeof from === "function") {
4110 + for (let key of __getOwnPropNames(from))
4111 + if (!__hasOwnProp.call(to, key) && key !== except)
4112 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4113 + }
4114 + return to;
4115 +};
4116 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4117 +
4118 +// src/queryCache.ts
4119 +var queryCache_exports = {};
4120 +__export(queryCache_exports, {
4121 + QueryCache: () => QueryCache
4122 +});
4123 +module.exports = __toCommonJS(queryCache_exports);
4124 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4125 +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
4126 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4127 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4128 +var QueryCache = class extends import_subscribable.Subscribable {
4129 + constructor(config = {}) {
4130 + super();
4131 + this.config = config;
4132 + this.#queries = /* @__PURE__ */ new Map();
4133 + }
4134 + #queries;
4135 + build(client, options, state) {
4136 + const queryKey = options.queryKey;
4137 + const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options);
4138 + let query = this.get(queryHash);
4139 + if (!query) {
4140 + query = new import_query.Query({
4141 + cache: this,
4142 + queryKey,
4143 + queryHash,
4144 + options: client.defaultQueryOptions(options),
4145 + state,
4146 + defaultOptions: client.getQueryDefaults(queryKey)
4147 + });
4148 + this.add(query);
4149 + }
4150 + return query;
4151 + }
4152 + add(query) {
4153 + if (!this.#queries.has(query.queryHash)) {
4154 + this.#queries.set(query.queryHash, query);
4155 + this.notify({
4156 + type: "added",
4157 + query
4158 + });
4159 + }
4160 + }
4161 + remove(query) {
4162 + const queryInMap = this.#queries.get(query.queryHash);
4163 + if (queryInMap) {
4164 + query.destroy();
4165 + if (queryInMap === query) {
4166 + this.#queries.delete(query.queryHash);
4167 + }
4168 + this.notify({ type: "removed", query });
4169 + }
4170 + }
4171 + clear() {
4172 + import_notifyManager.notifyManager.batch(() => {
4173 + this.getAll().forEach((query) => {
4174 + this.remove(query);
4175 + });
4176 + });
4177 + }
4178 + get(queryHash) {
4179 + return this.#queries.get(queryHash);
4180 + }
4181 + getAll() {
4182 + return [...this.#queries.values()];
4183 + }
4184 + find(filters) {
4185 + const defaultedFilters = { exact: true, ...filters };
4186 + return this.getAll().find(
4187 + (query) => (0, import_utils.matchQuery)(defaultedFilters, query)
4188 + );
4189 + }
4190 + findAll(filters = {}) {
4191 + const queries = this.getAll();
4192 + return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
4193 + }
4194 + notify(event) {
4195 + import_notifyManager.notifyManager.batch(() => {
4196 + this.listeners.forEach((listener) => {
4197 + listener(event);
4198 + });
4199 + });
4200 + }
4201 + onFocus() {
4202 + import_notifyManager.notifyManager.batch(() => {
4203 + this.getAll().forEach((query) => {
4204 + query.onFocus();
4205 + });
4206 + });
4207 + }
4208 + onOnline() {
4209 + import_notifyManager.notifyManager.batch(() => {
4210 + this.getAll().forEach((query) => {
4211 + query.onOnline();
4212 + });
4213 + });
4214 + }
4215 +};
4216 +// Annotate the CommonJS export names for ESM import in node:
4217 +0 && (0);
4218 +//# sourceMappingURL=queryCache.cjs.map
4219 +
4220 +/***/ }),
4221 +
4222 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
4223 +/*!*************************************************************************!*\
4224 + !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
4225 + \*************************************************************************/
4226 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4227 +
4228 +"use strict";
4229 +
4230 +var __defProp = Object.defineProperty;
4231 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4232 +var __getOwnPropNames = Object.getOwnPropertyNames;
4233 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4234 +var __export = (target, all) => {
4235 + for (var name in all)
4236 + __defProp(target, name, { get: all[name], enumerable: true });
4237 +};
4238 +var __copyProps = (to, from, except, desc) => {
4239 + if (from && typeof from === "object" || typeof from === "function") {
4240 + for (let key of __getOwnPropNames(from))
4241 + if (!__hasOwnProp.call(to, key) && key !== except)
4242 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4243 + }
4244 + return to;
4245 +};
4246 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4247 +
4248 +// src/queryClient.ts
4249 +var queryClient_exports = {};
4250 +__export(queryClient_exports, {
4251 + QueryClient: () => QueryClient
4252 +});
4253 +module.exports = __toCommonJS(queryClient_exports);
4254 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4255 +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
4256 +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
4257 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
4258 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
4259 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4260 +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
4261 +var QueryClient = class {
4262 + #queryCache;
4263 + #mutationCache;
4264 + #defaultOptions;
4265 + #queryDefaults;
4266 + #mutationDefaults;
4267 + #mountCount;
4268 + #unsubscribeFocus;
4269 + #unsubscribeOnline;
4270 + constructor(config = {}) {
4271 + this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
4272 + this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache();
4273 + this.#defaultOptions = config.defaultOptions || {};
4274 + this.#queryDefaults = /* @__PURE__ */ new Map();
4275 + this.#mutationDefaults = /* @__PURE__ */ new Map();
4276 + this.#mountCount = 0;
4277 + }
4278 + mount() {
4279 + this.#mountCount++;
4280 + if (this.#mountCount !== 1)
4281 + return;
4282 + this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(() => {
4283 + if (import_focusManager.focusManager.isFocused()) {
4284 + this.resumePausedMutations();
4285 + this.#queryCache.onFocus();
4286 + }
4287 + });
4288 + this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(() => {
4289 + if (import_onlineManager.onlineManager.isOnline()) {
4290 + this.resumePausedMutations();
4291 + this.#queryCache.onOnline();
4292 + }
4293 + });
4294 + }
4295 + unmount() {
4296 + this.#mountCount--;
4297 + if (this.#mountCount !== 0)
4298 + return;
4299 + this.#unsubscribeFocus?.();
4300 + this.#unsubscribeFocus = void 0;
4301 + this.#unsubscribeOnline?.();
4302 + this.#unsubscribeOnline = void 0;
4303 + }
4304 + isFetching(filters) {
4305 + return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
4306 + }
4307 + isMutating(filters) {
4308 + return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
4309 + }
4310 + getQueryData(queryKey) {
4311 + return this.#queryCache.find({ queryKey })?.state.data;
4312 + }
4313 + ensureQueryData(options) {
4314 + const cachedData = this.getQueryData(options.queryKey);
4315 + return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options);
4316 + }
4317 + getQueriesData(filters) {
4318 + return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => {
4319 + const data = state.data;
4320 + return [queryKey, data];
4321 + });
4322 + }
4323 + setQueryData(queryKey, updater, options) {
4324 + const query = this.#queryCache.find({ queryKey });
4325 + const prevData = query?.state.data;
4326 + const data = (0, import_utils.functionalUpdate)(updater, prevData);
4327 + if (typeof data === "undefined") {
4328 + return void 0;
4329 + }
4330 + const defaultedOptions = this.defaultQueryOptions({ queryKey });
4331 + return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
4332 + }
4333 + setQueriesData(filters, updater, options) {
4334 + return import_notifyManager.notifyManager.batch(
4335 + () => this.getQueryCache().findAll(filters).map(({ queryKey }) => [
4336 + queryKey,
4337 + this.setQueryData(queryKey, updater, options)
4338 + ])
4339 + );
4340 + }
4341 + getQueryState(queryKey) {
4342 + return this.#queryCache.find({ queryKey })?.state;
4343 + }
4344 + removeQueries(filters) {
4345 + const queryCache = this.#queryCache;
4346 + import_notifyManager.notifyManager.batch(() => {
4347 + queryCache.findAll(filters).forEach((query) => {
4348 + queryCache.remove(query);
4349 + });
4350 + });
4351 + }
4352 + resetQueries(filters, options) {
4353 + const queryCache = this.#queryCache;
4354 + const refetchFilters = {
4355 + type: "active",
4356 + ...filters
4357 + };
4358 + return import_notifyManager.notifyManager.batch(() => {
4359 + queryCache.findAll(filters).forEach((query) => {
4360 + query.reset();
4361 + });
4362 + return this.refetchQueries(refetchFilters, options);
4363 + });
4364 + }
4365 + cancelQueries(filters = {}, cancelOptions = {}) {
4366 + const defaultedCancelOptions = { revert: true, ...cancelOptions };
4367 + const promises = import_notifyManager.notifyManager.batch(
4368 + () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
4369 + );
4370 + return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
4371 + }
4372 + invalidateQueries(filters = {}, options = {}) {
4373 + return import_notifyManager.notifyManager.batch(() => {
4374 + this.#queryCache.findAll(filters).forEach((query) => {
4375 + query.invalidate();
4376 + });
4377 + if (filters.refetchType === "none") {
4378 + return Promise.resolve();
4379 + }
4380 + const refetchFilters = {
4381 + ...filters,
4382 + type: filters.refetchType ?? filters.type ?? "active"
4383 + };
4384 + return this.refetchQueries(refetchFilters, options);
4385 + });
4386 + }
4387 + refetchQueries(filters = {}, options) {
4388 + const fetchOptions = {
4389 + ...options,
4390 + cancelRefetch: options?.cancelRefetch ?? true
4391 + };
4392 + const promises = import_notifyManager.notifyManager.batch(
4393 + () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
4394 + let promise = query.fetch(void 0, fetchOptions);
4395 + if (!fetchOptions.throwOnError) {
4396 + promise = promise.catch(import_utils.noop);
4397 + }
4398 + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
4399 + })
4400 + );
4401 + return Promise.all(promises).then(import_utils.noop);
4402 + }
4403 + fetchQuery(options) {
4404 + const defaultedOptions = this.defaultQueryOptions(options);
4405 + if (typeof defaultedOptions.retry === "undefined") {
4406 + defaultedOptions.retry = false;
4407 + }
4408 + const query = this.#queryCache.build(this, defaultedOptions);
4409 + return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
4410 + }
4411 + prefetchQuery(options) {
4412 + return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
4413 + }
4414 + fetchInfiniteQuery(options) {
4415 + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
4416 + return this.fetchQuery(options);
4417 + }
4418 + prefetchInfiniteQuery(options) {
4419 + return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
4420 + }
4421 + resumePausedMutations() {
4422 + return this.#mutationCache.resumePausedMutations();
4423 + }
4424 + getQueryCache() {
4425 + return this.#queryCache;
4426 + }
4427 + getMutationCache() {
4428 + return this.#mutationCache;
4429 + }
4430 + getDefaultOptions() {
4431 + return this.#defaultOptions;
4432 + }
4433 + setDefaultOptions(options) {
4434 + this.#defaultOptions = options;
4435 + }
4436 + setQueryDefaults(queryKey, options) {
4437 + this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
4438 + queryKey,
4439 + defaultOptions: options
4440 + });
4441 + }
4442 + getQueryDefaults(queryKey) {
4443 + const defaults = [...this.#queryDefaults.values()];
4444 + let result = {};
4445 + defaults.forEach((queryDefault) => {
4446 + if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
4447 + result = { ...result, ...queryDefault.defaultOptions };
4448 + }
4449 + });
4450 + return result;
4451 + }
4452 + setMutationDefaults(mutationKey, options) {
4453 + this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
4454 + mutationKey,
4455 + defaultOptions: options
4456 + });
4457 + }
4458 + getMutationDefaults(mutationKey) {
4459 + const defaults = [...this.#mutationDefaults.values()];
4460 + let result = {};
4461 + defaults.forEach((queryDefault) => {
4462 + if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
4463 + result = { ...result, ...queryDefault.defaultOptions };
4464 + }
4465 + });
4466 + return result;
4467 + }
4468 + defaultQueryOptions(options) {
4469 + if (options?._defaulted) {
4470 + return options;
4471 + }
4472 + const defaultedOptions = {
4473 + ...this.#defaultOptions.queries,
4474 + ...options?.queryKey && this.getQueryDefaults(options.queryKey),
4475 + ...options,
4476 + _defaulted: true
4477 + };
4478 + if (!defaultedOptions.queryHash) {
4479 + defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
4480 + defaultedOptions.queryKey,
4481 + defaultedOptions
4482 + );
4483 + }
4484 + if (typeof defaultedOptions.refetchOnReconnect === "undefined") {
4485 + defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
4486 + }
4487 + if (typeof defaultedOptions.throwOnError === "undefined") {
4488 + defaultedOptions.throwOnError = !!defaultedOptions.suspense;
4489 + }
4490 + if (typeof defaultedOptions.networkMode === "undefined" && defaultedOptions.persister) {
4491 + defaultedOptions.networkMode = "offlineFirst";
4492 + }
4493 + return defaultedOptions;
4494 + }
4495 + defaultMutationOptions(options) {
4496 + if (options?._defaulted) {
4497 + return options;
4498 + }
4499 + return {
4500 + ...this.#defaultOptions.mutations,
4501 + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
4502 + ...options,
4503 + _defaulted: true
4504 + };
4505 + }
4506 + clear() {
4507 + this.#queryCache.clear();
4508 + this.#mutationCache.clear();
4509 + }
4510 +};
4511 +// Annotate the CommonJS export names for ESM import in node:
4512 +0 && (0);
4513 +//# sourceMappingURL=queryClient.cjs.map
4514 +
4515 +/***/ }),
4516 +
4517 +/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
4518 +/*!***************************************************************************!*\
4519 + !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
4520 + \***************************************************************************/
4521 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4522 +
4523 +"use strict";
4524 +
4525 +var __defProp = Object.defineProperty;
4526 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4527 +var __getOwnPropNames = Object.getOwnPropertyNames;
4528 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4529 +var __export = (target, all) => {
4530 + for (var name in all)
4531 + __defProp(target, name, { get: all[name], enumerable: true });
4532 +};
4533 +var __copyProps = (to, from, except, desc) => {
4534 + if (from && typeof from === "object" || typeof from === "function") {
4535 + for (let key of __getOwnPropNames(from))
4536 + if (!__hasOwnProp.call(to, key) && key !== except)
4537 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4538 + }
4539 + return to;
4540 +};
4541 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4542 +
4543 +// src/queryObserver.ts
4544 +var queryObserver_exports = {};
4545 +__export(queryObserver_exports, {
4546 + QueryObserver: () => QueryObserver
4547 +});
4548 +module.exports = __toCommonJS(queryObserver_exports);
4549 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4550 +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4551 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
4552 +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4553 +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
4554 +var QueryObserver = class extends import_subscribable.Subscribable {
4555 + constructor(client, options) {
4556 + super();
4557 + this.#currentQuery = void 0;
4558 + this.#currentQueryInitialState = void 0;
4559 + this.#currentResult = void 0;
4560 + this.#trackedProps = /* @__PURE__ */ new Set();
4561 + this.#client = client;
4562 + this.options = options;
4563 + this.#selectError = null;
4564 + this.bindMethods();
4565 + this.setOptions(options);
4566 + }
4567 + #client;
4568 + #currentQuery;
4569 + #currentQueryInitialState;
4570 + #currentResult;
4571 + #currentResultState;
4572 + #currentResultOptions;
4573 + #selectError;
4574 + #selectFn;
4575 + #selectResult;
4576 + // This property keeps track of the last query with defined data.
4577 + // It will be used to pass the previous data and query to the placeholder function between renders.
4578 + #lastQueryWithDefinedData;
4579 + #staleTimeoutId;
4580 + #refetchIntervalId;
4581 + #currentRefetchInterval;
4582 + #trackedProps;
4583 + bindMethods() {
4584 + this.refetch = this.refetch.bind(this);
4585 + }
4586 + onSubscribe() {
4587 + if (this.listeners.size === 1) {
4588 + this.#currentQuery.addObserver(this);
4589 + if (shouldFetchOnMount(this.#currentQuery, this.options)) {
4590 + this.#executeFetch();
4591 + }
4592 + this.#updateTimers();
4593 + }
4594 + }
4595 + onUnsubscribe() {
4596 + if (!this.hasListeners()) {
4597 + this.destroy();
4598 + }
4599 + }
4600 + shouldFetchOnReconnect() {
4601 + return shouldFetchOn(
4602 + this.#currentQuery,
4603 + this.options,
4604 + this.options.refetchOnReconnect
4605 + );
4606 + }
4607 + shouldFetchOnWindowFocus() {
4608 + return shouldFetchOn(
4609 + this.#currentQuery,
4610 + this.options,
4611 + this.options.refetchOnWindowFocus
4612 + );
4613 + }
4614 + destroy() {
4615 + this.listeners = /* @__PURE__ */ new Set();
4616 + this.#clearStaleTimeout();
4617 + this.#clearRefetchInterval();
4618 + this.#currentQuery.removeObserver(this);
4619 + }
4620 + setOptions(options, notifyOptions) {
4621 + const prevOptions = this.options;
4622 + const prevQuery = this.#currentQuery;
4623 + this.options = this.#client.defaultQueryOptions(options);
4624 + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) {
4625 + this.#client.getQueryCache().notify({
4626 + type: "observerOptionsUpdated",
4627 + query: this.#currentQuery,
4628 + observer: this
4629 + });
4630 + }
4631 + if (typeof this.options.enabled !== "undefined" && typeof this.options.enabled !== "boolean") {
4632 + throw new Error("Expected enabled to be a boolean");
4633 + }
4634 + if (!this.options.queryKey) {
4635 + this.options.queryKey = prevOptions.queryKey;
4636 + }
4637 + this.#updateQuery();
4638 + const mounted = this.hasListeners();
4639 + if (mounted && shouldFetchOptionally(
4640 + this.#currentQuery,
4641 + prevQuery,
4642 + this.options,
4643 + prevOptions
4644 + )) {
4645 + this.#executeFetch();
4646 + }
4647 + this.updateResult(notifyOptions);
4648 + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {
4649 + this.#updateStaleTimeout();
4650 + }
4651 + const nextRefetchInterval = this.#computeRefetchInterval();
4652 + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.#currentRefetchInterval)) {
4653 + this.#updateRefetchInterval(nextRefetchInterval);
4654 + }
4655 + }
4656 + getOptimisticResult(options) {
4657 + const query = this.#client.getQueryCache().build(this.#client, options);
4658 + const result = this.createResult(query, options);
4659 + if (shouldAssignObserverCurrentProperties(this, result)) {
4660 + this.#currentResult = result;
4661 + this.#currentResultOptions = this.options;
4662 + this.#currentResultState = this.#currentQuery.state;
4663 + }
4664 + return result;
4665 + }
4666 + getCurrentResult() {
4667 + return this.#currentResult;
4668 + }
4669 + trackResult(result) {
4670 + const trackedResult = {};
4671 + Object.keys(result).forEach((key) => {
4672 + Object.defineProperty(trackedResult, key, {
4673 + configurable: false,
4674 + enumerable: true,
4675 + get: () => {
4676 + this.#trackedProps.add(key);
4677 + return result[key];
4678 + }
4679 + });
4680 + });
4681 + return trackedResult;
4682 + }
4683 + getCurrentQuery() {
4684 + return this.#currentQuery;
4685 + }
4686 + refetch({ ...options } = {}) {
4687 + return this.fetch({
4688 + ...options
4689 + });
4690 + }
4691 + fetchOptimistic(options) {
4692 + const defaultedOptions = this.#client.defaultQueryOptions(options);
4693 + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
4694 + query.isFetchingOptimistic = true;
4695 + return query.fetch().then(() => this.createResult(query, defaultedOptions));
4696 + }
4697 + fetch(fetchOptions) {
4698 + return this.#executeFetch({
4699 + ...fetchOptions,
4700 + cancelRefetch: fetchOptions.cancelRefetch ?? true
4701 + }).then(() => {
4702 + this.updateResult();
4703 + return this.#currentResult;
4704 + });
4705 + }
4706 + #executeFetch(fetchOptions) {
4707 + this.#updateQuery();
4708 + let promise = this.#currentQuery.fetch(
4709 + this.options,
4710 + fetchOptions
4711 + );
4712 + if (!fetchOptions?.throwOnError) {
4713 + promise = promise.catch(import_utils.noop);
4714 + }
4715 + return promise;
4716 + }
4717 + #updateStaleTimeout() {
4718 + this.#clearStaleTimeout();
4719 + if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(this.options.staleTime)) {
4720 + return;
4721 + }
4722 + const time = (0, import_utils.timeUntilStale)(
4723 + this.#currentResult.dataUpdatedAt,
4724 + this.options.staleTime
4725 + );
4726 + const timeout = time + 1;
4727 + this.#staleTimeoutId = setTimeout(() => {
4728 + if (!this.#currentResult.isStale) {
4729 + this.updateResult();
4730 + }
4731 + }, timeout);
4732 + }
4733 + #computeRefetchInterval() {
4734 + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
4735 + }
4736 + #updateRefetchInterval(nextInterval) {
4737 + this.#clearRefetchInterval();
4738 + this.#currentRefetchInterval = nextInterval;
4739 + if (import_utils.isServer || this.options.enabled === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
4740 + return;
4741 + }
4742 + this.#refetchIntervalId = setInterval(() => {
4743 + if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
4744 + this.#executeFetch();
4745 + }
4746 + }, this.#currentRefetchInterval);
4747 + }
4748 + #updateTimers() {
4749 + this.#updateStaleTimeout();
4750 + this.#updateRefetchInterval(this.#computeRefetchInterval());
4751 + }
4752 + #clearStaleTimeout() {
4753 + if (this.#staleTimeoutId) {
4754 + clearTimeout(this.#staleTimeoutId);
4755 + this.#staleTimeoutId = void 0;
4756 + }
4757 + }
4758 + #clearRefetchInterval() {
4759 + if (this.#refetchIntervalId) {
4760 + clearInterval(this.#refetchIntervalId);
4761 + this.#refetchIntervalId = void 0;
4762 + }
4763 + }
4764 + createResult(query, options) {
4765 + const prevQuery = this.#currentQuery;
4766 + const prevOptions = this.options;
4767 + const prevResult = this.#currentResult;
4768 + const prevResultState = this.#currentResultState;
4769 + const prevResultOptions = this.#currentResultOptions;
4770 + const queryChange = query !== prevQuery;
4771 + const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
4772 + const { state } = query;
4773 + let { error, errorUpdatedAt, fetchStatus, status } = state;
4774 + let isPlaceholderData = false;
4775 + let data;
4776 + if (options._optimisticResults) {
4777 + const mounted = this.hasListeners();
4778 + const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
4779 + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
4780 + if (fetchOnMount || fetchOptionally) {
4781 + fetchStatus = (0, import_retryer.canFetch)(query.options.networkMode) ? "fetching" : "paused";
4782 + if (!state.dataUpdatedAt) {
4783 + status = "pending";
4784 + }
4785 + }
4786 + if (options._optimisticResults === "isRestoring") {
4787 + fetchStatus = "idle";
4788 + }
4789 + }
4790 + if (options.select && typeof state.data !== "undefined") {
4791 + if (prevResult && state.data === prevResultState?.data && options.select === this.#selectFn) {
4792 + data = this.#selectResult;
4793 + } else {
4794 + try {
4795 + this.#selectFn = options.select;
4796 + data = options.select(state.data);
4797 + data = (0, import_utils.replaceData)(prevResult?.data, data, options);
4798 + this.#selectResult = data;
4799 + this.#selectError = null;
4800 + } catch (selectError) {
4801 + this.#selectError = selectError;
4802 + }
4803 + }
4804 + } else {
4805 + data = state.data;
4806 + }
4807 + if (typeof options.placeholderData !== "undefined" && typeof data === "undefined" && status === "pending") {
4808 + let placeholderData;
4809 + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
4810 + placeholderData = prevResult.data;
4811 + } else {
4812 + placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
4813 + this.#lastQueryWithDefinedData?.state.data,
4814 + this.#lastQueryWithDefinedData
4815 + ) : options.placeholderData;
4816 + if (options.select && typeof placeholderData !== "undefined") {
4817 + try {
4818 + placeholderData = options.select(placeholderData);
4819 + this.#selectError = null;
4820 + } catch (selectError) {
4821 + this.#selectError = selectError;
4822 + }
4823 + }
4824 + }
4825 + if (typeof placeholderData !== "undefined") {
4826 + status = "success";
4827 + data = (0, import_utils.replaceData)(
4828 + prevResult?.data,
4829 + placeholderData,
4830 + options
4831 + );
4832 + isPlaceholderData = true;
4833 + }
4834 + }
4835 + if (this.#selectError) {
4836 + error = this.#selectError;
4837 + data = this.#selectResult;
4838 + errorUpdatedAt = Date.now();
4839 + status = "error";
4840 + }
4841 + const isFetching = fetchStatus === "fetching";
4842 + const isPending = status === "pending";
4843 + const isError = status === "error";
4844 + const isLoading = isPending && isFetching;
4845 + const result = {
4846 + status,
4847 + fetchStatus,
4848 + isPending,
4849 + isSuccess: status === "success",
4850 + isError,
4851 + isInitialLoading: isLoading,
4852 + isLoading,
4853 + data,
4854 + dataUpdatedAt: state.dataUpdatedAt,
4855 + error,
4856 + errorUpdatedAt,
4857 + failureCount: state.fetchFailureCount,
4858 + failureReason: state.fetchFailureReason,
4859 + errorUpdateCount: state.errorUpdateCount,
4860 + isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,
4861 + isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,
4862 + isFetching,
4863 + isRefetching: isFetching && !isPending,
4864 + isLoadingError: isError && state.dataUpdatedAt === 0,
4865 + isPaused: fetchStatus === "paused",
4866 + isPlaceholderData,
4867 + isRefetchError: isError && state.dataUpdatedAt !== 0,
4868 + isStale: isStale(query, options),
4869 + refetch: this.refetch
4870 + };
4871 + return result;
4872 + }
4873 + updateResult(notifyOptions) {
4874 + const prevResult = this.#currentResult;
4875 + const nextResult = this.createResult(this.#currentQuery, this.options);
4876 + this.#currentResultState = this.#currentQuery.state;
4877 + this.#currentResultOptions = this.options;
4878 + if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
4879 + return;
4880 + }
4881 + if (this.#currentResultState.data !== void 0) {
4882 + this.#lastQueryWithDefinedData = this.#currentQuery;
4883 + }
4884 + this.#currentResult = nextResult;
4885 + const defaultNotifyOptions = {};
4886 + const shouldNotifyListeners = () => {
4887 + if (!prevResult) {
4888 + return true;
4889 + }
4890 + const { notifyOnChangeProps } = this.options;
4891 + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
4892 + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
4893 + return true;
4894 + }
4895 + const includedProps = new Set(
4896 + notifyOnChangePropsValue ?? this.#trackedProps
4897 + );
4898 + if (this.options.throwOnError) {
4899 + includedProps.add("error");
4900 + }
4901 + return Object.keys(this.#currentResult).some((key) => {
4902 + const typedKey = key;
4903 + const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
4904 + return changed && includedProps.has(typedKey);
4905 + });
4906 + };
4907 + if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
4908 + defaultNotifyOptions.listeners = true;
4909 + }
4910 + this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
4911 + }
4912 + #updateQuery() {
4913 + const query = this.#client.getQueryCache().build(this.#client, this.options);
4914 + if (query === this.#currentQuery) {
4915 + return;
4916 + }
4917 + const prevQuery = this.#currentQuery;
4918 + this.#currentQuery = query;
4919 + this.#currentQueryInitialState = query.state;
4920 + if (this.hasListeners()) {
4921 + prevQuery?.removeObserver(this);
4922 + query.addObserver(this);
4923 + }
4924 + }
4925 + onQueryUpdate() {
4926 + this.updateResult();
4927 + if (this.hasListeners()) {
4928 + this.#updateTimers();
4929 + }
4930 + }
4931 + #notify(notifyOptions) {
4932 + import_notifyManager.notifyManager.batch(() => {
4933 + if (notifyOptions.listeners) {
4934 + this.listeners.forEach((listener) => {
4935 + listener(this.#currentResult);
4936 + });
4937 + }
4938 + this.#client.getQueryCache().notify({
4939 + query: this.#currentQuery,
4940 + type: "observerResultsUpdated"
4941 + });
4942 + });
4943 + }
4944 +};
4945 +function shouldLoadOnMount(query, options) {
4946 + return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === "error" && options.retryOnMount === false);
4947 +}
4948 +function shouldFetchOnMount(query, options) {
4949 + return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);
4950 +}
4951 +function shouldFetchOn(query, options, field) {
4952 + if (options.enabled !== false) {
4953 + const value = typeof field === "function" ? field(query) : field;
4954 + return value === "always" || value !== false && isStale(query, options);
4955 + }
4956 + return false;
4957 +}
4958 +function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
4959 + return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
4960 +}
4961 +function isStale(query, options) {
4962 + return query.isStaleByTime(options.staleTime);
4963 +}
4964 +function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
4965 + if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
4966 + return true;
4967 + }
4968 + return false;
4969 +}
4970 +// Annotate the CommonJS export names for ESM import in node:
4971 +0 && (0);
4972 +//# sourceMappingURL=queryObserver.cjs.map
4973 +
4974 +/***/ }),
4975 +
4976 +/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
4977 +/*!***********************************************************************!*\
4978 + !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
4979 + \***********************************************************************/
4980 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4981 +
4982 +"use strict";
4983 +
4984 +var __defProp = Object.defineProperty;
4985 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4986 +var __getOwnPropNames = Object.getOwnPropertyNames;
4987 +var __hasOwnProp = Object.prototype.hasOwnProperty;
4988 +var __export = (target, all) => {
4989 + for (var name in all)
4990 + __defProp(target, name, { get: all[name], enumerable: true });
4991 +};
4992 +var __copyProps = (to, from, except, desc) => {
4993 + if (from && typeof from === "object" || typeof from === "function") {
4994 + for (let key of __getOwnPropNames(from))
4995 + if (!__hasOwnProp.call(to, key) && key !== except)
4996 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4997 + }
4998 + return to;
4999 +};
5000 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5001 +
5002 +// src/removable.ts
5003 +var removable_exports = {};
5004 +__export(removable_exports, {
5005 + Removable: () => Removable
5006 +});
5007 +module.exports = __toCommonJS(removable_exports);
5008 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5009 +var Removable = class {
5010 + #gcTimeout;
5011 + destroy() {
5012 + this.clearGcTimeout();
5013 + }
5014 + scheduleGc() {
5015 + this.clearGcTimeout();
5016 + if ((0, import_utils.isValidTimeout)(this.gcTime)) {
5017 + this.#gcTimeout = setTimeout(() => {
5018 + this.optionalRemove();
5019 + }, this.gcTime);
5020 + }
5021 + }
5022 + updateGcTime(newGcTime) {
5023 + this.gcTime = Math.max(
5024 + this.gcTime || 0,
5025 + newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
5026 + );
5027 + }
5028 + clearGcTimeout() {
5029 + if (this.#gcTimeout) {
5030 + clearTimeout(this.#gcTimeout);
5031 + this.#gcTimeout = void 0;
5032 + }
5033 + }
5034 +};
5035 +// Annotate the CommonJS export names for ESM import in node:
5036 +0 && (0);
5037 +//# sourceMappingURL=removable.cjs.map
5038 +
5039 +/***/ }),
5040 +
5041 +/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
5042 +/*!*********************************************************************!*\
5043 + !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
5044 + \*********************************************************************/
5045 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5046 +
5047 +"use strict";
5048 +
5049 +var __defProp = Object.defineProperty;
5050 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5051 +var __getOwnPropNames = Object.getOwnPropertyNames;
5052 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5053 +var __export = (target, all) => {
5054 + for (var name in all)
5055 + __defProp(target, name, { get: all[name], enumerable: true });
5056 +};
5057 +var __copyProps = (to, from, except, desc) => {
5058 + if (from && typeof from === "object" || typeof from === "function") {
5059 + for (let key of __getOwnPropNames(from))
5060 + if (!__hasOwnProp.call(to, key) && key !== except)
5061 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5062 + }
5063 + return to;
5064 +};
5065 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5066 +
5067 +// src/retryer.ts
5068 +var retryer_exports = {};
5069 +__export(retryer_exports, {
5070 + CancelledError: () => CancelledError,
5071 + canFetch: () => canFetch,
5072 + createRetryer: () => createRetryer,
5073 + isCancelledError: () => isCancelledError
5074 +});
5075 +module.exports = __toCommonJS(retryer_exports);
5076 +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5077 +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
5078 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5079 +function defaultRetryDelay(failureCount) {
5080 + return Math.min(1e3 * 2 ** failureCount, 3e4);
5081 +}
5082 +function canFetch(networkMode) {
5083 + return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
5084 +}
5085 +var CancelledError = class {
5086 + constructor(options) {
5087 + this.revert = options?.revert;
5088 + this.silent = options?.silent;
5089 + }
5090 +};
5091 +function isCancelledError(value) {
5092 + return value instanceof CancelledError;
5093 +}
5094 +function createRetryer(config) {
5095 + let isRetryCancelled = false;
5096 + let failureCount = 0;
5097 + let isResolved = false;
5098 + let continueFn;
5099 + let promiseResolve;
5100 + let promiseReject;
5101 + const promise = new Promise((outerResolve, outerReject) => {
5102 + promiseResolve = outerResolve;
5103 + promiseReject = outerReject;
5104 + });
5105 + const cancel = (cancelOptions) => {
5106 + if (!isResolved) {
5107 + reject(new CancelledError(cancelOptions));
5108 + config.abort?.();
5109 + }
5110 + };
5111 + const cancelRetry = () => {
5112 + isRetryCancelled = true;
5113 + };
5114 + const continueRetry = () => {
5115 + isRetryCancelled = false;
5116 + };
5117 + const shouldPause = () => !import_focusManager.focusManager.isFocused() || config.networkMode !== "always" && !import_onlineManager.onlineManager.isOnline();
5118 + const resolve = (value) => {
5119 + if (!isResolved) {
5120 + isResolved = true;
5121 + config.onSuccess?.(value);
5122 + continueFn?.();
5123 + promiseResolve(value);
5124 + }
5125 + };
5126 + const reject = (value) => {
5127 + if (!isResolved) {
5128 + isResolved = true;
5129 + config.onError?.(value);
5130 + continueFn?.();
5131 + promiseReject(value);
5132 + }
5133 + };
5134 + const pause = () => {
5135 + return new Promise((continueResolve) => {
5136 + continueFn = (value) => {
5137 + const canContinue = isResolved || !shouldPause();
5138 + if (canContinue) {
5139 + continueResolve(value);
5140 + }
5141 + return canContinue;
5142 + };
5143 + config.onPause?.();
5144 + }).then(() => {
5145 + continueFn = void 0;
5146 + if (!isResolved) {
5147 + config.onContinue?.();
5148 + }
5149 + });
5150 + };
5151 + const run = () => {
5152 + if (isResolved) {
5153 + return;
5154 + }
5155 + let promiseOrValue;
5156 + try {
5157 + promiseOrValue = config.fn();
5158 + } catch (error) {
5159 + promiseOrValue = Promise.reject(error);
5160 + }
5161 + Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
5162 + if (isResolved) {
5163 + return;
5164 + }
5165 + const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
5166 + const retryDelay = config.retryDelay ?? defaultRetryDelay;
5167 + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
5168 + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
5169 + if (isRetryCancelled || !shouldRetry) {
5170 + reject(error);
5171 + return;
5172 + }
5173 + failureCount++;
5174 + config.onFail?.(failureCount, error);
5175 + (0, import_utils.sleep)(delay).then(() => {
5176 + if (shouldPause()) {
5177 + return pause();
5178 + }
5179 + return;
5180 + }).then(() => {
5181 + if (isRetryCancelled) {
5182 + reject(error);
5183 + } else {
5184 + run();
5185 + }
5186 + });
5187 + });
5188 + };
5189 + if (canFetch(config.networkMode)) {
5190 + run();
5191 + } else {
5192 + pause().then(run);
5193 + }
5194 + return {
5195 + promise,
5196 + cancel,
5197 + continue: () => {
5198 + const didContinue = continueFn?.();
5199 + return didContinue ? promise : Promise.resolve();
5200 + },
5201 + cancelRetry,
5202 + continueRetry
5203 + };
5204 +}
5205 +// Annotate the CommonJS export names for ESM import in node:
5206 +0 && (0);
5207 +//# sourceMappingURL=retryer.cjs.map
5208 +
5209 +/***/ }),
5210 +
5211 +/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
5212 +/*!**************************************************************************!*\
5213 + !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
5214 + \**************************************************************************/
5215 +/***/ ((module) => {
5216 +
5217 +"use strict";
5218 +
5219 +var __defProp = Object.defineProperty;
5220 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5221 +var __getOwnPropNames = Object.getOwnPropertyNames;
5222 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5223 +var __export = (target, all) => {
5224 + for (var name in all)
5225 + __defProp(target, name, { get: all[name], enumerable: true });
5226 +};
5227 +var __copyProps = (to, from, except, desc) => {
5228 + if (from && typeof from === "object" || typeof from === "function") {
5229 + for (let key of __getOwnPropNames(from))
5230 + if (!__hasOwnProp.call(to, key) && key !== except)
5231 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5232 + }
5233 + return to;
5234 +};
5235 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5236 +
5237 +// src/subscribable.ts
5238 +var subscribable_exports = {};
5239 +__export(subscribable_exports, {
5240 + Subscribable: () => Subscribable
5241 +});
5242 +module.exports = __toCommonJS(subscribable_exports);
5243 +var Subscribable = class {
5244 + constructor() {
5245 + this.listeners = /* @__PURE__ */ new Set();
5246 + this.subscribe = this.subscribe.bind(this);
5247 + }
5248 + subscribe(listener) {
5249 + this.listeners.add(listener);
5250 + this.onSubscribe();
5251 + return () => {
5252 + this.listeners.delete(listener);
5253 + this.onUnsubscribe();
5254 + };
5255 + }
5256 + hasListeners() {
5257 + return this.listeners.size > 0;
5258 + }
5259 + onSubscribe() {
5260 + }
5261 + onUnsubscribe() {
5262 + }
5263 +};
5264 +// Annotate the CommonJS export names for ESM import in node:
5265 +0 && (0);
5266 +//# sourceMappingURL=subscribable.cjs.map
5267 +
5268 +/***/ }),
5269 +
5270 +/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
5271 +/*!*******************************************************************!*\
5272 + !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
5273 + \*******************************************************************/
5274 +/***/ ((module) => {
5275 +
5276 +"use strict";
5277 +
5278 +var __defProp = Object.defineProperty;
5279 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5280 +var __getOwnPropNames = Object.getOwnPropertyNames;
5281 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5282 +var __copyProps = (to, from, except, desc) => {
5283 + if (from && typeof from === "object" || typeof from === "function") {
5284 + for (let key of __getOwnPropNames(from))
5285 + if (!__hasOwnProp.call(to, key) && key !== except)
5286 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5287 + }
5288 + return to;
5289 +};
5290 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5291 +
5292 +// src/types.ts
5293 +var types_exports = {};
5294 +module.exports = __toCommonJS(types_exports);
5295 +//# sourceMappingURL=types.cjs.map
5296 +
5297 +/***/ }),
5298 +
5299 +/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
5300 +/*!*******************************************************************!*\
5301 + !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
5302 + \*******************************************************************/
5303 +/***/ ((module) => {
5304 +
5305 +"use strict";
5306 +
5307 +var __defProp = Object.defineProperty;
5308 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5309 +var __getOwnPropNames = Object.getOwnPropertyNames;
5310 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5311 +var __export = (target, all) => {
5312 + for (var name in all)
5313 + __defProp(target, name, { get: all[name], enumerable: true });
5314 +};
5315 +var __copyProps = (to, from, except, desc) => {
5316 + if (from && typeof from === "object" || typeof from === "function") {
5317 + for (let key of __getOwnPropNames(from))
5318 + if (!__hasOwnProp.call(to, key) && key !== except)
5319 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5320 + }
5321 + return to;
5322 +};
5323 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5324 +
5325 +// src/utils.ts
5326 +var utils_exports = {};
5327 +__export(utils_exports, {
5328 + addToEnd: () => addToEnd,
5329 + addToStart: () => addToStart,
5330 + functionalUpdate: () => functionalUpdate,
5331 + hashKey: () => hashKey,
5332 + hashQueryKeyByOptions: () => hashQueryKeyByOptions,
5333 + isPlainArray: () => isPlainArray,
5334 + isPlainObject: () => isPlainObject,
5335 + isServer: () => isServer,
5336 + isValidTimeout: () => isValidTimeout,
5337 + keepPreviousData: () => keepPreviousData,
5338 + matchMutation: () => matchMutation,
5339 + matchQuery: () => matchQuery,
5340 + noop: () => noop,
5341 + partialMatchKey: () => partialMatchKey,
5342 + replaceData: () => replaceData,
5343 + replaceEqualDeep: () => replaceEqualDeep,
5344 + scheduleMicrotask: () => scheduleMicrotask,
5345 + shallowEqualObjects: () => shallowEqualObjects,
5346 + sleep: () => sleep,
5347 + timeUntilStale: () => timeUntilStale
5348 +});
5349 +module.exports = __toCommonJS(utils_exports);
5350 +var isServer = typeof window === "undefined" || "Deno" in window;
5351 +function noop() {
5352 + return void 0;
5353 +}
5354 +function functionalUpdate(updater, input) {
5355 + return typeof updater === "function" ? updater(input) : updater;
5356 +}
5357 +function isValidTimeout(value) {
5358 + return typeof value === "number" && value >= 0 && value !== Infinity;
5359 +}
5360 +function timeUntilStale(updatedAt, staleTime) {
5361 + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
5362 +}
5363 +function matchQuery(filters, query) {
5364 + const {
5365 + type = "all",
5366 + exact,
5367 + fetchStatus,
5368 + predicate,
5369 + queryKey,
5370 + stale
5371 + } = filters;
5372 + if (queryKey) {
5373 + if (exact) {
5374 + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
5375 + return false;
5376 + }
5377 + } else if (!partialMatchKey(query.queryKey, queryKey)) {
5378 + return false;
5379 + }
5380 + }
5381 + if (type !== "all") {
5382 + const isActive = query.isActive();
5383 + if (type === "active" && !isActive) {
5384 + return false;
5385 + }
5386 + if (type === "inactive" && isActive) {
5387 + return false;
5388 + }
5389 + }
5390 + if (typeof stale === "boolean" && query.isStale() !== stale) {
5391 + return false;
5392 + }
5393 + if (typeof fetchStatus !== "undefined" && fetchStatus !== query.state.fetchStatus) {
5394 + return false;
5395 + }
5396 + if (predicate && !predicate(query)) {
5397 + return false;
5398 + }
5399 + return true;
5400 +}
5401 +function matchMutation(filters, mutation) {
5402 + const { exact, status, predicate, mutationKey } = filters;
5403 + if (mutationKey) {
5404 + if (!mutation.options.mutationKey) {
5405 + return false;
5406 + }
5407 + if (exact) {
5408 + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
5409 + return false;
5410 + }
5411 + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
5412 + return false;
5413 + }
5414 + }
5415 + if (status && mutation.state.status !== status) {
5416 + return false;
5417 + }
5418 + if (predicate && !predicate(mutation)) {
5419 + return false;
5420 + }
5421 + return true;
5422 +}
5423 +function hashQueryKeyByOptions(queryKey, options) {
5424 + const hashFn = options?.queryKeyHashFn || hashKey;
5425 + return hashFn(queryKey);
5426 +}
5427 +function hashKey(queryKey) {
5428 + return JSON.stringify(
5429 + queryKey,
5430 + (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
5431 + result[key] = val[key];
5432 + return result;
5433 + }, {}) : val
5434 + );
5435 +}
5436 +function partialMatchKey(a, b) {
5437 + if (a === b) {
5438 + return true;
5439 + }
5440 + if (typeof a !== typeof b) {
5441 + return false;
5442 + }
5443 + if (a && b && typeof a === "object" && typeof b === "object") {
5444 + return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
5445 + }
5446 + return false;
5447 +}
5448 +function replaceEqualDeep(a, b) {
5449 + if (a === b) {
5450 + return a;
5451 + }
5452 + const array = isPlainArray(a) && isPlainArray(b);
5453 + if (array || isPlainObject(a) && isPlainObject(b)) {
5454 + const aSize = array ? a.length : Object.keys(a).length;
5455 + const bItems = array ? b : Object.keys(b);
5456 + const bSize = bItems.length;
5457 + const copy = array ? [] : {};
5458 + let equalItems = 0;
5459 + for (let i = 0; i < bSize; i++) {
5460 + const key = array ? i : bItems[i];
5461 + copy[key] = replaceEqualDeep(a[key], b[key]);
5462 + if (copy[key] === a[key]) {
5463 + equalItems++;
5464 + }
5465 + }
5466 + return aSize === bSize && equalItems === aSize ? a : copy;
5467 + }
5468 + return b;
5469 +}
5470 +function shallowEqualObjects(a, b) {
5471 + if (a && !b || b && !a) {
5472 + return false;
5473 + }
5474 + for (const key in a) {
5475 + if (a[key] !== b[key]) {
5476 + return false;
5477 + }
5478 + }
5479 + return true;
5480 +}
5481 +function isPlainArray(value) {
5482 + return Array.isArray(value) && value.length === Object.keys(value).length;
5483 +}
5484 +function isPlainObject(o) {
5485 + if (!hasObjectPrototype(o)) {
5486 + return false;
5487 + }
5488 + const ctor = o.constructor;
5489 + if (typeof ctor === "undefined") {
5490 + return true;
5491 + }
5492 + const prot = ctor.prototype;
5493 + if (!hasObjectPrototype(prot)) {
5494 + return false;
5495 + }
5496 + if (!prot.hasOwnProperty("isPrototypeOf")) {
5497 + return false;
5498 + }
5499 + return true;
5500 +}
5501 +function hasObjectPrototype(o) {
5502 + return Object.prototype.toString.call(o) === "[object Object]";
5503 +}
5504 +function sleep(timeout) {
5505 + return new Promise((resolve) => {
5506 + setTimeout(resolve, timeout);
5507 + });
5508 +}
5509 +function scheduleMicrotask(callback) {
5510 + sleep(0).then(callback);
5511 +}
5512 +function replaceData(prevData, data, options) {
5513 + if (typeof options.structuralSharing === "function") {
5514 + return options.structuralSharing(prevData, data);
5515 + } else if (options.structuralSharing !== false) {
5516 + return replaceEqualDeep(prevData, data);
5517 + }
5518 + return data;
5519 +}
5520 +function keepPreviousData(previousData) {
5521 + return previousData;
5522 +}
5523 +function addToEnd(items, item, max = 0) {
5524 + const newItems = [...items, item];
5525 + return max && newItems.length > max ? newItems.slice(1) : newItems;
5526 +}
5527 +function addToStart(items, item, max = 0) {
5528 + const newItems = [item, ...items];
5529 + return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
5530 +}
5531 +// Annotate the CommonJS export names for ESM import in node:
5532 +0 && (0);
5533 +//# sourceMappingURL=utils.cjs.map
5534 +
5535 +/***/ }),
5536 +
5537 +/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
5538 +/*!********************************************************************************!*\
5539 + !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
5540 + \********************************************************************************/
5541 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5542 +
5543 +"use strict";
5544 +
5545 +"use client";
5546 +var __create = Object.create;
5547 +var __defProp = Object.defineProperty;
5548 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5549 +var __getOwnPropNames = Object.getOwnPropertyNames;
5550 +var __getProtoOf = Object.getPrototypeOf;
5551 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5552 +var __export = (target, all) => {
5553 + for (var name in all)
5554 + __defProp(target, name, { get: all[name], enumerable: true });
5555 +};
5556 +var __copyProps = (to, from, except, desc) => {
5557 + if (from && typeof from === "object" || typeof from === "function") {
5558 + for (let key of __getOwnPropNames(from))
5559 + if (!__hasOwnProp.call(to, key) && key !== except)
5560 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5561 + }
5562 + return to;
5563 +};
5564 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5565 + // If the importer is in node compatibility mode or this is not an ESM
5566 + // file that has been converted to a CommonJS file using a Babel-
5567 + // compatible transform (i.e. "__esModule" has not been set), then set
5568 + // "default" to the CommonJS "module.exports" for node compatibility.
5569 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5570 + mod
5571 +));
5572 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5573 +
5574 +// src/HydrationBoundary.tsx
5575 +var HydrationBoundary_exports = {};
5576 +__export(HydrationBoundary_exports, {
5577 + HydrationBoundary: () => HydrationBoundary
5578 +});
5579 +module.exports = __toCommonJS(HydrationBoundary_exports);
5580 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5581 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
5582 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
5583 +var HydrationBoundary = ({
5584 + children,
5585 + options = {},
5586 + state,
5587 + queryClient
5588 +}) => {
5589 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
5590 + const [hydrationQueue, setHydrationQueue] = React.useState();
5591 + const optionsRef = React.useRef(options);
5592 + optionsRef.current = options;
5593 + React.useMemo(() => {
5594 + if (state) {
5595 + if (typeof state !== "object") {
5596 + return;
5597 + }
5598 + const queryCache = client.getQueryCache();
5599 + const queries = state.queries || [];
5600 + const newQueries = [];
5601 + const existingQueries = [];
5602 + for (const dehydratedQuery of queries) {
5603 + const existingQuery = queryCache.get(dehydratedQuery.queryHash);
5604 + if (!existingQuery) {
5605 + newQueries.push(dehydratedQuery);
5606 + } else {
5607 + const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
5608 + const queryAlreadyQueued = hydrationQueue?.find(
5609 + (query) => query.queryHash === dehydratedQuery.queryHash
5610 + );
5611 + if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
5612 + existingQueries.push(dehydratedQuery);
5613 + }
5614 + }
5615 + }
5616 + if (newQueries.length > 0) {
5617 + (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
5618 + }
5619 + if (existingQueries.length > 0) {
5620 + setHydrationQueue(
5621 + (prev) => prev ? [...prev, ...existingQueries] : existingQueries
5622 + );
5623 + }
5624 + }
5625 + }, [client, hydrationQueue, state]);
5626 + React.useEffect(() => {
5627 + if (hydrationQueue) {
5628 + (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
5629 + setHydrationQueue(void 0);
5630 + }
5631 + }, [client, hydrationQueue]);
5632 + return children;
5633 +};
5634 +// Annotate the CommonJS export names for ESM import in node:
5635 +0 && (0);
5636 +//# sourceMappingURL=HydrationBoundary.cjs.map
5637 +
5638 +/***/ }),
5639 +
5640 +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
5641 +/*!**********************************************************************************!*\
5642 + !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
5643 + \**********************************************************************************/
5644 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5645 +
5646 +"use strict";
5647 +
5648 +"use client";
5649 +var __create = Object.create;
5650 +var __defProp = Object.defineProperty;
5651 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5652 +var __getOwnPropNames = Object.getOwnPropertyNames;
5653 +var __getProtoOf = Object.getPrototypeOf;
5654 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5655 +var __export = (target, all) => {
5656 + for (var name in all)
5657 + __defProp(target, name, { get: all[name], enumerable: true });
5658 +};
5659 +var __copyProps = (to, from, except, desc) => {
5660 + if (from && typeof from === "object" || typeof from === "function") {
5661 + for (let key of __getOwnPropNames(from))
5662 + if (!__hasOwnProp.call(to, key) && key !== except)
5663 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5664 + }
5665 + return to;
5666 +};
5667 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5668 + // If the importer is in node compatibility mode or this is not an ESM
5669 + // file that has been converted to a CommonJS file using a Babel-
5670 + // compatible transform (i.e. "__esModule" has not been set), then set
5671 + // "default" to the CommonJS "module.exports" for node compatibility.
5672 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5673 + mod
5674 +));
5675 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5676 +
5677 +// src/QueryClientProvider.tsx
5678 +var QueryClientProvider_exports = {};
5679 +__export(QueryClientProvider_exports, {
5680 + QueryClientContext: () => QueryClientContext,
5681 + QueryClientProvider: () => QueryClientProvider,
5682 + useQueryClient: () => useQueryClient
5683 +});
5684 +module.exports = __toCommonJS(QueryClientProvider_exports);
5685 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5686 +var QueryClientContext = React.createContext(
5687 + void 0
5688 +);
5689 +var useQueryClient = (queryClient) => {
5690 + const client = React.useContext(QueryClientContext);
5691 + if (queryClient) {
5692 + return queryClient;
5693 + }
5694 + if (!client) {
5695 + throw new Error("No QueryClient set, use QueryClientProvider to set one");
5696 + }
5697 + return client;
5698 +};
5699 +var QueryClientProvider = ({
5700 + client,
5701 + children
5702 +}) => {
5703 + React.useEffect(() => {
5704 + client.mount();
5705 + return () => {
5706 + client.unmount();
5707 + };
5708 + }, [client]);
5709 + return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children);
5710 +};
5711 +// Annotate the CommonJS export names for ESM import in node:
5712 +0 && (0);
5713 +//# sourceMappingURL=QueryClientProvider.cjs.map
5714 +
5715 +/***/ }),
5716 +
5717 +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
5718 +/*!**************************************************************************************!*\
5719 + !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
5720 + \**************************************************************************************/
5721 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5722 +
5723 +"use strict";
5724 +
5725 +"use client";
5726 +var __create = Object.create;
5727 +var __defProp = Object.defineProperty;
5728 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5729 +var __getOwnPropNames = Object.getOwnPropertyNames;
5730 +var __getProtoOf = Object.getPrototypeOf;
5731 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5732 +var __export = (target, all) => {
5733 + for (var name in all)
5734 + __defProp(target, name, { get: all[name], enumerable: true });
5735 +};
5736 +var __copyProps = (to, from, except, desc) => {
5737 + if (from && typeof from === "object" || typeof from === "function") {
5738 + for (let key of __getOwnPropNames(from))
5739 + if (!__hasOwnProp.call(to, key) && key !== except)
5740 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5741 + }
5742 + return to;
5743 +};
5744 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5745 + // If the importer is in node compatibility mode or this is not an ESM
5746 + // file that has been converted to a CommonJS file using a Babel-
5747 + // compatible transform (i.e. "__esModule" has not been set), then set
5748 + // "default" to the CommonJS "module.exports" for node compatibility.
5749 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5750 + mod
5751 +));
5752 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5753 +
5754 +// src/QueryErrorResetBoundary.tsx
5755 +var QueryErrorResetBoundary_exports = {};
5756 +__export(QueryErrorResetBoundary_exports, {
5757 + QueryErrorResetBoundary: () => QueryErrorResetBoundary,
5758 + useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
5759 +});
5760 +module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
5761 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5762 +function createValue() {
5763 + let isReset = false;
5764 + return {
5765 + clearReset: () => {
5766 + isReset = false;
5767 + },
5768 + reset: () => {
5769 + isReset = true;
5770 + },
5771 + isReset: () => {
5772 + return isReset;
5773 + }
5774 + };
5775 +}
5776 +var QueryErrorResetBoundaryContext = React.createContext(createValue());
5777 +var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
5778 +var QueryErrorResetBoundary = ({
5779 + children
5780 +}) => {
5781 + const [value] = React.useState(() => createValue());
5782 + return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children);
5783 +};
5784 +// Annotate the CommonJS export names for ESM import in node:
5785 +0 && (0);
5786 +//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
5787 +
5788 +/***/ }),
5789 +
5790 +/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
5791 +/*!*********************************************************************************!*\
5792 + !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
5793 + \*********************************************************************************/
5794 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5795 +
5796 +"use strict";
5797 +
5798 +"use client";
5799 +var __create = Object.create;
5800 +var __defProp = Object.defineProperty;
5801 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5802 +var __getOwnPropNames = Object.getOwnPropertyNames;
5803 +var __getProtoOf = Object.getPrototypeOf;
5804 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5805 +var __export = (target, all) => {
5806 + for (var name in all)
5807 + __defProp(target, name, { get: all[name], enumerable: true });
5808 +};
5809 +var __copyProps = (to, from, except, desc) => {
5810 + if (from && typeof from === "object" || typeof from === "function") {
5811 + for (let key of __getOwnPropNames(from))
5812 + if (!__hasOwnProp.call(to, key) && key !== except)
5813 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5814 + }
5815 + return to;
5816 +};
5817 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
5818 + // If the importer is in node compatibility mode or this is not an ESM
5819 + // file that has been converted to a CommonJS file using a Babel-
5820 + // compatible transform (i.e. "__esModule" has not been set), then set
5821 + // "default" to the CommonJS "module.exports" for node compatibility.
5822 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
5823 + mod
5824 +));
5825 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5826 +
5827 +// src/errorBoundaryUtils.ts
5828 +var errorBoundaryUtils_exports = {};
5829 +__export(errorBoundaryUtils_exports, {
5830 + ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
5831 + getHasError: () => getHasError,
5832 + useClearResetErrorBoundary: () => useClearResetErrorBoundary
5833 +});
5834 +module.exports = __toCommonJS(errorBoundaryUtils_exports);
5835 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
5836 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
5837 +var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
5838 + if (options.suspense || options.throwOnError) {
5839 + if (!errorResetBoundary.isReset()) {
5840 + options.retryOnMount = false;
5841 + }
5842 + }
5843 +};
5844 +var useClearResetErrorBoundary = (errorResetBoundary) => {
5845 + React.useEffect(() => {
5846 + errorResetBoundary.clearReset();
5847 + }, [errorResetBoundary]);
5848 +};
5849 +var getHasError = ({
5850 + result,
5851 + errorResetBoundary,
5852 + throwOnError,
5853 + query
5854 +}) => {
5855 + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
5856 +};
5857 +// Annotate the CommonJS export names for ESM import in node:
5858 +0 && (0);
5859 +//# sourceMappingURL=errorBoundaryUtils.cjs.map
5860 +
5861 +/***/ }),
5862 +
5863 +/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
5864 +/*!********************************************************************!*\
5865 + !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
5866 + \********************************************************************/
5867 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5868 +
5869 +"use strict";
5870 +
5871 +var __defProp = Object.defineProperty;
5872 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5873 +var __getOwnPropNames = Object.getOwnPropertyNames;
5874 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5875 +var __export = (target, all) => {
5876 + for (var name in all)
5877 + __defProp(target, name, { get: all[name], enumerable: true });
5878 +};
5879 +var __copyProps = (to, from, except, desc) => {
5880 + if (from && typeof from === "object" || typeof from === "function") {
5881 + for (let key of __getOwnPropNames(from))
5882 + if (!__hasOwnProp.call(to, key) && key !== except)
5883 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5884 + }
5885 + return to;
5886 +};
5887 +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
5888 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5889 +
5890 +// src/index.ts
5891 +var src_exports = {};
5892 +__export(src_exports, {
5893 + HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
5894 + IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
5895 + QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
5896 + QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
5897 + QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
5898 + infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
5899 + queryOptions: () => import_queryOptions.queryOptions,
5900 + useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
5901 + useIsFetching: () => import_useIsFetching.useIsFetching,
5902 + useIsMutating: () => import_useMutationState.useIsMutating,
5903 + useIsRestoring: () => import_isRestoring.useIsRestoring,
5904 + useMutation: () => import_useMutation.useMutation,
5905 + useMutationState: () => import_useMutationState.useMutationState,
5906 + useQueries: () => import_useQueries.useQueries,
5907 + useQuery: () => import_useQuery.useQuery,
5908 + useQueryClient: () => import_QueryClientProvider.useQueryClient,
5909 + useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
5910 + useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
5911 + useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
5912 + useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
5913 +});
5914 +module.exports = __toCommonJS(src_exports);
5915 +__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
5916 +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
5917 +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
5918 +var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
5919 +var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
5920 +var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
5921 +var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
5922 +var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
5923 +var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
5924 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
5925 +var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
5926 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
5927 +var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
5928 +var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
5929 +var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
5930 +var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
5931 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
5932 +// Annotate the CommonJS export names for ESM import in node:
5933 +0 && (0);
5934 +//# sourceMappingURL=index.cjs.map
5935 +
5936 +/***/ }),
5937 +
5938 +/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
5939 +/*!***********************************************************************************!*\
5940 + !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
5941 + \***********************************************************************************/
5942 +/***/ ((module) => {
5943 +
5944 +"use strict";
5945 +
5946 +var __defProp = Object.defineProperty;
5947 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5948 +var __getOwnPropNames = Object.getOwnPropertyNames;
5949 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5950 +var __export = (target, all) => {
5951 + for (var name in all)
5952 + __defProp(target, name, { get: all[name], enumerable: true });
5953 +};
5954 +var __copyProps = (to, from, except, desc) => {
5955 + if (from && typeof from === "object" || typeof from === "function") {
5956 + for (let key of __getOwnPropNames(from))
5957 + if (!__hasOwnProp.call(to, key) && key !== except)
5958 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5959 + }
5960 + return to;
5961 +};
5962 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5963 +
5964 +// src/infiniteQueryOptions.ts
5965 +var infiniteQueryOptions_exports = {};
5966 +__export(infiniteQueryOptions_exports, {
5967 + infiniteQueryOptions: () => infiniteQueryOptions
5968 +});
5969 +module.exports = __toCommonJS(infiniteQueryOptions_exports);
5970 +function infiniteQueryOptions(options) {
5971 + return options;
5972 +}
5973 +// Annotate the CommonJS export names for ESM import in node:
5974 +0 && (0);
5975 +//# sourceMappingURL=infiniteQueryOptions.cjs.map
5976 +
5977 +/***/ }),
5978 +
5979 +/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
5980 +/*!**************************************************************************!*\
5981 + !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
5982 + \**************************************************************************/
5983 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5984 +
5985 +"use strict";
5986 +
5987 +"use client";
5988 +var __create = Object.create;
5989 +var __defProp = Object.defineProperty;
5990 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5991 +var __getOwnPropNames = Object.getOwnPropertyNames;
5992 +var __getProtoOf = Object.getPrototypeOf;
5993 +var __hasOwnProp = Object.prototype.hasOwnProperty;
5994 +var __export = (target, all) => {
5995 + for (var name in all)
5996 + __defProp(target, name, { get: all[name], enumerable: true });
5997 +};
5998 +var __copyProps = (to, from, except, desc) => {
5999 + if (from && typeof from === "object" || typeof from === "function") {
6000 + for (let key of __getOwnPropNames(from))
6001 + if (!__hasOwnProp.call(to, key) && key !== except)
6002 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6003 + }
6004 + return to;
6005 +};
6006 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6007 + // If the importer is in node compatibility mode or this is not an ESM
6008 + // file that has been converted to a CommonJS file using a Babel-
6009 + // compatible transform (i.e. "__esModule" has not been set), then set
6010 + // "default" to the CommonJS "module.exports" for node compatibility.
6011 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6012 + mod
6013 +));
6014 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6015 +
6016 +// src/isRestoring.ts
6017 +var isRestoring_exports = {};
6018 +__export(isRestoring_exports, {
6019 + IsRestoringProvider: () => IsRestoringProvider,
6020 + useIsRestoring: () => useIsRestoring
6021 +});
6022 +module.exports = __toCommonJS(isRestoring_exports);
6023 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6024 +var IsRestoringContext = React.createContext(false);
6025 +var useIsRestoring = () => React.useContext(IsRestoringContext);
6026 +var IsRestoringProvider = IsRestoringContext.Provider;
6027 +// Annotate the CommonJS export names for ESM import in node:
6028 +0 && (0);
6029 +//# sourceMappingURL=isRestoring.cjs.map
6030 +
6031 +/***/ }),
6032 +
6033 +/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
6034 +/*!***************************************************************************!*\
6035 + !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
6036 + \***************************************************************************/
6037 +/***/ ((module) => {
6038 +
6039 +"use strict";
6040 +
6041 +var __defProp = Object.defineProperty;
6042 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6043 +var __getOwnPropNames = Object.getOwnPropertyNames;
6044 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6045 +var __export = (target, all) => {
6046 + for (var name in all)
6047 + __defProp(target, name, { get: all[name], enumerable: true });
6048 +};
6049 +var __copyProps = (to, from, except, desc) => {
6050 + if (from && typeof from === "object" || typeof from === "function") {
6051 + for (let key of __getOwnPropNames(from))
6052 + if (!__hasOwnProp.call(to, key) && key !== except)
6053 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6054 + }
6055 + return to;
6056 +};
6057 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6058 +
6059 +// src/queryOptions.ts
6060 +var queryOptions_exports = {};
6061 +__export(queryOptions_exports, {
6062 + queryOptions: () => queryOptions
6063 +});
6064 +module.exports = __toCommonJS(queryOptions_exports);
6065 +function queryOptions(options) {
6066 + return options;
6067 +}
6068 +// Annotate the CommonJS export names for ESM import in node:
6069 +0 && (0);
6070 +//# sourceMappingURL=queryOptions.cjs.map
6071 +
6072 +/***/ }),
6073 +
6074 +/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
6075 +/*!***********************************************************************!*\
6076 + !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
6077 + \***********************************************************************/
6078 +/***/ ((module) => {
6079 +
6080 +"use strict";
6081 +
6082 +var __defProp = Object.defineProperty;
6083 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6084 +var __getOwnPropNames = Object.getOwnPropertyNames;
6085 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6086 +var __export = (target, all) => {
6087 + for (var name in all)
6088 + __defProp(target, name, { get: all[name], enumerable: true });
6089 +};
6090 +var __copyProps = (to, from, except, desc) => {
6091 + if (from && typeof from === "object" || typeof from === "function") {
6092 + for (let key of __getOwnPropNames(from))
6093 + if (!__hasOwnProp.call(to, key) && key !== except)
6094 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6095 + }
6096 + return to;
6097 +};
6098 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6099 +
6100 +// src/suspense.ts
6101 +var suspense_exports = {};
6102 +__export(suspense_exports, {
6103 + defaultThrowOnError: () => defaultThrowOnError,
6104 + ensureStaleTime: () => ensureStaleTime,
6105 + fetchOptimistic: () => fetchOptimistic,
6106 + shouldSuspend: () => shouldSuspend,
6107 + willFetch: () => willFetch
6108 +});
6109 +module.exports = __toCommonJS(suspense_exports);
6110 +var defaultThrowOnError = (_error, query) => typeof query.state.data === "undefined";
6111 +var ensureStaleTime = (defaultedOptions) => {
6112 + if (defaultedOptions.suspense) {
6113 + if (typeof defaultedOptions.staleTime !== "number") {
6114 + defaultedOptions.staleTime = 1e3;
6115 + }
6116 + }
6117 +};
6118 +var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
6119 +var shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring);
6120 +var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
6121 + errorResetBoundary.clearReset();
6122 +});
6123 +// Annotate the CommonJS export names for ESM import in node:
6124 +0 && (0);
6125 +//# sourceMappingURL=suspense.cjs.map
6126 +
6127 +/***/ }),
6128 +
6129 +/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
6130 +/*!********************************************************************!*\
6131 + !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
6132 + \********************************************************************/
6133 +/***/ ((module) => {
6134 +
6135 +"use strict";
6136 +
6137 +var __defProp = Object.defineProperty;
6138 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6139 +var __getOwnPropNames = Object.getOwnPropertyNames;
6140 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6141 +var __copyProps = (to, from, except, desc) => {
6142 + if (from && typeof from === "object" || typeof from === "function") {
6143 + for (let key of __getOwnPropNames(from))
6144 + if (!__hasOwnProp.call(to, key) && key !== except)
6145 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6146 + }
6147 + return to;
6148 +};
6149 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6150 +
6151 +// src/types.ts
6152 +var types_exports = {};
6153 +module.exports = __toCommonJS(types_exports);
6154 +//# sourceMappingURL=types.cjs.map
6155 +
6156 +/***/ }),
6157 +
6158 +/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
6159 +/*!***************************************************************************!*\
6160 + !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
6161 + \***************************************************************************/
6162 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6163 +
6164 +"use strict";
6165 +
6166 +"use client";
6167 +var __create = Object.create;
6168 +var __defProp = Object.defineProperty;
6169 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6170 +var __getOwnPropNames = Object.getOwnPropertyNames;
6171 +var __getProtoOf = Object.getPrototypeOf;
6172 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6173 +var __export = (target, all) => {
6174 + for (var name in all)
6175 + __defProp(target, name, { get: all[name], enumerable: true });
6176 +};
6177 +var __copyProps = (to, from, except, desc) => {
6178 + if (from && typeof from === "object" || typeof from === "function") {
6179 + for (let key of __getOwnPropNames(from))
6180 + if (!__hasOwnProp.call(to, key) && key !== except)
6181 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6182 + }
6183 + return to;
6184 +};
6185 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6186 + // If the importer is in node compatibility mode or this is not an ESM
6187 + // file that has been converted to a CommonJS file using a Babel-
6188 + // compatible transform (i.e. "__esModule" has not been set), then set
6189 + // "default" to the CommonJS "module.exports" for node compatibility.
6190 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6191 + mod
6192 +));
6193 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6194 +
6195 +// src/useBaseQuery.ts
6196 +var useBaseQuery_exports = {};
6197 +__export(useBaseQuery_exports, {
6198 + useBaseQuery: () => useBaseQuery
6199 +});
6200 +module.exports = __toCommonJS(useBaseQuery_exports);
6201 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6202 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6203 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
6204 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6205 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
6206 +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
6207 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6208 +function useBaseQuery(options, Observer, queryClient) {
6209 + if (true) {
6210 + if (typeof options !== "object" || Array.isArray(options)) {
6211 + throw new Error(
6212 + 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
6213 + );
6214 + }
6215 + }
6216 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6217 + const isRestoring = (0, import_isRestoring.useIsRestoring)();
6218 + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
6219 + const defaultedOptions = client.defaultQueryOptions(options);
6220 + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
6221 + (0, import_suspense.ensureStaleTime)(defaultedOptions);
6222 + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
6223 + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
6224 + const [observer] = React.useState(
6225 + () => new Observer(
6226 + client,
6227 + defaultedOptions
6228 + )
6229 + );
6230 + const result = observer.getOptimisticResult(defaultedOptions);
6231 + React.useSyncExternalStore(
6232 + React.useCallback(
6233 + (onStoreChange) => {
6234 + const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
6235 + observer.updateResult();
6236 + return unsubscribe;
6237 + },
6238 + [observer, isRestoring]
6239 + ),
6240 + () => observer.getCurrentResult(),
6241 + () => observer.getCurrentResult()
6242 + );
6243 + React.useEffect(() => {
6244 + observer.setOptions(defaultedOptions, { listeners: false });
6245 + }, [defaultedOptions, observer]);
6246 + if ((0, import_suspense.shouldSuspend)(defaultedOptions, result, isRestoring)) {
6247 + throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
6248 + }
6249 + if ((0, import_errorBoundaryUtils.getHasError)({
6250 + result,
6251 + errorResetBoundary,
6252 + throwOnError: defaultedOptions.throwOnError,
6253 + query: observer.getCurrentQuery()
6254 + })) {
6255 + throw result.error;
6256 + }
6257 + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
6258 +}
6259 +// Annotate the CommonJS export names for ESM import in node:
6260 +0 && (0);
6261 +//# sourceMappingURL=useBaseQuery.cjs.map
6262 +
6263 +/***/ }),
6264 +
6265 +/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
6266 +/*!*******************************************************************************!*\
6267 + !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
6268 + \*******************************************************************************/
6269 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6270 +
6271 +"use strict";
6272 +
6273 +"use client";
6274 +var __defProp = Object.defineProperty;
6275 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6276 +var __getOwnPropNames = Object.getOwnPropertyNames;
6277 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6278 +var __export = (target, all) => {
6279 + for (var name in all)
6280 + __defProp(target, name, { get: all[name], enumerable: true });
6281 +};
6282 +var __copyProps = (to, from, except, desc) => {
6283 + if (from && typeof from === "object" || typeof from === "function") {
6284 + for (let key of __getOwnPropNames(from))
6285 + if (!__hasOwnProp.call(to, key) && key !== except)
6286 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6287 + }
6288 + return to;
6289 +};
6290 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6291 +
6292 +// src/useInfiniteQuery.ts
6293 +var useInfiniteQuery_exports = {};
6294 +__export(useInfiniteQuery_exports, {
6295 + useInfiniteQuery: () => useInfiniteQuery
6296 +});
6297 +module.exports = __toCommonJS(useInfiniteQuery_exports);
6298 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6299 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6300 +function useInfiniteQuery(options, queryClient) {
6301 + return (0, import_useBaseQuery.useBaseQuery)(
6302 + options,
6303 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
6304 + import_query_core.InfiniteQueryObserver,
6305 + queryClient
6306 + );
6307 +}
6308 +// Annotate the CommonJS export names for ESM import in node:
6309 +0 && (0);
6310 +//# sourceMappingURL=useInfiniteQuery.cjs.map
6311 +
6312 +/***/ }),
6313 +
6314 +/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
6315 +/*!****************************************************************************!*\
6316 + !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
6317 + \****************************************************************************/
6318 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6319 +
6320 +"use strict";
6321 +
6322 +"use client";
6323 +var __create = Object.create;
6324 +var __defProp = Object.defineProperty;
6325 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6326 +var __getOwnPropNames = Object.getOwnPropertyNames;
6327 +var __getProtoOf = Object.getPrototypeOf;
6328 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6329 +var __export = (target, all) => {
6330 + for (var name in all)
6331 + __defProp(target, name, { get: all[name], enumerable: true });
6332 +};
6333 +var __copyProps = (to, from, except, desc) => {
6334 + if (from && typeof from === "object" || typeof from === "function") {
6335 + for (let key of __getOwnPropNames(from))
6336 + if (!__hasOwnProp.call(to, key) && key !== except)
6337 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6338 + }
6339 + return to;
6340 +};
6341 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6342 + // If the importer is in node compatibility mode or this is not an ESM
6343 + // file that has been converted to a CommonJS file using a Babel-
6344 + // compatible transform (i.e. "__esModule" has not been set), then set
6345 + // "default" to the CommonJS "module.exports" for node compatibility.
6346 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6347 + mod
6348 +));
6349 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6350 +
6351 +// src/useIsFetching.ts
6352 +var useIsFetching_exports = {};
6353 +__export(useIsFetching_exports, {
6354 + useIsFetching: () => useIsFetching
6355 +});
6356 +module.exports = __toCommonJS(useIsFetching_exports);
6357 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6358 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6359 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6360 +function useIsFetching(filters, queryClient) {
6361 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6362 + const queryCache = client.getQueryCache();
6363 + return React.useSyncExternalStore(
6364 + React.useCallback(
6365 + (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6366 + [queryCache]
6367 + ),
6368 + () => client.isFetching(filters),
6369 + () => client.isFetching(filters)
6370 + );
6371 +}
6372 +// Annotate the CommonJS export names for ESM import in node:
6373 +0 && (0);
6374 +//# sourceMappingURL=useIsFetching.cjs.map
6375 +
6376 +/***/ }),
6377 +
6378 +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
6379 +/*!**************************************************************************!*\
6380 + !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
6381 + \**************************************************************************/
6382 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6383 +
6384 +"use strict";
6385 +
6386 +"use client";
6387 +var __create = Object.create;
6388 +var __defProp = Object.defineProperty;
6389 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6390 +var __getOwnPropNames = Object.getOwnPropertyNames;
6391 +var __getProtoOf = Object.getPrototypeOf;
6392 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6393 +var __export = (target, all) => {
6394 + for (var name in all)
6395 + __defProp(target, name, { get: all[name], enumerable: true });
6396 +};
6397 +var __copyProps = (to, from, except, desc) => {
6398 + if (from && typeof from === "object" || typeof from === "function") {
6399 + for (let key of __getOwnPropNames(from))
6400 + if (!__hasOwnProp.call(to, key) && key !== except)
6401 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6402 + }
6403 + return to;
6404 +};
6405 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6406 + // If the importer is in node compatibility mode or this is not an ESM
6407 + // file that has been converted to a CommonJS file using a Babel-
6408 + // compatible transform (i.e. "__esModule" has not been set), then set
6409 + // "default" to the CommonJS "module.exports" for node compatibility.
6410 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6411 + mod
6412 +));
6413 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6414 +
6415 +// src/useMutation.ts
6416 +var useMutation_exports = {};
6417 +__export(useMutation_exports, {
6418 + useMutation: () => useMutation
6419 +});
6420 +module.exports = __toCommonJS(useMutation_exports);
6421 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6422 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6423 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6424 +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
6425 +function useMutation(options, queryClient) {
6426 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6427 + const [observer] = React.useState(
6428 + () => new import_query_core.MutationObserver(
6429 + client,
6430 + options
6431 + )
6432 + );
6433 + React.useEffect(() => {
6434 + observer.setOptions(options);
6435 + }, [observer, options]);
6436 + const result = React.useSyncExternalStore(
6437 + React.useCallback(
6438 + (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6439 + [observer]
6440 + ),
6441 + () => observer.getCurrentResult(),
6442 + () => observer.getCurrentResult()
6443 + );
6444 + const mutate = React.useCallback(
6445 + (variables, mutateOptions) => {
6446 + observer.mutate(variables, mutateOptions).catch(noop);
6447 + },
6448 + [observer]
6449 + );
6450 + if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
6451 + throw result.error;
6452 + }
6453 + return { ...result, mutate, mutateAsync: result.mutate };
6454 +}
6455 +function noop() {
6456 +}
6457 +// Annotate the CommonJS export names for ESM import in node:
6458 +0 && (0);
6459 +//# sourceMappingURL=useMutation.cjs.map
6460 +
6461 +/***/ }),
6462 +
6463 +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
6464 +/*!*******************************************************************************!*\
6465 + !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
6466 + \*******************************************************************************/
6467 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6468 +
6469 +"use strict";
6470 +
6471 +"use client";
6472 +var __create = Object.create;
6473 +var __defProp = Object.defineProperty;
6474 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6475 +var __getOwnPropNames = Object.getOwnPropertyNames;
6476 +var __getProtoOf = Object.getPrototypeOf;
6477 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6478 +var __export = (target, all) => {
6479 + for (var name in all)
6480 + __defProp(target, name, { get: all[name], enumerable: true });
6481 +};
6482 +var __copyProps = (to, from, except, desc) => {
6483 + if (from && typeof from === "object" || typeof from === "function") {
6484 + for (let key of __getOwnPropNames(from))
6485 + if (!__hasOwnProp.call(to, key) && key !== except)
6486 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6487 + }
6488 + return to;
6489 +};
6490 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6491 + // If the importer is in node compatibility mode or this is not an ESM
6492 + // file that has been converted to a CommonJS file using a Babel-
6493 + // compatible transform (i.e. "__esModule" has not been set), then set
6494 + // "default" to the CommonJS "module.exports" for node compatibility.
6495 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6496 + mod
6497 +));
6498 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6499 +
6500 +// src/useMutationState.ts
6501 +var useMutationState_exports = {};
6502 +__export(useMutationState_exports, {
6503 + useIsMutating: () => useIsMutating,
6504 + useMutationState: () => useMutationState
6505 +});
6506 +module.exports = __toCommonJS(useMutationState_exports);
6507 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6508 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6509 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6510 +function useIsMutating(filters, queryClient) {
6511 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6512 + return useMutationState(
6513 + { filters: { ...filters, status: "pending" } },
6514 + client
6515 + ).length;
6516 +}
6517 +function getResult(mutationCache, options) {
6518 + return mutationCache.findAll(options.filters).map(
6519 + (mutation) => options.select ? options.select(
6520 + mutation
6521 + ) : mutation.state
6522 + );
6523 +}
6524 +function useMutationState(options = {}, queryClient) {
6525 + const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
6526 + const optionsRef = React.useRef(options);
6527 + const result = React.useRef();
6528 + if (!result.current) {
6529 + result.current = getResult(mutationCache, options);
6530 + }
6531 + React.useEffect(() => {
6532 + optionsRef.current = options;
6533 + });
6534 + return React.useSyncExternalStore(
6535 + React.useCallback(
6536 + (onStoreChange) => mutationCache.subscribe(() => {
6537 + const nextResult = (0, import_query_core.replaceEqualDeep)(
6538 + result.current,
6539 + getResult(mutationCache, optionsRef.current)
6540 + );
6541 + if (result.current !== nextResult) {
6542 + result.current = nextResult;
6543 + import_query_core.notifyManager.schedule(onStoreChange);
6544 + }
6545 + }),
6546 + [mutationCache]
6547 + ),
6548 + () => result.current,
6549 + () => result.current
6550 + );
6551 +}
6552 +// Annotate the CommonJS export names for ESM import in node:
6553 +0 && (0);
6554 +//# sourceMappingURL=useMutationState.cjs.map
6555 +
6556 +/***/ }),
6557 +
6558 +/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
6559 +/*!*************************************************************************!*\
6560 + !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
6561 + \*************************************************************************/
6562 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6563 +
6564 +"use strict";
6565 +
6566 +"use client";
6567 +var __create = Object.create;
6568 +var __defProp = Object.defineProperty;
6569 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6570 +var __getOwnPropNames = Object.getOwnPropertyNames;
6571 +var __getProtoOf = Object.getPrototypeOf;
6572 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6573 +var __export = (target, all) => {
6574 + for (var name in all)
6575 + __defProp(target, name, { get: all[name], enumerable: true });
6576 +};
6577 +var __copyProps = (to, from, except, desc) => {
6578 + if (from && typeof from === "object" || typeof from === "function") {
6579 + for (let key of __getOwnPropNames(from))
6580 + if (!__hasOwnProp.call(to, key) && key !== except)
6581 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6582 + }
6583 + return to;
6584 +};
6585 +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
6586 + // If the importer is in node compatibility mode or this is not an ESM
6587 + // file that has been converted to a CommonJS file using a Babel-
6588 + // compatible transform (i.e. "__esModule" has not been set), then set
6589 + // "default" to the CommonJS "module.exports" for node compatibility.
6590 + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
6591 + mod
6592 +));
6593 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6594 +
6595 +// src/useQueries.ts
6596 +var useQueries_exports = {};
6597 +__export(useQueries_exports, {
6598 + useQueries: () => useQueries
6599 +});
6600 +module.exports = __toCommonJS(useQueries_exports);
6601 +var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
6602 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6603 +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
6604 +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
6605 +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
6606 +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
6607 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6608 +function useQueries({
6609 + queries,
6610 + ...options
6611 +}, queryClient) {
6612 + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
6613 + const isRestoring = (0, import_isRestoring.useIsRestoring)();
6614 + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
6615 + const defaultedQueries = React.useMemo(
6616 + () => queries.map((opts) => {
6617 + const defaultedOptions = client.defaultQueryOptions(opts);
6618 + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
6619 + return defaultedOptions;
6620 + }),
6621 + [queries, client, isRestoring]
6622 + );
6623 + defaultedQueries.forEach((query) => {
6624 + (0, import_suspense.ensureStaleTime)(query);
6625 + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
6626 + });
6627 + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
6628 + const [observer] = React.useState(
6629 + () => new import_query_core.QueriesObserver(
6630 + client,
6631 + defaultedQueries,
6632 + options
6633 + )
6634 + );
6635 + const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries);
6636 + React.useSyncExternalStore(
6637 + React.useCallback(
6638 + (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
6639 + [observer, isRestoring]
6640 + ),
6641 + () => observer.getCurrentResult(),
6642 + () => observer.getCurrentResult()
6643 + );
6644 + React.useEffect(() => {
6645 + observer.setQueries(
6646 + defaultedQueries,
6647 + options,
6648 + {
6649 + listeners: false
6650 + }
6651 + );
6652 + }, [defaultedQueries, options, observer]);
6653 + const shouldAtLeastOneSuspend = optimisticResult.some(
6654 + (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result, isRestoring)
6655 + );
6656 + const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
6657 + const opts = defaultedQueries[index];
6658 + if (opts) {
6659 + const queryObserver = new import_query_core.QueryObserver(client, opts);
6660 + if ((0, import_suspense.shouldSuspend)(opts, result, isRestoring)) {
6661 + return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
6662 + } else if ((0, import_suspense.willFetch)(result, isRestoring)) {
6663 + void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
6664 + }
6665 + }
6666 + return [];
6667 + }) : [];
6668 + if (suspensePromises.length > 0) {
6669 + throw Promise.all(suspensePromises);
6670 + }
6671 + const observerQueries = observer.getQueries();
6672 + const firstSingleResultWhichShouldThrow = optimisticResult.find(
6673 + (result, index) => (0, import_errorBoundaryUtils.getHasError)({
6674 + result,
6675 + errorResetBoundary,
6676 + throwOnError: defaultedQueries[index]?.throwOnError ?? false,
6677 + query: observerQueries[index]
6678 + })
6679 + );
6680 + if (firstSingleResultWhichShouldThrow?.error) {
6681 + throw firstSingleResultWhichShouldThrow.error;
6682 + }
6683 + return getCombinedResult(trackResult());
6684 +}
6685 +// Annotate the CommonJS export names for ESM import in node:
6686 +0 && (0);
6687 +//# sourceMappingURL=useQueries.cjs.map
6688 +
6689 +/***/ }),
6690 +
6691 +/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
6692 +/*!***********************************************************************!*\
6693 + !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
6694 + \***********************************************************************/
6695 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6696 +
6697 +"use strict";
6698 +
6699 +"use client";
6700 +var __defProp = Object.defineProperty;
6701 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6702 +var __getOwnPropNames = Object.getOwnPropertyNames;
6703 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6704 +var __export = (target, all) => {
6705 + for (var name in all)
6706 + __defProp(target, name, { get: all[name], enumerable: true });
6707 +};
6708 +var __copyProps = (to, from, except, desc) => {
6709 + if (from && typeof from === "object" || typeof from === "function") {
6710 + for (let key of __getOwnPropNames(from))
6711 + if (!__hasOwnProp.call(to, key) && key !== except)
6712 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6713 + }
6714 + return to;
6715 +};
6716 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6717 +
6718 +// src/useQuery.ts
6719 +var useQuery_exports = {};
6720 +__export(useQuery_exports, {
6721 + useQuery: () => useQuery
6722 +});
6723 +module.exports = __toCommonJS(useQuery_exports);
6724 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6725 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6726 +function useQuery(options, queryClient) {
6727 + return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
6728 +}
6729 +// Annotate the CommonJS export names for ESM import in node:
6730 +0 && (0);
6731 +//# sourceMappingURL=useQuery.cjs.map
6732 +
6733 +/***/ }),
6734 +
6735 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
6736 +/*!***************************************************************************************!*\
6737 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
6738 + \***************************************************************************************/
6739 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6740 +
6741 +"use strict";
6742 +
6743 +"use client";
6744 +var __defProp = Object.defineProperty;
6745 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6746 +var __getOwnPropNames = Object.getOwnPropertyNames;
6747 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6748 +var __export = (target, all) => {
6749 + for (var name in all)
6750 + __defProp(target, name, { get: all[name], enumerable: true });
6751 +};
6752 +var __copyProps = (to, from, except, desc) => {
6753 + if (from && typeof from === "object" || typeof from === "function") {
6754 + for (let key of __getOwnPropNames(from))
6755 + if (!__hasOwnProp.call(to, key) && key !== except)
6756 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6757 + }
6758 + return to;
6759 +};
6760 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6761 +
6762 +// src/useSuspenseInfiniteQuery.ts
6763 +var useSuspenseInfiniteQuery_exports = {};
6764 +__export(useSuspenseInfiniteQuery_exports, {
6765 + useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
6766 +});
6767 +module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
6768 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6769 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6770 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6771 +function useSuspenseInfiniteQuery(options, queryClient) {
6772 + return (0, import_useBaseQuery.useBaseQuery)(
6773 + {
6774 + ...options,
6775 + enabled: true,
6776 + suspense: true,
6777 + throwOnError: import_suspense.defaultThrowOnError
6778 + },
6779 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
6780 + import_query_core.InfiniteQueryObserver,
6781 + queryClient
6782 + );
6783 +}
6784 +// Annotate the CommonJS export names for ESM import in node:
6785 +0 && (0);
6786 +//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
6787 +
6788 +/***/ }),
6789 +
6790 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
6791 +/*!*********************************************************************************!*\
6792 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
6793 + \*********************************************************************************/
6794 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6795 +
6796 +"use strict";
6797 +
6798 +"use client";
6799 +var __defProp = Object.defineProperty;
6800 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6801 +var __getOwnPropNames = Object.getOwnPropertyNames;
6802 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6803 +var __export = (target, all) => {
6804 + for (var name in all)
6805 + __defProp(target, name, { get: all[name], enumerable: true });
6806 +};
6807 +var __copyProps = (to, from, except, desc) => {
6808 + if (from && typeof from === "object" || typeof from === "function") {
6809 + for (let key of __getOwnPropNames(from))
6810 + if (!__hasOwnProp.call(to, key) && key !== except)
6811 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6812 + }
6813 + return to;
6814 +};
6815 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6816 +
6817 +// src/useSuspenseQueries.ts
6818 +var useSuspenseQueries_exports = {};
6819 +__export(useSuspenseQueries_exports, {
6820 + useSuspenseQueries: () => useSuspenseQueries
6821 +});
6822 +module.exports = __toCommonJS(useSuspenseQueries_exports);
6823 +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
6824 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6825 +function useSuspenseQueries(options, queryClient) {
6826 + return (0, import_useQueries.useQueries)(
6827 + {
6828 + ...options,
6829 + queries: options.queries.map((query) => ({
6830 + ...query,
6831 + suspense: true,
6832 + throwOnError: import_suspense.defaultThrowOnError,
6833 + enabled: true
6834 + }))
6835 + },
6836 + queryClient
6837 + );
6838 +}
6839 +// Annotate the CommonJS export names for ESM import in node:
6840 +0 && (0);
6841 +//# sourceMappingURL=useSuspenseQueries.cjs.map
6842 +
6843 +/***/ }),
6844 +
6845 +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
6846 +/*!*******************************************************************************!*\
6847 + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
6848 + \*******************************************************************************/
6849 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6850 +
6851 +"use strict";
6852 +
6853 +"use client";
6854 +var __defProp = Object.defineProperty;
6855 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6856 +var __getOwnPropNames = Object.getOwnPropertyNames;
6857 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6858 +var __export = (target, all) => {
6859 + for (var name in all)
6860 + __defProp(target, name, { get: all[name], enumerable: true });
6861 +};
6862 +var __copyProps = (to, from, except, desc) => {
6863 + if (from && typeof from === "object" || typeof from === "function") {
6864 + for (let key of __getOwnPropNames(from))
6865 + if (!__hasOwnProp.call(to, key) && key !== except)
6866 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6867 + }
6868 + return to;
6869 +};
6870 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6871 +
6872 +// src/useSuspenseQuery.ts
6873 +var useSuspenseQuery_exports = {};
6874 +__export(useSuspenseQuery_exports, {
6875 + useSuspenseQuery: () => useSuspenseQuery
6876 +});
6877 +module.exports = __toCommonJS(useSuspenseQuery_exports);
6878 +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
6879 +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
6880 +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
6881 +function useSuspenseQuery(options, queryClient) {
6882 + return (0, import_useBaseQuery.useBaseQuery)(
6883 + {
6884 + ...options,
6885 + enabled: true,
6886 + suspense: true,
6887 + throwOnError: import_suspense.defaultThrowOnError
6888 + },
6889 + import_query_core.QueryObserver,
6890 + queryClient
6891 + );
6892 +}
6893 +// Annotate the CommonJS export names for ESM import in node:
6894 +0 && (0);
6895 +//# sourceMappingURL=useSuspenseQuery.cjs.map
6896 +
6897 +/***/ }),
6898 +
6899 +/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
6900 +/*!********************************************************************!*\
6901 + !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
6902 + \********************************************************************/
6903 +/***/ ((module) => {
6904 +
6905 +"use strict";
6906 +
6907 +var __defProp = Object.defineProperty;
6908 +var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6909 +var __getOwnPropNames = Object.getOwnPropertyNames;
6910 +var __hasOwnProp = Object.prototype.hasOwnProperty;
6911 +var __export = (target, all) => {
6912 + for (var name in all)
6913 + __defProp(target, name, { get: all[name], enumerable: true });
6914 +};
6915 +var __copyProps = (to, from, except, desc) => {
6916 + if (from && typeof from === "object" || typeof from === "function") {
6917 + for (let key of __getOwnPropNames(from))
6918 + if (!__hasOwnProp.call(to, key) && key !== except)
6919 + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6920 + }
6921 + return to;
6922 +};
6923 +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6924 +
6925 +// src/utils.ts
6926 +var utils_exports = {};
6927 +__export(utils_exports, {
6928 + shouldThrowError: () => shouldThrowError
6929 +});
6930 +module.exports = __toCommonJS(utils_exports);
6931 +function shouldThrowError(throwError, params) {
6932 + if (typeof throwError === "function") {
6933 + return throwError(...params);
6934 + }
6935 + return !!throwError;
6936 +}
6937 +// Annotate the CommonJS export names for ESM import in node:
6938 +0 && (0);
6939 +//# sourceMappingURL=utils.cjs.map
6940 +
6941 +/***/ })
6942 +
6943 +/******/ });
6944 +/************************************************************************/
6945 +/******/ // The module cache
6946 +/******/ var __webpack_module_cache__ = {};
6947 +/******/
6948 +/******/ // The require function
6949 +/******/ function __webpack_require__(moduleId) {
6950 +/******/ // Check if module is in cache
6951 +/******/ var cachedModule = __webpack_module_cache__[moduleId];
6952 +/******/ if (cachedModule !== undefined) {
6953 +/******/ return cachedModule.exports;
6954 +/******/ }
6955 +/******/ // Create a new module (and put it into the cache)
6956 +/******/ var module = __webpack_module_cache__[moduleId] = {
6957 +/******/ // no module.id needed
6958 +/******/ // no module.loaded needed
6959 +/******/ exports: {}
6960 +/******/ };
6961 +/******/
6962 +/******/ // Execute the module function
6963 +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
6964 +/******/
6965 +/******/ // Return the exports of the module
6966 +/******/ return module.exports;
6967 +/******/ }
6968 +/******/
6969 +/************************************************************************/
6970 +var __webpack_exports__ = {};
6971 +// This entry need to be wrapped in an IIFE because it need to be in strict mode.
6972 +(() => {
6973 +"use strict";
6974 +/*!****************************************************!*\
6975 + !*** ../modules/notifications/assets/js/editor.js ***!
6976 + \****************************************************/
6977 +
6978 +
6979 +var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js");
6980 +var _editorV2 = __webpack_require__(/*! ./components/editor-v2 */ "../modules/notifications/assets/js/components/editor-v2.js");
6981 +var _window, _window$elementorV;
6982 +if ((_window = window) !== null && _window !== void 0 && (_window$elementorV = _window.elementorV2) !== null && _window$elementorV !== void 0 && _window$elementorV.editorAppBar) {
6983 + (0, _editorV2.editorV2)();
6984 +} else {
6985 + (0, _editorV.editorV1)();
6986 +}
6987 +})();
6988 +
6989 +/******/ })()
6990 +;
1578 6991 //# sourceMappingURL=editor-notifications.js.map