@pdf-viewer/react 1.9.0-beta.4 → 1.9.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/Checkbox.module-3edaacbb.js +7 -0
  2. package/dist/Combination-da8647d4.js +693 -0
  3. package/dist/Container.module-f8b5c306.js +6 -0
  4. package/dist/DropDown.module-a78567cb.js +11 -0
  5. package/dist/MenuItem.module-bc11d0d3.js +6 -0
  6. package/dist/MenuSeparator.module-89b2ff7f.js +6 -0
  7. package/dist/PropertyItem.module-db0150cc.js +8 -0
  8. package/dist/RPSplitter.module-13d612c4.js +7 -0
  9. package/dist/RPTheme.module-bd9038da.js +8 -0
  10. package/dist/RotateTool.module-03987eba.js +6 -0
  11. package/dist/SearchTool.module-016f3a8d.js +16 -0
  12. package/dist/ToolbarLayout.module-60c3d6e8.js +2434 -0
  13. package/dist/WrapperLayout.module-147bc943.js +6 -0
  14. package/dist/assets/ToolbarLayout.css +1 -0
  15. package/dist/components/RPConfig.js +673 -691
  16. package/dist/components/RPController.js +9 -9
  17. package/dist/components/RPDropFileZone.js +21 -23
  18. package/dist/components/RPPages.js +21 -18
  19. package/dist/components/RPProvider.js +19 -15
  20. package/dist/components/layout/Container.js +10 -11
  21. package/dist/components/layout/LayoutContainer.js +19 -16
  22. package/dist/components/layout/RPDefaultLayout.js +76 -14
  23. package/dist/components/layout/RPLayout.js +74 -24
  24. package/dist/components/layout/WrapperLayout.js +7 -8
  25. package/dist/components/layout/sidebar/RPSidebar.js +51 -12
  26. package/dist/components/layout/sidebar/RPSplitter.js +7 -9
  27. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  28. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  29. package/dist/components/layout/toolbar/DocumentDialog.js +307 -24
  30. package/dist/components/layout/toolbar/FileDownloadTool.js +23 -13
  31. package/dist/components/layout/toolbar/MenuItem.js +6 -7
  32. package/dist/components/layout/toolbar/MenuSeparator.js +4 -5
  33. package/dist/components/layout/toolbar/MostPageTool.js +50 -23
  34. package/dist/components/layout/toolbar/OtherTool.js +115 -22
  35. package/dist/components/layout/toolbar/Paginate.js +99 -17
  36. package/dist/components/layout/toolbar/PrintTool.js +43 -13
  37. package/dist/components/layout/toolbar/PropertyItem.js +5 -8
  38. package/dist/components/layout/toolbar/RPToolbar.js +28 -7
  39. package/dist/components/layout/toolbar/RPToolbarEnd.js +22 -7
  40. package/dist/components/layout/toolbar/RotateTool.js +20 -21
  41. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  42. package/dist/components/layout/toolbar/SearchCloseButton.js +19 -7
  43. package/dist/components/layout/toolbar/SearchResultNavigator.js +42 -8
  44. package/dist/components/layout/toolbar/SearchTool.js +198 -29
  45. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  46. package/dist/components/layout/toolbar/ThumbnailTool.js +4 -4
  47. package/dist/components/layout/toolbar/ToolbarCustom.js +48 -20
  48. package/dist/components/layout/toolbar/ToolbarDefault.js +82 -0
  49. package/dist/components/layout/toolbar/ToolbarLayout.js +10 -0
  50. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  51. package/dist/components/layout/toolbar/ZoomTool.js +140 -28
  52. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -3
  53. package/dist/components/layout/toolbar/tools/InputPageTool.js +7 -7
  54. package/dist/components/layout/toolbar/tools/NextPageTool.js +21 -18
  55. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  56. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -3
  57. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  58. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +14 -14
  59. package/dist/components/layout/toolbar/tools/defaults/{TopbarDefaultTools.js → RPHorizontalBar.js} +29 -20
  60. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +16 -0
  61. package/dist/components/page/AnnotationLayer.js +20 -17
  62. package/dist/components/page/CanvasLayer.js +20 -17
  63. package/dist/components/page/DualPage.js +1 -1
  64. package/dist/components/page/RPPage.js +20 -17
  65. package/dist/components/page/SinglePage.js +1 -1
  66. package/dist/components/page/TextHighlightLayer.js +20 -17
  67. package/dist/components/page/TextLayer.js +20 -17
  68. package/dist/components/ui/Checkbox.js +125 -239
  69. package/dist/components/ui/DropDown.js +13 -19
  70. package/dist/components/ui/LoadingIndicator.js +22 -5
  71. package/dist/components/ui/RPTooltip.js +424 -211
  72. package/dist/contexts/PaginationContext.js +4 -4
  73. package/dist/contexts/PrintContext.js +2 -2
  74. package/dist/contexts/SearchContext.js +3 -3
  75. package/dist/contexts/ThumbnailsContext.js +1 -1
  76. package/dist/contexts/ViewportContext.js +42 -35
  77. package/dist/floating-ui.react-dom-f3f380e0.js +1447 -0
  78. package/dist/index-473557b1.js +1191 -0
  79. package/dist/index-8547fbc6.js +307 -0
  80. package/dist/main.js +76 -73
  81. package/dist/types/components/layout/RPDefaultLayout.d.ts +2 -1
  82. package/dist/types/components/layout/RPLayout.d.ts +2 -1
  83. package/dist/types/components/layout/toolbar/RPToolbar.d.ts +2 -3
  84. package/dist/types/components/layout/toolbar/ToolbarCustom.d.ts +2 -2
  85. package/dist/types/components/layout/toolbar/ToolbarDefault.d.ts +4 -0
  86. package/dist/types/components/layout/toolbar/ToolbarLayout.d.ts +3 -0
  87. package/dist/types/components/layout/toolbar/tools/defaults/RPHorizontalBar.d.ts +3 -0
  88. package/dist/types/components/layout/toolbar/tools/defaults/RPVerticalBar.d.ts +3 -0
  89. package/dist/types/main.d.ts +3 -3
  90. package/dist/types/utils/types.d.ts +17 -17
  91. package/dist/utils/hooks/useFileDownload.js +20 -17
  92. package/dist/utils/hooks/useLicense.js +1 -1
  93. package/dist/utils/hooks/usePaginate.js +20 -17
  94. package/dist/utils/hooks/usePresentPage.js +20 -17
  95. package/dist/utils/hooks/usePrint.js +20 -17
  96. package/dist/utils/hooks/useScrollToPage.js +20 -17
  97. package/dist/utils/hooks/useSearch.js +20 -17
  98. package/dist/utils/hooks/useThumbnail.js +20 -17
  99. package/dist/utils/hooks/useVirtualReactWindow.js +20 -17
  100. package/package.json +1 -1
  101. package/dist/RPLayout-5892502c.js +0 -3494
  102. package/dist/SearchCloseButton-cbf182aa.js +0 -33
  103. package/dist/assets/RPLayout.css +0 -1
  104. package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +0 -16
  105. package/dist/index-00f8683a.js +0 -1672
  106. package/dist/index-5f66a29f.js +0 -1681
  107. package/dist/index-6b37f504.js +0 -332
  108. package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +0 -3
  109. package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +0 -3
  110. /package/dist/assets/{RPDropFileZone.css → RPTheme.css} +0 -0
  111. /package/dist/assets/{SearchCloseButton.css → SearchTool.css} +0 -0
