@xyd-js/content 0.1.0-xyd.4 → 0.1.0-xyd.6
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.
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts +4 -1729
- package/dist/index.js +1807 -31
- package/dist/index.js.map +1 -0
- package/dist/vite.d.ts +972 -0
- package/dist/vite.js +223 -0
- package/dist/vite.js.map +1 -0
- package/package.json +4 -3
- package/packages/md/index.ts +13 -0
- package/packages/md/plugins/index.ts +24 -0
- package/packages/md/plugins/md-codegroup.ts +36 -0
- package/{src/vite-plugins → packages/vite}/index.ts +2 -3
- package/src/{utils/index.ts → fs.ts} +4 -4
- package/src/index.ts +8 -0
- package/src/{navigation/index.ts → navigation.ts} +7 -23
- package/tsup.config.ts +6 -6
- package/dist/navigation.d.ts +0 -6
- package/dist/navigation.js +0 -2345
- package/index.ts +0 -10
- package/navigation.ts +0 -4
- package/src/mdx/options.ts +0 -23
- package/vite.config.js +0 -53
- /package/{src/mdx/code.ts → packages/md/plugins/md-code.ts} +0 -0
- /package/{src/mdx/page.ts → packages/md/plugins/md-page.ts} +0 -0
- /package/{src/mdx/themeSettings.ts → packages/md/plugins/md-themeSettings.ts} +0 -0
- /package/{src/mdx/toc.ts → packages/md/plugins/md-toc.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,1601 @@
|
|
|
1
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production.js
|
|
28
|
+
var require_react_production = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production.js"(exports) {
|
|
30
|
+
"use strict";
|
|
31
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
|
|
32
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
33
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
34
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
35
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
36
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
|
37
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
38
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
39
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
40
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
41
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
42
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
43
|
+
function getIteratorFn(maybeIterable) {
|
|
44
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
45
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
46
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
47
|
+
}
|
|
48
|
+
var ReactNoopUpdateQueue = {
|
|
49
|
+
isMounted: function() {
|
|
50
|
+
return false;
|
|
51
|
+
},
|
|
52
|
+
enqueueForceUpdate: function() {
|
|
53
|
+
},
|
|
54
|
+
enqueueReplaceState: function() {
|
|
55
|
+
},
|
|
56
|
+
enqueueSetState: function() {
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var assign = Object.assign;
|
|
60
|
+
var emptyObject = {};
|
|
61
|
+
function Component(props, context, updater) {
|
|
62
|
+
this.props = props;
|
|
63
|
+
this.context = context;
|
|
64
|
+
this.refs = emptyObject;
|
|
65
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
66
|
+
}
|
|
67
|
+
Component.prototype.isReactComponent = {};
|
|
68
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
69
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
70
|
+
throw Error(
|
|
71
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
72
|
+
);
|
|
73
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
74
|
+
};
|
|
75
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
76
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
77
|
+
};
|
|
78
|
+
function ComponentDummy() {
|
|
79
|
+
}
|
|
80
|
+
ComponentDummy.prototype = Component.prototype;
|
|
81
|
+
function PureComponent(props, context, updater) {
|
|
82
|
+
this.props = props;
|
|
83
|
+
this.context = context;
|
|
84
|
+
this.refs = emptyObject;
|
|
85
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
86
|
+
}
|
|
87
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
88
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
89
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
90
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
91
|
+
var isArrayImpl = Array.isArray;
|
|
92
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
93
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
94
|
+
function ReactElement(type, key, self, source, owner, props) {
|
|
95
|
+
self = props.ref;
|
|
96
|
+
return {
|
|
97
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
98
|
+
type,
|
|
99
|
+
key,
|
|
100
|
+
ref: void 0 !== self ? self : null,
|
|
101
|
+
props
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
105
|
+
return ReactElement(
|
|
106
|
+
oldElement.type,
|
|
107
|
+
newKey,
|
|
108
|
+
void 0,
|
|
109
|
+
void 0,
|
|
110
|
+
void 0,
|
|
111
|
+
oldElement.props
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
function isValidElement(object) {
|
|
115
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
116
|
+
}
|
|
117
|
+
function escape(key) {
|
|
118
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
119
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
120
|
+
return escaperLookup[match];
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
124
|
+
function getElementKey(element, index) {
|
|
125
|
+
return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
|
|
126
|
+
}
|
|
127
|
+
function noop$1() {
|
|
128
|
+
}
|
|
129
|
+
function resolveThenable(thenable) {
|
|
130
|
+
switch (thenable.status) {
|
|
131
|
+
case "fulfilled":
|
|
132
|
+
return thenable.value;
|
|
133
|
+
case "rejected":
|
|
134
|
+
throw thenable.reason;
|
|
135
|
+
default:
|
|
136
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
|
|
137
|
+
function(fulfilledValue) {
|
|
138
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
139
|
+
},
|
|
140
|
+
function(error) {
|
|
141
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
142
|
+
}
|
|
143
|
+
)), thenable.status) {
|
|
144
|
+
case "fulfilled":
|
|
145
|
+
return thenable.value;
|
|
146
|
+
case "rejected":
|
|
147
|
+
throw thenable.reason;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
throw thenable;
|
|
151
|
+
}
|
|
152
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
153
|
+
var type = typeof children;
|
|
154
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
155
|
+
var invokeCallback = false;
|
|
156
|
+
if (null === children) invokeCallback = true;
|
|
157
|
+
else
|
|
158
|
+
switch (type) {
|
|
159
|
+
case "bigint":
|
|
160
|
+
case "string":
|
|
161
|
+
case "number":
|
|
162
|
+
invokeCallback = true;
|
|
163
|
+
break;
|
|
164
|
+
case "object":
|
|
165
|
+
switch (children.$$typeof) {
|
|
166
|
+
case REACT_ELEMENT_TYPE:
|
|
167
|
+
case REACT_PORTAL_TYPE:
|
|
168
|
+
invokeCallback = true;
|
|
169
|
+
break;
|
|
170
|
+
case REACT_LAZY_TYPE:
|
|
171
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
172
|
+
invokeCallback(children._payload),
|
|
173
|
+
array,
|
|
174
|
+
escapedPrefix,
|
|
175
|
+
nameSoFar,
|
|
176
|
+
callback
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (invokeCallback)
|
|
181
|
+
return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
182
|
+
return c;
|
|
183
|
+
})) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
|
|
184
|
+
callback,
|
|
185
|
+
escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
|
|
186
|
+
userProvidedKeyEscapeRegex,
|
|
187
|
+
"$&/"
|
|
188
|
+
) + "/") + invokeCallback
|
|
189
|
+
)), array.push(callback)), 1;
|
|
190
|
+
invokeCallback = 0;
|
|
191
|
+
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
192
|
+
if (isArrayImpl(children))
|
|
193
|
+
for (var i = 0; i < children.length; i++)
|
|
194
|
+
nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
195
|
+
nameSoFar,
|
|
196
|
+
array,
|
|
197
|
+
escapedPrefix,
|
|
198
|
+
type,
|
|
199
|
+
callback
|
|
200
|
+
);
|
|
201
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
202
|
+
for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
203
|
+
nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
204
|
+
nameSoFar,
|
|
205
|
+
array,
|
|
206
|
+
escapedPrefix,
|
|
207
|
+
type,
|
|
208
|
+
callback
|
|
209
|
+
);
|
|
210
|
+
else if ("object" === type) {
|
|
211
|
+
if ("function" === typeof children.then)
|
|
212
|
+
return mapIntoArray(
|
|
213
|
+
resolveThenable(children),
|
|
214
|
+
array,
|
|
215
|
+
escapedPrefix,
|
|
216
|
+
nameSoFar,
|
|
217
|
+
callback
|
|
218
|
+
);
|
|
219
|
+
array = String(children);
|
|
220
|
+
throw Error(
|
|
221
|
+
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return invokeCallback;
|
|
225
|
+
}
|
|
226
|
+
function mapChildren(children, func, context) {
|
|
227
|
+
if (null == children) return children;
|
|
228
|
+
var result = [], count = 0;
|
|
229
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
230
|
+
return func.call(context, child, count++);
|
|
231
|
+
});
|
|
232
|
+
return result;
|
|
233
|
+
}
|
|
234
|
+
function lazyInitializer(payload) {
|
|
235
|
+
if (-1 === payload._status) {
|
|
236
|
+
var ctor = payload._result;
|
|
237
|
+
ctor = ctor();
|
|
238
|
+
ctor.then(
|
|
239
|
+
function(moduleObject) {
|
|
240
|
+
if (0 === payload._status || -1 === payload._status)
|
|
241
|
+
payload._status = 1, payload._result = moduleObject;
|
|
242
|
+
},
|
|
243
|
+
function(error) {
|
|
244
|
+
if (0 === payload._status || -1 === payload._status)
|
|
245
|
+
payload._status = 2, payload._result = error;
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
-1 === payload._status && (payload._status = 0, payload._result = ctor);
|
|
249
|
+
}
|
|
250
|
+
if (1 === payload._status) return payload._result.default;
|
|
251
|
+
throw payload._result;
|
|
252
|
+
}
|
|
253
|
+
var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
254
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
255
|
+
var event = new window.ErrorEvent("error", {
|
|
256
|
+
bubbles: true,
|
|
257
|
+
cancelable: true,
|
|
258
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
259
|
+
error
|
|
260
|
+
});
|
|
261
|
+
if (!window.dispatchEvent(event)) return;
|
|
262
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
263
|
+
process.emit("uncaughtException", error);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
console.error(error);
|
|
267
|
+
};
|
|
268
|
+
function noop() {
|
|
269
|
+
}
|
|
270
|
+
exports.Children = {
|
|
271
|
+
map: mapChildren,
|
|
272
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
273
|
+
mapChildren(
|
|
274
|
+
children,
|
|
275
|
+
function() {
|
|
276
|
+
forEachFunc.apply(this, arguments);
|
|
277
|
+
},
|
|
278
|
+
forEachContext
|
|
279
|
+
);
|
|
280
|
+
},
|
|
281
|
+
count: function(children) {
|
|
282
|
+
var n = 0;
|
|
283
|
+
mapChildren(children, function() {
|
|
284
|
+
n++;
|
|
285
|
+
});
|
|
286
|
+
return n;
|
|
287
|
+
},
|
|
288
|
+
toArray: function(children) {
|
|
289
|
+
return mapChildren(children, function(child) {
|
|
290
|
+
return child;
|
|
291
|
+
}) || [];
|
|
292
|
+
},
|
|
293
|
+
only: function(children) {
|
|
294
|
+
if (!isValidElement(children))
|
|
295
|
+
throw Error(
|
|
296
|
+
"React.Children.only expected to receive a single React element child."
|
|
297
|
+
);
|
|
298
|
+
return children;
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
exports.Component = Component;
|
|
302
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
303
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
304
|
+
exports.PureComponent = PureComponent;
|
|
305
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
306
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
307
|
+
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
308
|
+
exports.act = function() {
|
|
309
|
+
throw Error("act(...) is not supported in production builds of React.");
|
|
310
|
+
};
|
|
311
|
+
exports.cache = function(fn) {
|
|
312
|
+
return function() {
|
|
313
|
+
return fn.apply(null, arguments);
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
exports.cloneElement = function(element, config, children) {
|
|
317
|
+
if (null === element || void 0 === element)
|
|
318
|
+
throw Error(
|
|
319
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
320
|
+
);
|
|
321
|
+
var props = assign({}, element.props), key = element.key, owner = void 0;
|
|
322
|
+
if (null != config)
|
|
323
|
+
for (propName in void 0 !== config.ref && (owner = void 0), void 0 !== config.key && (key = "" + config.key), config)
|
|
324
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
325
|
+
var propName = arguments.length - 2;
|
|
326
|
+
if (1 === propName) props.children = children;
|
|
327
|
+
else if (1 < propName) {
|
|
328
|
+
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
329
|
+
childArray[i] = arguments[i + 2];
|
|
330
|
+
props.children = childArray;
|
|
331
|
+
}
|
|
332
|
+
return ReactElement(element.type, key, void 0, void 0, owner, props);
|
|
333
|
+
};
|
|
334
|
+
exports.createContext = function(defaultValue) {
|
|
335
|
+
defaultValue = {
|
|
336
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
337
|
+
_currentValue: defaultValue,
|
|
338
|
+
_currentValue2: defaultValue,
|
|
339
|
+
_threadCount: 0,
|
|
340
|
+
Provider: null,
|
|
341
|
+
Consumer: null
|
|
342
|
+
};
|
|
343
|
+
defaultValue.Provider = defaultValue;
|
|
344
|
+
defaultValue.Consumer = {
|
|
345
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
346
|
+
_context: defaultValue
|
|
347
|
+
};
|
|
348
|
+
return defaultValue;
|
|
349
|
+
};
|
|
350
|
+
exports.createElement = function(type, config, children) {
|
|
351
|
+
var propName, props = {}, key = null;
|
|
352
|
+
if (null != config)
|
|
353
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
354
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
|
|
355
|
+
var childrenLength = arguments.length - 2;
|
|
356
|
+
if (1 === childrenLength) props.children = children;
|
|
357
|
+
else if (1 < childrenLength) {
|
|
358
|
+
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
359
|
+
childArray[i] = arguments[i + 2];
|
|
360
|
+
props.children = childArray;
|
|
361
|
+
}
|
|
362
|
+
if (type && type.defaultProps)
|
|
363
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
364
|
+
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
|
|
365
|
+
return ReactElement(type, key, void 0, void 0, null, props);
|
|
366
|
+
};
|
|
367
|
+
exports.createRef = function() {
|
|
368
|
+
return { current: null };
|
|
369
|
+
};
|
|
370
|
+
exports.forwardRef = function(render) {
|
|
371
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
372
|
+
};
|
|
373
|
+
exports.isValidElement = isValidElement;
|
|
374
|
+
exports.lazy = function(ctor) {
|
|
375
|
+
return {
|
|
376
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
377
|
+
_payload: { _status: -1, _result: ctor },
|
|
378
|
+
_init: lazyInitializer
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
exports.memo = function(type, compare) {
|
|
382
|
+
return {
|
|
383
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
384
|
+
type,
|
|
385
|
+
compare: void 0 === compare ? null : compare
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
exports.startTransition = function(scope) {
|
|
389
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
390
|
+
ReactSharedInternals.T = currentTransition;
|
|
391
|
+
try {
|
|
392
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
393
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
394
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
|
|
395
|
+
} catch (error) {
|
|
396
|
+
reportGlobalError(error);
|
|
397
|
+
} finally {
|
|
398
|
+
ReactSharedInternals.T = prevTransition;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
exports.unstable_useCacheRefresh = function() {
|
|
402
|
+
return ReactSharedInternals.H.useCacheRefresh();
|
|
403
|
+
};
|
|
404
|
+
exports.use = function(usable) {
|
|
405
|
+
return ReactSharedInternals.H.use(usable);
|
|
406
|
+
};
|
|
407
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
408
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
409
|
+
};
|
|
410
|
+
exports.useCallback = function(callback, deps) {
|
|
411
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
412
|
+
};
|
|
413
|
+
exports.useContext = function(Context) {
|
|
414
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
415
|
+
};
|
|
416
|
+
exports.useDebugValue = function() {
|
|
417
|
+
};
|
|
418
|
+
exports.useDeferredValue = function(value, initialValue) {
|
|
419
|
+
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
420
|
+
};
|
|
421
|
+
exports.useEffect = function(create, deps) {
|
|
422
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
423
|
+
};
|
|
424
|
+
exports.useId = function() {
|
|
425
|
+
return ReactSharedInternals.H.useId();
|
|
426
|
+
};
|
|
427
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
428
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
429
|
+
};
|
|
430
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
431
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
432
|
+
};
|
|
433
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
434
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
435
|
+
};
|
|
436
|
+
exports.useMemo = function(create, deps) {
|
|
437
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
438
|
+
};
|
|
439
|
+
exports.useOptimistic = function(passthrough, reducer) {
|
|
440
|
+
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
441
|
+
};
|
|
442
|
+
exports.useReducer = function(reducer, initialArg, init) {
|
|
443
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
444
|
+
};
|
|
445
|
+
exports.useRef = function(initialValue) {
|
|
446
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
447
|
+
};
|
|
448
|
+
exports.useState = function(initialState) {
|
|
449
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
450
|
+
};
|
|
451
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
452
|
+
return ReactSharedInternals.H.useSyncExternalStore(
|
|
453
|
+
subscribe,
|
|
454
|
+
getSnapshot,
|
|
455
|
+
getServerSnapshot
|
|
456
|
+
);
|
|
457
|
+
};
|
|
458
|
+
exports.useTransition = function() {
|
|
459
|
+
return ReactSharedInternals.H.useTransition();
|
|
460
|
+
};
|
|
461
|
+
exports.version = "19.0.0";
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
// ../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.development.js
|
|
466
|
+
var require_react_development = __commonJS({
|
|
467
|
+
"../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.development.js"(exports, module) {
|
|
468
|
+
"use strict";
|
|
469
|
+
"production" !== process.env.NODE_ENV && function() {
|
|
470
|
+
function defineDeprecationWarning(methodName, info) {
|
|
471
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
472
|
+
get: function() {
|
|
473
|
+
console.warn(
|
|
474
|
+
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
475
|
+
info[0],
|
|
476
|
+
info[1]
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
function getIteratorFn(maybeIterable) {
|
|
482
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
483
|
+
return null;
|
|
484
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
485
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
486
|
+
}
|
|
487
|
+
function warnNoop(publicInstance, callerName) {
|
|
488
|
+
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
489
|
+
var warningKey = publicInstance + "." + callerName;
|
|
490
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
|
|
491
|
+
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
|
492
|
+
callerName,
|
|
493
|
+
publicInstance
|
|
494
|
+
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
495
|
+
}
|
|
496
|
+
function Component(props, context, updater) {
|
|
497
|
+
this.props = props;
|
|
498
|
+
this.context = context;
|
|
499
|
+
this.refs = emptyObject;
|
|
500
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
501
|
+
}
|
|
502
|
+
function ComponentDummy() {
|
|
503
|
+
}
|
|
504
|
+
function PureComponent(props, context, updater) {
|
|
505
|
+
this.props = props;
|
|
506
|
+
this.context = context;
|
|
507
|
+
this.refs = emptyObject;
|
|
508
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
509
|
+
}
|
|
510
|
+
function testStringCoercion(value) {
|
|
511
|
+
return "" + value;
|
|
512
|
+
}
|
|
513
|
+
function checkKeyStringCoercion(value) {
|
|
514
|
+
try {
|
|
515
|
+
testStringCoercion(value);
|
|
516
|
+
var JSCompiler_inline_result = false;
|
|
517
|
+
} catch (e) {
|
|
518
|
+
JSCompiler_inline_result = true;
|
|
519
|
+
}
|
|
520
|
+
if (JSCompiler_inline_result) {
|
|
521
|
+
JSCompiler_inline_result = console;
|
|
522
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
523
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
524
|
+
JSCompiler_temp_const.call(
|
|
525
|
+
JSCompiler_inline_result,
|
|
526
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
527
|
+
JSCompiler_inline_result$jscomp$0
|
|
528
|
+
);
|
|
529
|
+
return testStringCoercion(value);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function getComponentNameFromType(type) {
|
|
533
|
+
if (null == type) return null;
|
|
534
|
+
if ("function" === typeof type)
|
|
535
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE$2 ? null : type.displayName || type.name || null;
|
|
536
|
+
if ("string" === typeof type) return type;
|
|
537
|
+
switch (type) {
|
|
538
|
+
case REACT_FRAGMENT_TYPE:
|
|
539
|
+
return "Fragment";
|
|
540
|
+
case REACT_PORTAL_TYPE:
|
|
541
|
+
return "Portal";
|
|
542
|
+
case REACT_PROFILER_TYPE:
|
|
543
|
+
return "Profiler";
|
|
544
|
+
case REACT_STRICT_MODE_TYPE:
|
|
545
|
+
return "StrictMode";
|
|
546
|
+
case REACT_SUSPENSE_TYPE:
|
|
547
|
+
return "Suspense";
|
|
548
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
549
|
+
return "SuspenseList";
|
|
550
|
+
}
|
|
551
|
+
if ("object" === typeof type)
|
|
552
|
+
switch ("number" === typeof type.tag && console.error(
|
|
553
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
554
|
+
), type.$$typeof) {
|
|
555
|
+
case REACT_CONTEXT_TYPE:
|
|
556
|
+
return (type.displayName || "Context") + ".Provider";
|
|
557
|
+
case REACT_CONSUMER_TYPE:
|
|
558
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
559
|
+
case REACT_FORWARD_REF_TYPE:
|
|
560
|
+
var innerType = type.render;
|
|
561
|
+
type = type.displayName;
|
|
562
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
563
|
+
return type;
|
|
564
|
+
case REACT_MEMO_TYPE:
|
|
565
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
566
|
+
case REACT_LAZY_TYPE:
|
|
567
|
+
innerType = type._payload;
|
|
568
|
+
type = type._init;
|
|
569
|
+
try {
|
|
570
|
+
return getComponentNameFromType(type(innerType));
|
|
571
|
+
} catch (x) {
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
return null;
|
|
575
|
+
}
|
|
576
|
+
function isValidElementType(type) {
|
|
577
|
+
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE$1 || void 0 !== type.getModuleId) ? true : false;
|
|
578
|
+
}
|
|
579
|
+
function disabledLog() {
|
|
580
|
+
}
|
|
581
|
+
function disableLogs() {
|
|
582
|
+
if (0 === disabledDepth) {
|
|
583
|
+
prevLog = console.log;
|
|
584
|
+
prevInfo = console.info;
|
|
585
|
+
prevWarn = console.warn;
|
|
586
|
+
prevError = console.error;
|
|
587
|
+
prevGroup = console.group;
|
|
588
|
+
prevGroupCollapsed = console.groupCollapsed;
|
|
589
|
+
prevGroupEnd = console.groupEnd;
|
|
590
|
+
var props = {
|
|
591
|
+
configurable: true,
|
|
592
|
+
enumerable: true,
|
|
593
|
+
value: disabledLog,
|
|
594
|
+
writable: true
|
|
595
|
+
};
|
|
596
|
+
Object.defineProperties(console, {
|
|
597
|
+
info: props,
|
|
598
|
+
log: props,
|
|
599
|
+
warn: props,
|
|
600
|
+
error: props,
|
|
601
|
+
group: props,
|
|
602
|
+
groupCollapsed: props,
|
|
603
|
+
groupEnd: props
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
disabledDepth++;
|
|
607
|
+
}
|
|
608
|
+
function reenableLogs() {
|
|
609
|
+
disabledDepth--;
|
|
610
|
+
if (0 === disabledDepth) {
|
|
611
|
+
var props = { configurable: true, enumerable: true, writable: true };
|
|
612
|
+
Object.defineProperties(console, {
|
|
613
|
+
log: assign({}, props, { value: prevLog }),
|
|
614
|
+
info: assign({}, props, { value: prevInfo }),
|
|
615
|
+
warn: assign({}, props, { value: prevWarn }),
|
|
616
|
+
error: assign({}, props, { value: prevError }),
|
|
617
|
+
group: assign({}, props, { value: prevGroup }),
|
|
618
|
+
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
|
|
619
|
+
groupEnd: assign({}, props, { value: prevGroupEnd })
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
0 > disabledDepth && console.error(
|
|
623
|
+
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
function describeBuiltInComponentFrame(name) {
|
|
627
|
+
if (void 0 === prefix)
|
|
628
|
+
try {
|
|
629
|
+
throw Error();
|
|
630
|
+
} catch (x) {
|
|
631
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
632
|
+
prefix = match && match[1] || "";
|
|
633
|
+
suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
634
|
+
}
|
|
635
|
+
return "\n" + prefix + name + suffix;
|
|
636
|
+
}
|
|
637
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
638
|
+
if (!fn || reentry) return "";
|
|
639
|
+
var frame = componentFrameCache.get(fn);
|
|
640
|
+
if (void 0 !== frame) return frame;
|
|
641
|
+
reentry = true;
|
|
642
|
+
frame = Error.prepareStackTrace;
|
|
643
|
+
Error.prepareStackTrace = void 0;
|
|
644
|
+
var previousDispatcher = null;
|
|
645
|
+
previousDispatcher = ReactSharedInternals.H;
|
|
646
|
+
ReactSharedInternals.H = null;
|
|
647
|
+
disableLogs();
|
|
648
|
+
try {
|
|
649
|
+
var RunInRootFrame = {
|
|
650
|
+
DetermineComponentFrameRoot: function() {
|
|
651
|
+
try {
|
|
652
|
+
if (construct) {
|
|
653
|
+
var Fake = function() {
|
|
654
|
+
throw Error();
|
|
655
|
+
};
|
|
656
|
+
Object.defineProperty(Fake.prototype, "props", {
|
|
657
|
+
set: function() {
|
|
658
|
+
throw Error();
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
if ("object" === typeof Reflect && Reflect.construct) {
|
|
662
|
+
try {
|
|
663
|
+
Reflect.construct(Fake, []);
|
|
664
|
+
} catch (x) {
|
|
665
|
+
var control = x;
|
|
666
|
+
}
|
|
667
|
+
Reflect.construct(fn, [], Fake);
|
|
668
|
+
} else {
|
|
669
|
+
try {
|
|
670
|
+
Fake.call();
|
|
671
|
+
} catch (x$0) {
|
|
672
|
+
control = x$0;
|
|
673
|
+
}
|
|
674
|
+
fn.call(Fake.prototype);
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
try {
|
|
678
|
+
throw Error();
|
|
679
|
+
} catch (x$1) {
|
|
680
|
+
control = x$1;
|
|
681
|
+
}
|
|
682
|
+
(Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
} catch (sample) {
|
|
686
|
+
if (sample && control && "string" === typeof sample.stack)
|
|
687
|
+
return [sample.stack, control.stack];
|
|
688
|
+
}
|
|
689
|
+
return [null, null];
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
693
|
+
var namePropDescriptor = Object.getOwnPropertyDescriptor(
|
|
694
|
+
RunInRootFrame.DetermineComponentFrameRoot,
|
|
695
|
+
"name"
|
|
696
|
+
);
|
|
697
|
+
namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
|
|
698
|
+
RunInRootFrame.DetermineComponentFrameRoot,
|
|
699
|
+
"name",
|
|
700
|
+
{ value: "DetermineComponentFrameRoot" }
|
|
701
|
+
);
|
|
702
|
+
var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
|
|
703
|
+
if (sampleStack && controlStack) {
|
|
704
|
+
var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
|
|
705
|
+
for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
|
|
706
|
+
"DetermineComponentFrameRoot"
|
|
707
|
+
); )
|
|
708
|
+
namePropDescriptor++;
|
|
709
|
+
for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
|
|
710
|
+
"DetermineComponentFrameRoot"
|
|
711
|
+
); )
|
|
712
|
+
_RunInRootFrame$Deter++;
|
|
713
|
+
if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
|
|
714
|
+
for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
|
|
715
|
+
_RunInRootFrame$Deter--;
|
|
716
|
+
for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
|
|
717
|
+
if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
|
|
718
|
+
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
|
|
719
|
+
do
|
|
720
|
+
if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
|
|
721
|
+
var _frame = "\n" + sampleLines[namePropDescriptor].replace(
|
|
722
|
+
" at new ",
|
|
723
|
+
" at "
|
|
724
|
+
);
|
|
725
|
+
fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
|
|
726
|
+
"function" === typeof fn && componentFrameCache.set(fn, _frame);
|
|
727
|
+
return _frame;
|
|
728
|
+
}
|
|
729
|
+
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
|
|
730
|
+
}
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
} finally {
|
|
735
|
+
reentry = false, ReactSharedInternals.H = previousDispatcher, reenableLogs(), Error.prepareStackTrace = frame;
|
|
736
|
+
}
|
|
737
|
+
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
|
|
738
|
+
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
|
|
739
|
+
return sampleLines;
|
|
740
|
+
}
|
|
741
|
+
function describeUnknownElementTypeFrameInDEV(type) {
|
|
742
|
+
if (null == type) return "";
|
|
743
|
+
if ("function" === typeof type) {
|
|
744
|
+
var prototype = type.prototype;
|
|
745
|
+
return describeNativeComponentFrame(
|
|
746
|
+
type,
|
|
747
|
+
!(!prototype || !prototype.isReactComponent)
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
|
|
751
|
+
switch (type) {
|
|
752
|
+
case REACT_SUSPENSE_TYPE:
|
|
753
|
+
return describeBuiltInComponentFrame("Suspense");
|
|
754
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
755
|
+
return describeBuiltInComponentFrame("SuspenseList");
|
|
756
|
+
}
|
|
757
|
+
if ("object" === typeof type)
|
|
758
|
+
switch (type.$$typeof) {
|
|
759
|
+
case REACT_FORWARD_REF_TYPE:
|
|
760
|
+
return type = describeNativeComponentFrame(type.render, false), type;
|
|
761
|
+
case REACT_MEMO_TYPE:
|
|
762
|
+
return describeUnknownElementTypeFrameInDEV(type.type);
|
|
763
|
+
case REACT_LAZY_TYPE:
|
|
764
|
+
prototype = type._payload;
|
|
765
|
+
type = type._init;
|
|
766
|
+
try {
|
|
767
|
+
return describeUnknownElementTypeFrameInDEV(type(prototype));
|
|
768
|
+
} catch (x) {
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
return "";
|
|
772
|
+
}
|
|
773
|
+
function getOwner() {
|
|
774
|
+
var dispatcher = ReactSharedInternals.A;
|
|
775
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
776
|
+
}
|
|
777
|
+
function hasValidKey(config) {
|
|
778
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
779
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
780
|
+
if (getter && getter.isReactWarning) return false;
|
|
781
|
+
}
|
|
782
|
+
return void 0 !== config.key;
|
|
783
|
+
}
|
|
784
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
785
|
+
function warnAboutAccessingKey() {
|
|
786
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
787
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
788
|
+
displayName
|
|
789
|
+
));
|
|
790
|
+
}
|
|
791
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
792
|
+
Object.defineProperty(props, "key", {
|
|
793
|
+
get: warnAboutAccessingKey,
|
|
794
|
+
configurable: true
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
798
|
+
var componentName = getComponentNameFromType(this.type);
|
|
799
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
800
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
801
|
+
));
|
|
802
|
+
componentName = this.props.ref;
|
|
803
|
+
return void 0 !== componentName ? componentName : null;
|
|
804
|
+
}
|
|
805
|
+
function ReactElement(type, key, self, source, owner, props) {
|
|
806
|
+
self = props.ref;
|
|
807
|
+
type = {
|
|
808
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
809
|
+
type,
|
|
810
|
+
key,
|
|
811
|
+
props,
|
|
812
|
+
_owner: owner
|
|
813
|
+
};
|
|
814
|
+
null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
|
|
815
|
+
enumerable: false,
|
|
816
|
+
get: elementRefGetterWithDeprecationWarning
|
|
817
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
818
|
+
type._store = {};
|
|
819
|
+
Object.defineProperty(type._store, "validated", {
|
|
820
|
+
configurable: false,
|
|
821
|
+
enumerable: false,
|
|
822
|
+
writable: true,
|
|
823
|
+
value: 0
|
|
824
|
+
});
|
|
825
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
826
|
+
configurable: false,
|
|
827
|
+
enumerable: false,
|
|
828
|
+
writable: true,
|
|
829
|
+
value: null
|
|
830
|
+
});
|
|
831
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
832
|
+
return type;
|
|
833
|
+
}
|
|
834
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
835
|
+
newKey = ReactElement(
|
|
836
|
+
oldElement.type,
|
|
837
|
+
newKey,
|
|
838
|
+
void 0,
|
|
839
|
+
void 0,
|
|
840
|
+
oldElement._owner,
|
|
841
|
+
oldElement.props
|
|
842
|
+
);
|
|
843
|
+
newKey._store.validated = oldElement._store.validated;
|
|
844
|
+
return newKey;
|
|
845
|
+
}
|
|
846
|
+
function validateChildKeys(node, parentType) {
|
|
847
|
+
if ("object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE) {
|
|
848
|
+
if (isArrayImpl(node))
|
|
849
|
+
for (var i = 0; i < node.length; i++) {
|
|
850
|
+
var child = node[i];
|
|
851
|
+
isValidElement(child) && validateExplicitKey(child, parentType);
|
|
852
|
+
}
|
|
853
|
+
else if (isValidElement(node))
|
|
854
|
+
node._store && (node._store.validated = 1);
|
|
855
|
+
else if (i = getIteratorFn(node), "function" === typeof i && i !== node.entries && (i = i.call(node), i !== node))
|
|
856
|
+
for (; !(node = i.next()).done; )
|
|
857
|
+
isValidElement(node.value) && validateExplicitKey(node.value, parentType);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function isValidElement(object) {
|
|
861
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
862
|
+
}
|
|
863
|
+
function validateExplicitKey(element, parentType) {
|
|
864
|
+
if (element._store && !element._store.validated && null == element.key && (element._store.validated = 1, parentType = getCurrentComponentErrorInfo(parentType), !ownerHasKeyUseWarning[parentType])) {
|
|
865
|
+
ownerHasKeyUseWarning[parentType] = true;
|
|
866
|
+
var childOwner = "";
|
|
867
|
+
element && null != element._owner && element._owner !== getOwner() && (childOwner = null, "number" === typeof element._owner.tag ? childOwner = getComponentNameFromType(element._owner.type) : "string" === typeof element._owner.name && (childOwner = element._owner.name), childOwner = " It was passed a child from " + childOwner + ".");
|
|
868
|
+
var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
869
|
+
ReactSharedInternals.getCurrentStack = function() {
|
|
870
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type);
|
|
871
|
+
prevGetCurrentStack && (stack += prevGetCurrentStack() || "");
|
|
872
|
+
return stack;
|
|
873
|
+
};
|
|
874
|
+
console.error(
|
|
875
|
+
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
876
|
+
parentType,
|
|
877
|
+
childOwner
|
|
878
|
+
);
|
|
879
|
+
ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
883
|
+
var info = "", owner = getOwner();
|
|
884
|
+
owner && (owner = getComponentNameFromType(owner.type)) && (info = "\n\nCheck the render method of `" + owner + "`.");
|
|
885
|
+
info || (parentType = getComponentNameFromType(parentType)) && (info = "\n\nCheck the top-level render call using <" + parentType + ">.");
|
|
886
|
+
return info;
|
|
887
|
+
}
|
|
888
|
+
function escape(key) {
|
|
889
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
890
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
891
|
+
return escaperLookup[match];
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
function getElementKey(element, index) {
|
|
895
|
+
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
896
|
+
}
|
|
897
|
+
function noop$1() {
|
|
898
|
+
}
|
|
899
|
+
function resolveThenable(thenable) {
|
|
900
|
+
switch (thenable.status) {
|
|
901
|
+
case "fulfilled":
|
|
902
|
+
return thenable.value;
|
|
903
|
+
case "rejected":
|
|
904
|
+
throw thenable.reason;
|
|
905
|
+
default:
|
|
906
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
|
|
907
|
+
function(fulfilledValue) {
|
|
908
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
909
|
+
},
|
|
910
|
+
function(error) {
|
|
911
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
912
|
+
}
|
|
913
|
+
)), thenable.status) {
|
|
914
|
+
case "fulfilled":
|
|
915
|
+
return thenable.value;
|
|
916
|
+
case "rejected":
|
|
917
|
+
throw thenable.reason;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
throw thenable;
|
|
921
|
+
}
|
|
922
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
923
|
+
var type = typeof children;
|
|
924
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
925
|
+
var invokeCallback = false;
|
|
926
|
+
if (null === children) invokeCallback = true;
|
|
927
|
+
else
|
|
928
|
+
switch (type) {
|
|
929
|
+
case "bigint":
|
|
930
|
+
case "string":
|
|
931
|
+
case "number":
|
|
932
|
+
invokeCallback = true;
|
|
933
|
+
break;
|
|
934
|
+
case "object":
|
|
935
|
+
switch (children.$$typeof) {
|
|
936
|
+
case REACT_ELEMENT_TYPE:
|
|
937
|
+
case REACT_PORTAL_TYPE:
|
|
938
|
+
invokeCallback = true;
|
|
939
|
+
break;
|
|
940
|
+
case REACT_LAZY_TYPE:
|
|
941
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
942
|
+
invokeCallback(children._payload),
|
|
943
|
+
array,
|
|
944
|
+
escapedPrefix,
|
|
945
|
+
nameSoFar,
|
|
946
|
+
callback
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
if (invokeCallback) {
|
|
951
|
+
invokeCallback = children;
|
|
952
|
+
callback = callback(invokeCallback);
|
|
953
|
+
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
954
|
+
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
955
|
+
return c;
|
|
956
|
+
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
|
|
957
|
+
callback,
|
|
958
|
+
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
|
|
959
|
+
userProvidedKeyEscapeRegex,
|
|
960
|
+
"$&/"
|
|
961
|
+
) + "/") + childKey
|
|
962
|
+
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
963
|
+
return 1;
|
|
964
|
+
}
|
|
965
|
+
invokeCallback = 0;
|
|
966
|
+
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
967
|
+
if (isArrayImpl(children))
|
|
968
|
+
for (var i = 0; i < children.length; i++)
|
|
969
|
+
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
970
|
+
nameSoFar,
|
|
971
|
+
array,
|
|
972
|
+
escapedPrefix,
|
|
973
|
+
type,
|
|
974
|
+
callback
|
|
975
|
+
);
|
|
976
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
977
|
+
for (i === children.entries && (didWarnAboutMaps || console.warn(
|
|
978
|
+
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
979
|
+
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
980
|
+
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
981
|
+
nameSoFar,
|
|
982
|
+
array,
|
|
983
|
+
escapedPrefix,
|
|
984
|
+
type,
|
|
985
|
+
callback
|
|
986
|
+
);
|
|
987
|
+
else if ("object" === type) {
|
|
988
|
+
if ("function" === typeof children.then)
|
|
989
|
+
return mapIntoArray(
|
|
990
|
+
resolveThenable(children),
|
|
991
|
+
array,
|
|
992
|
+
escapedPrefix,
|
|
993
|
+
nameSoFar,
|
|
994
|
+
callback
|
|
995
|
+
);
|
|
996
|
+
array = String(children);
|
|
997
|
+
throw Error(
|
|
998
|
+
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
return invokeCallback;
|
|
1002
|
+
}
|
|
1003
|
+
function mapChildren(children, func, context) {
|
|
1004
|
+
if (null == children) return children;
|
|
1005
|
+
var result = [], count = 0;
|
|
1006
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
1007
|
+
return func.call(context, child, count++);
|
|
1008
|
+
});
|
|
1009
|
+
return result;
|
|
1010
|
+
}
|
|
1011
|
+
function lazyInitializer(payload) {
|
|
1012
|
+
if (-1 === payload._status) {
|
|
1013
|
+
var ctor = payload._result;
|
|
1014
|
+
ctor = ctor();
|
|
1015
|
+
ctor.then(
|
|
1016
|
+
function(moduleObject) {
|
|
1017
|
+
if (0 === payload._status || -1 === payload._status)
|
|
1018
|
+
payload._status = 1, payload._result = moduleObject;
|
|
1019
|
+
},
|
|
1020
|
+
function(error) {
|
|
1021
|
+
if (0 === payload._status || -1 === payload._status)
|
|
1022
|
+
payload._status = 2, payload._result = error;
|
|
1023
|
+
}
|
|
1024
|
+
);
|
|
1025
|
+
-1 === payload._status && (payload._status = 0, payload._result = ctor);
|
|
1026
|
+
}
|
|
1027
|
+
if (1 === payload._status)
|
|
1028
|
+
return ctor = payload._result, void 0 === ctor && console.error(
|
|
1029
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
|
|
1030
|
+
ctor
|
|
1031
|
+
), "default" in ctor || console.error(
|
|
1032
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
1033
|
+
ctor
|
|
1034
|
+
), ctor.default;
|
|
1035
|
+
throw payload._result;
|
|
1036
|
+
}
|
|
1037
|
+
function resolveDispatcher() {
|
|
1038
|
+
var dispatcher = ReactSharedInternals.H;
|
|
1039
|
+
null === dispatcher && console.error(
|
|
1040
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
1041
|
+
);
|
|
1042
|
+
return dispatcher;
|
|
1043
|
+
}
|
|
1044
|
+
function noop() {
|
|
1045
|
+
}
|
|
1046
|
+
function enqueueTask(task) {
|
|
1047
|
+
if (null === enqueueTaskImpl)
|
|
1048
|
+
try {
|
|
1049
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
1050
|
+
enqueueTaskImpl = (module && module[requireString]).call(
|
|
1051
|
+
module,
|
|
1052
|
+
"timers"
|
|
1053
|
+
).setImmediate;
|
|
1054
|
+
} catch (_err) {
|
|
1055
|
+
enqueueTaskImpl = function(callback) {
|
|
1056
|
+
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
|
|
1057
|
+
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
1058
|
+
));
|
|
1059
|
+
var channel = new MessageChannel();
|
|
1060
|
+
channel.port1.onmessage = callback;
|
|
1061
|
+
channel.port2.postMessage(void 0);
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
return enqueueTaskImpl(task);
|
|
1065
|
+
}
|
|
1066
|
+
function aggregateErrors(errors) {
|
|
1067
|
+
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
|
|
1068
|
+
}
|
|
1069
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
1070
|
+
prevActScopeDepth !== actScopeDepth - 1 && console.error(
|
|
1071
|
+
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
1072
|
+
);
|
|
1073
|
+
actScopeDepth = prevActScopeDepth;
|
|
1074
|
+
}
|
|
1075
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
1076
|
+
var queue = ReactSharedInternals.actQueue;
|
|
1077
|
+
if (null !== queue)
|
|
1078
|
+
if (0 !== queue.length)
|
|
1079
|
+
try {
|
|
1080
|
+
flushActQueue(queue);
|
|
1081
|
+
enqueueTask(function() {
|
|
1082
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1083
|
+
});
|
|
1084
|
+
return;
|
|
1085
|
+
} catch (error) {
|
|
1086
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1087
|
+
}
|
|
1088
|
+
else ReactSharedInternals.actQueue = null;
|
|
1089
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
1090
|
+
}
|
|
1091
|
+
function flushActQueue(queue) {
|
|
1092
|
+
if (!isFlushing) {
|
|
1093
|
+
isFlushing = true;
|
|
1094
|
+
var i = 0;
|
|
1095
|
+
try {
|
|
1096
|
+
for (; i < queue.length; i++) {
|
|
1097
|
+
var callback = queue[i];
|
|
1098
|
+
do {
|
|
1099
|
+
ReactSharedInternals.didUsePromise = false;
|
|
1100
|
+
var continuation = callback(false);
|
|
1101
|
+
if (null !== continuation) {
|
|
1102
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
1103
|
+
queue[i] = callback;
|
|
1104
|
+
queue.splice(0, i);
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
callback = continuation;
|
|
1108
|
+
} else break;
|
|
1109
|
+
} while (1);
|
|
1110
|
+
}
|
|
1111
|
+
queue.length = 0;
|
|
1112
|
+
} catch (error) {
|
|
1113
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
1114
|
+
} finally {
|
|
1115
|
+
isFlushing = false;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1120
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
1121
|
+
Symbol.for("react.provider");
|
|
1122
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
1123
|
+
isMounted: function() {
|
|
1124
|
+
return false;
|
|
1125
|
+
},
|
|
1126
|
+
enqueueForceUpdate: function(publicInstance) {
|
|
1127
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
1128
|
+
},
|
|
1129
|
+
enqueueReplaceState: function(publicInstance) {
|
|
1130
|
+
warnNoop(publicInstance, "replaceState");
|
|
1131
|
+
},
|
|
1132
|
+
enqueueSetState: function(publicInstance) {
|
|
1133
|
+
warnNoop(publicInstance, "setState");
|
|
1134
|
+
}
|
|
1135
|
+
}, assign = Object.assign, emptyObject = {};
|
|
1136
|
+
Object.freeze(emptyObject);
|
|
1137
|
+
Component.prototype.isReactComponent = {};
|
|
1138
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
1139
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
1140
|
+
throw Error(
|
|
1141
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1142
|
+
);
|
|
1143
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
1144
|
+
};
|
|
1145
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
1146
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
1147
|
+
};
|
|
1148
|
+
var deprecatedAPIs = {
|
|
1149
|
+
isMounted: [
|
|
1150
|
+
"isMounted",
|
|
1151
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1152
|
+
],
|
|
1153
|
+
replaceState: [
|
|
1154
|
+
"replaceState",
|
|
1155
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1156
|
+
]
|
|
1157
|
+
}, fnName;
|
|
1158
|
+
for (fnName in deprecatedAPIs)
|
|
1159
|
+
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1160
|
+
ComponentDummy.prototype = Component.prototype;
|
|
1161
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
1162
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
1163
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
1164
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
1165
|
+
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
1166
|
+
H: null,
|
|
1167
|
+
A: null,
|
|
1168
|
+
T: null,
|
|
1169
|
+
S: null,
|
|
1170
|
+
actQueue: null,
|
|
1171
|
+
isBatchingLegacy: false,
|
|
1172
|
+
didScheduleLegacyUpdate: false,
|
|
1173
|
+
didUsePromise: false,
|
|
1174
|
+
thrownErrors: [],
|
|
1175
|
+
getCurrentStack: null
|
|
1176
|
+
}, hasOwnProperty = Object.prototype.hasOwnProperty, REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
|
|
1177
|
+
disabledLog.__reactDisabledLog = true;
|
|
1178
|
+
var prefix, suffix, reentry = false;
|
|
1179
|
+
var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
|
|
1180
|
+
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
1181
|
+
var didWarnAboutElementRef = {};
|
|
1182
|
+
var ownerHasKeyUseWarning = {}, didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
1183
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
1184
|
+
var event = new window.ErrorEvent("error", {
|
|
1185
|
+
bubbles: true,
|
|
1186
|
+
cancelable: true,
|
|
1187
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
1188
|
+
error
|
|
1189
|
+
});
|
|
1190
|
+
if (!window.dispatchEvent(event)) return;
|
|
1191
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
1192
|
+
process.emit("uncaughtException", error);
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
console.error(error);
|
|
1196
|
+
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
|
1197
|
+
queueMicrotask(function() {
|
|
1198
|
+
return queueMicrotask(callback);
|
|
1199
|
+
});
|
|
1200
|
+
} : enqueueTask;
|
|
1201
|
+
exports.Children = {
|
|
1202
|
+
map: mapChildren,
|
|
1203
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
1204
|
+
mapChildren(
|
|
1205
|
+
children,
|
|
1206
|
+
function() {
|
|
1207
|
+
forEachFunc.apply(this, arguments);
|
|
1208
|
+
},
|
|
1209
|
+
forEachContext
|
|
1210
|
+
);
|
|
1211
|
+
},
|
|
1212
|
+
count: function(children) {
|
|
1213
|
+
var n = 0;
|
|
1214
|
+
mapChildren(children, function() {
|
|
1215
|
+
n++;
|
|
1216
|
+
});
|
|
1217
|
+
return n;
|
|
1218
|
+
},
|
|
1219
|
+
toArray: function(children) {
|
|
1220
|
+
return mapChildren(children, function(child) {
|
|
1221
|
+
return child;
|
|
1222
|
+
}) || [];
|
|
1223
|
+
},
|
|
1224
|
+
only: function(children) {
|
|
1225
|
+
if (!isValidElement(children))
|
|
1226
|
+
throw Error(
|
|
1227
|
+
"React.Children.only expected to receive a single React element child."
|
|
1228
|
+
);
|
|
1229
|
+
return children;
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
exports.Component = Component;
|
|
1233
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1234
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1235
|
+
exports.PureComponent = PureComponent;
|
|
1236
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1237
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1238
|
+
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
1239
|
+
exports.act = function(callback) {
|
|
1240
|
+
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
1241
|
+
actScopeDepth++;
|
|
1242
|
+
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
|
|
1243
|
+
try {
|
|
1244
|
+
var result = callback();
|
|
1245
|
+
} catch (error) {
|
|
1246
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1247
|
+
}
|
|
1248
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1249
|
+
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1250
|
+
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
|
1251
|
+
var thenable = result;
|
|
1252
|
+
queueSeveralMicrotasks(function() {
|
|
1253
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1254
|
+
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
1255
|
+
));
|
|
1256
|
+
});
|
|
1257
|
+
return {
|
|
1258
|
+
then: function(resolve, reject) {
|
|
1259
|
+
didAwaitActCall = true;
|
|
1260
|
+
thenable.then(
|
|
1261
|
+
function(returnValue) {
|
|
1262
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1263
|
+
if (0 === prevActScopeDepth) {
|
|
1264
|
+
try {
|
|
1265
|
+
flushActQueue(queue), enqueueTask(function() {
|
|
1266
|
+
return recursivelyFlushAsyncActWork(
|
|
1267
|
+
returnValue,
|
|
1268
|
+
resolve,
|
|
1269
|
+
reject
|
|
1270
|
+
);
|
|
1271
|
+
});
|
|
1272
|
+
} catch (error$2) {
|
|
1273
|
+
ReactSharedInternals.thrownErrors.push(error$2);
|
|
1274
|
+
}
|
|
1275
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
1276
|
+
var _thrownError = aggregateErrors(
|
|
1277
|
+
ReactSharedInternals.thrownErrors
|
|
1278
|
+
);
|
|
1279
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
1280
|
+
reject(_thrownError);
|
|
1281
|
+
}
|
|
1282
|
+
} else resolve(returnValue);
|
|
1283
|
+
},
|
|
1284
|
+
function(error) {
|
|
1285
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1286
|
+
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
|
|
1287
|
+
ReactSharedInternals.thrownErrors
|
|
1288
|
+
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
var returnValue$jscomp$0 = result;
|
|
1295
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1296
|
+
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
|
1297
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1298
|
+
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
1299
|
+
));
|
|
1300
|
+
}), ReactSharedInternals.actQueue = null);
|
|
1301
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1302
|
+
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1303
|
+
return {
|
|
1304
|
+
then: function(resolve, reject) {
|
|
1305
|
+
didAwaitActCall = true;
|
|
1306
|
+
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
1307
|
+
return recursivelyFlushAsyncActWork(
|
|
1308
|
+
returnValue$jscomp$0,
|
|
1309
|
+
resolve,
|
|
1310
|
+
reject
|
|
1311
|
+
);
|
|
1312
|
+
})) : resolve(returnValue$jscomp$0);
|
|
1313
|
+
}
|
|
1314
|
+
};
|
|
1315
|
+
};
|
|
1316
|
+
exports.cache = function(fn) {
|
|
1317
|
+
return function() {
|
|
1318
|
+
return fn.apply(null, arguments);
|
|
1319
|
+
};
|
|
1320
|
+
};
|
|
1321
|
+
exports.cloneElement = function(element, config, children) {
|
|
1322
|
+
if (null === element || void 0 === element)
|
|
1323
|
+
throw Error(
|
|
1324
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
1325
|
+
);
|
|
1326
|
+
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
1327
|
+
if (null != config) {
|
|
1328
|
+
var JSCompiler_inline_result;
|
|
1329
|
+
a: {
|
|
1330
|
+
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
1331
|
+
config,
|
|
1332
|
+
"ref"
|
|
1333
|
+
).get) && JSCompiler_inline_result.isReactWarning) {
|
|
1334
|
+
JSCompiler_inline_result = false;
|
|
1335
|
+
break a;
|
|
1336
|
+
}
|
|
1337
|
+
JSCompiler_inline_result = void 0 !== config.ref;
|
|
1338
|
+
}
|
|
1339
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
1340
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
1341
|
+
for (propName in config)
|
|
1342
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
1343
|
+
}
|
|
1344
|
+
var propName = arguments.length - 2;
|
|
1345
|
+
if (1 === propName) props.children = children;
|
|
1346
|
+
else if (1 < propName) {
|
|
1347
|
+
JSCompiler_inline_result = Array(propName);
|
|
1348
|
+
for (var i = 0; i < propName; i++)
|
|
1349
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
1350
|
+
props.children = JSCompiler_inline_result;
|
|
1351
|
+
}
|
|
1352
|
+
props = ReactElement(element.type, key, void 0, void 0, owner, props);
|
|
1353
|
+
for (key = 2; key < arguments.length; key++)
|
|
1354
|
+
validateChildKeys(arguments[key], props.type);
|
|
1355
|
+
return props;
|
|
1356
|
+
};
|
|
1357
|
+
exports.createContext = function(defaultValue) {
|
|
1358
|
+
defaultValue = {
|
|
1359
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1360
|
+
_currentValue: defaultValue,
|
|
1361
|
+
_currentValue2: defaultValue,
|
|
1362
|
+
_threadCount: 0,
|
|
1363
|
+
Provider: null,
|
|
1364
|
+
Consumer: null
|
|
1365
|
+
};
|
|
1366
|
+
defaultValue.Provider = defaultValue;
|
|
1367
|
+
defaultValue.Consumer = {
|
|
1368
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
1369
|
+
_context: defaultValue
|
|
1370
|
+
};
|
|
1371
|
+
defaultValue._currentRenderer = null;
|
|
1372
|
+
defaultValue._currentRenderer2 = null;
|
|
1373
|
+
return defaultValue;
|
|
1374
|
+
};
|
|
1375
|
+
exports.createElement = function(type, config, children) {
|
|
1376
|
+
if (isValidElementType(type))
|
|
1377
|
+
for (var i = 2; i < arguments.length; i++)
|
|
1378
|
+
validateChildKeys(arguments[i], type);
|
|
1379
|
+
else {
|
|
1380
|
+
i = "";
|
|
1381
|
+
if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
|
|
1382
|
+
i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1383
|
+
if (null === type) var typeString = "null";
|
|
1384
|
+
else
|
|
1385
|
+
isArrayImpl(type) ? typeString = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : typeString = typeof type;
|
|
1386
|
+
console.error(
|
|
1387
|
+
"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
1388
|
+
typeString,
|
|
1389
|
+
i
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
var propName;
|
|
1393
|
+
i = {};
|
|
1394
|
+
typeString = null;
|
|
1395
|
+
if (null != config)
|
|
1396
|
+
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
|
|
1397
|
+
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1398
|
+
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), typeString = "" + config.key), config)
|
|
1399
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
|
1400
|
+
var childrenLength = arguments.length - 2;
|
|
1401
|
+
if (1 === childrenLength) i.children = children;
|
|
1402
|
+
else if (1 < childrenLength) {
|
|
1403
|
+
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
|
|
1404
|
+
childArray[_i] = arguments[_i + 2];
|
|
1405
|
+
Object.freeze && Object.freeze(childArray);
|
|
1406
|
+
i.children = childArray;
|
|
1407
|
+
}
|
|
1408
|
+
if (type && type.defaultProps)
|
|
1409
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
1410
|
+
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1411
|
+
typeString && defineKeyPropWarningGetter(
|
|
1412
|
+
i,
|
|
1413
|
+
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
1414
|
+
);
|
|
1415
|
+
return ReactElement(type, typeString, void 0, void 0, getOwner(), i);
|
|
1416
|
+
};
|
|
1417
|
+
exports.createRef = function() {
|
|
1418
|
+
var refObject = { current: null };
|
|
1419
|
+
Object.seal(refObject);
|
|
1420
|
+
return refObject;
|
|
1421
|
+
};
|
|
1422
|
+
exports.forwardRef = function(render) {
|
|
1423
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
|
|
1424
|
+
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1425
|
+
) : "function" !== typeof render ? console.error(
|
|
1426
|
+
"forwardRef requires a render function but was given %s.",
|
|
1427
|
+
null === render ? "null" : typeof render
|
|
1428
|
+
) : 0 !== render.length && 2 !== render.length && console.error(
|
|
1429
|
+
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1430
|
+
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
1431
|
+
);
|
|
1432
|
+
null != render && null != render.defaultProps && console.error(
|
|
1433
|
+
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1434
|
+
);
|
|
1435
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
1436
|
+
Object.defineProperty(elementType, "displayName", {
|
|
1437
|
+
enumerable: false,
|
|
1438
|
+
configurable: true,
|
|
1439
|
+
get: function() {
|
|
1440
|
+
return ownName;
|
|
1441
|
+
},
|
|
1442
|
+
set: function(name) {
|
|
1443
|
+
ownName = name;
|
|
1444
|
+
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
return elementType;
|
|
1448
|
+
};
|
|
1449
|
+
exports.isValidElement = isValidElement;
|
|
1450
|
+
exports.lazy = function(ctor) {
|
|
1451
|
+
return {
|
|
1452
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1453
|
+
_payload: { _status: -1, _result: ctor },
|
|
1454
|
+
_init: lazyInitializer
|
|
1455
|
+
};
|
|
1456
|
+
};
|
|
1457
|
+
exports.memo = function(type, compare) {
|
|
1458
|
+
isValidElementType(type) || console.error(
|
|
1459
|
+
"memo: The first argument must be a component. Instead received: %s",
|
|
1460
|
+
null === type ? "null" : typeof type
|
|
1461
|
+
);
|
|
1462
|
+
compare = {
|
|
1463
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1464
|
+
type,
|
|
1465
|
+
compare: void 0 === compare ? null : compare
|
|
1466
|
+
};
|
|
1467
|
+
var ownName;
|
|
1468
|
+
Object.defineProperty(compare, "displayName", {
|
|
1469
|
+
enumerable: false,
|
|
1470
|
+
configurable: true,
|
|
1471
|
+
get: function() {
|
|
1472
|
+
return ownName;
|
|
1473
|
+
},
|
|
1474
|
+
set: function(name) {
|
|
1475
|
+
ownName = name;
|
|
1476
|
+
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
1479
|
+
return compare;
|
|
1480
|
+
};
|
|
1481
|
+
exports.startTransition = function(scope) {
|
|
1482
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
1483
|
+
ReactSharedInternals.T = currentTransition;
|
|
1484
|
+
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1485
|
+
try {
|
|
1486
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
1487
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
1488
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
|
|
1489
|
+
} catch (error) {
|
|
1490
|
+
reportGlobalError(error);
|
|
1491
|
+
} finally {
|
|
1492
|
+
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
|
|
1493
|
+
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
1494
|
+
)), ReactSharedInternals.T = prevTransition;
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
exports.unstable_useCacheRefresh = function() {
|
|
1498
|
+
return resolveDispatcher().useCacheRefresh();
|
|
1499
|
+
};
|
|
1500
|
+
exports.use = function(usable) {
|
|
1501
|
+
return resolveDispatcher().use(usable);
|
|
1502
|
+
};
|
|
1503
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
1504
|
+
return resolveDispatcher().useActionState(
|
|
1505
|
+
action,
|
|
1506
|
+
initialState,
|
|
1507
|
+
permalink
|
|
1508
|
+
);
|
|
1509
|
+
};
|
|
1510
|
+
exports.useCallback = function(callback, deps) {
|
|
1511
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
1512
|
+
};
|
|
1513
|
+
exports.useContext = function(Context) {
|
|
1514
|
+
var dispatcher = resolveDispatcher();
|
|
1515
|
+
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
|
|
1516
|
+
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1517
|
+
);
|
|
1518
|
+
return dispatcher.useContext(Context);
|
|
1519
|
+
};
|
|
1520
|
+
exports.useDebugValue = function(value, formatterFn) {
|
|
1521
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
1522
|
+
};
|
|
1523
|
+
exports.useDeferredValue = function(value, initialValue) {
|
|
1524
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1525
|
+
};
|
|
1526
|
+
exports.useEffect = function(create, deps) {
|
|
1527
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1528
|
+
};
|
|
1529
|
+
exports.useId = function() {
|
|
1530
|
+
return resolveDispatcher().useId();
|
|
1531
|
+
};
|
|
1532
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
1533
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1534
|
+
};
|
|
1535
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
1536
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1537
|
+
};
|
|
1538
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
1539
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1540
|
+
};
|
|
1541
|
+
exports.useMemo = function(create, deps) {
|
|
1542
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
1543
|
+
};
|
|
1544
|
+
exports.useOptimistic = function(passthrough, reducer) {
|
|
1545
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
1546
|
+
};
|
|
1547
|
+
exports.useReducer = function(reducer, initialArg, init) {
|
|
1548
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
1549
|
+
};
|
|
1550
|
+
exports.useRef = function(initialValue) {
|
|
1551
|
+
return resolveDispatcher().useRef(initialValue);
|
|
1552
|
+
};
|
|
1553
|
+
exports.useState = function(initialState) {
|
|
1554
|
+
return resolveDispatcher().useState(initialState);
|
|
1555
|
+
};
|
|
1556
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1557
|
+
return resolveDispatcher().useSyncExternalStore(
|
|
1558
|
+
subscribe,
|
|
1559
|
+
getSnapshot,
|
|
1560
|
+
getServerSnapshot
|
|
1561
|
+
);
|
|
1562
|
+
};
|
|
1563
|
+
exports.useTransition = function() {
|
|
1564
|
+
return resolveDispatcher().useTransition();
|
|
1565
|
+
};
|
|
1566
|
+
exports.version = "19.0.0";
|
|
1567
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1568
|
+
}();
|
|
1569
|
+
}
|
|
1570
|
+
});
|
|
1571
|
+
|
|
1572
|
+
// ../../node_modules/.pnpm/react@19.0.0/node_modules/react/index.js
|
|
1573
|
+
var require_react = __commonJS({
|
|
1574
|
+
"../../node_modules/.pnpm/react@19.0.0/node_modules/react/index.js"(exports, module) {
|
|
1575
|
+
"use strict";
|
|
1576
|
+
if (process.env.NODE_ENV === "production") {
|
|
1577
|
+
module.exports = require_react_production();
|
|
1578
|
+
} else {
|
|
1579
|
+
module.exports = require_react_development();
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
|
|
1584
|
+
// src/fs.ts
|
|
2
1585
|
import { promises as fs } from "fs";
|
|
3
1586
|
import path from "path";
|
|
4
1587
|
import { VFile } from "vfile";
|
|
5
1588
|
import { compile as mdxCompile } from "@mdx-js/mdx";
|
|
6
1589
|
|
|
7
|
-
//
|
|
1590
|
+
// packages/md/plugins/index.ts
|
|
8
1591
|
import remarkFrontmatter from "remark-frontmatter";
|
|
9
1592
|
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
|
|
10
1593
|
import remarkGfm from "remark-gfm";
|
|
1594
|
+
import remarkDirective from "remark-directive";
|
|
11
1595
|
|
|
12
|
-
//
|
|
1596
|
+
// packages/md/plugins/md-toc.ts
|
|
13
1597
|
var remarkMdxToc = (options) => () => async (ast) => {
|
|
14
|
-
const { visit:
|
|
1598
|
+
const { visit: visit5 } = await import("unist-util-visit");
|
|
15
1599
|
const { toString } = await import("mdast-util-to-string");
|
|
16
1600
|
const { valueToEstree } = await import("estree-util-value-to-estree");
|
|
17
1601
|
const { name: isIdentifierName } = await import("estree-util-is-identifier-name");
|
|
@@ -36,7 +1620,7 @@ var remarkMdxToc = (options) => () => async (ast) => {
|
|
|
36
1620
|
children: []
|
|
37
1621
|
};
|
|
38
1622
|
};
|
|
39
|
-
|
|
1623
|
+
visit5(mdast, ["heading", "mdxJsxFlowElement"], (node) => {
|
|
40
1624
|
let depth = 0;
|
|
41
1625
|
if (node.type === "mdxJsxFlowElement") {
|
|
42
1626
|
let valid = false;
|
|
@@ -109,7 +1693,7 @@ var remarkMdxToc = (options) => () => async (ast) => {
|
|
|
109
1693
|
mdast.children.unshift(tocExport);
|
|
110
1694
|
};
|
|
111
1695
|
|
|
112
|
-
//
|
|
1696
|
+
// packages/md/plugins/md-code.ts
|
|
113
1697
|
import { visit } from "unist-util-visit";
|
|
114
1698
|
function remarkInjectCodeMeta() {
|
|
115
1699
|
return (tree) => {
|
|
@@ -125,7 +1709,7 @@ function remarkInjectCodeMeta() {
|
|
|
125
1709
|
};
|
|
126
1710
|
}
|
|
127
1711
|
|
|
128
|
-
//
|
|
1712
|
+
// packages/md/plugins/md-themeSettings.ts
|
|
129
1713
|
import { visit as visit2 } from "unist-util-visit";
|
|
130
1714
|
var extractThemeSettings = () => {
|
|
131
1715
|
return (tree) => {
|
|
@@ -142,7 +1726,7 @@ var extractThemeSettings = () => {
|
|
|
142
1726
|
};
|
|
143
1727
|
};
|
|
144
1728
|
|
|
145
|
-
//
|
|
1729
|
+
// packages/md/plugins/md-page.ts
|
|
146
1730
|
import { visit as visit3 } from "unist-util-visit";
|
|
147
1731
|
var extractPage = () => {
|
|
148
1732
|
return (tree) => {
|
|
@@ -159,25 +1743,63 @@ var extractPage = () => {
|
|
|
159
1743
|
};
|
|
160
1744
|
};
|
|
161
1745
|
|
|
162
|
-
//
|
|
163
|
-
|
|
1746
|
+
// packages/md/plugins/md-codegroup.ts
|
|
1747
|
+
import { visit as visit4 } from "unist-util-visit";
|
|
1748
|
+
function mdCodeGroup() {
|
|
1749
|
+
return (tree) => {
|
|
1750
|
+
visit4(tree, "containerDirective", (node) => {
|
|
1751
|
+
var _a;
|
|
1752
|
+
if (node.name !== "code-group") return;
|
|
1753
|
+
const description = ((_a = node.attributes) == null ? void 0 : _a.title) || "";
|
|
1754
|
+
const codeblocks = [];
|
|
1755
|
+
for (const child of node.children) {
|
|
1756
|
+
if (child.type === "code") {
|
|
1757
|
+
const meta = child.meta || "";
|
|
1758
|
+
const value = child.value || "";
|
|
1759
|
+
const lang = child.lang || "";
|
|
1760
|
+
codeblocks.push({ value, lang, meta });
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
node.data = {
|
|
1764
|
+
hName: "DirectiveCodeSample",
|
|
1765
|
+
hProperties: {
|
|
1766
|
+
description,
|
|
1767
|
+
codeblocks: JSON.stringify(codeblocks)
|
|
1768
|
+
}
|
|
1769
|
+
};
|
|
1770
|
+
node.children = [];
|
|
1771
|
+
});
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
// packages/md/plugins/index.ts
|
|
1776
|
+
function defaultPlugins(toc) {
|
|
1777
|
+
return [
|
|
1778
|
+
remarkFrontmatter,
|
|
1779
|
+
remarkMdxFrontmatter,
|
|
1780
|
+
remarkGfm,
|
|
1781
|
+
remarkDirective,
|
|
1782
|
+
remarkMdxToc(toc),
|
|
1783
|
+
remarkInjectCodeMeta,
|
|
1784
|
+
extractThemeSettings,
|
|
1785
|
+
extractPage,
|
|
1786
|
+
mdCodeGroup
|
|
1787
|
+
];
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
// packages/md/index.ts
|
|
1791
|
+
function mdOptions(toc) {
|
|
164
1792
|
return {
|
|
165
1793
|
remarkPlugins: [
|
|
166
|
-
|
|
167
|
-
remarkMdxFrontmatter,
|
|
168
|
-
remarkGfm,
|
|
169
|
-
remarkInjectCodeMeta,
|
|
170
|
-
remarkMdxToc(toc),
|
|
171
|
-
extractThemeSettings,
|
|
172
|
-
extractPage
|
|
1794
|
+
...defaultPlugins(toc)
|
|
173
1795
|
],
|
|
174
1796
|
rehypePlugins: []
|
|
175
1797
|
};
|
|
176
1798
|
}
|
|
177
1799
|
|
|
178
|
-
// src/
|
|
179
|
-
async function compileBySlug(slug,
|
|
180
|
-
const filePath = path.join(process.cwd(), `${slug}.${
|
|
1800
|
+
// src/fs.ts
|
|
1801
|
+
async function compileBySlug(slug, mdx) {
|
|
1802
|
+
const filePath = path.join(process.cwd(), `${slug}.${mdx ? "mdx" : "md"}`);
|
|
181
1803
|
await fs.access(filePath);
|
|
182
1804
|
const content = await fs.readFile(filePath, "utf-8");
|
|
183
1805
|
return await compile(content, filePath);
|
|
@@ -188,13 +1810,13 @@ async function compile(content, filePath) {
|
|
|
188
1810
|
value: content,
|
|
189
1811
|
contents: content
|
|
190
1812
|
});
|
|
191
|
-
const
|
|
1813
|
+
const opt = mdOptions({
|
|
192
1814
|
minDepth: 2
|
|
193
1815
|
// TODO: configurable?
|
|
194
1816
|
});
|
|
195
1817
|
const compiled = await mdxCompile(vfile, {
|
|
196
|
-
remarkPlugins:
|
|
197
|
-
rehypePlugins:
|
|
1818
|
+
remarkPlugins: opt.remarkPlugins,
|
|
1819
|
+
rehypePlugins: opt.rehypePlugins,
|
|
198
1820
|
recmaPlugins: [],
|
|
199
1821
|
outputFormat: "function-body",
|
|
200
1822
|
development: false
|
|
@@ -202,15 +1824,169 @@ async function compile(content, filePath) {
|
|
|
202
1824
|
return String(compiled);
|
|
203
1825
|
}
|
|
204
1826
|
|
|
205
|
-
// src/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1827
|
+
// src/navigation.ts
|
|
1828
|
+
var import_react = __toESM(require_react(), 1);
|
|
1829
|
+
import { promises as fs2 } from "fs";
|
|
1830
|
+
import path2 from "path";
|
|
1831
|
+
import remarkFrontmatter2 from "remark-frontmatter";
|
|
1832
|
+
import remarkMdxFrontmatter2 from "remark-mdx-frontmatter";
|
|
1833
|
+
import { VFile as VFile2 } from "vfile";
|
|
1834
|
+
import { compile as mdxCompile2 } from "@mdx-js/mdx";
|
|
1835
|
+
async function pageFrontMatters(navigation) {
|
|
1836
|
+
const frontmatters = {};
|
|
1837
|
+
const promises = [];
|
|
1838
|
+
function mapPages(page) {
|
|
1839
|
+
var _a;
|
|
1840
|
+
if (typeof page !== "string") {
|
|
1841
|
+
(_a = page.pages) == null ? void 0 : _a.forEach(mapPages);
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
promises.push(job(page, frontmatters));
|
|
1845
|
+
}
|
|
1846
|
+
navigation.map(async (nav) => {
|
|
1847
|
+
var _a;
|
|
1848
|
+
(_a = nav.pages) == null ? void 0 : _a.forEach(mapPages);
|
|
1849
|
+
});
|
|
1850
|
+
await Promise.all(promises);
|
|
1851
|
+
return frontmatters;
|
|
1852
|
+
}
|
|
1853
|
+
function filterNavigationByLevels(headers, slug) {
|
|
1854
|
+
const topLevelTabMatcher = headers == null ? void 0 : headers.reduce((acc, header) => {
|
|
1855
|
+
var _a, _b;
|
|
1856
|
+
const tabLevel = (_b = (_a = header == null ? void 0 : header.url) == null ? void 0 : _a.split("/")) == null ? void 0 : _b.length;
|
|
1857
|
+
if (!tabLevel) {
|
|
1858
|
+
return {
|
|
1859
|
+
...acc
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
if (!acc[tabLevel]) {
|
|
1863
|
+
return {
|
|
1864
|
+
...acc,
|
|
1865
|
+
[tabLevel]: (/* @__PURE__ */ new Set()).add(header == null ? void 0 : header.url)
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
return {
|
|
1869
|
+
...acc,
|
|
1870
|
+
[tabLevel]: acc[tabLevel].add(header == null ? void 0 : header.url)
|
|
1871
|
+
};
|
|
1872
|
+
}, {});
|
|
1873
|
+
return (nav) => {
|
|
1874
|
+
let match = false;
|
|
1875
|
+
Object.keys(topLevelTabMatcher).forEach((levelStr) => {
|
|
1876
|
+
var _a;
|
|
1877
|
+
if (match) {
|
|
1878
|
+
return true;
|
|
1879
|
+
}
|
|
1880
|
+
const level = parseInt(levelStr);
|
|
1881
|
+
const findThisSlug = slug.split("/").filter((s) => !!s).slice(0, level).join("/");
|
|
1882
|
+
function findMatchedPage(page) {
|
|
1883
|
+
var _a2;
|
|
1884
|
+
if (typeof page !== "string") {
|
|
1885
|
+
(_a2 = page.pages) == null ? void 0 : _a2.forEach(findMatchedPage);
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1888
|
+
const findThisPage = page.split("/").filter((p) => !!p).slice(0, level).join("/");
|
|
1889
|
+
const set = topLevelTabMatcher[level];
|
|
1890
|
+
if (set.has(findThisPage) && findThisPage === findThisSlug) {
|
|
1891
|
+
match = true;
|
|
1892
|
+
return true;
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
(_a = nav == null ? void 0 : nav.pages) == null ? void 0 : _a.forEach(findMatchedPage);
|
|
1896
|
+
});
|
|
1897
|
+
return match;
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
function mdxExport(code) {
|
|
1901
|
+
const scope = {
|
|
1902
|
+
Fragment: import_react.default.Fragment,
|
|
1903
|
+
jsxs: import_react.default.createElement,
|
|
1904
|
+
jsx: import_react.default.createElement,
|
|
1905
|
+
jsxDEV: import_react.default.createElement
|
|
1906
|
+
};
|
|
1907
|
+
const fn = new Function(...Object.keys(scope), code);
|
|
1908
|
+
return fn(scope);
|
|
1909
|
+
}
|
|
1910
|
+
async function getFrontmatter(filePath) {
|
|
1911
|
+
const body = await fs2.readFile(filePath, "utf-8");
|
|
1912
|
+
const vfile = new VFile2({
|
|
1913
|
+
path: filePath,
|
|
1914
|
+
value: body,
|
|
1915
|
+
contents: body
|
|
1916
|
+
});
|
|
1917
|
+
const compiled = await mdxCompile2(vfile, {
|
|
1918
|
+
remarkPlugins: [
|
|
1919
|
+
remarkFrontmatter2,
|
|
1920
|
+
remarkMdxFrontmatter2
|
|
1921
|
+
],
|
|
1922
|
+
rehypePlugins: [],
|
|
1923
|
+
recmaPlugins: [],
|
|
1924
|
+
outputFormat: "function-body",
|
|
1925
|
+
development: false
|
|
1926
|
+
});
|
|
1927
|
+
const code = String(compiled);
|
|
1928
|
+
const {
|
|
1929
|
+
reactFrontmatter,
|
|
1930
|
+
// in the future same key?
|
|
1931
|
+
frontmatter
|
|
1932
|
+
} = mdxExport(code);
|
|
1933
|
+
const matter = frontmatter;
|
|
1934
|
+
let title = "";
|
|
1935
|
+
if (typeof matter.title === "string") {
|
|
1936
|
+
title = matter.title;
|
|
1937
|
+
}
|
|
1938
|
+
if (reactFrontmatter) {
|
|
1939
|
+
if (typeof (reactFrontmatter == null ? void 0 : reactFrontmatter.title) === "function") {
|
|
1940
|
+
matter.title = {
|
|
1941
|
+
title,
|
|
1942
|
+
code: reactFrontmatter.title.toString()
|
|
1943
|
+
};
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
return matter;
|
|
1947
|
+
}
|
|
1948
|
+
async function job(page, frontmatters) {
|
|
1949
|
+
let filePath = path2.join(process.cwd(), `${page}.mdx`);
|
|
1950
|
+
try {
|
|
1951
|
+
await fs2.access(filePath);
|
|
1952
|
+
} catch (e) {
|
|
1953
|
+
try {
|
|
1954
|
+
const mdPath = filePath.replace(".mdx", ".md");
|
|
1955
|
+
await fs2.access(mdPath);
|
|
1956
|
+
filePath = mdPath;
|
|
1957
|
+
} catch (e2) {
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
const matter = await getFrontmatter(filePath);
|
|
1961
|
+
frontmatters[page] = matter;
|
|
211
1962
|
}
|
|
212
1963
|
export {
|
|
213
1964
|
compileBySlug,
|
|
214
|
-
|
|
215
|
-
|
|
1965
|
+
filterNavigationByLevels,
|
|
1966
|
+
pageFrontMatters
|
|
216
1967
|
};
|
|
1968
|
+
/*! Bundled license information:
|
|
1969
|
+
|
|
1970
|
+
react/cjs/react.production.js:
|
|
1971
|
+
(**
|
|
1972
|
+
* @license React
|
|
1973
|
+
* react.production.js
|
|
1974
|
+
*
|
|
1975
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1976
|
+
*
|
|
1977
|
+
* This source code is licensed under the MIT license found in the
|
|
1978
|
+
* LICENSE file in the root directory of this source tree.
|
|
1979
|
+
*)
|
|
1980
|
+
|
|
1981
|
+
react/cjs/react.development.js:
|
|
1982
|
+
(**
|
|
1983
|
+
* @license React
|
|
1984
|
+
* react.development.js
|
|
1985
|
+
*
|
|
1986
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1987
|
+
*
|
|
1988
|
+
* This source code is licensed under the MIT license found in the
|
|
1989
|
+
* LICENSE file in the root directory of this source tree.
|
|
1990
|
+
*)
|
|
1991
|
+
*/
|
|
1992
|
+
//# sourceMappingURL=index.js.map
|