PluginProbe
Elementor Website Builder – more than just a page builder / 3.27.4
Elementor Website Builder – more than just a page builder v3.27.4
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 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / assets / js / editor-notifications.js

editor-notifications.js in Elementor Website Builder – more than just a page builder 3.27.4, at assets/js/editor-notifications.js

8,731 lines 317.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.27.0 - 13-02-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
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
61 /***/ "../assets/dev/js/utils/react.js":
62 /*!***************************************!*\
63 !*** ../assets/dev/js/utils/react.js ***!
64 \***************************************/
65 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
66
67 "use strict";
68
69
70 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
71 Object.defineProperty(exports, "__esModule", ({
72 value: true
73 }));
74 exports["default"] = void 0;
75 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
76 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
77 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
78 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
79 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
80 /**
81 * Support conditional rendering of a React App to the DOM, based on the React version.
82 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
83 *
84 * @param { React.ReactElement } app The app to render.
85 * @param { HTMLElement } domElement The DOM element to render the app into.
86 *
87 * @return {{ unmount: () => void }} The unmount function.
88 */
89 function render(app, domElement) {
90 var unmountFunction;
91 try {
92 var root = (0, _client.createRoot)(domElement);
93 root.render(app);
94 unmountFunction = function unmountFunction() {
95 root.unmount();
96 };
97 } catch (e) {
98 // eslint-disable-next-line react/no-deprecated
99 ReactDOM.render(app, domElement);
100 unmountFunction = function unmountFunction() {
101 // eslint-disable-next-line react/no-deprecated
102 ReactDOM.unmountComponentAtNode(domElement);
103 };
104 }
105 return {
106 unmount: unmountFunction
107 };
108 }
109 var _default = exports["default"] = {
110 render: render
111 };
112
113 /***/ }),
114
115 /***/ "../modules/notifications/assets/js/api/index.js":
116 /*!*******************************************************!*\
117 !*** ../modules/notifications/assets/js/api/index.js ***!
118 \*******************************************************/
119 /***/ ((__unused_webpack_module, exports) => {
120
121 "use strict";
122
123
124 Object.defineProperty(exports, "__esModule", ({
125 value: true
126 }));
127 exports.getNotifications = void 0;
128 var request = function request(endpoint) {
129 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
130 return new Promise(function (resolve, reject) {
131 elementorCommon.ajax.addRequest(endpoint, {
132 success: resolve,
133 error: reject,
134 data: data
135 });
136 });
137 };
138 var getNotifications = exports.getNotifications = function getNotifications() {
139 return request('notifications_get');
140 };
141
142 /***/ }),
143
144 /***/ "../modules/notifications/assets/js/components/editor-drawer.js":
145 /*!**********************************************************************!*\
146 !*** ../modules/notifications/assets/js/components/editor-drawer.js ***!
147 \**********************************************************************/
148 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
149
150 "use strict";
151 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
152
153
154 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
155 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
156 Object.defineProperty(exports, "__esModule", ({
157 value: true
158 }));
159 exports.EditorDrawer = void 0;
160 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
161 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
162 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
163 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
164 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
165 var EditorDrawer = exports.EditorDrawer = function EditorDrawer(_ref) {
166 var _ref$anchorPosition = _ref.anchorPosition,
167 anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition;
168 var _useState = (0, _react.useState)(true),
169 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
170 isOpen = _useState2[0],
171 setIsOpen = _useState2[1];
172 (0, _react.useEffect)(function () {
173 elementor.on('elementor/editor/panel/whats-new/clicked', function () {
174 return setIsOpen(true);
175 });
176 }, []);
177 return /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
178 isOpen: isOpen,
179 setIsOpen: setIsOpen,
180 setIsRead: function setIsRead() {
181 return document.body.classList.remove('e-has-notification');
182 },
183 anchorPosition: anchorPosition
184 });
185 };
186 EditorDrawer.propTypes = {
187 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
188 };
189
190 /***/ }),
191
192 /***/ "../modules/notifications/assets/js/components/editor-on-button-clicked.js":
193 /*!*********************************************************************************!*\
194 !*** ../modules/notifications/assets/js/components/editor-on-button-clicked.js ***!
195 \*********************************************************************************/
196 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
197
198 "use strict";
199
200
201 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
202 Object.defineProperty(exports, "__esModule", ({
203 value: true
204 }));
205 exports.editorOnButtonClicked = void 0;
206 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
207 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
208 var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js");
209 var isRendered = false;
210 var editorOnButtonClicked = exports.editorOnButtonClicked = function editorOnButtonClicked() {
211 var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left';
212 if (!isRendered) {
213 isRendered = true;
214 var container = document.createElement('div');
215 document.body.append(container);
216 _react2.default.render(/*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
217 anchorPosition: anchorPosition
218 }), container);
219 return;
220 }
221 elementor.trigger('elementor/editor/panel/whats-new/clicked');
222 };
223
224 /***/ }),
225
226 /***/ "../modules/notifications/assets/js/components/editor-v1.js":
227 /*!******************************************************************!*\
228 !*** ../modules/notifications/assets/js/components/editor-v1.js ***!
229 \******************************************************************/
230 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
231
232 "use strict";
233 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
234
235
236 Object.defineProperty(exports, "__esModule", ({
237 value: true
238 }));
239 exports.editorV1 = void 0;
240 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
241 var editorV1 = exports.editorV1 = function editorV1() {
242 elementor.on('panel:init', function () {
243 if (elementorNotifications.is_unread) {
244 document.body.classList.add('e-has-notification');
245 }
246 elementor.getPanelView().getPages('menu').view.addItem({
247 name: 'notification-center',
248 icon: 'eicon-speakerphone',
249 title: __('What\'s New', 'elementor'),
250 callback: _editorOnButtonClicked.editorOnButtonClicked
251 }, 'navigate_from_page', 'view-page');
252 });
253 };
254
255 /***/ }),
256
257 /***/ "../modules/notifications/assets/js/components/editor-v2.js":
258 /*!******************************************************************!*\
259 !*** ../modules/notifications/assets/js/components/editor-v2.js ***!
260 \******************************************************************/
261 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
262
263 "use strict";
264 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
265
266
267 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
268 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
269 Object.defineProperty(exports, "__esModule", ({
270 value: true
271 }));
272 exports.editorV2 = void 0;
273 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
274 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
275 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
276 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
277 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
278 var _SpeakerphoneIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/SpeakerphoneIcon */ "@elementor/icons/SpeakerphoneIcon"));
279 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
280 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
281 var IconWithBadge = function IconWithBadge(_ref) {
282 var invisible = _ref.invisible;
283 return /*#__PURE__*/_react.default.createElement(_ui.Badge, {
284 color: "primary",
285 variant: "dot",
286 invisible: invisible
287 }, /*#__PURE__*/_react.default.createElement(_SpeakerphoneIcon.default, null));
288 };
289 IconWithBadge.propTypes = {
290 invisible: PropTypes.bool
291 };
292 var editorV2 = exports.editorV2 = function editorV2() {
293 var utilitiesMenu = window.elementorV2.editorAppBar.utilitiesMenu;
294 utilitiesMenu.registerLink({
295 id: 'app-bar-menu-item-whats-new',
296 priority: 10,
297 useProps: function useProps() {
298 var _useState = (0, _react.useState)(!elementorNotifications.is_unread),
299 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
300 isRead = _useState2[0],
301 setIsRead = _useState2[1];
302 return {
303 title: (0, _i18n.__)("What's New", 'elementor'),
304 icon: function icon() {
305 return /*#__PURE__*/_react.default.createElement(IconWithBadge, {
306 invisible: isRead
307 });
308 },
309 onClick: function onClick() {
310 elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.topBar.whatsNew, {
311 location: elementor.editorEvents.config.locations.topBar,
312 secondaryLocation: elementor.editorEvents.config.secondaryLocations['whats-new'],
313 trigger: elementor.editorEvents.config.triggers.click,
314 element: elementor.editorEvents.config.elements.buttonIcon
315 });
316 setIsRead(true);
317 elementorNotifications.is_unread = false;
318 (0, _editorOnButtonClicked.editorOnButtonClicked)('right');
319 }
320 };
321 }
322 });
323 };
324
325 /***/ }),
326
327 /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
328 /*!*********************************************************************************!*\
329 !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
330 \*********************************************************************************/
331 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
332
333 "use strict";
334 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
335
336
337 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
338 Object.defineProperty(exports, "__esModule", ({
339 value: true
340 }));
341 exports.WhatsNewDrawerContent = void 0;
342 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
343 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
344 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
345 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
346 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
347 var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
348 var setIsOpen = _ref.setIsOpen;
349 var _useQuery = (0, _query.useQuery)({
350 queryKey: ['e-notifications'],
351 queryFn: _api.getNotifications
352 }),
353 isPending = _useQuery.isPending,
354 error = _useQuery.error,
355 items = _useQuery.data;
356 if (isPending) {
357 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
358 color: "secondary"
359 }));
360 }
361 if (error) {
362 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error);
363 }
364 return items.map(function (item, itemIndex) {
365 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
366 key: itemIndex,
367 item: item,
368 itemIndex: itemIndex,
369 itemsLength: items.length,
370 setIsOpen: setIsOpen
371 });
372 });
373 };
374 WhatsNewDrawerContent.propTypes = {
375 setIsOpen: PropTypes.func.isRequired
376 };
377
378 /***/ }),
379
380 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
381 /*!*****************************************************************************!*\
382 !*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***!
383 \*****************************************************************************/
384 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
385
386 "use strict";
387 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
388
389
390 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
391 Object.defineProperty(exports, "__esModule", ({
392 value: true
393 }));
394 exports.WhatsNewItemChips = void 0;
395 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
396 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
397 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
398 var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
399 var chipPlan = _ref.chipPlan,
400 chipTags = _ref.chipTags,
401 itemIndex = _ref.itemIndex;
402 var chips = [];
403 if (chipPlan) {
404 chips.push({
405 color: 'promotion',
406 size: 'small',
407 label: chipPlan
408 });
409 }
410 if (chipTags) {
411 chipTags.forEach(function (chipTag) {
412 chips.push({
413 variant: 'outlined',
414 size: 'small',
415 label: chipTag
416 });
417 });
418 }
419 if (!chips.length) {
420 return null;
421 }
422 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
423 direction: "row",
424 flexWrap: "wrap",
425 gap: 1,
426 sx: {
427 pb: 1
428 }
429 }, chips.map(function (chip, chipIndex) {
430 return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({
431 key: "chip-".concat(itemIndex).concat(chipIndex)
432 }, chip));
433 }));
434 };
435 WhatsNewItemChips.propTypes = {
436 chipPlan: PropTypes.string,
437 chipTags: PropTypes.array,
438 itemIndex: PropTypes.number.isRequired
439 };
440
441 /***/ }),
442
443 /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
444 /*!*********************************************************************************!*\
445 !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
446 \*********************************************************************************/
447 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
448
449 "use strict";
450 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
451
452
453 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
454 Object.defineProperty(exports, "__esModule", ({
455 value: true
456 }));
457 exports.WhatsNewItemThumbnail = void 0;
458 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
459 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
460 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
461 var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
462 var imageSrc = _ref.imageSrc,
463 title = _ref.title,
464 link = _ref.link;
465 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
466 sx: {
467 pb: 2
468 }
469 }, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
470 link: link
471 }, /*#__PURE__*/_react.default.createElement("img", {
472 src: imageSrc,
473 alt: title,
474 style: {
475 maxWidth: '100%'
476 }
477 })));
478 };
479 WhatsNewItemThumbnail.propTypes = {
480 imageSrc: PropTypes.string.isRequired,
481 title: PropTypes.string.isRequired,
482 link: PropTypes.string
483 };
484
485 /***/ }),
486
487 /***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js":
488 /*!**********************************************************************************!*\
489 !*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***!
490 \**********************************************************************************/
491 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
492
493 "use strict";
494 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
495
496
497 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
498 Object.defineProperty(exports, "__esModule", ({
499 value: true
500 }));
501 exports.WhatsNewItemTopicLine = void 0;
502 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
503 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
504 var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
505 var topic = _ref.topic,
506 date = _ref.date;
507 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
508 direction: "row",
509 divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, {
510 orientation: "vertical",
511 flexItem: true
512 }),
513 spacing: 1,
514 color: "text.tertiary",
515 sx: {
516 pb: 1
517 }
518 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
519 };
520 WhatsNewItemTopicLine.propTypes = {
521 topic: PropTypes.string,
522 date: PropTypes.string
523 };
524
525 /***/ }),
526
527 /***/ "../modules/notifications/assets/js/components/whats-new-item.js":
528 /*!***********************************************************************!*\
529 !*** ../modules/notifications/assets/js/components/whats-new-item.js ***!
530 \***********************************************************************/
531 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
532
533 "use strict";
534 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
535
536
537 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
538 Object.defineProperty(exports, "__esModule", ({
539 value: true
540 }));
541 exports.WhatsNewItem = void 0;
542 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
543 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
544 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
545 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
546 var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
547 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
548 var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
549 var item = _ref.item,
550 itemIndex = _ref.itemIndex,
551 itemsLength = _ref.itemsLength,
552 setIsOpen = _ref.setIsOpen;
553 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
554 key: itemIndex,
555 display: "flex",
556 flexDirection: "column",
557 sx: {
558 pt: 2
559 }
560 }, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, {
561 topic: item.topic,
562 date: item.date
563 }), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
564 link: item.link
565 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
566 variant: "subtitle1",
567 sx: {
568 pb: 2
569 }
570 }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
571 imageSrc: item.imageSrc,
572 link: item.link,
573 title: item.title
574 }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
575 chipPlan: item.chipPlan,
576 chipTags: item.chipTags,
577 itemIndex: itemIndex
578 }), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, {
579 variant: "body2",
580 color: "text.secondary",
581 sx: {
582 pb: 2
583 }
584 }, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
585 href: item.link,
586 color: "info.main",
587 target: "_blank"
588 }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, {
589 sx: {
590 pb: 2
591 }
592 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
593 href: item.ctaLink,
594 target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
595 variant: "contained",
596 size: "small",
597 color: "promotion",
598 onClick: item.ctaLink.startsWith('#') ? function () {
599 return setIsOpen(false);
600 } : function () {}
601 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
602 sx: {
603 my: 1
604 }
605 }));
606 };
607 WhatsNewItem.propTypes = {
608 item: PropTypes.object.isRequired,
609 itemIndex: PropTypes.number.isRequired,
610 itemsLength: PropTypes.number.isRequired,
611 setIsOpen: PropTypes.func.isRequired
612 };
613
614 /***/ }),
615
616 /***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js":
617 /*!**************************************************************************!*\
618 !*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***!
619 \**************************************************************************/
620 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
621
622 "use strict";
623 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
624
625
626 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
627 Object.defineProperty(exports, "__esModule", ({
628 value: true
629 }));
630 exports.WhatsNewTopBar = void 0;
631 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
632 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
633 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
634 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
635 var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
636 var setIsOpen = props.setIsOpen;
637 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
638 elevation: 0,
639 position: "sticky",
640 sx: {
641 backgroundColor: 'background.default'
642 }
643 }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, {
644 variant: "dense"
645 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
646 variant: "overline",
647 sx: {
648 flexGrow: 1
649 }
650 }, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
651 "aria-label": 'close',
652 size: "small",
653 onClick: function onClick() {
654 return setIsOpen(false);
655 }
656 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
657 };
658 WhatsNewTopBar.propTypes = {
659 setIsOpen: PropTypes.func.isRequired
660 };
661
662 /***/ }),
663
664 /***/ "../modules/notifications/assets/js/components/whats-new.js":
665 /*!******************************************************************!*\
666 !*** ../modules/notifications/assets/js/components/whats-new.js ***!
667 \******************************************************************/
668 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
669
670 "use strict";
671 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
672
673
674 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
675 Object.defineProperty(exports, "__esModule", ({
676 value: true
677 }));
678 exports.WhatsNew = void 0;
679 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
680 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
681 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
682 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
683 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
684 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
685 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
686 var queryClient = new _query.QueryClient({
687 defaultOptions: {
688 queries: {
689 refetchOnWindowFocus: false,
690 retry: false,
691 staleTime: 1000 * 60 * 30 // 30 minutes
692 }
693 }
694 });
695 var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
696 var _window$elementor, _window$elementor$get;
697 var isOpen = props.isOpen,
698 setIsOpen = props.setIsOpen,
699 setIsRead = props.setIsRead,
700 _props$anchorPosition = props.anchorPosition,
701 anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition;
702 (0, _react.useEffect)(function () {
703 if (!isOpen) {
704 return;
705 }
706 setIsRead(true);
707 }, [isOpen, setIsRead]);
708 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
709 client: queryClient
710 }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
711 rtl: elementorCommon.config.isRTL
712 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
713 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'
714 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
715 anchor: anchorPosition,
716 open: isOpen,
717 onClose: function onClose() {
718 return setIsOpen(false);
719 },
720 ModalProps: {
721 style: {
722 // Above the WordPress Admin Top Bar.
723 zIndex: 999999
724 }
725 }
726 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
727 sx: {
728 width: 320,
729 backgroundColor: 'background.default'
730 },
731 role: "presentation"
732 }, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, {
733 setIsOpen: setIsOpen
734 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
735 sx: {
736 padding: '16px'
737 }
738 }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
739 setIsOpen: setIsOpen
740 }))))))));
741 };
742 WhatsNew.propTypes = {
743 isOpen: PropTypes.bool.isRequired,
744 setIsOpen: PropTypes.func.isRequired,
745 setIsRead: PropTypes.func.isRequired,
746 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
747 };
748
749 /***/ }),
750
751 /***/ "../modules/notifications/assets/js/components/wrapper-with-link.js":
752 /*!**************************************************************************!*\
753 !*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***!
754 \**************************************************************************/
755 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
756
757 "use strict";
758 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
759
760
761 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
762 Object.defineProperty(exports, "__esModule", ({
763 value: true
764 }));
765 exports.WrapperWithLink = void 0;
766 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
767 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
768 var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
769 var link = props.link,
770 children = props.children;
771 if (!link) {
772 return children;
773 }
774 return /*#__PURE__*/_react.default.createElement(_ui.Link, {
775 href: link,
776 target: "_blank",
777 underline: "none",
778 color: "inherit",
779 sx: {
780 '&:hover': {
781 color: 'inherit'
782 }
783 }
784 }, children);
785 };
786 WrapperWithLink.propTypes = {
787 link: PropTypes.string,
788 children: PropTypes.any.isRequired
789 };
790
791 /***/ }),
792
793 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
794 /*!**********************************************************!*\
795 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
796 \**********************************************************/
797 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
798
799 "use strict";
800
801
802 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
803 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
804 Object.defineProperty(exports, "__esModule", ({
805 value: true
806 }));
807 exports.XIcon = void 0;
808 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
809 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
810 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
811 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
812 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
813 var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
814 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
815 viewBox: "0 0 24 24"
816 }, props, {
817 ref: ref
818 }), /*#__PURE__*/_react.default.createElement("path", {
819 fillRule: "evenodd",
820 clipRule: "evenodd",
821 d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
822 }), /*#__PURE__*/_react.default.createElement("path", {
823 fillRule: "evenodd",
824 clipRule: "evenodd",
825 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"
826 }));
827 });
828
829 /***/ }),
830
831 /***/ "../node_modules/object-assign/index.js":
832 /*!**********************************************!*\
833 !*** ../node_modules/object-assign/index.js ***!
834 \**********************************************/
835 /***/ ((module) => {
836
837 "use strict";
838 /*
839 object-assign
840 (c) Sindre Sorhus
841 @license MIT
842 */
843
844
845 /* eslint-disable no-unused-vars */
846 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
847 var hasOwnProperty = Object.prototype.hasOwnProperty;
848 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
849
850 function toObject(val) {
851 if (val === null || val === undefined) {
852 throw new TypeError('Object.assign cannot be called with null or undefined');
853 }
854
855 return Object(val);
856 }
857
858 function shouldUseNative() {
859 try {
860 if (!Object.assign) {
861 return false;
862 }
863
864 // Detect buggy property enumeration order in older V8 versions.
865
866 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
867 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
868 test1[5] = 'de';
869 if (Object.getOwnPropertyNames(test1)[0] === '5') {
870 return false;
871 }
872
873 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
874 var test2 = {};
875 for (var i = 0; i < 10; i++) {
876 test2['_' + String.fromCharCode(i)] = i;
877 }
878 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
879 return test2[n];
880 });
881 if (order2.join('') !== '0123456789') {
882 return false;
883 }
884
885 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
886 var test3 = {};
887 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
888 test3[letter] = letter;
889 });
890 if (Object.keys(Object.assign({}, test3)).join('') !==
891 'abcdefghijklmnopqrst') {
892 return false;
893 }
894
895 return true;
896 } catch (err) {
897 // We don't expect any of the above to throw, but better to be safe.
898 return false;
899 }
900 }
901
902 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
903 var from;
904 var to = toObject(target);
905 var symbols;
906
907 for (var s = 1; s < arguments.length; s++) {
908 from = Object(arguments[s]);
909
910 for (var key in from) {
911 if (hasOwnProperty.call(from, key)) {
912 to[key] = from[key];
913 }
914 }
915
916 if (getOwnPropertySymbols) {
917 symbols = getOwnPropertySymbols(from);
918 for (var i = 0; i < symbols.length; i++) {
919 if (propIsEnumerable.call(from, symbols[i])) {
920 to[symbols[i]] = from[symbols[i]];
921 }
922 }
923 }
924 }
925
926 return to;
927 };
928
929
930 /***/ }),
931
932 /***/ "../node_modules/prop-types/checkPropTypes.js":
933 /*!****************************************************!*\
934 !*** ../node_modules/prop-types/checkPropTypes.js ***!
935 \****************************************************/
936 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
937
938 "use strict";
939 /**
940 * Copyright (c) 2013-present, Facebook, Inc.
941 *
942 * This source code is licensed under the MIT license found in the
943 * LICENSE file in the root directory of this source tree.
944 */
945
946
947
948 var printWarning = function() {};
949
950 if (true) {
951 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
952 var loggedTypeFailures = {};
953 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
954
955 printWarning = function(text) {
956 var message = 'Warning: ' + text;
957 if (typeof console !== 'undefined') {
958 console.error(message);
959 }
960 try {
961 // --- Welcome to debugging React ---
962 // This error was thrown as a convenience so that you can use this stack
963 // to find the callsite that caused this warning to fire.
964 throw new Error(message);
965 } catch (x) { /**/ }
966 };
967 }
968
969 /**
970 * Assert that the values match with the type specs.
971 * Error messages are memorized and will only be shown once.
972 *
973 * @param {object} typeSpecs Map of name to a ReactPropType
974 * @param {object} values Runtime values that need to be type-checked
975 * @param {string} location e.g. "prop", "context", "child context"
976 * @param {string} componentName Name of the component for error messages.
977 * @param {?Function} getStack Returns the component stack.
978 * @private
979 */
980 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
981 if (true) {
982 for (var typeSpecName in typeSpecs) {
983 if (has(typeSpecs, typeSpecName)) {
984 var error;
985 // Prop type validation may throw. In case they do, we don't want to
986 // fail the render phase where it didn't fail before. So we log it.
987 // After these have been cleaned up, we'll let them throw.
988 try {
989 // This is intentionally an invariant that gets caught. It's the same
990 // behavior as without this statement except with a better message.
991 if (typeof typeSpecs[typeSpecName] !== 'function') {
992 var err = Error(
993 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
994 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
995 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
996 );
997 err.name = 'Invariant Violation';
998 throw err;
999 }
1000 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1001 } catch (ex) {
1002 error = ex;
1003 }
1004 if (error && !(error instanceof Error)) {
1005 printWarning(
1006 (componentName || 'React class') + ': type specification of ' +
1007 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1008 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1009 'You may have forgotten to pass an argument to the type checker ' +
1010 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1011 'shape all require an argument).'
1012 );
1013 }
1014 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1015 // Only monitor this failure once because there tends to be a lot of the
1016 // same error.
1017 loggedTypeFailures[error.message] = true;
1018
1019 var stack = getStack ? getStack() : '';
1020
1021 printWarning(
1022 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1023 );
1024 }
1025 }
1026 }
1027 }
1028 }
1029
1030 /**
1031 * Resets warning cache when testing.
1032 *
1033 * @private
1034 */
1035 checkPropTypes.resetWarningCache = function() {
1036 if (true) {
1037 loggedTypeFailures = {};
1038 }
1039 }
1040
1041 module.exports = checkPropTypes;
1042
1043
1044 /***/ }),
1045
1046 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
1047 /*!*************************************************************!*\
1048 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
1049 \*************************************************************/
1050 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1051
1052 "use strict";
1053 /**
1054 * Copyright (c) 2013-present, Facebook, Inc.
1055 *
1056 * This source code is licensed under the MIT license found in the
1057 * LICENSE file in the root directory of this source tree.
1058 */
1059
1060
1061
1062 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1063 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
1064
1065 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1066 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1067 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
1068
1069 var printWarning = function() {};
1070
1071 if (true) {
1072 printWarning = function(text) {
1073 var message = 'Warning: ' + text;
1074 if (typeof console !== 'undefined') {
1075 console.error(message);
1076 }
1077 try {
1078 // --- Welcome to debugging React ---
1079 // This error was thrown as a convenience so that you can use this stack
1080 // to find the callsite that caused this warning to fire.
1081 throw new Error(message);
1082 } catch (x) {}
1083 };
1084 }
1085
1086 function emptyFunctionThatReturnsNull() {
1087 return null;
1088 }
1089
1090 module.exports = function(isValidElement, throwOnDirectAccess) {
1091 /* global Symbol */
1092 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1093 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1094
1095 /**
1096 * Returns the iterator method function contained on the iterable object.
1097 *
1098 * Be sure to invoke the function with the iterable as context:
1099 *
1100 * var iteratorFn = getIteratorFn(myIterable);
1101 * if (iteratorFn) {
1102 * var iterator = iteratorFn.call(myIterable);
1103 * ...
1104 * }
1105 *
1106 * @param {?object} maybeIterable
1107 * @return {?function}
1108 */
1109 function getIteratorFn(maybeIterable) {
1110 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1111 if (typeof iteratorFn === 'function') {
1112 return iteratorFn;
1113 }
1114 }
1115
1116 /**
1117 * Collection of methods that allow declaration and validation of props that are
1118 * supplied to React components. Example usage:
1119 *
1120 * var Props = require('ReactPropTypes');
1121 * var MyArticle = React.createClass({
1122 * propTypes: {
1123 * // An optional string prop named "description".
1124 * description: Props.string,
1125 *
1126 * // A required enum prop named "category".
1127 * category: Props.oneOf(['News','Photos']).isRequired,
1128 *
1129 * // A prop named "dialog" that requires an instance of Dialog.
1130 * dialog: Props.instanceOf(Dialog).isRequired
1131 * },
1132 * render: function() { ... }
1133 * });
1134 *
1135 * A more formal specification of how these methods are used:
1136 *
1137 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1138 * decl := ReactPropTypes.{type}(.isRequired)?
1139 *
1140 * Each and every declaration produces a function with the same signature. This
1141 * allows the creation of custom validation functions. For example:
1142 *
1143 * var MyLink = React.createClass({
1144 * propTypes: {
1145 * // An optional string or URI prop named "href".
1146 * href: function(props, propName, componentName) {
1147 * var propValue = props[propName];
1148 * if (propValue != null && typeof propValue !== 'string' &&
1149 * !(propValue instanceof URI)) {
1150 * return new Error(
1151 * 'Expected a string or an URI for ' + propName + ' in ' +
1152 * componentName
1153 * );
1154 * }
1155 * }
1156 * },
1157 * render: function() {...}
1158 * });
1159 *
1160 * @internal
1161 */
1162
1163 var ANONYMOUS = '<<anonymous>>';
1164
1165 // Important!
1166 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1167 var ReactPropTypes = {
1168 array: createPrimitiveTypeChecker('array'),
1169 bigint: createPrimitiveTypeChecker('bigint'),
1170 bool: createPrimitiveTypeChecker('boolean'),
1171 func: createPrimitiveTypeChecker('function'),
1172 number: createPrimitiveTypeChecker('number'),
1173 object: createPrimitiveTypeChecker('object'),
1174 string: createPrimitiveTypeChecker('string'),
1175 symbol: createPrimitiveTypeChecker('symbol'),
1176
1177 any: createAnyTypeChecker(),
1178 arrayOf: createArrayOfTypeChecker,
1179 element: createElementTypeChecker(),
1180 elementType: createElementTypeTypeChecker(),
1181 instanceOf: createInstanceTypeChecker,
1182 node: createNodeChecker(),
1183 objectOf: createObjectOfTypeChecker,
1184 oneOf: createEnumTypeChecker,
1185 oneOfType: createUnionTypeChecker,
1186 shape: createShapeTypeChecker,
1187 exact: createStrictShapeTypeChecker,
1188 };
1189
1190 /**
1191 * inlined Object.is polyfill to avoid requiring consumers ship their own
1192 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1193 */
1194 /*eslint-disable no-self-compare*/
1195 function is(x, y) {
1196 // SameValue algorithm
1197 if (x === y) {
1198 // Steps 1-5, 7-10
1199 // Steps 6.b-6.e: +0 != -0
1200 return x !== 0 || 1 / x === 1 / y;
1201 } else {
1202 // Step 6.a: NaN == NaN
1203 return x !== x && y !== y;
1204 }
1205 }
1206 /*eslint-enable no-self-compare*/
1207
1208 /**
1209 * We use an Error-like object for backward compatibility as people may call
1210 * PropTypes directly and inspect their output. However, we don't use real
1211 * Errors anymore. We don't inspect their stack anyway, and creating them
1212 * is prohibitively expensive if they are created too often, such as what
1213 * happens in oneOfType() for any type before the one that matched.
1214 */
1215 function PropTypeError(message, data) {
1216 this.message = message;
1217 this.data = data && typeof data === 'object' ? data: {};
1218 this.stack = '';
1219 }
1220 // Make `instanceof Error` still work for returned errors.
1221 PropTypeError.prototype = Error.prototype;
1222
1223 function createChainableTypeChecker(validate) {
1224 if (true) {
1225 var manualPropTypeCallCache = {};
1226 var manualPropTypeWarningCount = 0;
1227 }
1228 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1229 componentName = componentName || ANONYMOUS;
1230 propFullName = propFullName || propName;
1231
1232 if (secret !== ReactPropTypesSecret) {
1233 if (throwOnDirectAccess) {
1234 // New behavior only for users of `prop-types` package
1235 var err = new Error(
1236 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1237 'Use `PropTypes.checkPropTypes()` to call them. ' +
1238 'Read more at http://fb.me/use-check-prop-types'
1239 );
1240 err.name = 'Invariant Violation';
1241 throw err;
1242 } else if ( true && typeof console !== 'undefined') {
1243 // Old behavior for people using React.PropTypes
1244 var cacheKey = componentName + ':' + propName;
1245 if (
1246 !manualPropTypeCallCache[cacheKey] &&
1247 // Avoid spamming the console because they are often not actionable except for lib authors
1248 manualPropTypeWarningCount < 3
1249 ) {
1250 printWarning(
1251 'You are manually calling a React.PropTypes validation ' +
1252 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1253 'and will throw in the standalone `prop-types` package. ' +
1254 'You may be seeing this warning due to a third-party PropTypes ' +
1255 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1256 );
1257 manualPropTypeCallCache[cacheKey] = true;
1258 manualPropTypeWarningCount++;
1259 }
1260 }
1261 }
1262 if (props[propName] == null) {
1263 if (isRequired) {
1264 if (props[propName] === null) {
1265 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1266 }
1267 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1268 }
1269 return null;
1270 } else {
1271 return validate(props, propName, componentName, location, propFullName);
1272 }
1273 }
1274
1275 var chainedCheckType = checkType.bind(null, false);
1276 chainedCheckType.isRequired = checkType.bind(null, true);
1277
1278 return chainedCheckType;
1279 }
1280
1281 function createPrimitiveTypeChecker(expectedType) {
1282 function validate(props, propName, componentName, location, propFullName, secret) {
1283 var propValue = props[propName];
1284 var propType = getPropType(propValue);
1285 if (propType !== expectedType) {
1286 // `propValue` being instance of, say, date/regexp, pass the 'object'
1287 // check, but we can offer a more precise error message here rather than
1288 // 'of type `object`'.
1289 var preciseType = getPreciseType(propValue);
1290
1291 return new PropTypeError(
1292 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1293 {expectedType: expectedType}
1294 );
1295 }
1296 return null;
1297 }
1298 return createChainableTypeChecker(validate);
1299 }
1300
1301 function createAnyTypeChecker() {
1302 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1303 }
1304
1305 function createArrayOfTypeChecker(typeChecker) {
1306 function validate(props, propName, componentName, location, propFullName) {
1307 if (typeof typeChecker !== 'function') {
1308 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1309 }
1310 var propValue = props[propName];
1311 if (!Array.isArray(propValue)) {
1312 var propType = getPropType(propValue);
1313 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1314 }
1315 for (var i = 0; i < propValue.length; i++) {
1316 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1317 if (error instanceof Error) {
1318 return error;
1319 }
1320 }
1321 return null;
1322 }
1323 return createChainableTypeChecker(validate);
1324 }
1325
1326 function createElementTypeChecker() {
1327 function validate(props, propName, componentName, location, propFullName) {
1328 var propValue = props[propName];
1329 if (!isValidElement(propValue)) {
1330 var propType = getPropType(propValue);
1331 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1332 }
1333 return null;
1334 }
1335 return createChainableTypeChecker(validate);
1336 }
1337
1338 function createElementTypeTypeChecker() {
1339 function validate(props, propName, componentName, location, propFullName) {
1340 var propValue = props[propName];
1341 if (!ReactIs.isValidElementType(propValue)) {
1342 var propType = getPropType(propValue);
1343 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1344 }
1345 return null;
1346 }
1347 return createChainableTypeChecker(validate);
1348 }
1349
1350 function createInstanceTypeChecker(expectedClass) {
1351 function validate(props, propName, componentName, location, propFullName) {
1352 if (!(props[propName] instanceof expectedClass)) {
1353 var expectedClassName = expectedClass.name || ANONYMOUS;
1354 var actualClassName = getClassName(props[propName]);
1355 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1356 }
1357 return null;
1358 }
1359 return createChainableTypeChecker(validate);
1360 }
1361
1362 function createEnumTypeChecker(expectedValues) {
1363 if (!Array.isArray(expectedValues)) {
1364 if (true) {
1365 if (arguments.length > 1) {
1366 printWarning(
1367 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1368 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1369 );
1370 } else {
1371 printWarning('Invalid argument supplied to oneOf, expected an array.');
1372 }
1373 }
1374 return emptyFunctionThatReturnsNull;
1375 }
1376
1377 function validate(props, propName, componentName, location, propFullName) {
1378 var propValue = props[propName];
1379 for (var i = 0; i < expectedValues.length; i++) {
1380 if (is(propValue, expectedValues[i])) {
1381 return null;
1382 }
1383 }
1384
1385 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1386 var type = getPreciseType(value);
1387 if (type === 'symbol') {
1388 return String(value);
1389 }
1390 return value;
1391 });
1392 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1393 }
1394 return createChainableTypeChecker(validate);
1395 }
1396
1397 function createObjectOfTypeChecker(typeChecker) {
1398 function validate(props, propName, componentName, location, propFullName) {
1399 if (typeof typeChecker !== 'function') {
1400 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1401 }
1402 var propValue = props[propName];
1403 var propType = getPropType(propValue);
1404 if (propType !== 'object') {
1405 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1406 }
1407 for (var key in propValue) {
1408 if (has(propValue, key)) {
1409 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1410 if (error instanceof Error) {
1411 return error;
1412 }
1413 }
1414 }
1415 return null;
1416 }
1417 return createChainableTypeChecker(validate);
1418 }
1419
1420 function createUnionTypeChecker(arrayOfTypeCheckers) {
1421 if (!Array.isArray(arrayOfTypeCheckers)) {
1422 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1423 return emptyFunctionThatReturnsNull;
1424 }
1425
1426 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1427 var checker = arrayOfTypeCheckers[i];
1428 if (typeof checker !== 'function') {
1429 printWarning(
1430 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1431 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1432 );
1433 return emptyFunctionThatReturnsNull;
1434 }
1435 }
1436
1437 function validate(props, propName, componentName, location, propFullName) {
1438 var expectedTypes = [];
1439 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1440 var checker = arrayOfTypeCheckers[i];
1441 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1442 if (checkerResult == null) {
1443 return null;
1444 }
1445 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1446 expectedTypes.push(checkerResult.data.expectedType);
1447 }
1448 }
1449 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1450 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1451 }
1452 return createChainableTypeChecker(validate);
1453 }
1454
1455 function createNodeChecker() {
1456 function validate(props, propName, componentName, location, propFullName) {
1457 if (!isNode(props[propName])) {
1458 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1459 }
1460 return null;
1461 }
1462 return createChainableTypeChecker(validate);
1463 }
1464
1465 function invalidValidatorError(componentName, location, propFullName, key, type) {
1466 return new PropTypeError(
1467 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1468 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1469 );
1470 }
1471
1472 function createShapeTypeChecker(shapeTypes) {
1473 function validate(props, propName, componentName, location, propFullName) {
1474 var propValue = props[propName];
1475 var propType = getPropType(propValue);
1476 if (propType !== 'object') {
1477 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1478 }
1479 for (var key in shapeTypes) {
1480 var checker = shapeTypes[key];
1481 if (typeof checker !== 'function') {
1482 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1483 }
1484 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1485 if (error) {
1486 return error;
1487 }
1488 }
1489 return null;
1490 }
1491 return createChainableTypeChecker(validate);
1492 }
1493
1494 function createStrictShapeTypeChecker(shapeTypes) {
1495 function validate(props, propName, componentName, location, propFullName) {
1496 var propValue = props[propName];
1497 var propType = getPropType(propValue);
1498 if (propType !== 'object') {
1499 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1500 }
1501 // We need to check all keys in case some are required but missing from props.
1502 var allKeys = assign({}, props[propName], shapeTypes);
1503 for (var key in allKeys) {
1504 var checker = shapeTypes[key];
1505 if (has(shapeTypes, key) && typeof checker !== 'function') {
1506 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1507 }
1508 if (!checker) {
1509 return new PropTypeError(
1510 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1511 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1512 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1513 );
1514 }
1515 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1516 if (error) {
1517 return error;
1518 }
1519 }
1520 return null;
1521 }
1522
1523 return createChainableTypeChecker(validate);
1524 }
1525
1526 function isNode(propValue) {
1527 switch (typeof propValue) {
1528 case 'number':
1529 case 'string':
1530 case 'undefined':
1531 return true;
1532 case 'boolean':
1533 return !propValue;
1534 case 'object':
1535 if (Array.isArray(propValue)) {
1536 return propValue.every(isNode);
1537 }
1538 if (propValue === null || isValidElement(propValue)) {
1539 return true;
1540 }
1541
1542 var iteratorFn = getIteratorFn(propValue);
1543 if (iteratorFn) {
1544 var iterator = iteratorFn.call(propValue);
1545 var step;
1546 if (iteratorFn !== propValue.entries) {
1547 while (!(step = iterator.next()).done) {
1548 if (!isNode(step.value)) {
1549 return false;
1550 }
1551 }
1552 } else {
1553 // Iterator will provide entry [k,v] tuples rather than values.
1554 while (!(step = iterator.next()).done) {
1555 var entry = step.value;
1556 if (entry) {
1557 if (!isNode(entry[1])) {
1558 return false;
1559 }
1560 }
1561 }
1562 }
1563 } else {
1564 return false;
1565 }
1566
1567 return true;
1568 default:
1569 return false;
1570 }
1571 }
1572
1573 function isSymbol(propType, propValue) {
1574 // Native Symbol.
1575 if (propType === 'symbol') {
1576 return true;
1577 }
1578
1579 // falsy value can't be a Symbol
1580 if (!propValue) {
1581 return false;
1582 }
1583
1584 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1585 if (propValue['@@toStringTag'] === 'Symbol') {
1586 return true;
1587 }
1588
1589 // Fallback for non-spec compliant Symbols which are polyfilled.
1590 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1591 return true;
1592 }
1593
1594 return false;
1595 }
1596
1597 // Equivalent of `typeof` but with special handling for array and regexp.
1598 function getPropType(propValue) {
1599 var propType = typeof propValue;
1600 if (Array.isArray(propValue)) {
1601 return 'array';
1602 }
1603 if (propValue instanceof RegExp) {
1604 // Old webkits (at least until Android 4.0) return 'function' rather than
1605 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1606 // passes PropTypes.object.
1607 return 'object';
1608 }
1609 if (isSymbol(propType, propValue)) {
1610 return 'symbol';
1611 }
1612 return propType;
1613 }
1614
1615 // This handles more types than `getPropType`. Only used for error messages.
1616 // See `createPrimitiveTypeChecker`.
1617 function getPreciseType(propValue) {
1618 if (typeof propValue === 'undefined' || propValue === null) {
1619 return '' + propValue;
1620 }
1621 var propType = getPropType(propValue);
1622 if (propType === 'object') {
1623 if (propValue instanceof Date) {
1624 return 'date';
1625 } else if (propValue instanceof RegExp) {
1626 return 'regexp';
1627 }
1628 }
1629 return propType;
1630 }
1631
1632 // Returns a string that is postfixed to a warning about an invalid type.
1633 // For example, "undefined" or "of type array"
1634 function getPostfixForTypeWarning(value) {
1635 var type = getPreciseType(value);
1636 switch (type) {
1637 case 'array':
1638 case 'object':
1639 return 'an ' + type;
1640 case 'boolean':
1641 case 'date':
1642 case 'regexp':
1643 return 'a ' + type;
1644 default:
1645 return type;
1646 }
1647 }
1648
1649 // Returns class name of the object, if any.
1650 function getClassName(propValue) {
1651 if (!propValue.constructor || !propValue.constructor.name) {
1652 return ANONYMOUS;
1653 }
1654 return propValue.constructor.name;
1655 }
1656
1657 ReactPropTypes.checkPropTypes = checkPropTypes;
1658 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1659 ReactPropTypes.PropTypes = ReactPropTypes;
1660
1661 return ReactPropTypes;
1662 };
1663
1664
1665 /***/ }),
1666
1667 /***/ "../node_modules/prop-types/index.js":
1668 /*!*******************************************!*\
1669 !*** ../node_modules/prop-types/index.js ***!
1670 \*******************************************/
1671 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1672
1673 /**
1674 * Copyright (c) 2013-present, Facebook, Inc.
1675 *
1676 * This source code is licensed under the MIT license found in the
1677 * LICENSE file in the root directory of this source tree.
1678 */
1679
1680 if (true) {
1681 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1682
1683 // By explicitly using `prop-types` you are opting into new development behavior.
1684 // http://fb.me/prop-types-in-prod
1685 var throwOnDirectAccess = true;
1686 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1687 } else {}
1688
1689
1690 /***/ }),
1691
1692 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1693 /*!**************************************************************!*\
1694 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1695 \**************************************************************/
1696 /***/ ((module) => {
1697
1698 "use strict";
1699 /**
1700 * Copyright (c) 2013-present, Facebook, Inc.
1701 *
1702 * This source code is licensed under the MIT license found in the
1703 * LICENSE file in the root directory of this source tree.
1704 */
1705
1706
1707
1708 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1709
1710 module.exports = ReactPropTypesSecret;
1711
1712
1713 /***/ }),
1714
1715 /***/ "../node_modules/prop-types/lib/has.js":
1716 /*!*********************************************!*\
1717 !*** ../node_modules/prop-types/lib/has.js ***!
1718 \*********************************************/
1719 /***/ ((module) => {
1720
1721 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1722
1723
1724 /***/ }),
1725
1726 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1727 /*!************************************************************************************!*\
1728 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1729 \************************************************************************************/
1730 /***/ ((__unused_webpack_module, exports) => {
1731
1732 "use strict";
1733 /** @license React v16.13.1
1734 * react-is.development.js
1735 *
1736 * Copyright (c) Facebook, Inc. and its affiliates.
1737 *
1738 * This source code is licensed under the MIT license found in the
1739 * LICENSE file in the root directory of this source tree.
1740 */
1741
1742
1743
1744
1745
1746 if (true) {
1747 (function() {
1748 'use strict';
1749
1750 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1751 // nor polyfill, then a plain number is used for performance.
1752 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1753 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1754 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1755 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1756 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1757 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1758 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1759 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1760 // (unstable) APIs that have been removed. Can we remove the symbols?
1761
1762 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1763 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1764 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1765 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1766 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1767 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1768 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1769 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1770 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1771 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1772 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1773
1774 function isValidElementType(type) {
1775 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1776 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1777 }
1778
1779 function typeOf(object) {
1780 if (typeof object === 'object' && object !== null) {
1781 var $$typeof = object.$$typeof;
1782
1783 switch ($$typeof) {
1784 case REACT_ELEMENT_TYPE:
1785 var type = object.type;
1786
1787 switch (type) {
1788 case REACT_ASYNC_MODE_TYPE:
1789 case REACT_CONCURRENT_MODE_TYPE:
1790 case REACT_FRAGMENT_TYPE:
1791 case REACT_PROFILER_TYPE:
1792 case REACT_STRICT_MODE_TYPE:
1793 case REACT_SUSPENSE_TYPE:
1794 return type;
1795
1796 default:
1797 var $$typeofType = type && type.$$typeof;
1798
1799 switch ($$typeofType) {
1800 case REACT_CONTEXT_TYPE:
1801 case REACT_FORWARD_REF_TYPE:
1802 case REACT_LAZY_TYPE:
1803 case REACT_MEMO_TYPE:
1804 case REACT_PROVIDER_TYPE:
1805 return $$typeofType;
1806
1807 default:
1808 return $$typeof;
1809 }
1810
1811 }
1812
1813 case REACT_PORTAL_TYPE:
1814 return $$typeof;
1815 }
1816 }
1817
1818 return undefined;
1819 } // AsyncMode is deprecated along with isAsyncMode
1820
1821 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1822 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1823 var ContextConsumer = REACT_CONTEXT_TYPE;
1824 var ContextProvider = REACT_PROVIDER_TYPE;
1825 var Element = REACT_ELEMENT_TYPE;
1826 var ForwardRef = REACT_FORWARD_REF_TYPE;
1827 var Fragment = REACT_FRAGMENT_TYPE;
1828 var Lazy = REACT_LAZY_TYPE;
1829 var Memo = REACT_MEMO_TYPE;
1830 var Portal = REACT_PORTAL_TYPE;
1831 var Profiler = REACT_PROFILER_TYPE;
1832 var StrictMode = REACT_STRICT_MODE_TYPE;
1833 var Suspense = REACT_SUSPENSE_TYPE;
1834 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1835
1836 function isAsyncMode(object) {
1837 {
1838 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1839 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1840
1841 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1842 }
1843 }
1844
1845 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1846 }
1847 function isConcurrentMode(object) {
1848 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1849 }
1850 function isContextConsumer(object) {
1851 return typeOf(object) === REACT_CONTEXT_TYPE;
1852 }
1853 function isContextProvider(object) {
1854 return typeOf(object) === REACT_PROVIDER_TYPE;
1855 }
1856 function isElement(object) {
1857 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1858 }
1859 function isForwardRef(object) {
1860 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1861 }
1862 function isFragment(object) {
1863 return typeOf(object) === REACT_FRAGMENT_TYPE;
1864 }
1865 function isLazy(object) {
1866 return typeOf(object) === REACT_LAZY_TYPE;
1867 }
1868 function isMemo(object) {
1869 return typeOf(object) === REACT_MEMO_TYPE;
1870 }
1871 function isPortal(object) {
1872 return typeOf(object) === REACT_PORTAL_TYPE;
1873 }
1874 function isProfiler(object) {
1875 return typeOf(object) === REACT_PROFILER_TYPE;
1876 }
1877 function isStrictMode(object) {
1878 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1879 }
1880 function isSuspense(object) {
1881 return typeOf(object) === REACT_SUSPENSE_TYPE;
1882 }
1883
1884 exports.AsyncMode = AsyncMode;
1885 exports.ConcurrentMode = ConcurrentMode;
1886 exports.ContextConsumer = ContextConsumer;
1887 exports.ContextProvider = ContextProvider;
1888 exports.Element = Element;
1889 exports.ForwardRef = ForwardRef;
1890 exports.Fragment = Fragment;
1891 exports.Lazy = Lazy;
1892 exports.Memo = Memo;
1893 exports.Portal = Portal;
1894 exports.Profiler = Profiler;
1895 exports.StrictMode = StrictMode;
1896 exports.Suspense = Suspense;
1897 exports.isAsyncMode = isAsyncMode;
1898 exports.isConcurrentMode = isConcurrentMode;
1899 exports.isContextConsumer = isContextConsumer;
1900 exports.isContextProvider = isContextProvider;
1901 exports.isElement = isElement;
1902 exports.isForwardRef = isForwardRef;
1903 exports.isFragment = isFragment;
1904 exports.isLazy = isLazy;
1905 exports.isMemo = isMemo;
1906 exports.isPortal = isPortal;
1907 exports.isProfiler = isProfiler;
1908 exports.isStrictMode = isStrictMode;
1909 exports.isSuspense = isSuspense;
1910 exports.isValidElementType = isValidElementType;
1911 exports.typeOf = typeOf;
1912 })();
1913 }
1914
1915
1916 /***/ }),
1917
1918 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
1919 /*!*****************************************************************!*\
1920 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
1921 \*****************************************************************/
1922 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1923
1924 "use strict";
1925
1926
1927 if (false) {} else {
1928 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1929 }
1930
1931
1932 /***/ }),
1933
1934 /***/ "../node_modules/react-dom/client.js":
1935 /*!*******************************************!*\
1936 !*** ../node_modules/react-dom/client.js ***!
1937 \*******************************************/
1938 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1939
1940 "use strict";
1941
1942
1943 var m = __webpack_require__(/*! react-dom */ "react-dom");
1944 if (false) {} else {
1945 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1946 exports.createRoot = function(c, o) {
1947 i.usingClientEntryPoint = true;
1948 try {
1949 return m.createRoot(c, o);
1950 } finally {
1951 i.usingClientEntryPoint = false;
1952 }
1953 };
1954 exports.hydrateRoot = function(c, h, o) {
1955 i.usingClientEntryPoint = true;
1956 try {
1957 return m.hydrateRoot(c, h, o);
1958 } finally {
1959 i.usingClientEntryPoint = false;
1960 }
1961 };
1962 }
1963
1964
1965 /***/ }),
1966
1967 /***/ "../node_modules/react/cjs/react-jsx-runtime.development.js":
1968 /*!******************************************************************!*\
1969 !*** ../node_modules/react/cjs/react-jsx-runtime.development.js ***!
1970 \******************************************************************/
1971 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1972
1973 "use strict";
1974 /**
1975 * @license React
1976 * react-jsx-runtime.development.js
1977 *
1978 * Copyright (c) Facebook, Inc. and its affiliates.
1979 *
1980 * This source code is licensed under the MIT license found in the
1981 * LICENSE file in the root directory of this source tree.
1982 */
1983
1984
1985
1986 if (true) {
1987 (function() {
1988 'use strict';
1989
1990 var React = __webpack_require__(/*! react */ "react");
1991
1992 // ATTENTION
1993 // When adding new symbols to this file,
1994 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1995 // The Symbol used to tag the ReactElement-like types.
1996 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
1997 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
1998 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
1999 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
2000 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
2001 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
2002 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
2003 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
2004 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
2005 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
2006 var REACT_MEMO_TYPE = Symbol.for('react.memo');
2007 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
2008 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
2009 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2010 var FAUX_ITERATOR_SYMBOL = '@@iterator';
2011 function getIteratorFn(maybeIterable) {
2012 if (maybeIterable === null || typeof maybeIterable !== 'object') {
2013 return null;
2014 }
2015
2016 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2017
2018 if (typeof maybeIterator === 'function') {
2019 return maybeIterator;
2020 }
2021
2022 return null;
2023 }
2024
2025 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2026
2027 function error(format) {
2028 {
2029 {
2030 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2031 args[_key2 - 1] = arguments[_key2];
2032 }
2033
2034 printWarning('error', format, args);
2035 }
2036 }
2037 }
2038
2039 function printWarning(level, format, args) {
2040 // When changing this logic, you might want to also
2041 // update consoleWithStackDev.www.js as well.
2042 {
2043 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2044 var stack = ReactDebugCurrentFrame.getStackAddendum();
2045
2046 if (stack !== '') {
2047 format += '%s';
2048 args = args.concat([stack]);
2049 } // eslint-disable-next-line react-internal/safe-string-coercion
2050
2051
2052 var argsWithFormat = args.map(function (item) {
2053 return String(item);
2054 }); // Careful: RN currently depends on this prefix
2055
2056 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
2057 // breaks IE9: https://github.com/facebook/react/issues/13610
2058 // eslint-disable-next-line react-internal/no-production-logging
2059
2060 Function.prototype.apply.call(console[level], console, argsWithFormat);
2061 }
2062 }
2063
2064 // -----------------------------------------------------------------------------
2065
2066 var enableScopeAPI = false; // Experimental Create Event Handle API.
2067 var enableCacheElement = false;
2068 var enableTransitionTracing = false; // No known bugs, but needs performance testing
2069
2070 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
2071 // stuff. Intended to enable React core members to more easily debug scheduling
2072 // issues in DEV builds.
2073
2074 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
2075
2076 var REACT_MODULE_REFERENCE;
2077
2078 {
2079 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
2080 }
2081
2082 function isValidElementType(type) {
2083 if (typeof type === 'string' || typeof type === 'function') {
2084 return true;
2085 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
2086
2087
2088 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
2089 return true;
2090 }
2091
2092 if (typeof type === 'object' && type !== null) {
2093 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
2094 // types supported by any Flight configuration anywhere since
2095 // we don't know which Flight build this will end up being used
2096 // with.
2097 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
2098 return true;
2099 }
2100 }
2101
2102 return false;
2103 }
2104
2105 function getWrappedName(outerType, innerType, wrapperName) {
2106 var displayName = outerType.displayName;
2107
2108 if (displayName) {
2109 return displayName;
2110 }
2111
2112 var functionName = innerType.displayName || innerType.name || '';
2113 return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
2114 } // Keep in sync with react-reconciler/getComponentNameFromFiber
2115
2116
2117 function getContextName(type) {
2118 return type.displayName || 'Context';
2119 } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
2120
2121
2122 function getComponentNameFromType(type) {
2123 if (type == null) {
2124 // Host root, text node or just invalid type.
2125 return null;
2126 }
2127
2128 {
2129 if (typeof type.tag === 'number') {
2130 error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
2131 }
2132 }
2133
2134 if (typeof type === 'function') {
2135 return type.displayName || type.name || null;
2136 }
2137
2138 if (typeof type === 'string') {
2139 return type;
2140 }
2141
2142 switch (type) {
2143 case REACT_FRAGMENT_TYPE:
2144 return 'Fragment';
2145
2146 case REACT_PORTAL_TYPE:
2147 return 'Portal';
2148
2149 case REACT_PROFILER_TYPE:
2150 return 'Profiler';
2151
2152 case REACT_STRICT_MODE_TYPE:
2153 return 'StrictMode';
2154
2155 case REACT_SUSPENSE_TYPE:
2156 return 'Suspense';
2157
2158 case REACT_SUSPENSE_LIST_TYPE:
2159 return 'SuspenseList';
2160
2161 }
2162
2163 if (typeof type === 'object') {
2164 switch (type.$$typeof) {
2165 case REACT_CONTEXT_TYPE:
2166 var context = type;
2167 return getContextName(context) + '.Consumer';
2168
2169 case REACT_PROVIDER_TYPE:
2170 var provider = type;
2171 return getContextName(provider._context) + '.Provider';
2172
2173 case REACT_FORWARD_REF_TYPE:
2174 return getWrappedName(type, type.render, 'ForwardRef');
2175
2176 case REACT_MEMO_TYPE:
2177 var outerName = type.displayName || null;
2178
2179 if (outerName !== null) {
2180 return outerName;
2181 }
2182
2183 return getComponentNameFromType(type.type) || 'Memo';
2184
2185 case REACT_LAZY_TYPE:
2186 {
2187 var lazyComponent = type;
2188 var payload = lazyComponent._payload;
2189 var init = lazyComponent._init;
2190
2191 try {
2192 return getComponentNameFromType(init(payload));
2193 } catch (x) {
2194 return null;
2195 }
2196 }
2197
2198 // eslint-disable-next-line no-fallthrough
2199 }
2200 }
2201
2202 return null;
2203 }
2204
2205 var assign = Object.assign;
2206
2207 // Helpers to patch console.logs to avoid logging during side-effect free
2208 // replaying on render function. This currently only patches the object
2209 // lazily which won't cover if the log function was extracted eagerly.
2210 // We could also eagerly patch the method.
2211 var disabledDepth = 0;
2212 var prevLog;
2213 var prevInfo;
2214 var prevWarn;
2215 var prevError;
2216 var prevGroup;
2217 var prevGroupCollapsed;
2218 var prevGroupEnd;
2219
2220 function disabledLog() {}
2221
2222 disabledLog.__reactDisabledLog = true;
2223 function disableLogs() {
2224 {
2225 if (disabledDepth === 0) {
2226 /* eslint-disable react-internal/no-production-logging */
2227 prevLog = console.log;
2228 prevInfo = console.info;
2229 prevWarn = console.warn;
2230 prevError = console.error;
2231 prevGroup = console.group;
2232 prevGroupCollapsed = console.groupCollapsed;
2233 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
2234
2235 var props = {
2236 configurable: true,
2237 enumerable: true,
2238 value: disabledLog,
2239 writable: true
2240 }; // $FlowFixMe Flow thinks console is immutable.
2241
2242 Object.defineProperties(console, {
2243 info: props,
2244 log: props,
2245 warn: props,
2246 error: props,
2247 group: props,
2248 groupCollapsed: props,
2249 groupEnd: props
2250 });
2251 /* eslint-enable react-internal/no-production-logging */
2252 }
2253
2254 disabledDepth++;
2255 }
2256 }
2257 function reenableLogs() {
2258 {
2259 disabledDepth--;
2260
2261 if (disabledDepth === 0) {
2262 /* eslint-disable react-internal/no-production-logging */
2263 var props = {
2264 configurable: true,
2265 enumerable: true,
2266 writable: true
2267 }; // $FlowFixMe Flow thinks console is immutable.
2268
2269 Object.defineProperties(console, {
2270 log: assign({}, props, {
2271 value: prevLog
2272 }),
2273 info: assign({}, props, {
2274 value: prevInfo
2275 }),
2276 warn: assign({}, props, {
2277 value: prevWarn
2278 }),
2279 error: assign({}, props, {
2280 value: prevError
2281 }),
2282 group: assign({}, props, {
2283 value: prevGroup
2284 }),
2285 groupCollapsed: assign({}, props, {
2286 value: prevGroupCollapsed
2287 }),
2288 groupEnd: assign({}, props, {
2289 value: prevGroupEnd
2290 })
2291 });
2292 /* eslint-enable react-internal/no-production-logging */
2293 }
2294
2295 if (disabledDepth < 0) {
2296 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
2297 }
2298 }
2299 }
2300
2301 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2302 var prefix;
2303 function describeBuiltInComponentFrame(name, source, ownerFn) {
2304 {
2305 if (prefix === undefined) {
2306 // Extract the VM specific prefix used by each line.
2307 try {
2308 throw Error();
2309 } catch (x) {
2310 var match = x.stack.trim().match(/\n( *(at )?)/);
2311 prefix = match && match[1] || '';
2312 }
2313 } // We use the prefix to ensure our stacks line up with native stack frames.
2314
2315
2316 return '\n' + prefix + name;
2317 }
2318 }
2319 var reentry = false;
2320 var componentFrameCache;
2321
2322 {
2323 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
2324 componentFrameCache = new PossiblyWeakMap();
2325 }
2326
2327 function describeNativeComponentFrame(fn, construct) {
2328 // If something asked for a stack inside a fake render, it should get ignored.
2329 if ( !fn || reentry) {
2330 return '';
2331 }
2332
2333 {
2334 var frame = componentFrameCache.get(fn);
2335
2336 if (frame !== undefined) {
2337 return frame;
2338 }
2339 }
2340
2341 var control;
2342 reentry = true;
2343 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
2344
2345 Error.prepareStackTrace = undefined;
2346 var previousDispatcher;
2347
2348 {
2349 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
2350 // for warnings.
2351
2352 ReactCurrentDispatcher.current = null;
2353 disableLogs();
2354 }
2355
2356 try {
2357 // This should throw.
2358 if (construct) {
2359 // Something should be setting the props in the constructor.
2360 var Fake = function () {
2361 throw Error();
2362 }; // $FlowFixMe
2363
2364
2365 Object.defineProperty(Fake.prototype, 'props', {
2366 set: function () {
2367 // We use a throwing setter instead of frozen or non-writable props
2368 // because that won't throw in a non-strict mode function.
2369 throw Error();
2370 }
2371 });
2372
2373 if (typeof Reflect === 'object' && Reflect.construct) {
2374 // We construct a different control for this case to include any extra
2375 // frames added by the construct call.
2376 try {
2377 Reflect.construct(Fake, []);
2378 } catch (x) {
2379 control = x;
2380 }
2381
2382 Reflect.construct(fn, [], Fake);
2383 } else {
2384 try {
2385 Fake.call();
2386 } catch (x) {
2387 control = x;
2388 }
2389
2390 fn.call(Fake.prototype);
2391 }
2392 } else {
2393 try {
2394 throw Error();
2395 } catch (x) {
2396 control = x;
2397 }
2398
2399 fn();
2400 }
2401 } catch (sample) {
2402 // This is inlined manually because closure doesn't do it for us.
2403 if (sample && control && typeof sample.stack === 'string') {
2404 // This extracts the first frame from the sample that isn't also in the control.
2405 // Skipping one frame that we assume is the frame that calls the two.
2406 var sampleLines = sample.stack.split('\n');
2407 var controlLines = control.stack.split('\n');
2408 var s = sampleLines.length - 1;
2409 var c = controlLines.length - 1;
2410
2411 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2412 // We expect at least one stack frame to be shared.
2413 // Typically this will be the root most one. However, stack frames may be
2414 // cut off due to maximum stack limits. In this case, one maybe cut off
2415 // earlier than the other. We assume that the sample is longer or the same
2416 // and there for cut off earlier. So we should find the root most frame in
2417 // the sample somewhere in the control.
2418 c--;
2419 }
2420
2421 for (; s >= 1 && c >= 0; s--, c--) {
2422 // Next we find the first one that isn't the same which should be the
2423 // frame that called our sample function and the control.
2424 if (sampleLines[s] !== controlLines[c]) {
2425 // In V8, the first line is describing the message but other VMs don't.
2426 // If we're about to return the first line, and the control is also on the same
2427 // line, that's a pretty good indicator that our sample threw at same line as
2428 // the control. I.e. before we entered the sample frame. So we ignore this result.
2429 // This can happen if you passed a class to function component, or non-function.
2430 if (s !== 1 || c !== 1) {
2431 do {
2432 s--;
2433 c--; // We may still have similar intermediate frames from the construct call.
2434 // The next one that isn't the same should be our match though.
2435
2436 if (c < 0 || sampleLines[s] !== controlLines[c]) {
2437 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
2438 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
2439 // but we have a user-provided "displayName"
2440 // splice it in to make the stack more readable.
2441
2442
2443 if (fn.displayName && _frame.includes('<anonymous>')) {
2444 _frame = _frame.replace('<anonymous>', fn.displayName);
2445 }
2446
2447 {
2448 if (typeof fn === 'function') {
2449 componentFrameCache.set(fn, _frame);
2450 }
2451 } // Return the line we found.
2452
2453
2454 return _frame;
2455 }
2456 } while (s >= 1 && c >= 0);
2457 }
2458
2459 break;
2460 }
2461 }
2462 }
2463 } finally {
2464 reentry = false;
2465
2466 {
2467 ReactCurrentDispatcher.current = previousDispatcher;
2468 reenableLogs();
2469 }
2470
2471 Error.prepareStackTrace = previousPrepareStackTrace;
2472 } // Fallback to just using the name if we couldn't make it throw.
2473
2474
2475 var name = fn ? fn.displayName || fn.name : '';
2476 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
2477
2478 {
2479 if (typeof fn === 'function') {
2480 componentFrameCache.set(fn, syntheticFrame);
2481 }
2482 }
2483
2484 return syntheticFrame;
2485 }
2486 function describeFunctionComponentFrame(fn, source, ownerFn) {
2487 {
2488 return describeNativeComponentFrame(fn, false);
2489 }
2490 }
2491
2492 function shouldConstruct(Component) {
2493 var prototype = Component.prototype;
2494 return !!(prototype && prototype.isReactComponent);
2495 }
2496
2497 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2498
2499 if (type == null) {
2500 return '';
2501 }
2502
2503 if (typeof type === 'function') {
2504 {
2505 return describeNativeComponentFrame(type, shouldConstruct(type));
2506 }
2507 }
2508
2509 if (typeof type === 'string') {
2510 return describeBuiltInComponentFrame(type);
2511 }
2512
2513 switch (type) {
2514 case REACT_SUSPENSE_TYPE:
2515 return describeBuiltInComponentFrame('Suspense');
2516
2517 case REACT_SUSPENSE_LIST_TYPE:
2518 return describeBuiltInComponentFrame('SuspenseList');
2519 }
2520
2521 if (typeof type === 'object') {
2522 switch (type.$$typeof) {
2523 case REACT_FORWARD_REF_TYPE:
2524 return describeFunctionComponentFrame(type.render);
2525
2526 case REACT_MEMO_TYPE:
2527 // Memo may contain any component type so we recursively resolve it.
2528 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2529
2530 case REACT_LAZY_TYPE:
2531 {
2532 var lazyComponent = type;
2533 var payload = lazyComponent._payload;
2534 var init = lazyComponent._init;
2535
2536 try {
2537 // Lazy may contain any component type so we recursively resolve it.
2538 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2539 } catch (x) {}
2540 }
2541 }
2542 }
2543
2544 return '';
2545 }
2546
2547 var hasOwnProperty = Object.prototype.hasOwnProperty;
2548
2549 var loggedTypeFailures = {};
2550 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2551
2552 function setCurrentlyValidatingElement(element) {
2553 {
2554 if (element) {
2555 var owner = element._owner;
2556 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2557 ReactDebugCurrentFrame.setExtraStackFrame(stack);
2558 } else {
2559 ReactDebugCurrentFrame.setExtraStackFrame(null);
2560 }
2561 }
2562 }
2563
2564 function checkPropTypes(typeSpecs, values, location, componentName, element) {
2565 {
2566 // $FlowFixMe This is okay but Flow doesn't know it.
2567 var has = Function.call.bind(hasOwnProperty);
2568
2569 for (var typeSpecName in typeSpecs) {
2570 if (has(typeSpecs, typeSpecName)) {
2571 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2572 // fail the render phase where it didn't fail before. So we log it.
2573 // After these have been cleaned up, we'll let them throw.
2574
2575 try {
2576 // This is intentionally an invariant that gets caught. It's the same
2577 // behavior as without this statement except with a better message.
2578 if (typeof typeSpecs[typeSpecName] !== 'function') {
2579 // eslint-disable-next-line react-internal/prod-error-codes
2580 var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
2581 err.name = 'Invariant Violation';
2582 throw err;
2583 }
2584
2585 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2586 } catch (ex) {
2587 error$1 = ex;
2588 }
2589
2590 if (error$1 && !(error$1 instanceof Error)) {
2591 setCurrentlyValidatingElement(element);
2592
2593 error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
2594
2595 setCurrentlyValidatingElement(null);
2596 }
2597
2598 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2599 // Only monitor this failure once because there tends to be a lot of the
2600 // same error.
2601 loggedTypeFailures[error$1.message] = true;
2602 setCurrentlyValidatingElement(element);
2603
2604 error('Failed %s type: %s', location, error$1.message);
2605
2606 setCurrentlyValidatingElement(null);
2607 }
2608 }
2609 }
2610 }
2611 }
2612
2613 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
2614
2615 function isArray(a) {
2616 return isArrayImpl(a);
2617 }
2618
2619 /*
2620 * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
2621 * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
2622 *
2623 * The functions in this module will throw an easier-to-understand,
2624 * easier-to-debug exception with a clear errors message message explaining the
2625 * problem. (Instead of a confusing exception thrown inside the implementation
2626 * of the `value` object).
2627 */
2628 // $FlowFixMe only called in DEV, so void return is not possible.
2629 function typeName(value) {
2630 {
2631 // toStringTag is needed for namespaced types like Temporal.Instant
2632 var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
2633 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
2634 return type;
2635 }
2636 } // $FlowFixMe only called in DEV, so void return is not possible.
2637
2638
2639 function willCoercionThrow(value) {
2640 {
2641 try {
2642 testStringCoercion(value);
2643 return false;
2644 } catch (e) {
2645 return true;
2646 }
2647 }
2648 }
2649
2650 function testStringCoercion(value) {
2651 // If you ended up here by following an exception call stack, here's what's
2652 // happened: you supplied an object or symbol value to React (as a prop, key,
2653 // DOM attribute, CSS property, string ref, etc.) and when React tried to
2654 // coerce it to a string using `'' + value`, an exception was thrown.
2655 //
2656 // The most common types that will cause this exception are `Symbol` instances
2657 // and Temporal objects like `Temporal.Instant`. But any object that has a
2658 // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
2659 // exception. (Library authors do this to prevent users from using built-in
2660 // numeric operators like `+` or comparison operators like `>=` because custom
2661 // methods are needed to perform accurate arithmetic or comparison.)
2662 //
2663 // To fix the problem, coerce this object or symbol value to a string before
2664 // passing it to React. The most reliable way is usually `String(value)`.
2665 //
2666 // To find which value is throwing, check the browser or debugger console.
2667 // Before this exception was thrown, there should be `console.error` output
2668 // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
2669 // problem and how that type was used: key, atrribute, input value prop, etc.
2670 // In most cases, this console output also shows the component and its
2671 // ancestor components where the exception happened.
2672 //
2673 // eslint-disable-next-line react-internal/safe-string-coercion
2674 return '' + value;
2675 }
2676 function checkKeyStringCoercion(value) {
2677 {
2678 if (willCoercionThrow(value)) {
2679 error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
2680
2681 return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
2682 }
2683 }
2684 }
2685
2686 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2687 var RESERVED_PROPS = {
2688 key: true,
2689 ref: true,
2690 __self: true,
2691 __source: true
2692 };
2693 var specialPropKeyWarningShown;
2694 var specialPropRefWarningShown;
2695 var didWarnAboutStringRefs;
2696
2697 {
2698 didWarnAboutStringRefs = {};
2699 }
2700
2701 function hasValidRef(config) {
2702 {
2703 if (hasOwnProperty.call(config, 'ref')) {
2704 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
2705
2706 if (getter && getter.isReactWarning) {
2707 return false;
2708 }
2709 }
2710 }
2711
2712 return config.ref !== undefined;
2713 }
2714
2715 function hasValidKey(config) {
2716 {
2717 if (hasOwnProperty.call(config, 'key')) {
2718 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
2719
2720 if (getter && getter.isReactWarning) {
2721 return false;
2722 }
2723 }
2724 }
2725
2726 return config.key !== undefined;
2727 }
2728
2729 function warnIfStringRefCannotBeAutoConverted(config, self) {
2730 {
2731 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2732 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2733
2734 if (!didWarnAboutStringRefs[componentName]) {
2735 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2736
2737 didWarnAboutStringRefs[componentName] = true;
2738 }
2739 }
2740 }
2741 }
2742
2743 function defineKeyPropWarningGetter(props, displayName) {
2744 {
2745 var warnAboutAccessingKey = function () {
2746 if (!specialPropKeyWarningShown) {
2747 specialPropKeyWarningShown = true;
2748
2749 error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2750 }
2751 };
2752
2753 warnAboutAccessingKey.isReactWarning = true;
2754 Object.defineProperty(props, 'key', {
2755 get: warnAboutAccessingKey,
2756 configurable: true
2757 });
2758 }
2759 }
2760
2761 function defineRefPropWarningGetter(props, displayName) {
2762 {
2763 var warnAboutAccessingRef = function () {
2764 if (!specialPropRefWarningShown) {
2765 specialPropRefWarningShown = true;
2766
2767 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2768 }
2769 };
2770
2771 warnAboutAccessingRef.isReactWarning = true;
2772 Object.defineProperty(props, 'ref', {
2773 get: warnAboutAccessingRef,
2774 configurable: true
2775 });
2776 }
2777 }
2778 /**
2779 * Factory method to create a new React element. This no longer adheres to
2780 * the class pattern, so do not use new to call it. Also, instanceof check
2781 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2782 * if something is a React Element.
2783 *
2784 * @param {*} type
2785 * @param {*} props
2786 * @param {*} key
2787 * @param {string|object} ref
2788 * @param {*} owner
2789 * @param {*} self A *temporary* helper to detect places where `this` is
2790 * different from the `owner` when React.createElement is called, so that we
2791 * can warn. We want to get rid of owner and replace string `ref`s with arrow
2792 * functions, and as long as `this` and owner are the same, there will be no
2793 * change in behavior.
2794 * @param {*} source An annotation object (added by a transpiler or otherwise)
2795 * indicating filename, line number, and/or other information.
2796 * @internal
2797 */
2798
2799
2800 var ReactElement = function (type, key, ref, self, source, owner, props) {
2801 var element = {
2802 // This tag allows us to uniquely identify this as a React Element
2803 $$typeof: REACT_ELEMENT_TYPE,
2804 // Built-in properties that belong on the element
2805 type: type,
2806 key: key,
2807 ref: ref,
2808 props: props,
2809 // Record the component responsible for creating this element.
2810 _owner: owner
2811 };
2812
2813 {
2814 // The validation flag is currently mutative. We put it on
2815 // an external backing store so that we can freeze the whole object.
2816 // This can be replaced with a WeakMap once they are implemented in
2817 // commonly used development environments.
2818 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
2819 // the validation flag non-enumerable (where possible, which should
2820 // include every environment we run tests in), so the test framework
2821 // ignores it.
2822
2823 Object.defineProperty(element._store, 'validated', {
2824 configurable: false,
2825 enumerable: false,
2826 writable: true,
2827 value: false
2828 }); // self and source are DEV only properties.
2829
2830 Object.defineProperty(element, '_self', {
2831 configurable: false,
2832 enumerable: false,
2833 writable: false,
2834 value: self
2835 }); // Two elements created in two different places should be considered
2836 // equal for testing purposes and therefore we hide it from enumeration.
2837
2838 Object.defineProperty(element, '_source', {
2839 configurable: false,
2840 enumerable: false,
2841 writable: false,
2842 value: source
2843 });
2844
2845 if (Object.freeze) {
2846 Object.freeze(element.props);
2847 Object.freeze(element);
2848 }
2849 }
2850
2851 return element;
2852 };
2853 /**
2854 * https://github.com/reactjs/rfcs/pull/107
2855 * @param {*} type
2856 * @param {object} props
2857 * @param {string} key
2858 */
2859
2860 function jsxDEV(type, config, maybeKey, source, self) {
2861 {
2862 var propName; // Reserved names are extracted
2863
2864 var props = {};
2865 var key = null;
2866 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
2867 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
2868 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
2869 // but as an intermediary step, we will use jsxDEV for everything except
2870 // <div {...props} key="Hi" />, because we aren't currently able to tell if
2871 // key is explicitly declared to be undefined or not.
2872
2873 if (maybeKey !== undefined) {
2874 {
2875 checkKeyStringCoercion(maybeKey);
2876 }
2877
2878 key = '' + maybeKey;
2879 }
2880
2881 if (hasValidKey(config)) {
2882 {
2883 checkKeyStringCoercion(config.key);
2884 }
2885
2886 key = '' + config.key;
2887 }
2888
2889 if (hasValidRef(config)) {
2890 ref = config.ref;
2891 warnIfStringRefCannotBeAutoConverted(config, self);
2892 } // Remaining properties are added to a new props object
2893
2894
2895 for (propName in config) {
2896 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2897 props[propName] = config[propName];
2898 }
2899 } // Resolve default props
2900
2901
2902 if (type && type.defaultProps) {
2903 var defaultProps = type.defaultProps;
2904
2905 for (propName in defaultProps) {
2906 if (props[propName] === undefined) {
2907 props[propName] = defaultProps[propName];
2908 }
2909 }
2910 }
2911
2912 if (key || ref) {
2913 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2914
2915 if (key) {
2916 defineKeyPropWarningGetter(props, displayName);
2917 }
2918
2919 if (ref) {
2920 defineRefPropWarningGetter(props, displayName);
2921 }
2922 }
2923
2924 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2925 }
2926 }
2927
2928 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2929 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2930
2931 function setCurrentlyValidatingElement$1(element) {
2932 {
2933 if (element) {
2934 var owner = element._owner;
2935 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2936 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2937 } else {
2938 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2939 }
2940 }
2941 }
2942
2943 var propTypesMisspellWarningShown;
2944
2945 {
2946 propTypesMisspellWarningShown = false;
2947 }
2948 /**
2949 * Verifies the object is a ReactElement.
2950 * See https://reactjs.org/docs/react-api.html#isvalidelement
2951 * @param {?object} object
2952 * @return {boolean} True if `object` is a ReactElement.
2953 * @final
2954 */
2955
2956
2957 function isValidElement(object) {
2958 {
2959 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2960 }
2961 }
2962
2963 function getDeclarationErrorAddendum() {
2964 {
2965 if (ReactCurrentOwner$1.current) {
2966 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2967
2968 if (name) {
2969 return '\n\nCheck the render method of `' + name + '`.';
2970 }
2971 }
2972
2973 return '';
2974 }
2975 }
2976
2977 function getSourceInfoErrorAddendum(source) {
2978 {
2979 if (source !== undefined) {
2980 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2981 var lineNumber = source.lineNumber;
2982 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2983 }
2984
2985 return '';
2986 }
2987 }
2988 /**
2989 * Warn if there's no key explicitly set on dynamic arrays of children or
2990 * object keys are not valid. This allows us to keep track of children between
2991 * updates.
2992 */
2993
2994
2995 var ownerHasKeyUseWarning = {};
2996
2997 function getCurrentComponentErrorInfo(parentType) {
2998 {
2999 var info = getDeclarationErrorAddendum();
3000
3001 if (!info) {
3002 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
3003
3004 if (parentName) {
3005 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
3006 }
3007 }
3008
3009 return info;
3010 }
3011 }
3012 /**
3013 * Warn if the element doesn't have an explicit key assigned to it.
3014 * This element is in an array. The array could grow and shrink or be
3015 * reordered. All children that haven't already been validated are required to
3016 * have a "key" property assigned to it. Error statuses are cached so a warning
3017 * will only be shown once.
3018 *
3019 * @internal
3020 * @param {ReactElement} element Element that requires a key.
3021 * @param {*} parentType element's parent's type.
3022 */
3023
3024
3025 function validateExplicitKey(element, parentType) {
3026 {
3027 if (!element._store || element._store.validated || element.key != null) {
3028 return;
3029 }
3030
3031 element._store.validated = true;
3032 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
3033
3034 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
3035 return;
3036 }
3037
3038 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
3039 // property, it may be the creator of the child that's responsible for
3040 // assigning it a key.
3041
3042 var childOwner = '';
3043
3044 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
3045 // Give the component that originally created this child.
3046 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
3047 }
3048
3049 setCurrentlyValidatingElement$1(element);
3050
3051 error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
3052
3053 setCurrentlyValidatingElement$1(null);
3054 }
3055 }
3056 /**
3057 * Ensure that every element either is passed in a static location, in an
3058 * array with an explicit keys property defined, or in an object literal
3059 * with valid key property.
3060 *
3061 * @internal
3062 * @param {ReactNode} node Statically passed child of any type.
3063 * @param {*} parentType node's parent's type.
3064 */
3065
3066
3067 function validateChildKeys(node, parentType) {
3068 {
3069 if (typeof node !== 'object') {
3070 return;
3071 }
3072
3073 if (isArray(node)) {
3074 for (var i = 0; i < node.length; i++) {
3075 var child = node[i];
3076
3077 if (isValidElement(child)) {
3078 validateExplicitKey(child, parentType);
3079 }
3080 }
3081 } else if (isValidElement(node)) {
3082 // This element was passed in a valid location.
3083 if (node._store) {
3084 node._store.validated = true;
3085 }
3086 } else if (node) {
3087 var iteratorFn = getIteratorFn(node);
3088
3089 if (typeof iteratorFn === 'function') {
3090 // Entry iterators used to provide implicit keys,
3091 // but now we print a separate warning for them later.
3092 if (iteratorFn !== node.entries) {
3093 var iterator = iteratorFn.call(node);
3094 var step;
3095
3096 while (!(step = iterator.next()).done) {
3097 if (isValidElement(step.value)) {
3098 validateExplicitKey(step.value, parentType);
3099 }
3100 }
3101 }
3102 }
3103 }
3104 }
3105 }
3106 /**
3107 * Given an element, validate that its props follow the propTypes definition,
3108 * provided by the type.
3109 *
3110 * @param {ReactElement} element
3111 */
3112
3113
3114 function validatePropTypes(element) {
3115 {
3116 var type = element.type;
3117
3118 if (type === null || type === undefined || typeof type === 'string') {
3119 return;
3120 }
3121
3122 var propTypes;
3123
3124 if (typeof type === 'function') {
3125 propTypes = type.propTypes;
3126 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
3127 // Inner props are checked in the reconciler.
3128 type.$$typeof === REACT_MEMO_TYPE)) {
3129 propTypes = type.propTypes;
3130 } else {
3131 return;
3132 }
3133
3134 if (propTypes) {
3135 // Intentionally inside to avoid triggering lazy initializers:
3136 var name = getComponentNameFromType(type);
3137 checkPropTypes(propTypes, element.props, 'prop', name, element);
3138 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
3139 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
3140
3141 var _name = getComponentNameFromType(type);
3142
3143 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
3144 }
3145
3146 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
3147 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
3148 }
3149 }
3150 }
3151 /**
3152 * Given a fragment, validate that it can only be provided with fragment props
3153 * @param {ReactElement} fragment
3154 */
3155
3156
3157 function validateFragmentProps(fragment) {
3158 {
3159 var keys = Object.keys(fragment.props);
3160
3161 for (var i = 0; i < keys.length; i++) {
3162 var key = keys[i];
3163
3164 if (key !== 'children' && key !== 'key') {
3165 setCurrentlyValidatingElement$1(fragment);
3166
3167 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
3168
3169 setCurrentlyValidatingElement$1(null);
3170 break;
3171 }
3172 }
3173
3174 if (fragment.ref !== null) {
3175 setCurrentlyValidatingElement$1(fragment);
3176
3177 error('Invalid attribute `ref` supplied to `React.Fragment`.');
3178
3179 setCurrentlyValidatingElement$1(null);
3180 }
3181 }
3182 }
3183
3184 var didWarnAboutKeySpread = {};
3185 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3186 {
3187 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
3188 // succeed and there will likely be errors in render.
3189
3190 if (!validType) {
3191 var info = '';
3192
3193 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
3194 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
3195 }
3196
3197 var sourceInfo = getSourceInfoErrorAddendum(source);
3198
3199 if (sourceInfo) {
3200 info += sourceInfo;
3201 } else {
3202 info += getDeclarationErrorAddendum();
3203 }
3204
3205 var typeString;
3206
3207 if (type === null) {
3208 typeString = 'null';
3209 } else if (isArray(type)) {
3210 typeString = 'array';
3211 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
3212 typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
3213 info = ' Did you accidentally export a JSX literal instead of a component?';
3214 } else {
3215 typeString = typeof type;
3216 }
3217
3218 error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
3219 }
3220
3221 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
3222 // TODO: Drop this when these are no longer allowed as the type argument.
3223
3224 if (element == null) {
3225 return element;
3226 } // Skip key warning if the type isn't valid since our key validation logic
3227 // doesn't expect a non-string/function type and can throw confusing errors.
3228 // We don't want exception behavior to differ between dev and prod.
3229 // (Rendering will throw with a helpful message and as soon as the type is
3230 // fixed, the key warnings will appear.)
3231
3232
3233 if (validType) {
3234 var children = props.children;
3235
3236 if (children !== undefined) {
3237 if (isStaticChildren) {
3238 if (isArray(children)) {
3239 for (var i = 0; i < children.length; i++) {
3240 validateChildKeys(children[i], type);
3241 }
3242
3243 if (Object.freeze) {
3244 Object.freeze(children);
3245 }
3246 } else {
3247 error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
3248 }
3249 } else {
3250 validateChildKeys(children, type);
3251 }
3252 }
3253 }
3254
3255 {
3256 if (hasOwnProperty.call(props, 'key')) {
3257 var componentName = getComponentNameFromType(type);
3258 var keys = Object.keys(props).filter(function (k) {
3259 return k !== 'key';
3260 });
3261 var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
3262
3263 if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3264 var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
3265
3266 error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3267
3268 didWarnAboutKeySpread[componentName + beforeExample] = true;
3269 }
3270 }
3271 }
3272
3273 if (type === REACT_FRAGMENT_TYPE) {
3274 validateFragmentProps(element);
3275 } else {
3276 validatePropTypes(element);
3277 }
3278
3279 return element;
3280 }
3281 } // These two functions exist to still get child warnings in dev
3282 // even with the prod transform. This means that jsxDEV is purely
3283 // opt-in behavior for better messages but that we won't stop
3284 // giving you warnings if you use production apis.
3285
3286 function jsxWithValidationStatic(type, props, key) {
3287 {
3288 return jsxWithValidation(type, props, key, true);
3289 }
3290 }
3291 function jsxWithValidationDynamic(type, props, key) {
3292 {
3293 return jsxWithValidation(type, props, key, false);
3294 }
3295 }
3296
3297 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
3298 // for now we can ship identical prod functions
3299
3300 var jsxs = jsxWithValidationStatic ;
3301
3302 exports.Fragment = REACT_FRAGMENT_TYPE;
3303 exports.jsx = jsx;
3304 exports.jsxs = jsxs;
3305 })();
3306 }
3307
3308
3309 /***/ }),
3310
3311 /***/ "../node_modules/react/jsx-runtime.js":
3312 /*!********************************************!*\
3313 !*** ../node_modules/react/jsx-runtime.js ***!
3314 \********************************************/
3315 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3316
3317 "use strict";
3318
3319
3320 if (false) {} else {
3321 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js");
3322 }
3323
3324
3325 /***/ }),
3326
3327 /***/ "react":
3328 /*!************************!*\
3329 !*** external "React" ***!
3330 \************************/
3331 /***/ ((module) => {
3332
3333 "use strict";
3334 module.exports = React;
3335
3336 /***/ }),
3337
3338 /***/ "react-dom":
3339 /*!***************************!*\
3340 !*** external "ReactDOM" ***!
3341 \***************************/
3342 /***/ ((module) => {
3343
3344 "use strict";
3345 module.exports = ReactDOM;
3346
3347 /***/ }),
3348
3349 /***/ "@elementor/icons/SpeakerphoneIcon":
3350 /*!********************************************************!*\
3351 !*** external "elementorV2.icons['SpeakerphoneIcon']" ***!
3352 \********************************************************/
3353 /***/ ((module) => {
3354
3355 "use strict";
3356 module.exports = elementorV2.icons['SpeakerphoneIcon'];
3357
3358 /***/ }),
3359
3360 /***/ "@elementor/ui":
3361 /*!*********************************!*\
3362 !*** external "elementorV2.ui" ***!
3363 \*********************************/
3364 /***/ ((module) => {
3365
3366 "use strict";
3367 module.exports = elementorV2.ui;
3368
3369 /***/ }),
3370
3371 /***/ "@wordpress/i18n":
3372 /*!**************************!*\
3373 !*** external "wp.i18n" ***!
3374 \**************************/
3375 /***/ ((module) => {
3376
3377 "use strict";
3378 module.exports = wp.i18n;
3379
3380 /***/ }),
3381
3382 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
3383 /*!******************************************************************!*\
3384 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
3385 \******************************************************************/
3386 /***/ ((module) => {
3387
3388 function _arrayLikeToArray(r, a) {
3389 (null == a || a > r.length) && (a = r.length);
3390 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
3391 return n;
3392 }
3393 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3394
3395 /***/ }),
3396
3397 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
3398 /*!****************************************************************!*\
3399 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
3400 \****************************************************************/
3401 /***/ ((module) => {
3402
3403 function _arrayWithHoles(r) {
3404 if (Array.isArray(r)) return r;
3405 }
3406 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
3407
3408 /***/ }),
3409
3410 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
3411 /*!*********************************************************!*\
3412 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
3413 \*********************************************************/
3414 /***/ ((module) => {
3415
3416 function _extends() {
3417 return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
3418 for (var e = 1; e < arguments.length; e++) {
3419 var t = arguments[e];
3420 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
3421 }
3422 return n;
3423 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
3424 }
3425 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
3426
3427 /***/ }),
3428
3429 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
3430 /*!***********************************************************************!*\
3431 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
3432 \***********************************************************************/
3433 /***/ ((module) => {
3434
3435 function _interopRequireDefault(e) {
3436 return e && e.__esModule ? e : {
3437 "default": e
3438 };
3439 }
3440 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
3441
3442 /***/ }),
3443
3444 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
3445 /*!**********************************************************************!*\
3446 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
3447 \**********************************************************************/
3448 /***/ ((module) => {
3449
3450 function _iterableToArrayLimit(r, l) {
3451 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3452 if (null != t) {
3453 var e,
3454 n,
3455 i,
3456 u,
3457 a = [],
3458 f = !0,
3459 o = !1;
3460 try {
3461 if (i = (t = t.call(r)).next, 0 === l) {
3462 if (Object(t) !== t) return;
3463 f = !1;
3464 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
3465 } catch (r) {
3466 o = !0, n = r;
3467 } finally {
3468 try {
3469 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
3470 } finally {
3471 if (o) throw n;
3472 }
3473 }
3474 return a;
3475 }
3476 }
3477 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
3478
3479 /***/ }),
3480
3481 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
3482 /*!*****************************************************************!*\
3483 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
3484 \*****************************************************************/
3485 /***/ ((module) => {
3486
3487 function _nonIterableRest() {
3488 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3489 }
3490 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
3491
3492 /***/ }),
3493
3494 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
3495 /*!***************************************************************!*\
3496 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
3497 \***************************************************************/
3498 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3499
3500 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
3501 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
3502 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3503 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
3504 function _slicedToArray(r, e) {
3505 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
3506 }
3507 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3508
3509 /***/ }),
3510
3511 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
3512 /*!********************************************************!*\
3513 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
3514 \********************************************************/
3515 /***/ ((module) => {
3516
3517 function _typeof(o) {
3518 "@babel/helpers - typeof";
3519
3520 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3521 return typeof o;
3522 } : function (o) {
3523 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3524 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
3525 }
3526 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3527
3528 /***/ }),
3529
3530 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
3531 /*!****************************************************************************!*\
3532 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
3533 \****************************************************************************/
3534 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3535
3536 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
3537 function _unsupportedIterableToArray(r, a) {
3538 if (r) {
3539 if ("string" == typeof r) return arrayLikeToArray(r, a);
3540 var t = {}.toString.call(r).slice(8, -1);
3541 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;
3542 }
3543 }
3544 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3545
3546 /***/ }),
3547
3548 /***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
3549 /*!**************************************************************************!*\
3550 !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
3551 \**************************************************************************/
3552 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3553
3554 "use strict";
3555
3556 var __defProp = Object.defineProperty;
3557 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3558 var __getOwnPropNames = Object.getOwnPropertyNames;
3559 var __hasOwnProp = Object.prototype.hasOwnProperty;
3560 var __export = (target, all) => {
3561 for (var name in all)
3562 __defProp(target, name, { get: all[name], enumerable: true });
3563 };
3564 var __copyProps = (to, from, except, desc) => {
3565 if (from && typeof from === "object" || typeof from === "function") {
3566 for (let key of __getOwnPropNames(from))
3567 if (!__hasOwnProp.call(to, key) && key !== except)
3568 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3569 }
3570 return to;
3571 };
3572 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3573
3574 // src/focusManager.ts
3575 var focusManager_exports = {};
3576 __export(focusManager_exports, {
3577 FocusManager: () => FocusManager,
3578 focusManager: () => focusManager
3579 });
3580 module.exports = __toCommonJS(focusManager_exports);
3581 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3582 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3583 var FocusManager = class extends import_subscribable.Subscribable {
3584 #focused;
3585 #cleanup;
3586 #setup;
3587 constructor() {
3588 super();
3589 this.#setup = (onFocus) => {
3590 if (!import_utils.isServer && window.addEventListener) {
3591 const listener = () => onFocus();
3592 window.addEventListener("visibilitychange", listener, false);
3593 return () => {
3594 window.removeEventListener("visibilitychange", listener);
3595 };
3596 }
3597 return;
3598 };
3599 }
3600 onSubscribe() {
3601 if (!this.#cleanup) {
3602 this.setEventListener(this.#setup);
3603 }
3604 }
3605 onUnsubscribe() {
3606 if (!this.hasListeners()) {
3607 this.#cleanup?.();
3608 this.#cleanup = void 0;
3609 }
3610 }
3611 setEventListener(setup) {
3612 this.#setup = setup;
3613 this.#cleanup?.();
3614 this.#cleanup = setup((focused) => {
3615 if (typeof focused === "boolean") {
3616 this.setFocused(focused);
3617 } else {
3618 this.onFocus();
3619 }
3620 });
3621 }
3622 setFocused(focused) {
3623 const changed = this.#focused !== focused;
3624 if (changed) {
3625 this.#focused = focused;
3626 this.onFocus();
3627 }
3628 }
3629 onFocus() {
3630 const isFocused = this.isFocused();
3631 this.listeners.forEach((listener) => {
3632 listener(isFocused);
3633 });
3634 }
3635 isFocused() {
3636 if (typeof this.#focused === "boolean") {
3637 return this.#focused;
3638 }
3639 return globalThis.document?.visibilityState !== "hidden";
3640 }
3641 };
3642 var focusManager = new FocusManager();
3643 // Annotate the CommonJS export names for ESM import in node:
3644 0 && (0);
3645 //# sourceMappingURL=focusManager.cjs.map
3646
3647 /***/ }),
3648
3649 /***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
3650 /*!***********************************************************************!*\
3651 !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
3652 \***********************************************************************/
3653 /***/ ((module) => {
3654
3655 "use strict";
3656
3657 var __defProp = Object.defineProperty;
3658 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3659 var __getOwnPropNames = Object.getOwnPropertyNames;
3660 var __hasOwnProp = Object.prototype.hasOwnProperty;
3661 var __export = (target, all) => {
3662 for (var name in all)
3663 __defProp(target, name, { get: all[name], enumerable: true });
3664 };
3665 var __copyProps = (to, from, except, desc) => {
3666 if (from && typeof from === "object" || typeof from === "function") {
3667 for (let key of __getOwnPropNames(from))
3668 if (!__hasOwnProp.call(to, key) && key !== except)
3669 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3670 }
3671 return to;
3672 };
3673 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3674
3675 // src/hydration.ts
3676 var hydration_exports = {};
3677 __export(hydration_exports, {
3678 defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
3679 defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
3680 dehydrate: () => dehydrate,
3681 hydrate: () => hydrate
3682 });
3683 module.exports = __toCommonJS(hydration_exports);
3684 function defaultTransformerFn(data) {
3685 return data;
3686 }
3687 function dehydrateMutation(mutation) {
3688 return {
3689 mutationKey: mutation.options.mutationKey,
3690 state: mutation.state,
3691 ...mutation.options.scope && { scope: mutation.options.scope },
3692 ...mutation.meta && { meta: mutation.meta }
3693 };
3694 }
3695 function dehydrateQuery(query, serializeData) {
3696 return {
3697 state: {
3698 ...query.state,
3699 ...query.state.data !== void 0 && {
3700 data: serializeData(query.state.data)
3701 }
3702 },
3703 queryKey: query.queryKey,
3704 queryHash: query.queryHash,
3705 ...query.state.status === "pending" && {
3706 promise: query.promise?.then(serializeData).catch((error) => {
3707 if (true) {
3708 console.error(
3709 `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
3710 );
3711 }
3712 return Promise.reject(new Error("redacted"));
3713 })
3714 },
3715 ...query.meta && { meta: query.meta }
3716 };
3717 }
3718 function defaultShouldDehydrateMutation(mutation) {
3719 return mutation.state.isPaused;
3720 }
3721 function defaultShouldDehydrateQuery(query) {
3722 return query.state.status === "success";
3723 }
3724 function dehydrate(client, options = {}) {
3725 const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
3726 const mutations = client.getMutationCache().getAll().flatMap(
3727 (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
3728 );
3729 const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
3730 const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;
3731 const queries = client.getQueryCache().getAll().flatMap(
3732 (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []
3733 );
3734 return { mutations, queries };
3735 }
3736 function hydrate(client, dehydratedState, options) {
3737 if (typeof dehydratedState !== "object" || dehydratedState === null) {
3738 return;
3739 }
3740 const mutationCache = client.getMutationCache();
3741 const queryCache = client.getQueryCache();
3742 const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;
3743 const mutations = dehydratedState.mutations || [];
3744 const queries = dehydratedState.queries || [];
3745 mutations.forEach(({ state, ...mutationOptions }) => {
3746 mutationCache.build(
3747 client,
3748 {
3749 ...client.getDefaultOptions().hydrate?.mutations,
3750 ...options?.defaultOptions?.mutations,
3751 ...mutationOptions
3752 },
3753 state
3754 );
3755 });
3756 queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {
3757 let query = queryCache.get(queryHash);
3758 const data = state.data === void 0 ? state.data : deserializeData(state.data);
3759 if (query) {
3760 if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
3761 const { fetchStatus: _ignored, ...serializedState } = state;
3762 query.setState({
3763 ...serializedState,
3764 data
3765 });
3766 }
3767 } else {
3768 query = queryCache.build(
3769 client,
3770 {
3771 ...client.getDefaultOptions().hydrate?.queries,
3772 ...options?.defaultOptions?.queries,
3773 queryKey,
3774 queryHash,
3775 meta
3776 },
3777 // Reset fetch status to idle to avoid
3778 // query being stuck in fetching state upon hydration
3779 {
3780 ...state,
3781 data,
3782 fetchStatus: "idle"
3783 }
3784 );
3785 }
3786 if (promise) {
3787 const initialPromise = Promise.resolve(promise).then(deserializeData);
3788 void query.fetch(void 0, { initialPromise });
3789 }
3790 });
3791 }
3792 // Annotate the CommonJS export names for ESM import in node:
3793 0 && (0);
3794 //# sourceMappingURL=hydration.cjs.map
3795
3796 /***/ }),
3797
3798 /***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
3799 /*!*******************************************************************!*\
3800 !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
3801 \*******************************************************************/
3802 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3803
3804 "use strict";
3805
3806 var __defProp = Object.defineProperty;
3807 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3808 var __getOwnPropNames = Object.getOwnPropertyNames;
3809 var __hasOwnProp = Object.prototype.hasOwnProperty;
3810 var __export = (target, all) => {
3811 for (var name in all)
3812 __defProp(target, name, { get: all[name], enumerable: true });
3813 };
3814 var __copyProps = (to, from, except, desc) => {
3815 if (from && typeof from === "object" || typeof from === "function") {
3816 for (let key of __getOwnPropNames(from))
3817 if (!__hasOwnProp.call(to, key) && key !== except)
3818 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3819 }
3820 return to;
3821 };
3822 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
3823 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3824
3825 // src/index.ts
3826 var src_exports = {};
3827 __export(src_exports, {
3828 CancelledError: () => import_retryer.CancelledError,
3829 InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
3830 Mutation: () => import_mutation.Mutation,
3831 MutationCache: () => import_mutationCache.MutationCache,
3832 MutationObserver: () => import_mutationObserver.MutationObserver,
3833 QueriesObserver: () => import_queriesObserver.QueriesObserver,
3834 Query: () => import_query.Query,
3835 QueryCache: () => import_queryCache.QueryCache,
3836 QueryClient: () => import_queryClient.QueryClient,
3837 QueryObserver: () => import_queryObserver.QueryObserver,
3838 defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
3839 defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
3840 dehydrate: () => import_hydration.dehydrate,
3841 focusManager: () => import_focusManager.focusManager,
3842 hashKey: () => import_utils.hashKey,
3843 hydrate: () => import_hydration.hydrate,
3844 isCancelledError: () => import_retryer2.isCancelledError,
3845 isServer: () => import_utils.isServer,
3846 keepPreviousData: () => import_utils.keepPreviousData,
3847 matchMutation: () => import_utils.matchMutation,
3848 matchQuery: () => import_utils.matchQuery,
3849 notifyManager: () => import_notifyManager.notifyManager,
3850 onlineManager: () => import_onlineManager.onlineManager,
3851 replaceEqualDeep: () => import_utils.replaceEqualDeep,
3852 skipToken: () => import_utils.skipToken
3853 });
3854 module.exports = __toCommonJS(src_exports);
3855 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3856 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
3857 var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
3858 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3859 var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
3860 var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
3861 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
3862 var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
3863 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3864 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
3865 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
3866 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3867 var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3868 var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
3869 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
3870 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
3871 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
3872 // Annotate the CommonJS export names for ESM import in node:
3873 0 && (0);
3874 //# sourceMappingURL=index.cjs.map
3875
3876 /***/ }),
3877
3878 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
3879 /*!***********************************************************************************!*\
3880 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
3881 \***********************************************************************************/
3882 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3883
3884 "use strict";
3885
3886 var __defProp = Object.defineProperty;
3887 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3888 var __getOwnPropNames = Object.getOwnPropertyNames;
3889 var __hasOwnProp = Object.prototype.hasOwnProperty;
3890 var __export = (target, all) => {
3891 for (var name in all)
3892 __defProp(target, name, { get: all[name], enumerable: true });
3893 };
3894 var __copyProps = (to, from, except, desc) => {
3895 if (from && typeof from === "object" || typeof from === "function") {
3896 for (let key of __getOwnPropNames(from))
3897 if (!__hasOwnProp.call(to, key) && key !== except)
3898 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3899 }
3900 return to;
3901 };
3902 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3903
3904 // src/infiniteQueryBehavior.ts
3905 var infiniteQueryBehavior_exports = {};
3906 __export(infiniteQueryBehavior_exports, {
3907 hasNextPage: () => hasNextPage,
3908 hasPreviousPage: () => hasPreviousPage,
3909 infiniteQueryBehavior: () => infiniteQueryBehavior
3910 });
3911 module.exports = __toCommonJS(infiniteQueryBehavior_exports);
3912 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3913 function infiniteQueryBehavior(pages) {
3914 return {
3915 onFetch: (context, query) => {
3916 const options = context.options;
3917 const direction = context.fetchOptions?.meta?.fetchMore?.direction;
3918 const oldPages = context.state.data?.pages || [];
3919 const oldPageParams = context.state.data?.pageParams || [];
3920 let result = { pages: [], pageParams: [] };
3921 let currentPage = 0;
3922 const fetchFn = async () => {
3923 let cancelled = false;
3924 const addSignalProperty = (object) => {
3925 Object.defineProperty(object, "signal", {
3926 enumerable: true,
3927 get: () => {
3928 if (context.signal.aborted) {
3929 cancelled = true;
3930 } else {
3931 context.signal.addEventListener("abort", () => {
3932 cancelled = true;
3933 });
3934 }
3935 return context.signal;
3936 }
3937 });
3938 };
3939 const queryFn = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions);
3940 const fetchPage = async (data, param, previous) => {
3941 if (cancelled) {
3942 return Promise.reject();
3943 }
3944 if (param == null && data.pages.length) {
3945 return Promise.resolve(data);
3946 }
3947 const queryFnContext = {
3948 queryKey: context.queryKey,
3949 pageParam: param,
3950 direction: previous ? "backward" : "forward",
3951 meta: context.options.meta
3952 };
3953 addSignalProperty(queryFnContext);
3954 const page = await queryFn(
3955 queryFnContext
3956 );
3957 const { maxPages } = context.options;
3958 const addTo = previous ? import_utils.addToStart : import_utils.addToEnd;
3959 return {
3960 pages: addTo(data.pages, page, maxPages),
3961 pageParams: addTo(data.pageParams, param, maxPages)
3962 };
3963 };
3964 if (direction && oldPages.length) {
3965 const previous = direction === "backward";
3966 const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
3967 const oldData = {
3968 pages: oldPages,
3969 pageParams: oldPageParams
3970 };
3971 const param = pageParamFn(options, oldData);
3972 result = await fetchPage(oldData, param, previous);
3973 } else {
3974 const remainingPages = pages ?? oldPages.length;
3975 do {
3976 const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
3977 if (currentPage > 0 && param == null) {
3978 break;
3979 }
3980 result = await fetchPage(result, param);
3981 currentPage++;
3982 } while (currentPage < remainingPages);
3983 }
3984 return result;
3985 };
3986 if (context.options.persister) {
3987 context.fetchFn = () => {
3988 return context.options.persister?.(
3989 fetchFn,
3990 {
3991 queryKey: context.queryKey,
3992 meta: context.options.meta,
3993 signal: context.signal
3994 },
3995 query
3996 );
3997 };
3998 } else {
3999 context.fetchFn = fetchFn;
4000 }
4001 }
4002 };
4003 }
4004 function getNextPageParam(options, { pages, pageParams }) {
4005 const lastIndex = pages.length - 1;
4006 return pages.length > 0 ? options.getNextPageParam(
4007 pages[lastIndex],
4008 pages,
4009 pageParams[lastIndex],
4010 pageParams
4011 ) : void 0;
4012 }
4013 function getPreviousPageParam(options, { pages, pageParams }) {
4014 return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
4015 }
4016 function hasNextPage(options, data) {
4017 if (!data)
4018 return false;
4019 return getNextPageParam(options, data) != null;
4020 }
4021 function hasPreviousPage(options, data) {
4022 if (!data || !options.getPreviousPageParam)
4023 return false;
4024 return getPreviousPageParam(options, data) != null;
4025 }
4026 // Annotate the CommonJS export names for ESM import in node:
4027 0 && (0);
4028 //# sourceMappingURL=infiniteQueryBehavior.cjs.map
4029
4030 /***/ }),
4031
4032 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
4033 /*!***********************************************************************************!*\
4034 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
4035 \***********************************************************************************/
4036 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4037
4038 "use strict";
4039
4040 var __defProp = Object.defineProperty;
4041 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4042 var __getOwnPropNames = Object.getOwnPropertyNames;
4043 var __hasOwnProp = Object.prototype.hasOwnProperty;
4044 var __export = (target, all) => {
4045 for (var name in all)
4046 __defProp(target, name, { get: all[name], enumerable: true });
4047 };
4048 var __copyProps = (to, from, except, desc) => {
4049 if (from && typeof from === "object" || typeof from === "function") {
4050 for (let key of __getOwnPropNames(from))
4051 if (!__hasOwnProp.call(to, key) && key !== except)
4052 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4053 }
4054 return to;
4055 };
4056 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4057
4058 // src/infiniteQueryObserver.ts
4059 var infiniteQueryObserver_exports = {};
4060 __export(infiniteQueryObserver_exports, {
4061 InfiniteQueryObserver: () => InfiniteQueryObserver
4062 });
4063 module.exports = __toCommonJS(infiniteQueryObserver_exports);
4064 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
4065 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
4066 var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
4067 constructor(client, options) {
4068 super(client, options);
4069 }
4070 bindMethods() {
4071 super.bindMethods();
4072 this.fetchNextPage = this.fetchNextPage.bind(this);
4073 this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
4074 }
4075 setOptions(options, notifyOptions) {
4076 super.setOptions(
4077 {
4078 ...options,
4079 behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
4080 },
4081 notifyOptions
4082 );
4083 }
4084 getOptimisticResult(options) {
4085 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
4086 return super.getOptimisticResult(options);
4087 }
4088 fetchNextPage(options) {
4089 return this.fetch({
4090 ...options,
4091 meta: {
4092 fetchMore: { direction: "forward" }
4093 }
4094 });
4095 }
4096 fetchPreviousPage(options) {
4097 return this.fetch({
4098 ...options,
4099 meta: {
4100 fetchMore: { direction: "backward" }
4101 }
4102 });
4103 }
4104 createResult(query, options) {
4105 const { state } = query;
4106 const parentResult = super.createResult(query, options);
4107 const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
4108 const fetchDirection = state.fetchMeta?.fetchMore?.direction;
4109 const isFetchNextPageError = isError && fetchDirection === "forward";
4110 const isFetchingNextPage = isFetching && fetchDirection === "forward";
4111 const isFetchPreviousPageError = isError && fetchDirection === "backward";
4112 const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
4113 const result = {
4114 ...parentResult,
4115 fetchNextPage: this.fetchNextPage,
4116 fetchPreviousPage: this.fetchPreviousPage,
4117 hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
4118 hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
4119 isFetchNextPageError,
4120 isFetchingNextPage,
4121 isFetchPreviousPageError,
4122 isFetchingPreviousPage,
4123 isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
4124 isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
4125 };
4126 return result;
4127 }
4128 };
4129 // Annotate the CommonJS export names for ESM import in node:
4130 0 && (0);
4131 //# sourceMappingURL=infiniteQueryObserver.cjs.map
4132
4133 /***/ }),
4134
4135 /***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
4136 /*!**********************************************************************!*\
4137 !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
4138 \**********************************************************************/
4139 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4140
4141 "use strict";
4142
4143 var __defProp = Object.defineProperty;
4144 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4145 var __getOwnPropNames = Object.getOwnPropertyNames;
4146 var __hasOwnProp = Object.prototype.hasOwnProperty;
4147 var __export = (target, all) => {
4148 for (var name in all)
4149 __defProp(target, name, { get: all[name], enumerable: true });
4150 };
4151 var __copyProps = (to, from, except, desc) => {
4152 if (from && typeof from === "object" || typeof from === "function") {
4153 for (let key of __getOwnPropNames(from))
4154 if (!__hasOwnProp.call(to, key) && key !== except)
4155 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4156 }
4157 return to;
4158 };
4159 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4160
4161 // src/mutation.ts
4162 var mutation_exports = {};
4163 __export(mutation_exports, {
4164 Mutation: () => Mutation,
4165 getDefaultState: () => getDefaultState
4166 });
4167 module.exports = __toCommonJS(mutation_exports);
4168 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4169 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
4170 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
4171 var Mutation = class extends import_removable.Removable {
4172 #observers;
4173 #mutationCache;
4174 #retryer;
4175 constructor(config) {
4176 super();
4177 this.mutationId = config.mutationId;
4178 this.#mutationCache = config.mutationCache;
4179 this.#observers = [];
4180 this.state = config.state || getDefaultState();
4181 this.setOptions(config.options);
4182 this.scheduleGc();
4183 }
4184 setOptions(options) {
4185 this.options = options;
4186 this.updateGcTime(this.options.gcTime);
4187 }
4188 get meta() {
4189 return this.options.meta;
4190 }
4191 addObserver(observer) {
4192 if (!this.#observers.includes(observer)) {
4193 this.#observers.push(observer);
4194 this.clearGcTimeout();
4195 this.#mutationCache.notify({
4196 type: "observerAdded",
4197 mutation: this,
4198 observer
4199 });
4200 }
4201 }
4202 removeObserver(observer) {
4203 this.#observers = this.#observers.filter((x) => x !== observer);
4204 this.scheduleGc();
4205 this.#mutationCache.notify({
4206 type: "observerRemoved",
4207 mutation: this,
4208 observer
4209 });
4210 }
4211 optionalRemove() {
4212 if (!this.#observers.length) {
4213 if (this.state.status === "pending") {
4214 this.scheduleGc();
4215 } else {
4216 this.#mutationCache.remove(this);
4217 }
4218 }
4219 }
4220 continue() {
4221 return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
4222 this.execute(this.state.variables);
4223 }
4224 async execute(variables) {
4225 this.#retryer = (0, import_retryer.createRetryer)({
4226 fn: () => {
4227 if (!this.options.mutationFn) {
4228 return Promise.reject(new Error("No mutationFn found"));
4229 }
4230 return this.options.mutationFn(variables);
4231 },
4232 onFail: (failureCount, error) => {
4233 this.#dispatch({ type: "failed", failureCount, error });
4234 },
4235 onPause: () => {
4236 this.#dispatch({ type: "pause" });
4237 },
4238 onContinue: () => {
4239 this.#dispatch({ type: "continue" });
4240 },
4241 retry: this.options.retry ?? 0,
4242 retryDelay: this.options.retryDelay,
4243 networkMode: this.options.networkMode,
4244 canRun: () => this.#mutationCache.canRun(this)
4245 });
4246 const restored = this.state.status === "pending";
4247 const isPaused = !this.#retryer.canStart();
4248 try {
4249 if (!restored) {
4250 this.#dispatch({ type: "pending", variables, isPaused });
4251 await this.#mutationCache.config.onMutate?.(
4252 variables,
4253 this
4254 );
4255 const context = await this.options.onMutate?.(variables);
4256 if (context !== this.state.context) {
4257 this.#dispatch({
4258 type: "pending",
4259 context,
4260 variables,
4261 isPaused
4262 });
4263 }
4264 }
4265 const data = await this.#retryer.start();
4266 await this.#mutationCache.config.onSuccess?.(
4267 data,
4268 variables,
4269 this.state.context,
4270 this
4271 );
4272 await this.options.onSuccess?.(data, variables, this.state.context);
4273 await this.#mutationCache.config.onSettled?.(
4274 data,
4275 null,
4276 this.state.variables,
4277 this.state.context,
4278 this
4279 );
4280 await this.options.onSettled?.(data, null, variables, this.state.context);
4281 this.#dispatch({ type: "success", data });
4282 return data;
4283 } catch (error) {
4284 try {
4285 await this.#mutationCache.config.onError?.(
4286 error,
4287 variables,
4288 this.state.context,
4289 this
4290 );
4291 await this.options.onError?.(
4292 error,
4293 variables,
4294 this.state.context
4295 );
4296 await this.#mutationCache.config.onSettled?.(
4297 void 0,
4298 error,
4299 this.state.variables,
4300 this.state.context,
4301 this
4302 );
4303 await this.options.onSettled?.(
4304 void 0,
4305 error,
4306 variables,
4307 this.state.context
4308 );
4309 throw error;
4310 } finally {
4311 this.#dispatch({ type: "error", error });
4312 }
4313 } finally {
4314 this.#mutationCache.runNext(this);
4315 }
4316 }
4317 #dispatch(action) {
4318 const reducer = (state) => {
4319 switch (action.type) {
4320 case "failed":
4321 return {
4322 ...state,
4323 failureCount: action.failureCount,
4324 failureReason: action.error
4325 };
4326 case "pause":
4327 return {
4328 ...state,
4329 isPaused: true
4330 };
4331 case "continue":
4332 return {
4333 ...state,
4334 isPaused: false
4335 };
4336 case "pending":
4337 return {
4338 ...state,
4339 context: action.context,
4340 data: void 0,
4341 failureCount: 0,
4342 failureReason: null,
4343 error: null,
4344 isPaused: action.isPaused,
4345 status: "pending",
4346 variables: action.variables,
4347 submittedAt: Date.now()
4348 };
4349 case "success":
4350 return {
4351 ...state,
4352 data: action.data,
4353 failureCount: 0,
4354 failureReason: null,
4355 error: null,
4356 status: "success",
4357 isPaused: false
4358 };
4359 case "error":
4360 return {
4361 ...state,
4362 data: void 0,
4363 error: action.error,
4364 failureCount: state.failureCount + 1,
4365 failureReason: action.error,
4366 isPaused: false,
4367 status: "error"
4368 };
4369 }
4370 };
4371 this.state = reducer(this.state);
4372 import_notifyManager.notifyManager.batch(() => {
4373 this.#observers.forEach((observer) => {
4374 observer.onMutationUpdate(action);
4375 });
4376 this.#mutationCache.notify({
4377 mutation: this,
4378 type: "updated",
4379 action
4380 });
4381 });
4382 }
4383 };
4384 function getDefaultState() {
4385 return {
4386 context: void 0,
4387 data: void 0,
4388 error: null,
4389 failureCount: 0,
4390 failureReason: null,
4391 isPaused: false,
4392 status: "idle",
4393 variables: void 0,
4394 submittedAt: 0
4395 };
4396 }
4397 // Annotate the CommonJS export names for ESM import in node:
4398 0 && (0);
4399 //# sourceMappingURL=mutation.cjs.map
4400
4401 /***/ }),
4402
4403 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
4404 /*!***************************************************************************!*\
4405 !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
4406 \***************************************************************************/
4407 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4408
4409 "use strict";
4410
4411 var __defProp = Object.defineProperty;
4412 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4413 var __getOwnPropNames = Object.getOwnPropertyNames;
4414 var __hasOwnProp = Object.prototype.hasOwnProperty;
4415 var __export = (target, all) => {
4416 for (var name in all)
4417 __defProp(target, name, { get: all[name], enumerable: true });
4418 };
4419 var __copyProps = (to, from, except, desc) => {
4420 if (from && typeof from === "object" || typeof from === "function") {
4421 for (let key of __getOwnPropNames(from))
4422 if (!__hasOwnProp.call(to, key) && key !== except)
4423 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4424 }
4425 return to;
4426 };
4427 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4428
4429 // src/mutationCache.ts
4430 var mutationCache_exports = {};
4431 __export(mutationCache_exports, {
4432 MutationCache: () => MutationCache
4433 });
4434 module.exports = __toCommonJS(mutationCache_exports);
4435 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4436 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4437 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4438 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4439 var MutationCache = class extends import_subscribable.Subscribable {
4440 constructor(config = {}) {
4441 super();
4442 this.config = config;
4443 this.#mutations = /* @__PURE__ */ new Map();
4444 this.#mutationId = Date.now();
4445 }
4446 #mutations;
4447 #mutationId;
4448 build(client, options, state) {
4449 const mutation = new import_mutation.Mutation({
4450 mutationCache: this,
4451 mutationId: ++this.#mutationId,
4452 options: client.defaultMutationOptions(options),
4453 state
4454 });
4455 this.add(mutation);
4456 return mutation;
4457 }
4458 add(mutation) {
4459 const scope = scopeFor(mutation);
4460 const mutations = this.#mutations.get(scope) ?? [];
4461 mutations.push(mutation);
4462 this.#mutations.set(scope, mutations);
4463 this.notify({ type: "added", mutation });
4464 }
4465 remove(mutation) {
4466 const scope = scopeFor(mutation);
4467 if (this.#mutations.has(scope)) {
4468 const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);
4469 if (mutations) {
4470 if (mutations.length === 0) {
4471 this.#mutations.delete(scope);
4472 } else {
4473 this.#mutations.set(scope, mutations);
4474 }
4475 }
4476 }
4477 this.notify({ type: "removed", mutation });
4478 }
4479 canRun(mutation) {
4480 const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending");
4481 return !firstPendingMutation || firstPendingMutation === mutation;
4482 }
4483 runNext(mutation) {
4484 const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);
4485 return foundMutation?.continue() ?? Promise.resolve();
4486 }
4487 clear() {
4488 import_notifyManager.notifyManager.batch(() => {
4489 this.getAll().forEach((mutation) => {
4490 this.remove(mutation);
4491 });
4492 });
4493 }
4494 getAll() {
4495 return [...this.#mutations.values()].flat();
4496 }
4497 find(filters) {
4498 const defaultedFilters = { exact: true, ...filters };
4499 return this.getAll().find(
4500 (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
4501 );
4502 }
4503 findAll(filters = {}) {
4504 return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation));
4505 }
4506 notify(event) {
4507 import_notifyManager.notifyManager.batch(() => {
4508 this.listeners.forEach((listener) => {
4509 listener(event);
4510 });
4511 });
4512 }
4513 resumePausedMutations() {
4514 const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
4515 return import_notifyManager.notifyManager.batch(
4516 () => Promise.all(
4517 pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop))
4518 )
4519 );
4520 }
4521 };
4522 function scopeFor(mutation) {
4523 return mutation.options.scope?.id ?? String(mutation.mutationId);
4524 }
4525 // Annotate the CommonJS export names for ESM import in node:
4526 0 && (0);
4527 //# sourceMappingURL=mutationCache.cjs.map
4528
4529 /***/ }),
4530
4531 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
4532 /*!******************************************************************************!*\
4533 !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
4534 \******************************************************************************/
4535 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4536
4537 "use strict";
4538
4539 var __defProp = Object.defineProperty;
4540 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4541 var __getOwnPropNames = Object.getOwnPropertyNames;
4542 var __hasOwnProp = Object.prototype.hasOwnProperty;
4543 var __export = (target, all) => {
4544 for (var name in all)
4545 __defProp(target, name, { get: all[name], enumerable: true });
4546 };
4547 var __copyProps = (to, from, except, desc) => {
4548 if (from && typeof from === "object" || typeof from === "function") {
4549 for (let key of __getOwnPropNames(from))
4550 if (!__hasOwnProp.call(to, key) && key !== except)
4551 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4552 }
4553 return to;
4554 };
4555 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4556
4557 // src/mutationObserver.ts
4558 var mutationObserver_exports = {};
4559 __export(mutationObserver_exports, {
4560 MutationObserver: () => MutationObserver
4561 });
4562 module.exports = __toCommonJS(mutationObserver_exports);
4563 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4564 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4565 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4566 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4567 var MutationObserver = class extends import_subscribable.Subscribable {
4568 #client;
4569 #currentResult = void 0;
4570 #currentMutation;
4571 #mutateOptions;
4572 constructor(client, options) {
4573 super();
4574 this.#client = client;
4575 this.setOptions(options);
4576 this.bindMethods();
4577 this.#updateResult();
4578 }
4579 bindMethods() {
4580 this.mutate = this.mutate.bind(this);
4581 this.reset = this.reset.bind(this);
4582 }
4583 setOptions(options) {
4584 const prevOptions = this.options;
4585 this.options = this.#client.defaultMutationOptions(options);
4586 if (!(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
4587 this.#client.getMutationCache().notify({
4588 type: "observerOptionsUpdated",
4589 mutation: this.#currentMutation,
4590 observer: this
4591 });
4592 }
4593 if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) {
4594 this.reset();
4595 } else if (this.#currentMutation?.state.status === "pending") {
4596 this.#currentMutation.setOptions(this.options);
4597 }
4598 }
4599 onUnsubscribe() {
4600 if (!this.hasListeners()) {
4601 this.#currentMutation?.removeObserver(this);
4602 }
4603 }
4604 onMutationUpdate(action) {
4605 this.#updateResult();
4606 this.#notify(action);
4607 }
4608 getCurrentResult() {
4609 return this.#currentResult;
4610 }
4611 reset() {
4612 this.#currentMutation?.removeObserver(this);
4613 this.#currentMutation = void 0;
4614 this.#updateResult();
4615 this.#notify();
4616 }
4617 mutate(variables, options) {
4618 this.#mutateOptions = options;
4619 this.#currentMutation?.removeObserver(this);
4620 this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
4621 this.#currentMutation.addObserver(this);
4622 return this.#currentMutation.execute(variables);
4623 }
4624 #updateResult() {
4625 const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)();
4626 this.#currentResult = {
4627 ...state,
4628 isPending: state.status === "pending",
4629 isSuccess: state.status === "success",
4630 isError: state.status === "error",
4631 isIdle: state.status === "idle",
4632 mutate: this.mutate,
4633 reset: this.reset
4634 };
4635 }
4636 #notify(action) {
4637 import_notifyManager.notifyManager.batch(() => {
4638 if (this.#mutateOptions && this.hasListeners()) {
4639 const variables = this.#currentResult.variables;
4640 const context = this.#currentResult.context;
4641 if (action?.type === "success") {
4642 this.#mutateOptions.onSuccess?.(action.data, variables, context);
4643 this.#mutateOptions.onSettled?.(action.data, null, variables, context);
4644 } else if (action?.type === "error") {
4645 this.#mutateOptions.onError?.(action.error, variables, context);
4646 this.#mutateOptions.onSettled?.(
4647 void 0,
4648 action.error,
4649 variables,
4650 context
4651 );
4652 }
4653 }
4654 this.listeners.forEach((listener) => {
4655 listener(this.#currentResult);
4656 });
4657 });
4658 }
4659 };
4660 // Annotate the CommonJS export names for ESM import in node:
4661 0 && (0);
4662 //# sourceMappingURL=mutationObserver.cjs.map
4663
4664 /***/ }),
4665
4666 /***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
4667 /*!***************************************************************************!*\
4668 !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
4669 \***************************************************************************/
4670 /***/ ((module) => {
4671
4672 "use strict";
4673
4674 var __defProp = Object.defineProperty;
4675 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4676 var __getOwnPropNames = Object.getOwnPropertyNames;
4677 var __hasOwnProp = Object.prototype.hasOwnProperty;
4678 var __export = (target, all) => {
4679 for (var name in all)
4680 __defProp(target, name, { get: all[name], enumerable: true });
4681 };
4682 var __copyProps = (to, from, except, desc) => {
4683 if (from && typeof from === "object" || typeof from === "function") {
4684 for (let key of __getOwnPropNames(from))
4685 if (!__hasOwnProp.call(to, key) && key !== except)
4686 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4687 }
4688 return to;
4689 };
4690 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4691
4692 // src/notifyManager.ts
4693 var notifyManager_exports = {};
4694 __export(notifyManager_exports, {
4695 createNotifyManager: () => createNotifyManager,
4696 notifyManager: () => notifyManager
4697 });
4698 module.exports = __toCommonJS(notifyManager_exports);
4699 function createNotifyManager() {
4700 let queue = [];
4701 let transactions = 0;
4702 let notifyFn = (callback) => {
4703 callback();
4704 };
4705 let batchNotifyFn = (callback) => {
4706 callback();
4707 };
4708 let scheduleFn = (cb) => setTimeout(cb, 0);
4709 const schedule = (callback) => {
4710 if (transactions) {
4711 queue.push(callback);
4712 } else {
4713 scheduleFn(() => {
4714 notifyFn(callback);
4715 });
4716 }
4717 };
4718 const flush = () => {
4719 const originalQueue = queue;
4720 queue = [];
4721 if (originalQueue.length) {
4722 scheduleFn(() => {
4723 batchNotifyFn(() => {
4724 originalQueue.forEach((callback) => {
4725 notifyFn(callback);
4726 });
4727 });
4728 });
4729 }
4730 };
4731 return {
4732 batch: (callback) => {
4733 let result;
4734 transactions++;
4735 try {
4736 result = callback();
4737 } finally {
4738 transactions--;
4739 if (!transactions) {
4740 flush();
4741 }
4742 }
4743 return result;
4744 },
4745 /**
4746 * All calls to the wrapped function will be batched.
4747 */
4748 batchCalls: (callback) => {
4749 return (...args) => {
4750 schedule(() => {
4751 callback(...args);
4752 });
4753 };
4754 },
4755 schedule,
4756 /**
4757 * Use this method to set a custom notify function.
4758 * This can be used to for example wrap notifications with `React.act` while running tests.
4759 */
4760 setNotifyFunction: (fn) => {
4761 notifyFn = fn;
4762 },
4763 /**
4764 * Use this method to set a custom function to batch notifications together into a single tick.
4765 * By default React Query will use the batch function provided by ReactDOM or React Native.
4766 */
4767 setBatchNotifyFunction: (fn) => {
4768 batchNotifyFn = fn;
4769 },
4770 setScheduler: (fn) => {
4771 scheduleFn = fn;
4772 }
4773 };
4774 }
4775 var notifyManager = createNotifyManager();
4776 // Annotate the CommonJS export names for ESM import in node:
4777 0 && (0);
4778 //# sourceMappingURL=notifyManager.cjs.map
4779
4780 /***/ }),
4781
4782 /***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
4783 /*!***************************************************************************!*\
4784 !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
4785 \***************************************************************************/
4786 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4787
4788 "use strict";
4789
4790 var __defProp = Object.defineProperty;
4791 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4792 var __getOwnPropNames = Object.getOwnPropertyNames;
4793 var __hasOwnProp = Object.prototype.hasOwnProperty;
4794 var __export = (target, all) => {
4795 for (var name in all)
4796 __defProp(target, name, { get: all[name], enumerable: true });
4797 };
4798 var __copyProps = (to, from, except, desc) => {
4799 if (from && typeof from === "object" || typeof from === "function") {
4800 for (let key of __getOwnPropNames(from))
4801 if (!__hasOwnProp.call(to, key) && key !== except)
4802 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4803 }
4804 return to;
4805 };
4806 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4807
4808 // src/onlineManager.ts
4809 var onlineManager_exports = {};
4810 __export(onlineManager_exports, {
4811 OnlineManager: () => OnlineManager,
4812 onlineManager: () => onlineManager
4813 });
4814 module.exports = __toCommonJS(onlineManager_exports);
4815 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4816 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4817 var OnlineManager = class extends import_subscribable.Subscribable {
4818 #online = true;
4819 #cleanup;
4820 #setup;
4821 constructor() {
4822 super();
4823 this.#setup = (onOnline) => {
4824 if (!import_utils.isServer && window.addEventListener) {
4825 const onlineListener = () => onOnline(true);
4826 const offlineListener = () => onOnline(false);
4827 window.addEventListener("online", onlineListener, false);
4828 window.addEventListener("offline", offlineListener, false);
4829 return () => {
4830 window.removeEventListener("online", onlineListener);
4831 window.removeEventListener("offline", offlineListener);
4832 };
4833 }
4834 return;
4835 };
4836 }
4837 onSubscribe() {
4838 if (!this.#cleanup) {
4839 this.setEventListener(this.#setup);
4840 }
4841 }
4842 onUnsubscribe() {
4843 if (!this.hasListeners()) {
4844 this.#cleanup?.();
4845 this.#cleanup = void 0;
4846 }
4847 }
4848 setEventListener(setup) {
4849 this.#setup = setup;
4850 this.#cleanup?.();
4851 this.#cleanup = setup(this.setOnline.bind(this));
4852 }
4853 setOnline(online) {
4854 const changed = this.#online !== online;
4855 if (changed) {
4856 this.#online = online;
4857 this.listeners.forEach((listener) => {
4858 listener(online);
4859 });
4860 }
4861 }
4862 isOnline() {
4863 return this.#online;
4864 }
4865 };
4866 var onlineManager = new OnlineManager();
4867 // Annotate the CommonJS export names for ESM import in node:
4868 0 && (0);
4869 //# sourceMappingURL=onlineManager.cjs.map
4870
4871 /***/ }),
4872
4873 /***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
4874 /*!*****************************************************************************!*\
4875 !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
4876 \*****************************************************************************/
4877 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4878
4879 "use strict";
4880
4881 var __defProp = Object.defineProperty;
4882 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4883 var __getOwnPropNames = Object.getOwnPropertyNames;
4884 var __hasOwnProp = Object.prototype.hasOwnProperty;
4885 var __export = (target, all) => {
4886 for (var name in all)
4887 __defProp(target, name, { get: all[name], enumerable: true });
4888 };
4889 var __copyProps = (to, from, except, desc) => {
4890 if (from && typeof from === "object" || typeof from === "function") {
4891 for (let key of __getOwnPropNames(from))
4892 if (!__hasOwnProp.call(to, key) && key !== except)
4893 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4894 }
4895 return to;
4896 };
4897 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4898
4899 // src/queriesObserver.ts
4900 var queriesObserver_exports = {};
4901 __export(queriesObserver_exports, {
4902 QueriesObserver: () => QueriesObserver
4903 });
4904 module.exports = __toCommonJS(queriesObserver_exports);
4905 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4906 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
4907 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4908 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4909 function difference(array1, array2) {
4910 return array1.filter((x) => !array2.includes(x));
4911 }
4912 function replaceAt(array, index, value) {
4913 const copy = array.slice(0);
4914 copy[index] = value;
4915 return copy;
4916 }
4917 var QueriesObserver = class extends import_subscribable.Subscribable {
4918 #client;
4919 #result;
4920 #queries;
4921 #options;
4922 #observers;
4923 #combinedResult;
4924 #lastCombine;
4925 #lastResult;
4926 constructor(client, queries, options) {
4927 super();
4928 this.#client = client;
4929 this.#options = options;
4930 this.#queries = [];
4931 this.#observers = [];
4932 this.#result = [];
4933 this.setQueries(queries);
4934 }
4935 onSubscribe() {
4936 if (this.listeners.size === 1) {
4937 this.#observers.forEach((observer) => {
4938 observer.subscribe((result) => {
4939 this.#onUpdate(observer, result);
4940 });
4941 });
4942 }
4943 }
4944 onUnsubscribe() {
4945 if (!this.listeners.size) {
4946 this.destroy();
4947 }
4948 }
4949 destroy() {
4950 this.listeners = /* @__PURE__ */ new Set();
4951 this.#observers.forEach((observer) => {
4952 observer.destroy();
4953 });
4954 }
4955 setQueries(queries, options, notifyOptions) {
4956 this.#queries = queries;
4957 this.#options = options;
4958 if (true) {
4959 const queryHashes = queries.map((query) => query.queryHash);
4960 if (new Set(queryHashes).size !== queryHashes.length) {
4961 console.warn(
4962 "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
4963 );
4964 }
4965 }
4966 import_notifyManager.notifyManager.batch(() => {
4967 const prevObservers = this.#observers;
4968 const newObserverMatches = this.#findMatchingObservers(this.#queries);
4969 newObserverMatches.forEach(
4970 (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
4971 );
4972 const newObservers = newObserverMatches.map((match) => match.observer);
4973 const newResult = newObservers.map(
4974 (observer) => observer.getCurrentResult()
4975 );
4976 const hasIndexChange = newObservers.some(
4977 (observer, index) => observer !== prevObservers[index]
4978 );
4979 if (prevObservers.length === newObservers.length && !hasIndexChange) {
4980 return;
4981 }
4982 this.#observers = newObservers;
4983 this.#result = newResult;
4984 if (!this.hasListeners()) {
4985 return;
4986 }
4987 difference(prevObservers, newObservers).forEach((observer) => {
4988 observer.destroy();
4989 });
4990 difference(newObservers, prevObservers).forEach((observer) => {
4991 observer.subscribe((result) => {
4992 this.#onUpdate(observer, result);
4993 });
4994 });
4995 this.#notify();
4996 });
4997 }
4998 getCurrentResult() {
4999 return this.#result;
5000 }
5001 getQueries() {
5002 return this.#observers.map((observer) => observer.getCurrentQuery());
5003 }
5004 getObservers() {
5005 return this.#observers;
5006 }
5007 getOptimisticResult(queries, combine) {
5008 const matches = this.#findMatchingObservers(queries);
5009 const result = matches.map(
5010 (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
5011 );
5012 return [
5013 result,
5014 (r) => {
5015 return this.#combineResult(r ?? result, combine);
5016 },
5017 () => {
5018 return this.#trackResult(result, queries);
5019 }
5020 ];
5021 }
5022 #trackResult(result, queries) {
5023 const matches = this.#findMatchingObservers(queries);
5024 return matches.map((match, index) => {
5025 const observerResult = result[index];
5026 return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {
5027 matches.forEach((m) => {
5028 m.observer.trackProp(accessedProp);
5029 });
5030 }) : observerResult;
5031 });
5032 }
5033 #combineResult(input, combine) {
5034 if (combine) {
5035 if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) {
5036 this.#lastCombine = combine;
5037 this.#lastResult = this.#result;
5038 this.#combinedResult = (0, import_utils.replaceEqualDeep)(
5039 this.#combinedResult,
5040 combine(input)
5041 );
5042 }
5043 return this.#combinedResult;
5044 }
5045 return input;
5046 }
5047 #findMatchingObservers(queries) {
5048 const prevObserversMap = new Map(
5049 this.#observers.map((observer) => [observer.options.queryHash, observer])
5050 );
5051 const observers = [];
5052 queries.forEach((options) => {
5053 const defaultedOptions = this.#client.defaultQueryOptions(options);
5054 const match = prevObserversMap.get(defaultedOptions.queryHash);
5055 if (match) {
5056 observers.push({
5057 defaultedQueryOptions: defaultedOptions,
5058 observer: match
5059 });
5060 } else {
5061 observers.push({
5062 defaultedQueryOptions: defaultedOptions,
5063 observer: new import_queryObserver.QueryObserver(this.#client, defaultedOptions)
5064 });
5065 }
5066 });
5067 return observers;
5068 }
5069 #onUpdate(observer, result) {
5070 const index = this.#observers.indexOf(observer);
5071 if (index !== -1) {
5072 this.#result = replaceAt(this.#result, index, result);
5073 this.#notify();
5074 }
5075 }
5076 #notify() {
5077 if (this.hasListeners()) {
5078 const previousResult = this.#combinedResult;
5079 const newResult = this.#combineResult(
5080 this.#trackResult(this.#result, this.#queries),
5081 this.#options?.combine
5082 );
5083 if (previousResult !== newResult) {
5084 import_notifyManager.notifyManager.batch(() => {
5085 this.listeners.forEach((listener) => {
5086 listener(this.#result);
5087 });
5088 });
5089 }
5090 }
5091 }
5092 };
5093 // Annotate the CommonJS export names for ESM import in node:
5094 0 && (0);
5095 //# sourceMappingURL=queriesObserver.cjs.map
5096
5097 /***/ }),
5098
5099 /***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
5100 /*!*******************************************************************!*\
5101 !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
5102 \*******************************************************************/
5103 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5104
5105 "use strict";
5106
5107 var __defProp = Object.defineProperty;
5108 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5109 var __getOwnPropNames = Object.getOwnPropertyNames;
5110 var __hasOwnProp = Object.prototype.hasOwnProperty;
5111 var __export = (target, all) => {
5112 for (var name in all)
5113 __defProp(target, name, { get: all[name], enumerable: true });
5114 };
5115 var __copyProps = (to, from, except, desc) => {
5116 if (from && typeof from === "object" || typeof from === "function") {
5117 for (let key of __getOwnPropNames(from))
5118 if (!__hasOwnProp.call(to, key) && key !== except)
5119 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5120 }
5121 return to;
5122 };
5123 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5124
5125 // src/query.ts
5126 var query_exports = {};
5127 __export(query_exports, {
5128 Query: () => Query,
5129 fetchState: () => fetchState
5130 });
5131 module.exports = __toCommonJS(query_exports);
5132 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5133 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5134 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
5135 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
5136 var Query = class extends import_removable.Removable {
5137 #initialState;
5138 #revertState;
5139 #cache;
5140 #retryer;
5141 #defaultOptions;
5142 #abortSignalConsumed;
5143 constructor(config) {
5144 super();
5145 this.#abortSignalConsumed = false;
5146 this.#defaultOptions = config.defaultOptions;
5147 this.setOptions(config.options);
5148 this.observers = [];
5149 this.#cache = config.cache;
5150 this.queryKey = config.queryKey;
5151 this.queryHash = config.queryHash;
5152 this.#initialState = getDefaultState(this.options);
5153 this.state = config.state ?? this.#initialState;
5154 this.scheduleGc();
5155 }
5156 get meta() {
5157 return this.options.meta;
5158 }
5159 get promise() {
5160 return this.#retryer?.promise;
5161 }
5162 setOptions(options) {
5163 this.options = { ...this.#defaultOptions, ...options };
5164 this.updateGcTime(this.options.gcTime);
5165 }
5166 optionalRemove() {
5167 if (!this.observers.length && this.state.fetchStatus === "idle") {
5168 this.#cache.remove(this);
5169 }
5170 }
5171 setData(newData, options) {
5172 const data = (0, import_utils.replaceData)(this.state.data, newData, this.options);
5173 this.#dispatch({
5174 data,
5175 type: "success",
5176 dataUpdatedAt: options?.updatedAt,
5177 manual: options?.manual
5178 });
5179 return data;
5180 }
5181 setState(state, setStateOptions) {
5182 this.#dispatch({ type: "setState", state, setStateOptions });
5183 }
5184 cancel(options) {
5185 const promise = this.#retryer?.promise;
5186 this.#retryer?.cancel(options);
5187 return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
5188 }
5189 destroy() {
5190 super.destroy();
5191 this.cancel({ silent: true });
5192 }
5193 reset() {
5194 this.destroy();
5195 this.setState(this.#initialState);
5196 }
5197 isActive() {
5198 return this.observers.some(
5199 (observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false
5200 );
5201 }
5202 isDisabled() {
5203 if (this.getObserversCount() > 0) {
5204 return !this.isActive();
5205 }
5206 return this.options.queryFn === import_utils.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
5207 }
5208 isStale() {
5209 if (this.state.isInvalidated) {
5210 return true;
5211 }
5212 if (this.getObserversCount() > 0) {
5213 return this.observers.some(
5214 (observer) => observer.getCurrentResult().isStale
5215 );
5216 }
5217 return this.state.data === void 0;
5218 }
5219 isStaleByTime(staleTime = 0) {
5220 return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
5221 }
5222 onFocus() {
5223 const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
5224 observer?.refetch({ cancelRefetch: false });
5225 this.#retryer?.continue();
5226 }
5227 onOnline() {
5228 const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
5229 observer?.refetch({ cancelRefetch: false });
5230 this.#retryer?.continue();
5231 }
5232 addObserver(observer) {
5233 if (!this.observers.includes(observer)) {
5234 this.observers.push(observer);
5235 this.clearGcTimeout();
5236 this.#cache.notify({ type: "observerAdded", query: this, observer });
5237 }
5238 }
5239 removeObserver(observer) {
5240 if (this.observers.includes(observer)) {
5241 this.observers = this.observers.filter((x) => x !== observer);
5242 if (!this.observers.length) {
5243 if (this.#retryer) {
5244 if (this.#abortSignalConsumed) {
5245 this.#retryer.cancel({ revert: true });
5246 } else {
5247 this.#retryer.cancelRetry();
5248 }
5249 }
5250 this.scheduleGc();
5251 }
5252 this.#cache.notify({ type: "observerRemoved", query: this, observer });
5253 }
5254 }
5255 getObserversCount() {
5256 return this.observers.length;
5257 }
5258 invalidate() {
5259 if (!this.state.isInvalidated) {
5260 this.#dispatch({ type: "invalidate" });
5261 }
5262 }
5263 fetch(options, fetchOptions) {
5264 if (this.state.fetchStatus !== "idle") {
5265 if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {
5266 this.cancel({ silent: true });
5267 } else if (this.#retryer) {
5268 this.#retryer.continueRetry();
5269 return this.#retryer.promise;
5270 }
5271 }
5272 if (options) {
5273 this.setOptions(options);
5274 }
5275 if (!this.options.queryFn) {
5276 const observer = this.observers.find((x) => x.options.queryFn);
5277 if (observer) {
5278 this.setOptions(observer.options);
5279 }
5280 }
5281 if (true) {
5282 if (!Array.isArray(this.options.queryKey)) {
5283 console.error(
5284 `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']`
5285 );
5286 }
5287 }
5288 const abortController = new AbortController();
5289 const addSignalProperty = (object) => {
5290 Object.defineProperty(object, "signal", {
5291 enumerable: true,
5292 get: () => {
5293 this.#abortSignalConsumed = true;
5294 return abortController.signal;
5295 }
5296 });
5297 };
5298 const fetchFn = () => {
5299 const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions);
5300 const queryFnContext = {
5301 queryKey: this.queryKey,
5302 meta: this.meta
5303 };
5304 addSignalProperty(queryFnContext);
5305 this.#abortSignalConsumed = false;
5306 if (this.options.persister) {
5307 return this.options.persister(
5308 queryFn,
5309 queryFnContext,
5310 this
5311 );
5312 }
5313 return queryFn(queryFnContext);
5314 };
5315 const context = {
5316 fetchOptions,
5317 options: this.options,
5318 queryKey: this.queryKey,
5319 state: this.state,
5320 fetchFn
5321 };
5322 addSignalProperty(context);
5323 this.options.behavior?.onFetch(
5324 context,
5325 this
5326 );
5327 this.#revertState = this.state;
5328 if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
5329 this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
5330 }
5331 const onError = (error) => {
5332 if (!((0, import_retryer.isCancelledError)(error) && error.silent)) {
5333 this.#dispatch({
5334 type: "error",
5335 error
5336 });
5337 }
5338 if (!(0, import_retryer.isCancelledError)(error)) {
5339 this.#cache.config.onError?.(
5340 error,
5341 this
5342 );
5343 this.#cache.config.onSettled?.(
5344 this.state.data,
5345 error,
5346 this
5347 );
5348 }
5349 this.scheduleGc();
5350 };
5351 this.#retryer = (0, import_retryer.createRetryer)({
5352 initialPromise: fetchOptions?.initialPromise,
5353 fn: context.fetchFn,
5354 abort: abortController.abort.bind(abortController),
5355 onSuccess: (data) => {
5356 if (data === void 0) {
5357 if (true) {
5358 console.error(
5359 `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
5360 );
5361 }
5362 onError(new Error(`${this.queryHash} data is undefined`));
5363 return;
5364 }
5365 try {
5366 this.setData(data);
5367 } catch (error) {
5368 onError(error);
5369 return;
5370 }
5371 this.#cache.config.onSuccess?.(data, this);
5372 this.#cache.config.onSettled?.(
5373 data,
5374 this.state.error,
5375 this
5376 );
5377 this.scheduleGc();
5378 },
5379 onError,
5380 onFail: (failureCount, error) => {
5381 this.#dispatch({ type: "failed", failureCount, error });
5382 },
5383 onPause: () => {
5384 this.#dispatch({ type: "pause" });
5385 },
5386 onContinue: () => {
5387 this.#dispatch({ type: "continue" });
5388 },
5389 retry: context.options.retry,
5390 retryDelay: context.options.retryDelay,
5391 networkMode: context.options.networkMode,
5392 canRun: () => true
5393 });
5394 return this.#retryer.start();
5395 }
5396 #dispatch(action) {
5397 const reducer = (state) => {
5398 switch (action.type) {
5399 case "failed":
5400 return {
5401 ...state,
5402 fetchFailureCount: action.failureCount,
5403 fetchFailureReason: action.error
5404 };
5405 case "pause":
5406 return {
5407 ...state,
5408 fetchStatus: "paused"
5409 };
5410 case "continue":
5411 return {
5412 ...state,
5413 fetchStatus: "fetching"
5414 };
5415 case "fetch":
5416 return {
5417 ...state,
5418 ...fetchState(state.data, this.options),
5419 fetchMeta: action.meta ?? null
5420 };
5421 case "success":
5422 return {
5423 ...state,
5424 data: action.data,
5425 dataUpdateCount: state.dataUpdateCount + 1,
5426 dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
5427 error: null,
5428 isInvalidated: false,
5429 status: "success",
5430 ...!action.manual && {
5431 fetchStatus: "idle",
5432 fetchFailureCount: 0,
5433 fetchFailureReason: null
5434 }
5435 };
5436 case "error":
5437 const error = action.error;
5438 if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) {
5439 return { ...this.#revertState, fetchStatus: "idle" };
5440 }
5441 return {
5442 ...state,
5443 error,
5444 errorUpdateCount: state.errorUpdateCount + 1,
5445 errorUpdatedAt: Date.now(),
5446 fetchFailureCount: state.fetchFailureCount + 1,
5447 fetchFailureReason: error,
5448 fetchStatus: "idle",
5449 status: "error"
5450 };
5451 case "invalidate":
5452 return {
5453 ...state,
5454 isInvalidated: true
5455 };
5456 case "setState":
5457 return {
5458 ...state,
5459 ...action.state
5460 };
5461 }
5462 };
5463 this.state = reducer(this.state);
5464 import_notifyManager.notifyManager.batch(() => {
5465 this.observers.forEach((observer) => {
5466 observer.onQueryUpdate();
5467 });
5468 this.#cache.notify({ query: this, type: "updated", action });
5469 });
5470 }
5471 };
5472 function fetchState(data, options) {
5473 return {
5474 fetchFailureCount: 0,
5475 fetchFailureReason: null,
5476 fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused",
5477 ...data === void 0 && {
5478 error: null,
5479 status: "pending"
5480 }
5481 };
5482 }
5483 function getDefaultState(options) {
5484 const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
5485 const hasData = data !== void 0;
5486 const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
5487 return {
5488 data,
5489 dataUpdateCount: 0,
5490 dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
5491 error: null,
5492 errorUpdateCount: 0,
5493 errorUpdatedAt: 0,
5494 fetchFailureCount: 0,
5495 fetchFailureReason: null,
5496 fetchMeta: null,
5497 isInvalidated: false,
5498 status: hasData ? "success" : "pending",
5499 fetchStatus: "idle"
5500 };
5501 }
5502 // Annotate the CommonJS export names for ESM import in node:
5503 0 && (0);
5504 //# sourceMappingURL=query.cjs.map
5505
5506 /***/ }),
5507
5508 /***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
5509 /*!************************************************************************!*\
5510 !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
5511 \************************************************************************/
5512 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5513
5514 "use strict";
5515
5516 var __defProp = Object.defineProperty;
5517 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5518 var __getOwnPropNames = Object.getOwnPropertyNames;
5519 var __hasOwnProp = Object.prototype.hasOwnProperty;
5520 var __export = (target, all) => {
5521 for (var name in all)
5522 __defProp(target, name, { get: all[name], enumerable: true });
5523 };
5524 var __copyProps = (to, from, except, desc) => {
5525 if (from && typeof from === "object" || typeof from === "function") {
5526 for (let key of __getOwnPropNames(from))
5527 if (!__hasOwnProp.call(to, key) && key !== except)
5528 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5529 }
5530 return to;
5531 };
5532 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5533
5534 // src/queryCache.ts
5535 var queryCache_exports = {};
5536 __export(queryCache_exports, {
5537 QueryCache: () => QueryCache
5538 });
5539 module.exports = __toCommonJS(queryCache_exports);
5540 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5541 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
5542 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5543 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
5544 var QueryCache = class extends import_subscribable.Subscribable {
5545 constructor(config = {}) {
5546 super();
5547 this.config = config;
5548 this.#queries = /* @__PURE__ */ new Map();
5549 }
5550 #queries;
5551 build(client, options, state) {
5552 const queryKey = options.queryKey;
5553 const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options);
5554 let query = this.get(queryHash);
5555 if (!query) {
5556 query = new import_query.Query({
5557 cache: this,
5558 queryKey,
5559 queryHash,
5560 options: client.defaultQueryOptions(options),
5561 state,
5562 defaultOptions: client.getQueryDefaults(queryKey)
5563 });
5564 this.add(query);
5565 }
5566 return query;
5567 }
5568 add(query) {
5569 if (!this.#queries.has(query.queryHash)) {
5570 this.#queries.set(query.queryHash, query);
5571 this.notify({
5572 type: "added",
5573 query
5574 });
5575 }
5576 }
5577 remove(query) {
5578 const queryInMap = this.#queries.get(query.queryHash);
5579 if (queryInMap) {
5580 query.destroy();
5581 if (queryInMap === query) {
5582 this.#queries.delete(query.queryHash);
5583 }
5584 this.notify({ type: "removed", query });
5585 }
5586 }
5587 clear() {
5588 import_notifyManager.notifyManager.batch(() => {
5589 this.getAll().forEach((query) => {
5590 this.remove(query);
5591 });
5592 });
5593 }
5594 get(queryHash) {
5595 return this.#queries.get(queryHash);
5596 }
5597 getAll() {
5598 return [...this.#queries.values()];
5599 }
5600 find(filters) {
5601 const defaultedFilters = { exact: true, ...filters };
5602 return this.getAll().find(
5603 (query) => (0, import_utils.matchQuery)(defaultedFilters, query)
5604 );
5605 }
5606 findAll(filters = {}) {
5607 const queries = this.getAll();
5608 return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
5609 }
5610 notify(event) {
5611 import_notifyManager.notifyManager.batch(() => {
5612 this.listeners.forEach((listener) => {
5613 listener(event);
5614 });
5615 });
5616 }
5617 onFocus() {
5618 import_notifyManager.notifyManager.batch(() => {
5619 this.getAll().forEach((query) => {
5620 query.onFocus();
5621 });
5622 });
5623 }
5624 onOnline() {
5625 import_notifyManager.notifyManager.batch(() => {
5626 this.getAll().forEach((query) => {
5627 query.onOnline();
5628 });
5629 });
5630 }
5631 };
5632 // Annotate the CommonJS export names for ESM import in node:
5633 0 && (0);
5634 //# sourceMappingURL=queryCache.cjs.map
5635
5636 /***/ }),
5637
5638 /***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
5639 /*!*************************************************************************!*\
5640 !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
5641 \*************************************************************************/
5642 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5643
5644 "use strict";
5645
5646 var __defProp = Object.defineProperty;
5647 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5648 var __getOwnPropNames = Object.getOwnPropertyNames;
5649 var __hasOwnProp = Object.prototype.hasOwnProperty;
5650 var __export = (target, all) => {
5651 for (var name in all)
5652 __defProp(target, name, { get: all[name], enumerable: true });
5653 };
5654 var __copyProps = (to, from, except, desc) => {
5655 if (from && typeof from === "object" || typeof from === "function") {
5656 for (let key of __getOwnPropNames(from))
5657 if (!__hasOwnProp.call(to, key) && key !== except)
5658 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5659 }
5660 return to;
5661 };
5662 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5663
5664 // src/queryClient.ts
5665 var queryClient_exports = {};
5666 __export(queryClient_exports, {
5667 QueryClient: () => QueryClient
5668 });
5669 module.exports = __toCommonJS(queryClient_exports);
5670 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5671 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
5672 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
5673 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5674 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
5675 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5676 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
5677 var QueryClient = class {
5678 #queryCache;
5679 #mutationCache;
5680 #defaultOptions;
5681 #queryDefaults;
5682 #mutationDefaults;
5683 #mountCount;
5684 #unsubscribeFocus;
5685 #unsubscribeOnline;
5686 constructor(config = {}) {
5687 this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
5688 this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache();
5689 this.#defaultOptions = config.defaultOptions || {};
5690 this.#queryDefaults = /* @__PURE__ */ new Map();
5691 this.#mutationDefaults = /* @__PURE__ */ new Map();
5692 this.#mountCount = 0;
5693 }
5694 mount() {
5695 this.#mountCount++;
5696 if (this.#mountCount !== 1)
5697 return;
5698 this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(async (focused) => {
5699 if (focused) {
5700 await this.resumePausedMutations();
5701 this.#queryCache.onFocus();
5702 }
5703 });
5704 this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => {
5705 if (online) {
5706 await this.resumePausedMutations();
5707 this.#queryCache.onOnline();
5708 }
5709 });
5710 }
5711 unmount() {
5712 this.#mountCount--;
5713 if (this.#mountCount !== 0)
5714 return;
5715 this.#unsubscribeFocus?.();
5716 this.#unsubscribeFocus = void 0;
5717 this.#unsubscribeOnline?.();
5718 this.#unsubscribeOnline = void 0;
5719 }
5720 isFetching(filters) {
5721 return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
5722 }
5723 isMutating(filters) {
5724 return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
5725 }
5726 getQueryData(queryKey) {
5727 const options = this.defaultQueryOptions({ queryKey });
5728 return this.#queryCache.get(options.queryHash)?.state.data;
5729 }
5730 ensureQueryData(options) {
5731 const defaultedOptions = this.defaultQueryOptions(options);
5732 const query = this.#queryCache.build(this, defaultedOptions);
5733 const cachedData = query.state.data;
5734 if (cachedData === void 0) {
5735 return this.fetchQuery(options);
5736 }
5737 if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) {
5738 void this.prefetchQuery(defaultedOptions);
5739 }
5740 return Promise.resolve(cachedData);
5741 }
5742 getQueriesData(filters) {
5743 return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
5744 const data = state.data;
5745 return [queryKey, data];
5746 });
5747 }
5748 setQueryData(queryKey, updater, options) {
5749 const defaultedOptions = this.defaultQueryOptions({ queryKey });
5750 const query = this.#queryCache.get(
5751 defaultedOptions.queryHash
5752 );
5753 const prevData = query?.state.data;
5754 const data = (0, import_utils.functionalUpdate)(updater, prevData);
5755 if (data === void 0) {
5756 return void 0;
5757 }
5758 return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
5759 }
5760 setQueriesData(filters, updater, options) {
5761 return import_notifyManager.notifyManager.batch(
5762 () => this.#queryCache.findAll(filters).map(({ queryKey }) => [
5763 queryKey,
5764 this.setQueryData(queryKey, updater, options)
5765 ])
5766 );
5767 }
5768 getQueryState(queryKey) {
5769 const options = this.defaultQueryOptions({ queryKey });
5770 return this.#queryCache.get(
5771 options.queryHash
5772 )?.state;
5773 }
5774 removeQueries(filters) {
5775 const queryCache = this.#queryCache;
5776 import_notifyManager.notifyManager.batch(() => {
5777 queryCache.findAll(filters).forEach((query) => {
5778 queryCache.remove(query);
5779 });
5780 });
5781 }
5782 resetQueries(filters, options) {
5783 const queryCache = this.#queryCache;
5784 const refetchFilters = {
5785 type: "active",
5786 ...filters
5787 };
5788 return import_notifyManager.notifyManager.batch(() => {
5789 queryCache.findAll(filters).forEach((query) => {
5790 query.reset();
5791 });
5792 return this.refetchQueries(refetchFilters, options);
5793 });
5794 }
5795 cancelQueries(filters, cancelOptions = {}) {
5796 const defaultedCancelOptions = { revert: true, ...cancelOptions };
5797 const promises = import_notifyManager.notifyManager.batch(
5798 () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
5799 );
5800 return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
5801 }
5802 invalidateQueries(filters, options = {}) {
5803 return import_notifyManager.notifyManager.batch(() => {
5804 this.#queryCache.findAll(filters).forEach((query) => {
5805 query.invalidate();
5806 });
5807 if (filters?.refetchType === "none") {
5808 return Promise.resolve();
5809 }
5810 const refetchFilters = {
5811 ...filters,
5812 type: filters?.refetchType ?? filters?.type ?? "active"
5813 };
5814 return this.refetchQueries(refetchFilters, options);
5815 });
5816 }
5817 refetchQueries(filters, options = {}) {
5818 const fetchOptions = {
5819 ...options,
5820 cancelRefetch: options.cancelRefetch ?? true
5821 };
5822 const promises = import_notifyManager.notifyManager.batch(
5823 () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
5824 let promise = query.fetch(void 0, fetchOptions);
5825 if (!fetchOptions.throwOnError) {
5826 promise = promise.catch(import_utils.noop);
5827 }
5828 return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
5829 })
5830 );
5831 return Promise.all(promises).then(import_utils.noop);
5832 }
5833 fetchQuery(options) {
5834 const defaultedOptions = this.defaultQueryOptions(options);
5835 if (defaultedOptions.retry === void 0) {
5836 defaultedOptions.retry = false;
5837 }
5838 const query = this.#queryCache.build(this, defaultedOptions);
5839 return query.isStaleByTime(
5840 (0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query)
5841 ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
5842 }
5843 prefetchQuery(options) {
5844 return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
5845 }
5846 fetchInfiniteQuery(options) {
5847 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5848 return this.fetchQuery(options);
5849 }
5850 prefetchInfiniteQuery(options) {
5851 return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
5852 }
5853 ensureInfiniteQueryData(options) {
5854 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5855 return this.ensureQueryData(options);
5856 }
5857 resumePausedMutations() {
5858 if (import_onlineManager.onlineManager.isOnline()) {
5859 return this.#mutationCache.resumePausedMutations();
5860 }
5861 return Promise.resolve();
5862 }
5863 getQueryCache() {
5864 return this.#queryCache;
5865 }
5866 getMutationCache() {
5867 return this.#mutationCache;
5868 }
5869 getDefaultOptions() {
5870 return this.#defaultOptions;
5871 }
5872 setDefaultOptions(options) {
5873 this.#defaultOptions = options;
5874 }
5875 setQueryDefaults(queryKey, options) {
5876 this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
5877 queryKey,
5878 defaultOptions: options
5879 });
5880 }
5881 getQueryDefaults(queryKey) {
5882 const defaults = [...this.#queryDefaults.values()];
5883 const result = {};
5884 defaults.forEach((queryDefault) => {
5885 if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
5886 Object.assign(result, queryDefault.defaultOptions);
5887 }
5888 });
5889 return result;
5890 }
5891 setMutationDefaults(mutationKey, options) {
5892 this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
5893 mutationKey,
5894 defaultOptions: options
5895 });
5896 }
5897 getMutationDefaults(mutationKey) {
5898 const defaults = [...this.#mutationDefaults.values()];
5899 let result = {};
5900 defaults.forEach((queryDefault) => {
5901 if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
5902 result = { ...result, ...queryDefault.defaultOptions };
5903 }
5904 });
5905 return result;
5906 }
5907 defaultQueryOptions(options) {
5908 if (options._defaulted) {
5909 return options;
5910 }
5911 const defaultedOptions = {
5912 ...this.#defaultOptions.queries,
5913 ...this.getQueryDefaults(options.queryKey),
5914 ...options,
5915 _defaulted: true
5916 };
5917 if (!defaultedOptions.queryHash) {
5918 defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
5919 defaultedOptions.queryKey,
5920 defaultedOptions
5921 );
5922 }
5923 if (defaultedOptions.refetchOnReconnect === void 0) {
5924 defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
5925 }
5926 if (defaultedOptions.throwOnError === void 0) {
5927 defaultedOptions.throwOnError = !!defaultedOptions.suspense;
5928 }
5929 if (!defaultedOptions.networkMode && defaultedOptions.persister) {
5930 defaultedOptions.networkMode = "offlineFirst";
5931 }
5932 if (defaultedOptions.queryFn === import_utils.skipToken) {
5933 defaultedOptions.enabled = false;
5934 }
5935 return defaultedOptions;
5936 }
5937 defaultMutationOptions(options) {
5938 if (options?._defaulted) {
5939 return options;
5940 }
5941 return {
5942 ...this.#defaultOptions.mutations,
5943 ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
5944 ...options,
5945 _defaulted: true
5946 };
5947 }
5948 clear() {
5949 this.#queryCache.clear();
5950 this.#mutationCache.clear();
5951 }
5952 };
5953 // Annotate the CommonJS export names for ESM import in node:
5954 0 && (0);
5955 //# sourceMappingURL=queryClient.cjs.map
5956
5957 /***/ }),
5958
5959 /***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
5960 /*!***************************************************************************!*\
5961 !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
5962 \***************************************************************************/
5963 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5964
5965 "use strict";
5966
5967 var __defProp = Object.defineProperty;
5968 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5969 var __getOwnPropNames = Object.getOwnPropertyNames;
5970 var __hasOwnProp = Object.prototype.hasOwnProperty;
5971 var __export = (target, all) => {
5972 for (var name in all)
5973 __defProp(target, name, { get: all[name], enumerable: true });
5974 };
5975 var __copyProps = (to, from, except, desc) => {
5976 if (from && typeof from === "object" || typeof from === "function") {
5977 for (let key of __getOwnPropNames(from))
5978 if (!__hasOwnProp.call(to, key) && key !== except)
5979 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5980 }
5981 return to;
5982 };
5983 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5984
5985 // src/queryObserver.ts
5986 var queryObserver_exports = {};
5987 __export(queryObserver_exports, {
5988 QueryObserver: () => QueryObserver
5989 });
5990 module.exports = __toCommonJS(queryObserver_exports);
5991 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5992 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5993 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
5994 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
5995 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
5996 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5997 var QueryObserver = class extends import_subscribable.Subscribable {
5998 constructor(client, options) {
5999 super();
6000 this.options = options;
6001 this.#client = client;
6002 this.#selectError = null;
6003 this.#currentThenable = (0, import_thenable.pendingThenable)();
6004 if (!this.options.experimental_prefetchInRender) {
6005 this.#currentThenable.reject(
6006 new Error("experimental_prefetchInRender feature flag is not enabled")
6007 );
6008 }
6009 this.bindMethods();
6010 this.setOptions(options);
6011 }
6012 #client;
6013 #currentQuery = void 0;
6014 #currentQueryInitialState = void 0;
6015 #currentResult = void 0;
6016 #currentResultState;
6017 #currentResultOptions;
6018 #currentThenable;
6019 #selectError;
6020 #selectFn;
6021 #selectResult;
6022 // This property keeps track of the last query with defined data.
6023 // It will be used to pass the previous data and query to the placeholder function between renders.
6024 #lastQueryWithDefinedData;
6025 #staleTimeoutId;
6026 #refetchIntervalId;
6027 #currentRefetchInterval;
6028 #trackedProps = /* @__PURE__ */ new Set();
6029 bindMethods() {
6030 this.refetch = this.refetch.bind(this);
6031 }
6032 onSubscribe() {
6033 if (this.listeners.size === 1) {
6034 this.#currentQuery.addObserver(this);
6035 if (shouldFetchOnMount(this.#currentQuery, this.options)) {
6036 this.#executeFetch();
6037 } else {
6038 this.updateResult();
6039 }
6040 this.#updateTimers();
6041 }
6042 }
6043 onUnsubscribe() {
6044 if (!this.hasListeners()) {
6045 this.destroy();
6046 }
6047 }
6048 shouldFetchOnReconnect() {
6049 return shouldFetchOn(
6050 this.#currentQuery,
6051 this.options,
6052 this.options.refetchOnReconnect
6053 );
6054 }
6055 shouldFetchOnWindowFocus() {
6056 return shouldFetchOn(
6057 this.#currentQuery,
6058 this.options,
6059 this.options.refetchOnWindowFocus
6060 );
6061 }
6062 destroy() {
6063 this.listeners = /* @__PURE__ */ new Set();
6064 this.#clearStaleTimeout();
6065 this.#clearRefetchInterval();
6066 this.#currentQuery.removeObserver(this);
6067 }
6068 setOptions(options, notifyOptions) {
6069 const prevOptions = this.options;
6070 const prevQuery = this.#currentQuery;
6071 this.options = this.#client.defaultQueryOptions(options);
6072 if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") {
6073 throw new Error(
6074 "Expected enabled to be a boolean or a callback that returns a boolean"
6075 );
6076 }
6077 this.#updateQuery();
6078 this.#currentQuery.setOptions(this.options);
6079 if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
6080 this.#client.getQueryCache().notify({
6081 type: "observerOptionsUpdated",
6082 query: this.#currentQuery,
6083 observer: this
6084 });
6085 }
6086 const mounted = this.hasListeners();
6087 if (mounted && shouldFetchOptionally(
6088 this.#currentQuery,
6089 prevQuery,
6090 this.options,
6091 prevOptions
6092 )) {
6093 this.#executeFetch();
6094 }
6095 this.updateResult(notifyOptions);
6096 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0, import_utils.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0, import_utils.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) {
6097 this.#updateStaleTimeout();
6098 }
6099 const nextRefetchInterval = this.#computeRefetchInterval();
6100 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
6101 this.#updateRefetchInterval(nextRefetchInterval);
6102 }
6103 }
6104 getOptimisticResult(options) {
6105 const query = this.#client.getQueryCache().build(this.#client, options);
6106 const result = this.createResult(query, options);
6107 if (shouldAssignObserverCurrentProperties(this, result)) {
6108 this.#currentResult = result;
6109 this.#currentResultOptions = this.options;
6110 this.#currentResultState = this.#currentQuery.state;
6111 }
6112 return result;
6113 }
6114 getCurrentResult() {
6115 return this.#currentResult;
6116 }
6117 trackResult(result, onPropTracked) {
6118 const trackedResult = {};
6119 Object.keys(result).forEach((key) => {
6120 Object.defineProperty(trackedResult, key, {
6121 configurable: false,
6122 enumerable: true,
6123 get: () => {
6124 this.trackProp(key);
6125 onPropTracked?.(key);
6126 return result[key];
6127 }
6128 });
6129 });
6130 return trackedResult;
6131 }
6132 trackProp(key) {
6133 this.#trackedProps.add(key);
6134 }
6135 getCurrentQuery() {
6136 return this.#currentQuery;
6137 }
6138 refetch({ ...options } = {}) {
6139 return this.fetch({
6140 ...options
6141 });
6142 }
6143 fetchOptimistic(options) {
6144 const defaultedOptions = this.#client.defaultQueryOptions(options);
6145 const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
6146 return query.fetch().then(() => this.createResult(query, defaultedOptions));
6147 }
6148 fetch(fetchOptions) {
6149 return this.#executeFetch({
6150 ...fetchOptions,
6151 cancelRefetch: fetchOptions.cancelRefetch ?? true
6152 }).then(() => {
6153 this.updateResult();
6154 return this.#currentResult;
6155 });
6156 }
6157 #executeFetch(fetchOptions) {
6158 this.#updateQuery();
6159 let promise = this.#currentQuery.fetch(
6160 this.options,
6161 fetchOptions
6162 );
6163 if (!fetchOptions?.throwOnError) {
6164 promise = promise.catch(import_utils.noop);
6165 }
6166 return promise;
6167 }
6168 #updateStaleTimeout() {
6169 this.#clearStaleTimeout();
6170 const staleTime = (0, import_utils.resolveStaleTime)(
6171 this.options.staleTime,
6172 this.#currentQuery
6173 );
6174 if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) {
6175 return;
6176 }
6177 const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime);
6178 const timeout = time + 1;
6179 this.#staleTimeoutId = setTimeout(() => {
6180 if (!this.#currentResult.isStale) {
6181 this.updateResult();
6182 }
6183 }, timeout);
6184 }
6185 #computeRefetchInterval() {
6186 return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
6187 }
6188 #updateRefetchInterval(nextInterval) {
6189 this.#clearRefetchInterval();
6190 this.#currentRefetchInterval = nextInterval;
6191 if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
6192 return;
6193 }
6194 this.#refetchIntervalId = setInterval(() => {
6195 if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
6196 this.#executeFetch();
6197 }
6198 }, this.#currentRefetchInterval);
6199 }
6200 #updateTimers() {
6201 this.#updateStaleTimeout();
6202 this.#updateRefetchInterval(this.#computeRefetchInterval());
6203 }
6204 #clearStaleTimeout() {
6205 if (this.#staleTimeoutId) {
6206 clearTimeout(this.#staleTimeoutId);
6207 this.#staleTimeoutId = void 0;
6208 }
6209 }
6210 #clearRefetchInterval() {
6211 if (this.#refetchIntervalId) {
6212 clearInterval(this.#refetchIntervalId);
6213 this.#refetchIntervalId = void 0;
6214 }
6215 }
6216 createResult(query, options) {
6217 const prevQuery = this.#currentQuery;
6218 const prevOptions = this.options;
6219 const prevResult = this.#currentResult;
6220 const prevResultState = this.#currentResultState;
6221 const prevResultOptions = this.#currentResultOptions;
6222 const queryChange = query !== prevQuery;
6223 const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
6224 const { state } = query;
6225 let newState = { ...state };
6226 let isPlaceholderData = false;
6227 let data;
6228 if (options._optimisticResults) {
6229 const mounted = this.hasListeners();
6230 const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
6231 const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
6232 if (fetchOnMount || fetchOptionally) {
6233 newState = {
6234 ...newState,
6235 ...(0, import_query.fetchState)(state.data, query.options)
6236 };
6237 }
6238 if (options._optimisticResults === "isRestoring") {
6239 newState.fetchStatus = "idle";
6240 }
6241 }
6242 let { error, errorUpdatedAt, status } = newState;
6243 if (options.select && newState.data !== void 0) {
6244 if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {
6245 data = this.#selectResult;
6246 } else {
6247 try {
6248 this.#selectFn = options.select;
6249 data = options.select(newState.data);
6250 data = (0, import_utils.replaceData)(prevResult?.data, data, options);
6251 this.#selectResult = data;
6252 this.#selectError = null;
6253 } catch (selectError) {
6254 this.#selectError = selectError;
6255 }
6256 }
6257 } else {
6258 data = newState.data;
6259 }
6260 if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
6261 let placeholderData;
6262 if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
6263 placeholderData = prevResult.data;
6264 } else {
6265 placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
6266 this.#lastQueryWithDefinedData?.state.data,
6267 this.#lastQueryWithDefinedData
6268 ) : options.placeholderData;
6269 if (options.select && placeholderData !== void 0) {
6270 try {
6271 placeholderData = options.select(placeholderData);
6272 this.#selectError = null;
6273 } catch (selectError) {
6274 this.#selectError = selectError;
6275 }
6276 }
6277 }
6278 if (placeholderData !== void 0) {
6279 status = "success";
6280 data = (0, import_utils.replaceData)(
6281 prevResult?.data,
6282 placeholderData,
6283 options
6284 );
6285 isPlaceholderData = true;
6286 }
6287 }
6288 if (this.#selectError) {
6289 error = this.#selectError;
6290 data = this.#selectResult;
6291 errorUpdatedAt = Date.now();
6292 status = "error";
6293 }
6294 const isFetching = newState.fetchStatus === "fetching";
6295 const isPending = status === "pending";
6296 const isError = status === "error";
6297 const isLoading = isPending && isFetching;
6298 const hasData = data !== void 0;
6299 const result = {
6300 status,
6301 fetchStatus: newState.fetchStatus,
6302 isPending,
6303 isSuccess: status === "success",
6304 isError,
6305 isInitialLoading: isLoading,
6306 isLoading,
6307 data,
6308 dataUpdatedAt: newState.dataUpdatedAt,
6309 error,
6310 errorUpdatedAt,
6311 failureCount: newState.fetchFailureCount,
6312 failureReason: newState.fetchFailureReason,
6313 errorUpdateCount: newState.errorUpdateCount,
6314 isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
6315 isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
6316 isFetching,
6317 isRefetching: isFetching && !isPending,
6318 isLoadingError: isError && !hasData,
6319 isPaused: newState.fetchStatus === "paused",
6320 isPlaceholderData,
6321 isRefetchError: isError && hasData,
6322 isStale: isStale(query, options),
6323 refetch: this.refetch,
6324 promise: this.#currentThenable
6325 };
6326 const nextResult = result;
6327 if (this.options.experimental_prefetchInRender) {
6328 const finalizeThenableIfPossible = (thenable) => {
6329 if (nextResult.status === "error") {
6330 thenable.reject(nextResult.error);
6331 } else if (nextResult.data !== void 0) {
6332 thenable.resolve(nextResult.data);
6333 }
6334 };
6335 const recreateThenable = () => {
6336 const pending = this.#currentThenable = nextResult.promise = (0, import_thenable.pendingThenable)();
6337 finalizeThenableIfPossible(pending);
6338 };
6339 const prevThenable = this.#currentThenable;
6340 switch (prevThenable.status) {
6341 case "pending":
6342 if (query.queryHash === prevQuery.queryHash) {
6343 finalizeThenableIfPossible(prevThenable);
6344 }
6345 break;
6346 case "fulfilled":
6347 if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
6348 recreateThenable();
6349 }
6350 break;
6351 case "rejected":
6352 if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
6353 recreateThenable();
6354 }
6355 break;
6356 }
6357 }
6358 return nextResult;
6359 }
6360 updateResult(notifyOptions) {
6361 const prevResult = this.#currentResult;
6362 const nextResult = this.createResult(this.#currentQuery, this.options);
6363 this.#currentResultState = this.#currentQuery.state;
6364 this.#currentResultOptions = this.options;
6365 if (this.#currentResultState.data !== void 0) {
6366 this.#lastQueryWithDefinedData = this.#currentQuery;
6367 }
6368 if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
6369 return;
6370 }
6371 this.#currentResult = nextResult;
6372 const defaultNotifyOptions = {};
6373 const shouldNotifyListeners = () => {
6374 if (!prevResult) {
6375 return true;
6376 }
6377 const { notifyOnChangeProps } = this.options;
6378 const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
6379 if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
6380 return true;
6381 }
6382 const includedProps = new Set(
6383 notifyOnChangePropsValue ?? this.#trackedProps
6384 );
6385 if (this.options.throwOnError) {
6386 includedProps.add("error");
6387 }
6388 return Object.keys(this.#currentResult).some((key) => {
6389 const typedKey = key;
6390 const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
6391 return changed && includedProps.has(typedKey);
6392 });
6393 };
6394 if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
6395 defaultNotifyOptions.listeners = true;
6396 }
6397 this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
6398 }
6399 #updateQuery() {
6400 const query = this.#client.getQueryCache().build(this.#client, this.options);
6401 if (query === this.#currentQuery) {
6402 return;
6403 }
6404 const prevQuery = this.#currentQuery;
6405 this.#currentQuery = query;
6406 this.#currentQueryInitialState = query.state;
6407 if (this.hasListeners()) {
6408 prevQuery?.removeObserver(this);
6409 query.addObserver(this);
6410 }
6411 }
6412 onQueryUpdate() {
6413 this.updateResult();
6414 if (this.hasListeners()) {
6415 this.#updateTimers();
6416 }
6417 }
6418 #notify(notifyOptions) {
6419 import_notifyManager.notifyManager.batch(() => {
6420 if (notifyOptions.listeners) {
6421 this.listeners.forEach((listener) => {
6422 listener(this.#currentResult);
6423 });
6424 }
6425 this.#client.getQueryCache().notify({
6426 query: this.#currentQuery,
6427 type: "observerResultsUpdated"
6428 });
6429 });
6430 }
6431 };
6432 function shouldLoadOnMount(query, options) {
6433 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
6434 }
6435 function shouldFetchOnMount(query, options) {
6436 return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
6437 }
6438 function shouldFetchOn(query, options, field) {
6439 if ((0, import_utils.resolveEnabled)(options.enabled, query) !== false) {
6440 const value = typeof field === "function" ? field(query) : field;
6441 return value === "always" || value !== false && isStale(query, options);
6442 }
6443 return false;
6444 }
6445 function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
6446 return (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
6447 }
6448 function isStale(query, options) {
6449 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query));
6450 }
6451 function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
6452 if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
6453 return true;
6454 }
6455 return false;
6456 }
6457 // Annotate the CommonJS export names for ESM import in node:
6458 0 && (0);
6459 //# sourceMappingURL=queryObserver.cjs.map
6460
6461 /***/ }),
6462
6463 /***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
6464 /*!***********************************************************************!*\
6465 !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
6466 \***********************************************************************/
6467 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6468
6469 "use strict";
6470
6471 var __defProp = Object.defineProperty;
6472 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6473 var __getOwnPropNames = Object.getOwnPropertyNames;
6474 var __hasOwnProp = Object.prototype.hasOwnProperty;
6475 var __export = (target, all) => {
6476 for (var name in all)
6477 __defProp(target, name, { get: all[name], enumerable: true });
6478 };
6479 var __copyProps = (to, from, except, desc) => {
6480 if (from && typeof from === "object" || typeof from === "function") {
6481 for (let key of __getOwnPropNames(from))
6482 if (!__hasOwnProp.call(to, key) && key !== except)
6483 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6484 }
6485 return to;
6486 };
6487 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6488
6489 // src/removable.ts
6490 var removable_exports = {};
6491 __export(removable_exports, {
6492 Removable: () => Removable
6493 });
6494 module.exports = __toCommonJS(removable_exports);
6495 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6496 var Removable = class {
6497 #gcTimeout;
6498 destroy() {
6499 this.clearGcTimeout();
6500 }
6501 scheduleGc() {
6502 this.clearGcTimeout();
6503 if ((0, import_utils.isValidTimeout)(this.gcTime)) {
6504 this.#gcTimeout = setTimeout(() => {
6505 this.optionalRemove();
6506 }, this.gcTime);
6507 }
6508 }
6509 updateGcTime(newGcTime) {
6510 this.gcTime = Math.max(
6511 this.gcTime || 0,
6512 newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
6513 );
6514 }
6515 clearGcTimeout() {
6516 if (this.#gcTimeout) {
6517 clearTimeout(this.#gcTimeout);
6518 this.#gcTimeout = void 0;
6519 }
6520 }
6521 };
6522 // Annotate the CommonJS export names for ESM import in node:
6523 0 && (0);
6524 //# sourceMappingURL=removable.cjs.map
6525
6526 /***/ }),
6527
6528 /***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
6529 /*!*********************************************************************!*\
6530 !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
6531 \*********************************************************************/
6532 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6533
6534 "use strict";
6535
6536 var __defProp = Object.defineProperty;
6537 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6538 var __getOwnPropNames = Object.getOwnPropertyNames;
6539 var __hasOwnProp = Object.prototype.hasOwnProperty;
6540 var __export = (target, all) => {
6541 for (var name in all)
6542 __defProp(target, name, { get: all[name], enumerable: true });
6543 };
6544 var __copyProps = (to, from, except, desc) => {
6545 if (from && typeof from === "object" || typeof from === "function") {
6546 for (let key of __getOwnPropNames(from))
6547 if (!__hasOwnProp.call(to, key) && key !== except)
6548 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6549 }
6550 return to;
6551 };
6552 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6553
6554 // src/retryer.ts
6555 var retryer_exports = {};
6556 __export(retryer_exports, {
6557 CancelledError: () => CancelledError,
6558 canFetch: () => canFetch,
6559 createRetryer: () => createRetryer,
6560 isCancelledError: () => isCancelledError
6561 });
6562 module.exports = __toCommonJS(retryer_exports);
6563 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
6564 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
6565 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
6566 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6567 function defaultRetryDelay(failureCount) {
6568 return Math.min(1e3 * 2 ** failureCount, 3e4);
6569 }
6570 function canFetch(networkMode) {
6571 return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
6572 }
6573 var CancelledError = class extends Error {
6574 constructor(options) {
6575 super("CancelledError");
6576 this.revert = options?.revert;
6577 this.silent = options?.silent;
6578 }
6579 };
6580 function isCancelledError(value) {
6581 return value instanceof CancelledError;
6582 }
6583 function createRetryer(config) {
6584 let isRetryCancelled = false;
6585 let failureCount = 0;
6586 let isResolved = false;
6587 let continueFn;
6588 const thenable = (0, import_thenable.pendingThenable)();
6589 const cancel = (cancelOptions) => {
6590 if (!isResolved) {
6591 reject(new CancelledError(cancelOptions));
6592 config.abort?.();
6593 }
6594 };
6595 const cancelRetry = () => {
6596 isRetryCancelled = true;
6597 };
6598 const continueRetry = () => {
6599 isRetryCancelled = false;
6600 };
6601 const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun();
6602 const canStart = () => canFetch(config.networkMode) && config.canRun();
6603 const resolve = (value) => {
6604 if (!isResolved) {
6605 isResolved = true;
6606 config.onSuccess?.(value);
6607 continueFn?.();
6608 thenable.resolve(value);
6609 }
6610 };
6611 const reject = (value) => {
6612 if (!isResolved) {
6613 isResolved = true;
6614 config.onError?.(value);
6615 continueFn?.();
6616 thenable.reject(value);
6617 }
6618 };
6619 const pause = () => {
6620 return new Promise((continueResolve) => {
6621 continueFn = (value) => {
6622 if (isResolved || canContinue()) {
6623 continueResolve(value);
6624 }
6625 };
6626 config.onPause?.();
6627 }).then(() => {
6628 continueFn = void 0;
6629 if (!isResolved) {
6630 config.onContinue?.();
6631 }
6632 });
6633 };
6634 const run = () => {
6635 if (isResolved) {
6636 return;
6637 }
6638 let promiseOrValue;
6639 const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
6640 try {
6641 promiseOrValue = initialPromise ?? config.fn();
6642 } catch (error) {
6643 promiseOrValue = Promise.reject(error);
6644 }
6645 Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
6646 if (isResolved) {
6647 return;
6648 }
6649 const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
6650 const retryDelay = config.retryDelay ?? defaultRetryDelay;
6651 const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
6652 const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
6653 if (isRetryCancelled || !shouldRetry) {
6654 reject(error);
6655 return;
6656 }
6657 failureCount++;
6658 config.onFail?.(failureCount, error);
6659 (0, import_utils.sleep)(delay).then(() => {
6660 return canContinue() ? void 0 : pause();
6661 }).then(() => {
6662 if (isRetryCancelled) {
6663 reject(error);
6664 } else {
6665 run();
6666 }
6667 });
6668 });
6669 };
6670 return {
6671 promise: thenable,
6672 cancel,
6673 continue: () => {
6674 continueFn?.();
6675 return thenable;
6676 },
6677 cancelRetry,
6678 continueRetry,
6679 canStart,
6680 start: () => {
6681 if (canStart()) {
6682 run();
6683 } else {
6684 pause().then(run);
6685 }
6686 return thenable;
6687 }
6688 };
6689 }
6690 // Annotate the CommonJS export names for ESM import in node:
6691 0 && (0);
6692 //# sourceMappingURL=retryer.cjs.map
6693
6694 /***/ }),
6695
6696 /***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
6697 /*!**************************************************************************!*\
6698 !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
6699 \**************************************************************************/
6700 /***/ ((module) => {
6701
6702 "use strict";
6703
6704 var __defProp = Object.defineProperty;
6705 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6706 var __getOwnPropNames = Object.getOwnPropertyNames;
6707 var __hasOwnProp = Object.prototype.hasOwnProperty;
6708 var __export = (target, all) => {
6709 for (var name in all)
6710 __defProp(target, name, { get: all[name], enumerable: true });
6711 };
6712 var __copyProps = (to, from, except, desc) => {
6713 if (from && typeof from === "object" || typeof from === "function") {
6714 for (let key of __getOwnPropNames(from))
6715 if (!__hasOwnProp.call(to, key) && key !== except)
6716 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6717 }
6718 return to;
6719 };
6720 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6721
6722 // src/subscribable.ts
6723 var subscribable_exports = {};
6724 __export(subscribable_exports, {
6725 Subscribable: () => Subscribable
6726 });
6727 module.exports = __toCommonJS(subscribable_exports);
6728 var Subscribable = class {
6729 constructor() {
6730 this.listeners = /* @__PURE__ */ new Set();
6731 this.subscribe = this.subscribe.bind(this);
6732 }
6733 subscribe(listener) {
6734 this.listeners.add(listener);
6735 this.onSubscribe();
6736 return () => {
6737 this.listeners.delete(listener);
6738 this.onUnsubscribe();
6739 };
6740 }
6741 hasListeners() {
6742 return this.listeners.size > 0;
6743 }
6744 onSubscribe() {
6745 }
6746 onUnsubscribe() {
6747 }
6748 };
6749 // Annotate the CommonJS export names for ESM import in node:
6750 0 && (0);
6751 //# sourceMappingURL=subscribable.cjs.map
6752
6753 /***/ }),
6754
6755 /***/ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs":
6756 /*!**********************************************************************!*\
6757 !*** ../node_modules/@tanstack/query-core/build/modern/thenable.cjs ***!
6758 \**********************************************************************/
6759 /***/ ((module) => {
6760
6761 "use strict";
6762
6763 var __defProp = Object.defineProperty;
6764 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6765 var __getOwnPropNames = Object.getOwnPropertyNames;
6766 var __hasOwnProp = Object.prototype.hasOwnProperty;
6767 var __export = (target, all) => {
6768 for (var name in all)
6769 __defProp(target, name, { get: all[name], enumerable: true });
6770 };
6771 var __copyProps = (to, from, except, desc) => {
6772 if (from && typeof from === "object" || typeof from === "function") {
6773 for (let key of __getOwnPropNames(from))
6774 if (!__hasOwnProp.call(to, key) && key !== except)
6775 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6776 }
6777 return to;
6778 };
6779 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6780
6781 // src/thenable.ts
6782 var thenable_exports = {};
6783 __export(thenable_exports, {
6784 pendingThenable: () => pendingThenable
6785 });
6786 module.exports = __toCommonJS(thenable_exports);
6787 function pendingThenable() {
6788 let resolve;
6789 let reject;
6790 const thenable = new Promise((_resolve, _reject) => {
6791 resolve = _resolve;
6792 reject = _reject;
6793 });
6794 thenable.status = "pending";
6795 thenable.catch(() => {
6796 });
6797 function finalize(data) {
6798 Object.assign(thenable, data);
6799 delete thenable.resolve;
6800 delete thenable.reject;
6801 }
6802 thenable.resolve = (value) => {
6803 finalize({
6804 status: "fulfilled",
6805 value
6806 });
6807 resolve(value);
6808 };
6809 thenable.reject = (reason) => {
6810 finalize({
6811 status: "rejected",
6812 reason
6813 });
6814 reject(reason);
6815 };
6816 return thenable;
6817 }
6818 // Annotate the CommonJS export names for ESM import in node:
6819 0 && (0);
6820 //# sourceMappingURL=thenable.cjs.map
6821
6822 /***/ }),
6823
6824 /***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
6825 /*!*******************************************************************!*\
6826 !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
6827 \*******************************************************************/
6828 /***/ ((module) => {
6829
6830 "use strict";
6831
6832 var __defProp = Object.defineProperty;
6833 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6834 var __getOwnPropNames = Object.getOwnPropertyNames;
6835 var __hasOwnProp = Object.prototype.hasOwnProperty;
6836 var __copyProps = (to, from, except, desc) => {
6837 if (from && typeof from === "object" || typeof from === "function") {
6838 for (let key of __getOwnPropNames(from))
6839 if (!__hasOwnProp.call(to, key) && key !== except)
6840 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6841 }
6842 return to;
6843 };
6844 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6845
6846 // src/types.ts
6847 var types_exports = {};
6848 module.exports = __toCommonJS(types_exports);
6849 //# sourceMappingURL=types.cjs.map
6850
6851 /***/ }),
6852
6853 /***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
6854 /*!*******************************************************************!*\
6855 !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
6856 \*******************************************************************/
6857 /***/ ((module) => {
6858
6859 "use strict";
6860
6861 var __defProp = Object.defineProperty;
6862 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6863 var __getOwnPropNames = Object.getOwnPropertyNames;
6864 var __hasOwnProp = Object.prototype.hasOwnProperty;
6865 var __export = (target, all) => {
6866 for (var name in all)
6867 __defProp(target, name, { get: all[name], enumerable: true });
6868 };
6869 var __copyProps = (to, from, except, desc) => {
6870 if (from && typeof from === "object" || typeof from === "function") {
6871 for (let key of __getOwnPropNames(from))
6872 if (!__hasOwnProp.call(to, key) && key !== except)
6873 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6874 }
6875 return to;
6876 };
6877 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6878
6879 // src/utils.ts
6880 var utils_exports = {};
6881 __export(utils_exports, {
6882 addToEnd: () => addToEnd,
6883 addToStart: () => addToStart,
6884 ensureQueryFn: () => ensureQueryFn,
6885 functionalUpdate: () => functionalUpdate,
6886 hashKey: () => hashKey,
6887 hashQueryKeyByOptions: () => hashQueryKeyByOptions,
6888 isPlainArray: () => isPlainArray,
6889 isPlainObject: () => isPlainObject,
6890 isServer: () => isServer,
6891 isValidTimeout: () => isValidTimeout,
6892 keepPreviousData: () => keepPreviousData,
6893 matchMutation: () => matchMutation,
6894 matchQuery: () => matchQuery,
6895 noop: () => noop,
6896 partialMatchKey: () => partialMatchKey,
6897 replaceData: () => replaceData,
6898 replaceEqualDeep: () => replaceEqualDeep,
6899 resolveEnabled: () => resolveEnabled,
6900 resolveStaleTime: () => resolveStaleTime,
6901 shallowEqualObjects: () => shallowEqualObjects,
6902 skipToken: () => skipToken,
6903 sleep: () => sleep,
6904 timeUntilStale: () => timeUntilStale
6905 });
6906 module.exports = __toCommonJS(utils_exports);
6907 var isServer = typeof window === "undefined" || "Deno" in globalThis;
6908 function noop() {
6909 }
6910 function functionalUpdate(updater, input) {
6911 return typeof updater === "function" ? updater(input) : updater;
6912 }
6913 function isValidTimeout(value) {
6914 return typeof value === "number" && value >= 0 && value !== Infinity;
6915 }
6916 function timeUntilStale(updatedAt, staleTime) {
6917 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
6918 }
6919 function resolveStaleTime(staleTime, query) {
6920 return typeof staleTime === "function" ? staleTime(query) : staleTime;
6921 }
6922 function resolveEnabled(enabled, query) {
6923 return typeof enabled === "function" ? enabled(query) : enabled;
6924 }
6925 function matchQuery(filters, query) {
6926 const {
6927 type = "all",
6928 exact,
6929 fetchStatus,
6930 predicate,
6931 queryKey,
6932 stale
6933 } = filters;
6934 if (queryKey) {
6935 if (exact) {
6936 if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
6937 return false;
6938 }
6939 } else if (!partialMatchKey(query.queryKey, queryKey)) {
6940 return false;
6941 }
6942 }
6943 if (type !== "all") {
6944 const isActive = query.isActive();
6945 if (type === "active" && !isActive) {
6946 return false;
6947 }
6948 if (type === "inactive" && isActive) {
6949 return false;
6950 }
6951 }
6952 if (typeof stale === "boolean" && query.isStale() !== stale) {
6953 return false;
6954 }
6955 if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
6956 return false;
6957 }
6958 if (predicate && !predicate(query)) {
6959 return false;
6960 }
6961 return true;
6962 }
6963 function matchMutation(filters, mutation) {
6964 const { exact, status, predicate, mutationKey } = filters;
6965 if (mutationKey) {
6966 if (!mutation.options.mutationKey) {
6967 return false;
6968 }
6969 if (exact) {
6970 if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
6971 return false;
6972 }
6973 } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
6974 return false;
6975 }
6976 }
6977 if (status && mutation.state.status !== status) {
6978 return false;
6979 }
6980 if (predicate && !predicate(mutation)) {
6981 return false;
6982 }
6983 return true;
6984 }
6985 function hashQueryKeyByOptions(queryKey, options) {
6986 const hashFn = options?.queryKeyHashFn || hashKey;
6987 return hashFn(queryKey);
6988 }
6989 function hashKey(queryKey) {
6990 return JSON.stringify(
6991 queryKey,
6992 (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
6993 result[key] = val[key];
6994 return result;
6995 }, {}) : val
6996 );
6997 }
6998 function partialMatchKey(a, b) {
6999 if (a === b) {
7000 return true;
7001 }
7002 if (typeof a !== typeof b) {
7003 return false;
7004 }
7005 if (a && b && typeof a === "object" && typeof b === "object") {
7006 return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
7007 }
7008 return false;
7009 }
7010 function replaceEqualDeep(a, b) {
7011 if (a === b) {
7012 return a;
7013 }
7014 const array = isPlainArray(a) && isPlainArray(b);
7015 if (array || isPlainObject(a) && isPlainObject(b)) {
7016 const aItems = array ? a : Object.keys(a);
7017 const aSize = aItems.length;
7018 const bItems = array ? b : Object.keys(b);
7019 const bSize = bItems.length;
7020 const copy = array ? [] : {};
7021 let equalItems = 0;
7022 for (let i = 0; i < bSize; i++) {
7023 const key = array ? i : bItems[i];
7024 if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) {
7025 copy[key] = void 0;
7026 equalItems++;
7027 } else {
7028 copy[key] = replaceEqualDeep(a[key], b[key]);
7029 if (copy[key] === a[key] && a[key] !== void 0) {
7030 equalItems++;
7031 }
7032 }
7033 }
7034 return aSize === bSize && equalItems === aSize ? a : copy;
7035 }
7036 return b;
7037 }
7038 function shallowEqualObjects(a, b) {
7039 if (!b || Object.keys(a).length !== Object.keys(b).length) {
7040 return false;
7041 }
7042 for (const key in a) {
7043 if (a[key] !== b[key]) {
7044 return false;
7045 }
7046 }
7047 return true;
7048 }
7049 function isPlainArray(value) {
7050 return Array.isArray(value) && value.length === Object.keys(value).length;
7051 }
7052 function isPlainObject(o) {
7053 if (!hasObjectPrototype(o)) {
7054 return false;
7055 }
7056 const ctor = o.constructor;
7057 if (ctor === void 0) {
7058 return true;
7059 }
7060 const prot = ctor.prototype;
7061 if (!hasObjectPrototype(prot)) {
7062 return false;
7063 }
7064 if (!prot.hasOwnProperty("isPrototypeOf")) {
7065 return false;
7066 }
7067 if (Object.getPrototypeOf(o) !== Object.prototype) {
7068 return false;
7069 }
7070 return true;
7071 }
7072 function hasObjectPrototype(o) {
7073 return Object.prototype.toString.call(o) === "[object Object]";
7074 }
7075 function sleep(timeout) {
7076 return new Promise((resolve) => {
7077 setTimeout(resolve, timeout);
7078 });
7079 }
7080 function replaceData(prevData, data, options) {
7081 if (typeof options.structuralSharing === "function") {
7082 return options.structuralSharing(prevData, data);
7083 } else if (options.structuralSharing !== false) {
7084 if (true) {
7085 try {
7086 return replaceEqualDeep(prevData, data);
7087 } catch (error) {
7088 console.error(
7089 `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
7090 );
7091 }
7092 }
7093 return replaceEqualDeep(prevData, data);
7094 }
7095 return data;
7096 }
7097 function keepPreviousData(previousData) {
7098 return previousData;
7099 }
7100 function addToEnd(items, item, max = 0) {
7101 const newItems = [...items, item];
7102 return max && newItems.length > max ? newItems.slice(1) : newItems;
7103 }
7104 function addToStart(items, item, max = 0) {
7105 const newItems = [item, ...items];
7106 return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
7107 }
7108 var skipToken = Symbol();
7109 function ensureQueryFn(options, fetchOptions) {
7110 if (true) {
7111 if (options.queryFn === skipToken) {
7112 console.error(
7113 `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
7114 );
7115 }
7116 }
7117 if (!options.queryFn && fetchOptions?.initialPromise) {
7118 return () => fetchOptions.initialPromise;
7119 }
7120 if (!options.queryFn || options.queryFn === skipToken) {
7121 return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
7122 }
7123 return options.queryFn;
7124 }
7125 // Annotate the CommonJS export names for ESM import in node:
7126 0 && (0);
7127 //# sourceMappingURL=utils.cjs.map
7128
7129 /***/ }),
7130
7131 /***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
7132 /*!********************************************************************************!*\
7133 !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
7134 \********************************************************************************/
7135 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7136
7137 "use strict";
7138
7139 "use client";
7140 var __create = Object.create;
7141 var __defProp = Object.defineProperty;
7142 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7143 var __getOwnPropNames = Object.getOwnPropertyNames;
7144 var __getProtoOf = Object.getPrototypeOf;
7145 var __hasOwnProp = Object.prototype.hasOwnProperty;
7146 var __export = (target, all) => {
7147 for (var name in all)
7148 __defProp(target, name, { get: all[name], enumerable: true });
7149 };
7150 var __copyProps = (to, from, except, desc) => {
7151 if (from && typeof from === "object" || typeof from === "function") {
7152 for (let key of __getOwnPropNames(from))
7153 if (!__hasOwnProp.call(to, key) && key !== except)
7154 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7155 }
7156 return to;
7157 };
7158 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7159 // If the importer is in node compatibility mode or this is not an ESM
7160 // file that has been converted to a CommonJS file using a Babel-
7161 // compatible transform (i.e. "__esModule" has not been set), then set
7162 // "default" to the CommonJS "module.exports" for node compatibility.
7163 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7164 mod
7165 ));
7166 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7167
7168 // src/HydrationBoundary.tsx
7169 var HydrationBoundary_exports = {};
7170 __export(HydrationBoundary_exports, {
7171 HydrationBoundary: () => HydrationBoundary
7172 });
7173 module.exports = __toCommonJS(HydrationBoundary_exports);
7174 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7175 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7176 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7177 var HydrationBoundary = ({
7178 children,
7179 options = {},
7180 state,
7181 queryClient
7182 }) => {
7183 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7184 const [hydrationQueue, setHydrationQueue] = React.useState();
7185 const optionsRef = React.useRef(options);
7186 optionsRef.current = options;
7187 React.useMemo(() => {
7188 if (state) {
7189 if (typeof state !== "object") {
7190 return;
7191 }
7192 const queryCache = client.getQueryCache();
7193 const queries = state.queries || [];
7194 const newQueries = [];
7195 const existingQueries = [];
7196 for (const dehydratedQuery of queries) {
7197 const existingQuery = queryCache.get(dehydratedQuery.queryHash);
7198 if (!existingQuery) {
7199 newQueries.push(dehydratedQuery);
7200 } else {
7201 const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
7202 const queryAlreadyQueued = hydrationQueue?.find(
7203 (query) => query.queryHash === dehydratedQuery.queryHash
7204 );
7205 if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
7206 existingQueries.push(dehydratedQuery);
7207 }
7208 }
7209 }
7210 if (newQueries.length > 0) {
7211 (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
7212 }
7213 if (existingQueries.length > 0) {
7214 setHydrationQueue(
7215 (prev) => prev ? [...prev, ...existingQueries] : existingQueries
7216 );
7217 }
7218 }
7219 }, [client, hydrationQueue, state]);
7220 React.useEffect(() => {
7221 if (hydrationQueue) {
7222 (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
7223 setHydrationQueue(void 0);
7224 }
7225 }, [client, hydrationQueue]);
7226 return children;
7227 };
7228 // Annotate the CommonJS export names for ESM import in node:
7229 0 && (0);
7230 //# sourceMappingURL=HydrationBoundary.cjs.map
7231
7232 /***/ }),
7233
7234 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
7235 /*!**********************************************************************************!*\
7236 !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
7237 \**********************************************************************************/
7238 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7239
7240 "use strict";
7241
7242 "use client";
7243 var __create = Object.create;
7244 var __defProp = Object.defineProperty;
7245 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7246 var __getOwnPropNames = Object.getOwnPropertyNames;
7247 var __getProtoOf = Object.getPrototypeOf;
7248 var __hasOwnProp = Object.prototype.hasOwnProperty;
7249 var __export = (target, all) => {
7250 for (var name in all)
7251 __defProp(target, name, { get: all[name], enumerable: true });
7252 };
7253 var __copyProps = (to, from, except, desc) => {
7254 if (from && typeof from === "object" || typeof from === "function") {
7255 for (let key of __getOwnPropNames(from))
7256 if (!__hasOwnProp.call(to, key) && key !== except)
7257 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7258 }
7259 return to;
7260 };
7261 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7262 // If the importer is in node compatibility mode or this is not an ESM
7263 // file that has been converted to a CommonJS file using a Babel-
7264 // compatible transform (i.e. "__esModule" has not been set), then set
7265 // "default" to the CommonJS "module.exports" for node compatibility.
7266 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7267 mod
7268 ));
7269 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7270
7271 // src/QueryClientProvider.tsx
7272 var QueryClientProvider_exports = {};
7273 __export(QueryClientProvider_exports, {
7274 QueryClientContext: () => QueryClientContext,
7275 QueryClientProvider: () => QueryClientProvider,
7276 useQueryClient: () => useQueryClient
7277 });
7278 module.exports = __toCommonJS(QueryClientProvider_exports);
7279 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7280 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7281 var QueryClientContext = React.createContext(
7282 void 0
7283 );
7284 var useQueryClient = (queryClient) => {
7285 const client = React.useContext(QueryClientContext);
7286 if (queryClient) {
7287 return queryClient;
7288 }
7289 if (!client) {
7290 throw new Error("No QueryClient set, use QueryClientProvider to set one");
7291 }
7292 return client;
7293 };
7294 var QueryClientProvider = ({
7295 client,
7296 children
7297 }) => {
7298 React.useEffect(() => {
7299 client.mount();
7300 return () => {
7301 client.unmount();
7302 };
7303 }, [client]);
7304 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
7305 };
7306 // Annotate the CommonJS export names for ESM import in node:
7307 0 && (0);
7308 //# sourceMappingURL=QueryClientProvider.cjs.map
7309
7310 /***/ }),
7311
7312 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
7313 /*!**************************************************************************************!*\
7314 !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
7315 \**************************************************************************************/
7316 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7317
7318 "use strict";
7319
7320 "use client";
7321 var __create = Object.create;
7322 var __defProp = Object.defineProperty;
7323 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7324 var __getOwnPropNames = Object.getOwnPropertyNames;
7325 var __getProtoOf = Object.getPrototypeOf;
7326 var __hasOwnProp = Object.prototype.hasOwnProperty;
7327 var __export = (target, all) => {
7328 for (var name in all)
7329 __defProp(target, name, { get: all[name], enumerable: true });
7330 };
7331 var __copyProps = (to, from, except, desc) => {
7332 if (from && typeof from === "object" || typeof from === "function") {
7333 for (let key of __getOwnPropNames(from))
7334 if (!__hasOwnProp.call(to, key) && key !== except)
7335 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7336 }
7337 return to;
7338 };
7339 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7340 // If the importer is in node compatibility mode or this is not an ESM
7341 // file that has been converted to a CommonJS file using a Babel-
7342 // compatible transform (i.e. "__esModule" has not been set), then set
7343 // "default" to the CommonJS "module.exports" for node compatibility.
7344 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7345 mod
7346 ));
7347 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7348
7349 // src/QueryErrorResetBoundary.tsx
7350 var QueryErrorResetBoundary_exports = {};
7351 __export(QueryErrorResetBoundary_exports, {
7352 QueryErrorResetBoundary: () => QueryErrorResetBoundary,
7353 useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
7354 });
7355 module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
7356 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7357 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7358 function createValue() {
7359 let isReset = false;
7360 return {
7361 clearReset: () => {
7362 isReset = false;
7363 },
7364 reset: () => {
7365 isReset = true;
7366 },
7367 isReset: () => {
7368 return isReset;
7369 }
7370 };
7371 }
7372 var QueryErrorResetBoundaryContext = React.createContext(createValue());
7373 var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
7374 var QueryErrorResetBoundary = ({
7375 children
7376 }) => {
7377 const [value] = React.useState(() => createValue());
7378 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
7379 };
7380 // Annotate the CommonJS export names for ESM import in node:
7381 0 && (0);
7382 //# sourceMappingURL=QueryErrorResetBoundary.cjs.map
7383
7384 /***/ }),
7385
7386 /***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
7387 /*!*********************************************************************************!*\
7388 !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
7389 \*********************************************************************************/
7390 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7391
7392 "use strict";
7393
7394 "use client";
7395 var __create = Object.create;
7396 var __defProp = Object.defineProperty;
7397 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7398 var __getOwnPropNames = Object.getOwnPropertyNames;
7399 var __getProtoOf = Object.getPrototypeOf;
7400 var __hasOwnProp = Object.prototype.hasOwnProperty;
7401 var __export = (target, all) => {
7402 for (var name in all)
7403 __defProp(target, name, { get: all[name], enumerable: true });
7404 };
7405 var __copyProps = (to, from, except, desc) => {
7406 if (from && typeof from === "object" || typeof from === "function") {
7407 for (let key of __getOwnPropNames(from))
7408 if (!__hasOwnProp.call(to, key) && key !== except)
7409 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7410 }
7411 return to;
7412 };
7413 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7414 // If the importer is in node compatibility mode or this is not an ESM
7415 // file that has been converted to a CommonJS file using a Babel-
7416 // compatible transform (i.e. "__esModule" has not been set), then set
7417 // "default" to the CommonJS "module.exports" for node compatibility.
7418 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7419 mod
7420 ));
7421 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7422
7423 // src/errorBoundaryUtils.ts
7424 var errorBoundaryUtils_exports = {};
7425 __export(errorBoundaryUtils_exports, {
7426 ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
7427 getHasError: () => getHasError,
7428 useClearResetErrorBoundary: () => useClearResetErrorBoundary
7429 });
7430 module.exports = __toCommonJS(errorBoundaryUtils_exports);
7431 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7432 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7433 var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
7434 if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
7435 if (!errorResetBoundary.isReset()) {
7436 options.retryOnMount = false;
7437 }
7438 }
7439 };
7440 var useClearResetErrorBoundary = (errorResetBoundary) => {
7441 React.useEffect(() => {
7442 errorResetBoundary.clearReset();
7443 }, [errorResetBoundary]);
7444 };
7445 var getHasError = ({
7446 result,
7447 errorResetBoundary,
7448 throwOnError,
7449 query
7450 }) => {
7451 return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
7452 };
7453 // Annotate the CommonJS export names for ESM import in node:
7454 0 && (0);
7455 //# sourceMappingURL=errorBoundaryUtils.cjs.map
7456
7457 /***/ }),
7458
7459 /***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
7460 /*!********************************************************************!*\
7461 !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
7462 \********************************************************************/
7463 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7464
7465 "use strict";
7466
7467 var __defProp = Object.defineProperty;
7468 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7469 var __getOwnPropNames = Object.getOwnPropertyNames;
7470 var __hasOwnProp = Object.prototype.hasOwnProperty;
7471 var __export = (target, all) => {
7472 for (var name in all)
7473 __defProp(target, name, { get: all[name], enumerable: true });
7474 };
7475 var __copyProps = (to, from, except, desc) => {
7476 if (from && typeof from === "object" || typeof from === "function") {
7477 for (let key of __getOwnPropNames(from))
7478 if (!__hasOwnProp.call(to, key) && key !== except)
7479 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7480 }
7481 return to;
7482 };
7483 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
7484 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7485
7486 // src/index.ts
7487 var src_exports = {};
7488 __export(src_exports, {
7489 HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
7490 IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
7491 QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
7492 QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
7493 QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
7494 infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
7495 queryOptions: () => import_queryOptions.queryOptions,
7496 useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
7497 useIsFetching: () => import_useIsFetching.useIsFetching,
7498 useIsMutating: () => import_useMutationState.useIsMutating,
7499 useIsRestoring: () => import_isRestoring.useIsRestoring,
7500 useMutation: () => import_useMutation.useMutation,
7501 useMutationState: () => import_useMutationState.useMutationState,
7502 usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery,
7503 usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery,
7504 useQueries: () => import_useQueries.useQueries,
7505 useQuery: () => import_useQuery.useQuery,
7506 useQueryClient: () => import_QueryClientProvider.useQueryClient,
7507 useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
7508 useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
7509 useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
7510 useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
7511 });
7512 module.exports = __toCommonJS(src_exports);
7513 __reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
7514 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
7515 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
7516 var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
7517 var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
7518 var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
7519 var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
7520 var import_usePrefetchQuery = __webpack_require__(/*! ./usePrefetchQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs");
7521 var import_usePrefetchInfiniteQuery = __webpack_require__(/*! ./usePrefetchInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs");
7522 var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
7523 var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
7524 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7525 var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
7526 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7527 var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
7528 var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
7529 var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
7530 var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
7531 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7532 // Annotate the CommonJS export names for ESM import in node:
7533 0 && (0);
7534 //# sourceMappingURL=index.cjs.map
7535
7536 /***/ }),
7537
7538 /***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
7539 /*!***********************************************************************************!*\
7540 !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
7541 \***********************************************************************************/
7542 /***/ ((module) => {
7543
7544 "use strict";
7545
7546 var __defProp = Object.defineProperty;
7547 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7548 var __getOwnPropNames = Object.getOwnPropertyNames;
7549 var __hasOwnProp = Object.prototype.hasOwnProperty;
7550 var __export = (target, all) => {
7551 for (var name in all)
7552 __defProp(target, name, { get: all[name], enumerable: true });
7553 };
7554 var __copyProps = (to, from, except, desc) => {
7555 if (from && typeof from === "object" || typeof from === "function") {
7556 for (let key of __getOwnPropNames(from))
7557 if (!__hasOwnProp.call(to, key) && key !== except)
7558 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7559 }
7560 return to;
7561 };
7562 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7563
7564 // src/infiniteQueryOptions.ts
7565 var infiniteQueryOptions_exports = {};
7566 __export(infiniteQueryOptions_exports, {
7567 infiniteQueryOptions: () => infiniteQueryOptions
7568 });
7569 module.exports = __toCommonJS(infiniteQueryOptions_exports);
7570 function infiniteQueryOptions(options) {
7571 return options;
7572 }
7573 // Annotate the CommonJS export names for ESM import in node:
7574 0 && (0);
7575 //# sourceMappingURL=infiniteQueryOptions.cjs.map
7576
7577 /***/ }),
7578
7579 /***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
7580 /*!**************************************************************************!*\
7581 !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
7582 \**************************************************************************/
7583 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7584
7585 "use strict";
7586
7587 "use client";
7588 var __create = Object.create;
7589 var __defProp = Object.defineProperty;
7590 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7591 var __getOwnPropNames = Object.getOwnPropertyNames;
7592 var __getProtoOf = Object.getPrototypeOf;
7593 var __hasOwnProp = Object.prototype.hasOwnProperty;
7594 var __export = (target, all) => {
7595 for (var name in all)
7596 __defProp(target, name, { get: all[name], enumerable: true });
7597 };
7598 var __copyProps = (to, from, except, desc) => {
7599 if (from && typeof from === "object" || typeof from === "function") {
7600 for (let key of __getOwnPropNames(from))
7601 if (!__hasOwnProp.call(to, key) && key !== except)
7602 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7603 }
7604 return to;
7605 };
7606 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7607 // If the importer is in node compatibility mode or this is not an ESM
7608 // file that has been converted to a CommonJS file using a Babel-
7609 // compatible transform (i.e. "__esModule" has not been set), then set
7610 // "default" to the CommonJS "module.exports" for node compatibility.
7611 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7612 mod
7613 ));
7614 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7615
7616 // src/isRestoring.ts
7617 var isRestoring_exports = {};
7618 __export(isRestoring_exports, {
7619 IsRestoringProvider: () => IsRestoringProvider,
7620 useIsRestoring: () => useIsRestoring
7621 });
7622 module.exports = __toCommonJS(isRestoring_exports);
7623 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7624 var IsRestoringContext = React.createContext(false);
7625 var useIsRestoring = () => React.useContext(IsRestoringContext);
7626 var IsRestoringProvider = IsRestoringContext.Provider;
7627 // Annotate the CommonJS export names for ESM import in node:
7628 0 && (0);
7629 //# sourceMappingURL=isRestoring.cjs.map
7630
7631 /***/ }),
7632
7633 /***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
7634 /*!***************************************************************************!*\
7635 !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
7636 \***************************************************************************/
7637 /***/ ((module) => {
7638
7639 "use strict";
7640
7641 var __defProp = Object.defineProperty;
7642 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7643 var __getOwnPropNames = Object.getOwnPropertyNames;
7644 var __hasOwnProp = Object.prototype.hasOwnProperty;
7645 var __export = (target, all) => {
7646 for (var name in all)
7647 __defProp(target, name, { get: all[name], enumerable: true });
7648 };
7649 var __copyProps = (to, from, except, desc) => {
7650 if (from && typeof from === "object" || typeof from === "function") {
7651 for (let key of __getOwnPropNames(from))
7652 if (!__hasOwnProp.call(to, key) && key !== except)
7653 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7654 }
7655 return to;
7656 };
7657 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7658
7659 // src/queryOptions.ts
7660 var queryOptions_exports = {};
7661 __export(queryOptions_exports, {
7662 queryOptions: () => queryOptions
7663 });
7664 module.exports = __toCommonJS(queryOptions_exports);
7665 function queryOptions(options) {
7666 return options;
7667 }
7668 // Annotate the CommonJS export names for ESM import in node:
7669 0 && (0);
7670 //# sourceMappingURL=queryOptions.cjs.map
7671
7672 /***/ }),
7673
7674 /***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
7675 /*!***********************************************************************!*\
7676 !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
7677 \***********************************************************************/
7678 /***/ ((module) => {
7679
7680 "use strict";
7681
7682 var __defProp = Object.defineProperty;
7683 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7684 var __getOwnPropNames = Object.getOwnPropertyNames;
7685 var __hasOwnProp = Object.prototype.hasOwnProperty;
7686 var __export = (target, all) => {
7687 for (var name in all)
7688 __defProp(target, name, { get: all[name], enumerable: true });
7689 };
7690 var __copyProps = (to, from, except, desc) => {
7691 if (from && typeof from === "object" || typeof from === "function") {
7692 for (let key of __getOwnPropNames(from))
7693 if (!__hasOwnProp.call(to, key) && key !== except)
7694 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7695 }
7696 return to;
7697 };
7698 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7699
7700 // src/suspense.ts
7701 var suspense_exports = {};
7702 __export(suspense_exports, {
7703 defaultThrowOnError: () => defaultThrowOnError,
7704 ensureSuspenseTimers: () => ensureSuspenseTimers,
7705 fetchOptimistic: () => fetchOptimistic,
7706 shouldSuspend: () => shouldSuspend,
7707 willFetch: () => willFetch
7708 });
7709 module.exports = __toCommonJS(suspense_exports);
7710 var defaultThrowOnError = (_error, query) => query.state.data === void 0;
7711 var ensureSuspenseTimers = (defaultedOptions) => {
7712 if (defaultedOptions.suspense) {
7713 if (defaultedOptions.staleTime === void 0) {
7714 defaultedOptions.staleTime = 1e3;
7715 }
7716 if (typeof defaultedOptions.gcTime === "number") {
7717 defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
7718 }
7719 }
7720 };
7721 var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
7722 var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
7723 var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
7724 errorResetBoundary.clearReset();
7725 });
7726 // Annotate the CommonJS export names for ESM import in node:
7727 0 && (0);
7728 //# sourceMappingURL=suspense.cjs.map
7729
7730 /***/ }),
7731
7732 /***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
7733 /*!********************************************************************!*\
7734 !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
7735 \********************************************************************/
7736 /***/ ((module) => {
7737
7738 "use strict";
7739
7740 var __defProp = Object.defineProperty;
7741 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7742 var __getOwnPropNames = Object.getOwnPropertyNames;
7743 var __hasOwnProp = Object.prototype.hasOwnProperty;
7744 var __copyProps = (to, from, except, desc) => {
7745 if (from && typeof from === "object" || typeof from === "function") {
7746 for (let key of __getOwnPropNames(from))
7747 if (!__hasOwnProp.call(to, key) && key !== except)
7748 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7749 }
7750 return to;
7751 };
7752 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7753
7754 // src/types.ts
7755 var types_exports = {};
7756 module.exports = __toCommonJS(types_exports);
7757 //# sourceMappingURL=types.cjs.map
7758
7759 /***/ }),
7760
7761 /***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
7762 /*!***************************************************************************!*\
7763 !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
7764 \***************************************************************************/
7765 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7766
7767 "use strict";
7768
7769 "use client";
7770 var __create = Object.create;
7771 var __defProp = Object.defineProperty;
7772 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7773 var __getOwnPropNames = Object.getOwnPropertyNames;
7774 var __getProtoOf = Object.getPrototypeOf;
7775 var __hasOwnProp = Object.prototype.hasOwnProperty;
7776 var __export = (target, all) => {
7777 for (var name in all)
7778 __defProp(target, name, { get: all[name], enumerable: true });
7779 };
7780 var __copyProps = (to, from, except, desc) => {
7781 if (from && typeof from === "object" || typeof from === "function") {
7782 for (let key of __getOwnPropNames(from))
7783 if (!__hasOwnProp.call(to, key) && key !== except)
7784 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7785 }
7786 return to;
7787 };
7788 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7789 // If the importer is in node compatibility mode or this is not an ESM
7790 // file that has been converted to a CommonJS file using a Babel-
7791 // compatible transform (i.e. "__esModule" has not been set), then set
7792 // "default" to the CommonJS "module.exports" for node compatibility.
7793 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7794 mod
7795 ));
7796 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7797
7798 // src/useBaseQuery.ts
7799 var useBaseQuery_exports = {};
7800 __export(useBaseQuery_exports, {
7801 useBaseQuery: () => useBaseQuery
7802 });
7803 module.exports = __toCommonJS(useBaseQuery_exports);
7804 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7805 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7806 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7807 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7808 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
7809 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7810 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
7811 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7812 function useBaseQuery(options, Observer, queryClient) {
7813 if (true) {
7814 if (typeof options !== "object" || Array.isArray(options)) {
7815 throw new Error(
7816 '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'
7817 );
7818 }
7819 }
7820 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7821 const isRestoring = (0, import_isRestoring.useIsRestoring)();
7822 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
7823 const defaultedOptions = client.defaultQueryOptions(options);
7824 client.getDefaultOptions().queries?._experimental_beforeQuery?.(
7825 defaultedOptions
7826 );
7827 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
7828 (0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
7829 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
7830 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
7831 const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
7832 const [observer] = React.useState(
7833 () => new Observer(
7834 client,
7835 defaultedOptions
7836 )
7837 );
7838 const result = observer.getOptimisticResult(defaultedOptions);
7839 React.useSyncExternalStore(
7840 React.useCallback(
7841 (onStoreChange) => {
7842 const unsubscribe = isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
7843 observer.updateResult();
7844 return unsubscribe;
7845 },
7846 [observer, isRestoring]
7847 ),
7848 () => observer.getCurrentResult(),
7849 () => observer.getCurrentResult()
7850 );
7851 React.useEffect(() => {
7852 observer.setOptions(defaultedOptions, { listeners: false });
7853 }, [defaultedOptions, observer]);
7854 if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
7855 throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
7856 }
7857 if ((0, import_errorBoundaryUtils.getHasError)({
7858 result,
7859 errorResetBoundary,
7860 throwOnError: defaultedOptions.throwOnError,
7861 query: client.getQueryCache().get(defaultedOptions.queryHash)
7862 })) {
7863 throw result.error;
7864 }
7865 ;
7866 client.getDefaultOptions().queries?._experimental_afterQuery?.(
7867 defaultedOptions,
7868 result
7869 );
7870 if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) {
7871 const promise = isNewCacheEntry ? (
7872 // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
7873 (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
7874 ) : (
7875 // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
7876 client.getQueryCache().get(defaultedOptions.queryHash)?.promise
7877 );
7878 promise?.catch(import_utils.noop).finally(() => {
7879 observer.updateResult();
7880 });
7881 }
7882 return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
7883 }
7884 // Annotate the CommonJS export names for ESM import in node:
7885 0 && (0);
7886 //# sourceMappingURL=useBaseQuery.cjs.map
7887
7888 /***/ }),
7889
7890 /***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
7891 /*!*******************************************************************************!*\
7892 !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
7893 \*******************************************************************************/
7894 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7895
7896 "use strict";
7897
7898 "use client";
7899 var __defProp = Object.defineProperty;
7900 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7901 var __getOwnPropNames = Object.getOwnPropertyNames;
7902 var __hasOwnProp = Object.prototype.hasOwnProperty;
7903 var __export = (target, all) => {
7904 for (var name in all)
7905 __defProp(target, name, { get: all[name], enumerable: true });
7906 };
7907 var __copyProps = (to, from, except, desc) => {
7908 if (from && typeof from === "object" || typeof from === "function") {
7909 for (let key of __getOwnPropNames(from))
7910 if (!__hasOwnProp.call(to, key) && key !== except)
7911 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7912 }
7913 return to;
7914 };
7915 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7916
7917 // src/useInfiniteQuery.ts
7918 var useInfiniteQuery_exports = {};
7919 __export(useInfiniteQuery_exports, {
7920 useInfiniteQuery: () => useInfiniteQuery
7921 });
7922 module.exports = __toCommonJS(useInfiniteQuery_exports);
7923 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7924 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
7925 function useInfiniteQuery(options, queryClient) {
7926 return (0, import_useBaseQuery.useBaseQuery)(
7927 options,
7928 import_query_core.InfiniteQueryObserver,
7929 queryClient
7930 );
7931 }
7932 // Annotate the CommonJS export names for ESM import in node:
7933 0 && (0);
7934 //# sourceMappingURL=useInfiniteQuery.cjs.map
7935
7936 /***/ }),
7937
7938 /***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
7939 /*!****************************************************************************!*\
7940 !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
7941 \****************************************************************************/
7942 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7943
7944 "use strict";
7945
7946 "use client";
7947 var __create = Object.create;
7948 var __defProp = Object.defineProperty;
7949 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7950 var __getOwnPropNames = Object.getOwnPropertyNames;
7951 var __getProtoOf = Object.getPrototypeOf;
7952 var __hasOwnProp = Object.prototype.hasOwnProperty;
7953 var __export = (target, all) => {
7954 for (var name in all)
7955 __defProp(target, name, { get: all[name], enumerable: true });
7956 };
7957 var __copyProps = (to, from, except, desc) => {
7958 if (from && typeof from === "object" || typeof from === "function") {
7959 for (let key of __getOwnPropNames(from))
7960 if (!__hasOwnProp.call(to, key) && key !== except)
7961 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7962 }
7963 return to;
7964 };
7965 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7966 // If the importer is in node compatibility mode or this is not an ESM
7967 // file that has been converted to a CommonJS file using a Babel-
7968 // compatible transform (i.e. "__esModule" has not been set), then set
7969 // "default" to the CommonJS "module.exports" for node compatibility.
7970 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7971 mod
7972 ));
7973 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7974
7975 // src/useIsFetching.ts
7976 var useIsFetching_exports = {};
7977 __export(useIsFetching_exports, {
7978 useIsFetching: () => useIsFetching
7979 });
7980 module.exports = __toCommonJS(useIsFetching_exports);
7981 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7982 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7983 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7984 function useIsFetching(filters, queryClient) {
7985 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7986 const queryCache = client.getQueryCache();
7987 return React.useSyncExternalStore(
7988 React.useCallback(
7989 (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
7990 [queryCache]
7991 ),
7992 () => client.isFetching(filters),
7993 () => client.isFetching(filters)
7994 );
7995 }
7996 // Annotate the CommonJS export names for ESM import in node:
7997 0 && (0);
7998 //# sourceMappingURL=useIsFetching.cjs.map
7999
8000 /***/ }),
8001
8002 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
8003 /*!**************************************************************************!*\
8004 !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
8005 \**************************************************************************/
8006 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8007
8008 "use strict";
8009
8010 "use client";
8011 var __create = Object.create;
8012 var __defProp = Object.defineProperty;
8013 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8014 var __getOwnPropNames = Object.getOwnPropertyNames;
8015 var __getProtoOf = Object.getPrototypeOf;
8016 var __hasOwnProp = Object.prototype.hasOwnProperty;
8017 var __export = (target, all) => {
8018 for (var name in all)
8019 __defProp(target, name, { get: all[name], enumerable: true });
8020 };
8021 var __copyProps = (to, from, except, desc) => {
8022 if (from && typeof from === "object" || typeof from === "function") {
8023 for (let key of __getOwnPropNames(from))
8024 if (!__hasOwnProp.call(to, key) && key !== except)
8025 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8026 }
8027 return to;
8028 };
8029 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8030 // If the importer is in node compatibility mode or this is not an ESM
8031 // file that has been converted to a CommonJS file using a Babel-
8032 // compatible transform (i.e. "__esModule" has not been set), then set
8033 // "default" to the CommonJS "module.exports" for node compatibility.
8034 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8035 mod
8036 ));
8037 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8038
8039 // src/useMutation.ts
8040 var useMutation_exports = {};
8041 __export(useMutation_exports, {
8042 useMutation: () => useMutation
8043 });
8044 module.exports = __toCommonJS(useMutation_exports);
8045 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8046 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8047 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8048 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
8049 function useMutation(options, queryClient) {
8050 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8051 const [observer] = React.useState(
8052 () => new import_query_core.MutationObserver(
8053 client,
8054 options
8055 )
8056 );
8057 React.useEffect(() => {
8058 observer.setOptions(options);
8059 }, [observer, options]);
8060 const result = React.useSyncExternalStore(
8061 React.useCallback(
8062 (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8063 [observer]
8064 ),
8065 () => observer.getCurrentResult(),
8066 () => observer.getCurrentResult()
8067 );
8068 const mutate = React.useCallback(
8069 (variables, mutateOptions) => {
8070 observer.mutate(variables, mutateOptions).catch(import_utils.noop);
8071 },
8072 [observer]
8073 );
8074 if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
8075 throw result.error;
8076 }
8077 return { ...result, mutate, mutateAsync: result.mutate };
8078 }
8079 // Annotate the CommonJS export names for ESM import in node:
8080 0 && (0);
8081 //# sourceMappingURL=useMutation.cjs.map
8082
8083 /***/ }),
8084
8085 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
8086 /*!*******************************************************************************!*\
8087 !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
8088 \*******************************************************************************/
8089 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8090
8091 "use strict";
8092
8093 "use client";
8094 var __create = Object.create;
8095 var __defProp = Object.defineProperty;
8096 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8097 var __getOwnPropNames = Object.getOwnPropertyNames;
8098 var __getProtoOf = Object.getPrototypeOf;
8099 var __hasOwnProp = Object.prototype.hasOwnProperty;
8100 var __export = (target, all) => {
8101 for (var name in all)
8102 __defProp(target, name, { get: all[name], enumerable: true });
8103 };
8104 var __copyProps = (to, from, except, desc) => {
8105 if (from && typeof from === "object" || typeof from === "function") {
8106 for (let key of __getOwnPropNames(from))
8107 if (!__hasOwnProp.call(to, key) && key !== except)
8108 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8109 }
8110 return to;
8111 };
8112 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8113 // If the importer is in node compatibility mode or this is not an ESM
8114 // file that has been converted to a CommonJS file using a Babel-
8115 // compatible transform (i.e. "__esModule" has not been set), then set
8116 // "default" to the CommonJS "module.exports" for node compatibility.
8117 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8118 mod
8119 ));
8120 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8121
8122 // src/useMutationState.ts
8123 var useMutationState_exports = {};
8124 __export(useMutationState_exports, {
8125 useIsMutating: () => useIsMutating,
8126 useMutationState: () => useMutationState
8127 });
8128 module.exports = __toCommonJS(useMutationState_exports);
8129 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8130 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8131 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8132 function useIsMutating(filters, queryClient) {
8133 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8134 return useMutationState(
8135 { filters: { ...filters, status: "pending" } },
8136 client
8137 ).length;
8138 }
8139 function getResult(mutationCache, options) {
8140 return mutationCache.findAll(options.filters).map(
8141 (mutation) => options.select ? options.select(mutation) : mutation.state
8142 );
8143 }
8144 function useMutationState(options = {}, queryClient) {
8145 const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
8146 const optionsRef = React.useRef(options);
8147 const result = React.useRef(null);
8148 if (!result.current) {
8149 result.current = getResult(mutationCache, options);
8150 }
8151 React.useEffect(() => {
8152 optionsRef.current = options;
8153 });
8154 return React.useSyncExternalStore(
8155 React.useCallback(
8156 (onStoreChange) => mutationCache.subscribe(() => {
8157 const nextResult = (0, import_query_core.replaceEqualDeep)(
8158 result.current,
8159 getResult(mutationCache, optionsRef.current)
8160 );
8161 if (result.current !== nextResult) {
8162 result.current = nextResult;
8163 import_query_core.notifyManager.schedule(onStoreChange);
8164 }
8165 }),
8166 [mutationCache]
8167 ),
8168 () => result.current,
8169 () => result.current
8170 );
8171 }
8172 // Annotate the CommonJS export names for ESM import in node:
8173 0 && (0);
8174 //# sourceMappingURL=useMutationState.cjs.map
8175
8176 /***/ }),
8177
8178 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs":
8179 /*!***************************************************************************************!*\
8180 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs ***!
8181 \***************************************************************************************/
8182 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8183
8184 "use strict";
8185
8186 var __defProp = Object.defineProperty;
8187 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8188 var __getOwnPropNames = Object.getOwnPropertyNames;
8189 var __hasOwnProp = Object.prototype.hasOwnProperty;
8190 var __export = (target, all) => {
8191 for (var name in all)
8192 __defProp(target, name, { get: all[name], enumerable: true });
8193 };
8194 var __copyProps = (to, from, except, desc) => {
8195 if (from && typeof from === "object" || typeof from === "function") {
8196 for (let key of __getOwnPropNames(from))
8197 if (!__hasOwnProp.call(to, key) && key !== except)
8198 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8199 }
8200 return to;
8201 };
8202 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8203
8204 // src/usePrefetchInfiniteQuery.tsx
8205 var usePrefetchInfiniteQuery_exports = {};
8206 __export(usePrefetchInfiniteQuery_exports, {
8207 usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery
8208 });
8209 module.exports = __toCommonJS(usePrefetchInfiniteQuery_exports);
8210 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8211 function usePrefetchInfiniteQuery(options, queryClient) {
8212 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8213 if (!client.getQueryState(options.queryKey)) {
8214 client.prefetchInfiniteQuery(options);
8215 }
8216 }
8217 // Annotate the CommonJS export names for ESM import in node:
8218 0 && (0);
8219 //# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map
8220
8221 /***/ }),
8222
8223 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs":
8224 /*!*******************************************************************************!*\
8225 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs ***!
8226 \*******************************************************************************/
8227 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8228
8229 "use strict";
8230
8231 var __defProp = Object.defineProperty;
8232 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8233 var __getOwnPropNames = Object.getOwnPropertyNames;
8234 var __hasOwnProp = Object.prototype.hasOwnProperty;
8235 var __export = (target, all) => {
8236 for (var name in all)
8237 __defProp(target, name, { get: all[name], enumerable: true });
8238 };
8239 var __copyProps = (to, from, except, desc) => {
8240 if (from && typeof from === "object" || typeof from === "function") {
8241 for (let key of __getOwnPropNames(from))
8242 if (!__hasOwnProp.call(to, key) && key !== except)
8243 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8244 }
8245 return to;
8246 };
8247 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8248
8249 // src/usePrefetchQuery.tsx
8250 var usePrefetchQuery_exports = {};
8251 __export(usePrefetchQuery_exports, {
8252 usePrefetchQuery: () => usePrefetchQuery
8253 });
8254 module.exports = __toCommonJS(usePrefetchQuery_exports);
8255 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8256 function usePrefetchQuery(options, queryClient) {
8257 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8258 if (!client.getQueryState(options.queryKey)) {
8259 client.prefetchQuery(options);
8260 }
8261 }
8262 // Annotate the CommonJS export names for ESM import in node:
8263 0 && (0);
8264 //# sourceMappingURL=usePrefetchQuery.cjs.map
8265
8266 /***/ }),
8267
8268 /***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
8269 /*!*************************************************************************!*\
8270 !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
8271 \*************************************************************************/
8272 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8273
8274 "use strict";
8275
8276 "use client";
8277 var __create = Object.create;
8278 var __defProp = Object.defineProperty;
8279 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8280 var __getOwnPropNames = Object.getOwnPropertyNames;
8281 var __getProtoOf = Object.getPrototypeOf;
8282 var __hasOwnProp = Object.prototype.hasOwnProperty;
8283 var __export = (target, all) => {
8284 for (var name in all)
8285 __defProp(target, name, { get: all[name], enumerable: true });
8286 };
8287 var __copyProps = (to, from, except, desc) => {
8288 if (from && typeof from === "object" || typeof from === "function") {
8289 for (let key of __getOwnPropNames(from))
8290 if (!__hasOwnProp.call(to, key) && key !== except)
8291 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8292 }
8293 return to;
8294 };
8295 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8296 // If the importer is in node compatibility mode or this is not an ESM
8297 // file that has been converted to a CommonJS file using a Babel-
8298 // compatible transform (i.e. "__esModule" has not been set), then set
8299 // "default" to the CommonJS "module.exports" for node compatibility.
8300 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8301 mod
8302 ));
8303 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8304
8305 // src/useQueries.ts
8306 var useQueries_exports = {};
8307 __export(useQueries_exports, {
8308 useQueries: () => useQueries
8309 });
8310 module.exports = __toCommonJS(useQueries_exports);
8311 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8312 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8313 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8314 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
8315 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
8316 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
8317 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8318 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
8319 function useQueries({
8320 queries,
8321 ...options
8322 }, queryClient) {
8323 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8324 const isRestoring = (0, import_isRestoring.useIsRestoring)();
8325 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
8326 const defaultedQueries = React.useMemo(
8327 () => queries.map((opts) => {
8328 const defaultedOptions = client.defaultQueryOptions(
8329 opts
8330 );
8331 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
8332 return defaultedOptions;
8333 }),
8334 [queries, client, isRestoring]
8335 );
8336 defaultedQueries.forEach((query) => {
8337 (0, import_suspense.ensureSuspenseTimers)(query);
8338 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
8339 });
8340 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
8341 const [observer] = React.useState(
8342 () => new import_query_core.QueriesObserver(
8343 client,
8344 defaultedQueries,
8345 options
8346 )
8347 );
8348 const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(
8349 defaultedQueries,
8350 options.combine
8351 );
8352 React.useSyncExternalStore(
8353 React.useCallback(
8354 (onStoreChange) => isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8355 [observer, isRestoring]
8356 ),
8357 () => observer.getCurrentResult(),
8358 () => observer.getCurrentResult()
8359 );
8360 React.useEffect(() => {
8361 observer.setQueries(
8362 defaultedQueries,
8363 options,
8364 {
8365 listeners: false
8366 }
8367 );
8368 }, [defaultedQueries, options, observer]);
8369 const shouldAtLeastOneSuspend = optimisticResult.some(
8370 (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result)
8371 );
8372 const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
8373 const opts = defaultedQueries[index];
8374 if (opts) {
8375 const queryObserver = new import_query_core.QueryObserver(client, opts);
8376 if ((0, import_suspense.shouldSuspend)(opts, result)) {
8377 return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8378 } else if ((0, import_suspense.willFetch)(result, isRestoring)) {
8379 void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8380 }
8381 }
8382 return [];
8383 }) : [];
8384 if (suspensePromises.length > 0) {
8385 throw Promise.all(suspensePromises);
8386 }
8387 const firstSingleResultWhichShouldThrow = optimisticResult.find(
8388 (result, index) => {
8389 const query = defaultedQueries[index];
8390 return query && (0, import_errorBoundaryUtils.getHasError)({
8391 result,
8392 errorResetBoundary,
8393 throwOnError: query.throwOnError,
8394 query: client.getQueryCache().get(query.queryHash)
8395 });
8396 }
8397 );
8398 if (firstSingleResultWhichShouldThrow?.error) {
8399 throw firstSingleResultWhichShouldThrow.error;
8400 }
8401 return getCombinedResult(trackResult());
8402 }
8403 // Annotate the CommonJS export names for ESM import in node:
8404 0 && (0);
8405 //# sourceMappingURL=useQueries.cjs.map
8406
8407 /***/ }),
8408
8409 /***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
8410 /*!***********************************************************************!*\
8411 !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
8412 \***********************************************************************/
8413 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8414
8415 "use strict";
8416
8417 "use client";
8418 var __defProp = Object.defineProperty;
8419 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8420 var __getOwnPropNames = Object.getOwnPropertyNames;
8421 var __hasOwnProp = Object.prototype.hasOwnProperty;
8422 var __export = (target, all) => {
8423 for (var name in all)
8424 __defProp(target, name, { get: all[name], enumerable: true });
8425 };
8426 var __copyProps = (to, from, except, desc) => {
8427 if (from && typeof from === "object" || typeof from === "function") {
8428 for (let key of __getOwnPropNames(from))
8429 if (!__hasOwnProp.call(to, key) && key !== except)
8430 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8431 }
8432 return to;
8433 };
8434 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8435
8436 // src/useQuery.ts
8437 var useQuery_exports = {};
8438 __export(useQuery_exports, {
8439 useQuery: () => useQuery
8440 });
8441 module.exports = __toCommonJS(useQuery_exports);
8442 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8443 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8444 function useQuery(options, queryClient) {
8445 return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
8446 }
8447 // Annotate the CommonJS export names for ESM import in node:
8448 0 && (0);
8449 //# sourceMappingURL=useQuery.cjs.map
8450
8451 /***/ }),
8452
8453 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
8454 /*!***************************************************************************************!*\
8455 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
8456 \***************************************************************************************/
8457 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8458
8459 "use strict";
8460
8461 "use client";
8462 var __defProp = Object.defineProperty;
8463 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8464 var __getOwnPropNames = Object.getOwnPropertyNames;
8465 var __hasOwnProp = Object.prototype.hasOwnProperty;
8466 var __export = (target, all) => {
8467 for (var name in all)
8468 __defProp(target, name, { get: all[name], enumerable: true });
8469 };
8470 var __copyProps = (to, from, except, desc) => {
8471 if (from && typeof from === "object" || typeof from === "function") {
8472 for (let key of __getOwnPropNames(from))
8473 if (!__hasOwnProp.call(to, key) && key !== except)
8474 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8475 }
8476 return to;
8477 };
8478 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8479
8480 // src/useSuspenseInfiniteQuery.ts
8481 var useSuspenseInfiniteQuery_exports = {};
8482 __export(useSuspenseInfiniteQuery_exports, {
8483 useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
8484 });
8485 module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
8486 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8487 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8488 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8489 function useSuspenseInfiniteQuery(options, queryClient) {
8490 if (true) {
8491 if (options.queryFn === import_query_core.skipToken) {
8492 console.error("skipToken is not allowed for useSuspenseInfiniteQuery");
8493 }
8494 }
8495 return (0, import_useBaseQuery.useBaseQuery)(
8496 {
8497 ...options,
8498 enabled: true,
8499 suspense: true,
8500 throwOnError: import_suspense.defaultThrowOnError
8501 },
8502 import_query_core.InfiniteQueryObserver,
8503 queryClient
8504 );
8505 }
8506 // Annotate the CommonJS export names for ESM import in node:
8507 0 && (0);
8508 //# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
8509
8510 /***/ }),
8511
8512 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
8513 /*!*********************************************************************************!*\
8514 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
8515 \*********************************************************************************/
8516 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8517
8518 "use strict";
8519
8520 "use client";
8521 var __defProp = Object.defineProperty;
8522 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8523 var __getOwnPropNames = Object.getOwnPropertyNames;
8524 var __hasOwnProp = Object.prototype.hasOwnProperty;
8525 var __export = (target, all) => {
8526 for (var name in all)
8527 __defProp(target, name, { get: all[name], enumerable: true });
8528 };
8529 var __copyProps = (to, from, except, desc) => {
8530 if (from && typeof from === "object" || typeof from === "function") {
8531 for (let key of __getOwnPropNames(from))
8532 if (!__hasOwnProp.call(to, key) && key !== except)
8533 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8534 }
8535 return to;
8536 };
8537 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8538
8539 // src/useSuspenseQueries.ts
8540 var useSuspenseQueries_exports = {};
8541 __export(useSuspenseQueries_exports, {
8542 useSuspenseQueries: () => useSuspenseQueries
8543 });
8544 module.exports = __toCommonJS(useSuspenseQueries_exports);
8545 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8546 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
8547 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8548 function useSuspenseQueries(options, queryClient) {
8549 return (0, import_useQueries.useQueries)(
8550 {
8551 ...options,
8552 queries: options.queries.map((query) => {
8553 if (true) {
8554 if (query.queryFn === import_query_core.skipToken) {
8555 console.error("skipToken is not allowed for useSuspenseQueries");
8556 }
8557 }
8558 return {
8559 ...query,
8560 suspense: true,
8561 throwOnError: import_suspense.defaultThrowOnError,
8562 enabled: true,
8563 placeholderData: void 0
8564 };
8565 })
8566 },
8567 queryClient
8568 );
8569 }
8570 // Annotate the CommonJS export names for ESM import in node:
8571 0 && (0);
8572 //# sourceMappingURL=useSuspenseQueries.cjs.map
8573
8574 /***/ }),
8575
8576 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
8577 /*!*******************************************************************************!*\
8578 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
8579 \*******************************************************************************/
8580 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8581
8582 "use strict";
8583
8584 "use client";
8585 var __defProp = Object.defineProperty;
8586 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8587 var __getOwnPropNames = Object.getOwnPropertyNames;
8588 var __hasOwnProp = Object.prototype.hasOwnProperty;
8589 var __export = (target, all) => {
8590 for (var name in all)
8591 __defProp(target, name, { get: all[name], enumerable: true });
8592 };
8593 var __copyProps = (to, from, except, desc) => {
8594 if (from && typeof from === "object" || typeof from === "function") {
8595 for (let key of __getOwnPropNames(from))
8596 if (!__hasOwnProp.call(to, key) && key !== except)
8597 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8598 }
8599 return to;
8600 };
8601 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8602
8603 // src/useSuspenseQuery.ts
8604 var useSuspenseQuery_exports = {};
8605 __export(useSuspenseQuery_exports, {
8606 useSuspenseQuery: () => useSuspenseQuery
8607 });
8608 module.exports = __toCommonJS(useSuspenseQuery_exports);
8609 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8610 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8611 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8612 function useSuspenseQuery(options, queryClient) {
8613 if (true) {
8614 if (options.queryFn === import_query_core.skipToken) {
8615 console.error("skipToken is not allowed for useSuspenseQuery");
8616 }
8617 }
8618 return (0, import_useBaseQuery.useBaseQuery)(
8619 {
8620 ...options,
8621 enabled: true,
8622 suspense: true,
8623 throwOnError: import_suspense.defaultThrowOnError,
8624 placeholderData: void 0
8625 },
8626 import_query_core.QueryObserver,
8627 queryClient
8628 );
8629 }
8630 // Annotate the CommonJS export names for ESM import in node:
8631 0 && (0);
8632 //# sourceMappingURL=useSuspenseQuery.cjs.map
8633
8634 /***/ }),
8635
8636 /***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
8637 /*!********************************************************************!*\
8638 !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
8639 \********************************************************************/
8640 /***/ ((module) => {
8641
8642 "use strict";
8643
8644 var __defProp = Object.defineProperty;
8645 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8646 var __getOwnPropNames = Object.getOwnPropertyNames;
8647 var __hasOwnProp = Object.prototype.hasOwnProperty;
8648 var __export = (target, all) => {
8649 for (var name in all)
8650 __defProp(target, name, { get: all[name], enumerable: true });
8651 };
8652 var __copyProps = (to, from, except, desc) => {
8653 if (from && typeof from === "object" || typeof from === "function") {
8654 for (let key of __getOwnPropNames(from))
8655 if (!__hasOwnProp.call(to, key) && key !== except)
8656 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8657 }
8658 return to;
8659 };
8660 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8661
8662 // src/utils.ts
8663 var utils_exports = {};
8664 __export(utils_exports, {
8665 noop: () => noop,
8666 shouldThrowError: () => shouldThrowError
8667 });
8668 module.exports = __toCommonJS(utils_exports);
8669 function shouldThrowError(throwError, params) {
8670 if (typeof throwError === "function") {
8671 return throwError(...params);
8672 }
8673 return !!throwError;
8674 }
8675 function noop() {
8676 }
8677 // Annotate the CommonJS export names for ESM import in node:
8678 0 && (0);
8679 //# sourceMappingURL=utils.cjs.map
8680
8681 /***/ })
8682
8683 /******/ });
8684 /************************************************************************/
8685 /******/ // The module cache
8686 /******/ var __webpack_module_cache__ = {};
8687 /******/
8688 /******/ // The require function
8689 /******/ function __webpack_require__(moduleId) {
8690 /******/ // Check if module is in cache
8691 /******/ var cachedModule = __webpack_module_cache__[moduleId];
8692 /******/ if (cachedModule !== undefined) {
8693 /******/ return cachedModule.exports;
8694 /******/ }
8695 /******/ // Create a new module (and put it into the cache)
8696 /******/ var module = __webpack_module_cache__[moduleId] = {
8697 /******/ // no module.id needed
8698 /******/ // no module.loaded needed
8699 /******/ exports: {}
8700 /******/ };
8701 /******/
8702 /******/ // Execute the module function
8703 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
8704 /******/
8705 /******/ // Return the exports of the module
8706 /******/ return module.exports;
8707 /******/ }
8708 /******/
8709 /************************************************************************/
8710 var __webpack_exports__ = {};
8711 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
8712 (() => {
8713 "use strict";
8714 /*!****************************************************!*\
8715 !*** ../modules/notifications/assets/js/editor.js ***!
8716 \****************************************************/
8717
8718
8719 var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js");
8720 var _editorV2 = __webpack_require__(/*! ./components/editor-v2 */ "../modules/notifications/assets/js/components/editor-v2.js");
8721 var _window;
8722 if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) {
8723 (0, _editorV2.editorV2)();
8724 } else {
8725 (0, _editorV.editorV1)();
8726 }
8727 })();
8728
8729 /******/ })()
8730 ;
8731 //# sourceMappingURL=editor-notifications.js.map