@trustgraph/react-state 0.3.0 → 0.3.1

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/dist/index.cjs CHANGED
@@ -1,1372 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var reactProvider = require('@trustgraph/react-provider');
4
- var require$$0 = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('react');
5
6
  var zustand = require('zustand');
6
7
  var reactQuery = require('@tanstack/react-query');
7
8
  var uuid = require('uuid');
8
9
 
9
- function getDefaultExportFromCjs (x) {
10
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
11
- }
12
-
13
- var jsxRuntime = {exports: {}};
14
-
15
- var reactJsxRuntime_production_min = {};
16
-
17
- /**
18
- * @license React
19
- * react-jsx-runtime.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */
26
-
27
- var hasRequiredReactJsxRuntime_production_min;
28
-
29
- function requireReactJsxRuntime_production_min () {
30
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
31
- hasRequiredReactJsxRuntime_production_min = 1;
32
- var f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
33
- function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
34
- return reactJsxRuntime_production_min;
35
- }
36
-
37
- var reactJsxRuntime_development = {};
38
-
39
- /**
40
- * @license React
41
- * react-jsx-runtime.development.js
42
- *
43
- * Copyright (c) Facebook, Inc. and its affiliates.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE file in the root directory of this source tree.
47
- */
48
-
49
- var hasRequiredReactJsxRuntime_development;
50
-
51
- function requireReactJsxRuntime_development () {
52
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
53
- hasRequiredReactJsxRuntime_development = 1;
54
-
55
- if (process.env.NODE_ENV !== "production") {
56
- (function() {
57
-
58
- var React = require$$0;
59
-
60
- // ATTENTION
61
- // When adding new symbols to this file,
62
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
63
- // The Symbol used to tag the ReactElement-like types.
64
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
65
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
66
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
67
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
68
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
69
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
70
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
71
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
72
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
73
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
74
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
75
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
76
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
77
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
78
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
79
- function getIteratorFn(maybeIterable) {
80
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
81
- return null;
82
- }
83
-
84
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
85
-
86
- if (typeof maybeIterator === 'function') {
87
- return maybeIterator;
88
- }
89
-
90
- return null;
91
- }
92
-
93
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
94
-
95
- function error(format) {
96
- {
97
- {
98
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
99
- args[_key2 - 1] = arguments[_key2];
100
- }
101
-
102
- printWarning('error', format, args);
103
- }
104
- }
105
- }
106
-
107
- function printWarning(level, format, args) {
108
- // When changing this logic, you might want to also
109
- // update consoleWithStackDev.www.js as well.
110
- {
111
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
112
- var stack = ReactDebugCurrentFrame.getStackAddendum();
113
-
114
- if (stack !== '') {
115
- format += '%s';
116
- args = args.concat([stack]);
117
- } // eslint-disable-next-line react-internal/safe-string-coercion
118
-
119
-
120
- var argsWithFormat = args.map(function (item) {
121
- return String(item);
122
- }); // Careful: RN currently depends on this prefix
123
-
124
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
125
- // breaks IE9: https://github.com/facebook/react/issues/13610
126
- // eslint-disable-next-line react-internal/no-production-logging
127
-
128
- Function.prototype.apply.call(console[level], console, argsWithFormat);
129
- }
130
- }
131
-
132
- // -----------------------------------------------------------------------------
133
-
134
- var enableScopeAPI = false; // Experimental Create Event Handle API.
135
- var enableCacheElement = false;
136
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
137
-
138
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
139
- // stuff. Intended to enable React core members to more easily debug scheduling
140
- // issues in DEV builds.
141
-
142
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
143
-
144
- var REACT_MODULE_REFERENCE;
145
-
146
- {
147
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
148
- }
149
-
150
- function isValidElementType(type) {
151
- if (typeof type === 'string' || typeof type === 'function') {
152
- return true;
153
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
154
-
155
-
156
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
157
- return true;
158
- }
159
-
160
- if (typeof type === 'object' && type !== null) {
161
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
162
- // types supported by any Flight configuration anywhere since
163
- // we don't know which Flight build this will end up being used
164
- // with.
165
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
166
- return true;
167
- }
168
- }
169
-
170
- return false;
171
- }
172
-
173
- function getWrappedName(outerType, innerType, wrapperName) {
174
- var displayName = outerType.displayName;
175
-
176
- if (displayName) {
177
- return displayName;
178
- }
179
-
180
- var functionName = innerType.displayName || innerType.name || '';
181
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
182
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
183
-
184
-
185
- function getContextName(type) {
186
- return type.displayName || 'Context';
187
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
188
-
189
-
190
- function getComponentNameFromType(type) {
191
- if (type == null) {
192
- // Host root, text node or just invalid type.
193
- return null;
194
- }
195
-
196
- {
197
- if (typeof type.tag === 'number') {
198
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
199
- }
200
- }
201
-
202
- if (typeof type === 'function') {
203
- return type.displayName || type.name || null;
204
- }
205
-
206
- if (typeof type === 'string') {
207
- return type;
208
- }
209
-
210
- switch (type) {
211
- case REACT_FRAGMENT_TYPE:
212
- return 'Fragment';
213
-
214
- case REACT_PORTAL_TYPE:
215
- return 'Portal';
216
-
217
- case REACT_PROFILER_TYPE:
218
- return 'Profiler';
219
-
220
- case REACT_STRICT_MODE_TYPE:
221
- return 'StrictMode';
222
-
223
- case REACT_SUSPENSE_TYPE:
224
- return 'Suspense';
225
-
226
- case REACT_SUSPENSE_LIST_TYPE:
227
- return 'SuspenseList';
228
-
229
- }
230
-
231
- if (typeof type === 'object') {
232
- switch (type.$$typeof) {
233
- case REACT_CONTEXT_TYPE:
234
- var context = type;
235
- return getContextName(context) + '.Consumer';
236
-
237
- case REACT_PROVIDER_TYPE:
238
- var provider = type;
239
- return getContextName(provider._context) + '.Provider';
240
-
241
- case REACT_FORWARD_REF_TYPE:
242
- return getWrappedName(type, type.render, 'ForwardRef');
243
-
244
- case REACT_MEMO_TYPE:
245
- var outerName = type.displayName || null;
246
-
247
- if (outerName !== null) {
248
- return outerName;
249
- }
250
-
251
- return getComponentNameFromType(type.type) || 'Memo';
252
-
253
- case REACT_LAZY_TYPE:
254
- {
255
- var lazyComponent = type;
256
- var payload = lazyComponent._payload;
257
- var init = lazyComponent._init;
258
-
259
- try {
260
- return getComponentNameFromType(init(payload));
261
- } catch (x) {
262
- return null;
263
- }
264
- }
265
-
266
- // eslint-disable-next-line no-fallthrough
267
- }
268
- }
269
-
270
- return null;
271
- }
272
-
273
- var assign = Object.assign;
274
-
275
- // Helpers to patch console.logs to avoid logging during side-effect free
276
- // replaying on render function. This currently only patches the object
277
- // lazily which won't cover if the log function was extracted eagerly.
278
- // We could also eagerly patch the method.
279
- var disabledDepth = 0;
280
- var prevLog;
281
- var prevInfo;
282
- var prevWarn;
283
- var prevError;
284
- var prevGroup;
285
- var prevGroupCollapsed;
286
- var prevGroupEnd;
287
-
288
- function disabledLog() {}
289
-
290
- disabledLog.__reactDisabledLog = true;
291
- function disableLogs() {
292
- {
293
- if (disabledDepth === 0) {
294
- /* eslint-disable react-internal/no-production-logging */
295
- prevLog = console.log;
296
- prevInfo = console.info;
297
- prevWarn = console.warn;
298
- prevError = console.error;
299
- prevGroup = console.group;
300
- prevGroupCollapsed = console.groupCollapsed;
301
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
302
-
303
- var props = {
304
- configurable: true,
305
- enumerable: true,
306
- value: disabledLog,
307
- writable: true
308
- }; // $FlowFixMe Flow thinks console is immutable.
309
-
310
- Object.defineProperties(console, {
311
- info: props,
312
- log: props,
313
- warn: props,
314
- error: props,
315
- group: props,
316
- groupCollapsed: props,
317
- groupEnd: props
318
- });
319
- /* eslint-enable react-internal/no-production-logging */
320
- }
321
-
322
- disabledDepth++;
323
- }
324
- }
325
- function reenableLogs() {
326
- {
327
- disabledDepth--;
328
-
329
- if (disabledDepth === 0) {
330
- /* eslint-disable react-internal/no-production-logging */
331
- var props = {
332
- configurable: true,
333
- enumerable: true,
334
- writable: true
335
- }; // $FlowFixMe Flow thinks console is immutable.
336
-
337
- Object.defineProperties(console, {
338
- log: assign({}, props, {
339
- value: prevLog
340
- }),
341
- info: assign({}, props, {
342
- value: prevInfo
343
- }),
344
- warn: assign({}, props, {
345
- value: prevWarn
346
- }),
347
- error: assign({}, props, {
348
- value: prevError
349
- }),
350
- group: assign({}, props, {
351
- value: prevGroup
352
- }),
353
- groupCollapsed: assign({}, props, {
354
- value: prevGroupCollapsed
355
- }),
356
- groupEnd: assign({}, props, {
357
- value: prevGroupEnd
358
- })
359
- });
360
- /* eslint-enable react-internal/no-production-logging */
361
- }
362
-
363
- if (disabledDepth < 0) {
364
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
365
- }
366
- }
367
- }
368
-
369
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
370
- var prefix;
371
- function describeBuiltInComponentFrame(name, source, ownerFn) {
372
- {
373
- if (prefix === undefined) {
374
- // Extract the VM specific prefix used by each line.
375
- try {
376
- throw Error();
377
- } catch (x) {
378
- var match = x.stack.trim().match(/\n( *(at )?)/);
379
- prefix = match && match[1] || '';
380
- }
381
- } // We use the prefix to ensure our stacks line up with native stack frames.
382
-
383
-
384
- return '\n' + prefix + name;
385
- }
386
- }
387
- var reentry = false;
388
- var componentFrameCache;
389
-
390
- {
391
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
392
- componentFrameCache = new PossiblyWeakMap();
393
- }
394
-
395
- function describeNativeComponentFrame(fn, construct) {
396
- // If something asked for a stack inside a fake render, it should get ignored.
397
- if ( !fn || reentry) {
398
- return '';
399
- }
400
-
401
- {
402
- var frame = componentFrameCache.get(fn);
403
-
404
- if (frame !== undefined) {
405
- return frame;
406
- }
407
- }
408
-
409
- var control;
410
- reentry = true;
411
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
412
-
413
- Error.prepareStackTrace = undefined;
414
- var previousDispatcher;
415
-
416
- {
417
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
418
- // for warnings.
419
-
420
- ReactCurrentDispatcher.current = null;
421
- disableLogs();
422
- }
423
-
424
- try {
425
- // This should throw.
426
- if (construct) {
427
- // Something should be setting the props in the constructor.
428
- var Fake = function () {
429
- throw Error();
430
- }; // $FlowFixMe
431
-
432
-
433
- Object.defineProperty(Fake.prototype, 'props', {
434
- set: function () {
435
- // We use a throwing setter instead of frozen or non-writable props
436
- // because that won't throw in a non-strict mode function.
437
- throw Error();
438
- }
439
- });
440
-
441
- if (typeof Reflect === 'object' && Reflect.construct) {
442
- // We construct a different control for this case to include any extra
443
- // frames added by the construct call.
444
- try {
445
- Reflect.construct(Fake, []);
446
- } catch (x) {
447
- control = x;
448
- }
449
-
450
- Reflect.construct(fn, [], Fake);
451
- } else {
452
- try {
453
- Fake.call();
454
- } catch (x) {
455
- control = x;
456
- }
457
-
458
- fn.call(Fake.prototype);
459
- }
460
- } else {
461
- try {
462
- throw Error();
463
- } catch (x) {
464
- control = x;
465
- }
466
-
467
- fn();
468
- }
469
- } catch (sample) {
470
- // This is inlined manually because closure doesn't do it for us.
471
- if (sample && control && typeof sample.stack === 'string') {
472
- // This extracts the first frame from the sample that isn't also in the control.
473
- // Skipping one frame that we assume is the frame that calls the two.
474
- var sampleLines = sample.stack.split('\n');
475
- var controlLines = control.stack.split('\n');
476
- var s = sampleLines.length - 1;
477
- var c = controlLines.length - 1;
478
-
479
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
480
- // We expect at least one stack frame to be shared.
481
- // Typically this will be the root most one. However, stack frames may be
482
- // cut off due to maximum stack limits. In this case, one maybe cut off
483
- // earlier than the other. We assume that the sample is longer or the same
484
- // and there for cut off earlier. So we should find the root most frame in
485
- // the sample somewhere in the control.
486
- c--;
487
- }
488
-
489
- for (; s >= 1 && c >= 0; s--, c--) {
490
- // Next we find the first one that isn't the same which should be the
491
- // frame that called our sample function and the control.
492
- if (sampleLines[s] !== controlLines[c]) {
493
- // In V8, the first line is describing the message but other VMs don't.
494
- // If we're about to return the first line, and the control is also on the same
495
- // line, that's a pretty good indicator that our sample threw at same line as
496
- // the control. I.e. before we entered the sample frame. So we ignore this result.
497
- // This can happen if you passed a class to function component, or non-function.
498
- if (s !== 1 || c !== 1) {
499
- do {
500
- s--;
501
- c--; // We may still have similar intermediate frames from the construct call.
502
- // The next one that isn't the same should be our match though.
503
-
504
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
505
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
506
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
507
- // but we have a user-provided "displayName"
508
- // splice it in to make the stack more readable.
509
-
510
-
511
- if (fn.displayName && _frame.includes('<anonymous>')) {
512
- _frame = _frame.replace('<anonymous>', fn.displayName);
513
- }
514
-
515
- {
516
- if (typeof fn === 'function') {
517
- componentFrameCache.set(fn, _frame);
518
- }
519
- } // Return the line we found.
520
-
521
-
522
- return _frame;
523
- }
524
- } while (s >= 1 && c >= 0);
525
- }
526
-
527
- break;
528
- }
529
- }
530
- }
531
- } finally {
532
- reentry = false;
533
-
534
- {
535
- ReactCurrentDispatcher.current = previousDispatcher;
536
- reenableLogs();
537
- }
538
-
539
- Error.prepareStackTrace = previousPrepareStackTrace;
540
- } // Fallback to just using the name if we couldn't make it throw.
541
-
542
-
543
- var name = fn ? fn.displayName || fn.name : '';
544
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
545
-
546
- {
547
- if (typeof fn === 'function') {
548
- componentFrameCache.set(fn, syntheticFrame);
549
- }
550
- }
551
-
552
- return syntheticFrame;
553
- }
554
- function describeFunctionComponentFrame(fn, source, ownerFn) {
555
- {
556
- return describeNativeComponentFrame(fn, false);
557
- }
558
- }
559
-
560
- function shouldConstruct(Component) {
561
- var prototype = Component.prototype;
562
- return !!(prototype && prototype.isReactComponent);
563
- }
564
-
565
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
566
-
567
- if (type == null) {
568
- return '';
569
- }
570
-
571
- if (typeof type === 'function') {
572
- {
573
- return describeNativeComponentFrame(type, shouldConstruct(type));
574
- }
575
- }
576
-
577
- if (typeof type === 'string') {
578
- return describeBuiltInComponentFrame(type);
579
- }
580
-
581
- switch (type) {
582
- case REACT_SUSPENSE_TYPE:
583
- return describeBuiltInComponentFrame('Suspense');
584
-
585
- case REACT_SUSPENSE_LIST_TYPE:
586
- return describeBuiltInComponentFrame('SuspenseList');
587
- }
588
-
589
- if (typeof type === 'object') {
590
- switch (type.$$typeof) {
591
- case REACT_FORWARD_REF_TYPE:
592
- return describeFunctionComponentFrame(type.render);
593
-
594
- case REACT_MEMO_TYPE:
595
- // Memo may contain any component type so we recursively resolve it.
596
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
597
-
598
- case REACT_LAZY_TYPE:
599
- {
600
- var lazyComponent = type;
601
- var payload = lazyComponent._payload;
602
- var init = lazyComponent._init;
603
-
604
- try {
605
- // Lazy may contain any component type so we recursively resolve it.
606
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
607
- } catch (x) {}
608
- }
609
- }
610
- }
611
-
612
- return '';
613
- }
614
-
615
- var hasOwnProperty = Object.prototype.hasOwnProperty;
616
-
617
- var loggedTypeFailures = {};
618
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
619
-
620
- function setCurrentlyValidatingElement(element) {
621
- {
622
- if (element) {
623
- var owner = element._owner;
624
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
625
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
626
- } else {
627
- ReactDebugCurrentFrame.setExtraStackFrame(null);
628
- }
629
- }
630
- }
631
-
632
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
633
- {
634
- // $FlowFixMe This is okay but Flow doesn't know it.
635
- var has = Function.call.bind(hasOwnProperty);
636
-
637
- for (var typeSpecName in typeSpecs) {
638
- if (has(typeSpecs, typeSpecName)) {
639
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
640
- // fail the render phase where it didn't fail before. So we log it.
641
- // After these have been cleaned up, we'll let them throw.
642
-
643
- try {
644
- // This is intentionally an invariant that gets caught. It's the same
645
- // behavior as without this statement except with a better message.
646
- if (typeof typeSpecs[typeSpecName] !== 'function') {
647
- // eslint-disable-next-line react-internal/prod-error-codes
648
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
649
- err.name = 'Invariant Violation';
650
- throw err;
651
- }
652
-
653
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
654
- } catch (ex) {
655
- error$1 = ex;
656
- }
657
-
658
- if (error$1 && !(error$1 instanceof Error)) {
659
- setCurrentlyValidatingElement(element);
660
-
661
- error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
662
-
663
- setCurrentlyValidatingElement(null);
664
- }
665
-
666
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
667
- // Only monitor this failure once because there tends to be a lot of the
668
- // same error.
669
- loggedTypeFailures[error$1.message] = true;
670
- setCurrentlyValidatingElement(element);
671
-
672
- error('Failed %s type: %s', location, error$1.message);
673
-
674
- setCurrentlyValidatingElement(null);
675
- }
676
- }
677
- }
678
- }
679
- }
680
-
681
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
682
-
683
- function isArray(a) {
684
- return isArrayImpl(a);
685
- }
686
-
687
- /*
688
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
689
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
690
- *
691
- * The functions in this module will throw an easier-to-understand,
692
- * easier-to-debug exception with a clear errors message message explaining the
693
- * problem. (Instead of a confusing exception thrown inside the implementation
694
- * of the `value` object).
695
- */
696
- // $FlowFixMe only called in DEV, so void return is not possible.
697
- function typeName(value) {
698
- {
699
- // toStringTag is needed for namespaced types like Temporal.Instant
700
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
701
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
702
- return type;
703
- }
704
- } // $FlowFixMe only called in DEV, so void return is not possible.
705
-
706
-
707
- function willCoercionThrow(value) {
708
- {
709
- try {
710
- testStringCoercion(value);
711
- return false;
712
- } catch (e) {
713
- return true;
714
- }
715
- }
716
- }
717
-
718
- function testStringCoercion(value) {
719
- // If you ended up here by following an exception call stack, here's what's
720
- // happened: you supplied an object or symbol value to React (as a prop, key,
721
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
722
- // coerce it to a string using `'' + value`, an exception was thrown.
723
- //
724
- // The most common types that will cause this exception are `Symbol` instances
725
- // and Temporal objects like `Temporal.Instant`. But any object that has a
726
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
727
- // exception. (Library authors do this to prevent users from using built-in
728
- // numeric operators like `+` or comparison operators like `>=` because custom
729
- // methods are needed to perform accurate arithmetic or comparison.)
730
- //
731
- // To fix the problem, coerce this object or symbol value to a string before
732
- // passing it to React. The most reliable way is usually `String(value)`.
733
- //
734
- // To find which value is throwing, check the browser or debugger console.
735
- // Before this exception was thrown, there should be `console.error` output
736
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
737
- // problem and how that type was used: key, atrribute, input value prop, etc.
738
- // In most cases, this console output also shows the component and its
739
- // ancestor components where the exception happened.
740
- //
741
- // eslint-disable-next-line react-internal/safe-string-coercion
742
- return '' + value;
743
- }
744
- function checkKeyStringCoercion(value) {
745
- {
746
- if (willCoercionThrow(value)) {
747
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
748
-
749
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
750
- }
751
- }
752
- }
753
-
754
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
755
- var RESERVED_PROPS = {
756
- key: true,
757
- ref: true,
758
- __self: true,
759
- __source: true
760
- };
761
- var specialPropKeyWarningShown;
762
- var specialPropRefWarningShown;
763
-
764
- function hasValidRef(config) {
765
- {
766
- if (hasOwnProperty.call(config, 'ref')) {
767
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
768
-
769
- if (getter && getter.isReactWarning) {
770
- return false;
771
- }
772
- }
773
- }
774
-
775
- return config.ref !== undefined;
776
- }
777
-
778
- function hasValidKey(config) {
779
- {
780
- if (hasOwnProperty.call(config, 'key')) {
781
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
782
-
783
- if (getter && getter.isReactWarning) {
784
- return false;
785
- }
786
- }
787
- }
788
-
789
- return config.key !== undefined;
790
- }
791
-
792
- function warnIfStringRefCannotBeAutoConverted(config, self) {
793
- {
794
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
795
- }
796
- }
797
-
798
- function defineKeyPropWarningGetter(props, displayName) {
799
- {
800
- var warnAboutAccessingKey = function () {
801
- if (!specialPropKeyWarningShown) {
802
- specialPropKeyWarningShown = true;
803
-
804
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
805
- }
806
- };
807
-
808
- warnAboutAccessingKey.isReactWarning = true;
809
- Object.defineProperty(props, 'key', {
810
- get: warnAboutAccessingKey,
811
- configurable: true
812
- });
813
- }
814
- }
815
-
816
- function defineRefPropWarningGetter(props, displayName) {
817
- {
818
- var warnAboutAccessingRef = function () {
819
- if (!specialPropRefWarningShown) {
820
- specialPropRefWarningShown = true;
821
-
822
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
823
- }
824
- };
825
-
826
- warnAboutAccessingRef.isReactWarning = true;
827
- Object.defineProperty(props, 'ref', {
828
- get: warnAboutAccessingRef,
829
- configurable: true
830
- });
831
- }
832
- }
833
- /**
834
- * Factory method to create a new React element. This no longer adheres to
835
- * the class pattern, so do not use new to call it. Also, instanceof check
836
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
837
- * if something is a React Element.
838
- *
839
- * @param {*} type
840
- * @param {*} props
841
- * @param {*} key
842
- * @param {string|object} ref
843
- * @param {*} owner
844
- * @param {*} self A *temporary* helper to detect places where `this` is
845
- * different from the `owner` when React.createElement is called, so that we
846
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
847
- * functions, and as long as `this` and owner are the same, there will be no
848
- * change in behavior.
849
- * @param {*} source An annotation object (added by a transpiler or otherwise)
850
- * indicating filename, line number, and/or other information.
851
- * @internal
852
- */
853
-
854
-
855
- var ReactElement = function (type, key, ref, self, source, owner, props) {
856
- var element = {
857
- // This tag allows us to uniquely identify this as a React Element
858
- $$typeof: REACT_ELEMENT_TYPE,
859
- // Built-in properties that belong on the element
860
- type: type,
861
- key: key,
862
- ref: ref,
863
- props: props,
864
- // Record the component responsible for creating this element.
865
- _owner: owner
866
- };
867
-
868
- {
869
- // The validation flag is currently mutative. We put it on
870
- // an external backing store so that we can freeze the whole object.
871
- // This can be replaced with a WeakMap once they are implemented in
872
- // commonly used development environments.
873
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
874
- // the validation flag non-enumerable (where possible, which should
875
- // include every environment we run tests in), so the test framework
876
- // ignores it.
877
-
878
- Object.defineProperty(element._store, 'validated', {
879
- configurable: false,
880
- enumerable: false,
881
- writable: true,
882
- value: false
883
- }); // self and source are DEV only properties.
884
-
885
- Object.defineProperty(element, '_self', {
886
- configurable: false,
887
- enumerable: false,
888
- writable: false,
889
- value: self
890
- }); // Two elements created in two different places should be considered
891
- // equal for testing purposes and therefore we hide it from enumeration.
892
-
893
- Object.defineProperty(element, '_source', {
894
- configurable: false,
895
- enumerable: false,
896
- writable: false,
897
- value: source
898
- });
899
-
900
- if (Object.freeze) {
901
- Object.freeze(element.props);
902
- Object.freeze(element);
903
- }
904
- }
905
-
906
- return element;
907
- };
908
- /**
909
- * https://github.com/reactjs/rfcs/pull/107
910
- * @param {*} type
911
- * @param {object} props
912
- * @param {string} key
913
- */
914
-
915
- function jsxDEV(type, config, maybeKey, source, self) {
916
- {
917
- var propName; // Reserved names are extracted
918
-
919
- var props = {};
920
- var key = null;
921
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
922
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
923
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
924
- // but as an intermediary step, we will use jsxDEV for everything except
925
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
926
- // key is explicitly declared to be undefined or not.
927
-
928
- if (maybeKey !== undefined) {
929
- {
930
- checkKeyStringCoercion(maybeKey);
931
- }
932
-
933
- key = '' + maybeKey;
934
- }
935
-
936
- if (hasValidKey(config)) {
937
- {
938
- checkKeyStringCoercion(config.key);
939
- }
940
-
941
- key = '' + config.key;
942
- }
943
-
944
- if (hasValidRef(config)) {
945
- ref = config.ref;
946
- warnIfStringRefCannotBeAutoConverted(config, self);
947
- } // Remaining properties are added to a new props object
948
-
949
-
950
- for (propName in config) {
951
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
952
- props[propName] = config[propName];
953
- }
954
- } // Resolve default props
955
-
956
-
957
- if (type && type.defaultProps) {
958
- var defaultProps = type.defaultProps;
959
-
960
- for (propName in defaultProps) {
961
- if (props[propName] === undefined) {
962
- props[propName] = defaultProps[propName];
963
- }
964
- }
965
- }
966
-
967
- if (key || ref) {
968
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
969
-
970
- if (key) {
971
- defineKeyPropWarningGetter(props, displayName);
972
- }
973
-
974
- if (ref) {
975
- defineRefPropWarningGetter(props, displayName);
976
- }
977
- }
978
-
979
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
980
- }
981
- }
982
-
983
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
984
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
985
-
986
- function setCurrentlyValidatingElement$1(element) {
987
- {
988
- if (element) {
989
- var owner = element._owner;
990
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
991
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
992
- } else {
993
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
994
- }
995
- }
996
- }
997
-
998
- var propTypesMisspellWarningShown;
999
-
1000
- {
1001
- propTypesMisspellWarningShown = false;
1002
- }
1003
- /**
1004
- * Verifies the object is a ReactElement.
1005
- * See https://reactjs.org/docs/react-api.html#isvalidelement
1006
- * @param {?object} object
1007
- * @return {boolean} True if `object` is a ReactElement.
1008
- * @final
1009
- */
1010
-
1011
-
1012
- function isValidElement(object) {
1013
- {
1014
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1015
- }
1016
- }
1017
-
1018
- function getDeclarationErrorAddendum() {
1019
- {
1020
- if (ReactCurrentOwner$1.current) {
1021
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
1022
-
1023
- if (name) {
1024
- return '\n\nCheck the render method of `' + name + '`.';
1025
- }
1026
- }
1027
-
1028
- return '';
1029
- }
1030
- }
1031
-
1032
- function getSourceInfoErrorAddendum(source) {
1033
- {
1034
-
1035
- return '';
1036
- }
1037
- }
1038
- /**
1039
- * Warn if there's no key explicitly set on dynamic arrays of children or
1040
- * object keys are not valid. This allows us to keep track of children between
1041
- * updates.
1042
- */
1043
-
1044
-
1045
- var ownerHasKeyUseWarning = {};
1046
-
1047
- function getCurrentComponentErrorInfo(parentType) {
1048
- {
1049
- var info = getDeclarationErrorAddendum();
1050
-
1051
- if (!info) {
1052
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
1053
-
1054
- if (parentName) {
1055
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1056
- }
1057
- }
1058
-
1059
- return info;
1060
- }
1061
- }
1062
- /**
1063
- * Warn if the element doesn't have an explicit key assigned to it.
1064
- * This element is in an array. The array could grow and shrink or be
1065
- * reordered. All children that haven't already been validated are required to
1066
- * have a "key" property assigned to it. Error statuses are cached so a warning
1067
- * will only be shown once.
1068
- *
1069
- * @internal
1070
- * @param {ReactElement} element Element that requires a key.
1071
- * @param {*} parentType element's parent's type.
1072
- */
1073
-
1074
-
1075
- function validateExplicitKey(element, parentType) {
1076
- {
1077
- if (!element._store || element._store.validated || element.key != null) {
1078
- return;
1079
- }
1080
-
1081
- element._store.validated = true;
1082
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1083
-
1084
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1085
- return;
1086
- }
1087
-
1088
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1089
- // property, it may be the creator of the child that's responsible for
1090
- // assigning it a key.
1091
-
1092
- var childOwner = '';
1093
-
1094
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
1095
- // Give the component that originally created this child.
1096
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1097
- }
1098
-
1099
- setCurrentlyValidatingElement$1(element);
1100
-
1101
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1102
-
1103
- setCurrentlyValidatingElement$1(null);
1104
- }
1105
- }
1106
- /**
1107
- * Ensure that every element either is passed in a static location, in an
1108
- * array with an explicit keys property defined, or in an object literal
1109
- * with valid key property.
1110
- *
1111
- * @internal
1112
- * @param {ReactNode} node Statically passed child of any type.
1113
- * @param {*} parentType node's parent's type.
1114
- */
1115
-
1116
-
1117
- function validateChildKeys(node, parentType) {
1118
- {
1119
- if (typeof node !== 'object') {
1120
- return;
1121
- }
1122
-
1123
- if (isArray(node)) {
1124
- for (var i = 0; i < node.length; i++) {
1125
- var child = node[i];
1126
-
1127
- if (isValidElement(child)) {
1128
- validateExplicitKey(child, parentType);
1129
- }
1130
- }
1131
- } else if (isValidElement(node)) {
1132
- // This element was passed in a valid location.
1133
- if (node._store) {
1134
- node._store.validated = true;
1135
- }
1136
- } else if (node) {
1137
- var iteratorFn = getIteratorFn(node);
1138
-
1139
- if (typeof iteratorFn === 'function') {
1140
- // Entry iterators used to provide implicit keys,
1141
- // but now we print a separate warning for them later.
1142
- if (iteratorFn !== node.entries) {
1143
- var iterator = iteratorFn.call(node);
1144
- var step;
1145
-
1146
- while (!(step = iterator.next()).done) {
1147
- if (isValidElement(step.value)) {
1148
- validateExplicitKey(step.value, parentType);
1149
- }
1150
- }
1151
- }
1152
- }
1153
- }
1154
- }
1155
- }
1156
- /**
1157
- * Given an element, validate that its props follow the propTypes definition,
1158
- * provided by the type.
1159
- *
1160
- * @param {ReactElement} element
1161
- */
1162
-
1163
-
1164
- function validatePropTypes(element) {
1165
- {
1166
- var type = element.type;
1167
-
1168
- if (type === null || type === undefined || typeof type === 'string') {
1169
- return;
1170
- }
1171
-
1172
- var propTypes;
1173
-
1174
- if (typeof type === 'function') {
1175
- propTypes = type.propTypes;
1176
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1177
- // Inner props are checked in the reconciler.
1178
- type.$$typeof === REACT_MEMO_TYPE)) {
1179
- propTypes = type.propTypes;
1180
- } else {
1181
- return;
1182
- }
1183
-
1184
- if (propTypes) {
1185
- // Intentionally inside to avoid triggering lazy initializers:
1186
- var name = getComponentNameFromType(type);
1187
- checkPropTypes(propTypes, element.props, 'prop', name, element);
1188
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1189
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
1190
-
1191
- var _name = getComponentNameFromType(type);
1192
-
1193
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
1194
- }
1195
-
1196
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
1197
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1198
- }
1199
- }
1200
- }
1201
- /**
1202
- * Given a fragment, validate that it can only be provided with fragment props
1203
- * @param {ReactElement} fragment
1204
- */
1205
-
1206
-
1207
- function validateFragmentProps(fragment) {
1208
- {
1209
- var keys = Object.keys(fragment.props);
1210
-
1211
- for (var i = 0; i < keys.length; i++) {
1212
- var key = keys[i];
1213
-
1214
- if (key !== 'children' && key !== 'key') {
1215
- setCurrentlyValidatingElement$1(fragment);
1216
-
1217
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1218
-
1219
- setCurrentlyValidatingElement$1(null);
1220
- break;
1221
- }
1222
- }
1223
-
1224
- if (fragment.ref !== null) {
1225
- setCurrentlyValidatingElement$1(fragment);
1226
-
1227
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
1228
-
1229
- setCurrentlyValidatingElement$1(null);
1230
- }
1231
- }
1232
- }
1233
-
1234
- var didWarnAboutKeySpread = {};
1235
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
1236
- {
1237
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1238
- // succeed and there will likely be errors in render.
1239
-
1240
- if (!validType) {
1241
- var info = '';
1242
-
1243
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1244
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
1245
- }
1246
-
1247
- var sourceInfo = getSourceInfoErrorAddendum();
1248
-
1249
- if (sourceInfo) {
1250
- info += sourceInfo;
1251
- } else {
1252
- info += getDeclarationErrorAddendum();
1253
- }
1254
-
1255
- var typeString;
1256
-
1257
- if (type === null) {
1258
- typeString = 'null';
1259
- } else if (isArray(type)) {
1260
- typeString = 'array';
1261
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1262
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
1263
- info = ' Did you accidentally export a JSX literal instead of a component?';
1264
- } else {
1265
- typeString = typeof type;
1266
- }
1267
-
1268
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1269
- }
1270
-
1271
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
1272
- // TODO: Drop this when these are no longer allowed as the type argument.
1273
-
1274
- if (element == null) {
1275
- return element;
1276
- } // Skip key warning if the type isn't valid since our key validation logic
1277
- // doesn't expect a non-string/function type and can throw confusing errors.
1278
- // We don't want exception behavior to differ between dev and prod.
1279
- // (Rendering will throw with a helpful message and as soon as the type is
1280
- // fixed, the key warnings will appear.)
1281
-
1282
-
1283
- if (validType) {
1284
- var children = props.children;
1285
-
1286
- if (children !== undefined) {
1287
- if (isStaticChildren) {
1288
- if (isArray(children)) {
1289
- for (var i = 0; i < children.length; i++) {
1290
- validateChildKeys(children[i], type);
1291
- }
1292
-
1293
- if (Object.freeze) {
1294
- Object.freeze(children);
1295
- }
1296
- } else {
1297
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
1298
- }
1299
- } else {
1300
- validateChildKeys(children, type);
1301
- }
1302
- }
1303
- }
1304
-
1305
- {
1306
- if (hasOwnProperty.call(props, 'key')) {
1307
- var componentName = getComponentNameFromType(type);
1308
- var keys = Object.keys(props).filter(function (k) {
1309
- return k !== 'key';
1310
- });
1311
- var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
1312
-
1313
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
1314
- var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
1315
-
1316
- error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
1317
-
1318
- didWarnAboutKeySpread[componentName + beforeExample] = true;
1319
- }
1320
- }
1321
- }
1322
-
1323
- if (type === REACT_FRAGMENT_TYPE) {
1324
- validateFragmentProps(element);
1325
- } else {
1326
- validatePropTypes(element);
1327
- }
1328
-
1329
- return element;
1330
- }
1331
- } // These two functions exist to still get child warnings in dev
1332
- // even with the prod transform. This means that jsxDEV is purely
1333
- // opt-in behavior for better messages but that we won't stop
1334
- // giving you warnings if you use production apis.
1335
-
1336
- function jsxWithValidationStatic(type, props, key) {
1337
- {
1338
- return jsxWithValidation(type, props, key, true);
1339
- }
1340
- }
1341
- function jsxWithValidationDynamic(type, props, key) {
1342
- {
1343
- return jsxWithValidation(type, props, key, false);
1344
- }
1345
- }
1346
-
1347
- var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
1348
- // for now we can ship identical prod functions
1349
-
1350
- var jsxs = jsxWithValidationStatic ;
1351
-
1352
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1353
- reactJsxRuntime_development.jsx = jsx;
1354
- reactJsxRuntime_development.jsxs = jsxs;
1355
- })();
1356
- }
1357
- return reactJsxRuntime_development;
1358
- }
1359
-
1360
- if (process.env.NODE_ENV === 'production') {
1361
- jsxRuntime.exports = requireReactJsxRuntime_production_min();
1362
- } else {
1363
- jsxRuntime.exports = requireReactJsxRuntime_development();
1364
- }
1365
-
1366
- var jsxRuntimeExports = jsxRuntime.exports;
1367
-
1368
10
  // Create context for notification handler