@@ -1,33 +1,33 @@
1
- var Pt = (e, t, s) => {
2
- if (!t.has(e))
1
+ var we = (t, e, s) => {
2
+ if (!e.has(t))
3
3
  throw TypeError("Cannot " + s);
4
4
  };
5
- var i = (e, t, s) => (Pt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), l = (e, t, s) => {
6
- if (t.has(e))
5
+ var i = (t, e, s) => (we(t, e, "read from private field"), s ? s.call(t) : e.get(t)), l = (t, e, s) => {
6
+ if (e.has(t))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
- }, o = (e, t, s, r) => (Pt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
- var pt = (e, t, s, r) => ({
8
+ e instanceof WeakSet ? e.add(t) : e.set(t, s);
9
+ }, o = (t, e, s, r) => (we(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
10
+ var ye = (t, e, s, r) => ({
11
11
  set _(n) {
12
- o(e, t, n, s);
12
+ o(t, e, n, s);
13
13
  },
14
14
  get _() {
15
- return i(e, t, r);
16
- }
17
- }), O = (e, t, s) => (Pt(e, t, "access private method"), s);
18
- import { jsx as ot } from "react/jsx-runtime";
19
- import { RPTheme as Jt } from "./RPTheme.js";
20
- import { ConfigContextProvider as Wt } from "../contexts/ConfigContext.js";
21
- import { useLoadWorker as Xt } from "../utils/hooks/useLoadWorker.js";
22
- import * as Nt from "react";
23
- import { LicenseProvider as Yt } from "../contexts/LicenseContext.js";
24
- var bt = class {
15
+ return i(t, e, r);
16
+ }
17
+ }), P = (t, e, s) => (we(t, e, "access private method"), s);
18
+ import { jsx as oe } from "react/jsx-runtime";
19
+ import { RPTheme as ze } from "./RPTheme.js";
20
+ import { ConfigContextProvider as Be } from "../contexts/ConfigContext.js";
21
+ import { useLoadWorker as Je } from "../utils/hooks/useLoadWorker.js";
22
+ import * as He from "react";
23
+ import { LicenseProvider as We } from "../contexts/LicenseContext.js";
24
+ var ge = class {
25
25
  constructor() {
26
26
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
27
27
  }
28
- subscribe(e) {
29
- return this.listeners.add(e), this.onSubscribe(), () => {
30
- this.listeners.delete(e), this.onUnsubscribe();
28
+ subscribe(t) {
29
+ return this.listeners.add(t), this.onSubscribe(), () => {
30
+ this.listeners.delete(t), this.onUnsubscribe();
31
31
  };
32
32
  }
33
33
  hasListeners() {
@@ -37,146 +37,146 @@ var bt = class {
37
37
  }
38
38
  onUnsubscribe() {
39
39
  }
40
- }, wt = typeof window > "u" || "Deno" in globalThis;
41
- function M() {
40
+ }, be = typeof window > "u" || "Deno" in globalThis;
41
+ function Q() {
42
42
  }
43
- function Zt(e, t) {
44
- return typeof e == "function" ? e(t) : e;
43
+ function Xe(t, e) {
44
+ return typeof t == "function" ? t(e) : t;
45
45
  }
46
- function te(e) {
47
- return typeof e == "number" && e >= 0 && e !== 1 / 0;
46
+ function Ye(t) {
47
+ return typeof t == "number" && t >= 0 && t !== 1 / 0;
48
48
  }
49
- function ee(e, t) {
50
- return Math.max(e + (t || 0) - Date.now(), 0);
49
+ function Ze(t, e) {
50
+ return Math.max(t + (e || 0) - Date.now(), 0);
51
51
  }
52
- function Ot(e, t) {
53
- return typeof e == "function" ? e(t) : e;
52
+ function Ce(t, e) {
53
+ return typeof t == "function" ? t(e) : t;
54
54
  }
55
- function se(e, t) {
56
- return typeof e == "function" ? e(t) : e;
55
+ function et(t, e) {
56
+ return typeof t == "function" ? t(e) : t;
57
57
  }
58
- function Dt(e, t) {
58
+ function qe(t, e) {
59
59
  const {
60
60
  type: s = "all",
61
61
  exact: r,
62
62
  fetchStatus: n,
63
63
  predicate: u,
64
- queryKey: d,
64
+ queryKey: h,
65
65
  stale: a
66
- } = e;
67
- if (d) {
66
+ } = t;
67
+ if (h) {
68
68
  if (r) {
69
- if (t.queryHash !== qt(d, t.options))
69
+ if (e.queryHash !== Fe(h, e.options))
70
70
  return !1;
71
- } else if (!ct(t.queryKey, d))
71
+ } else if (!ce(e.queryKey, h))
72
72
  return !1;
73
73
  }
74
74
  if (s !== "all") {
75
- const y = t.isActive();
76
- if (s === "active" && !y || s === "inactive" && y)
75
+ const f = e.isActive();
76
+ if (s === "active" && !f || s === "inactive" && f)
77
77
  return !1;
78
78
  }
79
- return !(typeof a == "boolean" && t.isStale() !== a || n && n !== t.state.fetchStatus || u && !u(t));
79
+ return !(typeof a == "boolean" && e.isStale() !== a || n && n !== e.state.fetchStatus || u && !u(e));
80
80
  }
81
- function Qt(e, t) {
82
- const { exact: s, status: r, predicate: n, mutationKey: u } = e;
81
+ function Ee(t, e) {
82
+ const { exact: s, status: r, predicate: n, mutationKey: u } = t;
83
83
  if (u) {
84
- if (!t.options.mutationKey)
84
+ if (!e.options.mutationKey)
85
85
  return !1;
86
86
  if (s) {
87
- if (ht(t.options.mutationKey) !== ht(u))
87
+ if (he(e.options.mutationKey) !== he(u))
88
88
  return !1;
89
- } else if (!ct(t.options.mutationKey, u))
89
+ } else if (!ce(e.options.mutationKey, u))
90
90
  return !1;
91
91
  }
92
- return !(r && t.state.status !== r || n && !n(t));
92
+ return !(r && e.state.status !== r || n && !n(e));
93
93
  }
94
- function qt(e, t) {
95
- return ((t == null ? void 0 : t.queryKeyHashFn) || ht)(e);
94
+ function Fe(t, e) {
95
+ return ((e == null ? void 0 : e.queryKeyHashFn) || he)(t);
96
96
  }
97
- function ht(e) {
97
+ function he(t) {
98
98
  return JSON.stringify(
99
- e,
100
- (t, s) => St(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
99
+ t,
100
+ (e, s) => Se(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
101
101
  );
102
102
  }
103
- function ct(e, t) {
104
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => ct(e[s], t[s])) : !1;
103
+ function ce(t, e) {
104
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !ce(t[s], e[s])) : !1;
105
105
  }
106
- function Ct(e, t) {
107
- if (e === t)
108
- return e;
109
- const s = At(e) && At(t);
110
- if (s || St(e) && St(t)) {
111
- const r = s ? e : Object.keys(e), n = r.length, u = s ? t : Object.keys(t), d = u.length, a = s ? [] : {}, y = new Set(r);
112
- let S = 0;
113
- for (let P = 0; P < d; P++) {
114
- const m = s ? P : u[P];
115
- (!s && y.has(m) || s) && e[m] === void 0 && t[m] === void 0 ? (a[m] = void 0, S++) : (a[m] = Ct(e[m], t[m]), a[m] === e[m] && e[m] !== void 0 && S++);
106
+ function Oe(t, e) {
107
+ if (t === e)
108
+ return t;
109
+ const s = De(t) && De(e);
110
+ if (s || Se(t) && Se(e)) {
111
+ const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), h = u.length, a = s ? [] : {};
112
+ let f = 0;
113
+ for (let w = 0; w < h; w++) {
114
+ const m = s ? w : u[w];
115
+ (!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (a[m] = void 0, f++) : (a[m] = Oe(t[m], e[m]), a[m] === t[m] && t[m] !== void 0 && f++);
116
116
  }
117
- return n === d && S === n ? e : a;
117
+ return n === h && f === n ? t : a;
118
118
  }
119
- return t;
119
+ return e;
120
120
  }
121
- function At(e) {
122
- return Array.isArray(e) && e.length === Object.keys(e).length;
121
+ function De(t) {
122
+ return Array.isArray(t) && t.length === Object.keys(t).length;
123
123
  }
124
- function St(e) {
125
- if (!Mt(e))
124
+ function Se(t) {
125
+ if (!Ae(t))
126
126
  return !1;
127
- const t = e.constructor;
128
- if (t === void 0)
127
+ const e = t.constructor;
128
+ if (e === void 0)
129
129
  return !0;
130
- const s = t.prototype;
131
- return !(!Mt(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
130
+ const s = e.prototype;
131
+ return !(!Ae(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
132
132
  }
133
- function Mt(e) {
134
- return Object.prototype.toString.call(e) === "[object Object]";
133
+ function Ae(t) {
134
+ return Object.prototype.toString.call(t) === "[object Object]";
135
135
  }
136
- function re(e) {
137
- return new Promise((t) => {
138
- setTimeout(t, e);
136
+ function tt(t) {
137
+ return new Promise((e) => {
138
+ setTimeout(e, t);
139
139
  });
140
140
  }
141
- function ie(e, t, s) {
141
+ function st(t, e, s) {
142
142
  if (typeof s.structuralSharing == "function")
143
- return s.structuralSharing(e, t);
143
+ return s.structuralSharing(t, e);
144
144
  if (s.structuralSharing !== !1) {
145
145
  if (process.env.NODE_ENV !== "production")
146
146
  try {
147
- return Ct(e, t);
147
+ return Oe(t, e);
148
148
  } catch (r) {
149
- throw console.error(
149
+ console.error(
150
150
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
151
- ), r;
151
+ );
152
152
  }
153
- return Ct(e, t);
153
+ return Oe(t, e);
154
154
  }
155
- return t;
155
+ return e;
156
156
  }
157
- function ne(e, t, s = 0) {
158
- const r = [...e, t];
157
+ function rt(t, e, s = 0) {
158
+ const r = [...t, e];
159
159
  return s && r.length > s ? r.slice(1) : r;
160
160
  }
161
- function ae(e, t, s = 0) {
162
- const r = [t, ...e];
161
+ function it(t, e, s = 0) {
162
+ const r = [e, ...t];
163
163
  return s && r.length > s ? r.slice(0, -1) : r;
164
164
  }
165
- var vt = Symbol();
166
- function Gt(e, t) {
167
- return process.env.NODE_ENV !== "production" && e.queryFn === vt && console.error(
168
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
169
- ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === vt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
165
+ var me = Symbol();
166
+ function Le(t, e) {
167
+ return process.env.NODE_ENV !== "production" && t.queryFn === me && console.error(
168
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
169
+ ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === me ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
170
170
  }
171
- var B, N, tt, xt, ue = (xt = class extends bt {
171
+ var B, N, Z, Re, nt = (Re = class extends ge {
172
172
  constructor() {
173
173
  super();
174
174
  l(this, B, void 0);
175
175
  l(this, N, void 0);
176
- l(this, tt, void 0);
177
- o(this, tt, (t) => {
178
- if (!wt && window.addEventListener) {
179
- const s = () => t();
176
+ l(this, Z, void 0);
177
+ o(this, Z, (e) => {
178
+ if (!be && window.addEventListener) {
179
+ const s = () => e();
180
180
  return window.addEventListener("visibilitychange", s, !1), () => {
181
181
  window.removeEventListener("visibilitychange", s);
182
182
  };
@@ -184,40 +184,40 @@ var B, N, tt, xt, ue = (xt = class extends bt {
184
184
  });
185
185
  }
186
186
  onSubscribe() {
187
- i(this, N) || this.setEventListener(i(this, tt));
187
+ i(this, N) || this.setEventListener(i(this, Z));
188
188
  }
189
189
  onUnsubscribe() {
190
- var t;
191
- this.hasListeners() || ((t = i(this, N)) == null || t.call(this), o(this, N, void 0));
190
+ var e;
191
+ this.hasListeners() || ((e = i(this, N)) == null || e.call(this), o(this, N, void 0));
192
192
  }
193
- setEventListener(t) {
193
+ setEventListener(e) {
194
194
  var s;
195
- o(this, tt, t), (s = i(this, N)) == null || s.call(this), o(this, N, t((r) => {
195
+ o(this, Z, e), (s = i(this, N)) == null || s.call(this), o(this, N, e((r) => {
196
196
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
197
197
  }));
198
198
  }
199
- setFocused(t) {
200
- i(this, B) !== t && (o(this, B, t), this.onFocus());
199
+ setFocused(e) {
200
+ i(this, B) !== e && (o(this, B, e), this.onFocus());
201
201
  }
202
202
  onFocus() {
203
- const t = this.isFocused();
203
+ const e = this.isFocused();
204
204
  this.listeners.forEach((s) => {
205
- s(t);
205
+ s(e);
206
206
  });
207
207
  }
208
208
  isFocused() {
209
- var t;
210
- return typeof i(this, B) == "boolean" ? i(this, B) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
209
+ var e;
210
+ return typeof i(this, B) == "boolean" ? i(this, B) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
211
211
  }
212
- }, B = new WeakMap(), N = new WeakMap(), tt = new WeakMap(), xt), _t = new ue(), et, G, st, jt, oe = (jt = class extends bt {
212
+ }, B = new WeakMap(), N = new WeakMap(), Z = new WeakMap(), Re), Ne = new nt(), ee, G, te, Te, at = (Te = class extends ge {
213
213
  constructor() {
214
214
  super();
215
- l(this, et, !0);
215
+ l(this, ee, !0);
216
216
  l(this, G, void 0);
217
- l(this, st, void 0);
218
- o(this, st, (t) => {
219
- if (!wt && window.addEventListener) {
220
- const s = () => t(!0), r = () => t(!1);
217
+ l(this, te, void 0);
218
+ o(this, te, (e) => {
219
+ if (!be && window.addEventListener) {
220
+ const s = () => e(!0), r = () => e(!1);
221
221
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
222
222
  window.removeEventListener("online", s), window.removeEventListener("offline", r);
223
223
  };
@@ -225,29 +225,29 @@ var B, N, tt, xt, ue = (xt = class extends bt {
225
225
  });
226
226
  }
227
227
  onSubscribe() {
228
- i(this, G) || this.setEventListener(i(this, st));
228
+ i(this, G) || this.setEventListener(i(this, te));
229
229
  }
230
230
  onUnsubscribe() {
231
- var t;
232
- this.hasListeners() || ((t = i(this, G)) == null || t.call(this), o(this, G, void 0));
231
+ var e;
232
+ this.hasListeners() || ((e = i(this, G)) == null || e.call(this), o(this, G, void 0));
233
233
  }
234
- setEventListener(t) {
234
+ setEventListener(e) {
235
235
  var s;
236
- o(this, st, t), (s = i(this, G)) == null || s.call(this), o(this, G, t(this.setOnline.bind(this)));
236
+ o(this, te, e), (s = i(this, G)) == null || s.call(this), o(this, G, e(this.setOnline.bind(this)));
237
237
  }
238
- setOnline(t) {
239
- i(this, et) !== t && (o(this, et, t), this.listeners.forEach((r) => {
240
- r(t);
238
+ setOnline(e) {
239
+ i(this, ee) !== e && (o(this, ee, e), this.listeners.forEach((r) => {
240
+ r(e);
241
241
  }));
242
242
  }
243
243
  isOnline() {
244
- return i(this, et);
244
+ return i(this, ee);
245
245
  }
246
- }, et = new WeakMap(), G = new WeakMap(), st = new WeakMap(), jt), gt = new oe();
247
- function he() {
248
- let e, t;
246
+ }, ee = new WeakMap(), G = new WeakMap(), te = new WeakMap(), Te), ve = new at();
247
+ function ut() {
248
+ let t, e;
249
249
  const s = new Promise((n, u) => {
250
- e = n, t = u;
250
+ t = n, e = u;
251
251
  });
252
252
  s.status = "pending", s.catch(() => {
253
253
  });
@@ -258,123 +258,122 @@ function he() {
258
258
  r({
259
259
  status: "fulfilled",
260
260
  value: n
261
- }), e(n);
261
+ }), t(n);
262
262
  }, s.reject = (n) => {
263
263
  r({
264
264
  status: "rejected",
265
265
  reason: n
266
- }), t(n);
266
+ }), e(n);
267
267
  }, s;
268
268
  }
269
- function ce(e) {
270
- return Math.min(1e3 * 2 ** e, 3e4);
269
+ function ot(t) {
270
+ return Math.min(1e3 * 2 ** t, 3e4);
271
271
  }
272
- function Vt(e) {
273
- return (e ?? "online") === "online" ? gt.isOnline() : !0;
272
+ function Ge(t) {
273
+ return (t ?? "online") === "online" ? ve.isOnline() : !0;
274
274
  }
275
- var $t = class extends Error {
276
- constructor(e) {
277
- super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
275
+ var _e = class extends Error {
276
+ constructor(t) {
277
+ super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
278
278
  }
279
279
  };
280
- function Ft(e) {
281
- return e instanceof $t;
280
+ function Pe(t) {
281
+ return t instanceof _e;
282
282
  }
283
- function zt(e) {
284
- let t = !1, s = 0, r = !1, n;
285
- const u = he(), d = (h) => {
286
- var f;
287
- r || (c(new $t(h)), (f = e.abort) == null || f.call(e));
283
+ function Ve(t) {
284
+ let e = !1, s = 0, r = !1, n;
285
+ const u = ut(), h = (c) => {
286
+ var p;
287
+ r || (y(new _e(c)), (p = t.abort) == null || p.call(t));
288
288
  }, a = () => {
289
- t = !0;
290
- }, y = () => {
291
- t = !1;
292
- }, S = () => _t.isFocused() && (e.networkMode === "always" || gt.isOnline()) && e.canRun(), P = () => Vt(e.networkMode) && e.canRun(), m = (h) => {
293
- var f;
294
- r || (r = !0, (f = e.onSuccess) == null || f.call(e, h), n == null || n(), u.resolve(h));
295
- }, c = (h) => {
296
- var f;
297
- r || (r = !0, (f = e.onError) == null || f.call(e, h), n == null || n(), u.reject(h));
298
- }, v = () => new Promise((h) => {
299
- var f;
300
- n = (F) => {
301
- (r || S()) && h(F);
302
- }, (f = e.onPause) == null || f.call(e);
289
+ e = !0;
290
+ }, f = () => {
291
+ e = !1;
292
+ }, w = () => Ne.isFocused() && (t.networkMode === "always" || ve.isOnline()) && t.canRun(), m = () => Ge(t.networkMode) && t.canRun(), d = (c) => {
293
+ var p;
294
+ r || (r = !0, (p = t.onSuccess) == null || p.call(t, c), n == null || n(), u.resolve(c));
295
+ }, y = (c) => {
296
+ var p;
297
+ r || (r = !0, (p = t.onError) == null || p.call(t, c), n == null || n(), u.reject(c));
298
+ }, q = () => new Promise((c) => {
299
+ var p;
300
+ n = (E) => {
301
+ (r || w()) && c(E);
302
+ }, (p = t.onPause) == null || p.call(t);
303
303
  }).then(() => {
304
- var h;
305
- n = void 0, r || (h = e.onContinue) == null || h.call(e);
306
- }), g = () => {
304
+ var c;
305
+ n = void 0, r || (c = t.onContinue) == null || c.call(t);
306
+ }), S = () => {
307
307
  if (r)
308
308
  return;
309
- let h;
310
- const f = s === 0 ? e.initialPromise : void 0;
309
+ let c;
310
+ const p = s === 0 ? t.initialPromise : void 0;
311
311
  try {
312
- h = f ?? e.fn();
313
- } catch (F) {
314
- h = Promise.reject(F);
312
+ c = p ?? t.fn();
313
+ } catch (E) {
314
+ c = Promise.reject(E);
315
315
  }
316
- Promise.resolve(h).then(m).catch((F) => {
317
- var H;
316
+ Promise.resolve(c).then(d).catch((E) => {
317
+ var k;
318
318
  if (r)
319
319
  return;
320
- const A = e.retry ?? (wt ? 0 : 3), b = e.retryDelay ?? ce, D = typeof b == "function" ? b(s, F) : b, x = A === !0 || typeof A == "number" && s < A || typeof A == "function" && A(s, F);
321
- if (t || !x) {
322
- c(F);
320
+ const M = t.retry ?? (be ? 0 : 3), g = t.retryDelay ?? ot, D = typeof g == "function" ? g(s, E) : g, j = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, E);
321
+ if (e || !j) {
322
+ y(E);
323
323
  return;
324
324
  }
325
- s++, (H = e.onFail) == null || H.call(e, s, F), re(D).then(() => S() ? void 0 : v()).then(() => {
326
- t ? c(F) : g();
325
+ s++, (k = t.onFail) == null || k.call(t, s, E), tt(D).then(() => w() ? void 0 : q()).then(() => {
326
+ e ? y(E) : S();
327
327
  });
328
328
  });
329
329
  };
330
330
  return {
331
331
  promise: u,
332
- cancel: d,
332
+ cancel: h,
333
333
  continue: () => (n == null || n(), u),
334
334
  cancelRetry: a,
335
- continueRetry: y,
336
- canStart: P,
337
- start: () => (P() ? g() : v().then(g), u)
335
+ continueRetry: f,
336
+ canStart: m,
337
+ start: () => (m() ? S() : q().then(S), u)
338
338
  };
339
339
  }
340
- var le = (e) => setTimeout(e, 0);
341
- function de() {
342
- let e = [], t = 0, s = (a) => {
340
+ function ht() {
341
+ let t = [], e = 0, s = (a) => {
343
342
  a();
344
343
  }, r = (a) => {
345
344
  a();
346
- }, n = le;
345
+ }, n = (a) => setTimeout(a, 0);
347
346
  const u = (a) => {
348
- t ? e.push(a) : n(() => {
347
+ e ? t.push(a) : n(() => {
349
348
  s(a);
350
349
  });
351
- }, d = () => {
352
- const a = e;
353
- e = [], a.length && n(() => {
350
+ }, h = () => {
351
+ const a = t;
352
+ t = [], a.length && n(() => {
354
353
  r(() => {
355
- a.forEach((y) => {
356
- s(y);
354
+ a.forEach((f) => {
355
+ s(f);
357
356
  });
358
357
  });
359
358
  });
360
359
  };
361
360
  return {
362
361
  batch: (a) => {
363
- let y;
364
- t++;
362
+ let f;
363
+ e++;
365
364
  try {
366
- y = a();
365
+ f = a();
367
366
  } finally {
368
- t--, t || d();
367
+ e--, e || h();
369
368
  }
370
- return y;
369
+ return f;
371
370
  },
372
371
  /**
373
372
  * All calls to the wrapped function will be batched.
374
373
  */
375
- batchCalls: (a) => (...y) => {
374
+ batchCalls: (a) => (...f) => {
376
375
  u(() => {
377
- a(...y);
376
+ a(...f);
378
377
  });
379
378
  },
380
379
  schedule: u,
@@ -397,7 +396,7 @@ function de() {
397
396
  }
398
397
  };
399
398
  }
400
- var E = de(), J, kt, Bt = (kt = class {
399
+ var C = ht(), J, je, $e = (je = class {
401
400
  constructor() {
402
401
  l(this, J, void 0);
403
402
  }
@@ -405,222 +404,214 @@ var E = de(), J, kt, Bt = (kt = class {
405
404
  this.clearGcTimeout();
406
405
  }
407
406
  scheduleGc() {
408
- this.clearGcTimeout(), te(this.gcTime) && o(this, J, setTimeout(() => {
407
+ this.clearGcTimeout(), Ye(this.gcTime) && o(this, J, setTimeout(() => {
409
408
  this.optionalRemove();
410
409
  }, this.gcTime));
411
410
  }
412
- updateGcTime(e) {
411
+ updateGcTime(t) {
413
412
  this.gcTime = Math.max(
414
413
  this.gcTime || 0,
415
- e ?? (wt ? 1 / 0 : 5 * 60 * 1e3)
414
+ t ?? (be ? 1 / 0 : 5 * 60 * 1e3)
416
415
  );
417
416
  }
418
417
  clearGcTimeout() {
419
418
  i(this, J) && (clearTimeout(i(this, J)), o(this, J, void 0));
420
419
  }
421
- }, J = new WeakMap(), kt), rt, W, Q, X, C, lt, Y, R, K, Ut, fe = (Ut = class extends Bt {
422
- constructor(t) {
420
+ }, J = new WeakMap(), je), se, re, A, W, O, le, X, R, x, ke, ct = (ke = class extends $e {
421
+ constructor(e) {
423
422
  super();
424
423
  l(this, R);
425
- l(this, rt, void 0);
424
+ l(this, se, void 0);
425
+ l(this, re, void 0);
426
+ l(this, A, void 0);
426
427
  l(this, W, void 0);
427
- l(this, Q, void 0);
428
+ l(this, O, void 0);
429
+ l(this, le, void 0);
428
430
  l(this, X, void 0);
429
- l(this, C, void 0);
430
- l(this, lt, void 0);
431
- l(this, Y, void 0);
432
- o(this, Y, !1), o(this, lt, t.defaultOptions), this.setOptions(t.options), this.observers = [], o(this, X, t.client), o(this, Q, i(this, X).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, o(this, rt, pe(this.options)), this.state = t.state ?? i(this, rt), this.scheduleGc();
431
+ o(this, X, !1), o(this, le, e.defaultOptions), this.setOptions(e.options), this.observers = [], o(this, W, e.client), o(this, A, i(this, W).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, o(this, se, dt(this.options)), this.state = e.state ?? i(this, se), this.scheduleGc();
433
432
  }
434
433
  get meta() {
435
434
  return this.options.meta;
436
435
  }
437
436
  get promise() {
438
- var t;
439
- return (t = i(this, C)) == null ? void 0 : t.promise;
437
+ var e;
438
+ return (e = i(this, O)) == null ? void 0 : e.promise;
440
439
  }
441
- setOptions(t) {
442
- this.options = { ...i(this, lt), ...t }, this.updateGcTime(this.options.gcTime);
440
+ setOptions(e) {
441
+ this.options = { ...i(this, le), ...e }, this.updateGcTime(this.options.gcTime);
443
442
  }
444
443
  optionalRemove() {
445
- !this.observers.length && this.state.fetchStatus === "idle" && i(this, Q).remove(this);
444
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, A).remove(this);
446
445
  }
447
- setData(t, s) {
448
- const r = ie(this.state.data, t, this.options);
449
- return O(this, R, K).call(this, {
446
+ setData(e, s) {
447
+ const r = st(this.state.data, e, this.options);
448
+ return P(this, R, x).call(this, {
450
449
  data: r,
451
450
  type: "success",
452
451
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
453
452
  manual: s == null ? void 0 : s.manual
454
453
  }), r;
455
454
  }
456
- setState(t, s) {
457
- O(this, R, K).call(this, { type: "setState", state: t, setStateOptions: s });
455
+ setState(e, s) {
456
+ P(this, R, x).call(this, { type: "setState", state: e, setStateOptions: s });
458
457
  }
459
- cancel(t) {
458
+ cancel(e) {
460
459
  var r, n;
461
- const s = (r = i(this, C)) == null ? void 0 : r.promise;
462
- return (n = i(this, C)) == null || n.cancel(t), s ? s.then(M).catch(M) : Promise.resolve();
460
+ const s = (r = i(this, O)) == null ? void 0 : r.promise;
461
+ return (n = i(this, O)) == null || n.cancel(e), s ? s.then(Q).catch(Q) : Promise.resolve();
463
462
  }
464
463
  destroy() {
465
464
  super.destroy(), this.cancel({ silent: !0 });
466
465
  }
467
466
  reset() {
468
- this.destroy(), this.setState(i(this, rt));
467
+ this.destroy(), this.setState(i(this, se));
469
468
  }
470
469
  isActive() {
471
470
  return this.observers.some(
472
- (t) => se(t.options.enabled, this) !== !1
471
+ (e) => et(e.options.enabled, this) !== !1
473
472
  );
474
473
  }
475
474
  isDisabled() {
476
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === vt || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
477
- }
478
- isStatic() {
479
- return this.getObserversCount() > 0 ? this.observers.some(
480
- (t) => Ot(t.options.staleTime, this) === "static"
481
- ) : !1;
475
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === me || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
482
476
  }
483
477
  isStale() {
484
- return this.getObserversCount() > 0 ? this.observers.some(
485
- (t) => t.getCurrentResult().isStale
486
- ) : this.state.data === void 0 || this.state.isInvalidated;
478
+ return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
479
+ (e) => e.getCurrentResult().isStale
480
+ ) : this.state.data === void 0;
487
481
  }
488
- isStaleByTime(t = 0) {
489
- return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !ee(this.state.dataUpdatedAt, t);
482
+ isStaleByTime(e = 0) {
483
+ return this.state.isInvalidated || this.state.data === void 0 || !Ze(this.state.dataUpdatedAt, e);
490
484
  }
491
485
  onFocus() {
492
486
  var s;
493
- const t = this.observers.find((r) => r.shouldFetchOnWindowFocus());
494
- t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
487
+ const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
488
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, O)) == null || s.continue();
495
489
  }
496
490
  onOnline() {
497
491
  var s;
498
- const t = this.observers.find((r) => r.shouldFetchOnReconnect());
499
- t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
492
+ const e = this.observers.find((r) => r.shouldFetchOnReconnect());
493
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, O)) == null || s.continue();
500
494
  }
501
- addObserver(t) {
502
- this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), i(this, Q).notify({ type: "observerAdded", query: this, observer: t }));
495
+ addObserver(e) {
496
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, A).notify({ type: "observerAdded", query: this, observer: e }));
503
497
  }
504
- removeObserver(t) {
505
- this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (i(this, C) && (i(this, Y) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, Q).notify({ type: "observerRemoved", query: this, observer: t }));
498
+ removeObserver(e) {
499
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, O) && (i(this, X) ? i(this, O).cancel({ revert: !0 }) : i(this, O).cancelRetry()), this.scheduleGc()), i(this, A).notify({ type: "observerRemoved", query: this, observer: e }));
506
500
  }
507
501
  getObserversCount() {
508
502
  return this.observers.length;
509
503
  }
510
504
  invalidate() {
511
- this.state.isInvalidated || O(this, R, K).call(this, { type: "invalidate" });
505
+ this.state.isInvalidated || P(this, R, x).call(this, { type: "invalidate" });
512
506
  }
513
- fetch(t, s) {
514
- var S, P, m;
507
+ fetch(e, s) {
508
+ var f, w, m;
515
509
  if (this.state.fetchStatus !== "idle") {
516
510
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
517
511
  this.cancel({ silent: !0 });
518
- else if (i(this, C))
519
- return i(this, C).continueRetry(), i(this, C).promise;
512
+ else if (i(this, O))
513
+ return i(this, O).continueRetry(), i(this, O).promise;
520
514
  }
521
- if (t && this.setOptions(t), !this.options.queryFn) {
522
- const c = this.observers.find((v) => v.options.queryFn);
523
- c && this.setOptions(c.options);
515
+ if (e && this.setOptions(e), !this.options.queryFn) {
516
+ const d = this.observers.find((y) => y.options.queryFn);
517
+ d && this.setOptions(d.options);
524
518
  }
525
519
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
526
520
  "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']"
527
521
  ));
528
- const r = new AbortController(), n = (c) => {
529
- Object.defineProperty(c, "signal", {
522
+ const r = new AbortController(), n = (d) => {
523
+ Object.defineProperty(d, "signal", {
530
524
  enumerable: !0,
531
- get: () => (o(this, Y, !0), r.signal)
525
+ get: () => (o(this, X, !0), r.signal)
532
526
  });
533
527
  }, u = () => {
534
- const c = Gt(this.options, s), g = (() => {
535
- const h = {
536
- client: i(this, X),
537
- queryKey: this.queryKey,
538
- meta: this.meta
539
- };
540
- return n(h), h;
541
- })();
542
- return o(this, Y, !1), this.options.persister ? this.options.persister(
543
- c,
544
- g,
545
- this
546
- ) : c(g);
547
- }, a = (() => {
548
- const c = {
549
- fetchOptions: s,
550
- options: this.options,
528
+ const d = Le(this.options, s), y = {
529
+ client: i(this, W),
551
530
  queryKey: this.queryKey,
552
- client: i(this, X),
553
- state: this.state,
554
- fetchFn: u
531
+ meta: this.meta
555
532
  };
556
- return n(c), c;
557
- })();
558
- (S = this.options.behavior) == null || S.onFetch(a, this), o(this, W, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((P = a.fetchOptions) == null ? void 0 : P.meta)) && O(this, R, K).call(this, { type: "fetch", meta: (m = a.fetchOptions) == null ? void 0 : m.meta });
559
- const y = (c) => {
560
- var v, g, h, f;
561
- Ft(c) && c.silent || O(this, R, K).call(this, {
533
+ return n(y), o(this, X, !1), this.options.persister ? this.options.persister(
534
+ d,
535
+ y,
536
+ this
537
+ ) : d(y);
538
+ }, h = {
539
+ fetchOptions: s,
540
+ options: this.options,
541
+ queryKey: this.queryKey,
542
+ client: i(this, W),
543
+ state: this.state,
544
+ fetchFn: u
545
+ };
546
+ n(h), (f = this.options.behavior) == null || f.onFetch(
547
+ h,
548
+ this
549
+ ), o(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((w = h.fetchOptions) == null ? void 0 : w.meta)) && P(this, R, x).call(this, { type: "fetch", meta: (m = h.fetchOptions) == null ? void 0 : m.meta });
550
+ const a = (d) => {
551
+ var y, q, S, c;
552
+ Pe(d) && d.silent || P(this, R, x).call(this, {
562
553
  type: "error",
563
- error: c
564
- }), Ft(c) || ((g = (v = i(this, Q).config).onError) == null || g.call(
565
- v,
566
- c,
554
+ error: d
555
+ }), Pe(d) || ((q = (y = i(this, A).config).onError) == null || q.call(
556
+ y,
557
+ d,
567
558
  this
568
- ), (f = (h = i(this, Q).config).onSettled) == null || f.call(
569
- h,
559
+ ), (c = (S = i(this, A).config).onSettled) == null || c.call(
560
+ S,
570
561
  this.state.data,
571
- c,
562
+ d,
572
563
  this
573
564
  )), this.scheduleGc();
574
565
  };
575
- return o(this, C, zt({
566
+ return o(this, O, Ve({
576
567
  initialPromise: s == null ? void 0 : s.initialPromise,
577
- fn: a.fetchFn,
568
+ fn: h.fetchFn,
578
569
  abort: r.abort.bind(r),
579
- onSuccess: (c) => {
580
- var v, g, h, f;
581
- if (c === void 0) {
570
+ onSuccess: (d) => {
571
+ var y, q, S, c;
572
+ if (d === void 0) {
582
573
  process.env.NODE_ENV !== "production" && console.error(
583
574
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
584
- ), y(new Error(`${this.queryHash} data is undefined`));
575
+ ), a(new Error(`${this.queryHash} data is undefined`));
585
576
  return;
586
577
  }
587
578
  try {
588
- this.setData(c);
589
- } catch (F) {
590
- y(F);
579
+ this.setData(d);
580
+ } catch (p) {
581
+ a(p);
591
582
  return;
592
583
  }
593
- (g = (v = i(this, Q).config).onSuccess) == null || g.call(v, c, this), (f = (h = i(this, Q).config).onSettled) == null || f.call(
594
- h,
595
- c,
584
+ (q = (y = i(this, A).config).onSuccess) == null || q.call(y, d, this), (c = (S = i(this, A).config).onSettled) == null || c.call(
585
+ S,
586
+ d,
596
587
  this.state.error,
597
588
  this
598
589
  ), this.scheduleGc();
599
590
  },
600
- onError: y,
601
- onFail: (c, v) => {
602
- O(this, R, K).call(this, { type: "failed", failureCount: c, error: v });
591
+ onError: a,
592
+ onFail: (d, y) => {
593
+ P(this, R, x).call(this, { type: "failed", failureCount: d, error: y });
603
594
  },
604
595
  onPause: () => {
605
- O(this, R, K).call(this, { type: "pause" });
596
+ P(this, R, x).call(this, { type: "pause" });
606
597
  },
607
598
  onContinue: () => {
608
- O(this, R, K).call(this, { type: "continue" });
599
+ P(this, R, x).call(this, { type: "continue" });
609
600
  },
610
- retry: a.options.retry,
611
- retryDelay: a.options.retryDelay,
612
- networkMode: a.options.networkMode,
601
+ retry: h.options.retry,
602
+ retryDelay: h.options.retryDelay,
603
+ networkMode: h.options.networkMode,
613
604
  canRun: () => !0
614
- })), i(this, C).start();
605
+ })), i(this, O).start();
615
606
  }
616
- }, rt = new WeakMap(), W = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), C = new WeakMap(), lt = new WeakMap(), Y = new WeakMap(), R = new WeakSet(), K = function(t) {
607
+ }, se = new WeakMap(), re = new WeakMap(), A = new WeakMap(), W = new WeakMap(), O = new WeakMap(), le = new WeakMap(), X = new WeakMap(), R = new WeakSet(), x = function(e) {
617
608
  const s = (r) => {
618
- switch (t.type) {
609
+ switch (e.type) {
619
610
  case "failed":
620
611
  return {
621
612
  ...r,
622
- fetchFailureCount: t.failureCount,
623
- fetchFailureReason: t.error
613
+ fetchFailureCount: e.failureCount,
614
+ fetchFailureReason: e.error
624
615
  };
625
616
  case "pause":
626
617
  return {
@@ -635,27 +626,27 @@ var E = de(), J, kt, Bt = (kt = class {
635
626
  case "fetch":
636
627
  return {
637
628
  ...r,
638
- ...ye(r.data, this.options),
639
- fetchMeta: t.meta ?? null
629
+ ...lt(r.data, this.options),
630
+ fetchMeta: e.meta ?? null
640
631
  };
641
632
  case "success":
642
- return o(this, W, void 0), {
633
+ return {
643
634
  ...r,
644
- data: t.data,
635
+ data: e.data,
645
636
  dataUpdateCount: r.dataUpdateCount + 1,
646
- dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
637
+ dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
647
638
  error: null,
648
639
  isInvalidated: !1,
649
640
  status: "success",
650
- ...!t.manual && {
641
+ ...!e.manual && {
651
642
  fetchStatus: "idle",
652
643
  fetchFailureCount: 0,
653
644
  fetchFailureReason: null
654
645
  }
655
646
  };
656
647
  case "error":
657
- const n = t.error;
658
- return Ft(n) && n.revert && i(this, W) ? { ...i(this, W), fetchStatus: "idle" } : {
648
+ const n = e.error;
649
+ return Pe(n) && n.revert && i(this, re) ? { ...i(this, re), fetchStatus: "idle" } : {
659
650
  ...r,
660
651
  error: n,
661
652
  errorUpdateCount: r.errorUpdateCount + 1,
@@ -673,31 +664,31 @@ var E = de(), J, kt, Bt = (kt = class {
673
664
  case "setState":
674
665
  return {
675
666
  ...r,
676
- ...t.state
667
+ ...e.state
677
668
  };
678
669
  }
679
670
  };
680
- this.state = s(this.state), E.batch(() => {
671
+ this.state = s(this.state), C.batch(() => {
681
672
  this.observers.forEach((r) => {
682
673
  r.onQueryUpdate();
683
- }), i(this, Q).notify({ query: this, type: "updated", action: t });
674
+ }), i(this, A).notify({ query: this, type: "updated", action: e });
684
675
  });
685
- }, Ut);
686
- function ye(e, t) {
676
+ }, ke);
677
+ function lt(t, e) {
687
678
  return {
688
679
  fetchFailureCount: 0,
689
680
  fetchFailureReason: null,
690
- fetchStatus: Vt(t.networkMode) ? "fetching" : "paused",
691
- ...e === void 0 && {
681
+ fetchStatus: Ge(e.networkMode) ? "fetching" : "paused",
682
+ ...t === void 0 && {
692
683
  error: null,
693
684
  status: "pending"
694
685
  }
695
686
  };
696
687
  }
697
- function pe(e) {
698
- const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
688
+ function dt(t) {
689
+ const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
699
690
  return {
700
- data: t,
691
+ data: e,
701
692
  dataUpdateCount: 0,
702
693
  dataUpdatedAt: s ? r ?? Date.now() : 0,
703
694
  error: null,
@@ -711,209 +702,206 @@ function pe(e) {
711
702
  fetchStatus: "idle"
712
703
  };
713
704
  }
714
- var j, Kt, me = (Kt = class extends bt {
715
- constructor(t = {}) {
705
+ var U, Ue, ft = (Ue = class extends ge {
706
+ constructor(e = {}) {
716
707
  super();
717
- l(this, j, void 0);
718
- this.config = t, o(this, j, /* @__PURE__ */ new Map());
719
- }
720
- build(t, s, r) {
721
- const n = s.queryKey, u = s.queryHash ?? qt(n, s);
722
- let d = this.get(u);
723
- return d || (d = new fe({
724
- client: t,
708
+ l(this, U, void 0);
709
+ this.config = e, o(this, U, /* @__PURE__ */ new Map());
710
+ }
711
+ build(e, s, r) {
712
+ const n = s.queryKey, u = s.queryHash ?? Fe(n, s);
713
+ let h = this.get(u);
714
+ return h || (h = new ct({
715
+ client: e,
725
716
  queryKey: n,
726
717
  queryHash: u,
727
- options: t.defaultQueryOptions(s),
718
+ options: e.defaultQueryOptions(s),
728
719
  state: r,
729
- defaultOptions: t.getQueryDefaults(n)
730
- }), this.add(d)), d;
720
+ defaultOptions: e.getQueryDefaults(n)
721
+ }), this.add(h)), h;
731
722
  }
732
- add(t) {
733
- i(this, j).has(t.queryHash) || (i(this, j).set(t.queryHash, t), this.notify({
723
+ add(e) {
724
+ i(this, U).has(e.queryHash) || (i(this, U).set(e.queryHash, e), this.notify({
734
725
  type: "added",
735
- query: t
726
+ query: e
736
727
  }));
737
728
  }
738
- remove(t) {
739
- const s = i(this, j).get(t.queryHash);
740
- s && (t.destroy(), s === t && i(this, j).delete(t.queryHash), this.notify({ type: "removed", query: t }));
729
+ remove(e) {
730
+ const s = i(this, U).get(e.queryHash);
731
+ s && (e.destroy(), s === e && i(this, U).delete(e.queryHash), this.notify({ type: "removed", query: e }));
741
732
  }
742
733
  clear() {
743
- E.batch(() => {
744
- this.getAll().forEach((t) => {
745
- this.remove(t);
734
+ C.batch(() => {
735
+ this.getAll().forEach((e) => {
736
+ this.remove(e);
746
737
  });
747
738
  });
748
739
  }
749
- get(t) {
750
- return i(this, j).get(t);
740
+ get(e) {
741
+ return i(this, U).get(e);
751
742
  }
752
743
  getAll() {
753
- return [...i(this, j).values()];
744
+ return [...i(this, U).values()];
754
745
  }
755
- find(t) {
756
- const s = { exact: !0, ...t };
746
+ find(e) {
747
+ const s = { exact: !0, ...e };
757
748
  return this.getAll().find(
758
- (r) => Dt(s, r)
749
+ (r) => qe(s, r)
759
750
  );
760
751
  }
761
- findAll(t = {}) {
752
+ findAll(e = {}) {
762
753
  const s = this.getAll();
763
- return Object.keys(t).length > 0 ? s.filter((r) => Dt(t, r)) : s;
754
+ return Object.keys(e).length > 0 ? s.filter((r) => qe(e, r)) : s;
764
755
  }
765
- notify(t) {
766
- E.batch(() => {
756
+ notify(e) {
757
+ C.batch(() => {
767
758
  this.listeners.forEach((s) => {
768
- s(t);
759
+ s(e);
769
760
  });
770
761
  });
771
762
  }
772
763
  onFocus() {
773
- E.batch(() => {
774
- this.getAll().forEach((t) => {
775
- t.onFocus();
764
+ C.batch(() => {
765
+ this.getAll().forEach((e) => {
766
+ e.onFocus();
776
767
  });
777
768
  });
778
769
  }
779
770
  onOnline() {
780
- E.batch(() => {
781
- this.getAll().forEach((t) => {
782
- t.onOnline();
771
+ C.batch(() => {
772
+ this.getAll().forEach((e) => {
773
+ e.onOnline();
783
774
  });
784
775
  });
785
776
  }
786
- }, j = new WeakMap(), Kt), k, q, Z, U, L, It, ve = (It = class extends Bt {
787
- constructor(t) {
777
+ }, U = new WeakMap(), Ue), K, F, Y, I, L, Ke, yt = (Ke = class extends $e {
778
+ constructor(e) {
788
779
  super();
789
- l(this, U);
790
- l(this, k, void 0);
791
- l(this, q, void 0);
792
- l(this, Z, void 0);
793
- this.mutationId = t.mutationId, o(this, q, t.mutationCache), o(this, k, []), this.state = t.state || ge(), this.setOptions(t.options), this.scheduleGc();
780
+ l(this, I);
781
+ l(this, K, void 0);
782
+ l(this, F, void 0);
783
+ l(this, Y, void 0);
784
+ this.mutationId = e.mutationId, o(this, F, e.mutationCache), o(this, K, []), this.state = e.state || pt(), this.setOptions(e.options), this.scheduleGc();
794
785
  }
795
- setOptions(t) {
796
- this.options = t, this.updateGcTime(this.options.gcTime);
786
+ setOptions(e) {
787
+ this.options = e, this.updateGcTime(this.options.gcTime);
797
788
  }
798
789
  get meta() {
799
790
  return this.options.meta;
800
791
  }
801
- addObserver(t) {
802
- i(this, k).includes(t) || (i(this, k).push(t), this.clearGcTimeout(), i(this, q).notify({
792
+ addObserver(e) {
793
+ i(this, K).includes(e) || (i(this, K).push(e), this.clearGcTimeout(), i(this, F).notify({
803
794
  type: "observerAdded",
804
795
  mutation: this,
805
- observer: t
796
+ observer: e
806
797
  }));
807
798
  }
808
- removeObserver(t) {
809
- o(this, k, i(this, k).filter((s) => s !== t)), this.scheduleGc(), i(this, q).notify({
799
+ removeObserver(e) {
800
+ o(this, K, i(this, K).filter((s) => s !== e)), this.scheduleGc(), i(this, F).notify({
810
801
  type: "observerRemoved",
811
802
  mutation: this,
812
- observer: t
803
+ observer: e
813
804
  });
814
805
  }
815
806
  optionalRemove() {
816
- i(this, k).length || (this.state.status === "pending" ? this.scheduleGc() : i(this, q).remove(this));
807
+ i(this, K).length || (this.state.status === "pending" ? this.scheduleGc() : i(this, F).remove(this));
817
808
  }
818
809
  continue() {
819
- var t;
820
- return ((t = i(this, Z)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
810
+ var e;
811
+ return ((e = i(this, Y)) == null ? void 0 : e.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
821
812
  this.execute(this.state.variables);
822
813
  }
823
- async execute(t) {
824
- var u, d, a, y, S, P, m, c, v, g, h, f, F, A, b, D, x, H, ft, yt;
825
- const s = () => {
826
- O(this, U, L).call(this, { type: "continue" });
827
- };
828
- o(this, Z, zt({
829
- fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
830
- onFail: (w, z) => {
831
- O(this, U, L).call(this, { type: "failed", failureCount: w, error: z });
814
+ async execute(e) {
815
+ var n, u, h, a, f, w, m, d, y, q, S, c, p, E, M, g, D, j, k, fe;
816
+ o(this, Y, Ve({
817
+ fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
818
+ onFail: (b, z) => {
819
+ P(this, I, L).call(this, { type: "failed", failureCount: b, error: z });
832
820
  },
833
821
  onPause: () => {
834
- O(this, U, L).call(this, { type: "pause" });
822
+ P(this, I, L).call(this, { type: "pause" });
823
+ },
824
+ onContinue: () => {
825
+ P(this, I, L).call(this, { type: "continue" });
835
826
  },
836
- onContinue: s,
837
827
  retry: this.options.retry ?? 0,
838
828
  retryDelay: this.options.retryDelay,
839
829
  networkMode: this.options.networkMode,
840
- canRun: () => i(this, q).canRun(this)
830
+ canRun: () => i(this, F).canRun(this)
841
831
  }));
842
- const r = this.state.status === "pending", n = !i(this, Z).canStart();
832
+ const s = this.state.status === "pending", r = !i(this, Y).canStart();
843
833
  try {
844
- if (r)
845
- s();
846
- else {
847
- O(this, U, L).call(this, { type: "pending", variables: t, isPaused: n }), await ((d = (u = i(this, q).config).onMutate) == null ? void 0 : d.call(
848
- u,
849
- t,
834
+ if (!s) {
835
+ P(this, I, L).call(this, { type: "pending", variables: e, isPaused: r }), await ((u = (n = i(this, F).config).onMutate) == null ? void 0 : u.call(
836
+ n,
837
+ e,
850
838
  this
851
839
  ));
852
- const z = await ((y = (a = this.options).onMutate) == null ? void 0 : y.call(a, t));
853
- z !== this.state.context && O(this, U, L).call(this, {
840
+ const z = await ((a = (h = this.options).onMutate) == null ? void 0 : a.call(h, e));
841
+ z !== this.state.context && P(this, I, L).call(this, {
854
842
  type: "pending",
855
843
  context: z,
856
- variables: t,
857
- isPaused: n
844
+ variables: e,
845
+ isPaused: r
858
846
  });
859
847
  }
860
- const w = await i(this, Z).start();
861
- return await ((P = (S = i(this, q).config).onSuccess) == null ? void 0 : P.call(
862
- S,
863
- w,
864
- t,
848
+ const b = await i(this, Y).start();
849
+ return await ((w = (f = i(this, F).config).onSuccess) == null ? void 0 : w.call(
850
+ f,
851
+ b,
852
+ e,
865
853
  this.state.context,
866
854
  this
867
- )), await ((c = (m = this.options).onSuccess) == null ? void 0 : c.call(m, w, t, this.state.context)), await ((g = (v = i(this, q).config).onSettled) == null ? void 0 : g.call(
868
- v,
869
- w,
855
+ )), await ((d = (m = this.options).onSuccess) == null ? void 0 : d.call(m, b, e, this.state.context)), await ((q = (y = i(this, F).config).onSettled) == null ? void 0 : q.call(
856
+ y,
857
+ b,
870
858
  null,
871
859
  this.state.variables,
872
860
  this.state.context,
873
861
  this
874
- )), await ((f = (h = this.options).onSettled) == null ? void 0 : f.call(h, w, null, t, this.state.context)), O(this, U, L).call(this, { type: "success", data: w }), w;
875
- } catch (w) {
862
+ )), await ((c = (S = this.options).onSettled) == null ? void 0 : c.call(S, b, null, e, this.state.context)), P(this, I, L).call(this, { type: "success", data: b }), b;
863
+ } catch (b) {
876
864
  try {
877
- throw await ((A = (F = i(this, q).config).onError) == null ? void 0 : A.call(
878
- F,
879
- w,
880
- t,
865
+ throw await ((E = (p = i(this, F).config).onError) == null ? void 0 : E.call(
866
+ p,
867
+ b,
868
+ e,
881
869
  this.state.context,
882
870
  this
883
- )), await ((D = (b = this.options).onError) == null ? void 0 : D.call(
871
+ )), await ((g = (M = this.options).onError) == null ? void 0 : g.call(
872
+ M,
884
873
  b,
885
- w,
886
- t,
874
+ e,
887
875
  this.state.context
888
- )), await ((H = (x = i(this, q).config).onSettled) == null ? void 0 : H.call(
889
- x,
876
+ )), await ((j = (D = i(this, F).config).onSettled) == null ? void 0 : j.call(
877
+ D,
890
878
  void 0,
891
- w,
879
+ b,
892
880
  this.state.variables,
893
881
  this.state.context,
894
882
  this
895
- )), await ((yt = (ft = this.options).onSettled) == null ? void 0 : yt.call(
896
- ft,
883
+ )), await ((fe = (k = this.options).onSettled) == null ? void 0 : fe.call(
884
+ k,
897
885
  void 0,
898
- w,
899
- t,
886
+ b,
887
+ e,
900
888
  this.state.context
901
- )), w;
889
+ )), b;
902
890
  } finally {
903
- O(this, U, L).call(this, { type: "error", error: w });
891
+ P(this, I, L).call(this, { type: "error", error: b });
904
892
  }
905
893
  } finally {
906
- i(this, q).runNext(this);
894
+ i(this, F).runNext(this);
907
895
  }
908
896
  }
909
- }, k = new WeakMap(), q = new WeakMap(), Z = new WeakMap(), U = new WeakSet(), L = function(t) {
897
+ }, K = new WeakMap(), F = new WeakMap(), Y = new WeakMap(), I = new WeakSet(), L = function(e) {
910
898
  const s = (r) => {
911
- switch (t.type) {
899
+ switch (e.type) {
912
900
  case "failed":
913
901
  return {
914
902
  ...r,
915
- failureCount: t.failureCount,
916
- failureReason: t.error
903
+ failureCount: e.failureCount,
904
+ failureReason: e.error
917
905
  };
918
906
  case "pause":
919
907
  return {
@@ -928,20 +916,20 @@ var j, Kt, me = (Kt = class extends bt {
928
916
  case "pending":
929
917
  return {
930
918
  ...r,
931
- context: t.context,
919
+ context: e.context,
932
920
  data: void 0,
933
921
  failureCount: 0,
934
922
  failureReason: null,
935
923
  error: null,
936
- isPaused: t.isPaused,
924
+ isPaused: e.isPaused,
937
925
  status: "pending",
938
- variables: t.variables,
926
+ variables: e.variables,
939
927
  submittedAt: Date.now()
940
928
  };
941
929
  case "success":
942
930
  return {
943
931
  ...r,
944
- data: t.data,
932
+ data: e.data,
945
933
  failureCount: 0,
946
934
  failureReason: null,
947
935
  error: null,
@@ -952,25 +940,25 @@ var j, Kt, me = (Kt = class extends bt {
952
940
  return {
953
941
  ...r,
954
942
  data: void 0,
955
- error: t.error,
943
+ error: e.error,
956
944
  failureCount: r.failureCount + 1,
957
- failureReason: t.error,
945
+ failureReason: e.error,
958
946
  isPaused: !1,
959
947
  status: "error"
960
948
  };
961
949
  }
962
950
  };
963
- this.state = s(this.state), E.batch(() => {
964
- i(this, k).forEach((r) => {
965
- r.onMutationUpdate(t);
966
- }), i(this, q).notify({
951
+ this.state = s(this.state), C.batch(() => {
952
+ i(this, K).forEach((r) => {
953
+ r.onMutationUpdate(e);
954
+ }), i(this, F).notify({
967
955
  mutation: this,
968
956
  type: "updated",
969
- action: t
957
+ action: e
970
958
  });
971
959
  });
972
- }, It);
973
- function ge() {
960
+ }, Ke);
961
+ function pt() {
974
962
  return {
975
963
  context: void 0,
976
964
  data: void 0,
@@ -983,334 +971,328 @@ function ge() {
983
971
  submittedAt: 0
984
972
  };
985
973
  }
986
- var I, T, dt, Ht, be = (Ht = class extends bt {
987
- constructor(t = {}) {
974
+ var H, T, de, Ie, mt = (Ie = class extends ge {
975
+ constructor(e = {}) {
988
976
  super();
989
- l(this, I, void 0);
977
+ l(this, H, void 0);
990
978
  l(this, T, void 0);
991
- l(this, dt, void 0);
992
- this.config = t, o(this, I, /* @__PURE__ */ new Set()), o(this, T, /* @__PURE__ */ new Map()), o(this, dt, 0);
979
+ l(this, de, void 0);
980
+ this.config = e, o(this, H, /* @__PURE__ */ new Set()), o(this, T, /* @__PURE__ */ new Map()), o(this, de, 0);
993
981
  }
994
- build(t, s, r) {
995
- const n = new ve({
982
+ build(e, s, r) {
983
+ const n = new yt({
996
984
  mutationCache: this,
997
- mutationId: ++pt(this, dt)._,
998
- options: t.defaultMutationOptions(s),
985
+ mutationId: ++ye(this, de)._,
986
+ options: e.defaultMutationOptions(s),
999
987
  state: r
1000
988
  });
1001
989
  return this.add(n), n;
1002
990
  }
1003
- add(t) {
1004
- i(this, I).add(t);
1005
- const s = mt(t);
991
+ add(e) {
992
+ i(this, H).add(e);
993
+ const s = pe(e);
1006
994
  if (typeof s == "string") {
1007
995
  const r = i(this, T).get(s);
1008
- r ? r.push(t) : i(this, T).set(s, [t]);
996
+ r ? r.push(e) : i(this, T).set(s, [e]);
1009
997
  }
1010
- this.notify({ type: "added", mutation: t });
998
+ this.notify({ type: "added", mutation: e });
1011
999
  }
1012
- remove(t) {
1013
- if (i(this, I).delete(t)) {
1014
- const s = mt(t);
1000
+ remove(e) {
1001
+ if (i(this, H).delete(e)) {
1002
+ const s = pe(e);
1015
1003
  if (typeof s == "string") {
1016
1004
  const r = i(this, T).get(s);
1017
1005
  if (r)
1018
1006
  if (r.length > 1) {
1019
- const n = r.indexOf(t);
1007
+ const n = r.indexOf(e);
1020
1008
  n !== -1 && r.splice(n, 1);
1021
1009
  } else
1022
- r[0] === t && i(this, T).delete(s);
1010
+ r[0] === e && i(this, T).delete(s);
1023
1011
  }
1024
1012
  }
1025
- this.notify({ type: "removed", mutation: t });
1013
+ this.notify({ type: "removed", mutation: e });
1026
1014
  }
1027
- canRun(t) {
1028
- const s = mt(t);
1015
+ canRun(e) {
1016
+ const s = pe(e);
1029
1017
  if (typeof s == "string") {
1030
1018
  const r = i(this, T).get(s), n = r == null ? void 0 : r.find(
1031
1019
  (u) => u.state.status === "pending"
1032
1020
  );
1033
- return !n || n === t;
1021
+ return !n || n === e;
1034
1022
  } else
1035
1023
  return !0;
1036
1024
  }
1037
- runNext(t) {
1025
+ runNext(e) {
1038
1026
  var r;
1039
- const s = mt(t);
1027
+ const s = pe(e);
1040
1028
  if (typeof s == "string") {
1041
- const n = (r = i(this, T).get(s)) == null ? void 0 : r.find((u) => u !== t && u.state.isPaused);
1029
+ const n = (r = i(this, T).get(s)) == null ? void 0 : r.find((u) => u !== e && u.state.isPaused);
1042
1030
  return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
1043
1031
  } else
1044
1032
  return Promise.resolve();
1045
1033
  }
1046
1034
  clear() {
1047
- E.batch(() => {
1048
- i(this, I).forEach((t) => {
1049
- this.notify({ type: "removed", mutation: t });
1050
- }), i(this, I).clear(), i(this, T).clear();
1035
+ C.batch(() => {
1036
+ i(this, H).forEach((e) => {
1037
+ this.notify({ type: "removed", mutation: e });
1038
+ }), i(this, H).clear(), i(this, T).clear();
1051
1039
  });
1052
1040
  }
1053
1041
  getAll() {
1054
- return Array.from(i(this, I));
1042
+ return Array.from(i(this, H));
1055
1043
  }
1056
- find(t) {
1057
- const s = { exact: !0, ...t };
1044
+ find(e) {
1045
+ const s = { exact: !0, ...e };
1058
1046
  return this.getAll().find(
1059
- (r) => Qt(s, r)
1047
+ (r) => Ee(s, r)
1060
1048
  );
1061
1049
  }
1062
- findAll(t = {}) {
1063
- return this.getAll().filter((s) => Qt(t, s));
1050
+ findAll(e = {}) {
1051
+ return this.getAll().filter((s) => Ee(e, s));
1064
1052
  }
1065
- notify(t) {
1066
- E.batch(() => {
1053
+ notify(e) {
1054
+ C.batch(() => {
1067
1055
  this.listeners.forEach((s) => {
1068
- s(t);
1056
+ s(e);
1069
1057
  });
1070
1058
  });
1071
1059
  }
1072
1060
  resumePausedMutations() {
1073
- const t = this.getAll().filter((s) => s.state.isPaused);
1074
- return E.batch(
1061
+ const e = this.getAll().filter((s) => s.state.isPaused);
1062
+ return C.batch(
1075
1063
  () => Promise.all(
1076
- t.map((s) => s.continue().catch(M))
1064
+ e.map((s) => s.continue().catch(Q))
1077
1065
  )
1078
1066
  );
1079
1067
  }
1080
- }, I = new WeakMap(), T = new WeakMap(), dt = new WeakMap(), Ht);
1081
- function mt(e) {
1082
- var t;
1083
- return (t = e.options.scope) == null ? void 0 : t.id;
1068
+ }, H = new WeakMap(), T = new WeakMap(), de = new WeakMap(), Ie);
1069
+ function pe(t) {
1070
+ var e;
1071
+ return (e = t.options.scope) == null ? void 0 : e.id;
1084
1072
  }
1085
- function Rt(e) {
1073
+ function Me(t) {
1086
1074
  return {
1087
- onFetch: (t, s) => {
1088
- var P, m, c, v, g;
1089
- const r = t.options, n = (c = (m = (P = t.fetchOptions) == null ? void 0 : P.meta) == null ? void 0 : m.fetchMore) == null ? void 0 : c.direction, u = ((v = t.state.data) == null ? void 0 : v.pages) || [], d = ((g = t.state.data) == null ? void 0 : g.pageParams) || [];
1090
- let a = { pages: [], pageParams: [] }, y = 0;
1091
- const S = async () => {
1092
- let h = !1;
1093
- const f = (b) => {
1094
- Object.defineProperty(b, "signal", {
1075
+ onFetch: (e, s) => {
1076
+ var m, d, y, q, S;
1077
+ const r = e.options, n = (y = (d = (m = e.fetchOptions) == null ? void 0 : m.meta) == null ? void 0 : d.fetchMore) == null ? void 0 : y.direction, u = ((q = e.state.data) == null ? void 0 : q.pages) || [], h = ((S = e.state.data) == null ? void 0 : S.pageParams) || [];
1078
+ let a = { pages: [], pageParams: [] }, f = 0;
1079
+ const w = async () => {
1080
+ let c = !1;
1081
+ const p = (g) => {
1082
+ Object.defineProperty(g, "signal", {
1095
1083
  enumerable: !0,
1096
- get: () => (t.signal.aborted ? h = !0 : t.signal.addEventListener("abort", () => {
1097
- h = !0;
1098
- }), t.signal)
1084
+ get: () => (e.signal.aborted ? c = !0 : e.signal.addEventListener("abort", () => {
1085
+ c = !0;
1086
+ }), e.signal)
1099
1087
  });
1100
- }, F = Gt(t.options, t.fetchOptions), A = async (b, D, x) => {
1101
- if (h)
1088
+ }, E = Le(e.options, e.fetchOptions), M = async (g, D, j) => {
1089
+ if (c)
1102
1090
  return Promise.reject();
1103
- if (D == null && b.pages.length)
1104
- return Promise.resolve(b);
1105
- const ft = (() => {
1106
- const Et = {
1107
- client: t.client,
1108
- queryKey: t.queryKey,
1109
- pageParam: D,
1110
- direction: x ? "backward" : "forward",
1111
- meta: t.options.meta
1112
- };
1113
- return f(Et), Et;
1114
- })(), yt = await F(ft), { maxPages: w } = t.options, z = x ? ae : ne;
1091
+ if (D == null && g.pages.length)
1092
+ return Promise.resolve(g);
1093
+ const k = {
1094
+ client: e.client,
1095
+ queryKey: e.queryKey,
1096
+ pageParam: D,
1097
+ direction: j ? "backward" : "forward",
1098
+ meta: e.options.meta
1099
+ };
1100
+ p(k);
1101
+ const fe = await E(
1102
+ k
1103
+ ), { maxPages: b } = e.options, z = j ? it : rt;
1115
1104
  return {
1116
- pages: z(b.pages, yt, w),
1117
- pageParams: z(b.pageParams, D, w)
1105
+ pages: z(g.pages, fe, b),
1106
+ pageParams: z(g.pageParams, D, b)
1118
1107
  };
1119
1108
  };
1120
1109
  if (n && u.length) {
1121
- const b = n === "backward", D = b ? we : Tt, x = {
1110
+ const g = n === "backward", D = g ? vt : Qe, j = {
1122
1111
  pages: u,
1123
- pageParams: d
1124
- }, H = D(r, x);
1125
- a = await A(x, H, b);
1112
+ pageParams: h
1113
+ }, k = D(r, j);
1114
+ a = await M(j, k, g);
1126
1115
  } else {
1127
- const b = e ?? u.length;
1116
+ const g = t ?? u.length;
1128
1117
  do {
1129
- const D = y === 0 ? d[0] ?? r.initialPageParam : Tt(r, a);
1130
- if (y > 0 && D == null)
1118
+ const D = f === 0 ? h[0] ?? r.initialPageParam : Qe(r, a);
1119
+ if (f > 0 && D == null)
1131
1120
  break;
1132
- a = await A(a, D), y++;
1133
- } while (y < b);
1121
+ a = await M(a, D), f++;
1122
+ } while (f < g);
1134
1123
  }
1135
1124
  return a;
1136
1125
  };
1137
- t.options.persister ? t.fetchFn = () => {
1138
- var h, f;
1139
- return (f = (h = t.options).persister) == null ? void 0 : f.call(
1140
- h,
1141
- S,
1126
+ e.options.persister ? e.fetchFn = () => {
1127
+ var c, p;
1128
+ return (p = (c = e.options).persister) == null ? void 0 : p.call(
1129
+ c,
1130
+ w,
1142
1131
  {
1143
- client: t.client,
1144
- queryKey: t.queryKey,
1145
- meta: t.options.meta,
1146
- signal: t.signal
1132
+ client: e.client,
1133
+ queryKey: e.queryKey,
1134
+ meta: e.options.meta,
1135
+ signal: e.signal
1147
1136
  },
1148
1137
  s
1149
1138
  );
1150
- } : t.fetchFn = S;
1139
+ } : e.fetchFn = w;
1151
1140
  }
1152
1141
  };
1153
1142
  }
1154
- function Tt(e, { pages: t, pageParams: s }) {
1155
- const r = t.length - 1;
1156
- return t.length > 0 ? e.getNextPageParam(
1157
- t[r],
1158
- t,
1143
+ function Qe(t, { pages: e, pageParams: s }) {
1144
+ const r = e.length - 1;
1145
+ return e.length > 0 ? t.getNextPageParam(
1146
+ e[r],
1147
+ e,
1159
1148
  s[r],
1160
1149
  s
1161
1150
  ) : void 0;
1162
1151
  }
1163
- function we(e, { pages: t, pageParams: s }) {
1152
+ function vt(t, { pages: e, pageParams: s }) {
1164
1153
  var r;
1165
- return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
1154
+ return e.length > 0 ? (r = t.getPreviousPageParam) == null ? void 0 : r.call(t, e[0], e, s[0], s) : void 0;
1166
1155
  }
1167
- var p, _, V, it, nt, $, at, ut, Lt, Pe = (Lt = class {
1168
- constructor(e = {}) {
1169
- l(this, p, void 0);
1156
+ var v, _, V, ie, ne, $, ae, ue, xe, gt = (xe = class {
1157
+ constructor(t = {}) {
1158
+ l(this, v, void 0);
1170
1159
  l(this, _, void 0);
1171
1160
  l(this, V, void 0);
1172
- l(this, it, void 0);
1173
- l(this, nt, void 0);
1161
+ l(this, ie, void 0);
1162
+ l(this, ne, void 0);
1174
1163
  l(this, $, void 0);
1175
- l(this, at, void 0);
1176
- l(this, ut, void 0);
1177
- o(this, p, e.queryCache || new me()), o(this, _, e.mutationCache || new be()), o(this, V, e.defaultOptions || {}), o(this, it, /* @__PURE__ */ new Map()), o(this, nt, /* @__PURE__ */ new Map()), o(this, $, 0);
1164
+ l(this, ae, void 0);
1165
+ l(this, ue, void 0);
1166
+ o(this, v, t.queryCache || new ft()), o(this, _, t.mutationCache || new mt()), o(this, V, t.defaultOptions || {}), o(this, ie, /* @__PURE__ */ new Map()), o(this, ne, /* @__PURE__ */ new Map()), o(this, $, 0);
1178
1167
  }
1179
1168
  mount() {
1180
- pt(this, $)._++, i(this, $) === 1 && (o(this, at, _t.subscribe(async (e) => {
1181
- e && (await this.resumePausedMutations(), i(this, p).onFocus());
1182
- })), o(this, ut, gt.subscribe(async (e) => {
1183
- e && (await this.resumePausedMutations(), i(this, p).onOnline());
1169
+ ye(this, $)._++, i(this, $) === 1 && (o(this, ae, Ne.subscribe(async (t) => {
1170
+ t && (await this.resumePausedMutations(), i(this, v).onFocus());
1171
+ })), o(this, ue, ve.subscribe(async (t) => {
1172
+ t && (await this.resumePausedMutations(), i(this, v).onOnline());
1184
1173
  })));
1185
1174
  }
1186
1175
  unmount() {
1187
- var e, t;
1188
- pt(this, $)._--, i(this, $) === 0 && ((e = i(this, at)) == null || e.call(this), o(this, at, void 0), (t = i(this, ut)) == null || t.call(this), o(this, ut, void 0));
1189
- }
1190
- isFetching(e) {
1191
- return i(this, p).findAll({ ...e, fetchStatus: "fetching" }).length;
1192
- }
1193
- isMutating(e) {
1194
- return i(this, _).findAll({ ...e, status: "pending" }).length;
1195
- }
1196
- /**
1197
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
1198
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
1199
- *
1200
- * Hint: Do not use this function inside a component, because it won't receive updates.
1201
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
1202
- */
1203
- getQueryData(e) {
1176
+ var t, e;
1177
+ ye(this, $)._--, i(this, $) === 0 && ((t = i(this, ae)) == null || t.call(this), o(this, ae, void 0), (e = i(this, ue)) == null || e.call(this), o(this, ue, void 0));
1178
+ }
1179
+ isFetching(t) {
1180
+ return i(this, v).findAll({ ...t, fetchStatus: "fetching" }).length;
1181
+ }
1182
+ isMutating(t) {
1183
+ return i(this, _).findAll({ ...t, status: "pending" }).length;
1184
+ }
1185
+ getQueryData(t) {
1204
1186
  var s;
1205
- const t = this.defaultQueryOptions({ queryKey: e });
1206
- return (s = i(this, p).get(t.queryHash)) == null ? void 0 : s.state.data;
1187
+ const e = this.defaultQueryOptions({ queryKey: t });
1188
+ return (s = i(this, v).get(e.queryHash)) == null ? void 0 : s.state.data;
1207
1189
  }
1208
- ensureQueryData(e) {
1209
- const t = this.defaultQueryOptions(e), s = i(this, p).build(this, t), r = s.state.data;
1210
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(Ot(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
1190
+ ensureQueryData(t) {
1191
+ const e = this.defaultQueryOptions(t), s = i(this, v).build(this, e), r = s.state.data;
1192
+ return r === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && s.isStaleByTime(Ce(e.staleTime, s)) && this.prefetchQuery(e), Promise.resolve(r));
1211
1193
  }
1212
- getQueriesData(e) {
1213
- return i(this, p).findAll(e).map(({ queryKey: t, state: s }) => {
1194
+ getQueriesData(t) {
1195
+ return i(this, v).findAll(t).map(({ queryKey: e, state: s }) => {
1214
1196
  const r = s.data;
1215
- return [t, r];
1197
+ return [e, r];
1216
1198
  });
1217
1199
  }
1218
- setQueryData(e, t, s) {
1219
- const r = this.defaultQueryOptions({ queryKey: e }), n = i(this, p).get(
1200
+ setQueryData(t, e, s) {
1201
+ const r = this.defaultQueryOptions({ queryKey: t }), n = i(this, v).get(
1220
1202
  r.queryHash
1221
- ), u = n == null ? void 0 : n.state.data, d = Zt(t, u);
1222
- if (d !== void 0)
1223
- return i(this, p).build(this, r).setData(d, { ...s, manual: !0 });
1203
+ ), u = n == null ? void 0 : n.state.data, h = Xe(e, u);
1204
+ if (h !== void 0)
1205
+ return i(this, v).build(this, r).setData(h, { ...s, manual: !0 });
1224
1206
  }
1225
- setQueriesData(e, t, s) {
1226
- return E.batch(
1227
- () => i(this, p).findAll(e).map(({ queryKey: r }) => [
1207
+ setQueriesData(t, e, s) {
1208
+ return C.batch(
1209
+ () => i(this, v).findAll(t).map(({ queryKey: r }) => [
1228
1210
  r,
1229
- this.setQueryData(r, t, s)
1211
+ this.setQueryData(r, e, s)
1230
1212
  ])
1231
1213
  );
1232
1214
  }
1233
- getQueryState(e) {
1215
+ getQueryState(t) {
1234
1216
  var s;
1235
- const t = this.defaultQueryOptions({ queryKey: e });
1236
- return (s = i(this, p).get(
1237
- t.queryHash
1217
+ const e = this.defaultQueryOptions({ queryKey: t });
1218
+ return (s = i(this, v).get(
1219
+ e.queryHash
1238
1220
  )) == null ? void 0 : s.state;
1239
1221
  }
1240
- removeQueries(e) {
1241
- const t = i(this, p);
1242
- E.batch(() => {
1243
- t.findAll(e).forEach((s) => {
1244
- t.remove(s);
1222
+ removeQueries(t) {
1223
+ const e = i(this, v);
1224
+ C.batch(() => {
1225
+ e.findAll(t).forEach((s) => {
1226
+ e.remove(s);
1245
1227
  });
1246
1228
  });
1247
1229
  }
1248
- resetQueries(e, t) {
1249
- const s = i(this, p);
1250
- return E.batch(() => (s.findAll(e).forEach((r) => {
1230
+ resetQueries(t, e) {
1231
+ const s = i(this, v);
1232
+ return C.batch(() => (s.findAll(t).forEach((r) => {
1251
1233
  r.reset();
1252
1234
  }), this.refetchQueries(
1253
1235
  {
1254
1236
  type: "active",
1255
- ...e
1237
+ ...t
1256
1238
  },
1257
- t
1239
+ e
1258
1240
  )));
1259
1241
  }
1260
- cancelQueries(e, t = {}) {
1261
- const s = { revert: !0, ...t }, r = E.batch(
1262
- () => i(this, p).findAll(e).map((n) => n.cancel(s))
1242
+ cancelQueries(t, e = {}) {
1243
+ const s = { revert: !0, ...e }, r = C.batch(
1244
+ () => i(this, v).findAll(t).map((n) => n.cancel(s))
1263
1245
  );
1264
- return Promise.all(r).then(M).catch(M);
1246
+ return Promise.all(r).then(Q).catch(Q);
1265
1247
  }
1266
- invalidateQueries(e, t = {}) {
1267
- return E.batch(() => (i(this, p).findAll(e).forEach((s) => {
1248
+ invalidateQueries(t, e = {}) {
1249
+ return C.batch(() => (i(this, v).findAll(t).forEach((s) => {
1268
1250
  s.invalidate();
1269
- }), (e == null ? void 0 : e.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1251
+ }), (t == null ? void 0 : t.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1270
1252
  {
1271
- ...e,
1272
- type: (e == null ? void 0 : e.refetchType) ?? (e == null ? void 0 : e.type) ?? "active"
1253
+ ...t,
1254
+ type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
1273
1255
  },
1274
- t
1256
+ e
1275
1257
  )));
1276
1258
  }
1277
- refetchQueries(e, t = {}) {
1259
+ refetchQueries(t, e = {}) {
1278
1260
  const s = {
1279
- ...t,
1280
- cancelRefetch: t.cancelRefetch ?? !0
1281
- }, r = E.batch(
1282
- () => i(this, p).findAll(e).filter((n) => !n.isDisabled() && !n.isStatic()).map((n) => {
1261
+ ...e,
1262
+ cancelRefetch: e.cancelRefetch ?? !0
1263
+ }, r = C.batch(
1264
+ () => i(this, v).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
1283
1265
  let u = n.fetch(void 0, s);
1284
- return s.throwOnError || (u = u.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : u;
1266
+ return s.throwOnError || (u = u.catch(Q)), n.state.fetchStatus === "paused" ? Promise.resolve() : u;
1285
1267
  })
1286
1268
  );
1287
- return Promise.all(r).then(M);
1269
+ return Promise.all(r).then(Q);
1288
1270
  }
1289
- fetchQuery(e) {
1290
- const t = this.defaultQueryOptions(e);
1291
- t.retry === void 0 && (t.retry = !1);
1292
- const s = i(this, p).build(this, t);
1271
+ fetchQuery(t) {
1272
+ const e = this.defaultQueryOptions(t);
1273
+ e.retry === void 0 && (e.retry = !1);
1274
+ const s = i(this, v).build(this, e);
1293
1275
  return s.isStaleByTime(
1294
- Ot(t.staleTime, s)
1295
- ) ? s.fetch(t) : Promise.resolve(s.state.data);
1276
+ Ce(e.staleTime, s)
1277
+ ) ? s.fetch(e) : Promise.resolve(s.state.data);
1296
1278
  }
1297
- prefetchQuery(e) {
1298
- return this.fetchQuery(e).then(M).catch(M);
1279
+ prefetchQuery(t) {
1280
+ return this.fetchQuery(t).then(Q).catch(Q);
1299
1281
  }
1300
- fetchInfiniteQuery(e) {
1301
- return e.behavior = Rt(e.pages), this.fetchQuery(e);
1282
+ fetchInfiniteQuery(t) {
1283
+ return t.behavior = Me(t.pages), this.fetchQuery(t);
1302
1284
  }
1303
- prefetchInfiniteQuery(e) {
1304
- return this.fetchInfiniteQuery(e).then(M).catch(M);
1285
+ prefetchInfiniteQuery(t) {
1286
+ return this.fetchInfiniteQuery(t).then(Q).catch(Q);
1305
1287
  }
1306
- ensureInfiniteQueryData(e) {
1307
- return e.behavior = Rt(e.pages), this.ensureQueryData(e);
1288
+ ensureInfiniteQueryData(t) {
1289
+ return t.behavior = Me(t.pages), this.ensureQueryData(t);
1308
1290
  }
1309
1291
  resumePausedMutations() {
1310
- return gt.isOnline() ? i(this, _).resumePausedMutations() : Promise.resolve();
1292
+ return ve.isOnline() ? i(this, _).resumePausedMutations() : Promise.resolve();
1311
1293
  }
1312
1294
  getQueryCache() {
1313
- return i(this, p);
1295
+ return i(this, v);
1314
1296
  }
1315
1297
  getMutationCache() {
1316
1298
  return i(this, _);
@@ -1318,70 +1300,70 @@ var p, _, V, it, nt, $, at, ut, Lt, Pe = (Lt = class {
1318
1300
  getDefaultOptions() {
1319
1301
  return i(this, V);
1320
1302
  }
1321
- setDefaultOptions(e) {
1322
- o(this, V, e);
1303
+ setDefaultOptions(t) {
1304
+ o(this, V, t);
1323
1305
  }
1324
- setQueryDefaults(e, t) {
1325
- i(this, it).set(ht(e), {
1326
- queryKey: e,
1327
- defaultOptions: t
1306
+ setQueryDefaults(t, e) {
1307
+ i(this, ie).set(he(t), {
1308
+ queryKey: t,
1309
+ defaultOptions: e
1328
1310
  });
1329
1311
  }
1330
- getQueryDefaults(e) {
1331
- const t = [...i(this, it).values()], s = {};
1332
- return t.forEach((r) => {
1333
- ct(e, r.queryKey) && Object.assign(s, r.defaultOptions);
1312
+ getQueryDefaults(t) {
1313
+ const e = [...i(this, ie).values()], s = {};
1314
+ return e.forEach((r) => {
1315
+ ce(t, r.queryKey) && Object.assign(s, r.defaultOptions);
1334
1316
  }), s;
1335
1317
  }
1336
- setMutationDefaults(e, t) {
1337
- i(this, nt).set(ht(e), {
1338
- mutationKey: e,
1339
- defaultOptions: t
1318
+ setMutationDefaults(t, e) {
1319
+ i(this, ne).set(he(t), {
1320
+ mutationKey: t,
1321
+ defaultOptions: e
1340
1322
  });
1341
1323
  }
1342
- getMutationDefaults(e) {
1343
- const t = [...i(this, nt).values()], s = {};
1344
- return t.forEach((r) => {
1345
- ct(e, r.mutationKey) && Object.assign(s, r.defaultOptions);
1324
+ getMutationDefaults(t) {
1325
+ const e = [...i(this, ne).values()], s = {};
1326
+ return e.forEach((r) => {
1327
+ ce(t, r.mutationKey) && Object.assign(s, r.defaultOptions);
1346
1328
  }), s;
1347
1329
  }
1348
- defaultQueryOptions(e) {
1349
- if (e._defaulted)
1350
- return e;
1351
- const t = {
1330
+ defaultQueryOptions(t) {
1331
+ if (t._defaulted)
1332
+ return t;
1333
+ const e = {
1352
1334
  ...i(this, V).queries,
1353
- ...this.getQueryDefaults(e.queryKey),
1354
- ...e,
1335
+ ...this.getQueryDefaults(t.queryKey),
1336
+ ...t,
1355
1337
  _defaulted: !0
1356
1338
  };
1357
- return t.queryHash || (t.queryHash = qt(
1358
- t.queryKey,
1359
- t
1360
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === vt && (t.enabled = !1), t;
1339
+ return e.queryHash || (e.queryHash = Fe(
1340
+ e.queryKey,
1341
+ e
1342
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === me && (e.enabled = !1), e;
1361
1343
  }
1362
- defaultMutationOptions(e) {
1363
- return e != null && e._defaulted ? e : {
1344
+ defaultMutationOptions(t) {
1345
+ return t != null && t._defaulted ? t : {
1364
1346
  ...i(this, V).mutations,
1365
- ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
1366
- ...e,
1347
+ ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
1348
+ ...t,
1367
1349
  _defaulted: !0
1368
1350
  };
1369
1351
  }
1370
1352
  clear() {
1371
- i(this, p).clear(), i(this, _).clear();
1353
+ i(this, v).clear(), i(this, _).clear();
1372
1354
  }
1373
- }, p = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), it = new WeakMap(), nt = new WeakMap(), $ = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), Lt), Fe = Nt.createContext(
1355
+ }, v = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), ie = new WeakMap(), ne = new WeakMap(), $ = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), xe), bt = He.createContext(
1374
1356
  void 0
1375
- ), Oe = ({
1376
- client: e,
1377
- children: t
1378
- }) => (Nt.useEffect(() => (e.mount(), () => {
1379
- e.unmount();
1380
- }), [e]), /* @__PURE__ */ ot(Fe.Provider, { value: e, children: t }));
1381
- const Ce = new Pe(), Me = (e) => {
1382
- const { children: t, customVariables: s, customDarkVariables: r, workerUrl: n, licenseKey: u, ...d } = e, { workerUrlAdded: a } = Xt(n);
1383
- return /* @__PURE__ */ ot(Oe, { client: Ce, children: /* @__PURE__ */ ot(Yt, { licenseKey: u, children: /* @__PURE__ */ ot(Wt, { workerUrlAdded: a, ...d, children: /* @__PURE__ */ ot(Jt, { customDarkVariables: r, customVariables: s, children: t }) }) }) });
1357
+ ), wt = ({
1358
+ client: t,
1359
+ children: e
1360
+ }) => (He.useEffect(() => (t.mount(), () => {
1361
+ t.unmount();
1362
+ }), [t]), /* @__PURE__ */ oe(bt.Provider, { value: t, children: e }));
1363
+ const Pt = new gt(), Dt = (t) => {
1364
+ const { children: e, customVariables: s, customDarkVariables: r, workerUrl: n, licenseKey: u, ...h } = t, { workerUrlAdded: a } = Je(n);
1365
+ return /* @__PURE__ */ oe(wt, { client: Pt, children: /* @__PURE__ */ oe(We, { licenseKey: u, children: /* @__PURE__ */ oe(Be, { workerUrlAdded: a, ...h, children: /* @__PURE__ */ oe(ze, { customDarkVariables: r, customVariables: s, children: e }) }) }) });
1384
1366
  };
1385
1367
  export {
1386
- Me as RPConfig
1368
+ Dt as RPConfig
1387
1369
  };