@tanstack/react-router-devtools 0.0.1-beta.8 → 0.0.1-beta.80

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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/build/cjs/{packages/react-router-devtools/src/Explorer.js → Explorer.js} +44 -61
  3. package/build/cjs/Explorer.js.map +1 -0
  4. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -18
  5. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
  6. package/build/cjs/{packages/react-router-devtools/src/devtools.js → devtools.js} +176 -275
  7. package/build/cjs/devtools.js.map +1 -0
  8. package/build/cjs/{packages/react-router-devtools/src/index.js → index.js} +0 -0
  9. package/build/cjs/{packages/react-router-devtools/src/index.js.map → index.js.map} +0 -0
  10. package/build/cjs/{packages/react-router-devtools/src/styledComponents.js → styledComponents.js} +9 -37
  11. package/build/cjs/styledComponents.js.map +1 -0
  12. package/build/cjs/{packages/react-router-devtools/src/theme.js → theme.js} +5 -8
  13. package/build/cjs/theme.js.map +1 -0
  14. package/build/cjs/{packages/react-router-devtools/src/useLocalStorage.js → useLocalStorage.js} +2 -9
  15. package/build/cjs/useLocalStorage.js.map +1 -0
  16. package/build/cjs/{packages/react-router-devtools/src/useMediaQuery.js → useMediaQuery.js} +10 -13
  17. package/build/cjs/useMediaQuery.js.map +1 -0
  18. package/build/cjs/{packages/react-router-devtools/src/utils.js → utils.js} +24 -70
  19. package/build/cjs/utils.js.map +1 -0
  20. package/build/esm/index.js +268 -1319
  21. package/build/esm/index.js.map +1 -1
  22. package/build/stats-html.html +59 -49
  23. package/build/stats-react.json +312 -9469
  24. package/build/types/index.d.ts +4 -4
  25. package/build/umd/index.development.js +335 -1292
  26. package/build/umd/index.development.js.map +1 -1
  27. package/build/umd/index.production.js +32 -1
  28. package/build/umd/index.production.js.map +1 -1
  29. package/package.json +6 -8
  30. package/src/devtools.tsx +86 -87
  31. package/src/utils.ts +5 -17
  32. package/build/cjs/node_modules/date-fns/esm/_lib/assign/index.js +0 -30
  33. package/build/cjs/node_modules/date-fns/esm/_lib/assign/index.js.map +0 -1
  34. package/build/cjs/node_modules/date-fns/esm/_lib/cloneObject/index.js +0 -22
  35. package/build/cjs/node_modules/date-fns/esm/_lib/cloneObject/index.js.map +0 -1
  36. package/build/cjs/node_modules/date-fns/esm/_lib/defaultLocale/index.js +0 -20
  37. package/build/cjs/node_modules/date-fns/esm/_lib/defaultLocale/index.js.map +0 -1
  38. package/build/cjs/node_modules/date-fns/esm/_lib/defaultOptions/index.js +0 -21
  39. package/build/cjs/node_modules/date-fns/esm/_lib/defaultOptions/index.js.map +0 -1
  40. package/build/cjs/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -33
  41. package/build/cjs/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js.map +0 -1
  42. package/build/cjs/node_modules/date-fns/esm/_lib/requiredArgs/index.js +0 -22
  43. package/build/cjs/node_modules/date-fns/esm/_lib/requiredArgs/index.js.map +0 -1
  44. package/build/cjs/node_modules/date-fns/esm/compareAsc/index.js +0 -67
  45. package/build/cjs/node_modules/date-fns/esm/compareAsc/index.js.map +0 -1
  46. package/build/cjs/node_modules/date-fns/esm/formatDistanceStrict/index.js +0 -207
  47. package/build/cjs/node_modules/date-fns/esm/formatDistanceStrict/index.js.map +0 -1
  48. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js +0 -26
  49. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js.map +0 -1
  50. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js +0 -39
  51. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js.map +0 -1
  52. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js +0 -65
  53. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js.map +0 -1
  54. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js +0 -34
  55. package/build/cjs/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js.map +0 -1
  56. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js +0 -105
  57. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js.map +0 -1
  58. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js +0 -52
  59. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js.map +0 -1
  60. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js +0 -31
  61. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js.map +0 -1
  62. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js +0 -164
  63. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js.map +0 -1
  64. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js +0 -116
  65. package/build/cjs/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js.map +0 -1
  66. package/build/cjs/node_modules/date-fns/esm/locale/en-US/index.js +0 -47
  67. package/build/cjs/node_modules/date-fns/esm/locale/en-US/index.js.map +0 -1
  68. package/build/cjs/node_modules/date-fns/esm/toDate/index.js +0 -70
  69. package/build/cjs/node_modules/date-fns/esm/toDate/index.js.map +0 -1
  70. package/build/cjs/packages/react-router-devtools/src/Explorer.js.map +0 -1
  71. package/build/cjs/packages/react-router-devtools/src/devtools.js.map +0 -1
  72. package/build/cjs/packages/react-router-devtools/src/styledComponents.js.map +0 -1
  73. package/build/cjs/packages/react-router-devtools/src/theme.js.map +0 -1
  74. package/build/cjs/packages/react-router-devtools/src/useLocalStorage.js.map +0 -1
  75. package/build/cjs/packages/react-router-devtools/src/useMediaQuery.js.map +0 -1
  76. package/build/cjs/packages/react-router-devtools/src/utils.js.map +0 -1
@@ -9,10 +9,10 @@
9
9
  * @license MIT
10
10
  */
