| @@ -1,7 +1,64 @@ | ||
| 1 | +/*! elementor - v3.27.0 - 13-02-2025 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 5 | +/***/ "../node_modules/@elementor/query/dist/index.js": | |
| 6 | +/*!******************************************************!*\ | |
| 7 | + !*** ../node_modules/@elementor/query/dist/index.js ***! | |
| 8 | + \******************************************************/ | |
| 9 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 10 | + | |
| 11 | +"use strict"; | |
| 12 | + | |
| 13 | +var __defProp = Object.defineProperty; | |
| 14 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 15 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 16 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 17 | +var __export = (target, all) => { | |
| 18 | + for (var name in all) | |
| 19 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 20 | +}; | |
| 21 | +var __copyProps = (to, from, except, desc) => { | |
| 22 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 23 | + for (let key of __getOwnPropNames(from)) | |
| 24 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 25 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 26 | + } | |
| 27 | + return to; | |
| 28 | +}; | |
| 29 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 30 | + | |
| 31 | +// src/index.ts | |
| 32 | +var src_exports = {}; | |
| 33 | +__export(src_exports, { | |
| 34 | + QueryClient: () => import_react_query2.QueryClient, | |
| 35 | + QueryClientProvider: () => import_react_query2.QueryClientProvider, | |
| 36 | + createQueryClient: () => createQueryClient, | |
| 37 | + useInfiniteQuery: () => import_react_query2.useInfiniteQuery, | |
| 38 | + useMutation: () => import_react_query2.useMutation, | |
| 39 | + useQuery: () => import_react_query2.useQuery, | |
| 40 | + useQueryClient: () => import_react_query2.useQueryClient | |
| 41 | +}); | |
| 42 | +module.exports = __toCommonJS(src_exports); | |
| 43 | +var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 44 | +var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 45 | +function createQueryClient() { | |
| 46 | + return new import_react_query.QueryClient({ | |
| 47 | + defaultOptions: { | |
| 48 | + queries: { | |
| 49 | + refetchOnWindowFocus: false, | |
| 50 | + refetchOnReconnect: false | |
| 51 | + } | |
| 52 | + } | |
| 53 | + }); | |
| 54 | +} | |
| 55 | +// Annotate the CommonJS export names for ESM import in node: | |
| 56 | +0 && (0); | |
| 57 | +//# sourceMappingURL=index.js.map | |
| 58 | + | |
| 59 | +/***/ }), | |
| 60 | + | |
| 4 | 61 | /***/ "../app/assets/js/hooks/use-ajax.js": |
| 5 | 62 | /*!******************************************!*\ |
| 6 | 63 | !*** ../app/assets/js/hooks/use-ajax.js ***! |
| 7 | 64 | \******************************************/ |
| @@ -43,9 +100,9 @@ | ||
| 43 | 100 | } |
| 44 | 101 | }; |
| 45 | 102 | var runRequest = /*#__PURE__*/function () { |
| 46 | 103 | var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(config) { |
| 47 | - return _regenerator.default.wrap(function (_context) { | |
| 104 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 48 | 105 | while (1) switch (_context.prev = _context.next) { |
| 49 | 106 | case 0: |
| 50 | 107 | return _context.abrupt("return", new Promise(function (resolve, reject) { |
| 51 | 108 | var formData = new FormData(); |
| @@ -141,13 +198,14 @@ | ||
| 141 | 198 | exports["default"] = void 0; |
| 142 | 199 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 143 | 200 | var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 144 | 201 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 145 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 202 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 146 | 203 | var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); |
| 147 | 204 | var _checklist = _interopRequireDefault(__webpack_require__(/*! ./components/checklist */ "../modules/checklist/assets/js/app/components/checklist.js")); |
| 148 | 205 | var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 149 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 206 | +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); } | |
| 207 | +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; } | |
| 150 | 208 | var App = function App() { |
| 151 | 209 | var isRTL = elementorCommon.config.isRTL, |
| 152 | 210 | _useQuery = (0, _query.useQuery)({ |
| 153 | 211 | queryKey: ['steps'], |
| @@ -244,9 +302,9 @@ | ||
| 244 | 302 | isMarkedCompleted = step[IS_MARKED_COMPLETED], |
| 245 | 303 | shouldShowMarkAsDone = !isAbsoluteCompleted && !isImmutableCompleted && !promotionData; |
| 246 | 304 | var redirectHandler = /*#__PURE__*/function () { |
| 247 | 305 | var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 248 | - return _regenerator.default.wrap(function (_context) { | |
| 306 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 249 | 307 | while (1) switch (_context.prev = _context.next) { |
| 250 | 308 | case 0: |
| 251 | 309 | if (promotionData) { |
| 252 | 310 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UPGRADE); |
| @@ -253,18 +311,18 @@ | ||
| 253 | 311 | } else { |
| 254 | 312 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, ACTION); |
| 255 | 313 | } |
| 256 | 314 | if (!(!elementor || !_consts.STEP_IDS_TO_COMPLETE_IN_EDITOR.includes(id) || !_consts.PANEL_ROUTES[id])) { |
| 257 | - _context.next = 1; | |
| 315 | + _context.next = 3; | |
| 258 | 316 | break; |
| 259 | 317 | } |
| 260 | 318 | return _context.abrupt("return", window.open(ctaUrl, '_blank')); |
| 261 | - case 1: | |
| 262 | - _context.next = 2; | |
| 319 | + case 3: | |
| 320 | + _context.next = 5; | |
| 263 | 321 | return $e.run('panel/global/open'); |
| 264 | - case 2: | |
| 322 | + case 5: | |
| 265 | 323 | $e.route(_consts.PANEL_ROUTES[id]); |
| 266 | - case 3: | |
| 324 | + case 6: | |
| 267 | 325 | case "end": |
| 268 | 326 | return _context.stop(); |
| 269 | 327 | } |
| 270 | 328 | }, _callee); |
| @@ -274,10 +332,10 @@ | ||
| 274 | 332 | }; |
| 275 | 333 | }(); |
| 276 | 334 | var toggleMarkAsDone = /*#__PURE__*/function () { |
| 277 | 335 | var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { |
| 278 | - var currState, _t; | |
| 279 | - return _regenerator.default.wrap(function (_context2) { | |
| 336 | + var currState; | |
| 337 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 280 | 338 | while (1) switch (_context2.prev = _context2.next) { |
| 281 | 339 | case 0: |
| 282 | 340 | currState = isMarkedCompleted; |
| 283 | 341 | if (isMarkedCompleted) { |
| @@ -284,24 +342,24 @@ | ||
| 284 | 342 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UNDONE); |
| 285 | 343 | } else { |
| 286 | 344 | (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, DONE); |
| 287 | 345 | } |
| 288 | - _context2.prev = 1; | |
| 346 | + _context2.prev = 2; | |
| 289 | 347 | updateStepsState(IS_MARKED_COMPLETED, !currState); |
| 290 | - _context2.next = 2; | |
| 348 | + _context2.next = 6; | |
| 291 | 349 | return (0, _functions.updateStep)(id, (0, _defineProperty2.default)({}, IS_MARKED_COMPLETED, !currState)); |
| 292 | - case 2: | |
| 293 | - _context2.next = 4; | |
| 350 | + case 6: | |
| 351 | + _context2.next = 11; | |
| 294 | 352 | break; |
| 295 | - case 3: | |
| 296 | - _context2.prev = 3; | |
| 297 | - _t = _context2["catch"](1); | |
| 353 | + case 8: | |
| 354 | + _context2.prev = 8; | |
| 355 | + _context2.t0 = _context2["catch"](2); | |
| 298 | 356 | updateStepsState(IS_MARKED_COMPLETED, currState); |
| 299 | - case 4: | |
| 357 | + case 11: | |
| 300 | 358 | case "end": |
| 301 | 359 | return _context2.stop(); |
| 302 | 360 | } |
| 303 | - }, _callee2, null, [[1, 3]]); | |
| 361 | + }, _callee2, null, [[2, 8]]); | |
| 304 | 362 | })); |
| 305 | 363 | return function toggleMarkAsDone() { |
| 306 | 364 | return _ref3.apply(this, arguments); |
| 307 | 365 | }; |
| @@ -475,9 +533,10 @@ | ||
| 475 | 533 | var _checklistItem = _interopRequireDefault(__webpack_require__(/*! ./checklist-item */ "../modules/checklist/assets/js/app/components/checklist-item.js")); |
| 476 | 534 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 477 | 535 | var _successMessage = _interopRequireDefault(__webpack_require__(/*! ./success-message */ "../modules/checklist/assets/js/app/components/success-message.js")); |
| 478 | 536 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 479 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 537 | +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); } | |
| 538 | +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; } | |
| 480 | 539 | var ChecklistWrapper = function ChecklistWrapper(_ref) { |
| 481 | 540 | var steps = _ref.steps, |
| 482 | 541 | setSteps = _ref.setSteps, |
| 483 | 542 | isMinimized = _ref.isMinimized; |
| @@ -542,9 +601,10 @@ | ||
| 542 | 601 | var _checklistWrapper = _interopRequireDefault(__webpack_require__(/*! ./checklist-wrapper */ "../modules/checklist/assets/js/app/components/checklist-wrapper.js")); |
| 543 | 602 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 544 | 603 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 545 | 604 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 546 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); } | |
| 605 | +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); } | |
| 606 | +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; } | |
| 547 | 607 | var IS_POPUP_MINIMIZED = _consts.USER_PROGRESS.IS_POPUP_MINIMIZED; |
| 548 | 608 | var Checklist = function Checklist(props) { |
| 549 | 609 | var _useState = (0, _react.useState)(props.steps), |
| 550 | 610 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| @@ -555,29 +615,29 @@ | ||
| 555 | 615 | isMinimized = _useState4[0], |
| 556 | 616 | setIsMinimized = _useState4[1]; |
| 557 | 617 | var toggleIsMinimized = /*#__PURE__*/function () { |
| 558 | 618 | var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 559 | - var currState, _t; | |
| 560 | - return _regenerator.default.wrap(function (_context) { | |
| 619 | + var currState; | |
| 620 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 561 | 621 | while (1) switch (_context.prev = _context.next) { |
| 562 | 622 | case 0: |
| 563 | 623 | currState = isMinimized; |
| 564 | 624 | _context.prev = 1; |
| 565 | 625 | setIsMinimized(!currState); |
| 566 | - _context.next = 2; | |
| 626 | + _context.next = 5; | |
| 567 | 627 | return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, IS_POPUP_MINIMIZED, !currState)); |
| 568 | - case 2: | |
| 569 | - _context.next = 4; | |
| 628 | + case 5: | |
| 629 | + _context.next = 10; | |
| 570 | 630 | break; |
| 571 | - case 3: | |
| 572 | - _context.prev = 3; | |
| 573 | - _t = _context["catch"](1); | |
| 631 | + case 7: | |
| 632 | + _context.prev = 7; | |
| 633 | + _context.t0 = _context["catch"](1); | |
| 574 | 634 | setIsMinimized(currState); |
| 575 | - case 4: | |
| 635 | + case 10: | |
| 576 | 636 | case "end": |
| 577 | 637 | return _context.stop(); |
| 578 | 638 | } |
| 579 | - }, _callee, null, [[1, 3]]); | |
| 639 | + }, _callee, null, [[1, 7]]); | |
| 580 | 640 | })); |
| 581 | 641 | return function toggleIsMinimized() { |
| 582 | 642 | return _ref.apply(this, arguments); |
| 583 | 643 | }; |
| @@ -636,14 +696,15 @@ | ||
| 636 | 696 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 637 | 697 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 638 | 698 | var _progress = _interopRequireDefault(__webpack_require__(/*! ./progress */ "../modules/checklist/assets/js/app/components/progress.js")); |
| 639 | 699 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 640 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 700 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 641 | 701 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 642 | 702 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 643 | 703 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 644 | 704 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 645 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 705 | +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); } | |
| 706 | +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; } | |
| 646 | 707 | var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; |
| 647 | 708 | var CHECKLIST_HEADER_CLOSE = _consts.MIXPANEL_CHECKLIST_STEPS.CHECKLIST_HEADER_CLOSE; |
| 648 | 709 | var Header = function Header(_ref) { |
| 649 | 710 | var steps = _ref.steps, |
| @@ -656,27 +717,27 @@ | ||
| 656 | 717 | userProgress = _useQuery.data, |
| 657 | 718 | closedForFirstTime = (userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]) || false; |
| 658 | 719 | var closeChecklist = /*#__PURE__*/function () { |
| 659 | 720 | var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 660 | - return _regenerator.default.wrap(function (_context) { | |
| 721 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 661 | 722 | while (1) switch (_context.prev = _context.next) { |
| 662 | 723 | case 0: |
| 663 | 724 | (0, _functions.addMixpanelTrackingChecklistHeader)(CHECKLIST_HEADER_CLOSE); |
| 664 | 725 | if (closedForFirstTime) { |
| 665 | - _context.next = 2; | |
| 726 | + _context.next = 5; | |
| 666 | 727 | break; |
| 667 | 728 | } |
| 668 | - _context.next = 1; | |
| 729 | + _context.next = 4; | |
| 669 | 730 | return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME, true)); |
| 670 | - case 1: | |
| 731 | + case 4: | |
| 671 | 732 | window.dispatchEvent(new CustomEvent('elementor/checklist/first_close', { |
| 672 | 733 | detail: { |
| 673 | 734 | message: 'firstClose' |
| 674 | 735 | } |
| 675 | 736 | })); |
| 676 | - case 2: | |
| 737 | + case 5: | |
| 677 | 738 | (0, _functions.toggleChecklistPopup)(); |
| 678 | - case 3: | |
| 739 | + case 6: | |
| 679 | 740 | case "end": |
| 680 | 741 | return _context.stop(); |
| 681 | 742 | } |
| 682 | 743 | }, _callee); |
| @@ -844,9 +905,10 @@ | ||
| 844 | 905 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 845 | 906 | var _useAjax2 = _interopRequireDefault(__webpack_require__(/*! elementor-app/hooks/use-ajax */ "../app/assets/js/hooks/use-ajax.js")); |
| 846 | 907 | var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 847 | 908 | var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 848 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 909 | +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); } | |
| 910 | +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; } | |
| 849 | 911 | var ACTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACTION, |
| 850 | 912 | WELL_DONE = _consts.MIXPANEL_CHECKLIST_STEPS.WELL_DONE; |
| 851 | 913 | var SuccessMessage = function SuccessMessage() { |
| 852 | 914 | var _useAjax = (0, _useAjax2.default)(), |
| @@ -1116,9 +1178,9 @@ | ||
| 1116 | 1178 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1117 | 1179 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1118 | 1180 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1119 | 1181 | var _app = _interopRequireDefault(__webpack_require__(/*! ../app/app */ "../modules/checklist/assets/js/app/app.js")); |
| 1120 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 1182 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1121 | 1183 | var _client = _interopRequireDefault(__webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js")); |
| 1122 | 1184 | var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1123 | 1185 | var _consts = __webpack_require__(/*! ../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 1124 | 1186 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| @@ -1196,9 +1258,10 @@ | ||
| 1196 | 1258 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1197 | 1259 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1198 | 1260 | var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/checklist/assets/js/commands/index.js")); |
| 1199 | 1261 | var commandsData = _interopRequireWildcard(__webpack_require__(/*! ./commands-data/ */ "../modules/checklist/assets/js/commands-data/index.js")); |
| 1200 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1262 | +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); } | |
| 1263 | +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; } | |
| 1201 | 1264 | function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } |
| 1202 | 1265 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1203 | 1266 | var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { |
| 1204 | 1267 | function Component() { |
| @@ -1230,12 +1293,12 @@ | ||
| 1230 | 1293 | }($e.modules.ComponentBase); |
| 1231 | 1294 | |
| 1232 | 1295 | /***/ }), |
| 1233 | 1296 | |
| 1234 | -/***/ "../modules/checklist/assets/js/editor-app-bar-link.js": | |
| 1235 | -/*!*************************************************************!*\ | |
| 1236 | - !*** ../modules/checklist/assets/js/editor-app-bar-link.js ***! | |
| 1237 | - \*************************************************************/ | |
| 1297 | +/***/ "../modules/checklist/assets/js/editor-v-2.js": | |
| 1298 | +/*!****************************************************!*\ | |
| 1299 | + !*** ../modules/checklist/assets/js/editor-v-2.js ***! | |
| 1300 | + \****************************************************/ | |
| 1238 | 1301 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1239 | 1302 | |
| 1240 | 1303 | "use strict"; |
| 1241 | 1304 | |
| @@ -1244,19 +1307,20 @@ | ||
| 1244 | 1307 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 1245 | 1308 | Object.defineProperty(exports, "__esModule", ({ |
| 1246 | 1309 | value: true |
| 1247 | 1310 | })); |
| 1248 | -exports.editorAppBarLink = void 0; | |
| 1311 | +exports.editorV2 = void 0; | |
| 1249 | 1312 | var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar")); |
| 1250 | 1313 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1251 | 1314 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 1252 | 1315 | var _topbarIcon = _interopRequireDefault(__webpack_require__(/*! ./topbar-icon */ "../modules/checklist/assets/js/topbar-icon.js")); |
| 1253 | 1316 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1254 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 1317 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1255 | 1318 | var _commands = __webpack_require__(/*! ./commands */ "../modules/checklist/assets/js/commands/index.js"); |
| 1256 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1319 | +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); } | |
| 1320 | +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; } | |
| 1257 | 1321 | var queryClient = new _query.QueryClient(); |
| 1258 | -var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() { | |
| 1322 | +var editorV2 = exports.editorV2 = function editorV2() { | |
| 1259 | 1323 | var utilitiesMenu = EditorAppBar.utilitiesMenu; |
| 1260 | 1324 | utilitiesMenu.registerLink({ |
| 1261 | 1325 | id: 'app-bar-menu-item-checklist', |
| 1262 | 1326 | priority: 5, |
| @@ -1296,9 +1360,9 @@ | ||
| 1296 | 1360 | exports["default"] = void 0; |
| 1297 | 1361 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1298 | 1362 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 1299 | 1363 | var React = _react; |
| 1300 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 1364 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1301 | 1365 | var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); |
| 1302 | 1366 | var _RocketIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/RocketIcon */ "@elementor/icons/RocketIcon")); |
| 1303 | 1367 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1304 | 1368 | var _reminderModal = _interopRequireDefault(__webpack_require__(/*! ./app/components/reminder-modal */ "../modules/checklist/assets/js/app/components/reminder-modal.js")); |
| @@ -1303,9 +1367,10 @@ | ||
| 1303 | 1367 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1304 | 1368 | var _reminderModal = _interopRequireDefault(__webpack_require__(/*! ./app/components/reminder-modal */ "../modules/checklist/assets/js/app/components/reminder-modal.js")); |
| 1305 | 1369 | var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 1306 | 1370 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 1307 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1371 | +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); } | |
| 1372 | +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; } | |
| 1308 | 1373 | var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; |
| 1309 | 1374 | var TopBarIcon = function TopBarIcon() { |
| 1310 | 1375 | var _useState = (0, _react.useState)(false), |
| 1311 | 1376 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| @@ -1453,19 +1518,19 @@ | ||
| 1453 | 1518 | function _fetchSteps() { |
| 1454 | 1519 | _fetchSteps = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 1455 | 1520 | var _response$data; |
| 1456 | 1521 | var response; |
| 1457 | - return _regenerator.default.wrap(function (_context) { | |
| 1522 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 1458 | 1523 | while (1) switch (_context.prev = _context.next) { |
| 1459 | 1524 | case 0: |
| 1460 | - _context.next = 1; | |
| 1525 | + _context.next = 2; | |
| 1461 | 1526 | return $e.data.get(_consts.STEPS_ROUTE, {}, { |
| 1462 | 1527 | refresh: true |
| 1463 | 1528 | }); |
| 1464 | - case 1: | |
| 1529 | + case 2: | |
| 1465 | 1530 | response = _context.sent; |
| 1466 | 1531 | return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.data) || null); |
| 1467 | - case 2: | |
| 1532 | + case 4: | |
| 1468 | 1533 | case "end": |
| 1469 | 1534 | return _context.stop(); |
| 1470 | 1535 | } |
| 1471 | 1536 | }, _callee); |
| @@ -1478,19 +1543,19 @@ | ||
| 1478 | 1543 | function _fetchUserProgress() { |
| 1479 | 1544 | _fetchUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { |
| 1480 | 1545 | var _response$data2; |
| 1481 | 1546 | var response; |
| 1482 | - return _regenerator.default.wrap(function (_context2) { | |
| 1547 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 1483 | 1548 | while (1) switch (_context2.prev = _context2.next) { |
| 1484 | 1549 | case 0: |
| 1485 | - _context2.next = 1; | |
| 1550 | + _context2.next = 2; | |
| 1486 | 1551 | return $e.data.get(_consts.USER_PROGRESS_ROUTE, {}, { |
| 1487 | 1552 | refresh: true |
| 1488 | 1553 | }); |
| 1489 | - case 1: | |
| 1554 | + case 2: | |
| 1490 | 1555 | response = _context2.sent; |
| 1491 | 1556 | return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.data) || null); |
| 1492 | - case 2: | |
| 1557 | + case 4: | |
| 1493 | 1558 | case "end": |
| 1494 | 1559 | return _context2.stop(); |
| 1495 | 1560 | } |
| 1496 | 1561 | }, _callee2); |
| @@ -1501,20 +1566,20 @@ | ||
| 1501 | 1566 | return _updateStep.apply(this, arguments); |
| 1502 | 1567 | } |
| 1503 | 1568 | function _updateStep() { |
| 1504 | 1569 | _updateStep = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(id, data) { |
| 1505 | - return _regenerator.default.wrap(function (_context3) { | |
| 1570 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 1506 | 1571 | while (1) switch (_context3.prev = _context3.next) { |
| 1507 | 1572 | case 0: |
| 1508 | - _context3.next = 1; | |
| 1573 | + _context3.next = 2; | |
| 1509 | 1574 | return $e.data.update(_consts.STEPS_ROUTE, _objectSpread({ |
| 1510 | 1575 | id: id |
| 1511 | 1576 | }, data), { |
| 1512 | 1577 | id: id |
| 1513 | 1578 | }); |
| 1514 | - case 1: | |
| 1579 | + case 2: | |
| 1515 | 1580 | return _context3.abrupt("return", _context3.sent); |
| 1516 | - case 2: | |
| 1581 | + case 3: | |
| 1517 | 1582 | case "end": |
| 1518 | 1583 | return _context3.stop(); |
| 1519 | 1584 | } |
| 1520 | 1585 | }, _callee3); |
| @@ -1525,16 +1590,16 @@ | ||
| 1525 | 1590 | return _updateUserProgress.apply(this, arguments); |
| 1526 | 1591 | } |
| 1527 | 1592 | function _updateUserProgress() { |
| 1528 | 1593 | _updateUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(data) { |
| 1529 | - return _regenerator.default.wrap(function (_context4) { | |
| 1594 | + return _regenerator.default.wrap(function _callee4$(_context4) { | |
| 1530 | 1595 | while (1) switch (_context4.prev = _context4.next) { |
| 1531 | 1596 | case 0: |
| 1532 | - _context4.next = 1; | |
| 1597 | + _context4.next = 2; | |
| 1533 | 1598 | return $e.data.update(_consts.USER_PROGRESS_ROUTE, data); |
| 1534 | - case 1: | |
| 1599 | + case 2: | |
| 1535 | 1600 | return _context4.abrupt("return", _context4.sent); |
| 1536 | - case 2: | |
| 1601 | + case 3: | |
| 1537 | 1602 | case "end": |
| 1538 | 1603 | return _context4.stop(); |
| 1539 | 1604 | } |
| 1540 | 1605 | }, _callee4); |
| @@ -1551,41 +1616,41 @@ | ||
| 1551 | 1616 | var element = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'button'; |
| 1552 | 1617 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1553 | 1618 | name = name.replace(/_/g, ''); |
| 1554 | 1619 | var eventName = "checklist_steps_".concat(action, "_").concat(name); |
| 1555 | - return elementorCommon.eventsManager.dispatchEvent(eventName, _objectSpread({ | |
| 1556 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1557 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistSteps, | |
| 1558 | - trigger: elementorCommon.eventsManager.config.triggers.click, | |
| 1559 | - element: elementorCommon.eventsManager.config.elements[element] | |
| 1620 | + return elementor.editorEvents.dispatchEvent(eventName, _objectSpread({ | |
| 1621 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1622 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.checklistSteps, | |
| 1623 | + trigger: elementor.editorEvents.config.triggers.click, | |
| 1624 | + element: elementor.editorEvents.config.elements[element] | |
| 1560 | 1625 | }, documentMetaData)); |
| 1561 | 1626 | } |
| 1562 | 1627 | function addMixpanelTrackingChecklistHeader(name) { |
| 1563 | 1628 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1564 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist[name], _objectSpread({ | |
| 1565 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1566 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistHeader, | |
| 1567 | - trigger: elementorCommon.eventsManager.config.triggers.click, | |
| 1568 | - element: elementorCommon.eventsManager.config.elements.buttonIcon | |
| 1629 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.elementorEditor.checklist[name], _objectSpread({ | |
| 1630 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1631 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.checklistHeader, | |
| 1632 | + trigger: elementor.editorEvents.config.triggers.click, | |
| 1633 | + element: elementor.editorEvents.config.elements.buttonIcon | |
| 1569 | 1634 | }, documentMetaData)); |
| 1570 | 1635 | } |
| 1571 | 1636 | function addMixpanelTrackingChecklistTopBar(togglePopupState) { |
| 1572 | 1637 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1573 | 1638 | var name = !togglePopupState ? 'launchpadOn' : 'launchpadOff'; |
| 1574 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar[name], _objectSpread({ | |
| 1575 | - location: elementorCommon.eventsManager.config.locations.topBar, | |
| 1576 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, | |
| 1577 | - trigger: elementorCommon.eventsManager.config.triggers.toggleClick, | |
| 1578 | - element: elementorCommon.eventsManager.config.elements.buttonIcon | |
| 1639 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.topBar[name], _objectSpread({ | |
| 1640 | + location: elementor.editorEvents.config.locations.topBar, | |
| 1641 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.launchpad, | |
| 1642 | + trigger: elementor.editorEvents.config.triggers.toggleClick, | |
| 1643 | + element: elementor.editorEvents.config.elements.buttonIcon | |
| 1579 | 1644 | }, documentMetaData)); |
| 1580 | 1645 | } |
| 1581 | 1646 | function dispatchChecklistOpenEvent() { |
| 1582 | 1647 | var documentMetaData = getDocumentMetaDataMixpanel(); |
| 1583 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist.checklistFirstPopup, _objectSpread({ | |
| 1584 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1585 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, | |
| 1586 | - trigger: elementorCommon.eventsManager.config.triggers.editorLoaded, | |
| 1587 | - element: elementorCommon.eventsManager.config.elements.launchpadChecklist | |
| 1648 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.elementorEditor.checklist.checklistFirstPopup, _objectSpread({ | |
| 1649 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1650 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.launchpad, | |
| 1651 | + trigger: elementor.editorEvents.config.triggers.editorLoaded, | |
| 1652 | + element: elementor.editorEvents.config.elements.launchpadChecklist | |
| 1588 | 1653 | }, documentMetaData)); |
| 1589 | 1654 | } |
| 1590 | 1655 | function getDocumentMetaDataMixpanel() { |
| 1591 | 1656 | var postId = elementor.getPreviewContainer().document.config.id; |
| @@ -1601,796 +1666,8 @@ | ||
| 1601 | 1666 | } |
| 1602 | 1667 | |
| 1603 | 1668 | /***/ }), |
| 1604 | 1669 | |
| 1605 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 1606 | -/*!***************************************************************!*\ | |
| 1607 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 1608 | - \***************************************************************/ | |
| 1609 | -/***/ ((module) => { | |
| 1610 | - | |
| 1611 | -function _OverloadYield(e, d) { | |
| 1612 | - this.v = e, this.k = d; | |
| 1613 | -} | |
| 1614 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1615 | - | |
| 1616 | -/***/ }), | |
| 1617 | - | |
| 1618 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 1619 | -/*!******************************************************************!*\ | |
| 1620 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 1621 | - \******************************************************************/ | |
| 1622 | -/***/ ((module) => { | |
| 1623 | - | |
| 1624 | -function _arrayLikeToArray(r, a) { | |
| 1625 | - (null == a || a > r.length) && (a = r.length); | |
| 1626 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 1627 | - return n; | |
| 1628 | -} | |
| 1629 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1630 | - | |
| 1631 | -/***/ }), | |
| 1632 | - | |
| 1633 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 1634 | -/*!****************************************************************!*\ | |
| 1635 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 1636 | - \****************************************************************/ | |
| 1637 | -/***/ ((module) => { | |
| 1638 | - | |
| 1639 | -function _arrayWithHoles(r) { | |
| 1640 | - if (Array.isArray(r)) return r; | |
| 1641 | -} | |
| 1642 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1643 | - | |
| 1644 | -/***/ }), | |
| 1645 | - | |
| 1646 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 1647 | -/*!*******************************************************************!*\ | |
| 1648 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 1649 | - \*******************************************************************/ | |
| 1650 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1651 | - | |
| 1652 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1653 | -function _arrayWithoutHoles(r) { | |
| 1654 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 1655 | -} | |
| 1656 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1657 | - | |
| 1658 | -/***/ }), | |
| 1659 | - | |
| 1660 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 1661 | -/*!***********************************************************************!*\ | |
| 1662 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 1663 | - \***********************************************************************/ | |
| 1664 | -/***/ ((module) => { | |
| 1665 | - | |
| 1666 | -function _assertThisInitialized(e) { | |
| 1667 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1668 | - return e; | |
| 1669 | -} | |
| 1670 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1671 | - | |
| 1672 | -/***/ }), | |
| 1673 | - | |
| 1674 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 1675 | -/*!******************************************************************!*\ | |
| 1676 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 1677 | - \******************************************************************/ | |
| 1678 | -/***/ ((module) => { | |
| 1679 | - | |
| 1680 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 1681 | - try { | |
| 1682 | - var i = n[a](c), | |
| 1683 | - u = i.value; | |
| 1684 | - } catch (n) { | |
| 1685 | - return void e(n); | |
| 1686 | - } | |
| 1687 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1688 | -} | |
| 1689 | -function _asyncToGenerator(n) { | |
| 1690 | - return function () { | |
| 1691 | - var t = this, | |
| 1692 | - e = arguments; | |
| 1693 | - return new Promise(function (r, o) { | |
| 1694 | - var a = n.apply(t, e); | |
| 1695 | - function _next(n) { | |
| 1696 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1697 | - } | |
| 1698 | - function _throw(n) { | |
| 1699 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1700 | - } | |
| 1701 | - _next(void 0); | |
| 1702 | - }); | |
| 1703 | - }; | |
| 1704 | -} | |
| 1705 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1706 | - | |
| 1707 | -/***/ }), | |
| 1708 | - | |
| 1709 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 1710 | -/*!****************************************************************!*\ | |
| 1711 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 1712 | - \****************************************************************/ | |
| 1713 | -/***/ ((module) => { | |
| 1714 | - | |
| 1715 | -function _classCallCheck(a, n) { | |
| 1716 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1717 | -} | |
| 1718 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1719 | - | |
| 1720 | -/***/ }), | |
| 1721 | - | |
| 1722 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 1723 | -/*!*************************************************************!*\ | |
| 1724 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 1725 | - \*************************************************************/ | |
| 1726 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1727 | - | |
| 1728 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1729 | -function _defineProperties(e, r) { | |
| 1730 | - for (var t = 0; t < r.length; t++) { | |
| 1731 | - var o = r[t]; | |
| 1732 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1733 | - } | |
| 1734 | -} | |
| 1735 | -function _createClass(e, r, t) { | |
| 1736 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1737 | - writable: !1 | |
| 1738 | - }), e; | |
| 1739 | -} | |
| 1740 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1741 | - | |
| 1742 | -/***/ }), | |
| 1743 | - | |
| 1744 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1745 | -/*!****************************************************************!*\ | |
| 1746 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1747 | - \****************************************************************/ | |
| 1748 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1749 | - | |
| 1750 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1751 | -function _defineProperty(e, r, t) { | |
| 1752 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1753 | - value: t, | |
| 1754 | - enumerable: !0, | |
| 1755 | - configurable: !0, | |
| 1756 | - writable: !0 | |
| 1757 | - }) : e[r] = t, e; | |
| 1758 | -} | |
| 1759 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1760 | - | |
| 1761 | -/***/ }), | |
| 1762 | - | |
| 1763 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 1764 | -/*!****************************************************************!*\ | |
| 1765 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 1766 | - \****************************************************************/ | |
| 1767 | -/***/ ((module) => { | |
| 1768 | - | |
| 1769 | -function _getPrototypeOf(t) { | |
| 1770 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1771 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 1772 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1773 | -} | |
| 1774 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1775 | - | |
| 1776 | -/***/ }), | |
| 1777 | - | |
| 1778 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 1779 | -/*!**********************************************************!*\ | |
| 1780 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 1781 | - \**********************************************************/ | |
| 1782 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1783 | - | |
| 1784 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1785 | -function _inherits(t, e) { | |
| 1786 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1787 | - t.prototype = Object.create(e && e.prototype, { | |
| 1788 | - constructor: { | |
| 1789 | - value: t, | |
| 1790 | - writable: !0, | |
| 1791 | - configurable: !0 | |
| 1792 | - } | |
| 1793 | - }), Object.defineProperty(t, "prototype", { | |
| 1794 | - writable: !1 | |
| 1795 | - }), e && setPrototypeOf(t, e); | |
| 1796 | -} | |
| 1797 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1798 | - | |
| 1799 | -/***/ }), | |
| 1800 | - | |
| 1801 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1802 | -/*!***********************************************************************!*\ | |
| 1803 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1804 | - \***********************************************************************/ | |
| 1805 | -/***/ ((module) => { | |
| 1806 | - | |
| 1807 | -function _interopRequireDefault(e) { | |
| 1808 | - return e && e.__esModule ? e : { | |
| 1809 | - "default": e | |
| 1810 | - }; | |
| 1811 | -} | |
| 1812 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1813 | - | |
| 1814 | -/***/ }), | |
| 1815 | - | |
| 1816 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 1817 | -/*!*****************************************************************!*\ | |
| 1818 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 1819 | - \*****************************************************************/ | |
| 1820 | -/***/ ((module) => { | |
| 1821 | - | |
| 1822 | -function _iterableToArray(r) { | |
| 1823 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 1824 | -} | |
| 1825 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1826 | - | |
| 1827 | -/***/ }), | |
| 1828 | - | |
| 1829 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1830 | -/*!**********************************************************************!*\ | |
| 1831 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1832 | - \**********************************************************************/ | |
| 1833 | -/***/ ((module) => { | |
| 1834 | - | |
| 1835 | -function _iterableToArrayLimit(r, l) { | |
| 1836 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1837 | - if (null != t) { | |
| 1838 | - var e, | |
| 1839 | - n, | |
| 1840 | - i, | |
| 1841 | - u, | |
| 1842 | - a = [], | |
| 1843 | - f = !0, | |
| 1844 | - o = !1; | |
| 1845 | - try { | |
| 1846 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 1847 | - if (Object(t) !== t) return; | |
| 1848 | - f = !1; | |
| 1849 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1850 | - } catch (r) { | |
| 1851 | - o = !0, n = r; | |
| 1852 | - } finally { | |
| 1853 | - try { | |
| 1854 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1855 | - } finally { | |
| 1856 | - if (o) throw n; | |
| 1857 | - } | |
| 1858 | - } | |
| 1859 | - return a; | |
| 1860 | - } | |
| 1861 | -} | |
| 1862 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1863 | - | |
| 1864 | -/***/ }), | |
| 1865 | - | |
| 1866 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1867 | -/*!*****************************************************************!*\ | |
| 1868 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1869 | - \*****************************************************************/ | |
| 1870 | -/***/ ((module) => { | |
| 1871 | - | |
| 1872 | -function _nonIterableRest() { | |
| 1873 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1874 | -} | |
| 1875 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1876 | - | |
| 1877 | -/***/ }), | |
| 1878 | - | |
| 1879 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 1880 | -/*!*******************************************************************!*\ | |
| 1881 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 1882 | - \*******************************************************************/ | |
| 1883 | -/***/ ((module) => { | |
| 1884 | - | |
| 1885 | -function _nonIterableSpread() { | |
| 1886 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1887 | -} | |
| 1888 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1889 | - | |
| 1890 | -/***/ }), | |
| 1891 | - | |
| 1892 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 1893 | -/*!***************************************************************************!*\ | |
| 1894 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 1895 | - \***************************************************************************/ | |
| 1896 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1897 | - | |
| 1898 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1899 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 1900 | -function _possibleConstructorReturn(t, e) { | |
| 1901 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1902 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1903 | - return assertThisInitialized(t); | |
| 1904 | -} | |
| 1905 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1906 | - | |
| 1907 | -/***/ }), | |
| 1908 | - | |
| 1909 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 1910 | -/*!*************************************************************!*\ | |
| 1911 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 1912 | - \*************************************************************/ | |
| 1913 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1914 | - | |
| 1915 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 1916 | -function _regenerator() { | |
| 1917 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 1918 | - var e, | |
| 1919 | - t, | |
| 1920 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 1921 | - n = r.iterator || "@@iterator", | |
| 1922 | - o = r.toStringTag || "@@toStringTag"; | |
| 1923 | - function i(r, n, o, i) { | |
| 1924 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 1925 | - u = Object.create(c.prototype); | |
| 1926 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 1927 | - var i, | |
| 1928 | - c, | |
| 1929 | - u, | |
| 1930 | - f = 0, | |
| 1931 | - p = o || [], | |
| 1932 | - y = !1, | |
| 1933 | - G = { | |
| 1934 | - p: 0, | |
| 1935 | - n: 0, | |
| 1936 | - v: e, | |
| 1937 | - a: d, | |
| 1938 | - f: d.bind(e, 4), | |
| 1939 | - d: function d(t, r) { | |
| 1940 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 1941 | - } | |
| 1942 | - }; | |
| 1943 | - function d(r, n) { | |
| 1944 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 1945 | - var o, | |
| 1946 | - i = p[t], | |
| 1947 | - d = G.p, | |
| 1948 | - l = i[2]; | |
| 1949 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 1950 | - } | |
| 1951 | - if (o || r > 1) return a; | |
| 1952 | - throw y = !0, n; | |
| 1953 | - } | |
| 1954 | - return function (o, p, l) { | |
| 1955 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 1956 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 1957 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 1958 | - try { | |
| 1959 | - if (f = 2, i) { | |
| 1960 | - if (c || (o = "next"), t = i[o]) { | |
| 1961 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 1962 | - if (!t.done) return t; | |
| 1963 | - u = t.value, c < 2 && (c = 0); | |
| 1964 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 1965 | - i = e; | |
| 1966 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 1967 | - } catch (t) { | |
| 1968 | - i = e, c = 1, u = t; | |
| 1969 | - } finally { | |
| 1970 | - f = 1; | |
| 1971 | - } | |
| 1972 | - } | |
| 1973 | - return { | |
| 1974 | - value: t, | |
| 1975 | - done: y | |
| 1976 | - }; | |
| 1977 | - }; | |
| 1978 | - }(r, o, i), !0), u; | |
| 1979 | - } | |
| 1980 | - var a = {}; | |
| 1981 | - function Generator() {} | |
| 1982 | - function GeneratorFunction() {} | |
| 1983 | - function GeneratorFunctionPrototype() {} | |
| 1984 | - t = Object.getPrototypeOf; | |
| 1985 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 1986 | - return this; | |
| 1987 | - }), t), | |
| 1988 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 1989 | - function f(e) { | |
| 1990 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 1991 | - } | |
| 1992 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 1993 | - return this; | |
| 1994 | - }), regeneratorDefine(u, "toString", function () { | |
| 1995 | - return "[object Generator]"; | |
| 1996 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 1997 | - return { | |
| 1998 | - w: i, | |
| 1999 | - m: f | |
| 2000 | - }; | |
| 2001 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2002 | -} | |
| 2003 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2004 | - | |
| 2005 | -/***/ }), | |
| 2006 | - | |
| 2007 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 2008 | -/*!******************************************************************!*\ | |
| 2009 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 2010 | - \******************************************************************/ | |
| 2011 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2012 | - | |
| 2013 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2014 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 2015 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 2016 | - return a.next().then(function (n) { | |
| 2017 | - return n.done ? n.value : a.next(); | |
| 2018 | - }); | |
| 2019 | -} | |
| 2020 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2021 | - | |
| 2022 | -/***/ }), | |
| 2023 | - | |
| 2024 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 2025 | -/*!*********************************************************************!*\ | |
| 2026 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 2027 | - \*********************************************************************/ | |
| 2028 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2029 | - | |
| 2030 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2031 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2032 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 2033 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 2034 | -} | |
| 2035 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2036 | - | |
| 2037 | -/***/ }), | |
| 2038 | - | |
| 2039 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 2040 | -/*!**************************************************************************!*\ | |
| 2041 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 2042 | - \**************************************************************************/ | |
| 2043 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2044 | - | |
| 2045 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2046 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2047 | -function AsyncIterator(t, e) { | |
| 2048 | - function n(r, o, i, f) { | |
| 2049 | - try { | |
| 2050 | - var c = t[r](o), | |
| 2051 | - u = c.value; | |
| 2052 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 2053 | - n("next", t, i, f); | |
| 2054 | - }, function (t) { | |
| 2055 | - n("throw", t, i, f); | |
| 2056 | - }) : e.resolve(u).then(function (t) { | |
| 2057 | - c.value = t, i(c); | |
| 2058 | - }, function (t) { | |
| 2059 | - return n("throw", t, i, f); | |
| 2060 | - }); | |
| 2061 | - } catch (t) { | |
| 2062 | - f(t); | |
| 2063 | - } | |
| 2064 | - } | |
| 2065 | - var r; | |
| 2066 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 2067 | - return this; | |
| 2068 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 2069 | - function f() { | |
| 2070 | - return new e(function (e, r) { | |
| 2071 | - n(t, i, e, r); | |
| 2072 | - }); | |
| 2073 | - } | |
| 2074 | - return r = r ? r.then(f, f) : f(); | |
| 2075 | - }, !0); | |
| 2076 | -} | |
| 2077 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2078 | - | |
| 2079 | -/***/ }), | |
| 2080 | - | |
| 2081 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 2082 | -/*!*******************************************************************!*\ | |
| 2083 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 2084 | - \*******************************************************************/ | |
| 2085 | -/***/ ((module) => { | |
| 2086 | - | |
| 2087 | -function _regeneratorDefine(e, r, n, t) { | |
| 2088 | - var i = Object.defineProperty; | |
| 2089 | - try { | |
| 2090 | - i({}, "", {}); | |
| 2091 | - } catch (e) { | |
| 2092 | - i = 0; | |
| 2093 | - } | |
| 2094 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 2095 | - function o(r, n) { | |
| 2096 | - _regeneratorDefine(e, r, function (e) { | |
| 2097 | - return this._invoke(r, n, e); | |
| 2098 | - }); | |
| 2099 | - } | |
| 2100 | - r ? i ? i(e, r, { | |
| 2101 | - value: n, | |
| 2102 | - enumerable: !t, | |
| 2103 | - configurable: !t, | |
| 2104 | - writable: !t | |
| 2105 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 2106 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 2107 | -} | |
| 2108 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2109 | - | |
| 2110 | -/***/ }), | |
| 2111 | - | |
| 2112 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 2113 | -/*!*****************************************************************!*\ | |
| 2114 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 2115 | - \*****************************************************************/ | |
| 2116 | -/***/ ((module) => { | |
| 2117 | - | |
| 2118 | -function _regeneratorKeys(e) { | |
| 2119 | - var n = Object(e), | |
| 2120 | - r = []; | |
| 2121 | - for (var t in n) r.unshift(t); | |
| 2122 | - return function e() { | |
| 2123 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 2124 | - return e.done = !0, e; | |
| 2125 | - }; | |
| 2126 | -} | |
| 2127 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2128 | - | |
| 2129 | -/***/ }), | |
| 2130 | - | |
| 2131 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 2132 | -/*!********************************************************************!*\ | |
| 2133 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 2134 | - \********************************************************************/ | |
| 2135 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2136 | - | |
| 2137 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2138 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2139 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 2140 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2141 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2142 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 2143 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 2144 | -function _regeneratorRuntime() { | |
| 2145 | - "use strict"; | |
| 2146 | - | |
| 2147 | - var r = regenerator(), | |
| 2148 | - e = r.m(_regeneratorRuntime), | |
| 2149 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 2150 | - function n(r) { | |
| 2151 | - var e = "function" == typeof r && r.constructor; | |
| 2152 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 2153 | - } | |
| 2154 | - var o = { | |
| 2155 | - "throw": 1, | |
| 2156 | - "return": 2, | |
| 2157 | - "break": 3, | |
| 2158 | - "continue": 3 | |
| 2159 | - }; | |
| 2160 | - function a(r) { | |
| 2161 | - var e, t; | |
| 2162 | - return function (n) { | |
| 2163 | - e || (e = { | |
| 2164 | - stop: function stop() { | |
| 2165 | - return t(n.a, 2); | |
| 2166 | - }, | |
| 2167 | - "catch": function _catch() { | |
| 2168 | - return n.v; | |
| 2169 | - }, | |
| 2170 | - abrupt: function abrupt(r, e) { | |
| 2171 | - return t(n.a, o[r], e); | |
| 2172 | - }, | |
| 2173 | - delegateYield: function delegateYield(r, o, a) { | |
| 2174 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 2175 | - }, | |
| 2176 | - finish: function finish(r) { | |
| 2177 | - return t(n.f, r); | |
| 2178 | - } | |
| 2179 | - }, t = function t(r, _t, o) { | |
| 2180 | - n.p = e.prev, n.n = e.next; | |
| 2181 | - try { | |
| 2182 | - return r(_t, o); | |
| 2183 | - } finally { | |
| 2184 | - e.next = n.n; | |
| 2185 | - } | |
| 2186 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 2187 | - try { | |
| 2188 | - return r.call(this, e); | |
| 2189 | - } finally { | |
| 2190 | - n.p = e.prev, n.n = e.next; | |
| 2191 | - } | |
| 2192 | - }; | |
| 2193 | - } | |
| 2194 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 2195 | - return { | |
| 2196 | - wrap: function wrap(e, t, n, o) { | |
| 2197 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 2198 | - }, | |
| 2199 | - isGeneratorFunction: n, | |
| 2200 | - mark: r.m, | |
| 2201 | - awrap: function awrap(r, e) { | |
| 2202 | - return new OverloadYield(r, e); | |
| 2203 | - }, | |
| 2204 | - AsyncIterator: regeneratorAsyncIterator, | |
| 2205 | - async: function async(r, e, t, o, u) { | |
| 2206 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 2207 | - }, | |
| 2208 | - keys: regeneratorKeys, | |
| 2209 | - values: regeneratorValues | |
| 2210 | - }; | |
| 2211 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2212 | -} | |
| 2213 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2214 | - | |
| 2215 | -/***/ }), | |
| 2216 | - | |
| 2217 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 2218 | -/*!*******************************************************************!*\ | |
| 2219 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 2220 | - \*******************************************************************/ | |
| 2221 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2222 | - | |
| 2223 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2224 | -function _regeneratorValues(e) { | |
| 2225 | - if (null != e) { | |
| 2226 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 2227 | - r = 0; | |
| 2228 | - if (t) return t.call(e); | |
| 2229 | - if ("function" == typeof e.next) return e; | |
| 2230 | - if (!isNaN(e.length)) return { | |
| 2231 | - next: function next() { | |
| 2232 | - return e && r >= e.length && (e = void 0), { | |
| 2233 | - value: e && e[r++], | |
| 2234 | - done: !e | |
| 2235 | - }; | |
| 2236 | - } | |
| 2237 | - }; | |
| 2238 | - } | |
| 2239 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 2240 | -} | |
| 2241 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2242 | - | |
| 2243 | -/***/ }), | |
| 2244 | - | |
| 2245 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 2246 | -/*!****************************************************************!*\ | |
| 2247 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 2248 | - \****************************************************************/ | |
| 2249 | -/***/ ((module) => { | |
| 2250 | - | |
| 2251 | -function _setPrototypeOf(t, e) { | |
| 2252 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 2253 | - return t.__proto__ = e, t; | |
| 2254 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 2255 | -} | |
| 2256 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2257 | - | |
| 2258 | -/***/ }), | |
| 2259 | - | |
| 2260 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 2261 | -/*!***************************************************************!*\ | |
| 2262 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 2263 | - \***************************************************************/ | |
| 2264 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2265 | - | |
| 2266 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 2267 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 2268 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2269 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 2270 | -function _slicedToArray(r, e) { | |
| 2271 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 2272 | -} | |
| 2273 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2274 | - | |
| 2275 | -/***/ }), | |
| 2276 | - | |
| 2277 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 2278 | -/*!*******************************************************************!*\ | |
| 2279 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 2280 | - \*******************************************************************/ | |
| 2281 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2282 | - | |
| 2283 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 2284 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 2285 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2286 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 2287 | -function _toConsumableArray(r) { | |
| 2288 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 2289 | -} | |
| 2290 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2291 | - | |
| 2292 | -/***/ }), | |
| 2293 | - | |
| 2294 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 2295 | -/*!*************************************************************!*\ | |
| 2296 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 2297 | - \*************************************************************/ | |
| 2298 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2299 | - | |
| 2300 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2301 | -function toPrimitive(t, r) { | |
| 2302 | - if ("object" != _typeof(t) || !t) return t; | |
| 2303 | - var e = t[Symbol.toPrimitive]; | |
| 2304 | - if (void 0 !== e) { | |
| 2305 | - var i = e.call(t, r || "default"); | |
| 2306 | - if ("object" != _typeof(i)) return i; | |
| 2307 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 2308 | - } | |
| 2309 | - return ("string" === r ? String : Number)(t); | |
| 2310 | -} | |
| 2311 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2312 | - | |
| 2313 | -/***/ }), | |
| 2314 | - | |
| 2315 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 2316 | -/*!***************************************************************!*\ | |
| 2317 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 2318 | - \***************************************************************/ | |
| 2319 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2320 | - | |
| 2321 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2322 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 2323 | -function toPropertyKey(t) { | |
| 2324 | - var i = toPrimitive(t, "string"); | |
| 2325 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 2326 | -} | |
| 2327 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2328 | - | |
| 2329 | -/***/ }), | |
| 2330 | - | |
| 2331 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 2332 | -/*!********************************************************!*\ | |
| 2333 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 2334 | - \********************************************************/ | |
| 2335 | -/***/ ((module) => { | |
| 2336 | - | |
| 2337 | -function _typeof(o) { | |
| 2338 | - "@babel/helpers - typeof"; | |
| 2339 | - | |
| 2340 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 2341 | - return typeof o; | |
| 2342 | - } : function (o) { | |
| 2343 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 2344 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 2345 | -} | |
| 2346 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2347 | - | |
| 2348 | -/***/ }), | |
| 2349 | - | |
| 2350 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 2351 | -/*!****************************************************************************!*\ | |
| 2352 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 2353 | - \****************************************************************************/ | |
| 2354 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2355 | - | |
| 2356 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2357 | -function _unsupportedIterableToArray(r, a) { | |
| 2358 | - if (r) { | |
| 2359 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 2360 | - var t = {}.toString.call(r).slice(8, -1); | |
| 2361 | - 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; | |
| 2362 | - } | |
| 2363 | -} | |
| 2364 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2365 | - | |
| 2366 | -/***/ }), | |
| 2367 | - | |
| 2368 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 2369 | -/*!***********************************************************!*\ | |
| 2370 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 2371 | - \***********************************************************/ | |
| 2372 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2373 | - | |
| 2374 | -// TODO(Babel 8): Remove this file. | |
| 2375 | - | |
| 2376 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 2377 | -module.exports = runtime; | |
| 2378 | - | |
| 2379 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 2380 | -try { | |
| 2381 | - regeneratorRuntime = runtime; | |
| 2382 | -} catch (accidentalStrictMode) { | |
| 2383 | - if (typeof globalThis === "object") { | |
| 2384 | - globalThis.regeneratorRuntime = runtime; | |
| 2385 | - } else { | |
| 2386 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 2387 | - } | |
| 2388 | -} | |
| 2389 | - | |
| 2390 | - | |
| 2391 | -/***/ }), | |
| 2392 | - | |
| 2393 | 1670 | /***/ "../node_modules/object-assign/index.js": |
| 2394 | 1671 | /*!**********************************************!*\ |
| 2395 | 1672 | !*** ../node_modules/object-assign/index.js ***! |
| 2396 | 1673 | \**********************************************/ |
| @@ -3245,10 +2522,9 @@ | ||
| 3245 | 2522 | // By explicitly using `prop-types` you are opting into new development behavior. |
| 3246 | 2523 | // http://fb.me/prop-types-in-prod |
| 3247 | 2524 | var throwOnDirectAccess = true; |
| 3248 | 2525 | module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 3249 | -} else // removed by dead control flow | |
| 3250 | -{} | |
| 2526 | +} else {} | |
| 3251 | 2527 | |
| 3252 | 2528 | |
| 3253 | 2529 | /***/ }), |
| 3254 | 2530 | |
| @@ -3486,10 +2762,9 @@ | ||
| 3486 | 2762 | |
| 3487 | 2763 | "use strict"; |
| 3488 | 2764 | |
| 3489 | 2765 | |
| 3490 | -if (false) // removed by dead control flow | |
| 3491 | -{} else { | |
| 2766 | +if (false) {} else { | |
| 3492 | 2767 | module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 3493 | 2768 | } |
| 3494 | 2769 | |
| 3495 | 2770 | |
| @@ -3504,10 +2779,9 @@ | ||
| 3504 | 2779 | "use strict"; |
| 3505 | 2780 | |
| 3506 | 2781 | |
| 3507 | 2782 | var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 3508 | -if (false) // removed by dead control flow | |
| 3509 | -{} else { | |
| 2783 | +if (false) {} else { | |
| 3510 | 2784 | var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 3511 | 2785 | exports.createRoot = function(c, o) { |
| 3512 | 2786 | i.usingClientEntryPoint = true; |
| 3513 | 2787 | try { |
| @@ -3528,8 +2802,1390 @@ | ||
| 3528 | 2802 | |
| 3529 | 2803 | |
| 3530 | 2804 | /***/ }), |
| 3531 | 2805 | |
| 2806 | +/***/ "../node_modules/react/cjs/react-jsx-runtime.development.js": | |
| 2807 | +/*!******************************************************************!*\ | |
| 2808 | + !*** ../node_modules/react/cjs/react-jsx-runtime.development.js ***! | |
| 2809 | + \******************************************************************/ | |
| 2810 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2811 | + | |
| 2812 | +"use strict"; | |
| 2813 | +/** | |
| 2814 | + * @license React | |
| 2815 | + * react-jsx-runtime.development.js | |
| 2816 | + * | |
| 2817 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 2818 | + * | |
| 2819 | + * This source code is licensed under the MIT license found in the | |
| 2820 | + * LICENSE file in the root directory of this source tree. | |
| 2821 | + */ | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | +if (true) { | |
| 2826 | + (function() { | |
| 2827 | +'use strict'; | |
| 2828 | + | |
| 2829 | +var React = __webpack_require__(/*! react */ "react"); | |
| 2830 | + | |
| 2831 | +// ATTENTION | |
| 2832 | +// When adding new symbols to this file, | |
| 2833 | +// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' | |
| 2834 | +// The Symbol used to tag the ReactElement-like types. | |
| 2835 | +var REACT_ELEMENT_TYPE = Symbol.for('react.element'); | |
| 2836 | +var REACT_PORTAL_TYPE = Symbol.for('react.portal'); | |
| 2837 | +var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); | |
| 2838 | +var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); | |
| 2839 | +var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | |
| 2840 | +var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | |
| 2841 | +var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | |
| 2842 | +var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | |
| 2843 | +var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | |
| 2844 | +var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); | |
| 2845 | +var REACT_MEMO_TYPE = Symbol.for('react.memo'); | |
| 2846 | +var REACT_LAZY_TYPE = Symbol.for('react.lazy'); | |
| 2847 | +var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); | |
| 2848 | +var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; | |
| 2849 | +var FAUX_ITERATOR_SYMBOL = '@@iterator'; | |
| 2850 | +function getIteratorFn(maybeIterable) { | |
| 2851 | + if (maybeIterable === null || typeof maybeIterable !== 'object') { | |
| 2852 | + return null; | |
| 2853 | + } | |
| 2854 | + | |
| 2855 | + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; | |
| 2856 | + | |
| 2857 | + if (typeof maybeIterator === 'function') { | |
| 2858 | + return maybeIterator; | |
| 2859 | + } | |
| 2860 | + | |
| 2861 | + return null; | |
| 2862 | +} | |
| 2863 | + | |
| 2864 | +var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2865 | + | |
| 2866 | +function error(format) { | |
| 2867 | + { | |
| 2868 | + { | |
| 2869 | + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | |
| 2870 | + args[_key2 - 1] = arguments[_key2]; | |
| 2871 | + } | |
| 2872 | + | |
| 2873 | + printWarning('error', format, args); | |
| 2874 | + } | |
| 2875 | + } | |
| 2876 | +} | |
| 2877 | + | |
| 2878 | +function printWarning(level, format, args) { | |
| 2879 | + // When changing this logic, you might want to also | |
| 2880 | + // update consoleWithStackDev.www.js as well. | |
| 2881 | + { | |
| 2882 | + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 2883 | + var stack = ReactDebugCurrentFrame.getStackAddendum(); | |
| 2884 | + | |
| 2885 | + if (stack !== '') { | |
| 2886 | + format += '%s'; | |
| 2887 | + args = args.concat([stack]); | |
| 2888 | + } // eslint-disable-next-line react-internal/safe-string-coercion | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + var argsWithFormat = args.map(function (item) { | |
| 2892 | + return String(item); | |
| 2893 | + }); // Careful: RN currently depends on this prefix | |
| 2894 | + | |
| 2895 | + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it | |
| 2896 | + // breaks IE9: https://github.com/facebook/react/issues/13610 | |
| 2897 | + // eslint-disable-next-line react-internal/no-production-logging | |
| 2898 | + | |
| 2899 | + Function.prototype.apply.call(console[level], console, argsWithFormat); | |
| 2900 | + } | |
| 2901 | +} | |
| 2902 | + | |
| 2903 | +// ----------------------------------------------------------------------------- | |
| 2904 | + | |
| 2905 | +var enableScopeAPI = false; // Experimental Create Event Handle API. | |
| 2906 | +var enableCacheElement = false; | |
| 2907 | +var enableTransitionTracing = false; // No known bugs, but needs performance testing | |
| 2908 | + | |
| 2909 | +var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | |
| 2910 | +// stuff. Intended to enable React core members to more easily debug scheduling | |
| 2911 | +// issues in DEV builds. | |
| 2912 | + | |
| 2913 | +var enableDebugTracing = false; // Track which Fiber(s) schedule render work. | |
| 2914 | + | |
| 2915 | +var REACT_MODULE_REFERENCE; | |
| 2916 | + | |
| 2917 | +{ | |
| 2918 | + REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | |
| 2919 | +} | |
| 2920 | + | |
| 2921 | +function isValidElementType(type) { | |
| 2922 | + if (typeof type === 'string' || typeof type === 'function') { | |
| 2923 | + return true; | |
| 2924 | + } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + 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 ) { | |
| 2928 | + return true; | |
| 2929 | + } | |
| 2930 | + | |
| 2931 | + if (typeof type === 'object' && type !== null) { | |
| 2932 | + 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 | |
| 2933 | + // types supported by any Flight configuration anywhere since | |
| 2934 | + // we don't know which Flight build this will end up being used | |
| 2935 | + // with. | |
| 2936 | + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | |
| 2937 | + return true; | |
| 2938 | + } | |
| 2939 | + } | |
| 2940 | + | |
| 2941 | + return false; | |
| 2942 | +} | |
| 2943 | + | |
| 2944 | +function getWrappedName(outerType, innerType, wrapperName) { | |
| 2945 | + var displayName = outerType.displayName; | |
| 2946 | + | |
| 2947 | + if (displayName) { | |
| 2948 | + return displayName; | |
| 2949 | + } | |
| 2950 | + | |
| 2951 | + var functionName = innerType.displayName || innerType.name || ''; | |
| 2952 | + return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; | |
| 2953 | +} // Keep in sync with react-reconciler/getComponentNameFromFiber | |
| 2954 | + | |
| 2955 | + | |
| 2956 | +function getContextName(type) { | |
| 2957 | + return type.displayName || 'Context'; | |
| 2958 | +} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | |
| 2959 | + | |
| 2960 | + | |
| 2961 | +function getComponentNameFromType(type) { | |
| 2962 | + if (type == null) { | |
| 2963 | + // Host root, text node or just invalid type. | |
| 2964 | + return null; | |
| 2965 | + } | |
| 2966 | + | |
| 2967 | + { | |
| 2968 | + if (typeof type.tag === 'number') { | |
| 2969 | + error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | |
| 2970 | + } | |
| 2971 | + } | |
| 2972 | + | |
| 2973 | + if (typeof type === 'function') { | |
| 2974 | + return type.displayName || type.name || null; | |
| 2975 | + } | |
| 2976 | + | |
| 2977 | + if (typeof type === 'string') { | |
| 2978 | + return type; | |
| 2979 | + } | |
| 2980 | + | |
| 2981 | + switch (type) { | |
| 2982 | + case REACT_FRAGMENT_TYPE: | |
| 2983 | + return 'Fragment'; | |
| 2984 | + | |
| 2985 | + case REACT_PORTAL_TYPE: | |
| 2986 | + return 'Portal'; | |
| 2987 | + | |
| 2988 | + case REACT_PROFILER_TYPE: | |
| 2989 | + return 'Profiler'; | |
| 2990 | + | |
| 2991 | + case REACT_STRICT_MODE_TYPE: | |
| 2992 | + return 'StrictMode'; | |
| 2993 | + | |
| 2994 | + case REACT_SUSPENSE_TYPE: | |
| 2995 | + return 'Suspense'; | |
| 2996 | + | |
| 2997 | + case REACT_SUSPENSE_LIST_TYPE: | |
| 2998 | + return 'SuspenseList'; | |
| 2999 | + | |
| 3000 | + } | |
| 3001 | + | |
| 3002 | + if (typeof type === 'object') { | |
| 3003 | + switch (type.$$typeof) { | |
| 3004 | + case REACT_CONTEXT_TYPE: | |
| 3005 | + var context = type; | |
| 3006 | + return getContextName(context) + '.Consumer'; | |
| 3007 | + | |
| 3008 | + case REACT_PROVIDER_TYPE: | |
| 3009 | + var provider = type; | |
| 3010 | + return getContextName(provider._context) + '.Provider'; | |
| 3011 | + | |
| 3012 | + case REACT_FORWARD_REF_TYPE: | |
| 3013 | + return getWrappedName(type, type.render, 'ForwardRef'); | |
| 3014 | + | |
| 3015 | + case REACT_MEMO_TYPE: | |
| 3016 | + var outerName = type.displayName || null; | |
| 3017 | + | |
| 3018 | + if (outerName !== null) { | |
| 3019 | + return outerName; | |
| 3020 | + } | |
| 3021 | + | |
| 3022 | + return getComponentNameFromType(type.type) || 'Memo'; | |
| 3023 | + | |
| 3024 | + case REACT_LAZY_TYPE: | |
| 3025 | + { | |
| 3026 | + var lazyComponent = type; | |
| 3027 | + var payload = lazyComponent._payload; | |
| 3028 | + var init = lazyComponent._init; | |
| 3029 | + | |
| 3030 | + try { | |
| 3031 | + return getComponentNameFromType(init(payload)); | |
| 3032 | + } catch (x) { | |
| 3033 | + return null; | |
| 3034 | + } | |
| 3035 | + } | |
| 3036 | + | |
| 3037 | + // eslint-disable-next-line no-fallthrough | |
| 3038 | + } | |
| 3039 | + } | |
| 3040 | + | |
| 3041 | + return null; | |
| 3042 | +} | |
| 3043 | + | |
| 3044 | +var assign = Object.assign; | |
| 3045 | + | |
| 3046 | +// Helpers to patch console.logs to avoid logging during side-effect free | |
| 3047 | +// replaying on render function. This currently only patches the object | |
| 3048 | +// lazily which won't cover if the log function was extracted eagerly. | |
| 3049 | +// We could also eagerly patch the method. | |
| 3050 | +var disabledDepth = 0; | |
| 3051 | +var prevLog; | |
| 3052 | +var prevInfo; | |
| 3053 | +var prevWarn; | |
| 3054 | +var prevError; | |
| 3055 | +var prevGroup; | |
| 3056 | +var prevGroupCollapsed; | |
| 3057 | +var prevGroupEnd; | |
| 3058 | + | |
| 3059 | +function disabledLog() {} | |
| 3060 | + | |
| 3061 | +disabledLog.__reactDisabledLog = true; | |
| 3062 | +function disableLogs() { | |
| 3063 | + { | |
| 3064 | + if (disabledDepth === 0) { | |
| 3065 | + /* eslint-disable react-internal/no-production-logging */ | |
| 3066 | + prevLog = console.log; | |
| 3067 | + prevInfo = console.info; | |
| 3068 | + prevWarn = console.warn; | |
| 3069 | + prevError = console.error; | |
| 3070 | + prevGroup = console.group; | |
| 3071 | + prevGroupCollapsed = console.groupCollapsed; | |
| 3072 | + prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 | |
| 3073 | + | |
| 3074 | + var props = { | |
| 3075 | + configurable: true, | |
| 3076 | + enumerable: true, | |
| 3077 | + value: disabledLog, | |
| 3078 | + writable: true | |
| 3079 | + }; // $FlowFixMe Flow thinks console is immutable. | |
| 3080 | + | |
| 3081 | + Object.defineProperties(console, { | |
| 3082 | + info: props, | |
| 3083 | + log: props, | |
| 3084 | + warn: props, | |
| 3085 | + error: props, | |
| 3086 | + group: props, | |
| 3087 | + groupCollapsed: props, | |
| 3088 | + groupEnd: props | |
| 3089 | + }); | |
| 3090 | + /* eslint-enable react-internal/no-production-logging */ | |
| 3091 | + } | |
| 3092 | + | |
| 3093 | + disabledDepth++; | |
| 3094 | + } | |
| 3095 | +} | |
| 3096 | +function reenableLogs() { | |
| 3097 | + { | |
| 3098 | + disabledDepth--; | |
| 3099 | + | |
| 3100 | + if (disabledDepth === 0) { | |
| 3101 | + /* eslint-disable react-internal/no-production-logging */ | |
| 3102 | + var props = { | |
| 3103 | + configurable: true, | |
| 3104 | + enumerable: true, | |
| 3105 | + writable: true | |
| 3106 | + }; // $FlowFixMe Flow thinks console is immutable. | |
| 3107 | + | |
| 3108 | + Object.defineProperties(console, { | |
| 3109 | + log: assign({}, props, { | |
| 3110 | + value: prevLog | |
| 3111 | + }), | |
| 3112 | + info: assign({}, props, { | |
| 3113 | + value: prevInfo | |
| 3114 | + }), | |
| 3115 | + warn: assign({}, props, { | |
| 3116 | + value: prevWarn | |
| 3117 | + }), | |
| 3118 | + error: assign({}, props, { | |
| 3119 | + value: prevError | |
| 3120 | + }), | |
| 3121 | + group: assign({}, props, { | |
| 3122 | + value: prevGroup | |
| 3123 | + }), | |
| 3124 | + groupCollapsed: assign({}, props, { | |
| 3125 | + value: prevGroupCollapsed | |
| 3126 | + }), | |
| 3127 | + groupEnd: assign({}, props, { | |
| 3128 | + value: prevGroupEnd | |
| 3129 | + }) | |
| 3130 | + }); | |
| 3131 | + /* eslint-enable react-internal/no-production-logging */ | |
| 3132 | + } | |
| 3133 | + | |
| 3134 | + if (disabledDepth < 0) { | |
| 3135 | + error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); | |
| 3136 | + } | |
| 3137 | + } | |
| 3138 | +} | |
| 3139 | + | |
| 3140 | +var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | |
| 3141 | +var prefix; | |
| 3142 | +function describeBuiltInComponentFrame(name, source, ownerFn) { | |
| 3143 | + { | |
| 3144 | + if (prefix === undefined) { | |
| 3145 | + // Extract the VM specific prefix used by each line. | |
| 3146 | + try { | |
| 3147 | + throw Error(); | |
| 3148 | + } catch (x) { | |
| 3149 | + var match = x.stack.trim().match(/\n( *(at )?)/); | |
| 3150 | + prefix = match && match[1] || ''; | |
| 3151 | + } | |
| 3152 | + } // We use the prefix to ensure our stacks line up with native stack frames. | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + return '\n' + prefix + name; | |
| 3156 | + } | |
| 3157 | +} | |
| 3158 | +var reentry = false; | |
| 3159 | +var componentFrameCache; | |
| 3160 | + | |
| 3161 | +{ | |
| 3162 | + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; | |
| 3163 | + componentFrameCache = new PossiblyWeakMap(); | |
| 3164 | +} | |
| 3165 | + | |
| 3166 | +function describeNativeComponentFrame(fn, construct) { | |
| 3167 | + // If something asked for a stack inside a fake render, it should get ignored. | |
| 3168 | + if ( !fn || reentry) { | |
| 3169 | + return ''; | |
| 3170 | + } | |
| 3171 | + | |
| 3172 | + { | |
| 3173 | + var frame = componentFrameCache.get(fn); | |
| 3174 | + | |
| 3175 | + if (frame !== undefined) { | |
| 3176 | + return frame; | |
| 3177 | + } | |
| 3178 | + } | |
| 3179 | + | |
| 3180 | + var control; | |
| 3181 | + reentry = true; | |
| 3182 | + var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. | |
| 3183 | + | |
| 3184 | + Error.prepareStackTrace = undefined; | |
| 3185 | + var previousDispatcher; | |
| 3186 | + | |
| 3187 | + { | |
| 3188 | + previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function | |
| 3189 | + // for warnings. | |
| 3190 | + | |
| 3191 | + ReactCurrentDispatcher.current = null; | |
| 3192 | + disableLogs(); | |
| 3193 | + } | |
| 3194 | + | |
| 3195 | + try { | |
| 3196 | + // This should throw. | |
| 3197 | + if (construct) { | |
| 3198 | + // Something should be setting the props in the constructor. | |
| 3199 | + var Fake = function () { | |
| 3200 | + throw Error(); | |
| 3201 | + }; // $FlowFixMe | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + Object.defineProperty(Fake.prototype, 'props', { | |
| 3205 | + set: function () { | |
| 3206 | + // We use a throwing setter instead of frozen or non-writable props | |
| 3207 | + // because that won't throw in a non-strict mode function. | |
| 3208 | + throw Error(); | |
| 3209 | + } | |
| 3210 | + }); | |
| 3211 | + | |
| 3212 | + if (typeof Reflect === 'object' && Reflect.construct) { | |
| 3213 | + // We construct a different control for this case to include any extra | |
| 3214 | + // frames added by the construct call. | |
| 3215 | + try { | |
| 3216 | + Reflect.construct(Fake, []); | |
| 3217 | + } catch (x) { | |
| 3218 | + control = x; | |
| 3219 | + } | |
| 3220 | + | |
| 3221 | + Reflect.construct(fn, [], Fake); | |
| 3222 | + } else { | |
| 3223 | + try { | |
| 3224 | + Fake.call(); | |
| 3225 | + } catch (x) { | |
| 3226 | + control = x; | |
| 3227 | + } | |
| 3228 | + | |
| 3229 | + fn.call(Fake.prototype); | |
| 3230 | + } | |
| 3231 | + } else { | |
| 3232 | + try { | |
| 3233 | + throw Error(); | |
| 3234 | + } catch (x) { | |
| 3235 | + control = x; | |
| 3236 | + } | |
| 3237 | + | |
| 3238 | + fn(); | |
| 3239 | + } | |
| 3240 | + } catch (sample) { | |
| 3241 | + // This is inlined manually because closure doesn't do it for us. | |
| 3242 | + if (sample && control && typeof sample.stack === 'string') { | |
| 3243 | + // This extracts the first frame from the sample that isn't also in the control. | |
| 3244 | + // Skipping one frame that we assume is the frame that calls the two. | |
| 3245 | + var sampleLines = sample.stack.split('\n'); | |
| 3246 | + var controlLines = control.stack.split('\n'); | |
| 3247 | + var s = sampleLines.length - 1; | |
| 3248 | + var c = controlLines.length - 1; | |
| 3249 | + | |
| 3250 | + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | |
| 3251 | + // We expect at least one stack frame to be shared. | |
| 3252 | + // Typically this will be the root most one. However, stack frames may be | |
| 3253 | + // cut off due to maximum stack limits. In this case, one maybe cut off | |
| 3254 | + // earlier than the other. We assume that the sample is longer or the same | |
| 3255 | + // and there for cut off earlier. So we should find the root most frame in | |
| 3256 | + // the sample somewhere in the control. | |
| 3257 | + c--; | |
| 3258 | + } | |
| 3259 | + | |
| 3260 | + for (; s >= 1 && c >= 0; s--, c--) { | |
| 3261 | + // Next we find the first one that isn't the same which should be the | |
| 3262 | + // frame that called our sample function and the control. | |
| 3263 | + if (sampleLines[s] !== controlLines[c]) { | |
| 3264 | + // In V8, the first line is describing the message but other VMs don't. | |
| 3265 | + // If we're about to return the first line, and the control is also on the same | |
| 3266 | + // line, that's a pretty good indicator that our sample threw at same line as | |
| 3267 | + // the control. I.e. before we entered the sample frame. So we ignore this result. | |
| 3268 | + // This can happen if you passed a class to function component, or non-function. | |
| 3269 | + if (s !== 1 || c !== 1) { | |
| 3270 | + do { | |
| 3271 | + s--; | |
| 3272 | + c--; // We may still have similar intermediate frames from the construct call. | |
| 3273 | + // The next one that isn't the same should be our match though. | |
| 3274 | + | |
| 3275 | + if (c < 0 || sampleLines[s] !== controlLines[c]) { | |
| 3276 | + // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. | |
| 3277 | + var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>" | |
| 3278 | + // but we have a user-provided "displayName" | |
| 3279 | + // splice it in to make the stack more readable. | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + if (fn.displayName && _frame.includes('<anonymous>')) { | |
| 3283 | + _frame = _frame.replace('<anonymous>', fn.displayName); | |
| 3284 | + } | |
| 3285 | + | |
| 3286 | + { | |
| 3287 | + if (typeof fn === 'function') { | |
| 3288 | + componentFrameCache.set(fn, _frame); | |
| 3289 | + } | |
| 3290 | + } // Return the line we found. | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + return _frame; | |
| 3294 | + } | |
| 3295 | + } while (s >= 1 && c >= 0); | |
| 3296 | + } | |
| 3297 | + | |
| 3298 | + break; | |
| 3299 | + } | |
| 3300 | + } | |
| 3301 | + } | |
| 3302 | + } finally { | |
| 3303 | + reentry = false; | |
| 3304 | + | |
| 3305 | + { | |
| 3306 | + ReactCurrentDispatcher.current = previousDispatcher; | |
| 3307 | + reenableLogs(); | |
| 3308 | + } | |
| 3309 | + | |
| 3310 | + Error.prepareStackTrace = previousPrepareStackTrace; | |
| 3311 | + } // Fallback to just using the name if we couldn't make it throw. | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + var name = fn ? fn.displayName || fn.name : ''; | |
| 3315 | + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; | |
| 3316 | + | |
| 3317 | + { | |
| 3318 | + if (typeof fn === 'function') { | |
| 3319 | + componentFrameCache.set(fn, syntheticFrame); | |
| 3320 | + } | |
| 3321 | + } | |
| 3322 | + | |
| 3323 | + return syntheticFrame; | |
| 3324 | +} | |
| 3325 | +function describeFunctionComponentFrame(fn, source, ownerFn) { | |
| 3326 | + { | |
| 3327 | + return describeNativeComponentFrame(fn, false); | |
| 3328 | + } | |
| 3329 | +} | |
| 3330 | + | |
| 3331 | +function shouldConstruct(Component) { | |
| 3332 | + var prototype = Component.prototype; | |
| 3333 | + return !!(prototype && prototype.isReactComponent); | |
| 3334 | +} | |
| 3335 | + | |
| 3336 | +function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | |
| 3337 | + | |
| 3338 | + if (type == null) { | |
| 3339 | + return ''; | |
| 3340 | + } | |
| 3341 | + | |
| 3342 | + if (typeof type === 'function') { | |
| 3343 | + { | |
| 3344 | + return describeNativeComponentFrame(type, shouldConstruct(type)); | |
| 3345 | + } | |
| 3346 | + } | |
| 3347 | + | |
| 3348 | + if (typeof type === 'string') { | |
| 3349 | + return describeBuiltInComponentFrame(type); | |
| 3350 | + } | |
| 3351 | + | |
| 3352 | + switch (type) { | |
| 3353 | + case REACT_SUSPENSE_TYPE: | |
| 3354 | + return describeBuiltInComponentFrame('Suspense'); | |
| 3355 | + | |
| 3356 | + case REACT_SUSPENSE_LIST_TYPE: | |
| 3357 | + return describeBuiltInComponentFrame('SuspenseList'); | |
| 3358 | + } | |
| 3359 | + | |
| 3360 | + if (typeof type === 'object') { | |
| 3361 | + switch (type.$$typeof) { | |
| 3362 | + case REACT_FORWARD_REF_TYPE: | |
| 3363 | + return describeFunctionComponentFrame(type.render); | |
| 3364 | + | |
| 3365 | + case REACT_MEMO_TYPE: | |
| 3366 | + // Memo may contain any component type so we recursively resolve it. | |
| 3367 | + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); | |
| 3368 | + | |
| 3369 | + case REACT_LAZY_TYPE: | |
| 3370 | + { | |
| 3371 | + var lazyComponent = type; | |
| 3372 | + var payload = lazyComponent._payload; | |
| 3373 | + var init = lazyComponent._init; | |
| 3374 | + | |
| 3375 | + try { | |
| 3376 | + // Lazy may contain any component type so we recursively resolve it. | |
| 3377 | + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); | |
| 3378 | + } catch (x) {} | |
| 3379 | + } | |
| 3380 | + } | |
| 3381 | + } | |
| 3382 | + | |
| 3383 | + return ''; | |
| 3384 | +} | |
| 3385 | + | |
| 3386 | +var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 3387 | + | |
| 3388 | +var loggedTypeFailures = {}; | |
| 3389 | +var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 3390 | + | |
| 3391 | +function setCurrentlyValidatingElement(element) { | |
| 3392 | + { | |
| 3393 | + if (element) { | |
| 3394 | + var owner = element._owner; | |
| 3395 | + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | |
| 3396 | + ReactDebugCurrentFrame.setExtraStackFrame(stack); | |
| 3397 | + } else { | |
| 3398 | + ReactDebugCurrentFrame.setExtraStackFrame(null); | |
| 3399 | + } | |
| 3400 | + } | |
| 3401 | +} | |
| 3402 | + | |
| 3403 | +function checkPropTypes(typeSpecs, values, location, componentName, element) { | |
| 3404 | + { | |
| 3405 | + // $FlowFixMe This is okay but Flow doesn't know it. | |
| 3406 | + var has = Function.call.bind(hasOwnProperty); | |
| 3407 | + | |
| 3408 | + for (var typeSpecName in typeSpecs) { | |
| 3409 | + if (has(typeSpecs, typeSpecName)) { | |
| 3410 | + var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to | |
| 3411 | + // fail the render phase where it didn't fail before. So we log it. | |
| 3412 | + // After these have been cleaned up, we'll let them throw. | |
| 3413 | + | |
| 3414 | + try { | |
| 3415 | + // This is intentionally an invariant that gets caught. It's the same | |
| 3416 | + // behavior as without this statement except with a better message. | |
| 3417 | + if (typeof typeSpecs[typeSpecName] !== 'function') { | |
| 3418 | + // eslint-disable-next-line react-internal/prod-error-codes | |
| 3419 | + 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`.'); | |
| 3420 | + err.name = 'Invariant Violation'; | |
| 3421 | + throw err; | |
| 3422 | + } | |
| 3423 | + | |
| 3424 | + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); | |
| 3425 | + } catch (ex) { | |
| 3426 | + error$1 = ex; | |
| 3427 | + } | |
| 3428 | + | |
| 3429 | + if (error$1 && !(error$1 instanceof Error)) { | |
| 3430 | + setCurrentlyValidatingElement(element); | |
| 3431 | + | |
| 3432 | + 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); | |
| 3433 | + | |
| 3434 | + setCurrentlyValidatingElement(null); | |
| 3435 | + } | |
| 3436 | + | |
| 3437 | + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { | |
| 3438 | + // Only monitor this failure once because there tends to be a lot of the | |
| 3439 | + // same error. | |
| 3440 | + loggedTypeFailures[error$1.message] = true; | |
| 3441 | + setCurrentlyValidatingElement(element); | |
| 3442 | + | |
| 3443 | + error('Failed %s type: %s', location, error$1.message); | |
| 3444 | + | |
| 3445 | + setCurrentlyValidatingElement(null); | |
| 3446 | + } | |
| 3447 | + } | |
| 3448 | + } | |
| 3449 | + } | |
| 3450 | +} | |
| 3451 | + | |
| 3452 | +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | |
| 3453 | + | |
| 3454 | +function isArray(a) { | |
| 3455 | + return isArrayImpl(a); | |
| 3456 | +} | |
| 3457 | + | |
| 3458 | +/* | |
| 3459 | + * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol | |
| 3460 | + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. | |
| 3461 | + * | |
| 3462 | + * The functions in this module will throw an easier-to-understand, | |
| 3463 | + * easier-to-debug exception with a clear errors message message explaining the | |
| 3464 | + * problem. (Instead of a confusing exception thrown inside the implementation | |
| 3465 | + * of the `value` object). | |
| 3466 | + */ | |
| 3467 | +// $FlowFixMe only called in DEV, so void return is not possible. | |
| 3468 | +function typeName(value) { | |
| 3469 | + { | |
| 3470 | + // toStringTag is needed for namespaced types like Temporal.Instant | |
| 3471 | + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | |
| 3472 | + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; | |
| 3473 | + return type; | |
| 3474 | + } | |
| 3475 | +} // $FlowFixMe only called in DEV, so void return is not possible. | |
| 3476 | + | |
| 3477 | + | |
| 3478 | +function willCoercionThrow(value) { | |
| 3479 | + { | |
| 3480 | + try { | |
| 3481 | + testStringCoercion(value); | |
| 3482 | + return false; | |
| 3483 | + } catch (e) { | |
| 3484 | + return true; | |
| 3485 | + } | |
| 3486 | + } | |
| 3487 | +} | |
| 3488 | + | |
| 3489 | +function testStringCoercion(value) { | |
| 3490 | + // If you ended up here by following an exception call stack, here's what's | |
| 3491 | + // happened: you supplied an object or symbol value to React (as a prop, key, | |
| 3492 | + // DOM attribute, CSS property, string ref, etc.) and when React tried to | |
| 3493 | + // coerce it to a string using `'' + value`, an exception was thrown. | |
| 3494 | + // | |
| 3495 | + // The most common types that will cause this exception are `Symbol` instances | |
| 3496 | + // and Temporal objects like `Temporal.Instant`. But any object that has a | |
| 3497 | + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | |
| 3498 | + // exception. (Library authors do this to prevent users from using built-in | |
| 3499 | + // numeric operators like `+` or comparison operators like `>=` because custom | |
| 3500 | + // methods are needed to perform accurate arithmetic or comparison.) | |
| 3501 | + // | |
| 3502 | + // To fix the problem, coerce this object or symbol value to a string before | |
| 3503 | + // passing it to React. The most reliable way is usually `String(value)`. | |
| 3504 | + // | |
| 3505 | + // To find which value is throwing, check the browser or debugger console. | |
| 3506 | + // Before this exception was thrown, there should be `console.error` output | |
| 3507 | + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | |
| 3508 | + // problem and how that type was used: key, atrribute, input value prop, etc. | |
| 3509 | + // In most cases, this console output also shows the component and its | |
| 3510 | + // ancestor components where the exception happened. | |
| 3511 | + // | |
| 3512 | + // eslint-disable-next-line react-internal/safe-string-coercion | |
| 3513 | + return '' + value; | |
| 3514 | +} | |
| 3515 | +function checkKeyStringCoercion(value) { | |
| 3516 | + { | |
| 3517 | + if (willCoercionThrow(value)) { | |
| 3518 | + error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); | |
| 3519 | + | |
| 3520 | + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | |
| 3521 | + } | |
| 3522 | + } | |
| 3523 | +} | |
| 3524 | + | |
| 3525 | +var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | |
| 3526 | +var RESERVED_PROPS = { | |
| 3527 | + key: true, | |
| 3528 | + ref: true, | |
| 3529 | + __self: true, | |
| 3530 | + __source: true | |
| 3531 | +}; | |
| 3532 | +var specialPropKeyWarningShown; | |
| 3533 | +var specialPropRefWarningShown; | |
| 3534 | +var didWarnAboutStringRefs; | |
| 3535 | + | |
| 3536 | +{ | |
| 3537 | + didWarnAboutStringRefs = {}; | |
| 3538 | +} | |
| 3539 | + | |
| 3540 | +function hasValidRef(config) { | |
| 3541 | + { | |
| 3542 | + if (hasOwnProperty.call(config, 'ref')) { | |
| 3543 | + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; | |
| 3544 | + | |
| 3545 | + if (getter && getter.isReactWarning) { | |
| 3546 | + return false; | |
| 3547 | + } | |
| 3548 | + } | |
| 3549 | + } | |
| 3550 | + | |
| 3551 | + return config.ref !== undefined; | |
| 3552 | +} | |
| 3553 | + | |
| 3554 | +function hasValidKey(config) { | |
| 3555 | + { | |
| 3556 | + if (hasOwnProperty.call(config, 'key')) { | |
| 3557 | + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; | |
| 3558 | + | |
| 3559 | + if (getter && getter.isReactWarning) { | |
| 3560 | + return false; | |
| 3561 | + } | |
| 3562 | + } | |
| 3563 | + } | |
| 3564 | + | |
| 3565 | + return config.key !== undefined; | |
| 3566 | +} | |
| 3567 | + | |
| 3568 | +function warnIfStringRefCannotBeAutoConverted(config, self) { | |
| 3569 | + { | |
| 3570 | + if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { | |
| 3571 | + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); | |
| 3572 | + | |
| 3573 | + if (!didWarnAboutStringRefs[componentName]) { | |
| 3574 | + 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); | |
| 3575 | + | |
| 3576 | + didWarnAboutStringRefs[componentName] = true; | |
| 3577 | + } | |
| 3578 | + } | |
| 3579 | + } | |
| 3580 | +} | |
| 3581 | + | |
| 3582 | +function defineKeyPropWarningGetter(props, displayName) { | |
| 3583 | + { | |
| 3584 | + var warnAboutAccessingKey = function () { | |
| 3585 | + if (!specialPropKeyWarningShown) { | |
| 3586 | + specialPropKeyWarningShown = true; | |
| 3587 | + | |
| 3588 | + 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); | |
| 3589 | + } | |
| 3590 | + }; | |
| 3591 | + | |
| 3592 | + warnAboutAccessingKey.isReactWarning = true; | |
| 3593 | + Object.defineProperty(props, 'key', { | |
| 3594 | + get: warnAboutAccessingKey, | |
| 3595 | + configurable: true | |
| 3596 | + }); | |
| 3597 | + } | |
| 3598 | +} | |
| 3599 | + | |
| 3600 | +function defineRefPropWarningGetter(props, displayName) { | |
| 3601 | + { | |
| 3602 | + var warnAboutAccessingRef = function () { | |
| 3603 | + if (!specialPropRefWarningShown) { | |
| 3604 | + specialPropRefWarningShown = true; | |
| 3605 | + | |
| 3606 | + 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); | |
| 3607 | + } | |
| 3608 | + }; | |
| 3609 | + | |
| 3610 | + warnAboutAccessingRef.isReactWarning = true; | |
| 3611 | + Object.defineProperty(props, 'ref', { | |
| 3612 | + get: warnAboutAccessingRef, | |
| 3613 | + configurable: true | |
| 3614 | + }); | |
| 3615 | + } | |
| 3616 | +} | |
| 3617 | +/** | |
| 3618 | + * Factory method to create a new React element. This no longer adheres to | |
| 3619 | + * the class pattern, so do not use new to call it. Also, instanceof check | |
| 3620 | + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check | |
| 3621 | + * if something is a React Element. | |
| 3622 | + * | |
| 3623 | + * @param {*} type | |
| 3624 | + * @param {*} props | |
| 3625 | + * @param {*} key | |
| 3626 | + * @param {string|object} ref | |
| 3627 | + * @param {*} owner | |
| 3628 | + * @param {*} self A *temporary* helper to detect places where `this` is | |
| 3629 | + * different from the `owner` when React.createElement is called, so that we | |
| 3630 | + * can warn. We want to get rid of owner and replace string `ref`s with arrow | |
| 3631 | + * functions, and as long as `this` and owner are the same, there will be no | |
| 3632 | + * change in behavior. | |
| 3633 | + * @param {*} source An annotation object (added by a transpiler or otherwise) | |
| 3634 | + * indicating filename, line number, and/or other information. | |
| 3635 | + * @internal | |
| 3636 | + */ | |
| 3637 | + | |
| 3638 | + | |
| 3639 | +var ReactElement = function (type, key, ref, self, source, owner, props) { | |
| 3640 | + var element = { | |
| 3641 | + // This tag allows us to uniquely identify this as a React Element | |
| 3642 | + $$typeof: REACT_ELEMENT_TYPE, | |
| 3643 | + // Built-in properties that belong on the element | |
| 3644 | + type: type, | |
| 3645 | + key: key, | |
| 3646 | + ref: ref, | |
| 3647 | + props: props, | |
| 3648 | + // Record the component responsible for creating this element. | |
| 3649 | + _owner: owner | |
| 3650 | + }; | |
| 3651 | + | |
| 3652 | + { | |
| 3653 | + // The validation flag is currently mutative. We put it on | |
| 3654 | + // an external backing store so that we can freeze the whole object. | |
| 3655 | + // This can be replaced with a WeakMap once they are implemented in | |
| 3656 | + // commonly used development environments. | |
| 3657 | + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make | |
| 3658 | + // the validation flag non-enumerable (where possible, which should | |
| 3659 | + // include every environment we run tests in), so the test framework | |
| 3660 | + // ignores it. | |
| 3661 | + | |
| 3662 | + Object.defineProperty(element._store, 'validated', { | |
| 3663 | + configurable: false, | |
| 3664 | + enumerable: false, | |
| 3665 | + writable: true, | |
| 3666 | + value: false | |
| 3667 | + }); // self and source are DEV only properties. | |
| 3668 | + | |
| 3669 | + Object.defineProperty(element, '_self', { | |
| 3670 | + configurable: false, | |
| 3671 | + enumerable: false, | |
| 3672 | + writable: false, | |
| 3673 | + value: self | |
| 3674 | + }); // Two elements created in two different places should be considered | |
| 3675 | + // equal for testing purposes and therefore we hide it from enumeration. | |
| 3676 | + | |
| 3677 | + Object.defineProperty(element, '_source', { | |
| 3678 | + configurable: false, | |
| 3679 | + enumerable: false, | |
| 3680 | + writable: false, | |
| 3681 | + value: source | |
| 3682 | + }); | |
| 3683 | + | |
| 3684 | + if (Object.freeze) { | |
| 3685 | + Object.freeze(element.props); | |
| 3686 | + Object.freeze(element); | |
| 3687 | + } | |
| 3688 | + } | |
| 3689 | + | |
| 3690 | + return element; | |
| 3691 | +}; | |
| 3692 | +/** | |
| 3693 | + * https://github.com/reactjs/rfcs/pull/107 | |
| 3694 | + * @param {*} type | |
| 3695 | + * @param {object} props | |
| 3696 | + * @param {string} key | |
| 3697 | + */ | |
| 3698 | + | |
| 3699 | +function jsxDEV(type, config, maybeKey, source, self) { | |
| 3700 | + { | |
| 3701 | + var propName; // Reserved names are extracted | |
| 3702 | + | |
| 3703 | + var props = {}; | |
| 3704 | + var key = null; | |
| 3705 | + var ref = null; // Currently, key can be spread in as a prop. This causes a potential | |
| 3706 | + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> | |
| 3707 | + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, | |
| 3708 | + // but as an intermediary step, we will use jsxDEV for everything except | |
| 3709 | + // <div {...props} key="Hi" />, because we aren't currently able to tell if | |
| 3710 | + // key is explicitly declared to be undefined or not. | |
| 3711 | + | |
| 3712 | + if (maybeKey !== undefined) { | |
| 3713 | + { | |
| 3714 | + checkKeyStringCoercion(maybeKey); | |
| 3715 | + } | |
| 3716 | + | |
| 3717 | + key = '' + maybeKey; | |
| 3718 | + } | |
| 3719 | + | |
| 3720 | + if (hasValidKey(config)) { | |
| 3721 | + { | |
| 3722 | + checkKeyStringCoercion(config.key); | |
| 3723 | + } | |
| 3724 | + | |
| 3725 | + key = '' + config.key; | |
| 3726 | + } | |
| 3727 | + | |
| 3728 | + if (hasValidRef(config)) { | |
| 3729 | + ref = config.ref; | |
| 3730 | + warnIfStringRefCannotBeAutoConverted(config, self); | |
| 3731 | + } // Remaining properties are added to a new props object | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + for (propName in config) { | |
| 3735 | + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | |
| 3736 | + props[propName] = config[propName]; | |
| 3737 | + } | |
| 3738 | + } // Resolve default props | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + if (type && type.defaultProps) { | |
| 3742 | + var defaultProps = type.defaultProps; | |
| 3743 | + | |
| 3744 | + for (propName in defaultProps) { | |
| 3745 | + if (props[propName] === undefined) { | |
| 3746 | + props[propName] = defaultProps[propName]; | |
| 3747 | + } | |
| 3748 | + } | |
| 3749 | + } | |
| 3750 | + | |
| 3751 | + if (key || ref) { | |
| 3752 | + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; | |
| 3753 | + | |
| 3754 | + if (key) { | |
| 3755 | + defineKeyPropWarningGetter(props, displayName); | |
| 3756 | + } | |
| 3757 | + | |
| 3758 | + if (ref) { | |
| 3759 | + defineRefPropWarningGetter(props, displayName); | |
| 3760 | + } | |
| 3761 | + } | |
| 3762 | + | |
| 3763 | + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | |
| 3764 | + } | |
| 3765 | +} | |
| 3766 | + | |
| 3767 | +var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | |
| 3768 | +var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 3769 | + | |
| 3770 | +function setCurrentlyValidatingElement$1(element) { | |
| 3771 | + { | |
| 3772 | + if (element) { | |
| 3773 | + var owner = element._owner; | |
| 3774 | + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | |
| 3775 | + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); | |
| 3776 | + } else { | |
| 3777 | + ReactDebugCurrentFrame$1.setExtraStackFrame(null); | |
| 3778 | + } | |
| 3779 | + } | |
| 3780 | +} | |
| 3781 | + | |
| 3782 | +var propTypesMisspellWarningShown; | |
| 3783 | + | |
| 3784 | +{ | |
| 3785 | + propTypesMisspellWarningShown = false; | |
| 3786 | +} | |
| 3787 | +/** | |
| 3788 | + * Verifies the object is a ReactElement. | |
| 3789 | + * See https://reactjs.org/docs/react-api.html#isvalidelement | |
| 3790 | + * @param {?object} object | |
| 3791 | + * @return {boolean} True if `object` is a ReactElement. | |
| 3792 | + * @final | |
| 3793 | + */ | |
| 3794 | + | |
| 3795 | + | |
| 3796 | +function isValidElement(object) { | |
| 3797 | + { | |
| 3798 | + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 3799 | + } | |
| 3800 | +} | |
| 3801 | + | |
| 3802 | +function getDeclarationErrorAddendum() { | |
| 3803 | + { | |
| 3804 | + if (ReactCurrentOwner$1.current) { | |
| 3805 | + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); | |
| 3806 | + | |
| 3807 | + if (name) { | |
| 3808 | + return '\n\nCheck the render method of `' + name + '`.'; | |
| 3809 | + } | |
| 3810 | + } | |
| 3811 | + | |
| 3812 | + return ''; | |
| 3813 | + } | |
| 3814 | +} | |
| 3815 | + | |
| 3816 | +function getSourceInfoErrorAddendum(source) { | |
| 3817 | + { | |
| 3818 | + if (source !== undefined) { | |
| 3819 | + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); | |
| 3820 | + var lineNumber = source.lineNumber; | |
| 3821 | + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; | |
| 3822 | + } | |
| 3823 | + | |
| 3824 | + return ''; | |
| 3825 | + } | |
| 3826 | +} | |
| 3827 | +/** | |
| 3828 | + * Warn if there's no key explicitly set on dynamic arrays of children or | |
| 3829 | + * object keys are not valid. This allows us to keep track of children between | |
| 3830 | + * updates. | |
| 3831 | + */ | |
| 3832 | + | |
| 3833 | + | |
| 3834 | +var ownerHasKeyUseWarning = {}; | |
| 3835 | + | |
| 3836 | +function getCurrentComponentErrorInfo(parentType) { | |
| 3837 | + { | |
| 3838 | + var info = getDeclarationErrorAddendum(); | |
| 3839 | + | |
| 3840 | + if (!info) { | |
| 3841 | + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; | |
| 3842 | + | |
| 3843 | + if (parentName) { | |
| 3844 | + info = "\n\nCheck the top-level render call using <" + parentName + ">."; | |
| 3845 | + } | |
| 3846 | + } | |
| 3847 | + | |
| 3848 | + return info; | |
| 3849 | + } | |
| 3850 | +} | |
| 3851 | +/** | |
| 3852 | + * Warn if the element doesn't have an explicit key assigned to it. | |
| 3853 | + * This element is in an array. The array could grow and shrink or be | |
| 3854 | + * reordered. All children that haven't already been validated are required to | |
| 3855 | + * have a "key" property assigned to it. Error statuses are cached so a warning | |
| 3856 | + * will only be shown once. | |
| 3857 | + * | |
| 3858 | + * @internal | |
| 3859 | + * @param {ReactElement} element Element that requires a key. | |
| 3860 | + * @param {*} parentType element's parent's type. | |
| 3861 | + */ | |
| 3862 | + | |
| 3863 | + | |
| 3864 | +function validateExplicitKey(element, parentType) { | |
| 3865 | + { | |
| 3866 | + if (!element._store || element._store.validated || element.key != null) { | |
| 3867 | + return; | |
| 3868 | + } | |
| 3869 | + | |
| 3870 | + element._store.validated = true; | |
| 3871 | + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | |
| 3872 | + | |
| 3873 | + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | |
| 3874 | + return; | |
| 3875 | + } | |
| 3876 | + | |
| 3877 | + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | |
| 3878 | + // property, it may be the creator of the child that's responsible for | |
| 3879 | + // assigning it a key. | |
| 3880 | + | |
| 3881 | + var childOwner = ''; | |
| 3882 | + | |
| 3883 | + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { | |
| 3884 | + // Give the component that originally created this child. | |
| 3885 | + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | |
| 3886 | + } | |
| 3887 | + | |
| 3888 | + setCurrentlyValidatingElement$1(element); | |
| 3889 | + | |
| 3890 | + 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); | |
| 3891 | + | |
| 3892 | + setCurrentlyValidatingElement$1(null); | |
| 3893 | + } | |
| 3894 | +} | |
| 3895 | +/** | |
| 3896 | + * Ensure that every element either is passed in a static location, in an | |
| 3897 | + * array with an explicit keys property defined, or in an object literal | |
| 3898 | + * with valid key property. | |
| 3899 | + * | |
| 3900 | + * @internal | |
| 3901 | + * @param {ReactNode} node Statically passed child of any type. | |
| 3902 | + * @param {*} parentType node's parent's type. | |
| 3903 | + */ | |
| 3904 | + | |
| 3905 | + | |
| 3906 | +function validateChildKeys(node, parentType) { | |
| 3907 | + { | |
| 3908 | + if (typeof node !== 'object') { | |
| 3909 | + return; | |
| 3910 | + } | |
| 3911 | + | |
| 3912 | + if (isArray(node)) { | |
| 3913 | + for (var i = 0; i < node.length; i++) { | |
| 3914 | + var child = node[i]; | |
| 3915 | + | |
| 3916 | + if (isValidElement(child)) { | |
| 3917 | + validateExplicitKey(child, parentType); | |
| 3918 | + } | |
| 3919 | + } | |
| 3920 | + } else if (isValidElement(node)) { | |
| 3921 | + // This element was passed in a valid location. | |
| 3922 | + if (node._store) { | |
| 3923 | + node._store.validated = true; | |
| 3924 | + } | |
| 3925 | + } else if (node) { | |
| 3926 | + var iteratorFn = getIteratorFn(node); | |
| 3927 | + | |
| 3928 | + if (typeof iteratorFn === 'function') { | |
| 3929 | + // Entry iterators used to provide implicit keys, | |
| 3930 | + // but now we print a separate warning for them later. | |
| 3931 | + if (iteratorFn !== node.entries) { | |
| 3932 | + var iterator = iteratorFn.call(node); | |
| 3933 | + var step; | |
| 3934 | + | |
| 3935 | + while (!(step = iterator.next()).done) { | |
| 3936 | + if (isValidElement(step.value)) { | |
| 3937 | + validateExplicitKey(step.value, parentType); | |
| 3938 | + } | |
| 3939 | + } | |
| 3940 | + } | |
| 3941 | + } | |
| 3942 | + } | |
| 3943 | + } | |
| 3944 | +} | |
| 3945 | +/** | |
| 3946 | + * Given an element, validate that its props follow the propTypes definition, | |
| 3947 | + * provided by the type. | |
| 3948 | + * | |
| 3949 | + * @param {ReactElement} element | |
| 3950 | + */ | |
| 3951 | + | |
| 3952 | + | |
| 3953 | +function validatePropTypes(element) { | |
| 3954 | + { | |
| 3955 | + var type = element.type; | |
| 3956 | + | |
| 3957 | + if (type === null || type === undefined || typeof type === 'string') { | |
| 3958 | + return; | |
| 3959 | + } | |
| 3960 | + | |
| 3961 | + var propTypes; | |
| 3962 | + | |
| 3963 | + if (typeof type === 'function') { | |
| 3964 | + propTypes = type.propTypes; | |
| 3965 | + } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. | |
| 3966 | + // Inner props are checked in the reconciler. | |
| 3967 | + type.$$typeof === REACT_MEMO_TYPE)) { | |
| 3968 | + propTypes = type.propTypes; | |
| 3969 | + } else { | |
| 3970 | + return; | |
| 3971 | + } | |
| 3972 | + | |
| 3973 | + if (propTypes) { | |
| 3974 | + // Intentionally inside to avoid triggering lazy initializers: | |
| 3975 | + var name = getComponentNameFromType(type); | |
| 3976 | + checkPropTypes(propTypes, element.props, 'prop', name, element); | |
| 3977 | + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { | |
| 3978 | + propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: | |
| 3979 | + | |
| 3980 | + var _name = getComponentNameFromType(type); | |
| 3981 | + | |
| 3982 | + error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | |
| 3983 | + } | |
| 3984 | + | |
| 3985 | + if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { | |
| 3986 | + error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); | |
| 3987 | + } | |
| 3988 | + } | |
| 3989 | +} | |
| 3990 | +/** | |
| 3991 | + * Given a fragment, validate that it can only be provided with fragment props | |
| 3992 | + * @param {ReactElement} fragment | |
| 3993 | + */ | |
| 3994 | + | |
| 3995 | + | |
| 3996 | +function validateFragmentProps(fragment) { | |
| 3997 | + { | |
| 3998 | + var keys = Object.keys(fragment.props); | |
| 3999 | + | |
| 4000 | + for (var i = 0; i < keys.length; i++) { | |
| 4001 | + var key = keys[i]; | |
| 4002 | + | |
| 4003 | + if (key !== 'children' && key !== 'key') { | |
| 4004 | + setCurrentlyValidatingElement$1(fragment); | |
| 4005 | + | |
| 4006 | + error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); | |
| 4007 | + | |
| 4008 | + setCurrentlyValidatingElement$1(null); | |
| 4009 | + break; | |
| 4010 | + } | |
| 4011 | + } | |
| 4012 | + | |
| 4013 | + if (fragment.ref !== null) { | |
| 4014 | + setCurrentlyValidatingElement$1(fragment); | |
| 4015 | + | |
| 4016 | + error('Invalid attribute `ref` supplied to `React.Fragment`.'); | |
| 4017 | + | |
| 4018 | + setCurrentlyValidatingElement$1(null); | |
| 4019 | + } | |
| 4020 | + } | |
| 4021 | +} | |
| 4022 | + | |
| 4023 | +var didWarnAboutKeySpread = {}; | |
| 4024 | +function jsxWithValidation(type, props, key, isStaticChildren, source, self) { | |
| 4025 | + { | |
| 4026 | + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to | |
| 4027 | + // succeed and there will likely be errors in render. | |
| 4028 | + | |
| 4029 | + if (!validType) { | |
| 4030 | + var info = ''; | |
| 4031 | + | |
| 4032 | + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | |
| 4033 | + 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."; | |
| 4034 | + } | |
| 4035 | + | |
| 4036 | + var sourceInfo = getSourceInfoErrorAddendum(source); | |
| 4037 | + | |
| 4038 | + if (sourceInfo) { | |
| 4039 | + info += sourceInfo; | |
| 4040 | + } else { | |
| 4041 | + info += getDeclarationErrorAddendum(); | |
| 4042 | + } | |
| 4043 | + | |
| 4044 | + var typeString; | |
| 4045 | + | |
| 4046 | + if (type === null) { | |
| 4047 | + typeString = 'null'; | |
| 4048 | + } else if (isArray(type)) { | |
| 4049 | + typeString = 'array'; | |
| 4050 | + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | |
| 4051 | + typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | |
| 4052 | + info = ' Did you accidentally export a JSX literal instead of a component?'; | |
| 4053 | + } else { | |
| 4054 | + typeString = typeof type; | |
| 4055 | + } | |
| 4056 | + | |
| 4057 | + 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); | |
| 4058 | + } | |
| 4059 | + | |
| 4060 | + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. | |
| 4061 | + // TODO: Drop this when these are no longer allowed as the type argument. | |
| 4062 | + | |
| 4063 | + if (element == null) { | |
| 4064 | + return element; | |
| 4065 | + } // Skip key warning if the type isn't valid since our key validation logic | |
| 4066 | + // doesn't expect a non-string/function type and can throw confusing errors. | |
| 4067 | + // We don't want exception behavior to differ between dev and prod. | |
| 4068 | + // (Rendering will throw with a helpful message and as soon as the type is | |
| 4069 | + // fixed, the key warnings will appear.) | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + if (validType) { | |
| 4073 | + var children = props.children; | |
| 4074 | + | |
| 4075 | + if (children !== undefined) { | |
| 4076 | + if (isStaticChildren) { | |
| 4077 | + if (isArray(children)) { | |
| 4078 | + for (var i = 0; i < children.length; i++) { | |
| 4079 | + validateChildKeys(children[i], type); | |
| 4080 | + } | |
| 4081 | + | |
| 4082 | + if (Object.freeze) { | |
| 4083 | + Object.freeze(children); | |
| 4084 | + } | |
| 4085 | + } else { | |
| 4086 | + 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.'); | |
| 4087 | + } | |
| 4088 | + } else { | |
| 4089 | + validateChildKeys(children, type); | |
| 4090 | + } | |
| 4091 | + } | |
| 4092 | + } | |
| 4093 | + | |
| 4094 | + { | |
| 4095 | + if (hasOwnProperty.call(props, 'key')) { | |
| 4096 | + var componentName = getComponentNameFromType(type); | |
| 4097 | + var keys = Object.keys(props).filter(function (k) { | |
| 4098 | + return k !== 'key'; | |
| 4099 | + }); | |
| 4100 | + var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}'; | |
| 4101 | + | |
| 4102 | + if (!didWarnAboutKeySpread[componentName + beforeExample]) { | |
| 4103 | + var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'; | |
| 4104 | + | |
| 4105 | + 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); | |
| 4106 | + | |
| 4107 | + didWarnAboutKeySpread[componentName + beforeExample] = true; | |
| 4108 | + } | |
| 4109 | + } | |
| 4110 | + } | |
| 4111 | + | |
| 4112 | + if (type === REACT_FRAGMENT_TYPE) { | |
| 4113 | + validateFragmentProps(element); | |
| 4114 | + } else { | |
| 4115 | + validatePropTypes(element); | |
| 4116 | + } | |
| 4117 | + | |
| 4118 | + return element; | |
| 4119 | + } | |
| 4120 | +} // These two functions exist to still get child warnings in dev | |
| 4121 | +// even with the prod transform. This means that jsxDEV is purely | |
| 4122 | +// opt-in behavior for better messages but that we won't stop | |
| 4123 | +// giving you warnings if you use production apis. | |
| 4124 | + | |
| 4125 | +function jsxWithValidationStatic(type, props, key) { | |
| 4126 | + { | |
| 4127 | + return jsxWithValidation(type, props, key, true); | |
| 4128 | + } | |
| 4129 | +} | |
| 4130 | +function jsxWithValidationDynamic(type, props, key) { | |
| 4131 | + { | |
| 4132 | + return jsxWithValidation(type, props, key, false); | |
| 4133 | + } | |
| 4134 | +} | |
| 4135 | + | |
| 4136 | +var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children. | |
| 4137 | +// for now we can ship identical prod functions | |
| 4138 | + | |
| 4139 | +var jsxs = jsxWithValidationStatic ; | |
| 4140 | + | |
| 4141 | +exports.Fragment = REACT_FRAGMENT_TYPE; | |
| 4142 | +exports.jsx = jsx; | |
| 4143 | +exports.jsxs = jsxs; | |
| 4144 | + })(); | |
| 4145 | +} | |
| 4146 | + | |
| 4147 | + | |
| 4148 | +/***/ }), | |
| 4149 | + | |
| 4150 | +/***/ "../node_modules/react/jsx-runtime.js": | |
| 4151 | +/*!********************************************!*\ | |
| 4152 | + !*** ../node_modules/react/jsx-runtime.js ***! | |
| 4153 | + \********************************************/ | |
| 4154 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4155 | + | |
| 4156 | +"use strict"; | |
| 4157 | + | |
| 4158 | + | |
| 4159 | +if (false) {} else { | |
| 4160 | + module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js"); | |
| 4161 | +} | |
| 4162 | + | |
| 4163 | + | |
| 4164 | +/***/ }), | |
| 4165 | + | |
| 4166 | +/***/ "react": | |
| 4167 | +/*!************************!*\ | |
| 4168 | + !*** external "React" ***! | |
| 4169 | + \************************/ | |
| 4170 | +/***/ ((module) => { | |
| 4171 | + | |
| 4172 | +"use strict"; | |
| 4173 | +module.exports = React; | |
| 4174 | + | |
| 4175 | +/***/ }), | |
| 4176 | + | |
| 4177 | +/***/ "react-dom": | |
| 4178 | +/*!***************************!*\ | |
| 4179 | + !*** external "ReactDOM" ***! | |
| 4180 | + \***************************/ | |
| 4181 | +/***/ ((module) => { | |
| 4182 | + | |
| 4183 | +"use strict"; | |
| 4184 | +module.exports = ReactDOM; | |
| 4185 | + | |
| 4186 | +/***/ }), | |
| 4187 | + | |
| 3532 | 4188 | /***/ "@elementor/editor-app-bar": |
| 3533 | 4189 | /*!*******************************************!*\ |
| 3534 | 4190 | !*** external "elementorV2.editorAppBar" ***! |
| 3535 | 4191 | \*******************************************/ |
| @@ -3572,19 +4228,8 @@ | ||
| 3572 | 4228 | module.exports = elementorV2.icons['RocketIcon']; |
| 3573 | 4229 | |
| 3574 | 4230 | /***/ }), |
| 3575 | 4231 | |
| 3576 | -/***/ "@elementor/query": | |
| 3577 | -/*!************************************!*\ | |
| 3578 | - !*** external "elementorV2.query" ***! | |
| 3579 | - \************************************/ | |
| 3580 | -/***/ ((module) => { | |
| 3581 | - | |
| 3582 | -"use strict"; | |
| 3583 | -module.exports = elementorV2.query; | |
| 3584 | - | |
| 3585 | -/***/ }), | |
| 3586 | - | |
| 3587 | 4232 | /***/ "@elementor/ui": |
| 3588 | 4233 | /*!*********************************!*\ |
| 3589 | 4234 | !*** external "elementorV2.ui" ***! |
| 3590 | 4235 | \*********************************/ |
| @@ -3605,28 +4250,5893 @@ | ||
| 3605 | 4250 | module.exports = wp.i18n; |
| 3606 | 4251 | |
| 3607 | 4252 | /***/ }), |
| 3608 | 4253 | |
| 3609 | -/***/ "react": | |
| 3610 | -/*!************************!*\ | |
| 3611 | - !*** external "React" ***! | |
| 3612 | - \************************/ | |
| 4254 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 4255 | +/*!******************************************************************!*\ | |
| 4256 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 4257 | + \******************************************************************/ | |
| 3613 | 4258 | /***/ ((module) => { |
| 3614 | 4259 | |
| 4260 | +function _arrayLikeToArray(r, a) { | |
| 4261 | + (null == a || a > r.length) && (a = r.length); | |
| 4262 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 4263 | + return n; | |
| 4264 | +} | |
| 4265 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4266 | + | |
| 4267 | +/***/ }), | |
| 4268 | + | |
| 4269 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 4270 | +/*!****************************************************************!*\ | |
| 4271 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 4272 | + \****************************************************************/ | |
| 4273 | +/***/ ((module) => { | |
| 4274 | + | |
| 4275 | +function _arrayWithHoles(r) { | |
| 4276 | + if (Array.isArray(r)) return r; | |
| 4277 | +} | |
| 4278 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4279 | + | |
| 4280 | +/***/ }), | |
| 4281 | + | |
| 4282 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 4283 | +/*!*******************************************************************!*\ | |
| 4284 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 4285 | + \*******************************************************************/ | |
| 4286 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4287 | + | |
| 4288 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 4289 | +function _arrayWithoutHoles(r) { | |
| 4290 | + if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 4291 | +} | |
| 4292 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4293 | + | |
| 4294 | +/***/ }), | |
| 4295 | + | |
| 4296 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 4297 | +/*!***********************************************************************!*\ | |
| 4298 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 4299 | + \***********************************************************************/ | |
| 4300 | +/***/ ((module) => { | |
| 4301 | + | |
| 4302 | +function _assertThisInitialized(e) { | |
| 4303 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 4304 | + return e; | |
| 4305 | +} | |
| 4306 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4307 | + | |
| 4308 | +/***/ }), | |
| 4309 | + | |
| 4310 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 4311 | +/*!******************************************************************!*\ | |
| 4312 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 4313 | + \******************************************************************/ | |
| 4314 | +/***/ ((module) => { | |
| 4315 | + | |
| 4316 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 4317 | + try { | |
| 4318 | + var i = n[a](c), | |
| 4319 | + u = i.value; | |
| 4320 | + } catch (n) { | |
| 4321 | + return void e(n); | |
| 4322 | + } | |
| 4323 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 4324 | +} | |
| 4325 | +function _asyncToGenerator(n) { | |
| 4326 | + return function () { | |
| 4327 | + var t = this, | |
| 4328 | + e = arguments; | |
| 4329 | + return new Promise(function (r, o) { | |
| 4330 | + var a = n.apply(t, e); | |
| 4331 | + function _next(n) { | |
| 4332 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 4333 | + } | |
| 4334 | + function _throw(n) { | |
| 4335 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 4336 | + } | |
| 4337 | + _next(void 0); | |
| 4338 | + }); | |
| 4339 | + }; | |
| 4340 | +} | |
| 4341 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4342 | + | |
| 4343 | +/***/ }), | |
| 4344 | + | |
| 4345 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 4346 | +/*!****************************************************************!*\ | |
| 4347 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 4348 | + \****************************************************************/ | |
| 4349 | +/***/ ((module) => { | |
| 4350 | + | |
| 4351 | +function _classCallCheck(a, n) { | |
| 4352 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 4353 | +} | |
| 4354 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4355 | + | |
| 4356 | +/***/ }), | |
| 4357 | + | |
| 4358 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 4359 | +/*!*************************************************************!*\ | |
| 4360 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 4361 | + \*************************************************************/ | |
| 4362 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4363 | + | |
| 4364 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 4365 | +function _defineProperties(e, r) { | |
| 4366 | + for (var t = 0; t < r.length; t++) { | |
| 4367 | + var o = r[t]; | |
| 4368 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 4369 | + } | |
| 4370 | +} | |
| 4371 | +function _createClass(e, r, t) { | |
| 4372 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 4373 | + writable: !1 | |
| 4374 | + }), e; | |
| 4375 | +} | |
| 4376 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4377 | + | |
| 4378 | +/***/ }), | |
| 4379 | + | |
| 4380 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 4381 | +/*!****************************************************************!*\ | |
| 4382 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 4383 | + \****************************************************************/ | |
| 4384 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4385 | + | |
| 4386 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 4387 | +function _defineProperty(e, r, t) { | |
| 4388 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 4389 | + value: t, | |
| 4390 | + enumerable: !0, | |
| 4391 | + configurable: !0, | |
| 4392 | + writable: !0 | |
| 4393 | + }) : e[r] = t, e; | |
| 4394 | +} | |
| 4395 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4396 | + | |
| 4397 | +/***/ }), | |
| 4398 | + | |
| 4399 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 4400 | +/*!****************************************************************!*\ | |
| 4401 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 4402 | + \****************************************************************/ | |
| 4403 | +/***/ ((module) => { | |
| 4404 | + | |
| 4405 | +function _getPrototypeOf(t) { | |
| 4406 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 4407 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 4408 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 4409 | +} | |
| 4410 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4411 | + | |
| 4412 | +/***/ }), | |
| 4413 | + | |
| 4414 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 4415 | +/*!**********************************************************!*\ | |
| 4416 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 4417 | + \**********************************************************/ | |
| 4418 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4419 | + | |
| 4420 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 4421 | +function _inherits(t, e) { | |
| 4422 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 4423 | + t.prototype = Object.create(e && e.prototype, { | |
| 4424 | + constructor: { | |
| 4425 | + value: t, | |
| 4426 | + writable: !0, | |
| 4427 | + configurable: !0 | |
| 4428 | + } | |
| 4429 | + }), Object.defineProperty(t, "prototype", { | |
| 4430 | + writable: !1 | |
| 4431 | + }), e && setPrototypeOf(t, e); | |
| 4432 | +} | |
| 4433 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4434 | + | |
| 4435 | +/***/ }), | |
| 4436 | + | |
| 4437 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 4438 | +/*!***********************************************************************!*\ | |
| 4439 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 4440 | + \***********************************************************************/ | |
| 4441 | +/***/ ((module) => { | |
| 4442 | + | |
| 4443 | +function _interopRequireDefault(e) { | |
| 4444 | + return e && e.__esModule ? e : { | |
| 4445 | + "default": e | |
| 4446 | + }; | |
| 4447 | +} | |
| 4448 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4449 | + | |
| 4450 | +/***/ }), | |
| 4451 | + | |
| 4452 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 4453 | +/*!*****************************************************************!*\ | |
| 4454 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 4455 | + \*****************************************************************/ | |
| 4456 | +/***/ ((module) => { | |
| 4457 | + | |
| 4458 | +function _iterableToArray(r) { | |
| 4459 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 4460 | +} | |
| 4461 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4462 | + | |
| 4463 | +/***/ }), | |
| 4464 | + | |
| 4465 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 4466 | +/*!**********************************************************************!*\ | |
| 4467 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 4468 | + \**********************************************************************/ | |
| 4469 | +/***/ ((module) => { | |
| 4470 | + | |
| 4471 | +function _iterableToArrayLimit(r, l) { | |
| 4472 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 4473 | + if (null != t) { | |
| 4474 | + var e, | |
| 4475 | + n, | |
| 4476 | + i, | |
| 4477 | + u, | |
| 4478 | + a = [], | |
| 4479 | + f = !0, | |
| 4480 | + o = !1; | |
| 4481 | + try { | |
| 4482 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 4483 | + if (Object(t) !== t) return; | |
| 4484 | + f = !1; | |
| 4485 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 4486 | + } catch (r) { | |
| 4487 | + o = !0, n = r; | |
| 4488 | + } finally { | |
| 4489 | + try { | |
| 4490 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 4491 | + } finally { | |
| 4492 | + if (o) throw n; | |
| 4493 | + } | |
| 4494 | + } | |
| 4495 | + return a; | |
| 4496 | + } | |
| 4497 | +} | |
| 4498 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4499 | + | |
| 4500 | +/***/ }), | |
| 4501 | + | |
| 4502 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 4503 | +/*!*****************************************************************!*\ | |
| 4504 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 4505 | + \*****************************************************************/ | |
| 4506 | +/***/ ((module) => { | |
| 4507 | + | |
| 4508 | +function _nonIterableRest() { | |
| 4509 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 4510 | +} | |
| 4511 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4512 | + | |
| 4513 | +/***/ }), | |
| 4514 | + | |
| 4515 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 4516 | +/*!*******************************************************************!*\ | |
| 4517 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 4518 | + \*******************************************************************/ | |
| 4519 | +/***/ ((module) => { | |
| 4520 | + | |
| 4521 | +function _nonIterableSpread() { | |
| 4522 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 4523 | +} | |
| 4524 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4525 | + | |
| 4526 | +/***/ }), | |
| 4527 | + | |
| 4528 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 4529 | +/*!***************************************************************************!*\ | |
| 4530 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 4531 | + \***************************************************************************/ | |
| 4532 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4533 | + | |
| 4534 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4535 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 4536 | +function _possibleConstructorReturn(t, e) { | |
| 4537 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 4538 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 4539 | + return assertThisInitialized(t); | |
| 4540 | +} | |
| 4541 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4542 | + | |
| 4543 | +/***/ }), | |
| 4544 | + | |
| 4545 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 4546 | +/*!********************************************************************!*\ | |
| 4547 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 4548 | + \********************************************************************/ | |
| 4549 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4550 | + | |
| 4551 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4552 | +function _regeneratorRuntime() { | |
| 4553 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 4554 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 4555 | + return e; | |
| 4556 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4557 | + var t, | |
| 4558 | + e = {}, | |
| 4559 | + r = Object.prototype, | |
| 4560 | + n = r.hasOwnProperty, | |
| 4561 | + o = Object.defineProperty || function (t, e, r) { | |
| 4562 | + t[e] = r.value; | |
| 4563 | + }, | |
| 4564 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 4565 | + a = i.iterator || "@@iterator", | |
| 4566 | + c = i.asyncIterator || "@@asyncIterator", | |
| 4567 | + u = i.toStringTag || "@@toStringTag"; | |
| 4568 | + function define(t, e, r) { | |
| 4569 | + return Object.defineProperty(t, e, { | |
| 4570 | + value: r, | |
| 4571 | + enumerable: !0, | |
| 4572 | + configurable: !0, | |
| 4573 | + writable: !0 | |
| 4574 | + }), t[e]; | |
| 4575 | + } | |
| 4576 | + try { | |
| 4577 | + define({}, ""); | |
| 4578 | + } catch (t) { | |
| 4579 | + define = function define(t, e, r) { | |
| 4580 | + return t[e] = r; | |
| 4581 | + }; | |
| 4582 | + } | |
| 4583 | + function wrap(t, e, r, n) { | |
| 4584 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 4585 | + a = Object.create(i.prototype), | |
| 4586 | + c = new Context(n || []); | |
| 4587 | + return o(a, "_invoke", { | |
| 4588 | + value: makeInvokeMethod(t, r, c) | |
| 4589 | + }), a; | |
| 4590 | + } | |
| 4591 | + function tryCatch(t, e, r) { | |
| 4592 | + try { | |
| 4593 | + return { | |
| 4594 | + type: "normal", | |
| 4595 | + arg: t.call(e, r) | |
| 4596 | + }; | |
| 4597 | + } catch (t) { | |
| 4598 | + return { | |
| 4599 | + type: "throw", | |
| 4600 | + arg: t | |
| 4601 | + }; | |
| 4602 | + } | |
| 4603 | + } | |
| 4604 | + e.wrap = wrap; | |
| 4605 | + var h = "suspendedStart", | |
| 4606 | + l = "suspendedYield", | |
| 4607 | + f = "executing", | |
| 4608 | + s = "completed", | |
| 4609 | + y = {}; | |
| 4610 | + function Generator() {} | |
| 4611 | + function GeneratorFunction() {} | |
| 4612 | + function GeneratorFunctionPrototype() {} | |
| 4613 | + var p = {}; | |
| 4614 | + define(p, a, function () { | |
| 4615 | + return this; | |
| 4616 | + }); | |
| 4617 | + var d = Object.getPrototypeOf, | |
| 4618 | + v = d && d(d(values([]))); | |
| 4619 | + v && v !== r && n.call(v, a) && (p = v); | |
| 4620 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 4621 | + function defineIteratorMethods(t) { | |
| 4622 | + ["next", "throw", "return"].forEach(function (e) { | |
| 4623 | + define(t, e, function (t) { | |
| 4624 | + return this._invoke(e, t); | |
| 4625 | + }); | |
| 4626 | + }); | |
| 4627 | + } | |
| 4628 | + function AsyncIterator(t, e) { | |
| 4629 | + function invoke(r, o, i, a) { | |
| 4630 | + var c = tryCatch(t[r], t, o); | |
| 4631 | + if ("throw" !== c.type) { | |
| 4632 | + var u = c.arg, | |
| 4633 | + h = u.value; | |
| 4634 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 4635 | + invoke("next", t, i, a); | |
| 4636 | + }, function (t) { | |
| 4637 | + invoke("throw", t, i, a); | |
| 4638 | + }) : e.resolve(h).then(function (t) { | |
| 4639 | + u.value = t, i(u); | |
| 4640 | + }, function (t) { | |
| 4641 | + return invoke("throw", t, i, a); | |
| 4642 | + }); | |
| 4643 | + } | |
| 4644 | + a(c.arg); | |
| 4645 | + } | |
| 4646 | + var r; | |
| 4647 | + o(this, "_invoke", { | |
| 4648 | + value: function value(t, n) { | |
| 4649 | + function callInvokeWithMethodAndArg() { | |
| 4650 | + return new e(function (e, r) { | |
| 4651 | + invoke(t, n, e, r); | |
| 4652 | + }); | |
| 4653 | + } | |
| 4654 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 4655 | + } | |
| 4656 | + }); | |
| 4657 | + } | |
| 4658 | + function makeInvokeMethod(e, r, n) { | |
| 4659 | + var o = h; | |
| 4660 | + return function (i, a) { | |
| 4661 | + if (o === f) throw Error("Generator is already running"); | |
| 4662 | + if (o === s) { | |
| 4663 | + if ("throw" === i) throw a; | |
| 4664 | + return { | |
| 4665 | + value: t, | |
| 4666 | + done: !0 | |
| 4667 | + }; | |
| 4668 | + } | |
| 4669 | + for (n.method = i, n.arg = a;;) { | |
| 4670 | + var c = n.delegate; | |
| 4671 | + if (c) { | |
| 4672 | + var u = maybeInvokeDelegate(c, n); | |
| 4673 | + if (u) { | |
| 4674 | + if (u === y) continue; | |
| 4675 | + return u; | |
| 4676 | + } | |
| 4677 | + } | |
| 4678 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 4679 | + if (o === h) throw o = s, n.arg; | |
| 4680 | + n.dispatchException(n.arg); | |
| 4681 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 4682 | + o = f; | |
| 4683 | + var p = tryCatch(e, r, n); | |
| 4684 | + if ("normal" === p.type) { | |
| 4685 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 4686 | + return { | |
| 4687 | + value: p.arg, | |
| 4688 | + done: n.done | |
| 4689 | + }; | |
| 4690 | + } | |
| 4691 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 4692 | + } | |
| 4693 | + }; | |
| 4694 | + } | |
| 4695 | + function maybeInvokeDelegate(e, r) { | |
| 4696 | + var n = r.method, | |
| 4697 | + o = e.iterator[n]; | |
| 4698 | + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | |
| 4699 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 4700 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 4701 | + var a = i.arg; | |
| 4702 | + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | |
| 4703 | + } | |
| 4704 | + function pushTryEntry(t) { | |
| 4705 | + var e = { | |
| 4706 | + tryLoc: t[0] | |
| 4707 | + }; | |
| 4708 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 4709 | + } | |
| 4710 | + function resetTryEntry(t) { | |
| 4711 | + var e = t.completion || {}; | |
| 4712 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 4713 | + } | |
| 4714 | + function Context(t) { | |
| 4715 | + this.tryEntries = [{ | |
| 4716 | + tryLoc: "root" | |
| 4717 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 4718 | + } | |
| 4719 | + function values(e) { | |
| 4720 | + if (e || "" === e) { | |
| 4721 | + var r = e[a]; | |
| 4722 | + if (r) return r.call(e); | |
| 4723 | + if ("function" == typeof e.next) return e; | |
| 4724 | + if (!isNaN(e.length)) { | |
| 4725 | + var o = -1, | |
| 4726 | + i = function next() { | |
| 4727 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 4728 | + return next.value = t, next.done = !0, next; | |
| 4729 | + }; | |
| 4730 | + return i.next = i; | |
| 4731 | + } | |
| 4732 | + } | |
| 4733 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 4734 | + } | |
| 4735 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 4736 | + value: GeneratorFunctionPrototype, | |
| 4737 | + configurable: !0 | |
| 4738 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 4739 | + value: GeneratorFunction, | |
| 4740 | + configurable: !0 | |
| 4741 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 4742 | + var e = "function" == typeof t && t.constructor; | |
| 4743 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 4744 | + }, e.mark = function (t) { | |
| 4745 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 4746 | + }, e.awrap = function (t) { | |
| 4747 | + return { | |
| 4748 | + __await: t | |
| 4749 | + }; | |
| 4750 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 4751 | + return this; | |
| 4752 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 4753 | + void 0 === i && (i = Promise); | |
| 4754 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 4755 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 4756 | + return t.done ? t.value : a.next(); | |
| 4757 | + }); | |
| 4758 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 4759 | + return this; | |
| 4760 | + }), define(g, "toString", function () { | |
| 4761 | + return "[object Generator]"; | |
| 4762 | + }), e.keys = function (t) { | |
| 4763 | + var e = Object(t), | |
| 4764 | + r = []; | |
| 4765 | + for (var n in e) r.push(n); | |
| 4766 | + return r.reverse(), function next() { | |
| 4767 | + for (; r.length;) { | |
| 4768 | + var t = r.pop(); | |
| 4769 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 4770 | + } | |
| 4771 | + return next.done = !0, next; | |
| 4772 | + }; | |
| 4773 | + }, e.values = values, Context.prototype = { | |
| 4774 | + constructor: Context, | |
| 4775 | + reset: function reset(e) { | |
| 4776 | + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | |
| 4777 | + }, | |
| 4778 | + stop: function stop() { | |
| 4779 | + this.done = !0; | |
| 4780 | + var t = this.tryEntries[0].completion; | |
| 4781 | + if ("throw" === t.type) throw t.arg; | |
| 4782 | + return this.rval; | |
| 4783 | + }, | |
| 4784 | + dispatchException: function dispatchException(e) { | |
| 4785 | + if (this.done) throw e; | |
| 4786 | + var r = this; | |
| 4787 | + function handle(n, o) { | |
| 4788 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 4789 | + } | |
| 4790 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 4791 | + var i = this.tryEntries[o], | |
| 4792 | + a = i.completion; | |
| 4793 | + if ("root" === i.tryLoc) return handle("end"); | |
| 4794 | + if (i.tryLoc <= this.prev) { | |
| 4795 | + var c = n.call(i, "catchLoc"), | |
| 4796 | + u = n.call(i, "finallyLoc"); | |
| 4797 | + if (c && u) { | |
| 4798 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 4799 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 4800 | + } else if (c) { | |
| 4801 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 4802 | + } else { | |
| 4803 | + if (!u) throw Error("try statement without catch or finally"); | |
| 4804 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 4805 | + } | |
| 4806 | + } | |
| 4807 | + } | |
| 4808 | + }, | |
| 4809 | + abrupt: function abrupt(t, e) { | |
| 4810 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 4811 | + var o = this.tryEntries[r]; | |
| 4812 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 4813 | + var i = o; | |
| 4814 | + break; | |
| 4815 | + } | |
| 4816 | + } | |
| 4817 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 4818 | + var a = i ? i.completion : {}; | |
| 4819 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 4820 | + }, | |
| 4821 | + complete: function complete(t, e) { | |
| 4822 | + if ("throw" === t.type) throw t.arg; | |
| 4823 | + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | |
| 4824 | + }, | |
| 4825 | + finish: function finish(t) { | |
| 4826 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 4827 | + var r = this.tryEntries[e]; | |
| 4828 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 4829 | + } | |
| 4830 | + }, | |
| 4831 | + "catch": function _catch(t) { | |
| 4832 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 4833 | + var r = this.tryEntries[e]; | |
| 4834 | + if (r.tryLoc === t) { | |
| 4835 | + var n = r.completion; | |
| 4836 | + if ("throw" === n.type) { | |
| 4837 | + var o = n.arg; | |
| 4838 | + resetTryEntry(r); | |
| 4839 | + } | |
| 4840 | + return o; | |
| 4841 | + } | |
| 4842 | + } | |
| 4843 | + throw Error("illegal catch attempt"); | |
| 4844 | + }, | |
| 4845 | + delegateYield: function delegateYield(e, r, n) { | |
| 4846 | + return this.delegate = { | |
| 4847 | + iterator: values(e), | |
| 4848 | + resultName: r, | |
| 4849 | + nextLoc: n | |
| 4850 | + }, "next" === this.method && (this.arg = t), y; | |
| 4851 | + } | |
| 4852 | + }, e; | |
| 4853 | +} | |
| 4854 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4855 | + | |
| 4856 | +/***/ }), | |
| 4857 | + | |
| 4858 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 4859 | +/*!****************************************************************!*\ | |
| 4860 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 4861 | + \****************************************************************/ | |
| 4862 | +/***/ ((module) => { | |
| 4863 | + | |
| 4864 | +function _setPrototypeOf(t, e) { | |
| 4865 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 4866 | + return t.__proto__ = e, t; | |
| 4867 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 4868 | +} | |
| 4869 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4870 | + | |
| 4871 | +/***/ }), | |
| 4872 | + | |
| 4873 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 4874 | +/*!***************************************************************!*\ | |
| 4875 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 4876 | + \***************************************************************/ | |
| 4877 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4878 | + | |
| 4879 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 4880 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 4881 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 4882 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 4883 | +function _slicedToArray(r, e) { | |
| 4884 | + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 4885 | +} | |
| 4886 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4887 | + | |
| 4888 | +/***/ }), | |
| 4889 | + | |
| 4890 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 4891 | +/*!*******************************************************************!*\ | |
| 4892 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 4893 | + \*******************************************************************/ | |
| 4894 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4895 | + | |
| 4896 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 4897 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 4898 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 4899 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 4900 | +function _toConsumableArray(r) { | |
| 4901 | + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 4902 | +} | |
| 4903 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4904 | + | |
| 4905 | +/***/ }), | |
| 4906 | + | |
| 4907 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 4908 | +/*!*************************************************************!*\ | |
| 4909 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 4910 | + \*************************************************************/ | |
| 4911 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4912 | + | |
| 4913 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4914 | +function toPrimitive(t, r) { | |
| 4915 | + if ("object" != _typeof(t) || !t) return t; | |
| 4916 | + var e = t[Symbol.toPrimitive]; | |
| 4917 | + if (void 0 !== e) { | |
| 4918 | + var i = e.call(t, r || "default"); | |
| 4919 | + if ("object" != _typeof(i)) return i; | |
| 4920 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 4921 | + } | |
| 4922 | + return ("string" === r ? String : Number)(t); | |
| 4923 | +} | |
| 4924 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4925 | + | |
| 4926 | +/***/ }), | |
| 4927 | + | |
| 4928 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 4929 | +/*!***************************************************************!*\ | |
| 4930 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 4931 | + \***************************************************************/ | |
| 4932 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4933 | + | |
| 4934 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4935 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 4936 | +function toPropertyKey(t) { | |
| 4937 | + var i = toPrimitive(t, "string"); | |
| 4938 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 4939 | +} | |
| 4940 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4941 | + | |
| 4942 | +/***/ }), | |
| 4943 | + | |
| 4944 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 4945 | +/*!********************************************************!*\ | |
| 4946 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 4947 | + \********************************************************/ | |
| 4948 | +/***/ ((module) => { | |
| 4949 | + | |
| 4950 | +function _typeof(o) { | |
| 4951 | + "@babel/helpers - typeof"; | |
| 4952 | + | |
| 4953 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 4954 | + return typeof o; | |
| 4955 | + } : function (o) { | |
| 4956 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 4957 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 4958 | +} | |
| 4959 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4960 | + | |
| 4961 | +/***/ }), | |
| 4962 | + | |
| 4963 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 4964 | +/*!****************************************************************************!*\ | |
| 4965 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 4966 | + \****************************************************************************/ | |
| 4967 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4968 | + | |
| 4969 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 4970 | +function _unsupportedIterableToArray(r, a) { | |
| 4971 | + if (r) { | |
| 4972 | + if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 4973 | + var t = {}.toString.call(r).slice(8, -1); | |
| 4974 | + 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; | |
| 4975 | + } | |
| 4976 | +} | |
| 4977 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4978 | + | |
| 4979 | +/***/ }), | |
| 4980 | + | |
| 4981 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 4982 | +/*!***********************************************************!*\ | |
| 4983 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 4984 | + \***********************************************************/ | |
| 4985 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4986 | + | |
| 4987 | +// TODO(Babel 8): Remove this file. | |
| 4988 | + | |
| 4989 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 4990 | +module.exports = runtime; | |
| 4991 | + | |
| 4992 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 4993 | +try { | |
| 4994 | + regeneratorRuntime = runtime; | |
| 4995 | +} catch (accidentalStrictMode) { | |
| 4996 | + if (typeof globalThis === "object") { | |
| 4997 | + globalThis.regeneratorRuntime = runtime; | |
| 4998 | + } else { | |
| 4999 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 5000 | + } | |
| 5001 | +} | |
| 5002 | + | |
| 5003 | + | |
| 5004 | +/***/ }), | |
| 5005 | + | |
| 5006 | +/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs": | |
| 5007 | +/*!**************************************************************************!*\ | |
| 5008 | + !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***! | |
| 5009 | + \**************************************************************************/ | |
| 5010 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5011 | + | |
| 3615 | 5012 | "use strict"; |
| 3616 | -module.exports = React; | |
| 3617 | 5013 | |
| 5014 | +var __defProp = Object.defineProperty; | |
| 5015 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5016 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5017 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5018 | +var __export = (target, all) => { | |
| 5019 | + for (var name in all) | |
| 5020 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5021 | +}; | |
| 5022 | +var __copyProps = (to, from, except, desc) => { | |
| 5023 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5024 | + for (let key of __getOwnPropNames(from)) | |
| 5025 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5026 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5027 | + } | |
| 5028 | + return to; | |
| 5029 | +}; | |
| 5030 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5031 | + | |
| 5032 | +// src/focusManager.ts | |
| 5033 | +var focusManager_exports = {}; | |
| 5034 | +__export(focusManager_exports, { | |
| 5035 | + FocusManager: () => FocusManager, | |
| 5036 | + focusManager: () => focusManager | |
| 5037 | +}); | |
| 5038 | +module.exports = __toCommonJS(focusManager_exports); | |
| 5039 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 5040 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5041 | +var FocusManager = class extends import_subscribable.Subscribable { | |
| 5042 | + #focused; | |
| 5043 | + #cleanup; | |
| 5044 | + #setup; | |
| 5045 | + constructor() { | |
| 5046 | + super(); | |
| 5047 | + this.#setup = (onFocus) => { | |
| 5048 | + if (!import_utils.isServer && window.addEventListener) { | |
| 5049 | + const listener = () => onFocus(); | |
| 5050 | + window.addEventListener("visibilitychange", listener, false); | |
| 5051 | + return () => { | |
| 5052 | + window.removeEventListener("visibilitychange", listener); | |
| 5053 | + }; | |
| 5054 | + } | |
| 5055 | + return; | |
| 5056 | + }; | |
| 5057 | + } | |
| 5058 | + onSubscribe() { | |
| 5059 | + if (!this.#cleanup) { | |
| 5060 | + this.setEventListener(this.#setup); | |
| 5061 | + } | |
| 5062 | + } | |
| 5063 | + onUnsubscribe() { | |
| 5064 | + if (!this.hasListeners()) { | |
| 5065 | + this.#cleanup?.(); | |
| 5066 | + this.#cleanup = void 0; | |
| 5067 | + } | |
| 5068 | + } | |
| 5069 | + setEventListener(setup) { | |
| 5070 | + this.#setup = setup; | |
| 5071 | + this.#cleanup?.(); | |
| 5072 | + this.#cleanup = setup((focused) => { | |
| 5073 | + if (typeof focused === "boolean") { | |
| 5074 | + this.setFocused(focused); | |
| 5075 | + } else { | |
| 5076 | + this.onFocus(); | |
| 5077 | + } | |
| 5078 | + }); | |
| 5079 | + } | |
| 5080 | + setFocused(focused) { | |
| 5081 | + const changed = this.#focused !== focused; | |
| 5082 | + if (changed) { | |
| 5083 | + this.#focused = focused; | |
| 5084 | + this.onFocus(); | |
| 5085 | + } | |
| 5086 | + } | |
| 5087 | + onFocus() { | |
| 5088 | + const isFocused = this.isFocused(); | |
| 5089 | + this.listeners.forEach((listener) => { | |
| 5090 | + listener(isFocused); | |
| 5091 | + }); | |
| 5092 | + } | |
| 5093 | + isFocused() { | |
| 5094 | + if (typeof this.#focused === "boolean") { | |
| 5095 | + return this.#focused; | |
| 5096 | + } | |
| 5097 | + return globalThis.document?.visibilityState !== "hidden"; | |
| 5098 | + } | |
| 5099 | +}; | |
| 5100 | +var focusManager = new FocusManager(); | |
| 5101 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5102 | +0 && (0); | |
| 5103 | +//# sourceMappingURL=focusManager.cjs.map | |
| 5104 | + | |
| 3618 | 5105 | /***/ }), |
| 3619 | 5106 | |
| 3620 | -/***/ "react-dom": | |
| 3621 | -/*!***************************!*\ | |
| 3622 | - !*** external "ReactDOM" ***! | |
| 3623 | - \***************************/ | |
| 5107 | +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs": | |
| 5108 | +/*!***********************************************************************!*\ | |
| 5109 | + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***! | |
| 5110 | + \***********************************************************************/ | |
| 3624 | 5111 | /***/ ((module) => { |
| 3625 | 5112 | |
| 3626 | 5113 | "use strict"; |
| 3627 | -module.exports = ReactDOM; | |
| 3628 | 5114 | |
| 5115 | +var __defProp = Object.defineProperty; | |
| 5116 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5117 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5118 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5119 | +var __export = (target, all) => { | |
| 5120 | + for (var name in all) | |
| 5121 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5122 | +}; | |
| 5123 | +var __copyProps = (to, from, except, desc) => { | |
| 5124 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5125 | + for (let key of __getOwnPropNames(from)) | |
| 5126 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5127 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5128 | + } | |
| 5129 | + return to; | |
| 5130 | +}; | |
| 5131 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5132 | + | |
| 5133 | +// src/hydration.ts | |
| 5134 | +var hydration_exports = {}; | |
| 5135 | +__export(hydration_exports, { | |
| 5136 | + defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation, | |
| 5137 | + defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery, | |
| 5138 | + dehydrate: () => dehydrate, | |
| 5139 | + hydrate: () => hydrate | |
| 5140 | +}); | |
| 5141 | +module.exports = __toCommonJS(hydration_exports); | |
| 5142 | +function defaultTransformerFn(data) { | |
| 5143 | + return data; | |
| 5144 | +} | |
| 5145 | +function dehydrateMutation(mutation) { | |
| 5146 | + return { | |
| 5147 | + mutationKey: mutation.options.mutationKey, | |
| 5148 | + state: mutation.state, | |
| 5149 | + ...mutation.options.scope && { scope: mutation.options.scope }, | |
| 5150 | + ...mutation.meta && { meta: mutation.meta } | |
| 5151 | + }; | |
| 5152 | +} | |
| 5153 | +function dehydrateQuery(query, serializeData) { | |
| 5154 | + return { | |
| 5155 | + state: { | |
| 5156 | + ...query.state, | |
| 5157 | + ...query.state.data !== void 0 && { | |
| 5158 | + data: serializeData(query.state.data) | |
| 5159 | + } | |
| 5160 | + }, | |
| 5161 | + queryKey: query.queryKey, | |
| 5162 | + queryHash: query.queryHash, | |
| 5163 | + ...query.state.status === "pending" && { | |
| 5164 | + promise: query.promise?.then(serializeData).catch((error) => { | |
| 5165 | + if (true) { | |
| 5166 | + console.error( | |
| 5167 | + `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds` | |
| 5168 | + ); | |
| 5169 | + } | |
| 5170 | + return Promise.reject(new Error("redacted")); | |
| 5171 | + }) | |
| 5172 | + }, | |
| 5173 | + ...query.meta && { meta: query.meta } | |
| 5174 | + }; | |
| 5175 | +} | |
| 5176 | +function defaultShouldDehydrateMutation(mutation) { | |
| 5177 | + return mutation.state.isPaused; | |
| 5178 | +} | |
| 5179 | +function defaultShouldDehydrateQuery(query) { | |
| 5180 | + return query.state.status === "success"; | |
| 5181 | +} | |
| 5182 | +function dehydrate(client, options = {}) { | |
| 5183 | + const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation; | |
| 5184 | + const mutations = client.getMutationCache().getAll().flatMap( | |
| 5185 | + (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : [] | |
| 5186 | + ); | |
| 5187 | + const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery; | |
| 5188 | + const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn; | |
| 5189 | + const queries = client.getQueryCache().getAll().flatMap( | |
| 5190 | + (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : [] | |
| 5191 | + ); | |
| 5192 | + return { mutations, queries }; | |
| 5193 | +} | |
| 5194 | +function hydrate(client, dehydratedState, options) { | |
| 5195 | + if (typeof dehydratedState !== "object" || dehydratedState === null) { | |
| 5196 | + return; | |
| 5197 | + } | |
| 5198 | + const mutationCache = client.getMutationCache(); | |
| 5199 | + const queryCache = client.getQueryCache(); | |
| 5200 | + const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn; | |
| 5201 | + const mutations = dehydratedState.mutations || []; | |
| 5202 | + const queries = dehydratedState.queries || []; | |
| 5203 | + mutations.forEach(({ state, ...mutationOptions }) => { | |
| 5204 | + mutationCache.build( | |
| 5205 | + client, | |
| 5206 | + { | |
| 5207 | + ...client.getDefaultOptions().hydrate?.mutations, | |
| 5208 | + ...options?.defaultOptions?.mutations, | |
| 5209 | + ...mutationOptions | |
| 5210 | + }, | |
| 5211 | + state | |
| 5212 | + ); | |
| 5213 | + }); | |
| 5214 | + queries.forEach(({ queryKey, state, queryHash, meta, promise }) => { | |
| 5215 | + let query = queryCache.get(queryHash); | |
| 5216 | + const data = state.data === void 0 ? state.data : deserializeData(state.data); | |
| 5217 | + if (query) { | |
| 5218 | + if (query.state.dataUpdatedAt < state.dataUpdatedAt) { | |
| 5219 | + const { fetchStatus: _ignored, ...serializedState } = state; | |
| 5220 | + query.setState({ | |
| 5221 | + ...serializedState, | |
| 5222 | + data | |
| 5223 | + }); | |
| 5224 | + } | |
| 5225 | + } else { | |
| 5226 | + query = queryCache.build( | |
| 5227 | + client, | |
| 5228 | + { | |
| 5229 | + ...client.getDefaultOptions().hydrate?.queries, | |
| 5230 | + ...options?.defaultOptions?.queries, | |
| 5231 | + queryKey, | |
| 5232 | + queryHash, | |
| 5233 | + meta | |
| 5234 | + }, | |
| 5235 | + // Reset fetch status to idle to avoid | |
| 5236 | + // query being stuck in fetching state upon hydration | |
| 5237 | + { | |
| 5238 | + ...state, | |
| 5239 | + data, | |
| 5240 | + fetchStatus: "idle" | |
| 5241 | + } | |
| 5242 | + ); | |
| 5243 | + } | |
| 5244 | + if (promise) { | |
| 5245 | + const initialPromise = Promise.resolve(promise).then(deserializeData); | |
| 5246 | + void query.fetch(void 0, { initialPromise }); | |
| 5247 | + } | |
| 5248 | + }); | |
| 5249 | +} | |
| 5250 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5251 | +0 && (0); | |
| 5252 | +//# sourceMappingURL=hydration.cjs.map | |
| 5253 | + | |
| 5254 | +/***/ }), | |
| 5255 | + | |
| 5256 | +/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs": | |
| 5257 | +/*!*******************************************************************!*\ | |
| 5258 | + !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***! | |
| 5259 | + \*******************************************************************/ | |
| 5260 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5261 | + | |
| 5262 | +"use strict"; | |
| 5263 | + | |
| 5264 | +var __defProp = Object.defineProperty; | |
| 5265 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5266 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5267 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5268 | +var __export = (target, all) => { | |
| 5269 | + for (var name in all) | |
| 5270 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5271 | +}; | |
| 5272 | +var __copyProps = (to, from, except, desc) => { | |
| 5273 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5274 | + for (let key of __getOwnPropNames(from)) | |
| 5275 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5276 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5277 | + } | |
| 5278 | + return to; | |
| 5279 | +}; | |
| 5280 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 5281 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5282 | + | |
| 5283 | +// src/index.ts | |
| 5284 | +var src_exports = {}; | |
| 5285 | +__export(src_exports, { | |
| 5286 | + CancelledError: () => import_retryer.CancelledError, | |
| 5287 | + InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver, | |
| 5288 | + Mutation: () => import_mutation.Mutation, | |
| 5289 | + MutationCache: () => import_mutationCache.MutationCache, | |
| 5290 | + MutationObserver: () => import_mutationObserver.MutationObserver, | |
| 5291 | + QueriesObserver: () => import_queriesObserver.QueriesObserver, | |
| 5292 | + Query: () => import_query.Query, | |
| 5293 | + QueryCache: () => import_queryCache.QueryCache, | |
| 5294 | + QueryClient: () => import_queryClient.QueryClient, | |
| 5295 | + QueryObserver: () => import_queryObserver.QueryObserver, | |
| 5296 | + defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation, | |
| 5297 | + defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery, | |
| 5298 | + dehydrate: () => import_hydration.dehydrate, | |
| 5299 | + focusManager: () => import_focusManager.focusManager, | |
| 5300 | + hashKey: () => import_utils.hashKey, | |
| 5301 | + hydrate: () => import_hydration.hydrate, | |
| 5302 | + isCancelledError: () => import_retryer2.isCancelledError, | |
| 5303 | + isServer: () => import_utils.isServer, | |
| 5304 | + keepPreviousData: () => import_utils.keepPreviousData, | |
| 5305 | + matchMutation: () => import_utils.matchMutation, | |
| 5306 | + matchQuery: () => import_utils.matchQuery, | |
| 5307 | + notifyManager: () => import_notifyManager.notifyManager, | |
| 5308 | + onlineManager: () => import_onlineManager.onlineManager, | |
| 5309 | + replaceEqualDeep: () => import_utils.replaceEqualDeep, | |
| 5310 | + skipToken: () => import_utils.skipToken | |
| 5311 | +}); | |
| 5312 | +module.exports = __toCommonJS(src_exports); | |
| 5313 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5314 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 5315 | +var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs"); | |
| 5316 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 5317 | +var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs"); | |
| 5318 | +var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs"); | |
| 5319 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 5320 | +var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs"); | |
| 5321 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5322 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 5323 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 5324 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5325 | +var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5326 | +var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs"); | |
| 5327 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports); | |
| 5328 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 5329 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 5330 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5331 | +0 && (0); | |
| 5332 | +//# sourceMappingURL=index.cjs.map | |
| 5333 | + | |
| 5334 | +/***/ }), | |
| 5335 | + | |
| 5336 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs": | |
| 5337 | +/*!***********************************************************************************!*\ | |
| 5338 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***! | |
| 5339 | + \***********************************************************************************/ | |
| 5340 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5341 | + | |
| 5342 | +"use strict"; | |
| 5343 | + | |
| 5344 | +var __defProp = Object.defineProperty; | |
| 5345 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5346 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5347 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5348 | +var __export = (target, all) => { | |
| 5349 | + for (var name in all) | |
| 5350 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5351 | +}; | |
| 5352 | +var __copyProps = (to, from, except, desc) => { | |
| 5353 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5354 | + for (let key of __getOwnPropNames(from)) | |
| 5355 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5356 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5357 | + } | |
| 5358 | + return to; | |
| 5359 | +}; | |
| 5360 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5361 | + | |
| 5362 | +// src/infiniteQueryBehavior.ts | |
| 5363 | +var infiniteQueryBehavior_exports = {}; | |
| 5364 | +__export(infiniteQueryBehavior_exports, { | |
| 5365 | + hasNextPage: () => hasNextPage, | |
| 5366 | + hasPreviousPage: () => hasPreviousPage, | |
| 5367 | + infiniteQueryBehavior: () => infiniteQueryBehavior | |
| 5368 | +}); | |
| 5369 | +module.exports = __toCommonJS(infiniteQueryBehavior_exports); | |
| 5370 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5371 | +function infiniteQueryBehavior(pages) { | |
| 5372 | + return { | |
| 5373 | + onFetch: (context, query) => { | |
| 5374 | + const options = context.options; | |
| 5375 | + const direction = context.fetchOptions?.meta?.fetchMore?.direction; | |
| 5376 | + const oldPages = context.state.data?.pages || []; | |
| 5377 | + const oldPageParams = context.state.data?.pageParams || []; | |
| 5378 | + let result = { pages: [], pageParams: [] }; | |
| 5379 | + let currentPage = 0; | |
| 5380 | + const fetchFn = async () => { | |
| 5381 | + let cancelled = false; | |
| 5382 | + const addSignalProperty = (object) => { | |
| 5383 | + Object.defineProperty(object, "signal", { | |
| 5384 | + enumerable: true, | |
| 5385 | + get: () => { | |
| 5386 | + if (context.signal.aborted) { | |
| 5387 | + cancelled = true; | |
| 5388 | + } else { | |
| 5389 | + context.signal.addEventListener("abort", () => { | |
| 5390 | + cancelled = true; | |
| 5391 | + }); | |
| 5392 | + } | |
| 5393 | + return context.signal; | |
| 5394 | + } | |
| 5395 | + }); | |
| 5396 | + }; | |
| 5397 | + const queryFn = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions); | |
| 5398 | + const fetchPage = async (data, param, previous) => { | |
| 5399 | + if (cancelled) { | |
| 5400 | + return Promise.reject(); | |
| 5401 | + } | |
| 5402 | + if (param == null && data.pages.length) { | |
| 5403 | + return Promise.resolve(data); | |
| 5404 | + } | |
| 5405 | + const queryFnContext = { | |
| 5406 | + queryKey: context.queryKey, | |
| 5407 | + pageParam: param, | |
| 5408 | + direction: previous ? "backward" : "forward", | |
| 5409 | + meta: context.options.meta | |
| 5410 | + }; | |
| 5411 | + addSignalProperty(queryFnContext); | |
| 5412 | + const page = await queryFn( | |
| 5413 | + queryFnContext | |
| 5414 | + ); | |
| 5415 | + const { maxPages } = context.options; | |
| 5416 | + const addTo = previous ? import_utils.addToStart : import_utils.addToEnd; | |
| 5417 | + return { | |
| 5418 | + pages: addTo(data.pages, page, maxPages), | |
| 5419 | + pageParams: addTo(data.pageParams, param, maxPages) | |
| 5420 | + }; | |
| 5421 | + }; | |
| 5422 | + if (direction && oldPages.length) { | |
| 5423 | + const previous = direction === "backward"; | |
| 5424 | + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam; | |
| 5425 | + const oldData = { | |
| 5426 | + pages: oldPages, | |
| 5427 | + pageParams: oldPageParams | |
| 5428 | + }; | |
| 5429 | + const param = pageParamFn(options, oldData); | |
| 5430 | + result = await fetchPage(oldData, param, previous); | |
| 5431 | + } else { | |
| 5432 | + const remainingPages = pages ?? oldPages.length; | |
| 5433 | + do { | |
| 5434 | + const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result); | |
| 5435 | + if (currentPage > 0 && param == null) { | |
| 5436 | + break; | |
| 5437 | + } | |
| 5438 | + result = await fetchPage(result, param); | |
| 5439 | + currentPage++; | |
| 5440 | + } while (currentPage < remainingPages); | |
| 5441 | + } | |
| 5442 | + return result; | |
| 5443 | + }; | |
| 5444 | + if (context.options.persister) { | |
| 5445 | + context.fetchFn = () => { | |
| 5446 | + return context.options.persister?.( | |
| 5447 | + fetchFn, | |
| 5448 | + { | |
| 5449 | + queryKey: context.queryKey, | |
| 5450 | + meta: context.options.meta, | |
| 5451 | + signal: context.signal | |
| 5452 | + }, | |
| 5453 | + query | |
| 5454 | + ); | |
| 5455 | + }; | |
| 5456 | + } else { | |
| 5457 | + context.fetchFn = fetchFn; | |
| 5458 | + } | |
| 5459 | + } | |
| 5460 | + }; | |
| 5461 | +} | |
| 5462 | +function getNextPageParam(options, { pages, pageParams }) { | |
| 5463 | + const lastIndex = pages.length - 1; | |
| 5464 | + return pages.length > 0 ? options.getNextPageParam( | |
| 5465 | + pages[lastIndex], | |
| 5466 | + pages, | |
| 5467 | + pageParams[lastIndex], | |
| 5468 | + pageParams | |
| 5469 | + ) : void 0; | |
| 5470 | +} | |
| 5471 | +function getPreviousPageParam(options, { pages, pageParams }) { | |
| 5472 | + return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0; | |
| 5473 | +} | |
| 5474 | +function hasNextPage(options, data) { | |
| 5475 | + if (!data) | |
| 5476 | + return false; | |
| 5477 | + return getNextPageParam(options, data) != null; | |
| 5478 | +} | |
| 5479 | +function hasPreviousPage(options, data) { | |
| 5480 | + if (!data || !options.getPreviousPageParam) | |
| 5481 | + return false; | |
| 5482 | + return getPreviousPageParam(options, data) != null; | |
| 5483 | +} | |
| 5484 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5485 | +0 && (0); | |
| 5486 | +//# sourceMappingURL=infiniteQueryBehavior.cjs.map | |
| 5487 | + | |
| 5488 | +/***/ }), | |
| 5489 | + | |
| 5490 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs": | |
| 5491 | +/*!***********************************************************************************!*\ | |
| 5492 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***! | |
| 5493 | + \***********************************************************************************/ | |
| 5494 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5495 | + | |
| 5496 | +"use strict"; | |
| 5497 | + | |
| 5498 | +var __defProp = Object.defineProperty; | |
| 5499 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5500 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5501 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5502 | +var __export = (target, all) => { | |
| 5503 | + for (var name in all) | |
| 5504 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5505 | +}; | |
| 5506 | +var __copyProps = (to, from, except, desc) => { | |
| 5507 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5508 | + for (let key of __getOwnPropNames(from)) | |
| 5509 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5510 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5511 | + } | |
| 5512 | + return to; | |
| 5513 | +}; | |
| 5514 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5515 | + | |
| 5516 | +// src/infiniteQueryObserver.ts | |
| 5517 | +var infiniteQueryObserver_exports = {}; | |
| 5518 | +__export(infiniteQueryObserver_exports, { | |
| 5519 | + InfiniteQueryObserver: () => InfiniteQueryObserver | |
| 5520 | +}); | |
| 5521 | +module.exports = __toCommonJS(infiniteQueryObserver_exports); | |
| 5522 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 5523 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 5524 | +var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver { | |
| 5525 | + constructor(client, options) { | |
| 5526 | + super(client, options); | |
| 5527 | + } | |
| 5528 | + bindMethods() { | |
| 5529 | + super.bindMethods(); | |
| 5530 | + this.fetchNextPage = this.fetchNextPage.bind(this); | |
| 5531 | + this.fetchPreviousPage = this.fetchPreviousPage.bind(this); | |
| 5532 | + } | |
| 5533 | + setOptions(options, notifyOptions) { | |
| 5534 | + super.setOptions( | |
| 5535 | + { | |
| 5536 | + ...options, | |
| 5537 | + behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)() | |
| 5538 | + }, | |
| 5539 | + notifyOptions | |
| 5540 | + ); | |
| 5541 | + } | |
| 5542 | + getOptimisticResult(options) { | |
| 5543 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(); | |
| 5544 | + return super.getOptimisticResult(options); | |
| 5545 | + } | |
| 5546 | + fetchNextPage(options) { | |
| 5547 | + return this.fetch({ | |
| 5548 | + ...options, | |
| 5549 | + meta: { | |
| 5550 | + fetchMore: { direction: "forward" } | |
| 5551 | + } | |
| 5552 | + }); | |
| 5553 | + } | |
| 5554 | + fetchPreviousPage(options) { | |
| 5555 | + return this.fetch({ | |
| 5556 | + ...options, | |
| 5557 | + meta: { | |
| 5558 | + fetchMore: { direction: "backward" } | |
| 5559 | + } | |
| 5560 | + }); | |
| 5561 | + } | |
| 5562 | + createResult(query, options) { | |
| 5563 | + const { state } = query; | |
| 5564 | + const parentResult = super.createResult(query, options); | |
| 5565 | + const { isFetching, isRefetching, isError, isRefetchError } = parentResult; | |
| 5566 | + const fetchDirection = state.fetchMeta?.fetchMore?.direction; | |
| 5567 | + const isFetchNextPageError = isError && fetchDirection === "forward"; | |
| 5568 | + const isFetchingNextPage = isFetching && fetchDirection === "forward"; | |
| 5569 | + const isFetchPreviousPageError = isError && fetchDirection === "backward"; | |
| 5570 | + const isFetchingPreviousPage = isFetching && fetchDirection === "backward"; | |
| 5571 | + const result = { | |
| 5572 | + ...parentResult, | |
| 5573 | + fetchNextPage: this.fetchNextPage, | |
| 5574 | + fetchPreviousPage: this.fetchPreviousPage, | |
| 5575 | + hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data), | |
| 5576 | + hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data), | |
| 5577 | + isFetchNextPageError, | |
| 5578 | + isFetchingNextPage, | |
| 5579 | + isFetchPreviousPageError, | |
| 5580 | + isFetchingPreviousPage, | |
| 5581 | + isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError, | |
| 5582 | + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage | |
| 5583 | + }; | |
| 5584 | + return result; | |
| 5585 | + } | |
| 5586 | +}; | |
| 5587 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5588 | +0 && (0); | |
| 5589 | +//# sourceMappingURL=infiniteQueryObserver.cjs.map | |
| 5590 | + | |
| 5591 | +/***/ }), | |
| 5592 | + | |
| 5593 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs": | |
| 5594 | +/*!**********************************************************************!*\ | |
| 5595 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***! | |
| 5596 | + \**********************************************************************/ | |
| 5597 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5598 | + | |
| 5599 | +"use strict"; | |
| 5600 | + | |
| 5601 | +var __defProp = Object.defineProperty; | |
| 5602 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5603 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5604 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5605 | +var __export = (target, all) => { | |
| 5606 | + for (var name in all) | |
| 5607 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5608 | +}; | |
| 5609 | +var __copyProps = (to, from, except, desc) => { | |
| 5610 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5611 | + for (let key of __getOwnPropNames(from)) | |
| 5612 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5613 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5614 | + } | |
| 5615 | + return to; | |
| 5616 | +}; | |
| 5617 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5618 | + | |
| 5619 | +// src/mutation.ts | |
| 5620 | +var mutation_exports = {}; | |
| 5621 | +__export(mutation_exports, { | |
| 5622 | + Mutation: () => Mutation, | |
| 5623 | + getDefaultState: () => getDefaultState | |
| 5624 | +}); | |
| 5625 | +module.exports = __toCommonJS(mutation_exports); | |
| 5626 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5627 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 5628 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5629 | +var Mutation = class extends import_removable.Removable { | |
| 5630 | + #observers; | |
| 5631 | + #mutationCache; | |
| 5632 | + #retryer; | |
| 5633 | + constructor(config) { | |
| 5634 | + super(); | |
| 5635 | + this.mutationId = config.mutationId; | |
| 5636 | + this.#mutationCache = config.mutationCache; | |
| 5637 | + this.#observers = []; | |
| 5638 | + this.state = config.state || getDefaultState(); | |
| 5639 | + this.setOptions(config.options); | |
| 5640 | + this.scheduleGc(); | |
| 5641 | + } | |
| 5642 | + setOptions(options) { | |
| 5643 | + this.options = options; | |
| 5644 | + this.updateGcTime(this.options.gcTime); | |
| 5645 | + } | |
| 5646 | + get meta() { | |
| 5647 | + return this.options.meta; | |
| 5648 | + } | |
| 5649 | + addObserver(observer) { | |
| 5650 | + if (!this.#observers.includes(observer)) { | |
| 5651 | + this.#observers.push(observer); | |
| 5652 | + this.clearGcTimeout(); | |
| 5653 | + this.#mutationCache.notify({ | |
| 5654 | + type: "observerAdded", | |
| 5655 | + mutation: this, | |
| 5656 | + observer | |
| 5657 | + }); | |
| 5658 | + } | |
| 5659 | + } | |
| 5660 | + removeObserver(observer) { | |
| 5661 | + this.#observers = this.#observers.filter((x) => x !== observer); | |
| 5662 | + this.scheduleGc(); | |
| 5663 | + this.#mutationCache.notify({ | |
| 5664 | + type: "observerRemoved", | |
| 5665 | + mutation: this, | |
| 5666 | + observer | |
| 5667 | + }); | |
| 5668 | + } | |
| 5669 | + optionalRemove() { | |
| 5670 | + if (!this.#observers.length) { | |
| 5671 | + if (this.state.status === "pending") { | |
| 5672 | + this.scheduleGc(); | |
| 5673 | + } else { | |
| 5674 | + this.#mutationCache.remove(this); | |
| 5675 | + } | |
| 5676 | + } | |
| 5677 | + } | |
| 5678 | + continue() { | |
| 5679 | + return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before | |
| 5680 | + this.execute(this.state.variables); | |
| 5681 | + } | |
| 5682 | + async execute(variables) { | |
| 5683 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 5684 | + fn: () => { | |
| 5685 | + if (!this.options.mutationFn) { | |
| 5686 | + return Promise.reject(new Error("No mutationFn found")); | |
| 5687 | + } | |
| 5688 | + return this.options.mutationFn(variables); | |
| 5689 | + }, | |
| 5690 | + onFail: (failureCount, error) => { | |
| 5691 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 5692 | + }, | |
| 5693 | + onPause: () => { | |
| 5694 | + this.#dispatch({ type: "pause" }); | |
| 5695 | + }, | |
| 5696 | + onContinue: () => { | |
| 5697 | + this.#dispatch({ type: "continue" }); | |
| 5698 | + }, | |
| 5699 | + retry: this.options.retry ?? 0, | |
| 5700 | + retryDelay: this.options.retryDelay, | |
| 5701 | + networkMode: this.options.networkMode, | |
| 5702 | + canRun: () => this.#mutationCache.canRun(this) | |
| 5703 | + }); | |
| 5704 | + const restored = this.state.status === "pending"; | |
| 5705 | + const isPaused = !this.#retryer.canStart(); | |
| 5706 | + try { | |
| 5707 | + if (!restored) { | |
| 5708 | + this.#dispatch({ type: "pending", variables, isPaused }); | |
| 5709 | + await this.#mutationCache.config.onMutate?.( | |
| 5710 | + variables, | |
| 5711 | + this | |
| 5712 | + ); | |
| 5713 | + const context = await this.options.onMutate?.(variables); | |
| 5714 | + if (context !== this.state.context) { | |
| 5715 | + this.#dispatch({ | |
| 5716 | + type: "pending", | |
| 5717 | + context, | |
| 5718 | + variables, | |
| 5719 | + isPaused | |
| 5720 | + }); | |
| 5721 | + } | |
| 5722 | + } | |
| 5723 | + const data = await this.#retryer.start(); | |
| 5724 | + await this.#mutationCache.config.onSuccess?.( | |
| 5725 | + data, | |
| 5726 | + variables, | |
| 5727 | + this.state.context, | |
| 5728 | + this | |
| 5729 | + ); | |
| 5730 | + await this.options.onSuccess?.(data, variables, this.state.context); | |
| 5731 | + await this.#mutationCache.config.onSettled?.( | |
| 5732 | + data, | |
| 5733 | + null, | |
| 5734 | + this.state.variables, | |
| 5735 | + this.state.context, | |
| 5736 | + this | |
| 5737 | + ); | |
| 5738 | + await this.options.onSettled?.(data, null, variables, this.state.context); | |
| 5739 | + this.#dispatch({ type: "success", data }); | |
| 5740 | + return data; | |
| 5741 | + } catch (error) { | |
| 5742 | + try { | |
| 5743 | + await this.#mutationCache.config.onError?.( | |
| 5744 | + error, | |
| 5745 | + variables, | |
| 5746 | + this.state.context, | |
| 5747 | + this | |
| 5748 | + ); | |
| 5749 | + await this.options.onError?.( | |
| 5750 | + error, | |
| 5751 | + variables, | |
| 5752 | + this.state.context | |
| 5753 | + ); | |
| 5754 | + await this.#mutationCache.config.onSettled?.( | |
| 5755 | + void 0, | |
| 5756 | + error, | |
| 5757 | + this.state.variables, | |
| 5758 | + this.state.context, | |
| 5759 | + this | |
| 5760 | + ); | |
| 5761 | + await this.options.onSettled?.( | |
| 5762 | + void 0, | |
| 5763 | + error, | |
| 5764 | + variables, | |
| 5765 | + this.state.context | |
| 5766 | + ); | |
| 5767 | + throw error; | |
| 5768 | + } finally { | |
| 5769 | + this.#dispatch({ type: "error", error }); | |
| 5770 | + } | |
| 5771 | + } finally { | |
| 5772 | + this.#mutationCache.runNext(this); | |
| 5773 | + } | |
| 5774 | + } | |
| 5775 | + #dispatch(action) { | |
| 5776 | + const reducer = (state) => { | |
| 5777 | + switch (action.type) { | |
| 5778 | + case "failed": | |
| 5779 | + return { | |
| 5780 | + ...state, | |
| 5781 | + failureCount: action.failureCount, | |
| 5782 | + failureReason: action.error | |
| 5783 | + }; | |
| 5784 | + case "pause": | |
| 5785 | + return { | |
| 5786 | + ...state, | |
| 5787 | + isPaused: true | |
| 5788 | + }; | |
| 5789 | + case "continue": | |
| 5790 | + return { | |
| 5791 | + ...state, | |
| 5792 | + isPaused: false | |
| 5793 | + }; | |
| 5794 | + case "pending": | |
| 5795 | + return { | |
| 5796 | + ...state, | |
| 5797 | + context: action.context, | |
| 5798 | + data: void 0, | |
| 5799 | + failureCount: 0, | |
| 5800 | + failureReason: null, | |
| 5801 | + error: null, | |
| 5802 | + isPaused: action.isPaused, | |
| 5803 | + status: "pending", | |
| 5804 | + variables: action.variables, | |
| 5805 | + submittedAt: Date.now() | |
| 5806 | + }; | |
| 5807 | + case "success": | |
| 5808 | + return { | |
| 5809 | + ...state, | |
| 5810 | + data: action.data, | |
| 5811 | + failureCount: 0, | |
| 5812 | + failureReason: null, | |
| 5813 | + error: null, | |
| 5814 | + status: "success", | |
| 5815 | + isPaused: false | |
| 5816 | + }; | |
| 5817 | + case "error": | |
| 5818 | + return { | |
| 5819 | + ...state, | |
| 5820 | + data: void 0, | |
| 5821 | + error: action.error, | |
| 5822 | + failureCount: state.failureCount + 1, | |
| 5823 | + failureReason: action.error, | |
| 5824 | + isPaused: false, | |
| 5825 | + status: "error" | |
| 5826 | + }; | |
| 5827 | + } | |
| 5828 | + }; | |
| 5829 | + this.state = reducer(this.state); | |
| 5830 | + import_notifyManager.notifyManager.batch(() => { | |
| 5831 | + this.#observers.forEach((observer) => { | |
| 5832 | + observer.onMutationUpdate(action); | |
| 5833 | + }); | |
| 5834 | + this.#mutationCache.notify({ | |
| 5835 | + mutation: this, | |
| 5836 | + type: "updated", | |
| 5837 | + action | |
| 5838 | + }); | |
| 5839 | + }); | |
| 5840 | + } | |
| 5841 | +}; | |
| 5842 | +function getDefaultState() { | |
| 5843 | + return { | |
| 5844 | + context: void 0, | |
| 5845 | + data: void 0, | |
| 5846 | + error: null, | |
| 5847 | + failureCount: 0, | |
| 5848 | + failureReason: null, | |
| 5849 | + isPaused: false, | |
| 5850 | + status: "idle", | |
| 5851 | + variables: void 0, | |
| 5852 | + submittedAt: 0 | |
| 5853 | + }; | |
| 5854 | +} | |
| 5855 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5856 | +0 && (0); | |
| 5857 | +//# sourceMappingURL=mutation.cjs.map | |
| 5858 | + | |
| 5859 | +/***/ }), | |
| 5860 | + | |
| 5861 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs": | |
| 5862 | +/*!***************************************************************************!*\ | |
| 5863 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***! | |
| 5864 | + \***************************************************************************/ | |
| 5865 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5866 | + | |
| 5867 | +"use strict"; | |
| 5868 | + | |
| 5869 | +var __defProp = Object.defineProperty; | |
| 5870 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5871 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5872 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5873 | +var __export = (target, all) => { | |
| 5874 | + for (var name in all) | |
| 5875 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5876 | +}; | |
| 5877 | +var __copyProps = (to, from, except, desc) => { | |
| 5878 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5879 | + for (let key of __getOwnPropNames(from)) | |
| 5880 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5881 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5882 | + } | |
| 5883 | + return to; | |
| 5884 | +}; | |
| 5885 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5886 | + | |
| 5887 | +// src/mutationCache.ts | |
| 5888 | +var mutationCache_exports = {}; | |
| 5889 | +__export(mutationCache_exports, { | |
| 5890 | + MutationCache: () => MutationCache | |
| 5891 | +}); | |
| 5892 | +module.exports = __toCommonJS(mutationCache_exports); | |
| 5893 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5894 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 5895 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5896 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 5897 | +var MutationCache = class extends import_subscribable.Subscribable { | |
| 5898 | + constructor(config = {}) { | |
| 5899 | + super(); | |
| 5900 | + this.config = config; | |
| 5901 | + this.#mutations = /* @__PURE__ */ new Map(); | |
| 5902 | + this.#mutationId = Date.now(); | |
| 5903 | + } | |
| 5904 | + #mutations; | |
| 5905 | + #mutationId; | |
| 5906 | + build(client, options, state) { | |
| 5907 | + const mutation = new import_mutation.Mutation({ | |
| 5908 | + mutationCache: this, | |
| 5909 | + mutationId: ++this.#mutationId, | |
| 5910 | + options: client.defaultMutationOptions(options), | |
| 5911 | + state | |
| 5912 | + }); | |
| 5913 | + this.add(mutation); | |
| 5914 | + return mutation; | |
| 5915 | + } | |
| 5916 | + add(mutation) { | |
| 5917 | + const scope = scopeFor(mutation); | |
| 5918 | + const mutations = this.#mutations.get(scope) ?? []; | |
| 5919 | + mutations.push(mutation); | |
| 5920 | + this.#mutations.set(scope, mutations); | |
| 5921 | + this.notify({ type: "added", mutation }); | |
| 5922 | + } | |
| 5923 | + remove(mutation) { | |
| 5924 | + const scope = scopeFor(mutation); | |
| 5925 | + if (this.#mutations.has(scope)) { | |
| 5926 | + const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation); | |
| 5927 | + if (mutations) { | |
| 5928 | + if (mutations.length === 0) { | |
| 5929 | + this.#mutations.delete(scope); | |
| 5930 | + } else { | |
| 5931 | + this.#mutations.set(scope, mutations); | |
| 5932 | + } | |
| 5933 | + } | |
| 5934 | + } | |
| 5935 | + this.notify({ type: "removed", mutation }); | |
| 5936 | + } | |
| 5937 | + canRun(mutation) { | |
| 5938 | + const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending"); | |
| 5939 | + return !firstPendingMutation || firstPendingMutation === mutation; | |
| 5940 | + } | |
| 5941 | + runNext(mutation) { | |
| 5942 | + const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused); | |
| 5943 | + return foundMutation?.continue() ?? Promise.resolve(); | |
| 5944 | + } | |
| 5945 | + clear() { | |
| 5946 | + import_notifyManager.notifyManager.batch(() => { | |
| 5947 | + this.getAll().forEach((mutation) => { | |
| 5948 | + this.remove(mutation); | |
| 5949 | + }); | |
| 5950 | + }); | |
| 5951 | + } | |
| 5952 | + getAll() { | |
| 5953 | + return [...this.#mutations.values()].flat(); | |
| 5954 | + } | |
| 5955 | + find(filters) { | |
| 5956 | + const defaultedFilters = { exact: true, ...filters }; | |
| 5957 | + return this.getAll().find( | |
| 5958 | + (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation) | |
| 5959 | + ); | |
| 5960 | + } | |
| 5961 | + findAll(filters = {}) { | |
| 5962 | + return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation)); | |
| 5963 | + } | |
| 5964 | + notify(event) { | |
| 5965 | + import_notifyManager.notifyManager.batch(() => { | |
| 5966 | + this.listeners.forEach((listener) => { | |
| 5967 | + listener(event); | |
| 5968 | + }); | |
| 5969 | + }); | |
| 5970 | + } | |
| 5971 | + resumePausedMutations() { | |
| 5972 | + const pausedMutations = this.getAll().filter((x) => x.state.isPaused); | |
| 5973 | + return import_notifyManager.notifyManager.batch( | |
| 5974 | + () => Promise.all( | |
| 5975 | + pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop)) | |
| 5976 | + ) | |
| 5977 | + ); | |
| 5978 | + } | |
| 5979 | +}; | |
| 5980 | +function scopeFor(mutation) { | |
| 5981 | + return mutation.options.scope?.id ?? String(mutation.mutationId); | |
| 5982 | +} | |
| 5983 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5984 | +0 && (0); | |
| 5985 | +//# sourceMappingURL=mutationCache.cjs.map | |
| 5986 | + | |
| 5987 | +/***/ }), | |
| 5988 | + | |
| 5989 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs": | |
| 5990 | +/*!******************************************************************************!*\ | |
| 5991 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***! | |
| 5992 | + \******************************************************************************/ | |
| 5993 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5994 | + | |
| 5995 | +"use strict"; | |
| 5996 | + | |
| 5997 | +var __defProp = Object.defineProperty; | |
| 5998 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5999 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6000 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6001 | +var __export = (target, all) => { | |
| 6002 | + for (var name in all) | |
| 6003 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6004 | +}; | |
| 6005 | +var __copyProps = (to, from, except, desc) => { | |
| 6006 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6007 | + for (let key of __getOwnPropNames(from)) | |
| 6008 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6009 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6010 | + } | |
| 6011 | + return to; | |
| 6012 | +}; | |
| 6013 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6014 | + | |
| 6015 | +// src/mutationObserver.ts | |
| 6016 | +var mutationObserver_exports = {}; | |
| 6017 | +__export(mutationObserver_exports, { | |
| 6018 | + MutationObserver: () => MutationObserver | |
| 6019 | +}); | |
| 6020 | +module.exports = __toCommonJS(mutationObserver_exports); | |
| 6021 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 6022 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6023 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6024 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6025 | +var MutationObserver = class extends import_subscribable.Subscribable { | |
| 6026 | + #client; | |
| 6027 | + #currentResult = void 0; | |
| 6028 | + #currentMutation; | |
| 6029 | + #mutateOptions; | |
| 6030 | + constructor(client, options) { | |
| 6031 | + super(); | |
| 6032 | + this.#client = client; | |
| 6033 | + this.setOptions(options); | |
| 6034 | + this.bindMethods(); | |
| 6035 | + this.#updateResult(); | |
| 6036 | + } | |
| 6037 | + bindMethods() { | |
| 6038 | + this.mutate = this.mutate.bind(this); | |
| 6039 | + this.reset = this.reset.bind(this); | |
| 6040 | + } | |
| 6041 | + setOptions(options) { | |
| 6042 | + const prevOptions = this.options; | |
| 6043 | + this.options = this.#client.defaultMutationOptions(options); | |
| 6044 | + if (!(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) { | |
| 6045 | + this.#client.getMutationCache().notify({ | |
| 6046 | + type: "observerOptionsUpdated", | |
| 6047 | + mutation: this.#currentMutation, | |
| 6048 | + observer: this | |
| 6049 | + }); | |
| 6050 | + } | |
| 6051 | + if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) { | |
| 6052 | + this.reset(); | |
| 6053 | + } else if (this.#currentMutation?.state.status === "pending") { | |
| 6054 | + this.#currentMutation.setOptions(this.options); | |
| 6055 | + } | |
| 6056 | + } | |
| 6057 | + onUnsubscribe() { | |
| 6058 | + if (!this.hasListeners()) { | |
| 6059 | + this.#currentMutation?.removeObserver(this); | |
| 6060 | + } | |
| 6061 | + } | |
| 6062 | + onMutationUpdate(action) { | |
| 6063 | + this.#updateResult(); | |
| 6064 | + this.#notify(action); | |
| 6065 | + } | |
| 6066 | + getCurrentResult() { | |
| 6067 | + return this.#currentResult; | |
| 6068 | + } | |
| 6069 | + reset() { | |
| 6070 | + this.#currentMutation?.removeObserver(this); | |
| 6071 | + this.#currentMutation = void 0; | |
| 6072 | + this.#updateResult(); | |
| 6073 | + this.#notify(); | |
| 6074 | + } | |
| 6075 | + mutate(variables, options) { | |
| 6076 | + this.#mutateOptions = options; | |
| 6077 | + this.#currentMutation?.removeObserver(this); | |
| 6078 | + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options); | |
| 6079 | + this.#currentMutation.addObserver(this); | |
| 6080 | + return this.#currentMutation.execute(variables); | |
| 6081 | + } | |
| 6082 | + #updateResult() { | |
| 6083 | + const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)(); | |
| 6084 | + this.#currentResult = { | |
| 6085 | + ...state, | |
| 6086 | + isPending: state.status === "pending", | |
| 6087 | + isSuccess: state.status === "success", | |
| 6088 | + isError: state.status === "error", | |
| 6089 | + isIdle: state.status === "idle", | |
| 6090 | + mutate: this.mutate, | |
| 6091 | + reset: this.reset | |
| 6092 | + }; | |
| 6093 | + } | |
| 6094 | + #notify(action) { | |
| 6095 | + import_notifyManager.notifyManager.batch(() => { | |
| 6096 | + if (this.#mutateOptions && this.hasListeners()) { | |
| 6097 | + const variables = this.#currentResult.variables; | |
| 6098 | + const context = this.#currentResult.context; | |
| 6099 | + if (action?.type === "success") { | |
| 6100 | + this.#mutateOptions.onSuccess?.(action.data, variables, context); | |
| 6101 | + this.#mutateOptions.onSettled?.(action.data, null, variables, context); | |
| 6102 | + } else if (action?.type === "error") { | |
| 6103 | + this.#mutateOptions.onError?.(action.error, variables, context); | |
| 6104 | + this.#mutateOptions.onSettled?.( | |
| 6105 | + void 0, | |
| 6106 | + action.error, | |
| 6107 | + variables, | |
| 6108 | + context | |
| 6109 | + ); | |
| 6110 | + } | |
| 6111 | + } | |
| 6112 | + this.listeners.forEach((listener) => { | |
| 6113 | + listener(this.#currentResult); | |
| 6114 | + }); | |
| 6115 | + }); | |
| 6116 | + } | |
| 6117 | +}; | |
| 6118 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6119 | +0 && (0); | |
| 6120 | +//# sourceMappingURL=mutationObserver.cjs.map | |
| 6121 | + | |
| 6122 | +/***/ }), | |
| 6123 | + | |
| 6124 | +/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs": | |
| 6125 | +/*!***************************************************************************!*\ | |
| 6126 | + !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***! | |
| 6127 | + \***************************************************************************/ | |
| 6128 | +/***/ ((module) => { | |
| 6129 | + | |
| 6130 | +"use strict"; | |
| 6131 | + | |
| 6132 | +var __defProp = Object.defineProperty; | |
| 6133 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6134 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6135 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6136 | +var __export = (target, all) => { | |
| 6137 | + for (var name in all) | |
| 6138 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6139 | +}; | |
| 6140 | +var __copyProps = (to, from, except, desc) => { | |
| 6141 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6142 | + for (let key of __getOwnPropNames(from)) | |
| 6143 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6144 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6145 | + } | |
| 6146 | + return to; | |
| 6147 | +}; | |
| 6148 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6149 | + | |
| 6150 | +// src/notifyManager.ts | |
| 6151 | +var notifyManager_exports = {}; | |
| 6152 | +__export(notifyManager_exports, { | |
| 6153 | + createNotifyManager: () => createNotifyManager, | |
| 6154 | + notifyManager: () => notifyManager | |
| 6155 | +}); | |
| 6156 | +module.exports = __toCommonJS(notifyManager_exports); | |
| 6157 | +function createNotifyManager() { | |
| 6158 | + let queue = []; | |
| 6159 | + let transactions = 0; | |
| 6160 | + let notifyFn = (callback) => { | |
| 6161 | + callback(); | |
| 6162 | + }; | |
| 6163 | + let batchNotifyFn = (callback) => { | |
| 6164 | + callback(); | |
| 6165 | + }; | |
| 6166 | + let scheduleFn = (cb) => setTimeout(cb, 0); | |
| 6167 | + const schedule = (callback) => { | |
| 6168 | + if (transactions) { | |
| 6169 | + queue.push(callback); | |
| 6170 | + } else { | |
| 6171 | + scheduleFn(() => { | |
| 6172 | + notifyFn(callback); | |
| 6173 | + }); | |
| 6174 | + } | |
| 6175 | + }; | |
| 6176 | + const flush = () => { | |
| 6177 | + const originalQueue = queue; | |
| 6178 | + queue = []; | |
| 6179 | + if (originalQueue.length) { | |
| 6180 | + scheduleFn(() => { | |
| 6181 | + batchNotifyFn(() => { | |
| 6182 | + originalQueue.forEach((callback) => { | |
| 6183 | + notifyFn(callback); | |
| 6184 | + }); | |
| 6185 | + }); | |
| 6186 | + }); | |
| 6187 | + } | |
| 6188 | + }; | |
| 6189 | + return { | |
| 6190 | + batch: (callback) => { | |
| 6191 | + let result; | |
| 6192 | + transactions++; | |
| 6193 | + try { | |
| 6194 | + result = callback(); | |
| 6195 | + } finally { | |
| 6196 | + transactions--; | |
| 6197 | + if (!transactions) { | |
| 6198 | + flush(); | |
| 6199 | + } | |
| 6200 | + } | |
| 6201 | + return result; | |
| 6202 | + }, | |
| 6203 | + /** | |
| 6204 | + * All calls to the wrapped function will be batched. | |
| 6205 | + */ | |
| 6206 | + batchCalls: (callback) => { | |
| 6207 | + return (...args) => { | |
| 6208 | + schedule(() => { | |
| 6209 | + callback(...args); | |
| 6210 | + }); | |
| 6211 | + }; | |
| 6212 | + }, | |
| 6213 | + schedule, | |
| 6214 | + /** | |
| 6215 | + * Use this method to set a custom notify function. | |
| 6216 | + * This can be used to for example wrap notifications with `React.act` while running tests. | |
| 6217 | + */ | |
| 6218 | + setNotifyFunction: (fn) => { | |
| 6219 | + notifyFn = fn; | |
| 6220 | + }, | |
| 6221 | + /** | |
| 6222 | + * Use this method to set a custom function to batch notifications together into a single tick. | |
| 6223 | + * By default React Query will use the batch function provided by ReactDOM or React Native. | |
| 6224 | + */ | |
| 6225 | + setBatchNotifyFunction: (fn) => { | |
| 6226 | + batchNotifyFn = fn; | |
| 6227 | + }, | |
| 6228 | + setScheduler: (fn) => { | |
| 6229 | + scheduleFn = fn; | |
| 6230 | + } | |
| 6231 | + }; | |
| 6232 | +} | |
| 6233 | +var notifyManager = createNotifyManager(); | |
| 6234 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6235 | +0 && (0); | |
| 6236 | +//# sourceMappingURL=notifyManager.cjs.map | |
| 6237 | + | |
| 6238 | +/***/ }), | |
| 6239 | + | |
| 6240 | +/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs": | |
| 6241 | +/*!***************************************************************************!*\ | |
| 6242 | + !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***! | |
| 6243 | + \***************************************************************************/ | |
| 6244 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6245 | + | |
| 6246 | +"use strict"; | |
| 6247 | + | |
| 6248 | +var __defProp = Object.defineProperty; | |
| 6249 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6250 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6251 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6252 | +var __export = (target, all) => { | |
| 6253 | + for (var name in all) | |
| 6254 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6255 | +}; | |
| 6256 | +var __copyProps = (to, from, except, desc) => { | |
| 6257 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6258 | + for (let key of __getOwnPropNames(from)) | |
| 6259 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6260 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6261 | + } | |
| 6262 | + return to; | |
| 6263 | +}; | |
| 6264 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6265 | + | |
| 6266 | +// src/onlineManager.ts | |
| 6267 | +var onlineManager_exports = {}; | |
| 6268 | +__export(onlineManager_exports, { | |
| 6269 | + OnlineManager: () => OnlineManager, | |
| 6270 | + onlineManager: () => onlineManager | |
| 6271 | +}); | |
| 6272 | +module.exports = __toCommonJS(onlineManager_exports); | |
| 6273 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6274 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6275 | +var OnlineManager = class extends import_subscribable.Subscribable { | |
| 6276 | + #online = true; | |
| 6277 | + #cleanup; | |
| 6278 | + #setup; | |
| 6279 | + constructor() { | |
| 6280 | + super(); | |
| 6281 | + this.#setup = (onOnline) => { | |
| 6282 | + if (!import_utils.isServer && window.addEventListener) { | |
| 6283 | + const onlineListener = () => onOnline(true); | |
| 6284 | + const offlineListener = () => onOnline(false); | |
| 6285 | + window.addEventListener("online", onlineListener, false); | |
| 6286 | + window.addEventListener("offline", offlineListener, false); | |
| 6287 | + return () => { | |
| 6288 | + window.removeEventListener("online", onlineListener); | |
| 6289 | + window.removeEventListener("offline", offlineListener); | |
| 6290 | + }; | |
| 6291 | + } | |
| 6292 | + return; | |
| 6293 | + }; | |
| 6294 | + } | |
| 6295 | + onSubscribe() { | |
| 6296 | + if (!this.#cleanup) { | |
| 6297 | + this.setEventListener(this.#setup); | |
| 6298 | + } | |
| 6299 | + } | |
| 6300 | + onUnsubscribe() { | |
| 6301 | + if (!this.hasListeners()) { | |
| 6302 | + this.#cleanup?.(); | |
| 6303 | + this.#cleanup = void 0; | |
| 6304 | + } | |
| 6305 | + } | |
| 6306 | + setEventListener(setup) { | |
| 6307 | + this.#setup = setup; | |
| 6308 | + this.#cleanup?.(); | |
| 6309 | + this.#cleanup = setup(this.setOnline.bind(this)); | |
| 6310 | + } | |
| 6311 | + setOnline(online) { | |
| 6312 | + const changed = this.#online !== online; | |
| 6313 | + if (changed) { | |
| 6314 | + this.#online = online; | |
| 6315 | + this.listeners.forEach((listener) => { | |
| 6316 | + listener(online); | |
| 6317 | + }); | |
| 6318 | + } | |
| 6319 | + } | |
| 6320 | + isOnline() { | |
| 6321 | + return this.#online; | |
| 6322 | + } | |
| 6323 | +}; | |
| 6324 | +var onlineManager = new OnlineManager(); | |
| 6325 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6326 | +0 && (0); | |
| 6327 | +//# sourceMappingURL=onlineManager.cjs.map | |
| 6328 | + | |
| 6329 | +/***/ }), | |
| 6330 | + | |
| 6331 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs": | |
| 6332 | +/*!*****************************************************************************!*\ | |
| 6333 | + !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***! | |
| 6334 | + \*****************************************************************************/ | |
| 6335 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6336 | + | |
| 6337 | +"use strict"; | |
| 6338 | + | |
| 6339 | +var __defProp = Object.defineProperty; | |
| 6340 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6341 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6342 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6343 | +var __export = (target, all) => { | |
| 6344 | + for (var name in all) | |
| 6345 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6346 | +}; | |
| 6347 | +var __copyProps = (to, from, except, desc) => { | |
| 6348 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6349 | + for (let key of __getOwnPropNames(from)) | |
| 6350 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6351 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6352 | + } | |
| 6353 | + return to; | |
| 6354 | +}; | |
| 6355 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6356 | + | |
| 6357 | +// src/queriesObserver.ts | |
| 6358 | +var queriesObserver_exports = {}; | |
| 6359 | +__export(queriesObserver_exports, { | |
| 6360 | + QueriesObserver: () => QueriesObserver | |
| 6361 | +}); | |
| 6362 | +module.exports = __toCommonJS(queriesObserver_exports); | |
| 6363 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6364 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 6365 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6366 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6367 | +function difference(array1, array2) { | |
| 6368 | + return array1.filter((x) => !array2.includes(x)); | |
| 6369 | +} | |
| 6370 | +function replaceAt(array, index, value) { | |
| 6371 | + const copy = array.slice(0); | |
| 6372 | + copy[index] = value; | |
| 6373 | + return copy; | |
| 6374 | +} | |
| 6375 | +var QueriesObserver = class extends import_subscribable.Subscribable { | |
| 6376 | + #client; | |
| 6377 | + #result; | |
| 6378 | + #queries; | |
| 6379 | + #options; | |
| 6380 | + #observers; | |
| 6381 | + #combinedResult; | |
| 6382 | + #lastCombine; | |
| 6383 | + #lastResult; | |
| 6384 | + constructor(client, queries, options) { | |
| 6385 | + super(); | |
| 6386 | + this.#client = client; | |
| 6387 | + this.#options = options; | |
| 6388 | + this.#queries = []; | |
| 6389 | + this.#observers = []; | |
| 6390 | + this.#result = []; | |
| 6391 | + this.setQueries(queries); | |
| 6392 | + } | |
| 6393 | + onSubscribe() { | |
| 6394 | + if (this.listeners.size === 1) { | |
| 6395 | + this.#observers.forEach((observer) => { | |
| 6396 | + observer.subscribe((result) => { | |
| 6397 | + this.#onUpdate(observer, result); | |
| 6398 | + }); | |
| 6399 | + }); | |
| 6400 | + } | |
| 6401 | + } | |
| 6402 | + onUnsubscribe() { | |
| 6403 | + if (!this.listeners.size) { | |
| 6404 | + this.destroy(); | |
| 6405 | + } | |
| 6406 | + } | |
| 6407 | + destroy() { | |
| 6408 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 6409 | + this.#observers.forEach((observer) => { | |
| 6410 | + observer.destroy(); | |
| 6411 | + }); | |
| 6412 | + } | |
| 6413 | + setQueries(queries, options, notifyOptions) { | |
| 6414 | + this.#queries = queries; | |
| 6415 | + this.#options = options; | |
| 6416 | + if (true) { | |
| 6417 | + const queryHashes = queries.map((query) => query.queryHash); | |
| 6418 | + if (new Set(queryHashes).size !== queryHashes.length) { | |
| 6419 | + console.warn( | |
| 6420 | + "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior." | |
| 6421 | + ); | |
| 6422 | + } | |
| 6423 | + } | |
| 6424 | + import_notifyManager.notifyManager.batch(() => { | |
| 6425 | + const prevObservers = this.#observers; | |
| 6426 | + const newObserverMatches = this.#findMatchingObservers(this.#queries); | |
| 6427 | + newObserverMatches.forEach( | |
| 6428 | + (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions) | |
| 6429 | + ); | |
| 6430 | + const newObservers = newObserverMatches.map((match) => match.observer); | |
| 6431 | + const newResult = newObservers.map( | |
| 6432 | + (observer) => observer.getCurrentResult() | |
| 6433 | + ); | |
| 6434 | + const hasIndexChange = newObservers.some( | |
| 6435 | + (observer, index) => observer !== prevObservers[index] | |
| 6436 | + ); | |
| 6437 | + if (prevObservers.length === newObservers.length && !hasIndexChange) { | |
| 6438 | + return; | |
| 6439 | + } | |
| 6440 | + this.#observers = newObservers; | |
| 6441 | + this.#result = newResult; | |
| 6442 | + if (!this.hasListeners()) { | |
| 6443 | + return; | |
| 6444 | + } | |
| 6445 | + difference(prevObservers, newObservers).forEach((observer) => { | |
| 6446 | + observer.destroy(); | |
| 6447 | + }); | |
| 6448 | + difference(newObservers, prevObservers).forEach((observer) => { | |
| 6449 | + observer.subscribe((result) => { | |
| 6450 | + this.#onUpdate(observer, result); | |
| 6451 | + }); | |
| 6452 | + }); | |
| 6453 | + this.#notify(); | |
| 6454 | + }); | |
| 6455 | + } | |
| 6456 | + getCurrentResult() { | |
| 6457 | + return this.#result; | |
| 6458 | + } | |
| 6459 | + getQueries() { | |
| 6460 | + return this.#observers.map((observer) => observer.getCurrentQuery()); | |
| 6461 | + } | |
| 6462 | + getObservers() { | |
| 6463 | + return this.#observers; | |
| 6464 | + } | |
| 6465 | + getOptimisticResult(queries, combine) { | |
| 6466 | + const matches = this.#findMatchingObservers(queries); | |
| 6467 | + const result = matches.map( | |
| 6468 | + (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions) | |
| 6469 | + ); | |
| 6470 | + return [ | |
| 6471 | + result, | |
| 6472 | + (r) => { | |
| 6473 | + return this.#combineResult(r ?? result, combine); | |
| 6474 | + }, | |
| 6475 | + () => { | |
| 6476 | + return this.#trackResult(result, queries); | |
| 6477 | + } | |
| 6478 | + ]; | |
| 6479 | + } | |
| 6480 | + #trackResult(result, queries) { | |
| 6481 | + const matches = this.#findMatchingObservers(queries); | |
| 6482 | + return matches.map((match, index) => { | |
| 6483 | + const observerResult = result[index]; | |
| 6484 | + return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => { | |
| 6485 | + matches.forEach((m) => { | |
| 6486 | + m.observer.trackProp(accessedProp); | |
| 6487 | + }); | |
| 6488 | + }) : observerResult; | |
| 6489 | + }); | |
| 6490 | + } | |
| 6491 | + #combineResult(input, combine) { | |
| 6492 | + if (combine) { | |
| 6493 | + if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) { | |
| 6494 | + this.#lastCombine = combine; | |
| 6495 | + this.#lastResult = this.#result; | |
| 6496 | + this.#combinedResult = (0, import_utils.replaceEqualDeep)( | |
| 6497 | + this.#combinedResult, | |
| 6498 | + combine(input) | |
| 6499 | + ); | |
| 6500 | + } | |
| 6501 | + return this.#combinedResult; | |
| 6502 | + } | |
| 6503 | + return input; | |
| 6504 | + } | |
| 6505 | + #findMatchingObservers(queries) { | |
| 6506 | + const prevObserversMap = new Map( | |
| 6507 | + this.#observers.map((observer) => [observer.options.queryHash, observer]) | |
| 6508 | + ); | |
| 6509 | + const observers = []; | |
| 6510 | + queries.forEach((options) => { | |
| 6511 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 6512 | + const match = prevObserversMap.get(defaultedOptions.queryHash); | |
| 6513 | + if (match) { | |
| 6514 | + observers.push({ | |
| 6515 | + defaultedQueryOptions: defaultedOptions, | |
| 6516 | + observer: match | |
| 6517 | + }); | |
| 6518 | + } else { | |
| 6519 | + observers.push({ | |
| 6520 | + defaultedQueryOptions: defaultedOptions, | |
| 6521 | + observer: new import_queryObserver.QueryObserver(this.#client, defaultedOptions) | |
| 6522 | + }); | |
| 6523 | + } | |
| 6524 | + }); | |
| 6525 | + return observers; | |
| 6526 | + } | |
| 6527 | + #onUpdate(observer, result) { | |
| 6528 | + const index = this.#observers.indexOf(observer); | |
| 6529 | + if (index !== -1) { | |
| 6530 | + this.#result = replaceAt(this.#result, index, result); | |
| 6531 | + this.#notify(); | |
| 6532 | + } | |
| 6533 | + } | |
| 6534 | + #notify() { | |
| 6535 | + if (this.hasListeners()) { | |
| 6536 | + const previousResult = this.#combinedResult; | |
| 6537 | + const newResult = this.#combineResult( | |
| 6538 | + this.#trackResult(this.#result, this.#queries), | |
| 6539 | + this.#options?.combine | |
| 6540 | + ); | |
| 6541 | + if (previousResult !== newResult) { | |
| 6542 | + import_notifyManager.notifyManager.batch(() => { | |
| 6543 | + this.listeners.forEach((listener) => { | |
| 6544 | + listener(this.#result); | |
| 6545 | + }); | |
| 6546 | + }); | |
| 6547 | + } | |
| 6548 | + } | |
| 6549 | + } | |
| 6550 | +}; | |
| 6551 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6552 | +0 && (0); | |
| 6553 | +//# sourceMappingURL=queriesObserver.cjs.map | |
| 6554 | + | |
| 6555 | +/***/ }), | |
| 6556 | + | |
| 6557 | +/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs": | |
| 6558 | +/*!*******************************************************************!*\ | |
| 6559 | + !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***! | |
| 6560 | + \*******************************************************************/ | |
| 6561 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6562 | + | |
| 6563 | +"use strict"; | |
| 6564 | + | |
| 6565 | +var __defProp = Object.defineProperty; | |
| 6566 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6567 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6568 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6569 | +var __export = (target, all) => { | |
| 6570 | + for (var name in all) | |
| 6571 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6572 | +}; | |
| 6573 | +var __copyProps = (to, from, except, desc) => { | |
| 6574 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6575 | + for (let key of __getOwnPropNames(from)) | |
| 6576 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6577 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6578 | + } | |
| 6579 | + return to; | |
| 6580 | +}; | |
| 6581 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6582 | + | |
| 6583 | +// src/query.ts | |
| 6584 | +var query_exports = {}; | |
| 6585 | +__export(query_exports, { | |
| 6586 | + Query: () => Query, | |
| 6587 | + fetchState: () => fetchState | |
| 6588 | +}); | |
| 6589 | +module.exports = __toCommonJS(query_exports); | |
| 6590 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6591 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6592 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 6593 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 6594 | +var Query = class extends import_removable.Removable { | |
| 6595 | + #initialState; | |
| 6596 | + #revertState; | |
| 6597 | + #cache; | |
| 6598 | + #retryer; | |
| 6599 | + #defaultOptions; | |
| 6600 | + #abortSignalConsumed; | |
| 6601 | + constructor(config) { | |
| 6602 | + super(); | |
| 6603 | + this.#abortSignalConsumed = false; | |
| 6604 | + this.#defaultOptions = config.defaultOptions; | |
| 6605 | + this.setOptions(config.options); | |
| 6606 | + this.observers = []; | |
| 6607 | + this.#cache = config.cache; | |
| 6608 | + this.queryKey = config.queryKey; | |
| 6609 | + this.queryHash = config.queryHash; | |
| 6610 | + this.#initialState = getDefaultState(this.options); | |
| 6611 | + this.state = config.state ?? this.#initialState; | |
| 6612 | + this.scheduleGc(); | |
| 6613 | + } | |
| 6614 | + get meta() { | |
| 6615 | + return this.options.meta; | |
| 6616 | + } | |
| 6617 | + get promise() { | |
| 6618 | + return this.#retryer?.promise; | |
| 6619 | + } | |
| 6620 | + setOptions(options) { | |
| 6621 | + this.options = { ...this.#defaultOptions, ...options }; | |
| 6622 | + this.updateGcTime(this.options.gcTime); | |
| 6623 | + } | |
| 6624 | + optionalRemove() { | |
| 6625 | + if (!this.observers.length && this.state.fetchStatus === "idle") { | |
| 6626 | + this.#cache.remove(this); | |
| 6627 | + } | |
| 6628 | + } | |
| 6629 | + setData(newData, options) { | |
| 6630 | + const data = (0, import_utils.replaceData)(this.state.data, newData, this.options); | |
| 6631 | + this.#dispatch({ | |
| 6632 | + data, | |
| 6633 | + type: "success", | |
| 6634 | + dataUpdatedAt: options?.updatedAt, | |
| 6635 | + manual: options?.manual | |
| 6636 | + }); | |
| 6637 | + return data; | |
| 6638 | + } | |
| 6639 | + setState(state, setStateOptions) { | |
| 6640 | + this.#dispatch({ type: "setState", state, setStateOptions }); | |
| 6641 | + } | |
| 6642 | + cancel(options) { | |
| 6643 | + const promise = this.#retryer?.promise; | |
| 6644 | + this.#retryer?.cancel(options); | |
| 6645 | + return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve(); | |
| 6646 | + } | |
| 6647 | + destroy() { | |
| 6648 | + super.destroy(); | |
| 6649 | + this.cancel({ silent: true }); | |
| 6650 | + } | |
| 6651 | + reset() { | |
| 6652 | + this.destroy(); | |
| 6653 | + this.setState(this.#initialState); | |
| 6654 | + } | |
| 6655 | + isActive() { | |
| 6656 | + return this.observers.some( | |
| 6657 | + (observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false | |
| 6658 | + ); | |
| 6659 | + } | |
| 6660 | + isDisabled() { | |
| 6661 | + if (this.getObserversCount() > 0) { | |
| 6662 | + return !this.isActive(); | |
| 6663 | + } | |
| 6664 | + return this.options.queryFn === import_utils.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0; | |
| 6665 | + } | |
| 6666 | + isStale() { | |
| 6667 | + if (this.state.isInvalidated) { | |
| 6668 | + return true; | |
| 6669 | + } | |
| 6670 | + if (this.getObserversCount() > 0) { | |
| 6671 | + return this.observers.some( | |
| 6672 | + (observer) => observer.getCurrentResult().isStale | |
| 6673 | + ); | |
| 6674 | + } | |
| 6675 | + return this.state.data === void 0; | |
| 6676 | + } | |
| 6677 | + isStaleByTime(staleTime = 0) { | |
| 6678 | + return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime); | |
| 6679 | + } | |
| 6680 | + onFocus() { | |
| 6681 | + const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus()); | |
| 6682 | + observer?.refetch({ cancelRefetch: false }); | |
| 6683 | + this.#retryer?.continue(); | |
| 6684 | + } | |
| 6685 | + onOnline() { | |
| 6686 | + const observer = this.observers.find((x) => x.shouldFetchOnReconnect()); | |
| 6687 | + observer?.refetch({ cancelRefetch: false }); | |
| 6688 | + this.#retryer?.continue(); | |
| 6689 | + } | |
| 6690 | + addObserver(observer) { | |
| 6691 | + if (!this.observers.includes(observer)) { | |
| 6692 | + this.observers.push(observer); | |
| 6693 | + this.clearGcTimeout(); | |
| 6694 | + this.#cache.notify({ type: "observerAdded", query: this, observer }); | |
| 6695 | + } | |
| 6696 | + } | |
| 6697 | + removeObserver(observer) { | |
| 6698 | + if (this.observers.includes(observer)) { | |
| 6699 | + this.observers = this.observers.filter((x) => x !== observer); | |
| 6700 | + if (!this.observers.length) { | |
| 6701 | + if (this.#retryer) { | |
| 6702 | + if (this.#abortSignalConsumed) { | |
| 6703 | + this.#retryer.cancel({ revert: true }); | |
| 6704 | + } else { | |
| 6705 | + this.#retryer.cancelRetry(); | |
| 6706 | + } | |
| 6707 | + } | |
| 6708 | + this.scheduleGc(); | |
| 6709 | + } | |
| 6710 | + this.#cache.notify({ type: "observerRemoved", query: this, observer }); | |
| 6711 | + } | |
| 6712 | + } | |
| 6713 | + getObserversCount() { | |
| 6714 | + return this.observers.length; | |
| 6715 | + } | |
| 6716 | + invalidate() { | |
| 6717 | + if (!this.state.isInvalidated) { | |
| 6718 | + this.#dispatch({ type: "invalidate" }); | |
| 6719 | + } | |
| 6720 | + } | |
| 6721 | + fetch(options, fetchOptions) { | |
| 6722 | + if (this.state.fetchStatus !== "idle") { | |
| 6723 | + if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) { | |
| 6724 | + this.cancel({ silent: true }); | |
| 6725 | + } else if (this.#retryer) { | |
| 6726 | + this.#retryer.continueRetry(); | |
| 6727 | + return this.#retryer.promise; | |
| 6728 | + } | |
| 6729 | + } | |
| 6730 | + if (options) { | |
| 6731 | + this.setOptions(options); | |
| 6732 | + } | |
| 6733 | + if (!this.options.queryFn) { | |
| 6734 | + const observer = this.observers.find((x) => x.options.queryFn); | |
| 6735 | + if (observer) { | |
| 6736 | + this.setOptions(observer.options); | |
| 6737 | + } | |
| 6738 | + } | |
| 6739 | + if (true) { | |
| 6740 | + if (!Array.isArray(this.options.queryKey)) { | |
| 6741 | + console.error( | |
| 6742 | + `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']` | |
| 6743 | + ); | |
| 6744 | + } | |
| 6745 | + } | |
| 6746 | + const abortController = new AbortController(); | |
| 6747 | + const addSignalProperty = (object) => { | |
| 6748 | + Object.defineProperty(object, "signal", { | |
| 6749 | + enumerable: true, | |
| 6750 | + get: () => { | |
| 6751 | + this.#abortSignalConsumed = true; | |
| 6752 | + return abortController.signal; | |
| 6753 | + } | |
| 6754 | + }); | |
| 6755 | + }; | |
| 6756 | + const fetchFn = () => { | |
| 6757 | + const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions); | |
| 6758 | + const queryFnContext = { | |
| 6759 | + queryKey: this.queryKey, | |
| 6760 | + meta: this.meta | |
| 6761 | + }; | |
| 6762 | + addSignalProperty(queryFnContext); | |
| 6763 | + this.#abortSignalConsumed = false; | |
| 6764 | + if (this.options.persister) { | |
| 6765 | + return this.options.persister( | |
| 6766 | + queryFn, | |
| 6767 | + queryFnContext, | |
| 6768 | + this | |
| 6769 | + ); | |
| 6770 | + } | |
| 6771 | + return queryFn(queryFnContext); | |
| 6772 | + }; | |
| 6773 | + const context = { | |
| 6774 | + fetchOptions, | |
| 6775 | + options: this.options, | |
| 6776 | + queryKey: this.queryKey, | |
| 6777 | + state: this.state, | |
| 6778 | + fetchFn | |
| 6779 | + }; | |
| 6780 | + addSignalProperty(context); | |
| 6781 | + this.options.behavior?.onFetch( | |
| 6782 | + context, | |
| 6783 | + this | |
| 6784 | + ); | |
| 6785 | + this.#revertState = this.state; | |
| 6786 | + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) { | |
| 6787 | + this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta }); | |
| 6788 | + } | |
| 6789 | + const onError = (error) => { | |
| 6790 | + if (!((0, import_retryer.isCancelledError)(error) && error.silent)) { | |
| 6791 | + this.#dispatch({ | |
| 6792 | + type: "error", | |
| 6793 | + error | |
| 6794 | + }); | |
| 6795 | + } | |
| 6796 | + if (!(0, import_retryer.isCancelledError)(error)) { | |
| 6797 | + this.#cache.config.onError?.( | |
| 6798 | + error, | |
| 6799 | + this | |
| 6800 | + ); | |
| 6801 | + this.#cache.config.onSettled?.( | |
| 6802 | + this.state.data, | |
| 6803 | + error, | |
| 6804 | + this | |
| 6805 | + ); | |
| 6806 | + } | |
| 6807 | + this.scheduleGc(); | |
| 6808 | + }; | |
| 6809 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 6810 | + initialPromise: fetchOptions?.initialPromise, | |
| 6811 | + fn: context.fetchFn, | |
| 6812 | + abort: abortController.abort.bind(abortController), | |
| 6813 | + onSuccess: (data) => { | |
| 6814 | + if (data === void 0) { | |
| 6815 | + if (true) { | |
| 6816 | + console.error( | |
| 6817 | + `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}` | |
| 6818 | + ); | |
| 6819 | + } | |
| 6820 | + onError(new Error(`${this.queryHash} data is undefined`)); | |
| 6821 | + return; | |
| 6822 | + } | |
| 6823 | + try { | |
| 6824 | + this.setData(data); | |
| 6825 | + } catch (error) { | |
| 6826 | + onError(error); | |
| 6827 | + return; | |
| 6828 | + } | |
| 6829 | + this.#cache.config.onSuccess?.(data, this); | |
| 6830 | + this.#cache.config.onSettled?.( | |
| 6831 | + data, | |
| 6832 | + this.state.error, | |
| 6833 | + this | |
| 6834 | + ); | |
| 6835 | + this.scheduleGc(); | |
| 6836 | + }, | |
| 6837 | + onError, | |
| 6838 | + onFail: (failureCount, error) => { | |
| 6839 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 6840 | + }, | |
| 6841 | + onPause: () => { | |
| 6842 | + this.#dispatch({ type: "pause" }); | |
| 6843 | + }, | |
| 6844 | + onContinue: () => { | |
| 6845 | + this.#dispatch({ type: "continue" }); | |
| 6846 | + }, | |
| 6847 | + retry: context.options.retry, | |
| 6848 | + retryDelay: context.options.retryDelay, | |
| 6849 | + networkMode: context.options.networkMode, | |
| 6850 | + canRun: () => true | |
| 6851 | + }); | |
| 6852 | + return this.#retryer.start(); | |
| 6853 | + } | |
| 6854 | + #dispatch(action) { | |
| 6855 | + const reducer = (state) => { | |
| 6856 | + switch (action.type) { | |
| 6857 | + case "failed": | |
| 6858 | + return { | |
| 6859 | + ...state, | |
| 6860 | + fetchFailureCount: action.failureCount, | |
| 6861 | + fetchFailureReason: action.error | |
| 6862 | + }; | |
| 6863 | + case "pause": | |
| 6864 | + return { | |
| 6865 | + ...state, | |
| 6866 | + fetchStatus: "paused" | |
| 6867 | + }; | |
| 6868 | + case "continue": | |
| 6869 | + return { | |
| 6870 | + ...state, | |
| 6871 | + fetchStatus: "fetching" | |
| 6872 | + }; | |
| 6873 | + case "fetch": | |
| 6874 | + return { | |
| 6875 | + ...state, | |
| 6876 | + ...fetchState(state.data, this.options), | |
| 6877 | + fetchMeta: action.meta ?? null | |
| 6878 | + }; | |
| 6879 | + case "success": | |
| 6880 | + return { | |
| 6881 | + ...state, | |
| 6882 | + data: action.data, | |
| 6883 | + dataUpdateCount: state.dataUpdateCount + 1, | |
| 6884 | + dataUpdatedAt: action.dataUpdatedAt ?? Date.now(), | |
| 6885 | + error: null, | |
| 6886 | + isInvalidated: false, | |
| 6887 | + status: "success", | |
| 6888 | + ...!action.manual && { | |
| 6889 | + fetchStatus: "idle", | |
| 6890 | + fetchFailureCount: 0, | |
| 6891 | + fetchFailureReason: null | |
| 6892 | + } | |
| 6893 | + }; | |
| 6894 | + case "error": | |
| 6895 | + const error = action.error; | |
| 6896 | + if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) { | |
| 6897 | + return { ...this.#revertState, fetchStatus: "idle" }; | |
| 6898 | + } | |
| 6899 | + return { | |
| 6900 | + ...state, | |
| 6901 | + error, | |
| 6902 | + errorUpdateCount: state.errorUpdateCount + 1, | |
| 6903 | + errorUpdatedAt: Date.now(), | |
| 6904 | + fetchFailureCount: state.fetchFailureCount + 1, | |
| 6905 | + fetchFailureReason: error, | |
| 6906 | + fetchStatus: "idle", | |
| 6907 | + status: "error" | |
| 6908 | + }; | |
| 6909 | + case "invalidate": | |
| 6910 | + return { | |
| 6911 | + ...state, | |
| 6912 | + isInvalidated: true | |
| 6913 | + }; | |
| 6914 | + case "setState": | |
| 6915 | + return { | |
| 6916 | + ...state, | |
| 6917 | + ...action.state | |
| 6918 | + }; | |
| 6919 | + } | |
| 6920 | + }; | |
| 6921 | + this.state = reducer(this.state); | |
| 6922 | + import_notifyManager.notifyManager.batch(() => { | |
| 6923 | + this.observers.forEach((observer) => { | |
| 6924 | + observer.onQueryUpdate(); | |
| 6925 | + }); | |
| 6926 | + this.#cache.notify({ query: this, type: "updated", action }); | |
| 6927 | + }); | |
| 6928 | + } | |
| 6929 | +}; | |
| 6930 | +function fetchState(data, options) { | |
| 6931 | + return { | |
| 6932 | + fetchFailureCount: 0, | |
| 6933 | + fetchFailureReason: null, | |
| 6934 | + fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused", | |
| 6935 | + ...data === void 0 && { | |
| 6936 | + error: null, | |
| 6937 | + status: "pending" | |
| 6938 | + } | |
| 6939 | + }; | |
| 6940 | +} | |
| 6941 | +function getDefaultState(options) { | |
| 6942 | + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData; | |
| 6943 | + const hasData = data !== void 0; | |
| 6944 | + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0; | |
| 6945 | + return { | |
| 6946 | + data, | |
| 6947 | + dataUpdateCount: 0, | |
| 6948 | + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0, | |
| 6949 | + error: null, | |
| 6950 | + errorUpdateCount: 0, | |
| 6951 | + errorUpdatedAt: 0, | |
| 6952 | + fetchFailureCount: 0, | |
| 6953 | + fetchFailureReason: null, | |
| 6954 | + fetchMeta: null, | |
| 6955 | + isInvalidated: false, | |
| 6956 | + status: hasData ? "success" : "pending", | |
| 6957 | + fetchStatus: "idle" | |
| 6958 | + }; | |
| 6959 | +} | |
| 6960 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6961 | +0 && (0); | |
| 6962 | +//# sourceMappingURL=query.cjs.map | |
| 6963 | + | |
| 6964 | +/***/ }), | |
| 6965 | + | |
| 6966 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs": | |
| 6967 | +/*!************************************************************************!*\ | |
| 6968 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***! | |
| 6969 | + \************************************************************************/ | |
| 6970 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6971 | + | |
| 6972 | +"use strict"; | |
| 6973 | + | |
| 6974 | +var __defProp = Object.defineProperty; | |
| 6975 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6976 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6977 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6978 | +var __export = (target, all) => { | |
| 6979 | + for (var name in all) | |
| 6980 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6981 | +}; | |
| 6982 | +var __copyProps = (to, from, except, desc) => { | |
| 6983 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6984 | + for (let key of __getOwnPropNames(from)) | |
| 6985 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6986 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6987 | + } | |
| 6988 | + return to; | |
| 6989 | +}; | |
| 6990 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6991 | + | |
| 6992 | +// src/queryCache.ts | |
| 6993 | +var queryCache_exports = {}; | |
| 6994 | +__export(queryCache_exports, { | |
| 6995 | + QueryCache: () => QueryCache | |
| 6996 | +}); | |
| 6997 | +module.exports = __toCommonJS(queryCache_exports); | |
| 6998 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6999 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 7000 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 7001 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 7002 | +var QueryCache = class extends import_subscribable.Subscribable { | |
| 7003 | + constructor(config = {}) { | |
| 7004 | + super(); | |
| 7005 | + this.config = config; | |
| 7006 | + this.#queries = /* @__PURE__ */ new Map(); | |
| 7007 | + } | |
| 7008 | + #queries; | |
| 7009 | + build(client, options, state) { | |
| 7010 | + const queryKey = options.queryKey; | |
| 7011 | + const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options); | |
| 7012 | + let query = this.get(queryHash); | |
| 7013 | + if (!query) { | |
| 7014 | + query = new import_query.Query({ | |
| 7015 | + cache: this, | |
| 7016 | + queryKey, | |
| 7017 | + queryHash, | |
| 7018 | + options: client.defaultQueryOptions(options), | |
| 7019 | + state, | |
| 7020 | + defaultOptions: client.getQueryDefaults(queryKey) | |
| 7021 | + }); | |
| 7022 | + this.add(query); | |
| 7023 | + } | |
| 7024 | + return query; | |
| 7025 | + } | |
| 7026 | + add(query) { | |
| 7027 | + if (!this.#queries.has(query.queryHash)) { | |
| 7028 | + this.#queries.set(query.queryHash, query); | |
| 7029 | + this.notify({ | |
| 7030 | + type: "added", | |
| 7031 | + query | |
| 7032 | + }); | |
| 7033 | + } | |
| 7034 | + } | |
| 7035 | + remove(query) { | |
| 7036 | + const queryInMap = this.#queries.get(query.queryHash); | |
| 7037 | + if (queryInMap) { | |
| 7038 | + query.destroy(); | |
| 7039 | + if (queryInMap === query) { | |
| 7040 | + this.#queries.delete(query.queryHash); | |
| 7041 | + } | |
| 7042 | + this.notify({ type: "removed", query }); | |
| 7043 | + } | |
| 7044 | + } | |
| 7045 | + clear() { | |
| 7046 | + import_notifyManager.notifyManager.batch(() => { | |
| 7047 | + this.getAll().forEach((query) => { | |
| 7048 | + this.remove(query); | |
| 7049 | + }); | |
| 7050 | + }); | |
| 7051 | + } | |
| 7052 | + get(queryHash) { | |
| 7053 | + return this.#queries.get(queryHash); | |
| 7054 | + } | |
| 7055 | + getAll() { | |
| 7056 | + return [...this.#queries.values()]; | |
| 7057 | + } | |
| 7058 | + find(filters) { | |
| 7059 | + const defaultedFilters = { exact: true, ...filters }; | |
| 7060 | + return this.getAll().find( | |
| 7061 | + (query) => (0, import_utils.matchQuery)(defaultedFilters, query) | |
| 7062 | + ); | |
| 7063 | + } | |
| 7064 | + findAll(filters = {}) { | |
| 7065 | + const queries = this.getAll(); | |
| 7066 | + return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries; | |
| 7067 | + } | |
| 7068 | + notify(event) { | |
| 7069 | + import_notifyManager.notifyManager.batch(() => { | |
| 7070 | + this.listeners.forEach((listener) => { | |
| 7071 | + listener(event); | |
| 7072 | + }); | |
| 7073 | + }); | |
| 7074 | + } | |
| 7075 | + onFocus() { | |
| 7076 | + import_notifyManager.notifyManager.batch(() => { | |
| 7077 | + this.getAll().forEach((query) => { | |
| 7078 | + query.onFocus(); | |
| 7079 | + }); | |
| 7080 | + }); | |
| 7081 | + } | |
| 7082 | + onOnline() { | |
| 7083 | + import_notifyManager.notifyManager.batch(() => { | |
| 7084 | + this.getAll().forEach((query) => { | |
| 7085 | + query.onOnline(); | |
| 7086 | + }); | |
| 7087 | + }); | |
| 7088 | + } | |
| 7089 | +}; | |
| 7090 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7091 | +0 && (0); | |
| 7092 | +//# sourceMappingURL=queryCache.cjs.map | |
| 7093 | + | |
| 7094 | +/***/ }), | |
| 7095 | + | |
| 7096 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs": | |
| 7097 | +/*!*************************************************************************!*\ | |
| 7098 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***! | |
| 7099 | + \*************************************************************************/ | |
| 7100 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7101 | + | |
| 7102 | +"use strict"; | |
| 7103 | + | |
| 7104 | +var __defProp = Object.defineProperty; | |
| 7105 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7106 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7107 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7108 | +var __export = (target, all) => { | |
| 7109 | + for (var name in all) | |
| 7110 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7111 | +}; | |
| 7112 | +var __copyProps = (to, from, except, desc) => { | |
| 7113 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7114 | + for (let key of __getOwnPropNames(from)) | |
| 7115 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7116 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7117 | + } | |
| 7118 | + return to; | |
| 7119 | +}; | |
| 7120 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7121 | + | |
| 7122 | +// src/queryClient.ts | |
| 7123 | +var queryClient_exports = {}; | |
| 7124 | +__export(queryClient_exports, { | |
| 7125 | + QueryClient: () => QueryClient | |
| 7126 | +}); | |
| 7127 | +module.exports = __toCommonJS(queryClient_exports); | |
| 7128 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7129 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 7130 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 7131 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 7132 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 7133 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 7134 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 7135 | +var QueryClient = class { | |
| 7136 | + #queryCache; | |
| 7137 | + #mutationCache; | |
| 7138 | + #defaultOptions; | |
| 7139 | + #queryDefaults; | |
| 7140 | + #mutationDefaults; | |
| 7141 | + #mountCount; | |
| 7142 | + #unsubscribeFocus; | |
| 7143 | + #unsubscribeOnline; | |
| 7144 | + constructor(config = {}) { | |
| 7145 | + this.#queryCache = config.queryCache || new import_queryCache.QueryCache(); | |
| 7146 | + this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache(); | |
| 7147 | + this.#defaultOptions = config.defaultOptions || {}; | |
| 7148 | + this.#queryDefaults = /* @__PURE__ */ new Map(); | |
| 7149 | + this.#mutationDefaults = /* @__PURE__ */ new Map(); | |
| 7150 | + this.#mountCount = 0; | |
| 7151 | + } | |
| 7152 | + mount() { | |
| 7153 | + this.#mountCount++; | |
| 7154 | + if (this.#mountCount !== 1) | |
| 7155 | + return; | |
| 7156 | + this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(async (focused) => { | |
| 7157 | + if (focused) { | |
| 7158 | + await this.resumePausedMutations(); | |
| 7159 | + this.#queryCache.onFocus(); | |
| 7160 | + } | |
| 7161 | + }); | |
| 7162 | + this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => { | |
| 7163 | + if (online) { | |
| 7164 | + await this.resumePausedMutations(); | |
| 7165 | + this.#queryCache.onOnline(); | |
| 7166 | + } | |
| 7167 | + }); | |
| 7168 | + } | |
| 7169 | + unmount() { | |
| 7170 | + this.#mountCount--; | |
| 7171 | + if (this.#mountCount !== 0) | |
| 7172 | + return; | |
| 7173 | + this.#unsubscribeFocus?.(); | |
| 7174 | + this.#unsubscribeFocus = void 0; | |
| 7175 | + this.#unsubscribeOnline?.(); | |
| 7176 | + this.#unsubscribeOnline = void 0; | |
| 7177 | + } | |
| 7178 | + isFetching(filters) { | |
| 7179 | + return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length; | |
| 7180 | + } | |
| 7181 | + isMutating(filters) { | |
| 7182 | + return this.#mutationCache.findAll({ ...filters, status: "pending" }).length; | |
| 7183 | + } | |
| 7184 | + getQueryData(queryKey) { | |
| 7185 | + const options = this.defaultQueryOptions({ queryKey }); | |
| 7186 | + return this.#queryCache.get(options.queryHash)?.state.data; | |
| 7187 | + } | |
| 7188 | + ensureQueryData(options) { | |
| 7189 | + const defaultedOptions = this.defaultQueryOptions(options); | |
| 7190 | + const query = this.#queryCache.build(this, defaultedOptions); | |
| 7191 | + const cachedData = query.state.data; | |
| 7192 | + if (cachedData === void 0) { | |
| 7193 | + return this.fetchQuery(options); | |
| 7194 | + } | |
| 7195 | + if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) { | |
| 7196 | + void this.prefetchQuery(defaultedOptions); | |
| 7197 | + } | |
| 7198 | + return Promise.resolve(cachedData); | |
| 7199 | + } | |
| 7200 | + getQueriesData(filters) { | |
| 7201 | + return this.#queryCache.findAll(filters).map(({ queryKey, state }) => { | |
| 7202 | + const data = state.data; | |
| 7203 | + return [queryKey, data]; | |
| 7204 | + }); | |
| 7205 | + } | |
| 7206 | + setQueryData(queryKey, updater, options) { | |
| 7207 | + const defaultedOptions = this.defaultQueryOptions({ queryKey }); | |
| 7208 | + const query = this.#queryCache.get( | |
| 7209 | + defaultedOptions.queryHash | |
| 7210 | + ); | |
| 7211 | + const prevData = query?.state.data; | |
| 7212 | + const data = (0, import_utils.functionalUpdate)(updater, prevData); | |
| 7213 | + if (data === void 0) { | |
| 7214 | + return void 0; | |
| 7215 | + } | |
| 7216 | + return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true }); | |
| 7217 | + } | |
| 7218 | + setQueriesData(filters, updater, options) { | |
| 7219 | + return import_notifyManager.notifyManager.batch( | |
| 7220 | + () => this.#queryCache.findAll(filters).map(({ queryKey }) => [ | |
| 7221 | + queryKey, | |
| 7222 | + this.setQueryData(queryKey, updater, options) | |
| 7223 | + ]) | |
| 7224 | + ); | |
| 7225 | + } | |
| 7226 | + getQueryState(queryKey) { | |
| 7227 | + const options = this.defaultQueryOptions({ queryKey }); | |
| 7228 | + return this.#queryCache.get( | |
| 7229 | + options.queryHash | |
| 7230 | + )?.state; | |
| 7231 | + } | |
| 7232 | + removeQueries(filters) { | |
| 7233 | + const queryCache = this.#queryCache; | |
| 7234 | + import_notifyManager.notifyManager.batch(() => { | |
| 7235 | + queryCache.findAll(filters).forEach((query) => { | |
| 7236 | + queryCache.remove(query); | |
| 7237 | + }); | |
| 7238 | + }); | |
| 7239 | + } | |
| 7240 | + resetQueries(filters, options) { | |
| 7241 | + const queryCache = this.#queryCache; | |
| 7242 | + const refetchFilters = { | |
| 7243 | + type: "active", | |
| 7244 | + ...filters | |
| 7245 | + }; | |
| 7246 | + return import_notifyManager.notifyManager.batch(() => { | |
| 7247 | + queryCache.findAll(filters).forEach((query) => { | |
| 7248 | + query.reset(); | |
| 7249 | + }); | |
| 7250 | + return this.refetchQueries(refetchFilters, options); | |
| 7251 | + }); | |
| 7252 | + } | |
| 7253 | + cancelQueries(filters, cancelOptions = {}) { | |
| 7254 | + const defaultedCancelOptions = { revert: true, ...cancelOptions }; | |
| 7255 | + const promises = import_notifyManager.notifyManager.batch( | |
| 7256 | + () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)) | |
| 7257 | + ); | |
| 7258 | + return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop); | |
| 7259 | + } | |
| 7260 | + invalidateQueries(filters, options = {}) { | |
| 7261 | + return import_notifyManager.notifyManager.batch(() => { | |
| 7262 | + this.#queryCache.findAll(filters).forEach((query) => { | |
| 7263 | + query.invalidate(); | |
| 7264 | + }); | |
| 7265 | + if (filters?.refetchType === "none") { | |
| 7266 | + return Promise.resolve(); | |
| 7267 | + } | |
| 7268 | + const refetchFilters = { | |
| 7269 | + ...filters, | |
| 7270 | + type: filters?.refetchType ?? filters?.type ?? "active" | |
| 7271 | + }; | |
| 7272 | + return this.refetchQueries(refetchFilters, options); | |
| 7273 | + }); | |
| 7274 | + } | |
| 7275 | + refetchQueries(filters, options = {}) { | |
| 7276 | + const fetchOptions = { | |
| 7277 | + ...options, | |
| 7278 | + cancelRefetch: options.cancelRefetch ?? true | |
| 7279 | + }; | |
| 7280 | + const promises = import_notifyManager.notifyManager.batch( | |
| 7281 | + () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => { | |
| 7282 | + let promise = query.fetch(void 0, fetchOptions); | |
| 7283 | + if (!fetchOptions.throwOnError) { | |
| 7284 | + promise = promise.catch(import_utils.noop); | |
| 7285 | + } | |
| 7286 | + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise; | |
| 7287 | + }) | |
| 7288 | + ); | |
| 7289 | + return Promise.all(promises).then(import_utils.noop); | |
| 7290 | + } | |
| 7291 | + fetchQuery(options) { | |
| 7292 | + const defaultedOptions = this.defaultQueryOptions(options); | |
| 7293 | + if (defaultedOptions.retry === void 0) { | |
| 7294 | + defaultedOptions.retry = false; | |
| 7295 | + } | |
| 7296 | + const query = this.#queryCache.build(this, defaultedOptions); | |
| 7297 | + return query.isStaleByTime( | |
| 7298 | + (0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query) | |
| 7299 | + ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data); | |
| 7300 | + } | |
| 7301 | + prefetchQuery(options) { | |
| 7302 | + return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 7303 | + } | |
| 7304 | + fetchInfiniteQuery(options) { | |
| 7305 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages); | |
| 7306 | + return this.fetchQuery(options); | |
| 7307 | + } | |
| 7308 | + prefetchInfiniteQuery(options) { | |
| 7309 | + return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 7310 | + } | |
| 7311 | + ensureInfiniteQueryData(options) { | |
| 7312 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages); | |
| 7313 | + return this.ensureQueryData(options); | |
| 7314 | + } | |
| 7315 | + resumePausedMutations() { | |
| 7316 | + if (import_onlineManager.onlineManager.isOnline()) { | |
| 7317 | + return this.#mutationCache.resumePausedMutations(); | |
| 7318 | + } | |
| 7319 | + return Promise.resolve(); | |
| 7320 | + } | |
| 7321 | + getQueryCache() { | |
| 7322 | + return this.#queryCache; | |
| 7323 | + } | |
| 7324 | + getMutationCache() { | |
| 7325 | + return this.#mutationCache; | |
| 7326 | + } | |
| 7327 | + getDefaultOptions() { | |
| 7328 | + return this.#defaultOptions; | |
| 7329 | + } | |
| 7330 | + setDefaultOptions(options) { | |
| 7331 | + this.#defaultOptions = options; | |
| 7332 | + } | |
| 7333 | + setQueryDefaults(queryKey, options) { | |
| 7334 | + this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), { | |
| 7335 | + queryKey, | |
| 7336 | + defaultOptions: options | |
| 7337 | + }); | |
| 7338 | + } | |
| 7339 | + getQueryDefaults(queryKey) { | |
| 7340 | + const defaults = [...this.#queryDefaults.values()]; | |
| 7341 | + const result = {}; | |
| 7342 | + defaults.forEach((queryDefault) => { | |
| 7343 | + if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) { | |
| 7344 | + Object.assign(result, queryDefault.defaultOptions); | |
| 7345 | + } | |
| 7346 | + }); | |
| 7347 | + return result; | |
| 7348 | + } | |
| 7349 | + setMutationDefaults(mutationKey, options) { | |
| 7350 | + this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), { | |
| 7351 | + mutationKey, | |
| 7352 | + defaultOptions: options | |
| 7353 | + }); | |
| 7354 | + } | |
| 7355 | + getMutationDefaults(mutationKey) { | |
| 7356 | + const defaults = [...this.#mutationDefaults.values()]; | |
| 7357 | + let result = {}; | |
| 7358 | + defaults.forEach((queryDefault) => { | |
| 7359 | + if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) { | |
| 7360 | + result = { ...result, ...queryDefault.defaultOptions }; | |
| 7361 | + } | |
| 7362 | + }); | |
| 7363 | + return result; | |
| 7364 | + } | |
| 7365 | + defaultQueryOptions(options) { | |
| 7366 | + if (options._defaulted) { | |
| 7367 | + return options; | |
| 7368 | + } | |
| 7369 | + const defaultedOptions = { | |
| 7370 | + ...this.#defaultOptions.queries, | |
| 7371 | + ...this.getQueryDefaults(options.queryKey), | |
| 7372 | + ...options, | |
| 7373 | + _defaulted: true | |
| 7374 | + }; | |
| 7375 | + if (!defaultedOptions.queryHash) { | |
| 7376 | + defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)( | |
| 7377 | + defaultedOptions.queryKey, | |
| 7378 | + defaultedOptions | |
| 7379 | + ); | |
| 7380 | + } | |
| 7381 | + if (defaultedOptions.refetchOnReconnect === void 0) { | |
| 7382 | + defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always"; | |
| 7383 | + } | |
| 7384 | + if (defaultedOptions.throwOnError === void 0) { | |
| 7385 | + defaultedOptions.throwOnError = !!defaultedOptions.suspense; | |
| 7386 | + } | |
| 7387 | + if (!defaultedOptions.networkMode && defaultedOptions.persister) { | |
| 7388 | + defaultedOptions.networkMode = "offlineFirst"; | |
| 7389 | + } | |
| 7390 | + if (defaultedOptions.queryFn === import_utils.skipToken) { | |
| 7391 | + defaultedOptions.enabled = false; | |
| 7392 | + } | |
| 7393 | + return defaultedOptions; | |
| 7394 | + } | |
| 7395 | + defaultMutationOptions(options) { | |
| 7396 | + if (options?._defaulted) { | |
| 7397 | + return options; | |
| 7398 | + } | |
| 7399 | + return { | |
| 7400 | + ...this.#defaultOptions.mutations, | |
| 7401 | + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey), | |
| 7402 | + ...options, | |
| 7403 | + _defaulted: true | |
| 7404 | + }; | |
| 7405 | + } | |
| 7406 | + clear() { | |
| 7407 | + this.#queryCache.clear(); | |
| 7408 | + this.#mutationCache.clear(); | |
| 7409 | + } | |
| 7410 | +}; | |
| 7411 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7412 | +0 && (0); | |
| 7413 | +//# sourceMappingURL=queryClient.cjs.map | |
| 7414 | + | |
| 7415 | +/***/ }), | |
| 7416 | + | |
| 7417 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs": | |
| 7418 | +/*!***************************************************************************!*\ | |
| 7419 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***! | |
| 7420 | + \***************************************************************************/ | |
| 7421 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7422 | + | |
| 7423 | +"use strict"; | |
| 7424 | + | |
| 7425 | +var __defProp = Object.defineProperty; | |
| 7426 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7427 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7428 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7429 | +var __export = (target, all) => { | |
| 7430 | + for (var name in all) | |
| 7431 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7432 | +}; | |
| 7433 | +var __copyProps = (to, from, except, desc) => { | |
| 7434 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7435 | + for (let key of __getOwnPropNames(from)) | |
| 7436 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7437 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7438 | + } | |
| 7439 | + return to; | |
| 7440 | +}; | |
| 7441 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7442 | + | |
| 7443 | +// src/queryObserver.ts | |
| 7444 | +var queryObserver_exports = {}; | |
| 7445 | +__export(queryObserver_exports, { | |
| 7446 | + QueryObserver: () => QueryObserver | |
| 7447 | +}); | |
| 7448 | +module.exports = __toCommonJS(queryObserver_exports); | |
| 7449 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 7450 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 7451 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 7452 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 7453 | +var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs"); | |
| 7454 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7455 | +var QueryObserver = class extends import_subscribable.Subscribable { | |
| 7456 | + constructor(client, options) { | |
| 7457 | + super(); | |
| 7458 | + this.options = options; | |
| 7459 | + this.#client = client; | |
| 7460 | + this.#selectError = null; | |
| 7461 | + this.#currentThenable = (0, import_thenable.pendingThenable)(); | |
| 7462 | + if (!this.options.experimental_prefetchInRender) { | |
| 7463 | + this.#currentThenable.reject( | |
| 7464 | + new Error("experimental_prefetchInRender feature flag is not enabled") | |
| 7465 | + ); | |
| 7466 | + } | |
| 7467 | + this.bindMethods(); | |
| 7468 | + this.setOptions(options); | |
| 7469 | + } | |
| 7470 | + #client; | |
| 7471 | + #currentQuery = void 0; | |
| 7472 | + #currentQueryInitialState = void 0; | |
| 7473 | + #currentResult = void 0; | |
| 7474 | + #currentResultState; | |
| 7475 | + #currentResultOptions; | |
| 7476 | + #currentThenable; | |
| 7477 | + #selectError; | |
| 7478 | + #selectFn; | |
| 7479 | + #selectResult; | |
| 7480 | + // This property keeps track of the last query with defined data. | |
| 7481 | + // It will be used to pass the previous data and query to the placeholder function between renders. | |
| 7482 | + #lastQueryWithDefinedData; | |
| 7483 | + #staleTimeoutId; | |
| 7484 | + #refetchIntervalId; | |
| 7485 | + #currentRefetchInterval; | |
| 7486 | + #trackedProps = /* @__PURE__ */ new Set(); | |
| 7487 | + bindMethods() { | |
| 7488 | + this.refetch = this.refetch.bind(this); | |
| 7489 | + } | |
| 7490 | + onSubscribe() { | |
| 7491 | + if (this.listeners.size === 1) { | |
| 7492 | + this.#currentQuery.addObserver(this); | |
| 7493 | + if (shouldFetchOnMount(this.#currentQuery, this.options)) { | |
| 7494 | + this.#executeFetch(); | |
| 7495 | + } else { | |
| 7496 | + this.updateResult(); | |
| 7497 | + } | |
| 7498 | + this.#updateTimers(); | |
| 7499 | + } | |
| 7500 | + } | |
| 7501 | + onUnsubscribe() { | |
| 7502 | + if (!this.hasListeners()) { | |
| 7503 | + this.destroy(); | |
| 7504 | + } | |
| 7505 | + } | |
| 7506 | + shouldFetchOnReconnect() { | |
| 7507 | + return shouldFetchOn( | |
| 7508 | + this.#currentQuery, | |
| 7509 | + this.options, | |
| 7510 | + this.options.refetchOnReconnect | |
| 7511 | + ); | |
| 7512 | + } | |
| 7513 | + shouldFetchOnWindowFocus() { | |
| 7514 | + return shouldFetchOn( | |
| 7515 | + this.#currentQuery, | |
| 7516 | + this.options, | |
| 7517 | + this.options.refetchOnWindowFocus | |
| 7518 | + ); | |
| 7519 | + } | |
| 7520 | + destroy() { | |
| 7521 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 7522 | + this.#clearStaleTimeout(); | |
| 7523 | + this.#clearRefetchInterval(); | |
| 7524 | + this.#currentQuery.removeObserver(this); | |
| 7525 | + } | |
| 7526 | + setOptions(options, notifyOptions) { | |
| 7527 | + const prevOptions = this.options; | |
| 7528 | + const prevQuery = this.#currentQuery; | |
| 7529 | + this.options = this.#client.defaultQueryOptions(options); | |
| 7530 | + 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") { | |
| 7531 | + throw new Error( | |
| 7532 | + "Expected enabled to be a boolean or a callback that returns a boolean" | |
| 7533 | + ); | |
| 7534 | + } | |
| 7535 | + this.#updateQuery(); | |
| 7536 | + this.#currentQuery.setOptions(this.options); | |
| 7537 | + if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) { | |
| 7538 | + this.#client.getQueryCache().notify({ | |
| 7539 | + type: "observerOptionsUpdated", | |
| 7540 | + query: this.#currentQuery, | |
| 7541 | + observer: this | |
| 7542 | + }); | |
| 7543 | + } | |
| 7544 | + const mounted = this.hasListeners(); | |
| 7545 | + if (mounted && shouldFetchOptionally( | |
| 7546 | + this.#currentQuery, | |
| 7547 | + prevQuery, | |
| 7548 | + this.options, | |
| 7549 | + prevOptions | |
| 7550 | + )) { | |
| 7551 | + this.#executeFetch(); | |
| 7552 | + } | |
| 7553 | + this.updateResult(notifyOptions); | |
| 7554 | + 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))) { | |
| 7555 | + this.#updateStaleTimeout(); | |
| 7556 | + } | |
| 7557 | + const nextRefetchInterval = this.#computeRefetchInterval(); | |
| 7558 | + 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)) { | |
| 7559 | + this.#updateRefetchInterval(nextRefetchInterval); | |
| 7560 | + } | |
| 7561 | + } | |
| 7562 | + getOptimisticResult(options) { | |
| 7563 | + const query = this.#client.getQueryCache().build(this.#client, options); | |
| 7564 | + const result = this.createResult(query, options); | |
| 7565 | + if (shouldAssignObserverCurrentProperties(this, result)) { | |
| 7566 | + this.#currentResult = result; | |
| 7567 | + this.#currentResultOptions = this.options; | |
| 7568 | + this.#currentResultState = this.#currentQuery.state; | |
| 7569 | + } | |
| 7570 | + return result; | |
| 7571 | + } | |
| 7572 | + getCurrentResult() { | |
| 7573 | + return this.#currentResult; | |
| 7574 | + } | |
| 7575 | + trackResult(result, onPropTracked) { | |
| 7576 | + const trackedResult = {}; | |
| 7577 | + Object.keys(result).forEach((key) => { | |
| 7578 | + Object.defineProperty(trackedResult, key, { | |
| 7579 | + configurable: false, | |
| 7580 | + enumerable: true, | |
| 7581 | + get: () => { | |
| 7582 | + this.trackProp(key); | |
| 7583 | + onPropTracked?.(key); | |
| 7584 | + return result[key]; | |
| 7585 | + } | |
| 7586 | + }); | |
| 7587 | + }); | |
| 7588 | + return trackedResult; | |
| 7589 | + } | |
| 7590 | + trackProp(key) { | |
| 7591 | + this.#trackedProps.add(key); | |
| 7592 | + } | |
| 7593 | + getCurrentQuery() { | |
| 7594 | + return this.#currentQuery; | |
| 7595 | + } | |
| 7596 | + refetch({ ...options } = {}) { | |
| 7597 | + return this.fetch({ | |
| 7598 | + ...options | |
| 7599 | + }); | |
| 7600 | + } | |
| 7601 | + fetchOptimistic(options) { | |
| 7602 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 7603 | + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions); | |
| 7604 | + return query.fetch().then(() => this.createResult(query, defaultedOptions)); | |
| 7605 | + } | |
| 7606 | + fetch(fetchOptions) { | |
| 7607 | + return this.#executeFetch({ | |
| 7608 | + ...fetchOptions, | |
| 7609 | + cancelRefetch: fetchOptions.cancelRefetch ?? true | |
| 7610 | + }).then(() => { | |
| 7611 | + this.updateResult(); | |
| 7612 | + return this.#currentResult; | |
| 7613 | + }); | |
| 7614 | + } | |
| 7615 | + #executeFetch(fetchOptions) { | |
| 7616 | + this.#updateQuery(); | |
| 7617 | + let promise = this.#currentQuery.fetch( | |
| 7618 | + this.options, | |
| 7619 | + fetchOptions | |
| 7620 | + ); | |
| 7621 | + if (!fetchOptions?.throwOnError) { | |
| 7622 | + promise = promise.catch(import_utils.noop); | |
| 7623 | + } | |
| 7624 | + return promise; | |
| 7625 | + } | |
| 7626 | + #updateStaleTimeout() { | |
| 7627 | + this.#clearStaleTimeout(); | |
| 7628 | + const staleTime = (0, import_utils.resolveStaleTime)( | |
| 7629 | + this.options.staleTime, | |
| 7630 | + this.#currentQuery | |
| 7631 | + ); | |
| 7632 | + if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) { | |
| 7633 | + return; | |
| 7634 | + } | |
| 7635 | + const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime); | |
| 7636 | + const timeout = time + 1; | |
| 7637 | + this.#staleTimeoutId = setTimeout(() => { | |
| 7638 | + if (!this.#currentResult.isStale) { | |
| 7639 | + this.updateResult(); | |
| 7640 | + } | |
| 7641 | + }, timeout); | |
| 7642 | + } | |
| 7643 | + #computeRefetchInterval() { | |
| 7644 | + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false; | |
| 7645 | + } | |
| 7646 | + #updateRefetchInterval(nextInterval) { | |
| 7647 | + this.#clearRefetchInterval(); | |
| 7648 | + this.#currentRefetchInterval = nextInterval; | |
| 7649 | + if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) { | |
| 7650 | + return; | |
| 7651 | + } | |
| 7652 | + this.#refetchIntervalId = setInterval(() => { | |
| 7653 | + if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) { | |
| 7654 | + this.#executeFetch(); | |
| 7655 | + } | |
| 7656 | + }, this.#currentRefetchInterval); | |
| 7657 | + } | |
| 7658 | + #updateTimers() { | |
| 7659 | + this.#updateStaleTimeout(); | |
| 7660 | + this.#updateRefetchInterval(this.#computeRefetchInterval()); | |
| 7661 | + } | |
| 7662 | + #clearStaleTimeout() { | |
| 7663 | + if (this.#staleTimeoutId) { | |
| 7664 | + clearTimeout(this.#staleTimeoutId); | |
| 7665 | + this.#staleTimeoutId = void 0; | |
| 7666 | + } | |
| 7667 | + } | |
| 7668 | + #clearRefetchInterval() { | |
| 7669 | + if (this.#refetchIntervalId) { | |
| 7670 | + clearInterval(this.#refetchIntervalId); | |
| 7671 | + this.#refetchIntervalId = void 0; | |
| 7672 | + } | |
| 7673 | + } | |
| 7674 | + createResult(query, options) { | |
| 7675 | + const prevQuery = this.#currentQuery; | |
| 7676 | + const prevOptions = this.options; | |
| 7677 | + const prevResult = this.#currentResult; | |
| 7678 | + const prevResultState = this.#currentResultState; | |
| 7679 | + const prevResultOptions = this.#currentResultOptions; | |
| 7680 | + const queryChange = query !== prevQuery; | |
| 7681 | + const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState; | |
| 7682 | + const { state } = query; | |
| 7683 | + let newState = { ...state }; | |
| 7684 | + let isPlaceholderData = false; | |
| 7685 | + let data; | |
| 7686 | + if (options._optimisticResults) { | |
| 7687 | + const mounted = this.hasListeners(); | |
| 7688 | + const fetchOnMount = !mounted && shouldFetchOnMount(query, options); | |
| 7689 | + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions); | |
| 7690 | + if (fetchOnMount || fetchOptionally) { | |
| 7691 | + newState = { | |
| 7692 | + ...newState, | |
| 7693 | + ...(0, import_query.fetchState)(state.data, query.options) | |
| 7694 | + }; | |
| 7695 | + } | |
| 7696 | + if (options._optimisticResults === "isRestoring") { | |
| 7697 | + newState.fetchStatus = "idle"; | |
| 7698 | + } | |
| 7699 | + } | |
| 7700 | + let { error, errorUpdatedAt, status } = newState; | |
| 7701 | + if (options.select && newState.data !== void 0) { | |
| 7702 | + if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) { | |
| 7703 | + data = this.#selectResult; | |
| 7704 | + } else { | |
| 7705 | + try { | |
| 7706 | + this.#selectFn = options.select; | |
| 7707 | + data = options.select(newState.data); | |
| 7708 | + data = (0, import_utils.replaceData)(prevResult?.data, data, options); | |
| 7709 | + this.#selectResult = data; | |
| 7710 | + this.#selectError = null; | |
| 7711 | + } catch (selectError) { | |
| 7712 | + this.#selectError = selectError; | |
| 7713 | + } | |
| 7714 | + } | |
| 7715 | + } else { | |
| 7716 | + data = newState.data; | |
| 7717 | + } | |
| 7718 | + if (options.placeholderData !== void 0 && data === void 0 && status === "pending") { | |
| 7719 | + let placeholderData; | |
| 7720 | + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) { | |
| 7721 | + placeholderData = prevResult.data; | |
| 7722 | + } else { | |
| 7723 | + placeholderData = typeof options.placeholderData === "function" ? options.placeholderData( | |
| 7724 | + this.#lastQueryWithDefinedData?.state.data, | |
| 7725 | + this.#lastQueryWithDefinedData | |
| 7726 | + ) : options.placeholderData; | |
| 7727 | + if (options.select && placeholderData !== void 0) { | |
| 7728 | + try { | |
| 7729 | + placeholderData = options.select(placeholderData); | |
| 7730 | + this.#selectError = null; | |
| 7731 | + } catch (selectError) { | |
| 7732 | + this.#selectError = selectError; | |
| 7733 | + } | |
| 7734 | + } | |
| 7735 | + } | |
| 7736 | + if (placeholderData !== void 0) { | |
| 7737 | + status = "success"; | |
| 7738 | + data = (0, import_utils.replaceData)( | |
| 7739 | + prevResult?.data, | |
| 7740 | + placeholderData, | |
| 7741 | + options | |
| 7742 | + ); | |
| 7743 | + isPlaceholderData = true; | |
| 7744 | + } | |
| 7745 | + } | |
| 7746 | + if (this.#selectError) { | |
| 7747 | + error = this.#selectError; | |
| 7748 | + data = this.#selectResult; | |
| 7749 | + errorUpdatedAt = Date.now(); | |
| 7750 | + status = "error"; | |
| 7751 | + } | |
| 7752 | + const isFetching = newState.fetchStatus === "fetching"; | |
| 7753 | + const isPending = status === "pending"; | |
| 7754 | + const isError = status === "error"; | |
| 7755 | + const isLoading = isPending && isFetching; | |
| 7756 | + const hasData = data !== void 0; | |
| 7757 | + const result = { | |
| 7758 | + status, | |
| 7759 | + fetchStatus: newState.fetchStatus, | |
| 7760 | + isPending, | |
| 7761 | + isSuccess: status === "success", | |
| 7762 | + isError, | |
| 7763 | + isInitialLoading: isLoading, | |
| 7764 | + isLoading, | |
| 7765 | + data, | |
| 7766 | + dataUpdatedAt: newState.dataUpdatedAt, | |
| 7767 | + error, | |
| 7768 | + errorUpdatedAt, | |
| 7769 | + failureCount: newState.fetchFailureCount, | |
| 7770 | + failureReason: newState.fetchFailureReason, | |
| 7771 | + errorUpdateCount: newState.errorUpdateCount, | |
| 7772 | + isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0, | |
| 7773 | + isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount, | |
| 7774 | + isFetching, | |
| 7775 | + isRefetching: isFetching && !isPending, | |
| 7776 | + isLoadingError: isError && !hasData, | |
| 7777 | + isPaused: newState.fetchStatus === "paused", | |
| 7778 | + isPlaceholderData, | |
| 7779 | + isRefetchError: isError && hasData, | |
| 7780 | + isStale: isStale(query, options), | |
| 7781 | + refetch: this.refetch, | |
| 7782 | + promise: this.#currentThenable | |
| 7783 | + }; | |
| 7784 | + const nextResult = result; | |
| 7785 | + if (this.options.experimental_prefetchInRender) { | |
| 7786 | + const finalizeThenableIfPossible = (thenable) => { | |
| 7787 | + if (nextResult.status === "error") { | |
| 7788 | + thenable.reject(nextResult.error); | |
| 7789 | + } else if (nextResult.data !== void 0) { | |
| 7790 | + thenable.resolve(nextResult.data); | |
| 7791 | + } | |
| 7792 | + }; | |
| 7793 | + const recreateThenable = () => { | |
| 7794 | + const pending = this.#currentThenable = nextResult.promise = (0, import_thenable.pendingThenable)(); | |
| 7795 | + finalizeThenableIfPossible(pending); | |
| 7796 | + }; | |
| 7797 | + const prevThenable = this.#currentThenable; | |
| 7798 | + switch (prevThenable.status) { | |
| 7799 | + case "pending": | |
| 7800 | + if (query.queryHash === prevQuery.queryHash) { | |
| 7801 | + finalizeThenableIfPossible(prevThenable); | |
| 7802 | + } | |
| 7803 | + break; | |
| 7804 | + case "fulfilled": | |
| 7805 | + if (nextResult.status === "error" || nextResult.data !== prevThenable.value) { | |
| 7806 | + recreateThenable(); | |
| 7807 | + } | |
| 7808 | + break; | |
| 7809 | + case "rejected": | |
| 7810 | + if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) { | |
| 7811 | + recreateThenable(); | |
| 7812 | + } | |
| 7813 | + break; | |
| 7814 | + } | |
| 7815 | + } | |
| 7816 | + return nextResult; | |
| 7817 | + } | |
| 7818 | + updateResult(notifyOptions) { | |
| 7819 | + const prevResult = this.#currentResult; | |
| 7820 | + const nextResult = this.createResult(this.#currentQuery, this.options); | |
| 7821 | + this.#currentResultState = this.#currentQuery.state; | |
| 7822 | + this.#currentResultOptions = this.options; | |
| 7823 | + if (this.#currentResultState.data !== void 0) { | |
| 7824 | + this.#lastQueryWithDefinedData = this.#currentQuery; | |
| 7825 | + } | |
| 7826 | + if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) { | |
| 7827 | + return; | |
| 7828 | + } | |
| 7829 | + this.#currentResult = nextResult; | |
| 7830 | + const defaultNotifyOptions = {}; | |
| 7831 | + const shouldNotifyListeners = () => { | |
| 7832 | + if (!prevResult) { | |
| 7833 | + return true; | |
| 7834 | + } | |
| 7835 | + const { notifyOnChangeProps } = this.options; | |
| 7836 | + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; | |
| 7837 | + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) { | |
| 7838 | + return true; | |
| 7839 | + } | |
| 7840 | + const includedProps = new Set( | |
| 7841 | + notifyOnChangePropsValue ?? this.#trackedProps | |
| 7842 | + ); | |
| 7843 | + if (this.options.throwOnError) { | |
| 7844 | + includedProps.add("error"); | |
| 7845 | + } | |
| 7846 | + return Object.keys(this.#currentResult).some((key) => { | |
| 7847 | + const typedKey = key; | |
| 7848 | + const changed = this.#currentResult[typedKey] !== prevResult[typedKey]; | |
| 7849 | + return changed && includedProps.has(typedKey); | |
| 7850 | + }); | |
| 7851 | + }; | |
| 7852 | + if (notifyOptions?.listeners !== false && shouldNotifyListeners()) { | |
| 7853 | + defaultNotifyOptions.listeners = true; | |
| 7854 | + } | |
| 7855 | + this.#notify({ ...defaultNotifyOptions, ...notifyOptions }); | |
| 7856 | + } | |
| 7857 | + #updateQuery() { | |
| 7858 | + const query = this.#client.getQueryCache().build(this.#client, this.options); | |
| 7859 | + if (query === this.#currentQuery) { | |
| 7860 | + return; | |
| 7861 | + } | |
| 7862 | + const prevQuery = this.#currentQuery; | |
| 7863 | + this.#currentQuery = query; | |
| 7864 | + this.#currentQueryInitialState = query.state; | |
| 7865 | + if (this.hasListeners()) { | |
| 7866 | + prevQuery?.removeObserver(this); | |
| 7867 | + query.addObserver(this); | |
| 7868 | + } | |
| 7869 | + } | |
| 7870 | + onQueryUpdate() { | |
| 7871 | + this.updateResult(); | |
| 7872 | + if (this.hasListeners()) { | |
| 7873 | + this.#updateTimers(); | |
| 7874 | + } | |
| 7875 | + } | |
| 7876 | + #notify(notifyOptions) { | |
| 7877 | + import_notifyManager.notifyManager.batch(() => { | |
| 7878 | + if (notifyOptions.listeners) { | |
| 7879 | + this.listeners.forEach((listener) => { | |
| 7880 | + listener(this.#currentResult); | |
| 7881 | + }); | |
| 7882 | + } | |
| 7883 | + this.#client.getQueryCache().notify({ | |
| 7884 | + query: this.#currentQuery, | |
| 7885 | + type: "observerResultsUpdated" | |
| 7886 | + }); | |
| 7887 | + }); | |
| 7888 | + } | |
| 7889 | +}; | |
| 7890 | +function shouldLoadOnMount(query, options) { | |
| 7891 | + return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false); | |
| 7892 | +} | |
| 7893 | +function shouldFetchOnMount(query, options) { | |
| 7894 | + return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount); | |
| 7895 | +} | |
| 7896 | +function shouldFetchOn(query, options, field) { | |
| 7897 | + if ((0, import_utils.resolveEnabled)(options.enabled, query) !== false) { | |
| 7898 | + const value = typeof field === "function" ? field(query) : field; | |
| 7899 | + return value === "always" || value !== false && isStale(query, options); | |
| 7900 | + } | |
| 7901 | + return false; | |
| 7902 | +} | |
| 7903 | +function shouldFetchOptionally(query, prevQuery, options, prevOptions) { | |
| 7904 | + return (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options); | |
| 7905 | +} | |
| 7906 | +function isStale(query, options) { | |
| 7907 | + return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query)); | |
| 7908 | +} | |
| 7909 | +function shouldAssignObserverCurrentProperties(observer, optimisticResult) { | |
| 7910 | + if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) { | |
| 7911 | + return true; | |
| 7912 | + } | |
| 7913 | + return false; | |
| 7914 | +} | |
| 7915 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7916 | +0 && (0); | |
| 7917 | +//# sourceMappingURL=queryObserver.cjs.map | |
| 7918 | + | |
| 7919 | +/***/ }), | |
| 7920 | + | |
| 7921 | +/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs": | |
| 7922 | +/*!***********************************************************************!*\ | |
| 7923 | + !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***! | |
| 7924 | + \***********************************************************************/ | |
| 7925 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7926 | + | |
| 7927 | +"use strict"; | |
| 7928 | + | |
| 7929 | +var __defProp = Object.defineProperty; | |
| 7930 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7931 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7932 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7933 | +var __export = (target, all) => { | |
| 7934 | + for (var name in all) | |
| 7935 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7936 | +}; | |
| 7937 | +var __copyProps = (to, from, except, desc) => { | |
| 7938 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7939 | + for (let key of __getOwnPropNames(from)) | |
| 7940 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7941 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7942 | + } | |
| 7943 | + return to; | |
| 7944 | +}; | |
| 7945 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7946 | + | |
| 7947 | +// src/removable.ts | |
| 7948 | +var removable_exports = {}; | |
| 7949 | +__export(removable_exports, { | |
| 7950 | + Removable: () => Removable | |
| 7951 | +}); | |
| 7952 | +module.exports = __toCommonJS(removable_exports); | |
| 7953 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7954 | +var Removable = class { | |
| 7955 | + #gcTimeout; | |
| 7956 | + destroy() { | |
| 7957 | + this.clearGcTimeout(); | |
| 7958 | + } | |
| 7959 | + scheduleGc() { | |
| 7960 | + this.clearGcTimeout(); | |
| 7961 | + if ((0, import_utils.isValidTimeout)(this.gcTime)) { | |
| 7962 | + this.#gcTimeout = setTimeout(() => { | |
| 7963 | + this.optionalRemove(); | |
| 7964 | + }, this.gcTime); | |
| 7965 | + } | |
| 7966 | + } | |
| 7967 | + updateGcTime(newGcTime) { | |
| 7968 | + this.gcTime = Math.max( | |
| 7969 | + this.gcTime || 0, | |
| 7970 | + newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3) | |
| 7971 | + ); | |
| 7972 | + } | |
| 7973 | + clearGcTimeout() { | |
| 7974 | + if (this.#gcTimeout) { | |
| 7975 | + clearTimeout(this.#gcTimeout); | |
| 7976 | + this.#gcTimeout = void 0; | |
| 7977 | + } | |
| 7978 | + } | |
| 7979 | +}; | |
| 7980 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7981 | +0 && (0); | |
| 7982 | +//# sourceMappingURL=removable.cjs.map | |
| 7983 | + | |
| 7984 | +/***/ }), | |
| 7985 | + | |
| 7986 | +/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs": | |
| 7987 | +/*!*********************************************************************!*\ | |
| 7988 | + !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***! | |
| 7989 | + \*********************************************************************/ | |
| 7990 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7991 | + | |
| 7992 | +"use strict"; | |
| 7993 | + | |
| 7994 | +var __defProp = Object.defineProperty; | |
| 7995 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7996 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7997 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7998 | +var __export = (target, all) => { | |
| 7999 | + for (var name in all) | |
| 8000 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8001 | +}; | |
| 8002 | +var __copyProps = (to, from, except, desc) => { | |
| 8003 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8004 | + for (let key of __getOwnPropNames(from)) | |
| 8005 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8006 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8007 | + } | |
| 8008 | + return to; | |
| 8009 | +}; | |
| 8010 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8011 | + | |
| 8012 | +// src/retryer.ts | |
| 8013 | +var retryer_exports = {}; | |
| 8014 | +__export(retryer_exports, { | |
| 8015 | + CancelledError: () => CancelledError, | |
| 8016 | + canFetch: () => canFetch, | |
| 8017 | + createRetryer: () => createRetryer, | |
| 8018 | + isCancelledError: () => isCancelledError | |
| 8019 | +}); | |
| 8020 | +module.exports = __toCommonJS(retryer_exports); | |
| 8021 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 8022 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 8023 | +var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs"); | |
| 8024 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 8025 | +function defaultRetryDelay(failureCount) { | |
| 8026 | + return Math.min(1e3 * 2 ** failureCount, 3e4); | |
| 8027 | +} | |
| 8028 | +function canFetch(networkMode) { | |
| 8029 | + return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true; | |
| 8030 | +} | |
| 8031 | +var CancelledError = class extends Error { | |
| 8032 | + constructor(options) { | |
| 8033 | + super("CancelledError"); | |
| 8034 | + this.revert = options?.revert; | |
| 8035 | + this.silent = options?.silent; | |
| 8036 | + } | |
| 8037 | +}; | |
| 8038 | +function isCancelledError(value) { | |
| 8039 | + return value instanceof CancelledError; | |
| 8040 | +} | |
| 8041 | +function createRetryer(config) { | |
| 8042 | + let isRetryCancelled = false; | |
| 8043 | + let failureCount = 0; | |
| 8044 | + let isResolved = false; | |
| 8045 | + let continueFn; | |
| 8046 | + const thenable = (0, import_thenable.pendingThenable)(); | |
| 8047 | + const cancel = (cancelOptions) => { | |
| 8048 | + if (!isResolved) { | |
| 8049 | + reject(new CancelledError(cancelOptions)); | |
| 8050 | + config.abort?.(); | |
| 8051 | + } | |
| 8052 | + }; | |
| 8053 | + const cancelRetry = () => { | |
| 8054 | + isRetryCancelled = true; | |
| 8055 | + }; | |
| 8056 | + const continueRetry = () => { | |
| 8057 | + isRetryCancelled = false; | |
| 8058 | + }; | |
| 8059 | + const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun(); | |
| 8060 | + const canStart = () => canFetch(config.networkMode) && config.canRun(); | |
| 8061 | + const resolve = (value) => { | |
| 8062 | + if (!isResolved) { | |
| 8063 | + isResolved = true; | |
| 8064 | + config.onSuccess?.(value); | |
| 8065 | + continueFn?.(); | |
| 8066 | + thenable.resolve(value); | |
| 8067 | + } | |
| 8068 | + }; | |
| 8069 | + const reject = (value) => { | |
| 8070 | + if (!isResolved) { | |
| 8071 | + isResolved = true; | |
| 8072 | + config.onError?.(value); | |
| 8073 | + continueFn?.(); | |
| 8074 | + thenable.reject(value); | |
| 8075 | + } | |
| 8076 | + }; | |
| 8077 | + const pause = () => { | |
| 8078 | + return new Promise((continueResolve) => { | |
| 8079 | + continueFn = (value) => { | |
| 8080 | + if (isResolved || canContinue()) { | |
| 8081 | + continueResolve(value); | |
| 8082 | + } | |
| 8083 | + }; | |
| 8084 | + config.onPause?.(); | |
| 8085 | + }).then(() => { | |
| 8086 | + continueFn = void 0; | |
| 8087 | + if (!isResolved) { | |
| 8088 | + config.onContinue?.(); | |
| 8089 | + } | |
| 8090 | + }); | |
| 8091 | + }; | |
| 8092 | + const run = () => { | |
| 8093 | + if (isResolved) { | |
| 8094 | + return; | |
| 8095 | + } | |
| 8096 | + let promiseOrValue; | |
| 8097 | + const initialPromise = failureCount === 0 ? config.initialPromise : void 0; | |
| 8098 | + try { | |
| 8099 | + promiseOrValue = initialPromise ?? config.fn(); | |
| 8100 | + } catch (error) { | |
| 8101 | + promiseOrValue = Promise.reject(error); | |
| 8102 | + } | |
| 8103 | + Promise.resolve(promiseOrValue).then(resolve).catch((error) => { | |
| 8104 | + if (isResolved) { | |
| 8105 | + return; | |
| 8106 | + } | |
| 8107 | + const retry = config.retry ?? (import_utils.isServer ? 0 : 3); | |
| 8108 | + const retryDelay = config.retryDelay ?? defaultRetryDelay; | |
| 8109 | + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; | |
| 8110 | + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error); | |
| 8111 | + if (isRetryCancelled || !shouldRetry) { | |
| 8112 | + reject(error); | |
| 8113 | + return; | |
| 8114 | + } | |
| 8115 | + failureCount++; | |
| 8116 | + config.onFail?.(failureCount, error); | |
| 8117 | + (0, import_utils.sleep)(delay).then(() => { | |
| 8118 | + return canContinue() ? void 0 : pause(); | |
| 8119 | + }).then(() => { | |
| 8120 | + if (isRetryCancelled) { | |
| 8121 | + reject(error); | |
| 8122 | + } else { | |
| 8123 | + run(); | |
| 8124 | + } | |
| 8125 | + }); | |
| 8126 | + }); | |
| 8127 | + }; | |
| 8128 | + return { | |
| 8129 | + promise: thenable, | |
| 8130 | + cancel, | |
| 8131 | + continue: () => { | |
| 8132 | + continueFn?.(); | |
| 8133 | + return thenable; | |
| 8134 | + }, | |
| 8135 | + cancelRetry, | |
| 8136 | + continueRetry, | |
| 8137 | + canStart, | |
| 8138 | + start: () => { | |
| 8139 | + if (canStart()) { | |
| 8140 | + run(); | |
| 8141 | + } else { | |
| 8142 | + pause().then(run); | |
| 8143 | + } | |
| 8144 | + return thenable; | |
| 8145 | + } | |
| 8146 | + }; | |
| 8147 | +} | |
| 8148 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8149 | +0 && (0); | |
| 8150 | +//# sourceMappingURL=retryer.cjs.map | |
| 8151 | + | |
| 8152 | +/***/ }), | |
| 8153 | + | |
| 8154 | +/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs": | |
| 8155 | +/*!**************************************************************************!*\ | |
| 8156 | + !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***! | |
| 8157 | + \**************************************************************************/ | |
| 8158 | +/***/ ((module) => { | |
| 8159 | + | |
| 8160 | +"use strict"; | |
| 8161 | + | |
| 8162 | +var __defProp = Object.defineProperty; | |
| 8163 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8164 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8165 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8166 | +var __export = (target, all) => { | |
| 8167 | + for (var name in all) | |
| 8168 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8169 | +}; | |
| 8170 | +var __copyProps = (to, from, except, desc) => { | |
| 8171 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8172 | + for (let key of __getOwnPropNames(from)) | |
| 8173 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8174 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8175 | + } | |
| 8176 | + return to; | |
| 8177 | +}; | |
| 8178 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8179 | + | |
| 8180 | +// src/subscribable.ts | |
| 8181 | +var subscribable_exports = {}; | |
| 8182 | +__export(subscribable_exports, { | |
| 8183 | + Subscribable: () => Subscribable | |
| 8184 | +}); | |
| 8185 | +module.exports = __toCommonJS(subscribable_exports); | |
| 8186 | +var Subscribable = class { | |
| 8187 | + constructor() { | |
| 8188 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 8189 | + this.subscribe = this.subscribe.bind(this); | |
| 8190 | + } | |
| 8191 | + subscribe(listener) { | |
| 8192 | + this.listeners.add(listener); | |
| 8193 | + this.onSubscribe(); | |
| 8194 | + return () => { | |
| 8195 | + this.listeners.delete(listener); | |
| 8196 | + this.onUnsubscribe(); | |
| 8197 | + }; | |
| 8198 | + } | |
| 8199 | + hasListeners() { | |
| 8200 | + return this.listeners.size > 0; | |
| 8201 | + } | |
| 8202 | + onSubscribe() { | |
| 8203 | + } | |
| 8204 | + onUnsubscribe() { | |
| 8205 | + } | |
| 8206 | +}; | |
| 8207 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8208 | +0 && (0); | |
| 8209 | +//# sourceMappingURL=subscribable.cjs.map | |
| 8210 | + | |
| 8211 | +/***/ }), | |
| 8212 | + | |
| 8213 | +/***/ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs": | |
| 8214 | +/*!**********************************************************************!*\ | |
| 8215 | + !*** ../node_modules/@tanstack/query-core/build/modern/thenable.cjs ***! | |
| 8216 | + \**********************************************************************/ | |
| 8217 | +/***/ ((module) => { | |
| 8218 | + | |
| 8219 | +"use strict"; | |
| 8220 | + | |
| 8221 | +var __defProp = Object.defineProperty; | |
| 8222 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8223 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8224 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8225 | +var __export = (target, all) => { | |
| 8226 | + for (var name in all) | |
| 8227 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8228 | +}; | |
| 8229 | +var __copyProps = (to, from, except, desc) => { | |
| 8230 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8231 | + for (let key of __getOwnPropNames(from)) | |
| 8232 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8233 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8234 | + } | |
| 8235 | + return to; | |
| 8236 | +}; | |
| 8237 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8238 | + | |
| 8239 | +// src/thenable.ts | |
| 8240 | +var thenable_exports = {}; | |
| 8241 | +__export(thenable_exports, { | |
| 8242 | + pendingThenable: () => pendingThenable | |
| 8243 | +}); | |
| 8244 | +module.exports = __toCommonJS(thenable_exports); | |
| 8245 | +function pendingThenable() { | |
| 8246 | + let resolve; | |
| 8247 | + let reject; | |
| 8248 | + const thenable = new Promise((_resolve, _reject) => { | |
| 8249 | + resolve = _resolve; | |
| 8250 | + reject = _reject; | |
| 8251 | + }); | |
| 8252 | + thenable.status = "pending"; | |
| 8253 | + thenable.catch(() => { | |
| 8254 | + }); | |
| 8255 | + function finalize(data) { | |
| 8256 | + Object.assign(thenable, data); | |
| 8257 | + delete thenable.resolve; | |
| 8258 | + delete thenable.reject; | |
| 8259 | + } | |
| 8260 | + thenable.resolve = (value) => { | |
| 8261 | + finalize({ | |
| 8262 | + status: "fulfilled", | |
| 8263 | + value | |
| 8264 | + }); | |
| 8265 | + resolve(value); | |
| 8266 | + }; | |
| 8267 | + thenable.reject = (reason) => { | |
| 8268 | + finalize({ | |
| 8269 | + status: "rejected", | |
| 8270 | + reason | |
| 8271 | + }); | |
| 8272 | + reject(reason); | |
| 8273 | + }; | |
| 8274 | + return thenable; | |
| 8275 | +} | |
| 8276 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8277 | +0 && (0); | |
| 8278 | +//# sourceMappingURL=thenable.cjs.map | |
| 8279 | + | |
| 8280 | +/***/ }), | |
| 8281 | + | |
| 8282 | +/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs": | |
| 8283 | +/*!*******************************************************************!*\ | |
| 8284 | + !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***! | |
| 8285 | + \*******************************************************************/ | |
| 8286 | +/***/ ((module) => { | |
| 8287 | + | |
| 8288 | +"use strict"; | |
| 8289 | + | |
| 8290 | +var __defProp = Object.defineProperty; | |
| 8291 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8292 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8293 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8294 | +var __copyProps = (to, from, except, desc) => { | |
| 8295 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8296 | + for (let key of __getOwnPropNames(from)) | |
| 8297 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8298 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8299 | + } | |
| 8300 | + return to; | |
| 8301 | +}; | |
| 8302 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8303 | + | |
| 8304 | +// src/types.ts | |
| 8305 | +var types_exports = {}; | |
| 8306 | +module.exports = __toCommonJS(types_exports); | |
| 8307 | +//# sourceMappingURL=types.cjs.map | |
| 8308 | + | |
| 8309 | +/***/ }), | |
| 8310 | + | |
| 8311 | +/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs": | |
| 8312 | +/*!*******************************************************************!*\ | |
| 8313 | + !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***! | |
| 8314 | + \*******************************************************************/ | |
| 8315 | +/***/ ((module) => { | |
| 8316 | + | |
| 8317 | +"use strict"; | |
| 8318 | + | |
| 8319 | +var __defProp = Object.defineProperty; | |
| 8320 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8321 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8322 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8323 | +var __export = (target, all) => { | |
| 8324 | + for (var name in all) | |
| 8325 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8326 | +}; | |
| 8327 | +var __copyProps = (to, from, except, desc) => { | |
| 8328 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8329 | + for (let key of __getOwnPropNames(from)) | |
| 8330 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8331 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8332 | + } | |
| 8333 | + return to; | |
| 8334 | +}; | |
| 8335 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8336 | + | |
| 8337 | +// src/utils.ts | |
| 8338 | +var utils_exports = {}; | |
| 8339 | +__export(utils_exports, { | |
| 8340 | + addToEnd: () => addToEnd, | |
| 8341 | + addToStart: () => addToStart, | |
| 8342 | + ensureQueryFn: () => ensureQueryFn, | |
| 8343 | + functionalUpdate: () => functionalUpdate, | |
| 8344 | + hashKey: () => hashKey, | |
| 8345 | + hashQueryKeyByOptions: () => hashQueryKeyByOptions, | |
| 8346 | + isPlainArray: () => isPlainArray, | |
| 8347 | + isPlainObject: () => isPlainObject, | |
| 8348 | + isServer: () => isServer, | |
| 8349 | + isValidTimeout: () => isValidTimeout, | |
| 8350 | + keepPreviousData: () => keepPreviousData, | |
| 8351 | + matchMutation: () => matchMutation, | |
| 8352 | + matchQuery: () => matchQuery, | |
| 8353 | + noop: () => noop, | |
| 8354 | + partialMatchKey: () => partialMatchKey, | |
| 8355 | + replaceData: () => replaceData, | |
| 8356 | + replaceEqualDeep: () => replaceEqualDeep, | |
| 8357 | + resolveEnabled: () => resolveEnabled, | |
| 8358 | + resolveStaleTime: () => resolveStaleTime, | |
| 8359 | + shallowEqualObjects: () => shallowEqualObjects, | |
| 8360 | + skipToken: () => skipToken, | |
| 8361 | + sleep: () => sleep, | |
| 8362 | + timeUntilStale: () => timeUntilStale | |
| 8363 | +}); | |
| 8364 | +module.exports = __toCommonJS(utils_exports); | |
| 8365 | +var isServer = typeof window === "undefined" || "Deno" in globalThis; | |
| 8366 | +function noop() { | |
| 8367 | +} | |
| 8368 | +function functionalUpdate(updater, input) { | |
| 8369 | + return typeof updater === "function" ? updater(input) : updater; | |
| 8370 | +} | |
| 8371 | +function isValidTimeout(value) { | |
| 8372 | + return typeof value === "number" && value >= 0 && value !== Infinity; | |
| 8373 | +} | |
| 8374 | +function timeUntilStale(updatedAt, staleTime) { | |
| 8375 | + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0); | |
| 8376 | +} | |
| 8377 | +function resolveStaleTime(staleTime, query) { | |
| 8378 | + return typeof staleTime === "function" ? staleTime(query) : staleTime; | |
| 8379 | +} | |
| 8380 | +function resolveEnabled(enabled, query) { | |
| 8381 | + return typeof enabled === "function" ? enabled(query) : enabled; | |
| 8382 | +} | |
| 8383 | +function matchQuery(filters, query) { | |
| 8384 | + const { | |
| 8385 | + type = "all", | |
| 8386 | + exact, | |
| 8387 | + fetchStatus, | |
| 8388 | + predicate, | |
| 8389 | + queryKey, | |
| 8390 | + stale | |
| 8391 | + } = filters; | |
| 8392 | + if (queryKey) { | |
| 8393 | + if (exact) { | |
| 8394 | + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) { | |
| 8395 | + return false; | |
| 8396 | + } | |
| 8397 | + } else if (!partialMatchKey(query.queryKey, queryKey)) { | |
| 8398 | + return false; | |
| 8399 | + } | |
| 8400 | + } | |
| 8401 | + if (type !== "all") { | |
| 8402 | + const isActive = query.isActive(); | |
| 8403 | + if (type === "active" && !isActive) { | |
| 8404 | + return false; | |
| 8405 | + } | |
| 8406 | + if (type === "inactive" && isActive) { | |
| 8407 | + return false; | |
| 8408 | + } | |
| 8409 | + } | |
| 8410 | + if (typeof stale === "boolean" && query.isStale() !== stale) { | |
| 8411 | + return false; | |
| 8412 | + } | |
| 8413 | + if (fetchStatus && fetchStatus !== query.state.fetchStatus) { | |
| 8414 | + return false; | |
| 8415 | + } | |
| 8416 | + if (predicate && !predicate(query)) { | |
| 8417 | + return false; | |
| 8418 | + } | |
| 8419 | + return true; | |
| 8420 | +} | |
| 8421 | +function matchMutation(filters, mutation) { | |
| 8422 | + const { exact, status, predicate, mutationKey } = filters; | |
| 8423 | + if (mutationKey) { | |
| 8424 | + if (!mutation.options.mutationKey) { | |
| 8425 | + return false; | |
| 8426 | + } | |
| 8427 | + if (exact) { | |
| 8428 | + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) { | |
| 8429 | + return false; | |
| 8430 | + } | |
| 8431 | + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) { | |
| 8432 | + return false; | |
| 8433 | + } | |
| 8434 | + } | |
| 8435 | + if (status && mutation.state.status !== status) { | |
| 8436 | + return false; | |
| 8437 | + } | |
| 8438 | + if (predicate && !predicate(mutation)) { | |
| 8439 | + return false; | |
| 8440 | + } | |
| 8441 | + return true; | |
| 8442 | +} | |
| 8443 | +function hashQueryKeyByOptions(queryKey, options) { | |
| 8444 | + const hashFn = options?.queryKeyHashFn || hashKey; | |
| 8445 | + return hashFn(queryKey); | |
| 8446 | +} | |
| 8447 | +function hashKey(queryKey) { | |
| 8448 | + return JSON.stringify( | |
| 8449 | + queryKey, | |
| 8450 | + (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => { | |
| 8451 | + result[key] = val[key]; | |
| 8452 | + return result; | |
| 8453 | + }, {}) : val | |
| 8454 | + ); | |
| 8455 | +} | |
| 8456 | +function partialMatchKey(a, b) { | |
| 8457 | + if (a === b) { | |
| 8458 | + return true; | |
| 8459 | + } | |
| 8460 | + if (typeof a !== typeof b) { | |
| 8461 | + return false; | |
| 8462 | + } | |
| 8463 | + if (a && b && typeof a === "object" && typeof b === "object") { | |
| 8464 | + return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key])); | |
| 8465 | + } | |
| 8466 | + return false; | |
| 8467 | +} | |
| 8468 | +function replaceEqualDeep(a, b) { | |
| 8469 | + if (a === b) { | |
| 8470 | + return a; | |
| 8471 | + } | |
| 8472 | + const array = isPlainArray(a) && isPlainArray(b); | |
| 8473 | + if (array || isPlainObject(a) && isPlainObject(b)) { | |
| 8474 | + const aItems = array ? a : Object.keys(a); | |
| 8475 | + const aSize = aItems.length; | |
| 8476 | + const bItems = array ? b : Object.keys(b); | |
| 8477 | + const bSize = bItems.length; | |
| 8478 | + const copy = array ? [] : {}; | |
| 8479 | + let equalItems = 0; | |
| 8480 | + for (let i = 0; i < bSize; i++) { | |
| 8481 | + const key = array ? i : bItems[i]; | |
| 8482 | + if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) { | |
| 8483 | + copy[key] = void 0; | |
| 8484 | + equalItems++; | |
| 8485 | + } else { | |
| 8486 | + copy[key] = replaceEqualDeep(a[key], b[key]); | |
| 8487 | + if (copy[key] === a[key] && a[key] !== void 0) { | |
| 8488 | + equalItems++; | |
| 8489 | + } | |
| 8490 | + } | |
| 8491 | + } | |
| 8492 | + return aSize === bSize && equalItems === aSize ? a : copy; | |
| 8493 | + } | |
| 8494 | + return b; | |
| 8495 | +} | |
| 8496 | +function shallowEqualObjects(a, b) { | |
| 8497 | + if (!b || Object.keys(a).length !== Object.keys(b).length) { | |
| 8498 | + return false; | |
| 8499 | + } | |
| 8500 | + for (const key in a) { | |
| 8501 | + if (a[key] !== b[key]) { | |
| 8502 | + return false; | |
| 8503 | + } | |
| 8504 | + } | |
| 8505 | + return true; | |
| 8506 | +} | |
| 8507 | +function isPlainArray(value) { | |
| 8508 | + return Array.isArray(value) && value.length === Object.keys(value).length; | |
| 8509 | +} | |
| 8510 | +function isPlainObject(o) { | |
| 8511 | + if (!hasObjectPrototype(o)) { | |
| 8512 | + return false; | |
| 8513 | + } | |
| 8514 | + const ctor = o.constructor; | |
| 8515 | + if (ctor === void 0) { | |
| 8516 | + return true; | |
| 8517 | + } | |
| 8518 | + const prot = ctor.prototype; | |
| 8519 | + if (!hasObjectPrototype(prot)) { | |
| 8520 | + return false; | |
| 8521 | + } | |
| 8522 | + if (!prot.hasOwnProperty("isPrototypeOf")) { | |
| 8523 | + return false; | |
| 8524 | + } | |
| 8525 | + if (Object.getPrototypeOf(o) !== Object.prototype) { | |
| 8526 | + return false; | |
| 8527 | + } | |
| 8528 | + return true; | |
| 8529 | +} | |
| 8530 | +function hasObjectPrototype(o) { | |
| 8531 | + return Object.prototype.toString.call(o) === "[object Object]"; | |
| 8532 | +} | |
| 8533 | +function sleep(timeout) { | |
| 8534 | + return new Promise((resolve) => { | |
| 8535 | + setTimeout(resolve, timeout); | |
| 8536 | + }); | |
| 8537 | +} | |
| 8538 | +function replaceData(prevData, data, options) { | |
| 8539 | + if (typeof options.structuralSharing === "function") { | |
| 8540 | + return options.structuralSharing(prevData, data); | |
| 8541 | + } else if (options.structuralSharing !== false) { | |
| 8542 | + if (true) { | |
| 8543 | + try { | |
| 8544 | + return replaceEqualDeep(prevData, data); | |
| 8545 | + } catch (error) { | |
| 8546 | + console.error( | |
| 8547 | + `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}` | |
| 8548 | + ); | |
| 8549 | + } | |
| 8550 | + } | |
| 8551 | + return replaceEqualDeep(prevData, data); | |
| 8552 | + } | |
| 8553 | + return data; | |
| 8554 | +} | |
| 8555 | +function keepPreviousData(previousData) { | |
| 8556 | + return previousData; | |
| 8557 | +} | |
| 8558 | +function addToEnd(items, item, max = 0) { | |
| 8559 | + const newItems = [...items, item]; | |
| 8560 | + return max && newItems.length > max ? newItems.slice(1) : newItems; | |
| 8561 | +} | |
| 8562 | +function addToStart(items, item, max = 0) { | |
| 8563 | + const newItems = [item, ...items]; | |
| 8564 | + return max && newItems.length > max ? newItems.slice(0, -1) : newItems; | |
| 8565 | +} | |
| 8566 | +var skipToken = Symbol(); | |
| 8567 | +function ensureQueryFn(options, fetchOptions) { | |
| 8568 | + if (true) { | |
| 8569 | + if (options.queryFn === skipToken) { | |
| 8570 | + console.error( | |
| 8571 | + `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'` | |
| 8572 | + ); | |
| 8573 | + } | |
| 8574 | + } | |
| 8575 | + if (!options.queryFn && fetchOptions?.initialPromise) { | |
| 8576 | + return () => fetchOptions.initialPromise; | |
| 8577 | + } | |
| 8578 | + if (!options.queryFn || options.queryFn === skipToken) { | |
| 8579 | + return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`)); | |
| 8580 | + } | |
| 8581 | + return options.queryFn; | |
| 8582 | +} | |
| 8583 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8584 | +0 && (0); | |
| 8585 | +//# sourceMappingURL=utils.cjs.map | |
| 8586 | + | |
| 8587 | +/***/ }), | |
| 8588 | + | |
| 8589 | +/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs": | |
| 8590 | +/*!********************************************************************************!*\ | |
| 8591 | + !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***! | |
| 8592 | + \********************************************************************************/ | |
| 8593 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8594 | + | |
| 8595 | +"use strict"; | |
| 8596 | + | |
| 8597 | +"use client"; | |
| 8598 | +var __create = Object.create; | |
| 8599 | +var __defProp = Object.defineProperty; | |
| 8600 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8601 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8602 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8603 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8604 | +var __export = (target, all) => { | |
| 8605 | + for (var name in all) | |
| 8606 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8607 | +}; | |
| 8608 | +var __copyProps = (to, from, except, desc) => { | |
| 8609 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8610 | + for (let key of __getOwnPropNames(from)) | |
| 8611 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8612 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8613 | + } | |
| 8614 | + return to; | |
| 8615 | +}; | |
| 8616 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8617 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8618 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8619 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8620 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8621 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8622 | + mod | |
| 8623 | +)); | |
| 8624 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8625 | + | |
| 8626 | +// src/HydrationBoundary.tsx | |
| 8627 | +var HydrationBoundary_exports = {}; | |
| 8628 | +__export(HydrationBoundary_exports, { | |
| 8629 | + HydrationBoundary: () => HydrationBoundary | |
| 8630 | +}); | |
| 8631 | +module.exports = __toCommonJS(HydrationBoundary_exports); | |
| 8632 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8633 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 8634 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 8635 | +var HydrationBoundary = ({ | |
| 8636 | + children, | |
| 8637 | + options = {}, | |
| 8638 | + state, | |
| 8639 | + queryClient | |
| 8640 | +}) => { | |
| 8641 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 8642 | + const [hydrationQueue, setHydrationQueue] = React.useState(); | |
| 8643 | + const optionsRef = React.useRef(options); | |
| 8644 | + optionsRef.current = options; | |
| 8645 | + React.useMemo(() => { | |
| 8646 | + if (state) { | |
| 8647 | + if (typeof state !== "object") { | |
| 8648 | + return; | |
| 8649 | + } | |
| 8650 | + const queryCache = client.getQueryCache(); | |
| 8651 | + const queries = state.queries || []; | |
| 8652 | + const newQueries = []; | |
| 8653 | + const existingQueries = []; | |
| 8654 | + for (const dehydratedQuery of queries) { | |
| 8655 | + const existingQuery = queryCache.get(dehydratedQuery.queryHash); | |
| 8656 | + if (!existingQuery) { | |
| 8657 | + newQueries.push(dehydratedQuery); | |
| 8658 | + } else { | |
| 8659 | + const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt; | |
| 8660 | + const queryAlreadyQueued = hydrationQueue?.find( | |
| 8661 | + (query) => query.queryHash === dehydratedQuery.queryHash | |
| 8662 | + ); | |
| 8663 | + if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) { | |
| 8664 | + existingQueries.push(dehydratedQuery); | |
| 8665 | + } | |
| 8666 | + } | |
| 8667 | + } | |
| 8668 | + if (newQueries.length > 0) { | |
| 8669 | + (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current); | |
| 8670 | + } | |
| 8671 | + if (existingQueries.length > 0) { | |
| 8672 | + setHydrationQueue( | |
| 8673 | + (prev) => prev ? [...prev, ...existingQueries] : existingQueries | |
| 8674 | + ); | |
| 8675 | + } | |
| 8676 | + } | |
| 8677 | + }, [client, hydrationQueue, state]); | |
| 8678 | + React.useEffect(() => { | |
| 8679 | + if (hydrationQueue) { | |
| 8680 | + (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current); | |
| 8681 | + setHydrationQueue(void 0); | |
| 8682 | + } | |
| 8683 | + }, [client, hydrationQueue]); | |
| 8684 | + return children; | |
| 8685 | +}; | |
| 8686 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8687 | +0 && (0); | |
| 8688 | +//# sourceMappingURL=HydrationBoundary.cjs.map | |
| 8689 | + | |
| 8690 | +/***/ }), | |
| 8691 | + | |
| 8692 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs": | |
| 8693 | +/*!**********************************************************************************!*\ | |
| 8694 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***! | |
| 8695 | + \**********************************************************************************/ | |
| 8696 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8697 | + | |
| 8698 | +"use strict"; | |
| 8699 | + | |
| 8700 | +"use client"; | |
| 8701 | +var __create = Object.create; | |
| 8702 | +var __defProp = Object.defineProperty; | |
| 8703 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8704 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8705 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8706 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8707 | +var __export = (target, all) => { | |
| 8708 | + for (var name in all) | |
| 8709 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8710 | +}; | |
| 8711 | +var __copyProps = (to, from, except, desc) => { | |
| 8712 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8713 | + for (let key of __getOwnPropNames(from)) | |
| 8714 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8715 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8716 | + } | |
| 8717 | + return to; | |
| 8718 | +}; | |
| 8719 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8720 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8721 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8722 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8723 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8724 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8725 | + mod | |
| 8726 | +)); | |
| 8727 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8728 | + | |
| 8729 | +// src/QueryClientProvider.tsx | |
| 8730 | +var QueryClientProvider_exports = {}; | |
| 8731 | +__export(QueryClientProvider_exports, { | |
| 8732 | + QueryClientContext: () => QueryClientContext, | |
| 8733 | + QueryClientProvider: () => QueryClientProvider, | |
| 8734 | + useQueryClient: () => useQueryClient | |
| 8735 | +}); | |
| 8736 | +module.exports = __toCommonJS(QueryClientProvider_exports); | |
| 8737 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8738 | +var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js"); | |
| 8739 | +var QueryClientContext = React.createContext( | |
| 8740 | + void 0 | |
| 8741 | +); | |
| 8742 | +var useQueryClient = (queryClient) => { | |
| 8743 | + const client = React.useContext(QueryClientContext); | |
| 8744 | + if (queryClient) { | |
| 8745 | + return queryClient; | |
| 8746 | + } | |
| 8747 | + if (!client) { | |
| 8748 | + throw new Error("No QueryClient set, use QueryClientProvider to set one"); | |
| 8749 | + } | |
| 8750 | + return client; | |
| 8751 | +}; | |
| 8752 | +var QueryClientProvider = ({ | |
| 8753 | + client, | |
| 8754 | + children | |
| 8755 | +}) => { | |
| 8756 | + React.useEffect(() => { | |
| 8757 | + client.mount(); | |
| 8758 | + return () => { | |
| 8759 | + client.unmount(); | |
| 8760 | + }; | |
| 8761 | + }, [client]); | |
| 8762 | + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children }); | |
| 8763 | +}; | |
| 8764 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8765 | +0 && (0); | |
| 8766 | +//# sourceMappingURL=QueryClientProvider.cjs.map | |
| 8767 | + | |
| 8768 | +/***/ }), | |
| 8769 | + | |
| 8770 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs": | |
| 8771 | +/*!**************************************************************************************!*\ | |
| 8772 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***! | |
| 8773 | + \**************************************************************************************/ | |
| 8774 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8775 | + | |
| 8776 | +"use strict"; | |
| 8777 | + | |
| 8778 | +"use client"; | |
| 8779 | +var __create = Object.create; | |
| 8780 | +var __defProp = Object.defineProperty; | |
| 8781 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8782 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8783 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8784 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8785 | +var __export = (target, all) => { | |
| 8786 | + for (var name in all) | |
| 8787 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8788 | +}; | |
| 8789 | +var __copyProps = (to, from, except, desc) => { | |
| 8790 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8791 | + for (let key of __getOwnPropNames(from)) | |
| 8792 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8793 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8794 | + } | |
| 8795 | + return to; | |
| 8796 | +}; | |
| 8797 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8798 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8799 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8800 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8801 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8802 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8803 | + mod | |
| 8804 | +)); | |
| 8805 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8806 | + | |
| 8807 | +// src/QueryErrorResetBoundary.tsx | |
| 8808 | +var QueryErrorResetBoundary_exports = {}; | |
| 8809 | +__export(QueryErrorResetBoundary_exports, { | |
| 8810 | + QueryErrorResetBoundary: () => QueryErrorResetBoundary, | |
| 8811 | + useQueryErrorResetBoundary: () => useQueryErrorResetBoundary | |
| 8812 | +}); | |
| 8813 | +module.exports = __toCommonJS(QueryErrorResetBoundary_exports); | |
| 8814 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8815 | +var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js"); | |
| 8816 | +function createValue() { | |
| 8817 | + let isReset = false; | |
| 8818 | + return { | |
| 8819 | + clearReset: () => { | |
| 8820 | + isReset = false; | |
| 8821 | + }, | |
| 8822 | + reset: () => { | |
| 8823 | + isReset = true; | |
| 8824 | + }, | |
| 8825 | + isReset: () => { | |
| 8826 | + return isReset; | |
| 8827 | + } | |
| 8828 | + }; | |
| 8829 | +} | |
| 8830 | +var QueryErrorResetBoundaryContext = React.createContext(createValue()); | |
| 8831 | +var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext); | |
| 8832 | +var QueryErrorResetBoundary = ({ | |
| 8833 | + children | |
| 8834 | +}) => { | |
| 8835 | + const [value] = React.useState(() => createValue()); | |
| 8836 | + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children }); | |
| 8837 | +}; | |
| 8838 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8839 | +0 && (0); | |
| 8840 | +//# sourceMappingURL=QueryErrorResetBoundary.cjs.map | |
| 8841 | + | |
| 8842 | +/***/ }), | |
| 8843 | + | |
| 8844 | +/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs": | |
| 8845 | +/*!*********************************************************************************!*\ | |
| 8846 | + !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***! | |
| 8847 | + \*********************************************************************************/ | |
| 8848 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8849 | + | |
| 8850 | +"use strict"; | |
| 8851 | + | |
| 8852 | +"use client"; | |
| 8853 | +var __create = Object.create; | |
| 8854 | +var __defProp = Object.defineProperty; | |
| 8855 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8856 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8857 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8858 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8859 | +var __export = (target, all) => { | |
| 8860 | + for (var name in all) | |
| 8861 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8862 | +}; | |
| 8863 | +var __copyProps = (to, from, except, desc) => { | |
| 8864 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8865 | + for (let key of __getOwnPropNames(from)) | |
| 8866 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8867 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8868 | + } | |
| 8869 | + return to; | |
| 8870 | +}; | |
| 8871 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8872 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8873 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8874 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8875 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8876 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8877 | + mod | |
| 8878 | +)); | |
| 8879 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8880 | + | |
| 8881 | +// src/errorBoundaryUtils.ts | |
| 8882 | +var errorBoundaryUtils_exports = {}; | |
| 8883 | +__export(errorBoundaryUtils_exports, { | |
| 8884 | + ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry, | |
| 8885 | + getHasError: () => getHasError, | |
| 8886 | + useClearResetErrorBoundary: () => useClearResetErrorBoundary | |
| 8887 | +}); | |
| 8888 | +module.exports = __toCommonJS(errorBoundaryUtils_exports); | |
| 8889 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8890 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 8891 | +var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => { | |
| 8892 | + if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) { | |
| 8893 | + if (!errorResetBoundary.isReset()) { | |
| 8894 | + options.retryOnMount = false; | |
| 8895 | + } | |
| 8896 | + } | |
| 8897 | +}; | |
| 8898 | +var useClearResetErrorBoundary = (errorResetBoundary) => { | |
| 8899 | + React.useEffect(() => { | |
| 8900 | + errorResetBoundary.clearReset(); | |
| 8901 | + }, [errorResetBoundary]); | |
| 8902 | +}; | |
| 8903 | +var getHasError = ({ | |
| 8904 | + result, | |
| 8905 | + errorResetBoundary, | |
| 8906 | + throwOnError, | |
| 8907 | + query | |
| 8908 | +}) => { | |
| 8909 | + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]); | |
| 8910 | +}; | |
| 8911 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8912 | +0 && (0); | |
| 8913 | +//# sourceMappingURL=errorBoundaryUtils.cjs.map | |
| 8914 | + | |
| 8915 | +/***/ }), | |
| 8916 | + | |
| 8917 | +/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs": | |
| 8918 | +/*!********************************************************************!*\ | |
| 8919 | + !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***! | |
| 8920 | + \********************************************************************/ | |
| 8921 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8922 | + | |
| 8923 | +"use strict"; | |
| 8924 | + | |
| 8925 | +var __defProp = Object.defineProperty; | |
| 8926 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8927 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8928 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8929 | +var __export = (target, all) => { | |
| 8930 | + for (var name in all) | |
| 8931 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8932 | +}; | |
| 8933 | +var __copyProps = (to, from, except, desc) => { | |
| 8934 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8935 | + for (let key of __getOwnPropNames(from)) | |
| 8936 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8937 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8938 | + } | |
| 8939 | + return to; | |
| 8940 | +}; | |
| 8941 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 8942 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8943 | + | |
| 8944 | +// src/index.ts | |
| 8945 | +var src_exports = {}; | |
| 8946 | +__export(src_exports, { | |
| 8947 | + HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary, | |
| 8948 | + IsRestoringProvider: () => import_isRestoring.IsRestoringProvider, | |
| 8949 | + QueryClientContext: () => import_QueryClientProvider.QueryClientContext, | |
| 8950 | + QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider, | |
| 8951 | + QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary, | |
| 8952 | + infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions, | |
| 8953 | + queryOptions: () => import_queryOptions.queryOptions, | |
| 8954 | + useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery, | |
| 8955 | + useIsFetching: () => import_useIsFetching.useIsFetching, | |
| 8956 | + useIsMutating: () => import_useMutationState.useIsMutating, | |
| 8957 | + useIsRestoring: () => import_isRestoring.useIsRestoring, | |
| 8958 | + useMutation: () => import_useMutation.useMutation, | |
| 8959 | + useMutationState: () => import_useMutationState.useMutationState, | |
| 8960 | + usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery, | |
| 8961 | + usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery, | |
| 8962 | + useQueries: () => import_useQueries.useQueries, | |
| 8963 | + useQuery: () => import_useQuery.useQuery, | |
| 8964 | + useQueryClient: () => import_QueryClientProvider.useQueryClient, | |
| 8965 | + useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary, | |
| 8966 | + useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery, | |
| 8967 | + useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries, | |
| 8968 | + useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery | |
| 8969 | +}); | |
| 8970 | +module.exports = __toCommonJS(src_exports); | |
| 8971 | +__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports); | |
| 8972 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports); | |
| 8973 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 8974 | +var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"); | |
| 8975 | +var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs"); | |
| 8976 | +var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs"); | |
| 8977 | +var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs"); | |
| 8978 | +var import_usePrefetchQuery = __webpack_require__(/*! ./usePrefetchQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs"); | |
| 8979 | +var import_usePrefetchInfiniteQuery = __webpack_require__(/*! ./usePrefetchInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs"); | |
| 8980 | +var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs"); | |
| 8981 | +var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs"); | |
| 8982 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 8983 | +var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs"); | |
| 8984 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 8985 | +var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs"); | |
| 8986 | +var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs"); | |
| 8987 | +var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"); | |
| 8988 | +var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs"); | |
| 8989 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 8990 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8991 | +0 && (0); | |
| 8992 | +//# sourceMappingURL=index.cjs.map | |
| 8993 | + | |
| 8994 | +/***/ }), | |
| 8995 | + | |
| 8996 | +/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs": | |
| 8997 | +/*!***********************************************************************************!*\ | |
| 8998 | + !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***! | |
| 8999 | + \***********************************************************************************/ | |
| 9000 | +/***/ ((module) => { | |
| 9001 | + | |
| 9002 | +"use strict"; | |
| 9003 | + | |
| 9004 | +var __defProp = Object.defineProperty; | |
| 9005 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9006 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9007 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9008 | +var __export = (target, all) => { | |
| 9009 | + for (var name in all) | |
| 9010 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9011 | +}; | |
| 9012 | +var __copyProps = (to, from, except, desc) => { | |
| 9013 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9014 | + for (let key of __getOwnPropNames(from)) | |
| 9015 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9016 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9017 | + } | |
| 9018 | + return to; | |
| 9019 | +}; | |
| 9020 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9021 | + | |
| 9022 | +// src/infiniteQueryOptions.ts | |
| 9023 | +var infiniteQueryOptions_exports = {}; | |
| 9024 | +__export(infiniteQueryOptions_exports, { | |
| 9025 | + infiniteQueryOptions: () => infiniteQueryOptions | |
| 9026 | +}); | |
| 9027 | +module.exports = __toCommonJS(infiniteQueryOptions_exports); | |
| 9028 | +function infiniteQueryOptions(options) { | |
| 9029 | + return options; | |
| 9030 | +} | |
| 9031 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9032 | +0 && (0); | |
| 9033 | +//# sourceMappingURL=infiniteQueryOptions.cjs.map | |
| 9034 | + | |
| 9035 | +/***/ }), | |
| 9036 | + | |
| 9037 | +/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs": | |
| 9038 | +/*!**************************************************************************!*\ | |
| 9039 | + !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***! | |
| 9040 | + \**************************************************************************/ | |
| 9041 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9042 | + | |
| 9043 | +"use strict"; | |
| 9044 | + | |
| 9045 | +"use client"; | |
| 9046 | +var __create = Object.create; | |
| 9047 | +var __defProp = Object.defineProperty; | |
| 9048 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9049 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9050 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9051 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9052 | +var __export = (target, all) => { | |
| 9053 | + for (var name in all) | |
| 9054 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9055 | +}; | |
| 9056 | +var __copyProps = (to, from, except, desc) => { | |
| 9057 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9058 | + for (let key of __getOwnPropNames(from)) | |
| 9059 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9060 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9061 | + } | |
| 9062 | + return to; | |
| 9063 | +}; | |
| 9064 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9065 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9066 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9067 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9068 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9069 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9070 | + mod | |
| 9071 | +)); | |
| 9072 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9073 | + | |
| 9074 | +// src/isRestoring.ts | |
| 9075 | +var isRestoring_exports = {}; | |
| 9076 | +__export(isRestoring_exports, { | |
| 9077 | + IsRestoringProvider: () => IsRestoringProvider, | |
| 9078 | + useIsRestoring: () => useIsRestoring | |
| 9079 | +}); | |
| 9080 | +module.exports = __toCommonJS(isRestoring_exports); | |
| 9081 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9082 | +var IsRestoringContext = React.createContext(false); | |
| 9083 | +var useIsRestoring = () => React.useContext(IsRestoringContext); | |
| 9084 | +var IsRestoringProvider = IsRestoringContext.Provider; | |
| 9085 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9086 | +0 && (0); | |
| 9087 | +//# sourceMappingURL=isRestoring.cjs.map | |
| 9088 | + | |
| 9089 | +/***/ }), | |
| 9090 | + | |
| 9091 | +/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs": | |
| 9092 | +/*!***************************************************************************!*\ | |
| 9093 | + !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***! | |
| 9094 | + \***************************************************************************/ | |
| 9095 | +/***/ ((module) => { | |
| 9096 | + | |
| 9097 | +"use strict"; | |
| 9098 | + | |
| 9099 | +var __defProp = Object.defineProperty; | |
| 9100 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9101 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9102 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9103 | +var __export = (target, all) => { | |
| 9104 | + for (var name in all) | |
| 9105 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9106 | +}; | |
| 9107 | +var __copyProps = (to, from, except, desc) => { | |
| 9108 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9109 | + for (let key of __getOwnPropNames(from)) | |
| 9110 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9111 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9112 | + } | |
| 9113 | + return to; | |
| 9114 | +}; | |
| 9115 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9116 | + | |
| 9117 | +// src/queryOptions.ts | |
| 9118 | +var queryOptions_exports = {}; | |
| 9119 | +__export(queryOptions_exports, { | |
| 9120 | + queryOptions: () => queryOptions | |
| 9121 | +}); | |
| 9122 | +module.exports = __toCommonJS(queryOptions_exports); | |
| 9123 | +function queryOptions(options) { | |
| 9124 | + return options; | |
| 9125 | +} | |
| 9126 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9127 | +0 && (0); | |
| 9128 | +//# sourceMappingURL=queryOptions.cjs.map | |
| 9129 | + | |
| 9130 | +/***/ }), | |
| 9131 | + | |
| 9132 | +/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs": | |
| 9133 | +/*!***********************************************************************!*\ | |
| 9134 | + !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***! | |
| 9135 | + \***********************************************************************/ | |
| 9136 | +/***/ ((module) => { | |
| 9137 | + | |
| 9138 | +"use strict"; | |
| 9139 | + | |
| 9140 | +var __defProp = Object.defineProperty; | |
| 9141 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9142 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9143 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9144 | +var __export = (target, all) => { | |
| 9145 | + for (var name in all) | |
| 9146 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9147 | +}; | |
| 9148 | +var __copyProps = (to, from, except, desc) => { | |
| 9149 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9150 | + for (let key of __getOwnPropNames(from)) | |
| 9151 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9152 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9153 | + } | |
| 9154 | + return to; | |
| 9155 | +}; | |
| 9156 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9157 | + | |
| 9158 | +// src/suspense.ts | |
| 9159 | +var suspense_exports = {}; | |
| 9160 | +__export(suspense_exports, { | |
| 9161 | + defaultThrowOnError: () => defaultThrowOnError, | |
| 9162 | + ensureSuspenseTimers: () => ensureSuspenseTimers, | |
| 9163 | + fetchOptimistic: () => fetchOptimistic, | |
| 9164 | + shouldSuspend: () => shouldSuspend, | |
| 9165 | + willFetch: () => willFetch | |
| 9166 | +}); | |
| 9167 | +module.exports = __toCommonJS(suspense_exports); | |
| 9168 | +var defaultThrowOnError = (_error, query) => query.state.data === void 0; | |
| 9169 | +var ensureSuspenseTimers = (defaultedOptions) => { | |
| 9170 | + if (defaultedOptions.suspense) { | |
| 9171 | + if (defaultedOptions.staleTime === void 0) { | |
| 9172 | + defaultedOptions.staleTime = 1e3; | |
| 9173 | + } | |
| 9174 | + if (typeof defaultedOptions.gcTime === "number") { | |
| 9175 | + defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3); | |
| 9176 | + } | |
| 9177 | + } | |
| 9178 | +}; | |
| 9179 | +var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring; | |
| 9180 | +var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending; | |
| 9181 | +var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => { | |
| 9182 | + errorResetBoundary.clearReset(); | |
| 9183 | +}); | |
| 9184 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9185 | +0 && (0); | |
| 9186 | +//# sourceMappingURL=suspense.cjs.map | |
| 9187 | + | |
| 9188 | +/***/ }), | |
| 9189 | + | |
| 9190 | +/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs": | |
| 9191 | +/*!********************************************************************!*\ | |
| 9192 | + !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***! | |
| 9193 | + \********************************************************************/ | |
| 9194 | +/***/ ((module) => { | |
| 9195 | + | |
| 9196 | +"use strict"; | |
| 9197 | + | |
| 9198 | +var __defProp = Object.defineProperty; | |
| 9199 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9200 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9201 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9202 | +var __copyProps = (to, from, except, desc) => { | |
| 9203 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9204 | + for (let key of __getOwnPropNames(from)) | |
| 9205 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9206 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9207 | + } | |
| 9208 | + return to; | |
| 9209 | +}; | |
| 9210 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9211 | + | |
| 9212 | +// src/types.ts | |
| 9213 | +var types_exports = {}; | |
| 9214 | +module.exports = __toCommonJS(types_exports); | |
| 9215 | +//# sourceMappingURL=types.cjs.map | |
| 9216 | + | |
| 9217 | +/***/ }), | |
| 9218 | + | |
| 9219 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs": | |
| 9220 | +/*!***************************************************************************!*\ | |
| 9221 | + !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***! | |
| 9222 | + \***************************************************************************/ | |
| 9223 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9224 | + | |
| 9225 | +"use strict"; | |
| 9226 | + | |
| 9227 | +"use client"; | |
| 9228 | +var __create = Object.create; | |
| 9229 | +var __defProp = Object.defineProperty; | |
| 9230 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9231 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9232 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9233 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9234 | +var __export = (target, all) => { | |
| 9235 | + for (var name in all) | |
| 9236 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9237 | +}; | |
| 9238 | +var __copyProps = (to, from, except, desc) => { | |
| 9239 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9240 | + for (let key of __getOwnPropNames(from)) | |
| 9241 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9242 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9243 | + } | |
| 9244 | + return to; | |
| 9245 | +}; | |
| 9246 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9247 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9248 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9249 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9250 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9251 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9252 | + mod | |
| 9253 | +)); | |
| 9254 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9255 | + | |
| 9256 | +// src/useBaseQuery.ts | |
| 9257 | +var useBaseQuery_exports = {}; | |
| 9258 | +__export(useBaseQuery_exports, { | |
| 9259 | + useBaseQuery: () => useBaseQuery | |
| 9260 | +}); | |
| 9261 | +module.exports = __toCommonJS(useBaseQuery_exports); | |
| 9262 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9263 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9264 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9265 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 9266 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 9267 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 9268 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9269 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 9270 | +function useBaseQuery(options, Observer, queryClient) { | |
| 9271 | + if (true) { | |
| 9272 | + if (typeof options !== "object" || Array.isArray(options)) { | |
| 9273 | + throw new Error( | |
| 9274 | + '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' | |
| 9275 | + ); | |
| 9276 | + } | |
| 9277 | + } | |
| 9278 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9279 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 9280 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 9281 | + const defaultedOptions = client.defaultQueryOptions(options); | |
| 9282 | + client.getDefaultOptions().queries?._experimental_beforeQuery?.( | |
| 9283 | + defaultedOptions | |
| 9284 | + ); | |
| 9285 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 9286 | + (0, import_suspense.ensureSuspenseTimers)(defaultedOptions); | |
| 9287 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary); | |
| 9288 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 9289 | + const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash); | |
| 9290 | + const [observer] = React.useState( | |
| 9291 | + () => new Observer( | |
| 9292 | + client, | |
| 9293 | + defaultedOptions | |
| 9294 | + ) | |
| 9295 | + ); | |
| 9296 | + const result = observer.getOptimisticResult(defaultedOptions); | |
| 9297 | + React.useSyncExternalStore( | |
| 9298 | + React.useCallback( | |
| 9299 | + (onStoreChange) => { | |
| 9300 | + const unsubscribe = isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)); | |
| 9301 | + observer.updateResult(); | |
| 9302 | + return unsubscribe; | |
| 9303 | + }, | |
| 9304 | + [observer, isRestoring] | |
| 9305 | + ), | |
| 9306 | + () => observer.getCurrentResult(), | |
| 9307 | + () => observer.getCurrentResult() | |
| 9308 | + ); | |
| 9309 | + React.useEffect(() => { | |
| 9310 | + observer.setOptions(defaultedOptions, { listeners: false }); | |
| 9311 | + }, [defaultedOptions, observer]); | |
| 9312 | + if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) { | |
| 9313 | + throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary); | |
| 9314 | + } | |
| 9315 | + if ((0, import_errorBoundaryUtils.getHasError)({ | |
| 9316 | + result, | |
| 9317 | + errorResetBoundary, | |
| 9318 | + throwOnError: defaultedOptions.throwOnError, | |
| 9319 | + query: client.getQueryCache().get(defaultedOptions.queryHash) | |
| 9320 | + })) { | |
| 9321 | + throw result.error; | |
| 9322 | + } | |
| 9323 | + ; | |
| 9324 | + client.getDefaultOptions().queries?._experimental_afterQuery?.( | |
| 9325 | + defaultedOptions, | |
| 9326 | + result | |
| 9327 | + ); | |
| 9328 | + if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) { | |
| 9329 | + const promise = isNewCacheEntry ? ( | |
| 9330 | + // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted | |
| 9331 | + (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary) | |
| 9332 | + ) : ( | |
| 9333 | + // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in | |
| 9334 | + client.getQueryCache().get(defaultedOptions.queryHash)?.promise | |
| 9335 | + ); | |
| 9336 | + promise?.catch(import_utils.noop).finally(() => { | |
| 9337 | + observer.updateResult(); | |
| 9338 | + }); | |
| 9339 | + } | |
| 9340 | + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result; | |
| 9341 | +} | |
| 9342 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9343 | +0 && (0); | |
| 9344 | +//# sourceMappingURL=useBaseQuery.cjs.map | |
| 9345 | + | |
| 9346 | +/***/ }), | |
| 9347 | + | |
| 9348 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs": | |
| 9349 | +/*!*******************************************************************************!*\ | |
| 9350 | + !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***! | |
| 9351 | + \*******************************************************************************/ | |
| 9352 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9353 | + | |
| 9354 | +"use strict"; | |
| 9355 | + | |
| 9356 | +"use client"; | |
| 9357 | +var __defProp = Object.defineProperty; | |
| 9358 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9359 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9360 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9361 | +var __export = (target, all) => { | |
| 9362 | + for (var name in all) | |
| 9363 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9364 | +}; | |
| 9365 | +var __copyProps = (to, from, except, desc) => { | |
| 9366 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9367 | + for (let key of __getOwnPropNames(from)) | |
| 9368 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9369 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9370 | + } | |
| 9371 | + return to; | |
| 9372 | +}; | |
| 9373 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9374 | + | |
| 9375 | +// src/useInfiniteQuery.ts | |
| 9376 | +var useInfiniteQuery_exports = {}; | |
| 9377 | +__export(useInfiniteQuery_exports, { | |
| 9378 | + useInfiniteQuery: () => useInfiniteQuery | |
| 9379 | +}); | |
| 9380 | +module.exports = __toCommonJS(useInfiniteQuery_exports); | |
| 9381 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9382 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9383 | +function useInfiniteQuery(options, queryClient) { | |
| 9384 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 9385 | + options, | |
| 9386 | + import_query_core.InfiniteQueryObserver, | |
| 9387 | + queryClient | |
| 9388 | + ); | |
| 9389 | +} | |
| 9390 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9391 | +0 && (0); | |
| 9392 | +//# sourceMappingURL=useInfiniteQuery.cjs.map | |
| 9393 | + | |
| 9394 | +/***/ }), | |
| 9395 | + | |
| 9396 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs": | |
| 9397 | +/*!****************************************************************************!*\ | |
| 9398 | + !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***! | |
| 9399 | + \****************************************************************************/ | |
| 9400 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9401 | + | |
| 9402 | +"use strict"; | |
| 9403 | + | |
| 9404 | +"use client"; | |
| 9405 | +var __create = Object.create; | |
| 9406 | +var __defProp = Object.defineProperty; | |
| 9407 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9408 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9409 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9410 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9411 | +var __export = (target, all) => { | |
| 9412 | + for (var name in all) | |
| 9413 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9414 | +}; | |
| 9415 | +var __copyProps = (to, from, except, desc) => { | |
| 9416 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9417 | + for (let key of __getOwnPropNames(from)) | |
| 9418 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9419 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9420 | + } | |
| 9421 | + return to; | |
| 9422 | +}; | |
| 9423 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9424 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9425 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9426 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9427 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9428 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9429 | + mod | |
| 9430 | +)); | |
| 9431 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9432 | + | |
| 9433 | +// src/useIsFetching.ts | |
| 9434 | +var useIsFetching_exports = {}; | |
| 9435 | +__export(useIsFetching_exports, { | |
| 9436 | + useIsFetching: () => useIsFetching | |
| 9437 | +}); | |
| 9438 | +module.exports = __toCommonJS(useIsFetching_exports); | |
| 9439 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9440 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9441 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9442 | +function useIsFetching(filters, queryClient) { | |
| 9443 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9444 | + const queryCache = client.getQueryCache(); | |
| 9445 | + return React.useSyncExternalStore( | |
| 9446 | + React.useCallback( | |
| 9447 | + (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9448 | + [queryCache] | |
| 9449 | + ), | |
| 9450 | + () => client.isFetching(filters), | |
| 9451 | + () => client.isFetching(filters) | |
| 9452 | + ); | |
| 9453 | +} | |
| 9454 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9455 | +0 && (0); | |
| 9456 | +//# sourceMappingURL=useIsFetching.cjs.map | |
| 9457 | + | |
| 9458 | +/***/ }), | |
| 9459 | + | |
| 9460 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs": | |
| 9461 | +/*!**************************************************************************!*\ | |
| 9462 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***! | |
| 9463 | + \**************************************************************************/ | |
| 9464 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9465 | + | |
| 9466 | +"use strict"; | |
| 9467 | + | |
| 9468 | +"use client"; | |
| 9469 | +var __create = Object.create; | |
| 9470 | +var __defProp = Object.defineProperty; | |
| 9471 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9472 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9473 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9474 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9475 | +var __export = (target, all) => { | |
| 9476 | + for (var name in all) | |
| 9477 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9478 | +}; | |
| 9479 | +var __copyProps = (to, from, except, desc) => { | |
| 9480 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9481 | + for (let key of __getOwnPropNames(from)) | |
| 9482 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9483 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9484 | + } | |
| 9485 | + return to; | |
| 9486 | +}; | |
| 9487 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9488 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9489 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9490 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9491 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9492 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9493 | + mod | |
| 9494 | +)); | |
| 9495 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9496 | + | |
| 9497 | +// src/useMutation.ts | |
| 9498 | +var useMutation_exports = {}; | |
| 9499 | +__export(useMutation_exports, { | |
| 9500 | + useMutation: () => useMutation | |
| 9501 | +}); | |
| 9502 | +module.exports = __toCommonJS(useMutation_exports); | |
| 9503 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9504 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9505 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9506 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 9507 | +function useMutation(options, queryClient) { | |
| 9508 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9509 | + const [observer] = React.useState( | |
| 9510 | + () => new import_query_core.MutationObserver( | |
| 9511 | + client, | |
| 9512 | + options | |
| 9513 | + ) | |
| 9514 | + ); | |
| 9515 | + React.useEffect(() => { | |
| 9516 | + observer.setOptions(options); | |
| 9517 | + }, [observer, options]); | |
| 9518 | + const result = React.useSyncExternalStore( | |
| 9519 | + React.useCallback( | |
| 9520 | + (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9521 | + [observer] | |
| 9522 | + ), | |
| 9523 | + () => observer.getCurrentResult(), | |
| 9524 | + () => observer.getCurrentResult() | |
| 9525 | + ); | |
| 9526 | + const mutate = React.useCallback( | |
| 9527 | + (variables, mutateOptions) => { | |
| 9528 | + observer.mutate(variables, mutateOptions).catch(import_utils.noop); | |
| 9529 | + }, | |
| 9530 | + [observer] | |
| 9531 | + ); | |
| 9532 | + if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) { | |
| 9533 | + throw result.error; | |
| 9534 | + } | |
| 9535 | + return { ...result, mutate, mutateAsync: result.mutate }; | |
| 9536 | +} | |
| 9537 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9538 | +0 && (0); | |
| 9539 | +//# sourceMappingURL=useMutation.cjs.map | |
| 9540 | + | |
| 9541 | +/***/ }), | |
| 9542 | + | |
| 9543 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs": | |
| 9544 | +/*!*******************************************************************************!*\ | |
| 9545 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***! | |
| 9546 | + \*******************************************************************************/ | |
| 9547 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9548 | + | |
| 9549 | +"use strict"; | |
| 9550 | + | |
| 9551 | +"use client"; | |
| 9552 | +var __create = Object.create; | |
| 9553 | +var __defProp = Object.defineProperty; | |
| 9554 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9555 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9556 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9557 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9558 | +var __export = (target, all) => { | |
| 9559 | + for (var name in all) | |
| 9560 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9561 | +}; | |
| 9562 | +var __copyProps = (to, from, except, desc) => { | |
| 9563 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9564 | + for (let key of __getOwnPropNames(from)) | |
| 9565 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9566 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9567 | + } | |
| 9568 | + return to; | |
| 9569 | +}; | |
| 9570 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9571 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9572 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9573 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9574 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9575 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9576 | + mod | |
| 9577 | +)); | |
| 9578 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9579 | + | |
| 9580 | +// src/useMutationState.ts | |
| 9581 | +var useMutationState_exports = {}; | |
| 9582 | +__export(useMutationState_exports, { | |
| 9583 | + useIsMutating: () => useIsMutating, | |
| 9584 | + useMutationState: () => useMutationState | |
| 9585 | +}); | |
| 9586 | +module.exports = __toCommonJS(useMutationState_exports); | |
| 9587 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9588 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9589 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9590 | +function useIsMutating(filters, queryClient) { | |
| 9591 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9592 | + return useMutationState( | |
| 9593 | + { filters: { ...filters, status: "pending" } }, | |
| 9594 | + client | |
| 9595 | + ).length; | |
| 9596 | +} | |
| 9597 | +function getResult(mutationCache, options) { | |
| 9598 | + return mutationCache.findAll(options.filters).map( | |
| 9599 | + (mutation) => options.select ? options.select(mutation) : mutation.state | |
| 9600 | + ); | |
| 9601 | +} | |
| 9602 | +function useMutationState(options = {}, queryClient) { | |
| 9603 | + const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache(); | |
| 9604 | + const optionsRef = React.useRef(options); | |
| 9605 | + const result = React.useRef(null); | |
| 9606 | + if (!result.current) { | |
| 9607 | + result.current = getResult(mutationCache, options); | |
| 9608 | + } | |
| 9609 | + React.useEffect(() => { | |
| 9610 | + optionsRef.current = options; | |
| 9611 | + }); | |
| 9612 | + return React.useSyncExternalStore( | |
| 9613 | + React.useCallback( | |
| 9614 | + (onStoreChange) => mutationCache.subscribe(() => { | |
| 9615 | + const nextResult = (0, import_query_core.replaceEqualDeep)( | |
| 9616 | + result.current, | |
| 9617 | + getResult(mutationCache, optionsRef.current) | |
| 9618 | + ); | |
| 9619 | + if (result.current !== nextResult) { | |
| 9620 | + result.current = nextResult; | |
| 9621 | + import_query_core.notifyManager.schedule(onStoreChange); | |
| 9622 | + } | |
| 9623 | + }), | |
| 9624 | + [mutationCache] | |
| 9625 | + ), | |
| 9626 | + () => result.current, | |
| 9627 | + () => result.current | |
| 9628 | + ); | |
| 9629 | +} | |
| 9630 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9631 | +0 && (0); | |
| 9632 | +//# sourceMappingURL=useMutationState.cjs.map | |
| 9633 | + | |
| 9634 | +/***/ }), | |
| 9635 | + | |
| 9636 | +/***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs": | |
| 9637 | +/*!***************************************************************************************!*\ | |
| 9638 | + !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs ***! | |
| 9639 | + \***************************************************************************************/ | |
| 9640 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9641 | + | |
| 9642 | +"use strict"; | |
| 9643 | + | |
| 9644 | +var __defProp = Object.defineProperty; | |
| 9645 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9646 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9647 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9648 | +var __export = (target, all) => { | |
| 9649 | + for (var name in all) | |
| 9650 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9651 | +}; | |
| 9652 | +var __copyProps = (to, from, except, desc) => { | |
| 9653 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9654 | + for (let key of __getOwnPropNames(from)) | |
| 9655 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9656 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9657 | + } | |
| 9658 | + return to; | |
| 9659 | +}; | |
| 9660 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9661 | + | |
| 9662 | +// src/usePrefetchInfiniteQuery.tsx | |
| 9663 | +var usePrefetchInfiniteQuery_exports = {}; | |
| 9664 | +__export(usePrefetchInfiniteQuery_exports, { | |
| 9665 | + usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery | |
| 9666 | +}); | |
| 9667 | +module.exports = __toCommonJS(usePrefetchInfiniteQuery_exports); | |
| 9668 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9669 | +function usePrefetchInfiniteQuery(options, queryClient) { | |
| 9670 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9671 | + if (!client.getQueryState(options.queryKey)) { | |
| 9672 | + client.prefetchInfiniteQuery(options); | |
| 9673 | + } | |
| 9674 | +} | |
| 9675 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9676 | +0 && (0); | |
| 9677 | +//# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map | |
| 9678 | + | |
| 9679 | +/***/ }), | |
| 9680 | + | |
| 9681 | +/***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs": | |
| 9682 | +/*!*******************************************************************************!*\ | |
| 9683 | + !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs ***! | |
| 9684 | + \*******************************************************************************/ | |
| 9685 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9686 | + | |
| 9687 | +"use strict"; | |
| 9688 | + | |
| 9689 | +var __defProp = Object.defineProperty; | |
| 9690 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9691 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9692 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9693 | +var __export = (target, all) => { | |
| 9694 | + for (var name in all) | |
| 9695 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9696 | +}; | |
| 9697 | +var __copyProps = (to, from, except, desc) => { | |
| 9698 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9699 | + for (let key of __getOwnPropNames(from)) | |
| 9700 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9701 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9702 | + } | |
| 9703 | + return to; | |
| 9704 | +}; | |
| 9705 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9706 | + | |
| 9707 | +// src/usePrefetchQuery.tsx | |
| 9708 | +var usePrefetchQuery_exports = {}; | |
| 9709 | +__export(usePrefetchQuery_exports, { | |
| 9710 | + usePrefetchQuery: () => usePrefetchQuery | |
| 9711 | +}); | |
| 9712 | +module.exports = __toCommonJS(usePrefetchQuery_exports); | |
| 9713 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9714 | +function usePrefetchQuery(options, queryClient) { | |
| 9715 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9716 | + if (!client.getQueryState(options.queryKey)) { | |
| 9717 | + client.prefetchQuery(options); | |
| 9718 | + } | |
| 9719 | +} | |
| 9720 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9721 | +0 && (0); | |
| 9722 | +//# sourceMappingURL=usePrefetchQuery.cjs.map | |
| 9723 | + | |
| 9724 | +/***/ }), | |
| 9725 | + | |
| 9726 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs": | |
| 9727 | +/*!*************************************************************************!*\ | |
| 9728 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***! | |
| 9729 | + \*************************************************************************/ | |
| 9730 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9731 | + | |
| 9732 | +"use strict"; | |
| 9733 | + | |
| 9734 | +"use client"; | |
| 9735 | +var __create = Object.create; | |
| 9736 | +var __defProp = Object.defineProperty; | |
| 9737 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9738 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9739 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9740 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9741 | +var __export = (target, all) => { | |
| 9742 | + for (var name in all) | |
| 9743 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9744 | +}; | |
| 9745 | +var __copyProps = (to, from, except, desc) => { | |
| 9746 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9747 | + for (let key of __getOwnPropNames(from)) | |
| 9748 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9749 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9750 | + } | |
| 9751 | + return to; | |
| 9752 | +}; | |
| 9753 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9754 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9755 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9756 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9757 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9758 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9759 | + mod | |
| 9760 | +)); | |
| 9761 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9762 | + | |
| 9763 | +// src/useQueries.ts | |
| 9764 | +var useQueries_exports = {}; | |
| 9765 | +__export(useQueries_exports, { | |
| 9766 | + useQueries: () => useQueries | |
| 9767 | +}); | |
| 9768 | +module.exports = __toCommonJS(useQueries_exports); | |
| 9769 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9770 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9771 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9772 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 9773 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 9774 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 9775 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9776 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 9777 | +function useQueries({ | |
| 9778 | + queries, | |
| 9779 | + ...options | |
| 9780 | +}, queryClient) { | |
| 9781 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9782 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 9783 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 9784 | + const defaultedQueries = React.useMemo( | |
| 9785 | + () => queries.map((opts) => { | |
| 9786 | + const defaultedOptions = client.defaultQueryOptions( | |
| 9787 | + opts | |
| 9788 | + ); | |
| 9789 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 9790 | + return defaultedOptions; | |
| 9791 | + }), | |
| 9792 | + [queries, client, isRestoring] | |
| 9793 | + ); | |
| 9794 | + defaultedQueries.forEach((query) => { | |
| 9795 | + (0, import_suspense.ensureSuspenseTimers)(query); | |
| 9796 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary); | |
| 9797 | + }); | |
| 9798 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 9799 | + const [observer] = React.useState( | |
| 9800 | + () => new import_query_core.QueriesObserver( | |
| 9801 | + client, | |
| 9802 | + defaultedQueries, | |
| 9803 | + options | |
| 9804 | + ) | |
| 9805 | + ); | |
| 9806 | + const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult( | |
| 9807 | + defaultedQueries, | |
| 9808 | + options.combine | |
| 9809 | + ); | |
| 9810 | + React.useSyncExternalStore( | |
| 9811 | + React.useCallback( | |
| 9812 | + (onStoreChange) => isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9813 | + [observer, isRestoring] | |
| 9814 | + ), | |
| 9815 | + () => observer.getCurrentResult(), | |
| 9816 | + () => observer.getCurrentResult() | |
| 9817 | + ); | |
| 9818 | + React.useEffect(() => { | |
| 9819 | + observer.setQueries( | |
| 9820 | + defaultedQueries, | |
| 9821 | + options, | |
| 9822 | + { | |
| 9823 | + listeners: false | |
| 9824 | + } | |
| 9825 | + ); | |
| 9826 | + }, [defaultedQueries, options, observer]); | |
| 9827 | + const shouldAtLeastOneSuspend = optimisticResult.some( | |
| 9828 | + (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result) | |
| 9829 | + ); | |
| 9830 | + const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => { | |
| 9831 | + const opts = defaultedQueries[index]; | |
| 9832 | + if (opts) { | |
| 9833 | + const queryObserver = new import_query_core.QueryObserver(client, opts); | |
| 9834 | + if ((0, import_suspense.shouldSuspend)(opts, result)) { | |
| 9835 | + return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 9836 | + } else if ((0, import_suspense.willFetch)(result, isRestoring)) { | |
| 9837 | + void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 9838 | + } | |
| 9839 | + } | |
| 9840 | + return []; | |
| 9841 | + }) : []; | |
| 9842 | + if (suspensePromises.length > 0) { | |
| 9843 | + throw Promise.all(suspensePromises); | |
| 9844 | + } | |
| 9845 | + const firstSingleResultWhichShouldThrow = optimisticResult.find( | |
| 9846 | + (result, index) => { | |
| 9847 | + const query = defaultedQueries[index]; | |
| 9848 | + return query && (0, import_errorBoundaryUtils.getHasError)({ | |
| 9849 | + result, | |
| 9850 | + errorResetBoundary, | |
| 9851 | + throwOnError: query.throwOnError, | |
| 9852 | + query: client.getQueryCache().get(query.queryHash) | |
| 9853 | + }); | |
| 9854 | + } | |
| 9855 | + ); | |
| 9856 | + if (firstSingleResultWhichShouldThrow?.error) { | |
| 9857 | + throw firstSingleResultWhichShouldThrow.error; | |
| 9858 | + } | |
| 9859 | + return getCombinedResult(trackResult()); | |
| 9860 | +} | |
| 9861 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9862 | +0 && (0); | |
| 9863 | +//# sourceMappingURL=useQueries.cjs.map | |
| 9864 | + | |
| 9865 | +/***/ }), | |
| 9866 | + | |
| 9867 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs": | |
| 9868 | +/*!***********************************************************************!*\ | |
| 9869 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***! | |
| 9870 | + \***********************************************************************/ | |
| 9871 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9872 | + | |
| 9873 | +"use strict"; | |
| 9874 | + | |
| 9875 | +"use client"; | |
| 9876 | +var __defProp = Object.defineProperty; | |
| 9877 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9878 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9879 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9880 | +var __export = (target, all) => { | |
| 9881 | + for (var name in all) | |
| 9882 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9883 | +}; | |
| 9884 | +var __copyProps = (to, from, except, desc) => { | |
| 9885 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9886 | + for (let key of __getOwnPropNames(from)) | |
| 9887 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9888 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9889 | + } | |
| 9890 | + return to; | |
| 9891 | +}; | |
| 9892 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9893 | + | |
| 9894 | +// src/useQuery.ts | |
| 9895 | +var useQuery_exports = {}; | |
| 9896 | +__export(useQuery_exports, { | |
| 9897 | + useQuery: () => useQuery | |
| 9898 | +}); | |
| 9899 | +module.exports = __toCommonJS(useQuery_exports); | |
| 9900 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9901 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9902 | +function useQuery(options, queryClient) { | |
| 9903 | + return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient); | |
| 9904 | +} | |
| 9905 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9906 | +0 && (0); | |
| 9907 | +//# sourceMappingURL=useQuery.cjs.map | |
| 9908 | + | |
| 9909 | +/***/ }), | |
| 9910 | + | |
| 9911 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs": | |
| 9912 | +/*!***************************************************************************************!*\ | |
| 9913 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***! | |
| 9914 | + \***************************************************************************************/ | |
| 9915 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9916 | + | |
| 9917 | +"use strict"; | |
| 9918 | + | |
| 9919 | +"use client"; | |
| 9920 | +var __defProp = Object.defineProperty; | |
| 9921 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9922 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9923 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9924 | +var __export = (target, all) => { | |
| 9925 | + for (var name in all) | |
| 9926 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9927 | +}; | |
| 9928 | +var __copyProps = (to, from, except, desc) => { | |
| 9929 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9930 | + for (let key of __getOwnPropNames(from)) | |
| 9931 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9932 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9933 | + } | |
| 9934 | + return to; | |
| 9935 | +}; | |
| 9936 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9937 | + | |
| 9938 | +// src/useSuspenseInfiniteQuery.ts | |
| 9939 | +var useSuspenseInfiniteQuery_exports = {}; | |
| 9940 | +__export(useSuspenseInfiniteQuery_exports, { | |
| 9941 | + useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery | |
| 9942 | +}); | |
| 9943 | +module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports); | |
| 9944 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9945 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9946 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9947 | +function useSuspenseInfiniteQuery(options, queryClient) { | |
| 9948 | + if (true) { | |
| 9949 | + if (options.queryFn === import_query_core.skipToken) { | |
| 9950 | + console.error("skipToken is not allowed for useSuspenseInfiniteQuery"); | |
| 9951 | + } | |
| 9952 | + } | |
| 9953 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 9954 | + { | |
| 9955 | + ...options, | |
| 9956 | + enabled: true, | |
| 9957 | + suspense: true, | |
| 9958 | + throwOnError: import_suspense.defaultThrowOnError | |
| 9959 | + }, | |
| 9960 | + import_query_core.InfiniteQueryObserver, | |
| 9961 | + queryClient | |
| 9962 | + ); | |
| 9963 | +} | |
| 9964 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9965 | +0 && (0); | |
| 9966 | +//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map | |
| 9967 | + | |
| 9968 | +/***/ }), | |
| 9969 | + | |
| 9970 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs": | |
| 9971 | +/*!*********************************************************************************!*\ | |
| 9972 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***! | |
| 9973 | + \*********************************************************************************/ | |
| 9974 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9975 | + | |
| 9976 | +"use strict"; | |
| 9977 | + | |
| 9978 | +"use client"; | |
| 9979 | +var __defProp = Object.defineProperty; | |
| 9980 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9981 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9982 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9983 | +var __export = (target, all) => { | |
| 9984 | + for (var name in all) | |
| 9985 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9986 | +}; | |
| 9987 | +var __copyProps = (to, from, except, desc) => { | |
| 9988 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9989 | + for (let key of __getOwnPropNames(from)) | |
| 9990 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9991 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9992 | + } | |
| 9993 | + return to; | |
| 9994 | +}; | |
| 9995 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9996 | + | |
| 9997 | +// src/useSuspenseQueries.ts | |
| 9998 | +var useSuspenseQueries_exports = {}; | |
| 9999 | +__export(useSuspenseQueries_exports, { | |
| 10000 | + useSuspenseQueries: () => useSuspenseQueries | |
| 10001 | +}); | |
| 10002 | +module.exports = __toCommonJS(useSuspenseQueries_exports); | |
| 10003 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 10004 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 10005 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 10006 | +function useSuspenseQueries(options, queryClient) { | |
| 10007 | + return (0, import_useQueries.useQueries)( | |
| 10008 | + { | |
| 10009 | + ...options, | |
| 10010 | + queries: options.queries.map((query) => { | |
| 10011 | + if (true) { | |
| 10012 | + if (query.queryFn === import_query_core.skipToken) { | |
| 10013 | + console.error("skipToken is not allowed for useSuspenseQueries"); | |
| 10014 | + } | |
| 10015 | + } | |
| 10016 | + return { | |
| 10017 | + ...query, | |
| 10018 | + suspense: true, | |
| 10019 | + throwOnError: import_suspense.defaultThrowOnError, | |
| 10020 | + enabled: true, | |
| 10021 | + placeholderData: void 0 | |
| 10022 | + }; | |
| 10023 | + }) | |
| 10024 | + }, | |
| 10025 | + queryClient | |
| 10026 | + ); | |
| 10027 | +} | |
| 10028 | +// Annotate the CommonJS export names for ESM import in node: | |
| 10029 | +0 && (0); | |
| 10030 | +//# sourceMappingURL=useSuspenseQueries.cjs.map | |
| 10031 | + | |
| 10032 | +/***/ }), | |
| 10033 | + | |
| 10034 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs": | |
| 10035 | +/*!*******************************************************************************!*\ | |
| 10036 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***! | |
| 10037 | + \*******************************************************************************/ | |
| 10038 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 10039 | + | |
| 10040 | +"use strict"; | |
| 10041 | + | |
| 10042 | +"use client"; | |
| 10043 | +var __defProp = Object.defineProperty; | |
| 10044 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 10045 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 10046 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 10047 | +var __export = (target, all) => { | |
| 10048 | + for (var name in all) | |
| 10049 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 10050 | +}; | |
| 10051 | +var __copyProps = (to, from, except, desc) => { | |
| 10052 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 10053 | + for (let key of __getOwnPropNames(from)) | |
| 10054 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 10055 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 10056 | + } | |
| 10057 | + return to; | |
| 10058 | +}; | |
| 10059 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 10060 | + | |
| 10061 | +// src/useSuspenseQuery.ts | |
| 10062 | +var useSuspenseQuery_exports = {}; | |
| 10063 | +__export(useSuspenseQuery_exports, { | |
| 10064 | + useSuspenseQuery: () => useSuspenseQuery | |
| 10065 | +}); | |
| 10066 | +module.exports = __toCommonJS(useSuspenseQuery_exports); | |
| 10067 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 10068 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 10069 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 10070 | +function useSuspenseQuery(options, queryClient) { | |
| 10071 | + if (true) { | |
| 10072 | + if (options.queryFn === import_query_core.skipToken) { | |
| 10073 | + console.error("skipToken is not allowed for useSuspenseQuery"); | |
| 10074 | + } | |
| 10075 | + } | |
| 10076 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 10077 | + { | |
| 10078 | + ...options, | |
| 10079 | + enabled: true, | |
| 10080 | + suspense: true, | |
| 10081 | + throwOnError: import_suspense.defaultThrowOnError, | |
| 10082 | + placeholderData: void 0 | |
| 10083 | + }, | |
| 10084 | + import_query_core.QueryObserver, | |
| 10085 | + queryClient | |
| 10086 | + ); | |
| 10087 | +} | |
| 10088 | +// Annotate the CommonJS export names for ESM import in node: | |
| 10089 | +0 && (0); | |
| 10090 | +//# sourceMappingURL=useSuspenseQuery.cjs.map | |
| 10091 | + | |
| 10092 | +/***/ }), | |
| 10093 | + | |
| 10094 | +/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs": | |
| 10095 | +/*!********************************************************************!*\ | |
| 10096 | + !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***! | |
| 10097 | + \********************************************************************/ | |
| 10098 | +/***/ ((module) => { | |
| 10099 | + | |
| 10100 | +"use strict"; | |
| 10101 | + | |
| 10102 | +var __defProp = Object.defineProperty; | |
| 10103 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 10104 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 10105 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 10106 | +var __export = (target, all) => { | |
| 10107 | + for (var name in all) | |
| 10108 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 10109 | +}; | |
| 10110 | +var __copyProps = (to, from, except, desc) => { | |
| 10111 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 10112 | + for (let key of __getOwnPropNames(from)) | |
| 10113 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 10114 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 10115 | + } | |
| 10116 | + return to; | |
| 10117 | +}; | |
| 10118 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 10119 | + | |
| 10120 | +// src/utils.ts | |
| 10121 | +var utils_exports = {}; | |
| 10122 | +__export(utils_exports, { | |
| 10123 | + noop: () => noop, | |
| 10124 | + shouldThrowError: () => shouldThrowError | |
| 10125 | +}); | |
| 10126 | +module.exports = __toCommonJS(utils_exports); | |
| 10127 | +function shouldThrowError(throwError, params) { | |
| 10128 | + if (typeof throwError === "function") { | |
| 10129 | + return throwError(...params); | |
| 10130 | + } | |
| 10131 | + return !!throwError; | |
| 10132 | +} | |
| 10133 | +function noop() { | |
| 10134 | +} | |
| 10135 | +// Annotate the CommonJS export names for ESM import in node: | |
| 10136 | +0 && (0); | |
| 10137 | +//# sourceMappingURL=utils.cjs.map | |
| 10138 | + | |
| 3629 | 10139 | /***/ }) |
| 3630 | 10140 | |
| 3631 | 10141 | /******/ }); |
| 3632 | 10142 | /************************************************************************/ |
| @@ -3666,14 +10176,14 @@ | ||
| 3666 | 10176 | |
| 3667 | 10177 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 3668 | 10178 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 3669 | 10179 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 3670 | -var _editorAppBarLink = __webpack_require__(/*! ./editor-app-bar-link */ "../modules/checklist/assets/js/editor-app-bar-link.js"); | |
| 10180 | +var _editorV = __webpack_require__(/*! ./editor-v-2 */ "../modules/checklist/assets/js/editor-v-2.js"); | |
| 3671 | 10181 | var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/checklist/assets/js/component.js")); |
| 3672 | 10182 | var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); |
| 3673 | 10183 | var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); |
| 3674 | 10184 | $e.components.register(new _component.default()); |
| 3675 | -(0, _editorAppBarLink.editorAppBarLink)(); | |
| 10185 | +(0, _editorV.editorV2)(); | |
| 3676 | 10186 | elementorCommon.elements.$window.on('elementor:loaded', elementorLoaded); |
| 3677 | 10187 | function elementorLoaded() { |
| 3678 | 10188 | elementor.on('document:loaded', checklistStartup); |
| 3679 | 10189 | elementorCommon.elements.$window.off('elementor:loaded', elementorLoaded); |
| @@ -3683,31 +10193,31 @@ | ||
| 3683 | 10193 | } |
| 3684 | 10194 | function _checklistStartup() { |
| 3685 | 10195 | _checklistStartup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 3686 | 10196 | var shouldHide, userProgress; |
| 3687 | - return _regenerator.default.wrap(function (_context) { | |
| 10197 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 3688 | 10198 | while (1) switch (_context.prev = _context.next) { |
| 3689 | 10199 | case 0: |
| 3690 | 10200 | shouldHide = 'yes' !== elementor.getPreferences('show_launchpad_checklist'); |
| 3691 | 10201 | if (!shouldHide) { |
| 3692 | - _context.next = 1; | |
| 10202 | + _context.next = 5; | |
| 3693 | 10203 | break; |
| 3694 | 10204 | } |
| 3695 | 10205 | $e.commands.run('checklist/toggle-icon', false); |
| 3696 | - _context.next = 3; | |
| 10206 | + _context.next = 9; | |
| 3697 | 10207 | break; |
| 3698 | - case 1: | |
| 3699 | - _context.next = 2; | |
| 10208 | + case 5: | |
| 10209 | + _context.next = 7; | |
| 3700 | 10210 | return (0, _functions.fetchUserProgress)(); |
| 3701 | - case 2: | |
| 10211 | + case 7: | |
| 3702 | 10212 | userProgress = _context.sent; |
| 3703 | 10213 | if (userProgress !== null && userProgress !== void 0 && userProgress[_consts.USER_PROGRESS.SHOULD_OPEN_IN_EDITOR]) { |
| 3704 | 10214 | (0, _functions.toggleChecklistPopup)(); |
| 3705 | 10215 | (0, _functions.dispatchChecklistOpenEvent)(); |
| 3706 | 10216 | } |
| 3707 | - case 3: | |
| 10217 | + case 9: | |
| 3708 | 10218 | elementor.off('document:loaded', checklistStartup); |
| 3709 | - case 4: | |
| 10219 | + case 10: | |
| 3710 | 10220 | case "end": |
| 3711 | 10221 | return _context.stop(); |
| 3712 | 10222 | } |
| 3713 | 10223 | }, _callee); |