1369
- const NotificationContext = require$$0.createContext(null);
11
+ const NotificationContext = react.createContext(null);
1370
12
  /**
1371
13
  * NotificationProvider component
1372
14
  * Provides a notification handler to all child components via context
@@ -1387,7 +29,7 @@ const NotificationContext = require$$0.createContext(null);
1387
29
  * ```
1388
30
  */
1389
31
  const NotificationProvider = ({ children, handler, }) => {
1390
- return (jsxRuntimeExports.jsx(NotificationContext.Provider, { value: handler, children: children }));
32
+ return (jsxRuntime.jsx(NotificationContext.Provider, { value: handler, children: children }));
1391
33
  };
1392
34
 
1393
35
  /**
@@ -1415,7 +57,7 @@ const NotificationProvider = ({ children, handler, }) => {
1415
57
  * ```
1416
58
  */
1417
59
  const useNotification = () => {
1418
- const handler = require$$0.useContext(NotificationContext);
60
+ const handler = react.useContext(NotificationContext);
1419
61
  if (!handler) {
1420
62
  throw new Error("useNotification must be used within a NotificationProvider");
1421
63
  }
@@ -1477,7 +119,7 @@ const useActivity = (isActive, description) => {
1477
119
  // Get activity management functions from the progress state store
1478
120
  const addActivity = useProgressStateStore((state) => state.addActivity);
1479
121
  const removeActivity = useProgressStateStore((state) => state.removeActivity);
1480
- require$$0.useEffect(() => {
122
+ react.useEffect(() => {
1481
123
  // Only manage activity when isActive is true
1482
124
  if (isActive) {
1483
125
  // Add the activity to the progress state
@@ -2767,6 +1409,10 @@ const useGraphEmbeddings = ({ flow, vecs, limit, collection }) => {
2767
1409
  };
2768
1410
  };
2769
1411
 
1412
+ function getDefaultExportFromCjs (x) {
1413
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1414
+ }
1415
+
2770
1416
  /**
2771
1417
  * FUNCTION: isArray( value )
2772
1418
  * Validates if a value is an array.
@@ -3206,7 +1852,7 @@ const useVectorSearch = () => {
3206
1852
  // Hook for displaying user notifications
3207
1853
  const notify = useNotification();
3208
1854
  // State to track current search parameters
3209
- const [searchParams, setSearchParams] = require$$0.useState(null);
1855
+ const [searchParams, setSearchParams] = react.useState(null);
3210
1856
  /**
3211
1857
  * Query for fetching vector search results
3212
1858
  * Uses React Query for caching and background refetching
@@ -5488,7 +4134,7 @@ const useFlowParameters = (flowClassName) => {
5488
4134
  * @returns Validation result with isValid flag and errors object
5489
4135
  */
5490
4136
  const useParameterValidation = (parameterDefinitions, parameterMapping, parameterMetadata, parameterValues) => {
5491
- return require$$0.useMemo(() => {
4137
+ return react.useMemo(() => {
5492
4138
  const errors = {};
5493
4139
  let isValid = true;
5494
4140
  // Resolve parameter value considering controlled-by relationships
@@ -5711,7 +4357,7 @@ const useNodeDetails = (nodeId, flowId) => {
5711
4357
  * Process outbound triples to extract navigable relationships
5712
4358
  * Filters for entity relationships (o.e === true) and removes duplicates
5713
4359
  */
5714
- const outboundRelationships = require$$0.useMemo(() => {
4360
+ const outboundRelationships = react.useMemo(() => {
5715
4361
  if (!outboundTriplesQuery.data)
5716
4362
  return [];
5717
4363
  // Filter for entity relationships and extract unique predicates
@@ -5729,7 +4375,7 @@ const useNodeDetails = (nodeId, flowId) => {
5729
4375
  * Process inbound triples to extract navigable relationships
5730
4376
  * Filters for entity relationships (s.e === true) and removes duplicates
5731
4377
  */
5732
- const inboundRelationships = require$$0.useMemo(() => {
4378
+ const inboundRelationships = react.useMemo(() => {
5733
4379
  if (!inboundTriplesQuery.data)
5734
4380
  return [];
5735
4381
  // Filter for entity relationships and extract unique predicates
@@ -5747,7 +4393,7 @@ const useNodeDetails = (nodeId, flowId) => {
5747
4393
  * Process properties to extract unique property URIs
5748
4394
  * Properties are triples where o.e === false (literals)
5749
4395
  */
5750
- const propertyURIs = require$$0.useMemo(() => {
4396
+ const propertyURIs = react.useMemo(() => {
5751
4397
  if (!propertiesQuery.data)
5752
4398
  return [];
5753
4399
  // Extract unique property predicates
@@ -5898,7 +4544,7 @@ const useNodeDetails = (nodeId, flowId) => {
5898
4544
  /**
5899
4545
  * Combine relationship URIs with their labels
5900
4546
  */
5901
- const outboundRelationshipsWithLabels = require$$0.useMemo(() => {
4547
+ const outboundRelationshipsWithLabels = react.useMemo(() => {
5902
4548
  if (!outboundLabelsQuery.data) {
5903
4549
  return outboundRelationships.map((uri) => ({ uri, label: uri }));
5904
4550
  }
@@ -5907,7 +4553,7 @@ const useNodeDetails = (nodeId, flowId) => {
5907
4553
  label: outboundLabelsQuery.data[uri] || uri,
5908
4554
  }));
5909
4555
  }, [outboundRelationships, outboundLabelsQuery.data]);
5910
- const inboundRelationshipsWithLabels = require$$0.useMemo(() => {
4556
+ const inboundRelationshipsWithLabels = react.useMemo(() => {
5911
4557
  if (!inboundLabelsQuery.data) {
5912
4558
  return inboundRelationships.map((uri) => ({ uri, label: uri }));
5913
4559
  }
@@ -5921,7 +4567,7 @@ const useNodeDetails = (nodeId, flowId) => {
5921
4567
  * Creates array of {predicate: {uri, label}, value} objects
5922
4568
  * Excludes label properties since they're already displayed at the top
5923
4569
  */
5924
- const propertiesWithLabels = require$$0.useMemo(() => {
4570
+ const propertiesWithLabels = react.useMemo(() => {
5925
4571
  if (!propertiesQuery.data)
5926
4572
  return [];
5927
4573
  return propertiesQuery.data
@@ -6024,16 +4670,16 @@ const useNodeDetails = (nodeId, flowId) => {
6024
4670
  };
6025
4671
 
6026
4672
  Object.defineProperty(exports, "ConnectionStateContext", {
6027
- enumerable: true,
6028
- get: function () { return reactProvider.ConnectionStateContext; }
4673
+ enumerable: true,
4674
+ get: function () { return reactProvider.ConnectionStateContext; }
6029
4675
  });
6030
4676
  Object.defineProperty(exports, "SocketContext", {
6031
- enumerable: true,
6032
- get: function () { return reactProvider.SocketContext; }
4677
+ enumerable: true,
4678
+ get: function () { return reactProvider.SocketContext; }
6033
4679
  });
6034
4680
  Object.defineProperty(exports, "SocketProvider", {
6035
- enumerable: true,
6036
- get: function () { return reactProvider.SocketProvider; }
4681
+ enumerable: true,
4682
+ get: function () { return reactProvider.SocketProvider; }
6037
4683
  });
6038
4684
  exports.DEFAULT_SETTINGS = DEFAULT_SETTINGS;
6039
4685
  exports.NotificationProvider = NotificationProvider;