11
11
  (function (global, factory) {
12
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@tanstack/react-router')) :
13
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@tanstack/react-router'], factory) :
14
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactRouterDevtools = {}, global.React, global.ReactRouter));
15
- })(this, (function (exports, React, reactRouter) { 'use strict';
12
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('use-sync-external-store/shim/with-selector')) :
13
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'use-sync-external-store/shim/with-selector'], factory) :
14
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactRouterDevtools = {}, global.React, global.withSelector));
15
+ })(this, (function (exports, React, withSelector) { 'use strict';
16
16
 
17
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
18
 
@@ -34,894 +34,133 @@
34
34
  return Object.freeze(n);
35
35
  }
36
36
 
37
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
37
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
38
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
39
39
 
40
40
  function _extends() {
41
41
  _extends = Object.assign ? Object.assign.bind() : function (target) {
42
42
  for (var i = 1; i < arguments.length; i++) {
43
43
  var source = arguments[i];
44
-
45
44
  for (var key in source) {
46
45
  if (Object.prototype.hasOwnProperty.call(source, key)) {
47
46
  target[key] = source[key];
48
47
  }
49
48
  }
50
49
  }
51
-
52
50
  return target;
53
51
  };
54
52
  return _extends.apply(this, arguments);
55
53
  }
56
54
 
57
- function _objectWithoutPropertiesLoose(source, excluded) {
58
- if (source == null) return {};
59
- var target = {};
60
- var sourceKeys = Object.keys(source);
61
- var key, i;
62
-
63
- for (i = 0; i < sourceKeys.length; i++) {
64
- key = sourceKeys[i];
65
- if (excluded.indexOf(key) >= 0) continue;
66
- target[key] = source[key];
67
- }
68
-
69
- return target;
70
- }
71
-
72
- function requiredArgs(required, args) {
73
- if (args.length < required) {
74
- throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
75
- }
55
+ var prefix = 'Invariant failed';
56
+ function invariant(condition, message) {
57
+ if (condition) {
58
+ return;
59
+ }
60
+ var provided = typeof message === 'function' ? message() : message;
61
+ var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
62
+ throw new Error(value);
76
63
  }
77
64
 
78
65
  /**
79
- * @name toDate
80
- * @category Common Helpers
81
- * @summary Convert the given argument to an instance of Date.
82
- *
83
- * @description
84
- * Convert the given argument to an instance of Date.
85
- *
86
- * If the argument is an instance of Date, the function returns its clone.
66
+ * router
87
67
  *
88
- * If the argument is a number, it is treated as a timestamp.
68
+ * Copyright (c) TanStack
89
69
  *
90
- * If the argument is none of the above, the function returns Invalid Date.
70
+ * This source code is licensed under the MIT license found in the
71
+ * LICENSE.md file in the root directory of this source tree.
91
72
  *
92
- * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
93
- *
94
- * @param {Date|Number} argument - the value to convert
95
- * @returns {Date} the parsed date in the local time zone
96
- * @throws {TypeError} 1 argument required
97
- *
98
- * @example
99
- * // Clone the date:
100
- * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
101
- * //=> Tue Feb 11 2014 11:30:30
102
- *
103
- * @example
104
- * // Convert the timestamp to date:
105
- * const result = toDate(1392098430000)
106
- * //=> Tue Feb 11 2014 11:30:30
73
+ * @license MIT
107
74
  */
108
75
 
109
- function toDate(argument) {
110
- requiredArgs(1, arguments);
111
- var argStr = Object.prototype.toString.call(argument); // Clone the date
112
-
113
- if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
114
- // Prevent the date to lose the milliseconds when passed to new Date() in IE10
115
- return new Date(argument.getTime());
116
- } else if (typeof argument === 'number' || argStr === '[object Number]') {
117
- return new Date(argument);
118
- } else {
119
- if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
120
- // eslint-disable-next-line no-console
121
- console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
122
-
123
- console.warn(new Error().stack);
124
- }
125
-
126
- return new Date(NaN);
127
- }
128
- }
129
-
130
- var defaultOptions = {};
131
- function getDefaultOptions() {
132
- return defaultOptions;
76
+ function last(arr) {
77
+ return arr[arr.length - 1];
133
78
  }
134
79
 
135
80
  /**
136
- * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
137
- * They usually appear for dates that denote time before the timezones were introduced
138
- * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
139
- * and GMT+01:00:00 after that date)
81
+ * react-store
140
82
  *
141
- * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
142
- * which would lead to incorrect calculations.
83
+ * Copyright (c) TanStack
143
84
  *
144
- * This function returns the timezone offset in milliseconds that takes seconds in account.
145
- */
146
- function getTimezoneOffsetInMilliseconds(date) {
147
- var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
148
- utcDate.setUTCFullYear(date.getFullYear());
149
- return date.getTime() - utcDate.getTime();
150
- }
151
-
152
- /**
153
- * @name compareAsc
154
- * @category Common Helpers
155
- * @summary Compare the two dates and return -1, 0 or 1.
156
- *
157
- * @description
158
- * Compare the two dates and return 1 if the first date is after the second,
159
- * -1 if the first date is before the second or 0 if dates are equal.
160
- *
161
- * @param {Date|Number} dateLeft - the first date to compare
162
- * @param {Date|Number} dateRight - the second date to compare
163
- * @returns {Number} the result of the comparison
164
- * @throws {TypeError} 2 arguments required
165
- *
166
- * @example
167
- * // Compare 11 February 1987 and 10 July 1989:
168
- * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
169
- * //=> -1
85
+ * This source code is licensed under the MIT license found in the
86
+ * LICENSE.md file in the root directory of this source tree.
170
87
  *
171
- * @example
172
- * // Sort the array of dates:
173
- * const result = [
174
- * new Date(1995, 6, 2),
175
- * new Date(1987, 1, 11),
176
- * new Date(1989, 6, 10)
177
- * ].sort(compareAsc)
178
- * //=> [
179
- * // Wed Feb 11 1987 00:00:00,
180
- * // Mon Jul 10 1989 00:00:00,
181
- * // Sun Jul 02 1995 00:00:00
182
- * // ]
88
+ * @license MIT
183
89
  */
184
90
 
185
- function compareAsc(dirtyDateLeft, dirtyDateRight) {
186
- requiredArgs(2, arguments);
187
- var dateLeft = toDate(dirtyDateLeft);
188
- var dateRight = toDate(dirtyDateRight);
189
- var diff = dateLeft.getTime() - dateRight.getTime();
190
-
191
- if (diff < 0) {
192
- return -1;
193
- } else if (diff > 0) {
194
- return 1; // Return 0 if diff is 0; return NaN if diff is NaN
195
- } else {
196
- return diff;
197
- }
91
+ function useStore(store, selector = d => d, compareShallow) {
92
+ const slice = withSelector.useSyncExternalStoreWithSelector(store.subscribe, () => store.state, () => store.state, selector, compareShallow ? shallow : undefined);
93
+ return slice;
198
94
  }
199
-
200
- var formatDistanceLocale = {
201
- lessThanXSeconds: {
202
- one: 'less than a second',
203
- other: 'less than {{count}} seconds'
204
- },
205
- xSeconds: {
206
- one: '1 second',
207
- other: '{{count}} seconds'
208
- },
209
- halfAMinute: 'half a minute',
210
- lessThanXMinutes: {
211
- one: 'less than a minute',
212
- other: 'less than {{count}} minutes'
213
- },
214
- xMinutes: {
215
- one: '1 minute',
216
- other: '{{count}} minutes'
217
- },
218
- aboutXHours: {
219
- one: 'about 1 hour',
220
- other: 'about {{count}} hours'
221
- },
222
- xHours: {
223
- one: '1 hour',
224
- other: '{{count}} hours'
225
- },
226
- xDays: {
227
- one: '1 day',
228
- other: '{{count}} days'
229
- },
230
- aboutXWeeks: {
231
- one: 'about 1 week',
232
- other: 'about {{count}} weeks'
233
- },
234
- xWeeks: {
235
- one: '1 week',
236
- other: '{{count}} weeks'
237
- },
238
- aboutXMonths: {
239
- one: 'about 1 month',
240
- other: 'about {{count}} months'
241
- },
242
- xMonths: {
243
- one: '1 month',
244
- other: '{{count}} months'
245
- },
246
- aboutXYears: {
247
- one: 'about 1 year',
248
- other: 'about {{count}} years'
249
- },
250
- xYears: {
251
- one: '1 year',
252
- other: '{{count}} years'
253
- },
254
- overXYears: {
255
- one: 'over 1 year',
256
- other: 'over {{count}} years'
257
- },
258
- almostXYears: {
259
- one: 'almost 1 year',
260
- other: 'almost {{count}} years'
95
+ function shallow(objA, objB) {
96
+ if (Object.is(objA, objB)) {
97
+ return true;
261
98
  }
262
- };
263
-
264
- var formatDistance = function (token, count, options) {
265
- var result;
266
- var tokenValue = formatDistanceLocale[token];
267
-
268
- if (typeof tokenValue === 'string') {
269
- result = tokenValue;
270
- } else if (count === 1) {
271
- result = tokenValue.one;
272
- } else {
273
- result = tokenValue.other.replace('{{count}}', count.toString());
99
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
100
+ return false;
274
101
  }
275
102
 
276
- if (options !== null && options !== void 0 && options.addSuffix) {
277
- if (options.comparison && options.comparison > 0) {
278
- return 'in ' + result;
279
- } else {
280
- return result + ' ago';
281
- }
282
- }
283
-
284
- return result;
285
- };
286
-
287
- var formatDistance$1 = formatDistance;
288
-
289
- function buildFormatLongFn(args) {
290
- return function () {
291
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
292
- // TODO: Remove String()
293
- var width = options.width ? String(options.width) : args.defaultWidth;
294
- var format = args.formats[width] || args.formats[args.defaultWidth];
295
- return format;
296
- };
297
- }
298
-
299
- var dateFormats = {
300
- full: 'EEEE, MMMM do, y',
301
- long: 'MMMM do, y',
302
- medium: 'MMM d, y',
303
- short: 'MM/dd/yyyy'
304
- };
305
- var timeFormats = {
306
- full: 'h:mm:ss a zzzz',
307
- long: 'h:mm:ss a z',
308
- medium: 'h:mm:ss a',
309
- short: 'h:mm a'
310
- };
311
- var dateTimeFormats = {
312
- full: "{{date}} 'at' {{time}}",
313
- long: "{{date}} 'at' {{time}}",
314
- medium: '{{date}}, {{time}}',
315
- short: '{{date}}, {{time}}'
316
- };
317
- var formatLong = {
318
- date: buildFormatLongFn({
319
- formats: dateFormats,
320
- defaultWidth: 'full'
321
- }),
322
- time: buildFormatLongFn({
323
- formats: timeFormats,
324
- defaultWidth: 'full'
325
- }),
326
- dateTime: buildFormatLongFn({
327
- formats: dateTimeFormats,
328
- defaultWidth: 'full'
329
- })
330
- };
331
- var formatLong$1 = formatLong;
332
-
333
- var formatRelativeLocale = {
334
- lastWeek: "'last' eeee 'at' p",
335
- yesterday: "'yesterday at' p",
336
- today: "'today at' p",
337
- tomorrow: "'tomorrow at' p",
338
- nextWeek: "eeee 'at' p",
339
- other: 'P'
340
- };
341
-
342
- var formatRelative = function (token, _date, _baseDate, _options) {
343
- return formatRelativeLocale[token];
344
- };
345
-
346
- var formatRelative$1 = formatRelative;
347
-
348
- function buildLocalizeFn(args) {
349
- return function (dirtyIndex, options) {
350
- var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
351
- var valuesArray;
352
-
353
- if (context === 'formatting' && args.formattingValues) {
354
- var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
355
- var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
356
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
357
- } else {
358
- var _defaultWidth = args.defaultWidth;
359
-
360
- var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
361
-
362
- valuesArray = args.values[_width] || args.values[_defaultWidth];
363
- }
364
-
365
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
366
-
367
- return valuesArray[index];
368
- };
369
- }
370
-
371
- var eraValues = {
372
- narrow: ['B', 'A'],
373
- abbreviated: ['BC', 'AD'],
374
- wide: ['Before Christ', 'Anno Domini']
375
- };
376
- var quarterValues = {
377
- narrow: ['1', '2', '3', '4'],
378
- abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
379
- wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
380
- }; // Note: in English, the names of days of the week and months are capitalized.
381
- // If you are making a new locale based on this one, check if the same is true for the language you're working on.
382
- // Generally, formatted dates should look like they are in the middle of a sentence,
383
- // e.g. in Spanish language the weekdays and months should be in the lowercase.
384
-
385
- var monthValues = {
386
- narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
387
- abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
388
- wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
389
- };
390
- var dayValues = {
391
- narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
392
- short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
393
- abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
394
- wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
395
- };
396
- var dayPeriodValues = {
397
- narrow: {
398
- am: 'a',
399
- pm: 'p',
400
- midnight: 'mi',
401
- noon: 'n',
402
- morning: 'morning',
403
- afternoon: 'afternoon',
404
- evening: 'evening',
405
- night: 'night'
406
- },
407
- abbreviated: {
408
- am: 'AM',
409
- pm: 'PM',
410
- midnight: 'midnight',
411
- noon: 'noon',
412
- morning: 'morning',
413
- afternoon: 'afternoon',
414
- evening: 'evening',
415
- night: 'night'
416
- },
417
- wide: {
418
- am: 'a.m.',
419
- pm: 'p.m.',
420
- midnight: 'midnight',
421
- noon: 'noon',
422
- morning: 'morning',
423
- afternoon: 'afternoon',
424
- evening: 'evening',
425
- night: 'night'
103
+ // if (objA instanceof Map && objB instanceof Map) {
104
+ // if (objA.size !== objB.size) return false
105
+
106
+ // for (const [key, value] of objA) {
107
+ // if (!Object.is(value, objB.get(key))) {
108
+ // return false
109
+ // }
110
+ // }
111
+ // return true
112
+ // }
113
+
114
+ // if (objA instanceof Set && objB instanceof Set) {
115
+ // if (objA.size !== objB.size) return false
116
+
117
+ // for (const value of objA) {
118
+ // if (!objB.has(value)) {
119
+ // return false
120
+ // }
121
+ // }
122
+ // return true
123
+ // }
124
+
125
+ const keysA = Object.keys(objA);
126
+ if (keysA.length !== Object.keys(objB).length) {
127
+ return false;
426
128
  }
427
- };
428
- var formattingDayPeriodValues = {
429
- narrow: {
430
- am: 'a',
431
- pm: 'p',
432
- midnight: 'mi',
433
- noon: 'n',
434
- morning: 'in the morning',
435
- afternoon: 'in the afternoon',
436
- evening: 'in the evening',
437
- night: 'at night'
438
- },
439
- abbreviated: {
440
- am: 'AM',
441
- pm: 'PM',
442
- midnight: 'midnight',
443
- noon: 'noon',
444
- morning: 'in the morning',
445
- afternoon: 'in the afternoon',
446
- evening: 'in the evening',
447
- night: 'at night'
448
- },
449
- wide: {
450
- am: 'a.m.',
451
- pm: 'p.m.',
452
- midnight: 'midnight',
453
- noon: 'noon',
454
- morning: 'in the morning',
455
- afternoon: 'in the afternoon',
456
- evening: 'in the evening',
457
- night: 'at night'
458
- }
459
- };
460
-
461
- var ordinalNumber = function (dirtyNumber, _options) {
462
- var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
463
- // if they are different for different grammatical genders,
464
- // use `options.unit`.
465
- //
466
- // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
467
- // 'day', 'hour', 'minute', 'second'.
468
-
469
- var rem100 = number % 100;
470
-
471
- if (rem100 > 20 || rem100 < 10) {
472
- switch (rem100 % 10) {
473
- case 1:
474
- return number + 'st';
475
-
476
- case 2:
477
- return number + 'nd';
478
-
479
- case 3:
480
- return number + 'rd';
129
+ for (let i = 0; i < keysA.length; i++) {
130
+ if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
131
+ return false;
481
132
  }
482
133
  }
483
-
484
- return number + 'th';
485
- };
486
-
487
- var localize = {
488
- ordinalNumber: ordinalNumber,
489
- era: buildLocalizeFn({
490
- values: eraValues,
491
- defaultWidth: 'wide'
492
- }),
493
- quarter: buildLocalizeFn({
494
- values: quarterValues,
495
- defaultWidth: 'wide',
496
- argumentCallback: function (quarter) {
497
- return quarter - 1;
498
- }
499
- }),
500
- month: buildLocalizeFn({
501
- values: monthValues,
502
- defaultWidth: 'wide'
503
- }),
504
- day: buildLocalizeFn({
505
- values: dayValues,
506
- defaultWidth: 'wide'
507
- }),
508
- dayPeriod: buildLocalizeFn({
509
- values: dayPeriodValues,
510
- defaultWidth: 'wide',
511
- formattingValues: formattingDayPeriodValues,
512
- defaultFormattingWidth: 'wide'
513
- })
514
- };
515
- var localize$1 = localize;
516
-
517
- function buildMatchFn(args) {
518
- return function (string) {
519
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
520
- var width = options.width;
521
- var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
522
- var matchResult = string.match(matchPattern);
523
-
524
- if (!matchResult) {
525
- return null;
526
- }
527
-
528
- var matchedString = matchResult[0];
529
- var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
530
- var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
531
- return pattern.test(matchedString);
532
- }) : findKey(parsePatterns, function (pattern) {
533
- return pattern.test(matchedString);
534
- });
535
- var value;
536
- value = args.valueCallback ? args.valueCallback(key) : key;
537
- value = options.valueCallback ? options.valueCallback(value) : value;
538
- var rest = string.slice(matchedString.length);
539
- return {
540
- value: value,
541
- rest: rest
542
- };
543
- };
544
- }
545
-
546
- function findKey(object, predicate) {
547
- for (var key in object) {
548
- if (object.hasOwnProperty(key) && predicate(object[key])) {
549
- return key;
550
- }
551
- }
552
-
553
- return undefined;
554
- }
555
-
556
- function findIndex(array, predicate) {
557
- for (var key = 0; key < array.length; key++) {
558
- if (predicate(array[key])) {
559
- return key;
560
- }
561
- }
562
-
563
- return undefined;
564
- }
565
-
566
- function buildMatchPatternFn(args) {
567
- return function (string) {
568
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
569
- var matchResult = string.match(args.matchPattern);
570
- if (!matchResult) return null;
571
- var matchedString = matchResult[0];
572
- var parseResult = string.match(args.parsePattern);
573
- if (!parseResult) return null;
574
- var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
575
- value = options.valueCallback ? options.valueCallback(value) : value;
576
- var rest = string.slice(matchedString.length);
577
- return {
578
- value: value,
579
- rest: rest
580
- };
581
- };
582
- }
583
-
584
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
585
- var parseOrdinalNumberPattern = /\d+/i;
586
- var matchEraPatterns = {
587
- narrow: /^(b|a)/i,
588
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
589
- wide: /^(before christ|before common era|anno domini|common era)/i
590
- };
591
- var parseEraPatterns = {
592
- any: [/^b/i, /^(a|c)/i]
593
- };
594
- var matchQuarterPatterns = {
595
- narrow: /^[1234]/i,
596
- abbreviated: /^q[1234]/i,
597
- wide: /^[1234](th|st|nd|rd)? quarter/i
598
- };
599
- var parseQuarterPatterns = {
600
- any: [/1/i, /2/i, /3/i, /4/i]
601
- };
602
- var matchMonthPatterns = {
603
- narrow: /^[jfmasond]/i,
604
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
605
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
606
- };
607
- var parseMonthPatterns = {
608
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
609
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
610
- };
611
- var matchDayPatterns = {
612
- narrow: /^[smtwf]/i,
613
- short: /^(su|mo|tu|we|th|fr|sa)/i,
614
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
615
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
616
- };
617
- var parseDayPatterns = {
618
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
619
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
620
- };
621
- var matchDayPeriodPatterns = {
622
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
623
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
624
- };
625
- var parseDayPeriodPatterns = {
626
- any: {
627
- am: /^a/i,
628
- pm: /^p/i,
629
- midnight: /^mi/i,
630
- noon: /^no/i,
631
- morning: /morning/i,
632
- afternoon: /afternoon/i,
633
- evening: /evening/i,
634
- night: /night/i
635
- }
636
- };
637
- var match = {
638
- ordinalNumber: buildMatchPatternFn({
639
- matchPattern: matchOrdinalNumberPattern,
640
- parsePattern: parseOrdinalNumberPattern,
641
- valueCallback: function (value) {
642
- return parseInt(value, 10);
643
- }
644
- }),
645
- era: buildMatchFn({
646
- matchPatterns: matchEraPatterns,
647
- defaultMatchWidth: 'wide',
648
- parsePatterns: parseEraPatterns,
649
- defaultParseWidth: 'any'
650
- }),
651
- quarter: buildMatchFn({
652
- matchPatterns: matchQuarterPatterns,
653
- defaultMatchWidth: 'wide',
654
- parsePatterns: parseQuarterPatterns,
655
- defaultParseWidth: 'any',
656
- valueCallback: function (index) {
657
- return index + 1;
658
- }
659
- }),
660
- month: buildMatchFn({
661
- matchPatterns: matchMonthPatterns,
662
- defaultMatchWidth: 'wide',
663
- parsePatterns: parseMonthPatterns,
664
- defaultParseWidth: 'any'
665
- }),
666
- day: buildMatchFn({
667
- matchPatterns: matchDayPatterns,
668
- defaultMatchWidth: 'wide',
669
- parsePatterns: parseDayPatterns,
670
- defaultParseWidth: 'any'
671
- }),
672
- dayPeriod: buildMatchFn({
673
- matchPatterns: matchDayPeriodPatterns,
674
- defaultMatchWidth: 'any',
675
- parsePatterns: parseDayPeriodPatterns,
676
- defaultParseWidth: 'any'
677
- })
678
- };
679
- var match$1 = match;
680
-
681
- /**
682
- * @type {Locale}
683
- * @category Locales
684
- * @summary English locale (United States).
685
- * @language English
686
- * @iso-639-2 eng
687
- * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
688
- * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
689
- */
690
- var locale = {
691
- code: 'en-US',
692
- formatDistance: formatDistance$1,
693
- formatLong: formatLong$1,
694
- formatRelative: formatRelative$1,
695
- localize: localize$1,
696
- match: match$1,
697
- options: {
698
- weekStartsOn: 0
699
- /* Sunday */
700
- ,
701
- firstWeekContainsDate: 1
702
- }
703
- };
704
- var defaultLocale = locale;
705
-
706
- function assign(target, object) {
707
- if (target == null) {
708
- throw new TypeError('assign requires that input parameter not be null or undefined');
709
- }
710
-
711
- for (var property in object) {
712
- if (Object.prototype.hasOwnProperty.call(object, property)) {
713
- target[property] = object[property];
714
- }
715
- }
716
-
717
- return target;
718
- }
719
-
720
- function cloneObject(object) {
721
- return assign({}, object);
134
+ return true;
722
135
  }
723
136
 
724
- var MILLISECONDS_IN_MINUTE = 1000 * 60;
725
- var MINUTES_IN_DAY = 60 * 24;
726
- var MINUTES_IN_MONTH = MINUTES_IN_DAY * 30;
727
- var MINUTES_IN_YEAR = MINUTES_IN_DAY * 365;
728
137
  /**
729
- * @name formatDistanceStrict
730
- * @category Common Helpers
731
- * @summary Return the distance between the given dates in words.
732
- *
733
- * @description
734
- * Return the distance between the given dates in words, using strict units.
735
- * This is like `formatDistance`, but does not use helpers like 'almost', 'over',
736
- * 'less than' and the like.
737
- *
738
- * | Distance between dates | Result |
739
- * |------------------------|---------------------|
740
- * | 0 ... 59 secs | [0..59] seconds |
741
- * | 1 ... 59 mins | [1..59] minutes |
742
- * | 1 ... 23 hrs | [1..23] hours |
743
- * | 1 ... 29 days | [1..29] days |
744
- * | 1 ... 11 months | [1..11] months |
745
- * | 1 ... N years | [1..N] years |
746
- *
747
- * @param {Date|Number} date - the date
748
- * @param {Date|Number} baseDate - the date to compare with
749
- * @param {Object} [options] - an object with options.
750
- * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first
751
- * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit
752
- * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units
753
- * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
754
- * @returns {String} the distance in words
755
- * @throws {TypeError} 2 arguments required
756
- * @throws {RangeError} `date` must not be Invalid Date
757
- * @throws {RangeError} `baseDate` must not be Invalid Date
758
- * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round'
759
- * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'
760
- * @throws {RangeError} `options.locale` must contain `formatDistance` property
761
- *
762
- * @example
763
- * // What is the distance between 2 July 2014 and 1 January 2015?
764
- * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))
765
- * //=> '6 months'
766
- *
767
- * @example
768
- * // What is the distance between 1 January 2015 00:00:15
769
- * // and 1 January 2015 00:00:00?
770
- * const result = formatDistanceStrict(
771
- * new Date(2015, 0, 1, 0, 0, 15),
772
- * new Date(2015, 0, 1, 0, 0, 0)
773
- * )
774
- * //=> '15 seconds'
138
+ * react-router
775
139
  *
776
- * @example
777
- * // What is the distance from 1 January 2016
778
- * // to 1 January 2015, with a suffix?
779
- * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {
780
- * addSuffix: true
781
- * })
782
- * //=> '1 year ago'
140
+ * Copyright (c) TanStack
783
141
  *
784
- * @example
785
- * // What is the distance from 1 January 2016
786
- * // to 1 January 2015, in minutes?
787
- * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {
788
- * unit: 'minute'
789
- * })
790
- * //=> '525600 minutes'
142
+ * This source code is licensed under the MIT license found in the
143
+ * LICENSE.md file in the root directory of this source tree.
791
144
  *
792
- * @example
793
- * // What is the distance from 1 January 2015
794
- * // to 28 January 2015, in months, rounded up?
795
- * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {
796
- * unit: 'month',
797
- * roundingMethod: 'ceil'
798
- * })
799
- * //=> '1 month'
800
- *
801
- * @example
802
- * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
803
- * import { eoLocale } from 'date-fns/locale/eo'
804
- * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {
805
- * locale: eoLocale
806
- * })
807
- * //=> '1 jaro'
145
+ * @license MIT
808
146
  */
809
-
810
- function formatDistanceStrict(dirtyDate, dirtyBaseDate, options) {
811
- var _ref, _options$locale, _options$roundingMeth;
812
-
813
- requiredArgs(2, arguments);
814
- var defaultOptions = getDefaultOptions();
815
- var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
816
-
817
- if (!locale.formatDistance) {
818
- throw new RangeError('locale must contain localize.formatDistance property');
819
- }
820
-
821
- var comparison = compareAsc(dirtyDate, dirtyBaseDate);
822
-
823
- if (isNaN(comparison)) {
824
- throw new RangeError('Invalid time value');
825
- }
826
-
827
- var localizeOptions = assign(cloneObject(options), {
828
- addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),
829
- comparison: comparison
830
- });
831
- var dateLeft;
832
- var dateRight;
833
-
834
- if (comparison > 0) {
835
- dateLeft = toDate(dirtyBaseDate);
836
- dateRight = toDate(dirtyDate);
837
- } else {
838
- dateLeft = toDate(dirtyDate);
839
- dateRight = toDate(dirtyBaseDate);
840
- }
841
-
842
- var roundingMethod = String((_options$roundingMeth = options === null || options === void 0 ? void 0 : options.roundingMethod) !== null && _options$roundingMeth !== void 0 ? _options$roundingMeth : 'round');
843
- var roundingMethodFn;
844
-
845
- if (roundingMethod === 'floor') {
846
- roundingMethodFn = Math.floor;
847
- } else if (roundingMethod === 'ceil') {
848
- roundingMethodFn = Math.ceil;
849
- } else if (roundingMethod === 'round') {
850
- roundingMethodFn = Math.round;
851
- } else {
852
- throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
853
- }
854
-
855
- var milliseconds = dateRight.getTime() - dateLeft.getTime();
856
- var minutes = milliseconds / MILLISECONDS_IN_MINUTE;
857
- var timezoneOffset = getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft); // Use DST-normalized difference in minutes for years, months and days;
858
- // use regular difference in minutes for hours, minutes and seconds.
859
-
860
- var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE;
861
- var defaultUnit = options === null || options === void 0 ? void 0 : options.unit;
862
- var unit;
863
-
864
- if (!defaultUnit) {
865
- if (minutes < 1) {
866
- unit = 'second';
867
- } else if (minutes < 60) {
868
- unit = 'minute';
869
- } else if (minutes < MINUTES_IN_DAY) {
870
- unit = 'hour';
871
- } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) {
872
- unit = 'day';
873
- } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) {
874
- unit = 'month';
875
- } else {
876
- unit = 'year';
877
- }
878
- } else {
879
- unit = String(defaultUnit);
880
- } // 0 up to 60 seconds
881
-
882
-
883
- if (unit === 'second') {
884
- var seconds = roundingMethodFn(milliseconds / 1000);
885
- return locale.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins
886
- } else if (unit === 'minute') {
887
- var roundedMinutes = roundingMethodFn(minutes);
888
- return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours
889
- } else if (unit === 'hour') {
890
- var hours = roundingMethodFn(minutes / 60);
891
- return locale.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days
892
- } else if (unit === 'day') {
893
- var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY);
894
- return locale.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months
895
- } else if (unit === 'month') {
896
- var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH);
897
- return months === 12 && defaultUnit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date
898
- } else if (unit === 'year') {
899
- var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR);
900
- return locale.formatDistance('xYears', years, localizeOptions);
901
- }
902
-
903
- throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
904
- }
147
+ const routerContext = /*#__PURE__*/React__namespace.createContext(null);
905
148
 
