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 +5111 -320 4.1.0-beta3 → 3.21.0-beta2 View file →
@@ -1,7 +1,64 @@
1 +/*! elementor - v3.21.0 - 08-04-2024 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
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 +
4 61 /***/ "../assets/dev/js/utils/react.js":
5 62 /*!***************************************!*\
6 63 !*** ../assets/dev/js/utils/react.js ***!
7 64 \***************************************/
@@ -17,9 +74,10 @@
17 74 exports["default"] = void 0;
18 75 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
19 76 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
20 77 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
21 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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; }
22 80 /**
23 81 * Support conditional rendering of a React App to the DOM, based on the React version.
24 82 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
25 83 *
@@ -47,11 +105,12 @@
47 105 return {
48 106 unmount: unmountFunction
49 107 };
50 108 }
51 -var _default = exports["default"] = {
109 +var _default = {
52 110 render: render
53 111 };
112 +exports["default"] = _default;
54 113
55 114 /***/ }),
56 115
57 116 /***/ "../modules/notifications/assets/js/api/index.js":
@@ -76,84 +135,15 @@
76 135 data: data
77 136 });
78 137 });
79 138 };
80 -var getNotifications = exports.getNotifications = function getNotifications() {
139 +var getNotifications = function getNotifications() {
81 140 return request('notifications_get');
82 141 };
142 +exports.getNotifications = getNotifications;
83 143
84 144 /***/ }),
85 145
86 -/***/ "../modules/notifications/assets/js/components/editor-app-bar-link.js":
87 -/*!****************************************************************************!*\
88 - !*** ../modules/notifications/assets/js/components/editor-app-bar-link.js ***!
89 - \****************************************************************************/
90 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
91 -
92 -"use strict";
93 -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
94 -
95 -
96 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
97 -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
98 -Object.defineProperty(exports, "__esModule", ({
99 - value: true
100 -}));
101 -exports.editorAppBarLink = void 0;
102 -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
103 -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
104 -var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar"));
105 -var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
106 -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
107 -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
108 -var _SpeakerphoneIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/SpeakerphoneIcon */ "@elementor/icons/SpeakerphoneIcon"));
109 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
110 -var IconWithBadge = function IconWithBadge(_ref) {
111 - var invisible = _ref.invisible;
112 - return /*#__PURE__*/_react.default.createElement(_ui.Badge, {
113 - color: "primary",
114 - variant: "dot",
115 - invisible: invisible
116 - }, /*#__PURE__*/_react.default.createElement(_SpeakerphoneIcon.default, null));
117 -};
118 -IconWithBadge.propTypes = {
119 - invisible: PropTypes.bool
120 -};
121 -var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() {
122 - var utilitiesMenu = EditorAppBar.utilitiesMenu;
123 - utilitiesMenu.registerLink({
124 - id: 'app-bar-menu-item-whats-new',
125 - priority: 10,
126 - useProps: function useProps() {
127 - var _useState = (0, _react.useState)(!elementorNotifications.is_unread),
128 - _useState2 = (0, _slicedToArray2.default)(_useState, 2),
129 - isRead = _useState2[0],
130 - setIsRead = _useState2[1];
131 - return {
132 - title: (0, _i18n.__)("What's New", 'elementor'),
133 - icon: function icon() {
134 - return /*#__PURE__*/_react.default.createElement(IconWithBadge, {
135 - invisible: isRead
136 - });
137 - },
138 - onClick: function onClick() {
139 - elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar.whatsNew, {
140 - location: elementorCommon.eventsManager.config.locations.topBar,
141 - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations['whats-new'],
142 - trigger: elementorCommon.eventsManager.config.triggers.click,
143 - element: elementorCommon.eventsManager.config.elements.buttonIcon
144 - });
145 - setIsRead(true);
146 - elementorNotifications.is_unread = false;
147 - (0, _editorOnButtonClicked.editorOnButtonClicked)('right');
148 - }
149 - };
150 - }
151 - });
152 -};
153 -
154 -/***/ }),
155 -
156 146 /***/ "../modules/notifications/assets/js/components/editor-drawer.js":
157 147 /*!**********************************************************************!*\
158 148 !*** ../modules/notifications/assets/js/components/editor-drawer.js ***!
159 149 \**********************************************************************/
@@ -171,10 +161,11 @@
171 161 exports.EditorDrawer = void 0;
172 162 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
173 163 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
174 164 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
175 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
176 -var EditorDrawer = exports.EditorDrawer = function EditorDrawer(_ref) {
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) {
177 168 var _ref$anchorPosition = _ref.anchorPosition,
178 169 anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition;
179 170 var _useState = (0, _react.useState)(true),
180 171 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -193,8 +184,9 @@
193 184 },
194 185 anchorPosition: anchorPosition
195 186 });
196 187 };
188 +exports.EditorDrawer = EditorDrawer;
197 189 EditorDrawer.propTypes = {
198 190 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
199 191 };
200 192
@@ -217,15 +209,15 @@
217 209 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
218 210 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
219 211 var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js");
220 212 var isRendered = false;
221 -var editorOnButtonClicked = exports.editorOnButtonClicked = function editorOnButtonClicked() {
213 +var editorOnButtonClicked = function editorOnButtonClicked() {
222 214 var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left';
223 215 if (!isRendered) {
224 216 isRendered = true;
225 217 var container = document.createElement('div');
226 218 document.body.append(container);
227 - _react2.default.render(/*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
219 + _react2.default.render( /*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
228 220 anchorPosition: anchorPosition
229 221 }), container);
230 222 return;
231 223 }
@@ -230,8 +222,9 @@
230 222 return;
231 223 }
232 224 elementor.trigger('elementor/editor/panel/whats-new/clicked');
233 225 };
226 +exports.editorOnButtonClicked = editorOnButtonClicked;
234 227
235 228 /***/ }),
236 229
237 230 /***/ "../modules/notifications/assets/js/components/editor-v1.js":
@@ -248,9 +241,9 @@
248 241 value: true
249 242 }));
250 243 exports.editorV1 = void 0;
251 244 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
252 -var editorV1 = exports.editorV1 = function editorV1() {
245 +var editorV1 = function editorV1() {
253 246 elementor.on('panel:init', function () {
254 247 if (elementorNotifications.is_unread) {
255 248 document.body.classList.add('e-has-notification');
256 249 }
@@ -255,17 +248,83 @@
255 248 document.body.classList.add('e-has-notification');
256 249 }
257 250 elementor.getPanelView().getPages('menu').view.addItem({
258 251 name: 'notification-center',
259 - icon: 'eicon-speakerphone',
252 + icon: 'eicon-notification',
260 253 title: __('What\'s New', 'elementor'),
261 254 callback: _editorOnButtonClicked.editorOnButtonClicked
262 255 }, 'navigate_from_page', 'view-page');
263 256 });
264 257 };
258 +exports.editorV1 = editorV1;
265 259
266 260 /***/ }),
267 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 +
268 327 /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
269 328 /*!*********************************************************************************!*\
270 329 !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
271 330 \*********************************************************************************/
@@ -271,9 +330,8 @@
271 330 \*********************************************************************************/
272 331 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
273 332
274 333 "use strict";
275 -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
276 334
277 335
278 336 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
279 337 Object.defineProperty(exports, "__esModule", ({
@@ -280,14 +338,13 @@
280 338 value: true
281 339 }));
282 340 exports.WhatsNewDrawerContent = void 0;
283 341 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
284 -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
342 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
285 343 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
286 344 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
287 345 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
288 -var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
289 - var setIsOpen = _ref.setIsOpen;
346 +var WhatsNewDrawerContent = function WhatsNewDrawerContent() {
290 347 var _useQuery = (0, _query.useQuery)({
291 348 queryKey: ['e-notifications'],
292 349 queryFn: _api.getNotifications
293 350 }),
@@ -306,16 +363,13 @@
306 363 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
307 364 key: itemIndex,
308 365 item: item,
309 366 itemIndex: itemIndex,
310 - itemsLength: items.length,
311 - setIsOpen: setIsOpen
367 + itemsLength: items.length
312 368 });
313 369 });
314 370 };
315 -WhatsNewDrawerContent.propTypes = {
316 - setIsOpen: PropTypes.func.isRequired
317 -};
371 +exports.WhatsNewDrawerContent = WhatsNewDrawerContent;
318 372
319 373 /***/ }),
320 374
321 375 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
@@ -335,9 +389,9 @@
335 389 exports.WhatsNewItemChips = void 0;
336 390 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
337 391 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
338 392 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
339 -var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
393 +var WhatsNewItemChips = function WhatsNewItemChips(_ref) {
340 394 var chipPlan = _ref.chipPlan,
341 395 chipTags = _ref.chipTags,
342 396 itemIndex = _ref.itemIndex;
343 397 var chips = [];
@@ -372,8 +426,9 @@
372 426 key: "chip-".concat(itemIndex).concat(chipIndex)
373 427 }, chip));
374 428 }));
375 429 };
430 +exports.WhatsNewItemChips = WhatsNewItemChips;
376 431 WhatsNewItemChips.propTypes = {
377 432 chipPlan: PropTypes.string,
378 433 chipTags: PropTypes.array,
379 434 itemIndex: PropTypes.number.isRequired
@@ -398,9 +453,9 @@
398 453 exports.WhatsNewItemThumbnail = void 0;
399 454 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
400 455 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
401 456 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
402 -var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
457 +var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
403 458 var imageSrc = _ref.imageSrc,
404 459 title = _ref.title,
405 460 link = _ref.link;
406 461 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
@@ -416,8 +471,9 @@
416 471 maxWidth: '100%'
417 472 }
418 473 })));
419 474 };
475 +exports.WhatsNewItemThumbnail = WhatsNewItemThumbnail;
420 476 WhatsNewItemThumbnail.propTypes = {
421 477 imageSrc: PropTypes.string.isRequired,
422 478 title: PropTypes.string.isRequired,
423 479 link: PropTypes.string
@@ -441,9 +497,9 @@
441 497 }));
442 498 exports.WhatsNewItemTopicLine = void 0;
443 499 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
444 500 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
445 -var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
501 +var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
446 502 var topic = _ref.topic,
447 503 date = _ref.date;
448 504 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
449 505 direction: "row",
@@ -457,8 +513,9 @@
457 513 pb: 1
458 514 }
459 515 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
460 516 };
517 +exports.WhatsNewItemTopicLine = WhatsNewItemTopicLine;
461 518 WhatsNewItemTopicLine.propTypes = {
462 519 topic: PropTypes.string,
463 520 date: PropTypes.string
464 521 };
@@ -485,13 +542,12 @@
485 542 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
486 543 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
487 544 var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
488 545 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
489 -var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
546 +var WhatsNewItem = function WhatsNewItem(_ref) {
490 547 var item = _ref.item,
491 548 itemIndex = _ref.itemIndex,
492 - itemsLength = _ref.itemsLength,
493 - setIsOpen = _ref.setIsOpen;
549 + itemsLength = _ref.itemsLength;
494 550 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
495 551 key: itemIndex,
496 552 display: "flex",
497 553 flexDirection: "column",
@@ -531,15 +587,12 @@
531 587 pb: 2
532 588 }
533 589 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
534 590 href: item.ctaLink,
535 - target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
591 + target: "_blank",
536 592 variant: "contained",
537 593 size: "small",
538 - color: "promotion",
539 - onClick: item.ctaLink.startsWith('#') ? function () {
540 - return setIsOpen(false);
541 - } : function () {}
594 + color: "promotion"
542 595 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
543 596 sx: {
544 597 my: 1
545 598 }
@@ -544,13 +597,13 @@
544 597 my: 1
545 598 }
546 599 }));
547 600 };
601 +exports.WhatsNewItem = WhatsNewItem;
548 602 WhatsNewItem.propTypes = {
549 603 item: PropTypes.object.isRequired,
550 604 itemIndex: PropTypes.number.isRequired,
551 - itemsLength: PropTypes.number.isRequired,
552 - setIsOpen: PropTypes.func.isRequired
605 + itemsLength: PropTypes.number.isRequired
553 606 };
554 607
555 608 /***/ }),
556 609
@@ -572,9 +625,9 @@
572 625 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
573 626 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
574 627 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
575 628 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
576 -var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
629 +var WhatsNewTopBar = function WhatsNewTopBar(props) {
577 630 var setIsOpen = props.setIsOpen;
578 631 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
579 632 elevation: 0,
580 633 position: "sticky",
@@ -595,8 +648,9 @@
595 648 return setIsOpen(false);
596 649 }
597 650 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
598 651 };
652 +exports.WhatsNewTopBar = WhatsNewTopBar;
599 653 WhatsNewTopBar.propTypes = {
600 654 setIsOpen: PropTypes.func.isRequired
601 655 };
602 656
@@ -618,12 +672,13 @@
618 672 }));
619 673 exports.WhatsNew = void 0;
620 674 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
621 675 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
622 -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query");
676 +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
623 677 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
624 678 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
625 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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; }
626 681 var queryClient = new _query.QueryClient({
627 682 defaultOptions: {
628 683 queries: {
629 684 refetchOnWindowFocus: false,
@@ -631,9 +686,10 @@
631 686 staleTime: 1000 * 60 * 30 // 30 minutes
632 687 }
633 688 }
634 689 });
635 -var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
690 +
691 +var WhatsNew = function WhatsNew(props) {
636 692 var _window$elementor, _window$elementor$get;
637 693 var isOpen = props.isOpen,
638 694 setIsOpen = props.setIsOpen,
639 695 setIsRead = props.setIsRead,
@@ -649,9 +705,9 @@
649 705 client: queryClient
650 706 }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
651 707 rtl: elementorCommon.config.isRTL
652 708 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
653 - 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'
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'
654 710 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
655 711 anchor: anchorPosition,
656 712 open: isOpen,
657 713 onClose: function onClose() {
@@ -674,12 +730,11 @@
674 730 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
675 731 sx: {
676 732 padding: '16px'
677 733 }
678 - }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
679 - setIsOpen: setIsOpen
680 - }))))))));
734 + }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, null))))))));
681 735 };
736 +exports.WhatsNew = WhatsNew;
682 737 WhatsNew.propTypes = {
683 738 isOpen: PropTypes.bool.isRequired,
684 739 setIsOpen: PropTypes.func.isRequired,
685 740 setIsRead: PropTypes.func.isRequired,
@@ -704,9 +759,9 @@
704 759 }));
705 760 exports.WrapperWithLink = void 0;
706 761 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
707 762 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
708 -var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
763 +var WrapperWithLink = function WrapperWithLink(props) {
709 764 var link = props.link,
710 765 children = props.children;
711 766 if (!link) {
712 767 return children;
@@ -722,8 +777,9 @@
722 777 }
723 778 }
724 779 }, children);
725 780 };
781 +exports.WrapperWithLink = WrapperWithLink;
726 782 WrapperWithLink.propTypes = {
727 783 link: PropTypes.string,
728 784 children: PropTypes.any.isRequired
729 785 };
@@ -729,8 +785,43 @@
729 785 };
730 786
731 787 /***/ }),
732 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 +
733 824 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
734 825 /*!**********************************************************!*\
735 826 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
736 827 \**********************************************************/
@@ -747,10 +838,11 @@
747 838 exports.XIcon = void 0;
748 839 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
749 840 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
750 841 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
751 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
752 -var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
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) {
753 845 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
754 846 viewBox: "0 0 24 24"
755 847 }, props, {
756 848 ref: ref
@@ -763,177 +855,12 @@
763 855 clipRule: "evenodd",
764 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"
765 857 }));
766 858 });
859 +exports.XIcon = XIcon;
767 860
768 861 /***/ }),
769 862
770 -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
771 -/*!******************************************************************!*\
772 - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
773 - \******************************************************************/
774 -/***/ ((module) => {
775 -
776 -function _arrayLikeToArray(r, a) {
777 - (null == a || a > r.length) && (a = r.length);
778 - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
779 - return n;
780 -}
781 -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
782 -
783 -/***/ }),
784 -
785 -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
786 -/*!****************************************************************!*\
787 - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
788 - \****************************************************************/
789 -/***/ ((module) => {
790 -
791 -function _arrayWithHoles(r) {
792 - if (Array.isArray(r)) return r;
793 -}
794 -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
795 -
796 -/***/ }),
797 -
798 -/***/ "../node_modules/@babel/runtime/helpers/extends.js":
799 -/*!*********************************************************!*\
800 - !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
801 - \*********************************************************/
802 -/***/ ((module) => {
803 -
804 -function _extends() {
805 - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
806 - for (var e = 1; e < arguments.length; e++) {
807 - var t = arguments[e];
808 - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
809 - }
810 - return n;
811 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
812 -}
813 -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
814 -
815 -/***/ }),
816 -
817 -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
818 -/*!***********************************************************************!*\
819 - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
820 - \***********************************************************************/
821 -/***/ ((module) => {
822 -
823 -function _interopRequireDefault(e) {
824 - return e && e.__esModule ? e : {
825 - "default": e
826 - };
827 -}
828 -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
829 -
830 -/***/ }),
831 -
832 -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
833 -/*!**********************************************************************!*\
834 - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
835 - \**********************************************************************/
836 -/***/ ((module) => {
837 -
838 -function _iterableToArrayLimit(r, l) {
839 - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
840 - if (null != t) {
841 - var e,
842 - n,
843 - i,
844 - u,
845 - a = [],
846 - f = !0,
847 - o = !1;
848 - try {
849 - if (i = (t = t.call(r)).next, 0 === l) {
850 - if (Object(t) !== t) return;
851 - f = !1;
852 - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
853 - } catch (r) {
854 - o = !0, n = r;
855 - } finally {
856 - try {
857 - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
858 - } finally {
859 - if (o) throw n;
860 - }
861 - }
862 - return a;
863 - }
864 -}
865 -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
866 -
867 -/***/ }),
868 -
869 -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
870 -/*!*****************************************************************!*\
871 - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
872 - \*****************************************************************/
873 -/***/ ((module) => {
874 -
875 -function _nonIterableRest() {
876 - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
877 -}
878 -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
879 -
880 -/***/ }),
881 -
882 -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
883 -/*!***************************************************************!*\
884 - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
885 - \***************************************************************/
886 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
887 -
888 -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
889 -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
890 -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
891 -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
892 -function _slicedToArray(r, e) {
893 - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
894 -}
895 -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
896 -
897 -/***/ }),
898 -
899 -/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
900 -/*!********************************************************!*\
901 - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
902 - \********************************************************/
903 -/***/ ((module) => {
904 -
905 -function _typeof(o) {
906 - "@babel/helpers - typeof";
907 -
908 - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
909 - return typeof o;
910 - } : function (o) {
911 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
912 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
913 -}
914 -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
915 -
916 -/***/ }),
917 -
918 -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
919 -/*!****************************************************************************!*\
920 - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
921 - \****************************************************************************/
922 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
923 -
924 -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
925 -function _unsupportedIterableToArray(r, a) {
926 - if (r) {
927 - if ("string" == typeof r) return arrayLikeToArray(r, a);
928 - var t = {}.toString.call(r).slice(8, -1);
929 - 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;
930 - }
931 -}
932 -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
933 -
934 -/***/ }),
935 -
936 863 /***/ "../node_modules/object-assign/index.js":
937 864 /*!**********************************************!*\
938 865 !*** ../node_modules/object-assign/index.js ***!
939 866 \**********************************************/
@@ -1788,10 +1715,9 @@
1788 1715 // By explicitly using `prop-types` you are opting into new development behavior.
1789 1716 // http://fb.me/prop-types-in-prod
1790 1717 var throwOnDirectAccess = true;
1791 1718 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1792 -} else // removed by dead control flow
1793 -{}
1719 +} else {}
1794 1720
1795 1721
1796 1722 /***/ }),
1797 1723
@@ -2029,10 +1955,9 @@
2029 1955
2030 1956 "use strict";
2031 1957
2032 1958
2033 -if (false) // removed by dead control flow
2034 -{} else {
1959 +if (false) {} else {
2035 1960 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
2036 1961 }
2037 1962
2038 1963
@@ -2047,10 +1972,9 @@
2047 1972 "use strict";
2048 1973
2049 1974
2050 1975 var m = __webpack_require__(/*! react-dom */ "react-dom");
2051 -if (false) // removed by dead control flow
2052 -{} else {
1976 +if (false) {} else {
2053 1977 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2054 1978 exports.createRoot = function(c, o) {
2055 1979 i.usingClientEntryPoint = true;
2056 1980 try {
@@ -2071,41 +1995,30 @@
2071 1995
2072 1996
2073 1997 /***/ }),
2074 1998
2075 -/***/ "@elementor/editor-app-bar":
2076 -/*!*******************************************!*\
2077 - !*** external "elementorV2.editorAppBar" ***!
2078 - \*******************************************/
1999 +/***/ "react":
2000 +/*!************************!*\
2001 + !*** external "React" ***!
2002 + \************************/
2079 2003 /***/ ((module) => {
2080 2004
2081 2005 "use strict";
2082 -module.exports = elementorV2.editorAppBar;
2006 +module.exports = React;
2083 2007
2084 2008 /***/ }),
2085 2009
2086 -/***/ "@elementor/icons/SpeakerphoneIcon":
2087 -/*!********************************************************!*\
2088 - !*** external "elementorV2.icons['SpeakerphoneIcon']" ***!
2089 - \********************************************************/
2010 +/***/ "react-dom":
2011 +/*!***************************!*\
2012 + !*** external "ReactDOM" ***!
2013 + \***************************/
2090 2014 /***/ ((module) => {
2091 2015
2092 2016 "use strict";
2093 -module.exports = elementorV2.icons['SpeakerphoneIcon'];
2017 +module.exports = ReactDOM;
2094 2018
2095 2019 /***/ }),
2096 2020
2097 -/***/ "@elementor/query":
2098 -/*!************************************!*\
2099 - !*** external "elementorV2.query" ***!
2100 - \************************************/
2101 -/***/ ((module) => {
2102 -
2103 -"use strict";
2104 -module.exports = elementorV2.query;
2105 -
2106 -/***/ }),
2107 -
2108 2021 /***/ "@elementor/ui":
2109 2022 /*!*********************************!*\
2110 2023 !*** external "elementorV2.ui" ***!
2111 2024 \*********************************/
@@ -2126,28 +2039,4906 @@
2126 2039 module.exports = wp.i18n;
2127 2040
2128 2041 /***/ }),
2129 2042
2130 -/***/ "react":
2131 -/*!************************!*\
2132 - !*** external "React" ***!
2133 - \************************/
2043 +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
2044 +/*!******************************************************************!*\
2045 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
2046 + \******************************************************************/
2134 2047 /***/ ((module) => {
2135 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 +
2136 2221 "use strict";
2137 -module.exports = React;
2138 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 +
2139 2313 /***/ }),
2140 2314
2141 -/***/ "react-dom":
2142 -/*!***************************!*\
2143 - !*** external "ReactDOM" ***!
2144 - \***************************/
2315 +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
2316 +/*!***********************************************************************!*\
2317 + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
2318 + \***********************************************************************/
2145 2319 /***/ ((module) => {
2146 2320
2147 2321 "use strict";
2148 -module.exports = ReactDOM;
2149 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 +
2150 6941 /***/ })
2151 6942
2152 6943 /******/ });
2153 6944 /************************************************************************/
@@ -2176,9 +6967,9 @@
2176 6967 /******/ }
2177 6968 /******/
2178 6969 /************************************************************************/
2179 6970 var __webpack_exports__ = {};
2180 -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
6971 +// This entry need to be wrapped in an IIFE because it need to be in strict mode.
2181 6972 (() => {
2182 6973 "use strict";
2183 6974 /*!****************************************************!*\
2184 6975 !*** ../modules/notifications/assets/js/editor.js ***!
@@ -2185,12 +6976,12 @@
2185 6976 \****************************************************/
2186 6977
2187 6978
2188 6979 var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js");
2189 -var _editorAppBarLink = __webpack_require__(/*! ./components/editor-app-bar-link */ "../modules/notifications/assets/js/components/editor-app-bar-link.js");
2190 -var _window;
2191 -if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) {
2192 - (0, _editorAppBarLink.editorAppBarLink)();
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)();
2193 6984 } else {
2194 6985 (0, _editorV.editorV1)();
2195 6986 }
2196 6987 })();