906
149
  const getItem = key => {
907
150
  try {
908
151
  const itemValue = localStorage.getItem(key);
909
-
910
152
  if (typeof itemValue === 'string') {
911
153
  return JSON.parse(itemValue);
912
154
  }
913
-
914
155
  return undefined;
915
- } catch (_unused) {
156
+ } catch {
916
157
  return undefined;
917
158
  }
918
159
  };
919
-
920
160
  function useLocalStorage(key, defaultValue) {
921
161
  const [value, setValue] = React__default["default"].useState();
922
162
  React__default["default"].useEffect(() => {
923
163
  const initialValue = getItem(key);
924
-
925
164
  if (typeof initialValue === 'undefined' || initialValue === null) {
926
165
  setValue(typeof defaultValue === 'function' ? defaultValue() : defaultValue);
927
166
  } else {
@@ -931,22 +170,18 @@
931
170
  const setter = React__default["default"].useCallback(updater => {
932
171
  setValue(old => {
933
172
  let newVal = updater;
934
-
935
173
  if (typeof updater == 'function') {
936
174
  newVal = updater(old);
937
175
  }
938
-
939
176
  try {
940
177
  localStorage.setItem(key, JSON.stringify(newVal));
941
- } catch (_unused2) {}
942
-
178
+ } catch {}
943
179
  return newVal;
944
180
  });
945
181
  }, [key]);
946
182
  return [value, setter];
947
183
  }
948
184
 
949
- const _excluded$3 = ["theme"];
950
185
  const defaultTheme = {
951
186
  background: '#0b1521',
952
187
  backgroundAlt: '#132337',
@@ -961,12 +196,10 @@
961
196
  warning: '#ffb200'
962
197
  };
963
198
  const ThemeContext = /*#__PURE__*/React__default["default"].createContext(defaultTheme);
964
- function ThemeProvider(_ref) {
965
- let {
966
- theme
967
- } = _ref,
968
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
969
-
199
+ function ThemeProvider({
200
+ theme,
201
+ ...rest
202
+ }) {
970
203
  return /*#__PURE__*/React__default["default"].createElement(ThemeContext.Provider, _extends({
971
204
  value: theme
972
205
  }, rest));
@@ -981,74 +214,62 @@
981
214
  if (typeof window !== 'undefined') {
982
215
  return window.matchMedia && window.matchMedia(query).matches;
983
216
  }
984
-
985
217
  return;
986
- }); // Watch for changes
218
+ });
987
219
 
220
+ // Watch for changes
988
221
  React__default["default"].useEffect(() => {
989
222
  if (typeof window !== 'undefined') {
990
223
  if (!window.matchMedia) {
991
224
  return;
992
- } // Create a matcher
993
-
994
-
995
- const matcher = window.matchMedia(query); // Create our handler
225
+ }
996
226
 
997
- const onChange = _ref => {
998
- let {
999
- matches
1000
- } = _ref;
1001
- return setIsMatch(matches);
1002
- }; // Listen for changes
227
+ // Create a matcher
228
+ const matcher = window.matchMedia(query);
1003
229
 
230
+ // Create our handler
231
+ const onChange = ({
232
+ matches
233
+ }) => setIsMatch(matches);
1004
234
 
235
+ // Listen for changes
1005
236
  matcher.addListener(onChange);
1006
237
  return () => {
1007
238
  // Stop listening for changes
1008
239
  matcher.removeListener(onChange);
1009
240
  };
1010
241
  }
1011
-
1012
242
  return;
1013
243
  }, [isMatch, query, setIsMatch]);
1014
244
  return isMatch;
1015
245
  }
1016
246
 
1017
- const _excluded$2 = ["style"];
1018
247
  const isServer$1 = typeof window === 'undefined';
1019
248
  function getStatusColor(match, theme) {
1020
- return match.isPending ? theme.warning : match.isFetching ? theme.active : match.status === 'error' ? theme.danger : match.status === 'success' ? theme.success : theme.gray;
1021
- } // export function getQueryStatusLabel(query: Query) {
1022
- // return query.state.isFetching
1023
- // ? 'fetching'
1024
- // : !query.getObserversCount()
1025
- // ? 'inactive'
1026
- // : query.isStale()
1027
- // ? 'stale'
1028
- // : 'fresh'
1029
- // }
1030
-
1031
- function styled(type, newStyles, queries) {
1032
- if (queries === void 0) {
1033
- queries = {};
1034
- }
1035
-
1036
- return /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
1037
- let {
1038
- style
1039
- } = _ref,
1040
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1041
-
249
+ return match.state.status === 'pending' ? theme.active : match.state.status === 'error' ? theme.danger : match.state.status === 'success' ? theme.success : theme.gray;
250
+ }
251
+ function styled(type, newStyles, queries = {}) {
252
+ return /*#__PURE__*/React__default["default"].forwardRef(({
253
+ style,
254
+ ...rest
255
+ }, ref) => {
1042
256
  const theme = useTheme();
1043
- const mediaStyles = Object.entries(queries).reduce((current, _ref2) => {
1044
- let [key, value] = _ref2;
257
+ const mediaStyles = Object.entries(queries).reduce((current, [key, value]) => {
1045
258
  // eslint-disable-next-line react-hooks/rules-of-hooks
1046
- return useMediaQuery(key) ? _extends({}, current, typeof value === 'function' ? value(rest, theme) : value) : current;
259
+ return useMediaQuery(key) ? {
260
+ ...current,
261
+ ...(typeof value === 'function' ? value(rest, theme) : value)
262
+ } : current;
1047
263
  }, {});
1048
- return /*#__PURE__*/React__default["default"].createElement(type, _extends({}, rest, {
1049
- style: _extends({}, typeof newStyles === 'function' ? newStyles(rest, theme) : newStyles, style, mediaStyles),
264
+ return /*#__PURE__*/React__default["default"].createElement(type, {
265
+ ...rest,
266
+ style: {
267
+ ...(typeof newStyles === 'function' ? newStyles(rest, theme) : newStyles),
268
+ ...style,
269
+ ...mediaStyles
270
+ },
1050
271
  ref
1051
- }));
272
+ });
1052
273
  });
1053
274
  }
1054
275
  function useIsMounted() {
@@ -1062,22 +283,22 @@
1062
283
  }, []);
1063
284
  return isMounted;
1064
285
  }
286
+
1065
287
  /**
1066
288
  * Displays a string regardless the type of the data
1067
289
  * @param {unknown} value Value to be stringified
1068
290
  */
1069
-
1070
291
  const displayValue = value => {
1071
292
  const name = Object.getOwnPropertyNames(Object(value));
1072
- const newValue = typeof value === 'bigint' ? value.toString() + "n" : value;
293
+ const newValue = typeof value === 'bigint' ? `${value.toString()}n` : value;
1073
294
  return JSON.stringify(newValue, name);
1074
295
  };
296
+
1075
297
  /**
1076
298
  * This hook is a safe useState version which schedules state updates in microtasks
1077
299
  * to prevent updating a component state while React is rendering different components
1078
300
  * or when the component is not mounted anymore.
1079
301
  */
1080
-
1081
302
  function useSafeState(initialState) {
1082
303
  const isMounted = useIsMounted();
1083
304
  const [state, setState] = React__default["default"].useState(initialState);
@@ -1090,55 +311,20 @@
1090
311
  }, [isMounted]);
1091
312
  return [state, safeSetState];
1092
313
  }
314
+
1093
315
  /**
1094
316
  * Schedules a microtask.
1095
317
  * This can be useful to schedule state updates after rendering.
1096
318
  */
1097
-
1098
319
  function scheduleMicrotask(callback) {
1099
320
  Promise.resolve().then(callback).catch(error => setTimeout(() => {
1100
321
  throw error;
1101
322
  }));
1102
323
  }
1103
324
 
1104
- function multiSortBy(arr, accessors) {
1105
- if (accessors === void 0) {
1106
- accessors = [d => d];
1107
- }
1108
-
1109
- return arr.map((d, i) => [d, i]).sort((_ref3, _ref4) => {
1110
- let [a, ai] = _ref3;
1111
- let [b, bi] = _ref4;
1112
-
1113
- for (const accessor of accessors) {
1114
- const ao = accessor(a);
1115
- const bo = accessor(b);
1116
-
1117
- if (typeof ao === 'undefined') {
1118
- if (typeof bo === 'undefined') {
1119
- continue;
1120
- }
1121
-
1122
- return 1;
1123
- }
1124
-
1125
- if (ao === bo) {
1126
- continue;
1127
- }
1128
-
1129
- return ao > bo ? 1 : -1;
1130
- }
1131
-
1132
- return ai - bi;
1133
- }).map(_ref5 => {
1134
- let [d] = _ref5;
1135
- return d;
1136
- });
1137
- }
1138
-
1139
325
  const Panel = styled('div', (_props, theme) => ({
1140
326
  fontSize: 'clamp(12px, 1.5vw, 14px)',
1141
- fontFamily: "sans-serif",
327
+ fontFamily: `sans-serif`,
1142
328
  display: 'flex',
1143
329
  backgroundColor: theme.background,
1144
330
  color: theme.foreground
@@ -1147,10 +333,11 @@
1147
333
  flexDirection: 'column'
1148
334
  },
1149
335
  '(max-width: 600px)': {
1150
- fontSize: '.9em' // flexDirection: 'column',
1151
-
336
+ fontSize: '.9em'
337
+ // flexDirection: 'column',
1152
338
  }
1153
339
  });
340
+
1154
341
  const ActivePanel = styled('div', () => ({
1155
342
  flex: '1 1 500px',
1156
343
  display: 'flex',
@@ -1159,7 +346,7 @@
1159
346
  height: '100%'
1160
347
  }), {
1161
348
  '(max-width: 700px)': (_props, theme) => ({
1162
- borderTop: "2px solid " + theme.gray
349
+ borderTop: `2px solid ${theme.gray}`
1163
350
  })
1164
351
  });
1165
352
  const Button = styled('button', (props, theme) => ({
@@ -1173,10 +360,13 @@
1173
360
  padding: '.5em',
1174
361
  opacity: props.disabled ? '.5' : undefined,
1175
362
  cursor: 'pointer'
1176
- })); // export const QueryKeys = styled('span', {
363
+ }));
364
+
365
+ // export const QueryKeys = styled('span', {
1177
366
  // display: 'inline-block',
1178
367
  // fontSize: '0.9em',
1179
368
  // })
369
+
1180
370
  // export const QueryKey = styled('span', {
1181
371
  // display: 'inline-flex',
1182
372
  // alignItems: 'center',
@@ -1189,40 +379,7 @@
1189
379
  const Code = styled('code', {
1190
380
  fontSize: '.9em'
1191
381
  });
1192
- styled('input', (_props, theme) => ({
1193
- backgroundColor: theme.inputBackgroundColor,
1194
- border: 0,
1195
- borderRadius: '.2em',
1196
- color: theme.inputTextColor,
1197
- fontSize: '.9em',
1198
- lineHeight: "1.3",
1199
- padding: '.3em .4em'
1200
- }));
1201
- styled('select', (_props, theme) => ({
1202
- display: "inline-block",
1203
- fontSize: ".9em",
1204
- fontFamily: "sans-serif",
1205
- fontWeight: 'normal',
1206
- lineHeight: "1.3",
1207
- padding: ".3em 1.5em .3em .5em",
1208
- height: 'auto',
1209
- border: 0,
1210
- borderRadius: ".2em",
1211
- appearance: "none",
1212
- WebkitAppearance: 'none',
1213
- backgroundColor: theme.inputBackgroundColor,
1214
- backgroundImage: "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23444444'><polygon points='0,25 100,25 50,75'/></svg>\")",
1215
- backgroundRepeat: "no-repeat",
1216
- backgroundPosition: "right .55em center",
1217
- backgroundSize: ".65em auto, 100%",
1218
- color: theme.inputTextColor
1219
- }), {
1220
- '(max-width: 500px)': {
1221
- display: 'none'
1222
- }
1223
- });
1224
382
 
1225
- const _excluded$1 = ["value", "defaultExpanded", "renderer", "pageSize"];
1226
383
  const Entry = styled('div', {
1227
384
  fontFamily: 'Menlo, monospace',
1228
385
  fontSize: '.7rem',
@@ -1258,20 +415,17 @@
1258
415
  color: 'grey',
1259
416
  fontSize: '.7em'
1260
417
  });
1261
- const Expander = _ref => {
1262
- let {
1263
- expanded,
1264
- style = {}
1265
- } = _ref;
1266
- return /*#__PURE__*/React__namespace.createElement("span", {
1267
- style: _extends({
1268
- display: 'inline-block',
1269
- transition: 'all .1s ease',
1270
- transform: "rotate(" + (expanded ? 90 : 0) + "deg) " + (style.transform || '')
1271
- }, style)
1272
- }, "\u25B6");
1273
- };
1274
-
418
+ const Expander = ({
419
+ expanded,
420
+ style = {}
421
+ }) => /*#__PURE__*/React__namespace.createElement("span", {
422
+ style: {
423
+ display: 'inline-block',
424
+ transition: 'all .1s ease',
425
+ transform: `rotate(${expanded ? 90 : 0}deg) ${style.transform || ''}`,
426
+ ...style
427
+ }
428
+ }, "\u25B6");
1275
429
  /**
1276
430
  * Chunk elements in the array by size
1277
431
  *
@@ -1285,39 +439,34 @@
1285
439
  if (size < 1) return [];
1286
440
  let i = 0;
1287
441
  const result = [];
1288
-
1289
442
  while (i < array.length) {
1290
443
  result.push(array.slice(i, i + size));
1291
444
  i = i + size;
1292
445
  }
1293
-
1294
446
  return result;
1295
447
  }
1296
- const DefaultRenderer = _ref2 => {
1297
- let {
1298
- handleEntry,
1299
- label,
1300
- value,
1301
- subEntries = [],
1302
- subEntryPages = [],
1303
- type,
1304
- expanded = false,
1305
- toggleExpanded,
1306
- pageSize,
1307
- renderer
1308
- } = _ref2;
448
+ const DefaultRenderer = ({
449
+ handleEntry,
450
+ label,
451
+ value,
452
+ subEntries = [],
453
+ subEntryPages = [],
454
+ type,
455
+ expanded = false,
456
+ toggleExpanded,
457
+ pageSize,
458
+ renderer
459
+ }) => {
1309
460
  const [expandedPages, setExpandedPages] = React__namespace.useState([]);
1310
461
  const [valueSnapshot, setValueSnapshot] = React__namespace.useState(undefined);
1311
-
1312
462
  const refreshValueSnapshot = () => {
1313
463
  setValueSnapshot(value());
1314
464
  };
1315
-
1316
465
  return /*#__PURE__*/React__namespace.createElement(Entry, null, subEntryPages.length ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(ExpandButton, {
1317
466
  onClick: () => toggleExpanded()
1318
467
  }, /*#__PURE__*/React__namespace.createElement(Expander, {
1319
468
  expanded: expanded
1320
- }), " ", label, ' ', /*#__PURE__*/React__namespace.createElement(Info, null, String(type).toLowerCase() === 'iterable' ? '(Iterable) ' : '', subEntries.length, " ", subEntries.length > 1 ? "items" : "item")), expanded ? subEntryPages.length === 1 ? /*#__PURE__*/React__namespace.createElement(SubEntries, null, subEntries.map((entry, index) => handleEntry(entry))) : /*#__PURE__*/React__namespace.createElement(SubEntries, null, subEntryPages.map((entries, index) => /*#__PURE__*/React__namespace.createElement("div", {
469
+ }), " ", label, ' ', /*#__PURE__*/React__namespace.createElement(Info, null, String(type).toLowerCase() === 'iterable' ? '(Iterable) ' : '', subEntries.length, " ", subEntries.length > 1 ? `items` : `item`)), expanded ? subEntryPages.length === 1 ? /*#__PURE__*/React__namespace.createElement(SubEntries, null, subEntries.map((entry, index) => handleEntry(entry))) : /*#__PURE__*/React__namespace.createElement(SubEntries, null, subEntryPages.map((entries, index) => /*#__PURE__*/React__namespace.createElement("div", {
1321
470
  key: index
1322
471
  }, /*#__PURE__*/React__namespace.createElement(Entry, null, /*#__PURE__*/React__namespace.createElement(LabelButton, {
1323
472
  onClick: () => setExpandedPages(old => old.includes(index) ? old.filter(d => d !== index) : [...old, index])
@@ -1337,34 +486,29 @@
1337
486
  defaultExpanded: {}
1338
487
  })) : /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Label, null, label, ":"), " ", /*#__PURE__*/React__namespace.createElement(Value, null, displayValue(value))));
1339
488
  };
1340
-
1341
489
  function isIterable(x) {
1342
490
  return Symbol.iterator in x;
1343
491
  }
1344
-
1345
- function Explorer(_ref3) {
1346
- let {
1347
- value,
1348
- defaultExpanded,
1349
- renderer = DefaultRenderer,
1350
- pageSize = 100
1351
- } = _ref3,
1352
- rest = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
1353
-
492
+ function Explorer({
493
+ value,
494
+ defaultExpanded,
495
+ renderer = DefaultRenderer,
496
+ pageSize = 100,
497
+ ...rest
498
+ }) {
1354
499
  const [expanded, setExpanded] = React__namespace.useState(Boolean(defaultExpanded));
1355
500
  const toggleExpanded = React__namespace.useCallback(() => setExpanded(old => !old), []);
1356
501
  let type = typeof value;
1357
502
  let subEntries = [];
1358
-
1359
503
  const makeProperty = sub => {
1360
504
  const subDefaultExpanded = defaultExpanded === true ? {
1361
505
  [sub.label]: true
1362
- } : defaultExpanded == null ? void 0 : defaultExpanded[sub.label];
1363
- return _extends({}, sub, {
506
+ } : defaultExpanded?.[sub.label];
507
+ return {
508
+ ...sub,
1364
509
  defaultExpanded: subDefaultExpanded
1365
- });
510
+ };
1366
511
  };
1367
-
1368
512
  if (Array.isArray(value)) {
1369
513
  type = 'array';
1370
514
  subEntries = value.map((d, i) => makeProperty({
@@ -1379,17 +523,13 @@
1379
523
  }));
1380
524
  } else if (typeof value === 'object' && value !== null) {
1381
525
  type = 'object';
1382
- subEntries = Object.entries(value).map(_ref4 => {
1383
- let [key, val] = _ref4;
1384
- return makeProperty({
1385
- label: key,
1386
- value: val
1387
- });
1388
- });
526
+ subEntries = Object.entries(value).map(([key, val]) => makeProperty({
527
+ label: key,
528
+ value: val
529
+ }));
1389
530
  }
1390
-
1391
531
  const subEntryPages = chunkArray(subEntries, pageSize);
1392
- return renderer(_extends({
532
+ return renderer({
1393
533
  handleEntry: entry => /*#__PURE__*/React__namespace.createElement(Explorer, _extends({
1394
534
  key: entry.label,
1395
535
  value: value,
@@ -1401,51 +541,50 @@
1401
541
  value,
1402
542
  expanded,
1403
543
  toggleExpanded,
1404
- pageSize
1405
- }, rest));
544
+ pageSize,
545
+ ...rest
546
+ });
1406
547
  }
1407
548
 
1408
- const _excluded = ["style"],
1409
- _excluded2 = ["style", "onClick"],
1410
- _excluded3 = ["style", "onClick"],
1411
- _excluded4 = ["isOpen", "setIsOpen", "handleDragStart", "router"];
1412
549
  const isServer = typeof window === 'undefined';
1413
-
1414
550
  function Logo(props) {
1415
- var _props$style;
1416
-
1417
551
  return /*#__PURE__*/React__default["default"].createElement("div", _extends({}, props, {
1418
- style: _extends({}, (_props$style = props.style) != null ? _props$style : {}, {
552
+ style: {
553
+ ...(props.style ?? {}),
1419
554
  display: 'flex',
1420
555
  alignItems: 'center',
1421
556
  flexDirection: 'column',
1422
- fontSize: '0.7rem',
1423
- fontWeight: '900',
557
+ fontSize: '0.8rem',
558
+ fontWeight: 'bolder',
1424
559
  lineHeight: '1'
1425
- })
560
+ }
1426
561
  }), /*#__PURE__*/React__default["default"].createElement("div", {
1427
562
  style: {
1428
563
  letterSpacing: '-0.05rem'
1429
564
  }
1430
565
  }, "TANSTACK"), /*#__PURE__*/React__default["default"].createElement("div", {
1431
- className: "text-transparent bg-clip-text bg-gradient-to-r from-lime-500 to-emerald-500",
1432
566
  style: {
567
+ backgroundImage: 'linear-gradient(to right, var(--tw-gradient-stops))',
568
+ // @ts-ignore
569
+ '--tw-gradient-from': '#84cc16',
570
+ '--tw-gradient-stops': 'var(--tw-gradient-from), var(--tw-gradient-to)',
571
+ '--tw-gradient-to': '#10b981',
572
+ WebkitBackgroundClip: 'text',
573
+ color: 'transparent',
1433
574
  letterSpacing: '0.1rem',
1434
575
  marginRight: '-0.2rem'
1435
576
  }
1436
577
  }, "ROUTER"));
1437
578
  }
1438
-
1439
- function TanStackRouterDevtools(_ref) {
1440
- let {
1441
- initialIsOpen,
1442
- panelProps = {},
1443
- closeButtonProps = {},
1444
- toggleButtonProps = {},
1445
- position = 'bottom-left',
1446
- containerElement: Container = 'footer',
1447
- router
1448
- } = _ref;
579
+ function TanStackRouterDevtools({
580
+ initialIsOpen,
581
+ panelProps = {},
582
+ closeButtonProps = {},
583
+ toggleButtonProps = {},
584
+ position = 'bottom-left',
585
+ containerElement: Container = 'footer',
586
+ router
587
+ }) {
1449
588
  const rootRef = React__default["default"].useRef(null);
1450
589
  const panelRef = React__default["default"].useRef(null);
1451
590
  const [isOpen, setIsOpen] = useLocalStorage('tanstackRouterDevtoolsOpen', initialIsOpen);
@@ -1453,61 +592,51 @@
1453
592
  const [isResolvedOpen, setIsResolvedOpen] = useSafeState(false);
1454
593
  const [isResizing, setIsResizing] = useSafeState(false);
1455
594
  const isMounted = useIsMounted();
1456
-
1457
- const _handleDragStart = (panelElement, startEvent) => {
1458
- var _panelElement$getBoun;
1459
-
595
+ const handleDragStart = (panelElement, startEvent) => {
1460
596
  if (startEvent.button !== 0) return; // Only allow left click for drag
1461
597
 
1462
598
  setIsResizing(true);
1463
599
  const dragInfo = {
1464
- originalHeight: (_panelElement$getBoun = panelElement == null ? void 0 : panelElement.getBoundingClientRect().height) != null ? _panelElement$getBoun : 0,
600
+ originalHeight: panelElement?.getBoundingClientRect().height ?? 0,
1465
601
  pageY: startEvent.pageY
1466
602
  };
1467
-
1468
603
  const run = moveEvent => {
1469
604
  const delta = dragInfo.pageY - moveEvent.pageY;
1470
- const newHeight = (dragInfo == null ? void 0 : dragInfo.originalHeight) + delta;
605
+ const newHeight = dragInfo?.originalHeight + delta;
1471
606
  setDevtoolsHeight(newHeight);
1472
-
1473
607
  if (newHeight < 70) {
1474
608
  setIsOpen(false);
1475
609
  } else {
1476
610
  setIsOpen(true);
1477
611
  }
1478
612
  };
1479
-
1480
613
  const unsub = () => {
1481
614
  setIsResizing(false);
1482
615
  document.removeEventListener('mousemove', run);
1483
616
  document.removeEventListener('mouseUp', unsub);
1484
617
  };
1485
-
1486
618
  document.addEventListener('mousemove', run);
1487
619
  document.addEventListener('mouseup', unsub);
1488
620
  };
1489
-
1490
621
  React__default["default"].useEffect(() => {
1491
- setIsResolvedOpen(isOpen != null ? isOpen : false);
1492
- }, [isOpen, isResolvedOpen, setIsResolvedOpen]); // Toggle panel visibility before/after transition (depending on direction).
1493
- // Prevents focusing in a closed panel.
622
+ setIsResolvedOpen(isOpen ?? false);
623
+ }, [isOpen, isResolvedOpen, setIsResolvedOpen]);
1494
624
 
625
+ // Toggle panel visibility before/after transition (depending on direction).
626
+ // Prevents focusing in a closed panel.
1495
627
  React__default["default"].useEffect(() => {
1496
628
  const ref = panelRef.current;
1497
-
1498
629
  if (ref) {
1499
630
  const handlePanelTransitionStart = () => {
1500
631
  if (ref && isResolvedOpen) {
1501
632
  ref.style.visibility = 'visible';
1502
633
  }
1503
634
  };
1504
-
1505
635
  const handlePanelTransitionEnd = () => {
1506
636
  if (ref && !isResolvedOpen) {
1507
637
  ref.style.visibility = 'hidden';
1508
638
  }
1509
639
  };
1510
-
1511
640
  ref.addEventListener('transitionstart', handlePanelTransitionStart);
1512
641
  ref.addEventListener('transitionend', handlePanelTransitionEnd);
1513
642
  return () => {
@@ -1515,62 +644,46 @@
1515
644
  ref.removeEventListener('transitionend', handlePanelTransitionEnd);
1516
645
  };
1517
646
  }
1518
-
1519
647
  return;
1520
648
  }, [isResolvedOpen]);
1521
649
  React__default["default"][isServer ? 'useEffect' : 'useLayoutEffect'](() => {
1522
650
  if (isResolvedOpen) {
1523
- var _rootRef$current, _rootRef$current$pare;
1524
-
1525
- const previousValue = (_rootRef$current = rootRef.current) == null ? void 0 : (_rootRef$current$pare = _rootRef$current.parentElement) == null ? void 0 : _rootRef$current$pare.style.paddingBottom;
1526
-
651
+ const previousValue = rootRef.current?.parentElement?.style.paddingBottom;
1527
652
  const run = () => {
1528
- var _panelRef$current, _rootRef$current2;
1529
-
1530
- const containerHeight = (_panelRef$current = panelRef.current) == null ? void 0 : _panelRef$current.getBoundingClientRect().height;
1531
-
1532
- if ((_rootRef$current2 = rootRef.current) != null && _rootRef$current2.parentElement) {
1533
- rootRef.current.parentElement.style.paddingBottom = containerHeight + "px";
653
+ const containerHeight = panelRef.current?.getBoundingClientRect().height;
654
+ if (rootRef.current?.parentElement) {
655
+ rootRef.current.parentElement.style.paddingBottom = `${containerHeight}px`;
1534
656
  }
1535
657
  };
1536
-
1537
658
  run();
1538
-
1539
659
  if (typeof window !== 'undefined') {
1540
660
  window.addEventListener('resize', run);
1541
661
  return () => {
1542
- var _rootRef$current3;
1543
-
1544
662
  window.removeEventListener('resize', run);
1545
-
1546
- if ((_rootRef$current3 = rootRef.current) != null && _rootRef$current3.parentElement && typeof previousValue === 'string') {
663
+ if (rootRef.current?.parentElement && typeof previousValue === 'string') {
1547
664
  rootRef.current.parentElement.style.paddingBottom = previousValue;
1548
665
  }
1549
666
  };
1550
667
  }
1551
668
  }
1552
-
1553
669
  return;
1554
670
  }, [isResolvedOpen]);
1555
-
1556
671
  const {
1557
- style: panelStyle = {}
1558
- } = panelProps,
1559
- otherPanelProps = _objectWithoutPropertiesLoose(panelProps, _excluded);
1560
-
672
+ style: panelStyle = {},
673
+ ...otherPanelProps
674
+ } = panelProps;
1561
675
  const {
1562
676
  style: closeButtonStyle = {},
1563
- onClick: onCloseClick
1564
- } = closeButtonProps,
1565
- otherCloseButtonProps = _objectWithoutPropertiesLoose(closeButtonProps, _excluded2);
1566
-
677
+ onClick: onCloseClick,
678
+ ...otherCloseButtonProps
679
+ } = closeButtonProps;
1567
680
  const {
1568
681
  style: toggleButtonStyle = {},
1569
- onClick: onToggleClick
1570
- } = toggleButtonProps,
1571
- otherToggleButtonProps = _objectWithoutPropertiesLoose(toggleButtonProps, _excluded3); // Do not render on the server
1572
-
682
+ onClick: onToggleClick,
683
+ ...otherToggleButtonProps
684
+ } = toggleButtonProps;
1573
685
 
686
+ // Do not render on the server
1574
687
  if (!isMounted()) return null;
1575
688
  return /*#__PURE__*/React__default["default"].createElement(Container, {
1576
689
  ref: rootRef,
@@ -1581,35 +694,38 @@
1581
694
  ref: panelRef
1582
695
  }, otherPanelProps, {
1583
696
  router: router,
1584
- style: _extends({
697
+ style: {
1585
698
  position: 'fixed',
1586
699
  bottom: '0',
1587
700
  right: '0',
1588
701
  zIndex: 99999,
1589
702
  width: '100%',
1590
- height: devtoolsHeight != null ? devtoolsHeight : 500,
703
+ height: devtoolsHeight ?? 500,
1591
704
  maxHeight: '90%',
1592
705
  boxShadow: '0 0 20px rgba(0,0,0,.3)',
1593
- borderTop: "1px solid " + defaultTheme.gray,
706
+ borderTop: `1px solid ${defaultTheme.gray}`,
1594
707
  transformOrigin: 'top',
1595
708
  // visibility will be toggled after transitions, but set initial state here
1596
- visibility: isOpen ? 'visible' : 'hidden'
1597
- }, panelStyle, isResizing ? {
1598
- transition: "none"
1599
- } : {
1600
- transition: "all .2s ease"
1601
- }, isResolvedOpen ? {
1602
- opacity: 1,
1603
- pointerEvents: 'all',
1604
- transform: "translateY(0) scale(1)"
1605
- } : {
1606
- opacity: 0,
1607
- pointerEvents: 'none',
1608
- transform: "translateY(15px) scale(1.02)"
1609
- }),
709
+ visibility: isOpen ? 'visible' : 'hidden',
710
+ ...panelStyle,
711
+ ...(isResizing ? {
712
+ transition: `none`
713
+ } : {
714
+ transition: `all .2s ease`
715
+ }),
716
+ ...(isResolvedOpen ? {
717
+ opacity: 1,
718
+ pointerEvents: 'all',
719
+ transform: `translateY(0) scale(1)`
720
+ } : {
721
+ opacity: 0,
722
+ pointerEvents: 'none',
723
+ transform: `translateY(15px) scale(1.02)`
724
+ })
725
+ },
1610
726
  isOpen: isResolvedOpen,
1611
727
  setIsOpen: setIsOpen,
1612
- handleDragStart: e => _handleDragStart(panelRef.current, e)
728
+ handleDragStart: e => handleDragStart(panelRef.current, e)
1613
729
  })), isResolvedOpen ? /*#__PURE__*/React__default["default"].createElement(Button, _extends({
1614
730
  type: "button",
1615
731
  "aria-label": "Close TanStack Router Devtools"
@@ -1618,20 +734,22 @@
1618
734
  setIsOpen(false);
1619
735
  onCloseClick && onCloseClick(e);
1620
736
  },
1621
- style: _extends({
737
+ style: {
1622
738
  position: 'fixed',
1623
739
  zIndex: 99999,
1624
740
  margin: '.5em',
1625
- bottom: 0
1626
- }, position === 'top-right' ? {
1627
- right: '0'
1628
- } : position === 'top-left' ? {
1629
- left: '0'
1630
- } : position === 'bottom-right' ? {
1631
- right: '0'
1632
- } : {
1633
- left: '0'
1634
- }, closeButtonStyle)
741
+ bottom: 0,
742
+ ...(position === 'top-right' ? {
743
+ right: '0'
744
+ } : position === 'top-left' ? {
745
+ left: '0'
746
+ } : position === 'bottom-right' ? {
747
+ right: '0'
748
+ } : {
749
+ left: '0'
750
+ }),
751
+ ...closeButtonStyle
752
+ }
1635
753
  }), "Close") : null), !isResolvedOpen ? /*#__PURE__*/React__default["default"].createElement("button", _extends({
1636
754
  type: "button"
1637
755
  }, otherToggleButtonProps, {
@@ -1640,7 +758,7 @@
1640
758
  setIsOpen(true);
1641
759
  onToggleClick && onToggleClick(e);
1642
760
  },
1643
- style: _extends({
761
+ style: {
1644
762
  appearance: 'none',
1645
763
  background: 'none',
1646
764
  border: 0,
@@ -1651,65 +769,95 @@
1651
769
  fontSize: '1.5em',
1652
770
  margin: '.5em',
1653
771
  cursor: 'pointer',
1654
- width: 'fit-content'
1655
- }, position === 'top-right' ? {
1656
- top: '0',
1657
- right: '0'
1658
- } : position === 'top-left' ? {
1659
- top: '0',
1660
- left: '0'
1661
- } : position === 'bottom-right' ? {
1662
- bottom: '0',
1663
- right: '0'
1664
- } : {
1665
- bottom: '0',
1666
- left: '0'
1667
- }, toggleButtonStyle)
772
+ width: 'fit-content',
773
+ ...(position === 'top-right' ? {
774
+ top: '0',
775
+ right: '0'
776
+ } : position === 'top-left' ? {
777
+ top: '0',
778
+ left: '0'
779
+ } : position === 'bottom-right' ? {
780
+ bottom: '0',
781
+ right: '0'
782
+ } : {
783
+ bottom: '0',
784
+ left: '0'
785
+ }),
786
+ ...toggleButtonStyle
787
+ }
1668
788
  }), /*#__PURE__*/React__default["default"].createElement(Logo, {
1669
789
  "aria-hidden": true
1670
790
  })) : null);
1671
791
  }
1672
792
  const TanStackRouterDevtoolsPanel = /*#__PURE__*/React__default["default"].forwardRef(function TanStackRouterDevtoolsPanel(props, ref) {
1673
- var _Object$values$find$m, _Object$values, _Object$values$find, _router$state$matches, _router$state$pending, _router$state$pending2, _last, _last2, _last3, _last4, _last5, _last6;
1674
-
1675
793
  const {
1676
794
  isOpen = true,
795
+ setIsOpen,
1677
796
  handleDragStart,
1678
- router
1679
- } = props,
1680
- panelProps = _objectWithoutPropertiesLoose(props, _excluded4);
1681
-
1682
- const rerender = React__default["default"].useReducer(() => ({}), {})[1];
1683
- React__default["default"].useEffect(() => {
1684
- let interval = setInterval(() => {
1685
- router.cleanMatchCache(); // router.notify()
1686
-
1687
- rerender();
1688
- }, 250);
1689
- return () => {
1690
- clearInterval(interval);
1691
- };
1692
- }, []);
797
+ router: userRouter,
798
+ ...panelProps
799
+ } = props;
800
+ const routerContextValue = React__default["default"].useContext(routerContext);
801
+ const router = userRouter ?? routerContextValue?.router;
802
+ invariant(router, 'No router was found for the TanStack Router Devtools. Please place the devtools in the <RouterProvider> component tree or pass the router instance to the devtools manually.');
803
+ useStore(router.__store);
1693
804
  const [activeRouteId, setActiveRouteId] = useLocalStorage('tanstackRouterDevtoolsActiveRouteId', '');
1694
805
  const [activeMatchId, setActiveMatchId] = useLocalStorage('tanstackRouterDevtoolsActiveMatchId', '');
1695
806
  React__default["default"].useEffect(() => {
1696
807
  setActiveMatchId('');
1697
808
  }, [activeRouteId]);
1698
- const activeMatch = (_Object$values$find$m = (_Object$values = Object.values(router.matchCache)) == null ? void 0 : (_Object$values$find = _Object$values.find(d => d.match.matchId === activeMatchId)) == null ? void 0 : _Object$values$find.match) != null ? _Object$values$find$m : (_router$state$matches = router.state.matches) == null ? void 0 : _router$state$matches.find(d => d.routeId === activeRouteId);
1699
- const matchCacheValues = multiSortBy(Object.keys(router.matchCache).filter(key => {
1700
- const cacheEntry = router.matchCache[key];
1701
- return cacheEntry.gc > Date.now();
1702
- }).map(key => router.matchCache[key]), [d => d.match.isFetching ? -1 : 1, d => -d.match.updatedAt]);
809
+ const allMatches = React__default["default"].useMemo(() => [...Object.values(router.state.currentMatches), ...Object.values(router.state.pendingMatches ?? [])], [router.state.currentMatches, router.state.pendingMatches]);
810
+ const activeMatch = allMatches?.find(d => d.id === activeMatchId) || allMatches?.find(d => d.route.id === activeRouteId);
1703
811
  return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
1704
812
  theme: defaultTheme
1705
- }, /*#__PURE__*/React__default["default"].createElement("script", {
1706
- src: "https://cdn.tailwindcss.com"
1707
- }), /*#__PURE__*/React__default["default"].createElement(Panel, _extends({
813
+ }, /*#__PURE__*/React__default["default"].createElement(Panel, _extends({
1708
814
  ref: ref,
1709
815
  className: "TanStackRouterDevtoolsPanel"
1710
816
  }, panelProps), /*#__PURE__*/React__default["default"].createElement("style", {
1711
817
  dangerouslySetInnerHTML: {
1712
- __html: "\n\n .TanStackRouterDevtoolsPanel * {\n scrollbar-color: " + defaultTheme.backgroundAlt + " " + defaultTheme.gray + ";\n }\n\n .TanStackRouterDevtoolsPanel *::-webkit-scrollbar, .TanStackRouterDevtoolsPanel scrollbar {\n width: 1em;\n height: 1em;\n }\n\n .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-track, .TanStackRouterDevtoolsPanel scrollbar-track {\n background: " + defaultTheme.backgroundAlt + ";\n }\n\n .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-thumb, .TanStackRouterDevtoolsPanel scrollbar-thumb {\n background: " + defaultTheme.gray + ";\n border-radius: .5em;\n border: 3px solid " + defaultTheme.backgroundAlt + ";\n }\n\n .TanStackRouterDevtoolsPanel table {\n width: 100%;\n }\n\n .TanStackRouterDevtoolsPanel table tr {\n border-bottom: 2px dotted rgba(255, 255, 255, .2);\n }\n\n .TanStackRouterDevtoolsPanel table tr:last-child {\n border-bottom: none\n }\n\n .TanStackRouterDevtoolsPanel table td {\n padding: .25rem .5rem;\n border-right: 2px dotted rgba(255, 255, 255, .05);\n }\n\n .TanStackRouterDevtoolsPanel table td:last-child {\n border-right: none\n }\n\n "
818
+ __html: `
819
+
820
+ .TanStackRouterDevtoolsPanel * {
821
+ scrollbar-color: ${defaultTheme.backgroundAlt} ${defaultTheme.gray};
822
+ }
823
+
824
+ .TanStackRouterDevtoolsPanel *::-webkit-scrollbar, .TanStackRouterDevtoolsPanel scrollbar {
825
+ width: 1em;
826
+ height: 1em;
827
+ }
828
+
829
+ .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-track, .TanStackRouterDevtoolsPanel scrollbar-track {
830
+ background: ${defaultTheme.backgroundAlt};
831
+ }
832
+
833
+ .TanStackRouterDevtoolsPanel *::-webkit-scrollbar-thumb, .TanStackRouterDevtoolsPanel scrollbar-thumb {
834
+ background: ${defaultTheme.gray};
835
+ border-radius: .5em;
836
+ border: 3px solid ${defaultTheme.backgroundAlt};
837
+ }
838
+
839
+ .TanStackRouterDevtoolsPanel table {
840
+ width: 100%;
841
+ }
842
+
843
+ .TanStackRouterDevtoolsPanel table tr {
844
+ border-bottom: 2px dotted rgba(255, 255, 255, .2);
845
+ }
846
+
847
+ .TanStackRouterDevtoolsPanel table tr:last-child {
848
+ border-bottom: none
849
+ }
850
+
851
+ .TanStackRouterDevtoolsPanel table td {
852
+ padding: .25rem .5rem;
853
+ border-right: 2px dotted rgba(255, 255, 255, .05);
854
+ }
855
+
856
+ .TanStackRouterDevtoolsPanel table td:last-child {
857
+ border-right: none
858
+ }
859
+
860
+ `
1713
861
  }
1714
862
  }), /*#__PURE__*/React__default["default"].createElement("div", {
1715
863
  style: {
@@ -1729,13 +877,17 @@
1729
877
  minHeight: '40%',
1730
878
  maxHeight: '100%',
1731
879
  overflow: 'auto',
1732
- borderRight: "1px solid " + defaultTheme.grayAlt,
880
+ borderRight: `1px solid ${defaultTheme.grayAlt}`,
1733
881
  display: 'flex',
1734
882
  flexDirection: 'column'
1735
883
  }
1736
884
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1737
- className: "flex justify-start gap-2 p-2 items-center",
1738
885
  style: {
886
+ display: 'flex',
887
+ justifyContent: 'start',
888
+ gap: '1rem',
889
+ padding: '1rem',
890
+ alignItems: 'center',
1739
891
  background: defaultTheme.backgroundAlt
1740
892
  }
1741
893
  }, /*#__PURE__*/React__default["default"].createElement(Logo, {
@@ -1768,7 +920,7 @@
1768
920
  minHeight: '40%',
1769
921
  maxHeight: '100%',
1770
922
  overflow: 'auto',
1771
- borderRight: "1px solid " + defaultTheme.grayAlt,
923
+ borderRight: `1px solid ${defaultTheme.grayAlt}`,
1772
924
  display: 'flex',
1773
925
  flexDirection: 'column'
1774
926
  }
@@ -1780,15 +932,15 @@
1780
932
  top: 0,
1781
933
  zIndex: 1
1782
934
  }
1783
- }, "Active Matches"), router.state.matches.map((match, i) => {
935
+ }, "Active Matches"), router.state.currentMatches.map((match, i) => {
1784
936
  return /*#__PURE__*/React__default["default"].createElement("div", {
1785
- key: match.routeId || i,
937
+ key: match.route.id || i,
1786
938
  role: "button",
1787
- "aria-label": "Open match details for " + match.routeId,
1788
- onClick: () => setActiveRouteId(activeRouteId === match.routeId ? '' : match.routeId),
939
+ "aria-label": `Open match details for ${match.route.id}`,
940
+ onClick: () => setActiveRouteId(activeRouteId === match.route.id ? '' : match.route.id),
1789
941
  style: {
1790
942
  display: 'flex',
1791
- borderBottom: "solid 1px " + defaultTheme.grayAlt,
943
+ borderBottom: `solid 1px ${defaultTheme.grayAlt}`,
1792
944
  cursor: 'pointer',
1793
945
  alignItems: 'center',
1794
946
  background: match === activeMatch ? 'rgba(255,255,255,.1)' : undefined
@@ -1810,8 +962,8 @@
1810
962
  style: {
1811
963
  padding: '.5em'
1812
964
  }
1813
- }, "" + match.matchId));
1814
- }), (_router$state$pending = router.state.pending) != null && _router$state$pending.matches.length ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
965
+ }, `${match.id}`));
966
+ }), router.state.pendingMatches?.length ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
1815
967
  style: {
1816
968
  marginTop: '2rem',
1817
969
  padding: '.5em',
@@ -1820,15 +972,15 @@
1820
972
  top: 0,
1821
973
  zIndex: 1
1822
974
  }
1823
- }, "Pending Matches"), (_router$state$pending2 = router.state.pending) == null ? void 0 : _router$state$pending2.matches.map((match, i) => {
975
+ }, "Pending Matches"), router.state.pendingMatches?.map((match, i) => {
1824
976
  return /*#__PURE__*/React__default["default"].createElement("div", {
1825
- key: match.routeId || i,
977
+ key: match.route.id || i,
1826
978
  role: "button",
1827
- "aria-label": "Open match details for " + match.routeId,
1828
- onClick: () => setActiveRouteId(activeRouteId === match.routeId ? '' : match.routeId),
979
+ "aria-label": `Open match details for ${match.route.id}`,
980
+ onClick: () => setActiveRouteId(activeRouteId === match.route.id ? '' : match.route.id),
1829
981
  style: {
1830
982
  display: 'flex',
1831
- borderBottom: "solid 1px " + defaultTheme.grayAlt,
983
+ borderBottom: `solid 1px ${defaultTheme.grayAlt}`,
1832
984
  cursor: 'pointer',
1833
985
  background: match === activeMatch ? 'rgba(255,255,255,.1)' : undefined
1834
986
  }
@@ -1849,75 +1001,7 @@
1849
1001
  style: {
1850
1002
  padding: '.5em'
1851
1003
  }
1852
- }, "" + match.matchId));
1853
- })) : null, matchCacheValues.length ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
1854
- style: {
1855
- marginTop: '2rem',
1856
- padding: '.5em',
1857
- background: defaultTheme.backgroundAlt,
1858
- position: 'sticky',
1859
- top: 0,
1860
- bottom: 0,
1861
- zIndex: 1,
1862
- display: 'flex',
1863
- alignItems: 'center',
1864
- justifyContent: 'space-between'
1865
- }
1866
- }, /*#__PURE__*/React__default["default"].createElement("div", null, "Match Cache"), /*#__PURE__*/React__default["default"].createElement(Button, {
1867
- onClick: () => {
1868
- router.matchCache = {};
1869
- router.notify();
1870
- }
1871
- }, "Clear")), matchCacheValues.map((d, i) => {
1872
- const {
1873
- match,
1874
- gc
1875
- } = d;
1876
- return /*#__PURE__*/React__default["default"].createElement("div", {
1877
- key: match.matchId || i,
1878
- role: "button",
1879
- "aria-label": "Open match details for " + match.matchId,
1880
- onClick: () => setActiveMatchId(activeMatchId === match.matchId ? '' : match.matchId),
1881
- style: {
1882
- display: 'flex',
1883
- borderBottom: "solid 1px " + defaultTheme.grayAlt,
1884
- cursor: 'pointer',
1885
- background: match === activeMatch ? 'rgba(255,255,255,.1)' : undefined
1886
- }
1887
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1888
- style: {
1889
- display: 'flex',
1890
- flexDirection: 'column',
1891
- padding: '.5rem',
1892
- gap: '.3rem'
1893
- }
1894
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1895
- style: {
1896
- display: 'flex',
1897
- alignItems: 'center',
1898
- gap: '.5rem'
1899
- }
1900
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1901
- style: {
1902
- flex: '0 0 auto',
1903
- width: '1.3rem',
1904
- height: '1.3rem',
1905
- background: getStatusColor(match, defaultTheme),
1906
- alignItems: 'center',
1907
- justifyContent: 'center',
1908
- fontWeight: 'bold',
1909
- borderRadius: '.25rem',
1910
- transition: 'all .2s ease-out'
1911
- }
1912
- }), /*#__PURE__*/React__default["default"].createElement(Code, null, "" + match.matchId)), /*#__PURE__*/React__default["default"].createElement("span", {
1913
- style: {
1914
- fontSize: '.7rem',
1915
- opacity: '.5',
1916
- lineHeight: 1
1917
- }
1918
- }, "Expires", ' ', formatDistanceStrict(new Date(gc), new Date(), {
1919
- addSuffix: true
1920
- }))));
1004
+ }, `${match.id}`));
1921
1005
  })) : null), activeMatch ? /*#__PURE__*/React__default["default"].createElement(ActivePanel, null, /*#__PURE__*/React__default["default"].createElement("div", {
1922
1006
  style: {
1923
1007
  padding: '.5em',
@@ -1935,23 +1019,15 @@
1935
1019
  style: {
1936
1020
  lineHeight: '1.8em'
1937
1021
  }
1938
- }, JSON.stringify(activeMatch.matchId, null, 2)))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1939
- style: {
1940
- opacity: '.5'
1941
- }
1942
- }, "Status"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.status)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1943
- style: {
1944
- opacity: '.5'
1945
- }
1946
- }, "Pending"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.isPending.toString())), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1022
+ }, JSON.stringify(activeMatch.id, null, 2)))), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1947
1023
  style: {
1948
1024
  opacity: '.5'
1949
1025
  }
1950
- }, "Invalid"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.isInvalid.toString())), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1026
+ }, "Status"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.state.status)), /*#__PURE__*/React__default["default"].createElement("tr", null, /*#__PURE__*/React__default["default"].createElement("td", {
1951
1027
  style: {
1952
1028
  opacity: '.5'
1953
1029
  }
1954
- }, "Last Updated"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.updatedAt ? new Date(activeMatch.updatedAt).toLocaleTimeString() : 'N/A'))))), /*#__PURE__*/React__default["default"].createElement("div", {
1030
+ }, "Last Updated"), /*#__PURE__*/React__default["default"].createElement("td", null, activeMatch.state.updatedAt ? new Date(activeMatch.state.updatedAt).toLocaleTimeString() : 'N/A'))))), /*#__PURE__*/React__default["default"].createElement("div", {
1955
1031
  style: {
1956
1032
  background: defaultTheme.backgroundAlt,
1957
1033
  padding: '.5em',
@@ -1965,16 +1041,6 @@
1965
1041
  padding: '0.5em'
1966
1042
  }
1967
1043
  }, /*#__PURE__*/React__default["default"].createElement(Button, {
1968
- type: "button",
1969
- onClick: () => {
1970
- activeMatch.invalidate();
1971
- router.notify();
1972
- },
1973
- style: {
1974
- background: defaultTheme.warning,
1975
- color: defaultTheme.inputTextColor
1976
- }
1977
- }, "Invalidate"), ' ', /*#__PURE__*/React__default["default"].createElement(Button, {
1978
1044
  type: "button",
1979
1045
  onClick: () => activeMatch.load(),
1980
1046
  style: {
@@ -2003,7 +1069,7 @@
2003
1069
  minHeight: '40%',
2004
1070
  maxHeight: '100%',
2005
1071
  overflow: 'auto',
2006
- borderRight: "1px solid " + defaultTheme.grayAlt,
1072
+ borderRight: `1px solid ${defaultTheme.grayAlt}`,
2007
1073
  display: 'flex',
2008
1074
  flexDirection: 'column'
2009
1075
  }
@@ -2016,36 +1082,13 @@
2016
1082
  bottom: 0,
2017
1083
  zIndex: 1
2018
1084
  }
2019
- }, "All Loader Data"), /*#__PURE__*/React__default["default"].createElement("div", {
2020
- style: {
2021
- padding: '.5em'
2022
- }
2023
- }, Object.keys(((_last = reactRouter.last(router.state.matches)) == null ? void 0 : _last.loaderData) || {}).length ? /*#__PURE__*/React__default["default"].createElement(Explorer, {
2024
- value: ((_last2 = reactRouter.last(router.state.matches)) == null ? void 0 : _last2.loaderData) || {},
2025
- defaultExpanded: Object.keys(((_last3 = reactRouter.last(router.state.matches)) == null ? void 0 : _last3.loaderData) || {}).reduce((obj, next) => {
2026
- obj[next] = {};
2027
- return obj;
2028
- }, {})
2029
- }) : /*#__PURE__*/React__default["default"].createElement("em", {
2030
- style: {
2031
- opacity: 0.5
2032
- }
2033
- }, '{ }')), /*#__PURE__*/React__default["default"].createElement("div", {
2034
- style: {
2035
- padding: '.5em',
2036
- background: defaultTheme.backgroundAlt,
2037
- position: 'sticky',
2038
- top: 0,
2039
- bottom: 0,
2040
- zIndex: 1
2041
- }
2042
1085
  }, "Search Params"), /*#__PURE__*/React__default["default"].createElement("div", {
2043
1086
  style: {
2044
1087
  padding: '.5em'
2045
1088
  }
2046
- }, Object.keys(((_last4 = reactRouter.last(router.state.matches)) == null ? void 0 : _last4.search) || {}).length ? /*#__PURE__*/React__default["default"].createElement(Explorer, {
2047
- value: ((_last5 = reactRouter.last(router.state.matches)) == null ? void 0 : _last5.search) || {},
2048
- defaultExpanded: Object.keys(((_last6 = reactRouter.last(router.state.matches)) == null ? void 0 : _last6.search) || {}).reduce((obj, next) => {
1089
+ }, Object.keys(last(router.state.currentMatches)?.state.search || {}).length ? /*#__PURE__*/React__default["default"].createElement(Explorer, {
1090
+ value: last(router.state.currentMatches)?.state.search || {},
1091
+ defaultExpanded: Object.keys(last(router.state.currentMatches)?.state.search || {}).reduce((obj, next) => {
2049
1092
  obj[next] = {};
2050
1093
  return obj;
2051
1094
  }, {})