@page-speed/lightbox 0.1.1 → 0.1.3

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.js CHANGED
@@ -37,2797 +37,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
37
  mod
38
38
  ));
39
39
 
40
- // node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
41
- var require_react_development = __commonJS({
42
- "node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports2, module2) {
43
- "use strict";
44
- if (true) {
45
- (function() {
46
- "use strict";
47
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
48
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
49
- }
50
- var ReactVersion = "18.3.1";
51
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
52
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
53
- var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
54
- var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
55
- var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
56
- var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
57
- var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
58
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
59
- var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
60
- var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
61
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
62
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
63
- var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
64
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
65
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
66
- function getIteratorFn(maybeIterable) {
67
- if (maybeIterable === null || typeof maybeIterable !== "object") {
68
- return null;
69
- }
70
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
71
- if (typeof maybeIterator === "function") {
72
- return maybeIterator;
73
- }
74
- return null;
75
- }
76
- var ReactCurrentDispatcher = {
77
- /**
78
- * @internal
79
- * @type {ReactComponent}
80
- */
81
- current: null
82
- };
83
- var ReactCurrentBatchConfig = {
84
- transition: null
85
- };
86
- var ReactCurrentActQueue = {
87
- current: null,
88
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
89
- isBatchingLegacy: false,
90
- didScheduleLegacyUpdate: false
91
- };
92
- var ReactCurrentOwner = {
93
- /**
94
- * @internal
95
- * @type {ReactComponent}
96
- */
97
- current: null
98
- };
99
- var ReactDebugCurrentFrame = {};
100
- var currentExtraStackFrame = null;
101
- function setExtraStackFrame(stack) {
102
- {
103
- currentExtraStackFrame = stack;
104
- }
105
- }
106
- {
107
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
108
- {
109
- currentExtraStackFrame = stack;
110
- }
111
- };
112
- ReactDebugCurrentFrame.getCurrentStack = null;
113
- ReactDebugCurrentFrame.getStackAddendum = function() {
114
- var stack = "";
115
- if (currentExtraStackFrame) {
116
- stack += currentExtraStackFrame;
117
- }
118
- var impl = ReactDebugCurrentFrame.getCurrentStack;
119
- if (impl) {
120
- stack += impl() || "";
121
- }
122
- return stack;
123
- };
124
- }
125
- var enableScopeAPI = false;
126
- var enableCacheElement = false;
127
- var enableTransitionTracing = false;
128
- var enableLegacyHidden = false;
129
- var enableDebugTracing = false;
130
- var ReactSharedInternals = {
131
- ReactCurrentDispatcher,
132
- ReactCurrentBatchConfig,
133
- ReactCurrentOwner
134
- };
135
- {
136
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
137
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
138
- }
139
- function warn(format) {
140
- {
141
- {
142
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
143
- args[_key - 1] = arguments[_key];
144
- }
145
- printWarning("warn", format, args);
146
- }
147
- }
148
- }
149
- function error(format) {
150
- {
151
- {
152
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
153
- args[_key2 - 1] = arguments[_key2];
154
- }
155
- printWarning("error", format, args);
156
- }
157
- }
158
- }
159
- function printWarning(level, format, args) {
160
- {
161
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
162
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
163
- if (stack !== "") {
164
- format += "%s";
165
- args = args.concat([stack]);
166
- }
167
- var argsWithFormat = args.map(function(item) {
168
- return String(item);
169
- });
170
- argsWithFormat.unshift("Warning: " + format);
171
- Function.prototype.apply.call(console[level], console, argsWithFormat);
172
- }
173
- }
174
- var didWarnStateUpdateForUnmountedComponent = {};
175
- function warnNoop(publicInstance, callerName) {
176
- {
177
- var _constructor = publicInstance.constructor;
178
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
179
- var warningKey = componentName + "." + callerName;
180
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
181
- return;
182
- }
183
- error("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.", callerName, componentName);
184
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
185
- }
186
- }
187
- var ReactNoopUpdateQueue = {
188
- /**
189
- * Checks whether or not this composite component is mounted.
190
- * @param {ReactClass} publicInstance The instance we want to test.
191
- * @return {boolean} True if mounted, false otherwise.
192
- * @protected
193
- * @final
194
- */
195
- isMounted: function(publicInstance) {
196
- return false;
197
- },
198
- /**
199
- * Forces an update. This should only be invoked when it is known with
200
- * certainty that we are **not** in a DOM transaction.
201
- *
202
- * You may want to call this when you know that some deeper aspect of the
203
- * component's state has changed but `setState` was not called.
204
- *
205
- * This will not invoke `shouldComponentUpdate`, but it will invoke
206
- * `componentWillUpdate` and `componentDidUpdate`.
207
- *
208
- * @param {ReactClass} publicInstance The instance that should rerender.
209
- * @param {?function} callback Called after component is updated.
210
- * @param {?string} callerName name of the calling function in the public API.
211
- * @internal
212
- */
213
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
214
- warnNoop(publicInstance, "forceUpdate");
215
- },
216
- /**
217
- * Replaces all of the state. Always use this or `setState` to mutate state.
218
- * You should treat `this.state` as immutable.
219
- *
220
- * There is no guarantee that `this.state` will be immediately updated, so
221
- * accessing `this.state` after calling this method may return the old value.
222
- *
223
- * @param {ReactClass} publicInstance The instance that should rerender.
224
- * @param {object} completeState Next state.
225
- * @param {?function} callback Called after component is updated.
226
- * @param {?string} callerName name of the calling function in the public API.
227
- * @internal
228
- */
229
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
230
- warnNoop(publicInstance, "replaceState");
231
- },
232
- /**
233
- * Sets a subset of the state. This only exists because _pendingState is
234
- * internal. This provides a merging strategy that is not available to deep
235
- * properties which is confusing. TODO: Expose pendingState or don't use it
236
- * during the merge.
237
- *
238
- * @param {ReactClass} publicInstance The instance that should rerender.
239
- * @param {object} partialState Next partial state to be merged with state.
240
- * @param {?function} callback Called after component is updated.
241
- * @param {?string} Name of the calling function in the public API.
242
- * @internal
243
- */
244
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
245
- warnNoop(publicInstance, "setState");
246
- }
247
- };
248
- var assign = Object.assign;
249
- var emptyObject = {};
250
- {
251
- Object.freeze(emptyObject);
252
- }
253
- function Component(props, context, updater) {
254
- this.props = props;
255
- this.context = context;
256
- this.refs = emptyObject;
257
- this.updater = updater || ReactNoopUpdateQueue;
258
- }
259
- Component.prototype.isReactComponent = {};
260
- Component.prototype.setState = function(partialState, callback) {
261
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
262
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
263
- }
264
- this.updater.enqueueSetState(this, partialState, callback, "setState");
265
- };
266
- Component.prototype.forceUpdate = function(callback) {
267
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
268
- };
269
- {
270
- var deprecatedAPIs = {
271
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
272
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
273
- };
274
- var defineDeprecationWarning = function(methodName, info) {
275
- Object.defineProperty(Component.prototype, methodName, {
276
- get: function() {
277
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
278
- return void 0;
279
- }
280
- });
281
- };
282
- for (var fnName in deprecatedAPIs) {
283
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
284
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
285
- }
286
- }
287
- }
288
- function ComponentDummy() {
289
- }
290
- ComponentDummy.prototype = Component.prototype;
291
- function PureComponent(props, context, updater) {
292
- this.props = props;
293
- this.context = context;
294
- this.refs = emptyObject;
295
- this.updater = updater || ReactNoopUpdateQueue;
296
- }
297
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
298
- pureComponentPrototype.constructor = PureComponent;
299
- assign(pureComponentPrototype, Component.prototype);
300
- pureComponentPrototype.isPureReactComponent = true;
301
- function createRef() {
302
- var refObject = {
303
- current: null
304
- };
305
- {
306
- Object.seal(refObject);
307
- }
308
- return refObject;
309
- }
310
- var isArrayImpl = Array.isArray;
311
- function isArray(a) {
312
- return isArrayImpl(a);
313
- }
314
- function typeName(value) {
315
- {
316
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
317
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
318
- return type;
319
- }
320
- }
321
- function willCoercionThrow(value) {
322
- {
323
- try {
324
- testStringCoercion(value);
325
- return false;
326
- } catch (e) {
327
- return true;
328
- }
329
- }
330
- }
331
- function testStringCoercion(value) {
332
- return "" + value;
333
- }
334
- function checkKeyStringCoercion(value) {
335
- {
336
- if (willCoercionThrow(value)) {
337
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
338
- return testStringCoercion(value);
339
- }
340
- }
341
- }
342
- function getWrappedName(outerType, innerType, wrapperName) {
343
- var displayName = outerType.displayName;
344
- if (displayName) {
345
- return displayName;
346
- }
347
- var functionName = innerType.displayName || innerType.name || "";
348
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
349
- }
350
- function getContextName(type) {
351
- return type.displayName || "Context";
352
- }
353
- function getComponentNameFromType(type) {
354
- if (type == null) {
355
- return null;
356
- }
357
- {
358
- if (typeof type.tag === "number") {
359
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
360
- }
361
- }
362
- if (typeof type === "function") {
363
- return type.displayName || type.name || null;
364
- }
365
- if (typeof type === "string") {
366
- return type;
367
- }
368
- switch (type) {
369
- case REACT_FRAGMENT_TYPE:
370
- return "Fragment";
371
- case REACT_PORTAL_TYPE:
372
- return "Portal";
373
- case REACT_PROFILER_TYPE:
374
- return "Profiler";
375
- case REACT_STRICT_MODE_TYPE:
376
- return "StrictMode";
377
- case REACT_SUSPENSE_TYPE:
378
- return "Suspense";
379
- case REACT_SUSPENSE_LIST_TYPE:
380
- return "SuspenseList";
381
- }
382
- if (typeof type === "object") {
383
- switch (type.$$typeof) {
384
- case REACT_CONTEXT_TYPE:
385
- var context = type;
386
- return getContextName(context) + ".Consumer";
387
- case REACT_PROVIDER_TYPE:
388
- var provider = type;
389
- return getContextName(provider._context) + ".Provider";
390
- case REACT_FORWARD_REF_TYPE:
391
- return getWrappedName(type, type.render, "ForwardRef");
392
- case REACT_MEMO_TYPE:
393
- var outerName = type.displayName || null;
394
- if (outerName !== null) {
395
- return outerName;
396
- }
397
- return getComponentNameFromType(type.type) || "Memo";
398
- case REACT_LAZY_TYPE: {
399
- var lazyComponent = type;
400
- var payload = lazyComponent._payload;
401
- var init = lazyComponent._init;
402
- try {
403
- return getComponentNameFromType(init(payload));
404
- } catch (x) {
405
- return null;
406
- }
407
- }
408
- }
409
- }
410
- return null;
411
- }
412
- var hasOwnProperty = Object.prototype.hasOwnProperty;
413
- var RESERVED_PROPS = {
414
- key: true,
415
- ref: true,
416
- __self: true,
417
- __source: true
418
- };
419
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
420
- {
421
- didWarnAboutStringRefs = {};
422
- }
423
- function hasValidRef(config) {
424
- {
425
- if (hasOwnProperty.call(config, "ref")) {
426
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
427
- if (getter && getter.isReactWarning) {
428
- return false;
429
- }
430
- }
431
- }
432
- return config.ref !== void 0;
433
- }
434
- function hasValidKey(config) {
435
- {
436
- if (hasOwnProperty.call(config, "key")) {
437
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
438
- if (getter && getter.isReactWarning) {
439
- return false;
440
- }
441
- }
442
- }
443
- return config.key !== void 0;
444
- }
445
- function defineKeyPropWarningGetter(props, displayName) {
446
- var warnAboutAccessingKey = function() {
447
- {
448
- if (!specialPropKeyWarningShown) {
449
- specialPropKeyWarningShown = true;
450
- 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);
451
- }
452
- }
453
- };
454
- warnAboutAccessingKey.isReactWarning = true;
455
- Object.defineProperty(props, "key", {
456
- get: warnAboutAccessingKey,
457
- configurable: true
458
- });
459
- }
460
- function defineRefPropWarningGetter(props, displayName) {
461
- var warnAboutAccessingRef = function() {
462
- {
463
- if (!specialPropRefWarningShown) {
464
- specialPropRefWarningShown = true;
465
- 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);
466
- }
467
- }
468
- };
469
- warnAboutAccessingRef.isReactWarning = true;
470
- Object.defineProperty(props, "ref", {
471
- get: warnAboutAccessingRef,
472
- configurable: true
473
- });
474
- }
475
- function warnIfStringRefCannotBeAutoConverted(config) {
476
- {
477
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
478
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
479
- if (!didWarnAboutStringRefs[componentName]) {
480
- error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
481
- didWarnAboutStringRefs[componentName] = true;
482
- }
483
- }
484
- }
485
- }
486
- var ReactElement = function(type, key, ref, self, source, owner, props) {
487
- var element = {
488
- // This tag allows us to uniquely identify this as a React Element
489
- $$typeof: REACT_ELEMENT_TYPE,
490
- // Built-in properties that belong on the element
491
- type,
492
- key,
493
- ref,
494
- props,
495
- // Record the component responsible for creating this element.
496
- _owner: owner
497
- };
498
- {
499
- element._store = {};
500
- Object.defineProperty(element._store, "validated", {
501
- configurable: false,
502
- enumerable: false,
503
- writable: true,
504
- value: false
505
- });
506
- Object.defineProperty(element, "_self", {
507
- configurable: false,
508
- enumerable: false,
509
- writable: false,
510
- value: self
511
- });
512
- Object.defineProperty(element, "_source", {
513
- configurable: false,
514
- enumerable: false,
515
- writable: false,
516
- value: source
517
- });
518
- if (Object.freeze) {
519
- Object.freeze(element.props);
520
- Object.freeze(element);
521
- }
522
- }
523
- return element;
524
- };
525
- function createElement(type, config, children) {
526
- var propName;
527
- var props = {};
528
- var key = null;
529
- var ref = null;
530
- var self = null;
531
- var source = null;
532
- if (config != null) {
533
- if (hasValidRef(config)) {
534
- ref = config.ref;
535
- {
536
- warnIfStringRefCannotBeAutoConverted(config);
537
- }
538
- }
539
- if (hasValidKey(config)) {
540
- {
541
- checkKeyStringCoercion(config.key);
542
- }
543
- key = "" + config.key;
544
- }
545
- self = config.__self === void 0 ? null : config.__self;
546
- source = config.__source === void 0 ? null : config.__source;
547
- for (propName in config) {
548
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
549
- props[propName] = config[propName];
550
- }
551
- }
552
- }
553
- var childrenLength = arguments.length - 2;
554
- if (childrenLength === 1) {
555
- props.children = children;
556
- } else if (childrenLength > 1) {
557
- var childArray = Array(childrenLength);
558
- for (var i = 0; i < childrenLength; i++) {
559
- childArray[i] = arguments[i + 2];
560
- }
561
- {
562
- if (Object.freeze) {
563
- Object.freeze(childArray);
564
- }
565
- }
566
- props.children = childArray;
567
- }
568
- if (type && type.defaultProps) {
569
- var defaultProps = type.defaultProps;
570
- for (propName in defaultProps) {
571
- if (props[propName] === void 0) {
572
- props[propName] = defaultProps[propName];
573
- }
574
- }
575
- }
576
- {
577
- if (key || ref) {
578
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
579
- if (key) {
580
- defineKeyPropWarningGetter(props, displayName);
581
- }
582
- if (ref) {
583
- defineRefPropWarningGetter(props, displayName);
584
- }
585
- }
586
- }
587
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
588
- }
589
- function cloneAndReplaceKey(oldElement, newKey) {
590
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
591
- return newElement;
592
- }
593
- function cloneElement(element, config, children) {
594
- if (element === null || element === void 0) {
595
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
596
- }
597
- var propName;
598
- var props = assign({}, element.props);
599
- var key = element.key;
600
- var ref = element.ref;
601
- var self = element._self;
602
- var source = element._source;
603
- var owner = element._owner;
604
- if (config != null) {
605
- if (hasValidRef(config)) {
606
- ref = config.ref;
607
- owner = ReactCurrentOwner.current;
608
- }
609
- if (hasValidKey(config)) {
610
- {
611
- checkKeyStringCoercion(config.key);
612
- }
613
- key = "" + config.key;
614
- }
615
- var defaultProps;
616
- if (element.type && element.type.defaultProps) {
617
- defaultProps = element.type.defaultProps;
618
- }
619
- for (propName in config) {
620
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
621
- if (config[propName] === void 0 && defaultProps !== void 0) {
622
- props[propName] = defaultProps[propName];
623
- } else {
624
- props[propName] = config[propName];
625
- }
626
- }
627
- }
628
- }
629
- var childrenLength = arguments.length - 2;
630
- if (childrenLength === 1) {
631
- props.children = children;
632
- } else if (childrenLength > 1) {
633
- var childArray = Array(childrenLength);
634
- for (var i = 0; i < childrenLength; i++) {
635
- childArray[i] = arguments[i + 2];
636
- }
637
- props.children = childArray;
638
- }
639
- return ReactElement(element.type, key, ref, self, source, owner, props);
640
- }
641
- function isValidElement(object) {
642
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
643
- }
644
- var SEPARATOR = ".";
645
- var SUBSEPARATOR = ":";
646
- function escape2(key) {
647
- var escapeRegex = /[=:]/g;
648
- var escaperLookup = {
649
- "=": "=0",
650
- ":": "=2"
651
- };
652
- var escapedString = key.replace(escapeRegex, function(match) {
653
- return escaperLookup[match];
654
- });
655
- return "$" + escapedString;
656
- }
657
- var didWarnAboutMaps = false;
658
- var userProvidedKeyEscapeRegex = /\/+/g;
659
- function escapeUserProvidedKey(text) {
660
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
661
- }
662
- function getElementKey(element, index) {
663
- if (typeof element === "object" && element !== null && element.key != null) {
664
- {
665
- checkKeyStringCoercion(element.key);
666
- }
667
- return escape2("" + element.key);
668
- }
669
- return index.toString(36);
670
- }
671
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
672
- var type = typeof children;
673
- if (type === "undefined" || type === "boolean") {
674
- children = null;
675
- }
676
- var invokeCallback = false;
677
- if (children === null) {
678
- invokeCallback = true;
679
- } else {
680
- switch (type) {
681
- case "string":
682
- case "number":
683
- invokeCallback = true;
684
- break;
685
- case "object":
686
- switch (children.$$typeof) {
687
- case REACT_ELEMENT_TYPE:
688
- case REACT_PORTAL_TYPE:
689
- invokeCallback = true;
690
- }
691
- }
692
- }
693
- if (invokeCallback) {
694
- var _child = children;
695
- var mappedChild = callback(_child);
696
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
697
- if (isArray(mappedChild)) {
698
- var escapedChildKey = "";
699
- if (childKey != null) {
700
- escapedChildKey = escapeUserProvidedKey(childKey) + "/";
701
- }
702
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
703
- return c;
704
- });
705
- } else if (mappedChild != null) {
706
- if (isValidElement(mappedChild)) {
707
- {
708
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
709
- checkKeyStringCoercion(mappedChild.key);
710
- }
711
- }
712
- mappedChild = cloneAndReplaceKey(
713
- mappedChild,
714
- // Keep both the (mapped) and old keys if they differ, just as
715
- // traverseAllChildren used to do for objects as children
716
- escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
717
- (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
718
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
719
- // eslint-disable-next-line react-internal/safe-string-coercion
720
- escapeUserProvidedKey("" + mappedChild.key) + "/"
721
- ) : "") + childKey
722
- );
723
- }
724
- array.push(mappedChild);
725
- }
726
- return 1;
727
- }
728
- var child;
729
- var nextName;
730
- var subtreeCount = 0;
731
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
732
- if (isArray(children)) {
733
- for (var i = 0; i < children.length; i++) {
734
- child = children[i];
735
- nextName = nextNamePrefix + getElementKey(child, i);
736
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
737
- }
738
- } else {
739
- var iteratorFn = getIteratorFn(children);
740
- if (typeof iteratorFn === "function") {
741
- var iterableChildren = children;
742
- {
743
- if (iteratorFn === iterableChildren.entries) {
744
- if (!didWarnAboutMaps) {
745
- warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
746
- }
747
- didWarnAboutMaps = true;
748
- }
749
- }
750
- var iterator = iteratorFn.call(iterableChildren);
751
- var step;
752
- var ii = 0;
753
- while (!(step = iterator.next()).done) {
754
- child = step.value;
755
- nextName = nextNamePrefix + getElementKey(child, ii++);
756
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
757
- }
758
- } else if (type === "object") {
759
- var childrenString = String(children);
760
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
761
- }
762
- }
763
- return subtreeCount;
764
- }
765
- function mapChildren(children, func, context) {
766
- if (children == null) {
767
- return children;
768
- }
769
- var result = [];
770
- var count = 0;
771
- mapIntoArray(children, result, "", "", function(child) {
772
- return func.call(context, child, count++);
773
- });
774
- return result;
775
- }
776
- function countChildren(children) {
777
- var n = 0;
778
- mapChildren(children, function() {
779
- n++;
780
- });
781
- return n;
782
- }
783
- function forEachChildren(children, forEachFunc, forEachContext) {
784
- mapChildren(children, function() {
785
- forEachFunc.apply(this, arguments);
786
- }, forEachContext);
787
- }
788
- function toArray(children) {
789
- return mapChildren(children, function(child) {
790
- return child;
791
- }) || [];
792
- }
793
- function onlyChild(children) {
794
- if (!isValidElement(children)) {
795
- throw new Error("React.Children.only expected to receive a single React element child.");
796
- }
797
- return children;
798
- }
799
- function createContext(defaultValue) {
800
- var context = {
801
- $$typeof: REACT_CONTEXT_TYPE,
802
- // As a workaround to support multiple concurrent renderers, we categorize
803
- // some renderers as primary and others as secondary. We only expect
804
- // there to be two concurrent renderers at most: React Native (primary) and
805
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
806
- // Secondary renderers store their context values on separate fields.
807
- _currentValue: defaultValue,
808
- _currentValue2: defaultValue,
809
- // Used to track how many concurrent renderers this context currently
810
- // supports within in a single renderer. Such as parallel server rendering.
811
- _threadCount: 0,
812
- // These are circular
813
- Provider: null,
814
- Consumer: null,
815
- // Add these to use same hidden class in VM as ServerContext
816
- _defaultValue: null,
817
- _globalName: null
818
- };
819
- context.Provider = {
820
- $$typeof: REACT_PROVIDER_TYPE,
821
- _context: context
822
- };
823
- var hasWarnedAboutUsingNestedContextConsumers = false;
824
- var hasWarnedAboutUsingConsumerProvider = false;
825
- var hasWarnedAboutDisplayNameOnConsumer = false;
826
- {
827
- var Consumer = {
828
- $$typeof: REACT_CONTEXT_TYPE,
829
- _context: context
830
- };
831
- Object.defineProperties(Consumer, {
832
- Provider: {
833
- get: function() {
834
- if (!hasWarnedAboutUsingConsumerProvider) {
835
- hasWarnedAboutUsingConsumerProvider = true;
836
- error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
837
- }
838
- return context.Provider;
839
- },
840
- set: function(_Provider) {
841
- context.Provider = _Provider;
842
- }
843
- },
844
- _currentValue: {
845
- get: function() {
846
- return context._currentValue;
847
- },
848
- set: function(_currentValue) {
849
- context._currentValue = _currentValue;
850
- }
851
- },
852
- _currentValue2: {
853
- get: function() {
854
- return context._currentValue2;
855
- },
856
- set: function(_currentValue2) {
857
- context._currentValue2 = _currentValue2;
858
- }
859
- },
860
- _threadCount: {
861
- get: function() {
862
- return context._threadCount;
863
- },
864
- set: function(_threadCount) {
865
- context._threadCount = _threadCount;
866
- }
867
- },
868
- Consumer: {
869
- get: function() {
870
- if (!hasWarnedAboutUsingNestedContextConsumers) {
871
- hasWarnedAboutUsingNestedContextConsumers = true;
872
- error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
873
- }
874
- return context.Consumer;
875
- }
876
- },
877
- displayName: {
878
- get: function() {
879
- return context.displayName;
880
- },
881
- set: function(displayName) {
882
- if (!hasWarnedAboutDisplayNameOnConsumer) {
883
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
884
- hasWarnedAboutDisplayNameOnConsumer = true;
885
- }
886
- }
887
- }
888
- });
889
- context.Consumer = Consumer;
890
- }
891
- {
892
- context._currentRenderer = null;
893
- context._currentRenderer2 = null;
894
- }
895
- return context;
896
- }
897
- var Uninitialized = -1;
898
- var Pending = 0;
899
- var Resolved = 1;
900
- var Rejected = 2;
901
- function lazyInitializer(payload) {
902
- if (payload._status === Uninitialized) {
903
- var ctor = payload._result;
904
- var thenable = ctor();
905
- thenable.then(function(moduleObject2) {
906
- if (payload._status === Pending || payload._status === Uninitialized) {
907
- var resolved = payload;
908
- resolved._status = Resolved;
909
- resolved._result = moduleObject2;
910
- }
911
- }, function(error2) {
912
- if (payload._status === Pending || payload._status === Uninitialized) {
913
- var rejected = payload;
914
- rejected._status = Rejected;
915
- rejected._result = error2;
916
- }
917
- });
918
- if (payload._status === Uninitialized) {
919
- var pending = payload;
920
- pending._status = Pending;
921
- pending._result = thenable;
922
- }
923
- }
924
- if (payload._status === Resolved) {
925
- var moduleObject = payload._result;
926
- {
927
- if (moduleObject === void 0) {
928
- error("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?", moduleObject);
929
- }
930
- }
931
- {
932
- if (!("default" in moduleObject)) {
933
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
934
- }
935
- }
936
- return moduleObject.default;
937
- } else {
938
- throw payload._result;
939
- }
940
- }
941
- function lazy(ctor) {
942
- var payload = {
943
- // We use these fields to store the result.
944
- _status: Uninitialized,
945
- _result: ctor
946
- };
947
- var lazyType = {
948
- $$typeof: REACT_LAZY_TYPE,
949
- _payload: payload,
950
- _init: lazyInitializer
951
- };
952
- {
953
- var defaultProps;
954
- var propTypes;
955
- Object.defineProperties(lazyType, {
956
- defaultProps: {
957
- configurable: true,
958
- get: function() {
959
- return defaultProps;
960
- },
961
- set: function(newDefaultProps) {
962
- error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
963
- defaultProps = newDefaultProps;
964
- Object.defineProperty(lazyType, "defaultProps", {
965
- enumerable: true
966
- });
967
- }
968
- },
969
- propTypes: {
970
- configurable: true,
971
- get: function() {
972
- return propTypes;
973
- },
974
- set: function(newPropTypes) {
975
- error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
976
- propTypes = newPropTypes;
977
- Object.defineProperty(lazyType, "propTypes", {
978
- enumerable: true
979
- });
980
- }
981
- }
982
- });
983
- }
984
- return lazyType;
985
- }
986
- function forwardRef2(render) {
987
- {
988
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
989
- error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
990
- } else if (typeof render !== "function") {
991
- error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
992
- } else {
993
- if (render.length !== 0 && render.length !== 2) {
994
- error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
995
- }
996
- }
997
- if (render != null) {
998
- if (render.defaultProps != null || render.propTypes != null) {
999
- error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
1000
- }
1001
- }
1002
- }
1003
- var elementType = {
1004
- $$typeof: REACT_FORWARD_REF_TYPE,
1005
- render
1006
- };
1007
- {
1008
- var ownName;
1009
- Object.defineProperty(elementType, "displayName", {
1010
- enumerable: false,
1011
- configurable: true,
1012
- get: function() {
1013
- return ownName;
1014
- },
1015
- set: function(name) {
1016
- ownName = name;
1017
- if (!render.name && !render.displayName) {
1018
- render.displayName = name;
1019
- }
1020
- }
1021
- });
1022
- }
1023
- return elementType;
1024
- }
1025
- var REACT_MODULE_REFERENCE;
1026
- {
1027
- REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
1028
- }
1029
- function isValidElementType(type) {
1030
- if (typeof type === "string" || typeof type === "function") {
1031
- return true;
1032
- }
1033
- 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) {
1034
- return true;
1035
- }
1036
- if (typeof type === "object" && type !== null) {
1037
- 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
1038
- // types supported by any Flight configuration anywhere since
1039
- // we don't know which Flight build this will end up being used
1040
- // with.
1041
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1042
- return true;
1043
- }
1044
- }
1045
- return false;
1046
- }
1047
- function memo2(type, compare) {
1048
- {
1049
- if (!isValidElementType(type)) {
1050
- error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1051
- }
1052
- }
1053
- var elementType = {
1054
- $$typeof: REACT_MEMO_TYPE,
1055
- type,
1056
- compare: compare === void 0 ? null : compare
1057
- };
1058
- {
1059
- var ownName;
1060
- Object.defineProperty(elementType, "displayName", {
1061
- enumerable: false,
1062
- configurable: true,
1063
- get: function() {
1064
- return ownName;
1065
- },
1066
- set: function(name) {
1067
- ownName = name;
1068
- if (!type.name && !type.displayName) {
1069
- type.displayName = name;
1070
- }
1071
- }
1072
- });
1073
- }
1074
- return elementType;
1075
- }
1076
- function resolveDispatcher() {
1077
- var dispatcher = ReactCurrentDispatcher.current;
1078
- {
1079
- if (dispatcher === null) {
1080
- error("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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1081
- }
1082
- }
1083
- return dispatcher;
1084
- }
1085
- function useContext(Context) {
1086
- var dispatcher = resolveDispatcher();
1087
- {
1088
- if (Context._context !== void 0) {
1089
- var realContext = Context._context;
1090
- if (realContext.Consumer === Context) {
1091
- error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1092
- } else if (realContext.Provider === Context) {
1093
- error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1094
- }
1095
- }
1096
- }
1097
- return dispatcher.useContext(Context);
1098
- }
1099
- function useState9(initialState) {
1100
- var dispatcher = resolveDispatcher();
1101
- return dispatcher.useState(initialState);
1102
- }
1103
- function useReducer(reducer, initialArg, init) {
1104
- var dispatcher = resolveDispatcher();
1105
- return dispatcher.useReducer(reducer, initialArg, init);
1106
- }
1107
- function useRef5(initialValue) {
1108
- var dispatcher = resolveDispatcher();
1109
- return dispatcher.useRef(initialValue);
1110
- }
1111
- function useEffect10(create, deps) {
1112
- var dispatcher = resolveDispatcher();
1113
- return dispatcher.useEffect(create, deps);
1114
- }
1115
- function useInsertionEffect(create, deps) {
1116
- var dispatcher = resolveDispatcher();
1117
- return dispatcher.useInsertionEffect(create, deps);
1118
- }
1119
- function useLayoutEffect(create, deps) {
1120
- var dispatcher = resolveDispatcher();
1121
- return dispatcher.useLayoutEffect(create, deps);
1122
- }
1123
- function useCallback7(callback, deps) {
1124
- var dispatcher = resolveDispatcher();
1125
- return dispatcher.useCallback(callback, deps);
1126
- }
1127
- function useMemo4(create, deps) {
1128
- var dispatcher = resolveDispatcher();
1129
- return dispatcher.useMemo(create, deps);
1130
- }
1131
- function useImperativeHandle2(ref, create, deps) {
1132
- var dispatcher = resolveDispatcher();
1133
- return dispatcher.useImperativeHandle(ref, create, deps);
1134
- }
1135
- function useDebugValue(value, formatterFn) {
1136
- {
1137
- var dispatcher = resolveDispatcher();
1138
- return dispatcher.useDebugValue(value, formatterFn);
1139
- }
1140
- }
1141
- function useTransition() {
1142
- var dispatcher = resolveDispatcher();
1143
- return dispatcher.useTransition();
1144
- }
1145
- function useDeferredValue(value) {
1146
- var dispatcher = resolveDispatcher();
1147
- return dispatcher.useDeferredValue(value);
1148
- }
1149
- function useId() {
1150
- var dispatcher = resolveDispatcher();
1151
- return dispatcher.useId();
1152
- }
1153
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1154
- var dispatcher = resolveDispatcher();
1155
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1156
- }
1157
- var disabledDepth = 0;
1158
- var prevLog;
1159
- var prevInfo;
1160
- var prevWarn;
1161
- var prevError;
1162
- var prevGroup;
1163
- var prevGroupCollapsed;
1164
- var prevGroupEnd;
1165
- function disabledLog() {
1166
- }
1167
- disabledLog.__reactDisabledLog = true;
1168
- function disableLogs() {
1169
- {
1170
- if (disabledDepth === 0) {
1171
- prevLog = console.log;
1172
- prevInfo = console.info;
1173
- prevWarn = console.warn;
1174
- prevError = console.error;
1175
- prevGroup = console.group;
1176
- prevGroupCollapsed = console.groupCollapsed;
1177
- prevGroupEnd = console.groupEnd;
1178
- var props = {
1179
- configurable: true,
1180
- enumerable: true,
1181
- value: disabledLog,
1182
- writable: true
1183
- };
1184
- Object.defineProperties(console, {
1185
- info: props,
1186
- log: props,
1187
- warn: props,
1188
- error: props,
1189
- group: props,
1190
- groupCollapsed: props,
1191
- groupEnd: props
1192
- });
1193
- }
1194
- disabledDepth++;
1195
- }
1196
- }
1197
- function reenableLogs() {
1198
- {
1199
- disabledDepth--;
1200
- if (disabledDepth === 0) {
1201
- var props = {
1202
- configurable: true,
1203
- enumerable: true,
1204
- writable: true
1205
- };
1206
- Object.defineProperties(console, {
1207
- log: assign({}, props, {
1208
- value: prevLog
1209
- }),
1210
- info: assign({}, props, {
1211
- value: prevInfo
1212
- }),
1213
- warn: assign({}, props, {
1214
- value: prevWarn
1215
- }),
1216
- error: assign({}, props, {
1217
- value: prevError
1218
- }),
1219
- group: assign({}, props, {
1220
- value: prevGroup
1221
- }),
1222
- groupCollapsed: assign({}, props, {
1223
- value: prevGroupCollapsed
1224
- }),
1225
- groupEnd: assign({}, props, {
1226
- value: prevGroupEnd
1227
- })
1228
- });
1229
- }
1230
- if (disabledDepth < 0) {
1231
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1232
- }
1233
- }
1234
- }
1235
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1236
- var prefix;
1237
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1238
- {
1239
- if (prefix === void 0) {
1240
- try {
1241
- throw Error();
1242
- } catch (x) {
1243
- var match = x.stack.trim().match(/\n( *(at )?)/);
1244
- prefix = match && match[1] || "";
1245
- }
1246
- }
1247
- return "\n" + prefix + name;
1248
- }
1249
- }
1250
- var reentry = false;
1251
- var componentFrameCache;
1252
- {
1253
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1254
- componentFrameCache = new PossiblyWeakMap();
1255
- }
1256
- function describeNativeComponentFrame(fn, construct) {
1257
- if (!fn || reentry) {
1258
- return "";
1259
- }
1260
- {
1261
- var frame = componentFrameCache.get(fn);
1262
- if (frame !== void 0) {
1263
- return frame;
1264
- }
1265
- }
1266
- var control;
1267
- reentry = true;
1268
- var previousPrepareStackTrace = Error.prepareStackTrace;
1269
- Error.prepareStackTrace = void 0;
1270
- var previousDispatcher;
1271
- {
1272
- previousDispatcher = ReactCurrentDispatcher$1.current;
1273
- ReactCurrentDispatcher$1.current = null;
1274
- disableLogs();
1275
- }
1276
- try {
1277
- if (construct) {
1278
- var Fake = function() {
1279
- throw Error();
1280
- };
1281
- Object.defineProperty(Fake.prototype, "props", {
1282
- set: function() {
1283
- throw Error();
1284
- }
1285
- });
1286
- if (typeof Reflect === "object" && Reflect.construct) {
1287
- try {
1288
- Reflect.construct(Fake, []);
1289
- } catch (x) {
1290
- control = x;
1291
- }
1292
- Reflect.construct(fn, [], Fake);
1293
- } else {
1294
- try {
1295
- Fake.call();
1296
- } catch (x) {
1297
- control = x;
1298
- }
1299
- fn.call(Fake.prototype);
1300
- }
1301
- } else {
1302
- try {
1303
- throw Error();
1304
- } catch (x) {
1305
- control = x;
1306
- }
1307
- fn();
1308
- }
1309
- } catch (sample) {
1310
- if (sample && control && typeof sample.stack === "string") {
1311
- var sampleLines = sample.stack.split("\n");
1312
- var controlLines = control.stack.split("\n");
1313
- var s = sampleLines.length - 1;
1314
- var c = controlLines.length - 1;
1315
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1316
- c--;
1317
- }
1318
- for (; s >= 1 && c >= 0; s--, c--) {
1319
- if (sampleLines[s] !== controlLines[c]) {
1320
- if (s !== 1 || c !== 1) {
1321
- do {
1322
- s--;
1323
- c--;
1324
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1325
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1326
- if (fn.displayName && _frame.includes("<anonymous>")) {
1327
- _frame = _frame.replace("<anonymous>", fn.displayName);
1328
- }
1329
- {
1330
- if (typeof fn === "function") {
1331
- componentFrameCache.set(fn, _frame);
1332
- }
1333
- }
1334
- return _frame;
1335
- }
1336
- } while (s >= 1 && c >= 0);
1337
- }
1338
- break;
1339
- }
1340
- }
1341
- }
1342
- } finally {
1343
- reentry = false;
1344
- {
1345
- ReactCurrentDispatcher$1.current = previousDispatcher;
1346
- reenableLogs();
1347
- }
1348
- Error.prepareStackTrace = previousPrepareStackTrace;
1349
- }
1350
- var name = fn ? fn.displayName || fn.name : "";
1351
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1352
- {
1353
- if (typeof fn === "function") {
1354
- componentFrameCache.set(fn, syntheticFrame);
1355
- }
1356
- }
1357
- return syntheticFrame;
1358
- }
1359
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1360
- {
1361
- return describeNativeComponentFrame(fn, false);
1362
- }
1363
- }
1364
- function shouldConstruct(Component2) {
1365
- var prototype = Component2.prototype;
1366
- return !!(prototype && prototype.isReactComponent);
1367
- }
1368
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1369
- if (type == null) {
1370
- return "";
1371
- }
1372
- if (typeof type === "function") {
1373
- {
1374
- return describeNativeComponentFrame(type, shouldConstruct(type));
1375
- }
1376
- }
1377
- if (typeof type === "string") {
1378
- return describeBuiltInComponentFrame(type);
1379
- }
1380
- switch (type) {
1381
- case REACT_SUSPENSE_TYPE:
1382
- return describeBuiltInComponentFrame("Suspense");
1383
- case REACT_SUSPENSE_LIST_TYPE:
1384
- return describeBuiltInComponentFrame("SuspenseList");
1385
- }
1386
- if (typeof type === "object") {
1387
- switch (type.$$typeof) {
1388
- case REACT_FORWARD_REF_TYPE:
1389
- return describeFunctionComponentFrame(type.render);
1390
- case REACT_MEMO_TYPE:
1391
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1392
- case REACT_LAZY_TYPE: {
1393
- var lazyComponent = type;
1394
- var payload = lazyComponent._payload;
1395
- var init = lazyComponent._init;
1396
- try {
1397
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1398
- } catch (x) {
1399
- }
1400
- }
1401
- }
1402
- }
1403
- return "";
1404
- }
1405
- var loggedTypeFailures = {};
1406
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1407
- function setCurrentlyValidatingElement(element) {
1408
- {
1409
- if (element) {
1410
- var owner = element._owner;
1411
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1412
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1413
- } else {
1414
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1415
- }
1416
- }
1417
- }
1418
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1419
- {
1420
- var has = Function.call.bind(hasOwnProperty);
1421
- for (var typeSpecName in typeSpecs) {
1422
- if (has(typeSpecs, typeSpecName)) {
1423
- var error$1 = void 0;
1424
- try {
1425
- if (typeof typeSpecs[typeSpecName] !== "function") {
1426
- 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`.");
1427
- err.name = "Invariant Violation";
1428
- throw err;
1429
- }
1430
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1431
- } catch (ex) {
1432
- error$1 = ex;
1433
- }
1434
- if (error$1 && !(error$1 instanceof Error)) {
1435
- setCurrentlyValidatingElement(element);
1436
- 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);
1437
- setCurrentlyValidatingElement(null);
1438
- }
1439
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1440
- loggedTypeFailures[error$1.message] = true;
1441
- setCurrentlyValidatingElement(element);
1442
- error("Failed %s type: %s", location, error$1.message);
1443
- setCurrentlyValidatingElement(null);
1444
- }
1445
- }
1446
- }
1447
- }
1448
- }
1449
- function setCurrentlyValidatingElement$1(element) {
1450
- {
1451
- if (element) {
1452
- var owner = element._owner;
1453
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1454
- setExtraStackFrame(stack);
1455
- } else {
1456
- setExtraStackFrame(null);
1457
- }
1458
- }
1459
- }
1460
- var propTypesMisspellWarningShown;
1461
- {
1462
- propTypesMisspellWarningShown = false;
1463
- }
1464
- function getDeclarationErrorAddendum() {
1465
- if (ReactCurrentOwner.current) {
1466
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1467
- if (name) {
1468
- return "\n\nCheck the render method of `" + name + "`.";
1469
- }
1470
- }
1471
- return "";
1472
- }
1473
- function getSourceInfoErrorAddendum(source) {
1474
- if (source !== void 0) {
1475
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1476
- var lineNumber = source.lineNumber;
1477
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1478
- }
1479
- return "";
1480
- }
1481
- function getSourceInfoErrorAddendumForProps(elementProps) {
1482
- if (elementProps !== null && elementProps !== void 0) {
1483
- return getSourceInfoErrorAddendum(elementProps.__source);
1484
- }
1485
- return "";
1486
- }
1487
- var ownerHasKeyUseWarning = {};
1488
- function getCurrentComponentErrorInfo(parentType) {
1489
- var info = getDeclarationErrorAddendum();
1490
- if (!info) {
1491
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1492
- if (parentName) {
1493
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1494
- }
1495
- }
1496
- return info;
1497
- }
1498
- function validateExplicitKey(element, parentType) {
1499
- if (!element._store || element._store.validated || element.key != null) {
1500
- return;
1501
- }
1502
- element._store.validated = true;
1503
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1504
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1505
- return;
1506
- }
1507
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1508
- var childOwner = "";
1509
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1510
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1511
- }
1512
- {
1513
- setCurrentlyValidatingElement$1(element);
1514
- 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);
1515
- setCurrentlyValidatingElement$1(null);
1516
- }
1517
- }
1518
- function validateChildKeys(node, parentType) {
1519
- if (typeof node !== "object") {
1520
- return;
1521
- }
1522
- if (isArray(node)) {
1523
- for (var i = 0; i < node.length; i++) {
1524
- var child = node[i];
1525
- if (isValidElement(child)) {
1526
- validateExplicitKey(child, parentType);
1527
- }
1528
- }
1529
- } else if (isValidElement(node)) {
1530
- if (node._store) {
1531
- node._store.validated = true;
1532
- }
1533
- } else if (node) {
1534
- var iteratorFn = getIteratorFn(node);
1535
- if (typeof iteratorFn === "function") {
1536
- if (iteratorFn !== node.entries) {
1537
- var iterator = iteratorFn.call(node);
1538
- var step;
1539
- while (!(step = iterator.next()).done) {
1540
- if (isValidElement(step.value)) {
1541
- validateExplicitKey(step.value, parentType);
1542
- }
1543
- }
1544
- }
1545
- }
1546
- }
1547
- }
1548
- function validatePropTypes(element) {
1549
- {
1550
- var type = element.type;
1551
- if (type === null || type === void 0 || typeof type === "string") {
1552
- return;
1553
- }
1554
- var propTypes;
1555
- if (typeof type === "function") {
1556
- propTypes = type.propTypes;
1557
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1558
- // Inner props are checked in the reconciler.
1559
- type.$$typeof === REACT_MEMO_TYPE)) {
1560
- propTypes = type.propTypes;
1561
- } else {
1562
- return;
1563
- }
1564
- if (propTypes) {
1565
- var name = getComponentNameFromType(type);
1566
- checkPropTypes(propTypes, element.props, "prop", name, element);
1567
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1568
- propTypesMisspellWarningShown = true;
1569
- var _name = getComponentNameFromType(type);
1570
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1571
- }
1572
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1573
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1574
- }
1575
- }
1576
- }
1577
- function validateFragmentProps(fragment) {
1578
- {
1579
- var keys = Object.keys(fragment.props);
1580
- for (var i = 0; i < keys.length; i++) {
1581
- var key = keys[i];
1582
- if (key !== "children" && key !== "key") {
1583
- setCurrentlyValidatingElement$1(fragment);
1584
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1585
- setCurrentlyValidatingElement$1(null);
1586
- break;
1587
- }
1588
- }
1589
- if (fragment.ref !== null) {
1590
- setCurrentlyValidatingElement$1(fragment);
1591
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1592
- setCurrentlyValidatingElement$1(null);
1593
- }
1594
- }
1595
- }
1596
- function createElementWithValidation(type, props, children) {
1597
- var validType = isValidElementType(type);
1598
- if (!validType) {
1599
- var info = "";
1600
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1601
- 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.";
1602
- }
1603
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1604
- if (sourceInfo) {
1605
- info += sourceInfo;
1606
- } else {
1607
- info += getDeclarationErrorAddendum();
1608
- }
1609
- var typeString;
1610
- if (type === null) {
1611
- typeString = "null";
1612
- } else if (isArray(type)) {
1613
- typeString = "array";
1614
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1615
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1616
- info = " Did you accidentally export a JSX literal instead of a component?";
1617
- } else {
1618
- typeString = typeof type;
1619
- }
1620
- {
1621
- error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1622
- }
1623
- }
1624
- var element = createElement.apply(this, arguments);
1625
- if (element == null) {
1626
- return element;
1627
- }
1628
- if (validType) {
1629
- for (var i = 2; i < arguments.length; i++) {
1630
- validateChildKeys(arguments[i], type);
1631
- }
1632
- }
1633
- if (type === REACT_FRAGMENT_TYPE) {
1634
- validateFragmentProps(element);
1635
- } else {
1636
- validatePropTypes(element);
1637
- }
1638
- return element;
1639
- }
1640
- var didWarnAboutDeprecatedCreateFactory = false;
1641
- function createFactoryWithValidation(type) {
1642
- var validatedFactory = createElementWithValidation.bind(null, type);
1643
- validatedFactory.type = type;
1644
- {
1645
- if (!didWarnAboutDeprecatedCreateFactory) {
1646
- didWarnAboutDeprecatedCreateFactory = true;
1647
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1648
- }
1649
- Object.defineProperty(validatedFactory, "type", {
1650
- enumerable: false,
1651
- get: function() {
1652
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1653
- Object.defineProperty(this, "type", {
1654
- value: type
1655
- });
1656
- return type;
1657
- }
1658
- });
1659
- }
1660
- return validatedFactory;
1661
- }
1662
- function cloneElementWithValidation(element, props, children) {
1663
- var newElement = cloneElement.apply(this, arguments);
1664
- for (var i = 2; i < arguments.length; i++) {
1665
- validateChildKeys(arguments[i], newElement.type);
1666
- }
1667
- validatePropTypes(newElement);
1668
- return newElement;
1669
- }
1670
- function startTransition(scope, options) {
1671
- var prevTransition = ReactCurrentBatchConfig.transition;
1672
- ReactCurrentBatchConfig.transition = {};
1673
- var currentTransition = ReactCurrentBatchConfig.transition;
1674
- {
1675
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1676
- }
1677
- try {
1678
- scope();
1679
- } finally {
1680
- ReactCurrentBatchConfig.transition = prevTransition;
1681
- {
1682
- if (prevTransition === null && currentTransition._updatedFibers) {
1683
- var updatedFibersCount = currentTransition._updatedFibers.size;
1684
- if (updatedFibersCount > 10) {
1685
- warn("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.");
1686
- }
1687
- currentTransition._updatedFibers.clear();
1688
- }
1689
- }
1690
- }
1691
- }
1692
- var didWarnAboutMessageChannel = false;
1693
- var enqueueTaskImpl = null;
1694
- function enqueueTask(task) {
1695
- if (enqueueTaskImpl === null) {
1696
- try {
1697
- var requireString = ("require" + Math.random()).slice(0, 7);
1698
- var nodeRequire = module2 && module2[requireString];
1699
- enqueueTaskImpl = nodeRequire.call(module2, "timers").setImmediate;
1700
- } catch (_err) {
1701
- enqueueTaskImpl = function(callback) {
1702
- {
1703
- if (didWarnAboutMessageChannel === false) {
1704
- didWarnAboutMessageChannel = true;
1705
- if (typeof MessageChannel === "undefined") {
1706
- error("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.");
1707
- }
1708
- }
1709
- }
1710
- var channel = new MessageChannel();
1711
- channel.port1.onmessage = callback;
1712
- channel.port2.postMessage(void 0);
1713
- };
1714
- }
1715
- }
1716
- return enqueueTaskImpl(task);
1717
- }
1718
- var actScopeDepth = 0;
1719
- var didWarnNoAwaitAct = false;
1720
- function act(callback) {
1721
- {
1722
- var prevActScopeDepth = actScopeDepth;
1723
- actScopeDepth++;
1724
- if (ReactCurrentActQueue.current === null) {
1725
- ReactCurrentActQueue.current = [];
1726
- }
1727
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1728
- var result;
1729
- try {
1730
- ReactCurrentActQueue.isBatchingLegacy = true;
1731
- result = callback();
1732
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1733
- var queue = ReactCurrentActQueue.current;
1734
- if (queue !== null) {
1735
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1736
- flushActQueue(queue);
1737
- }
1738
- }
1739
- } catch (error2) {
1740
- popActScope(prevActScopeDepth);
1741
- throw error2;
1742
- } finally {
1743
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1744
- }
1745
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
1746
- var thenableResult = result;
1747
- var wasAwaited = false;
1748
- var thenable = {
1749
- then: function(resolve, reject) {
1750
- wasAwaited = true;
1751
- thenableResult.then(function(returnValue2) {
1752
- popActScope(prevActScopeDepth);
1753
- if (actScopeDepth === 0) {
1754
- recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
1755
- } else {
1756
- resolve(returnValue2);
1757
- }
1758
- }, function(error2) {
1759
- popActScope(prevActScopeDepth);
1760
- reject(error2);
1761
- });
1762
- }
1763
- };
1764
- {
1765
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
1766
- Promise.resolve().then(function() {
1767
- }).then(function() {
1768
- if (!wasAwaited) {
1769
- didWarnNoAwaitAct = true;
1770
- error("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 () => ...);");
1771
- }
1772
- });
1773
- }
1774
- }
1775
- return thenable;
1776
- } else {
1777
- var returnValue = result;
1778
- popActScope(prevActScopeDepth);
1779
- if (actScopeDepth === 0) {
1780
- var _queue = ReactCurrentActQueue.current;
1781
- if (_queue !== null) {
1782
- flushActQueue(_queue);
1783
- ReactCurrentActQueue.current = null;
1784
- }
1785
- var _thenable = {
1786
- then: function(resolve, reject) {
1787
- if (ReactCurrentActQueue.current === null) {
1788
- ReactCurrentActQueue.current = [];
1789
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1790
- } else {
1791
- resolve(returnValue);
1792
- }
1793
- }
1794
- };
1795
- return _thenable;
1796
- } else {
1797
- var _thenable2 = {
1798
- then: function(resolve, reject) {
1799
- resolve(returnValue);
1800
- }
1801
- };
1802
- return _thenable2;
1803
- }
1804
- }
1805
- }
1806
- }
1807
- function popActScope(prevActScopeDepth) {
1808
- {
1809
- if (prevActScopeDepth !== actScopeDepth - 1) {
1810
- error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1811
- }
1812
- actScopeDepth = prevActScopeDepth;
1813
- }
1814
- }
1815
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1816
- {
1817
- var queue = ReactCurrentActQueue.current;
1818
- if (queue !== null) {
1819
- try {
1820
- flushActQueue(queue);
1821
- enqueueTask(function() {
1822
- if (queue.length === 0) {
1823
- ReactCurrentActQueue.current = null;
1824
- resolve(returnValue);
1825
- } else {
1826
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1827
- }
1828
- });
1829
- } catch (error2) {
1830
- reject(error2);
1831
- }
1832
- } else {
1833
- resolve(returnValue);
1834
- }
1835
- }
1836
- }
1837
- var isFlushing = false;
1838
- function flushActQueue(queue) {
1839
- {
1840
- if (!isFlushing) {
1841
- isFlushing = true;
1842
- var i = 0;
1843
- try {
1844
- for (; i < queue.length; i++) {
1845
- var callback = queue[i];
1846
- do {
1847
- callback = callback(true);
1848
- } while (callback !== null);
1849
- }
1850
- queue.length = 0;
1851
- } catch (error2) {
1852
- queue = queue.slice(i + 1);
1853
- throw error2;
1854
- } finally {
1855
- isFlushing = false;
1856
- }
1857
- }
1858
- }
1859
- }
1860
- var createElement$1 = createElementWithValidation;
1861
- var cloneElement$1 = cloneElementWithValidation;
1862
- var createFactory = createFactoryWithValidation;
1863
- var Children = {
1864
- map: mapChildren,
1865
- forEach: forEachChildren,
1866
- count: countChildren,
1867
- toArray,
1868
- only: onlyChild
1869
- };
1870
- exports2.Children = Children;
1871
- exports2.Component = Component;
1872
- exports2.Fragment = REACT_FRAGMENT_TYPE;
1873
- exports2.Profiler = REACT_PROFILER_TYPE;
1874
- exports2.PureComponent = PureComponent;
1875
- exports2.StrictMode = REACT_STRICT_MODE_TYPE;
1876
- exports2.Suspense = REACT_SUSPENSE_TYPE;
1877
- exports2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1878
- exports2.act = act;
1879
- exports2.cloneElement = cloneElement$1;
1880
- exports2.createContext = createContext;
1881
- exports2.createElement = createElement$1;
1882
- exports2.createFactory = createFactory;
1883
- exports2.createRef = createRef;
1884
- exports2.forwardRef = forwardRef2;
1885
- exports2.isValidElement = isValidElement;
1886
- exports2.lazy = lazy;
1887
- exports2.memo = memo2;
1888
- exports2.startTransition = startTransition;
1889
- exports2.unstable_act = act;
1890
- exports2.useCallback = useCallback7;
1891
- exports2.useContext = useContext;
1892
- exports2.useDebugValue = useDebugValue;
1893
- exports2.useDeferredValue = useDeferredValue;
1894
- exports2.useEffect = useEffect10;
1895
- exports2.useId = useId;
1896
- exports2.useImperativeHandle = useImperativeHandle2;
1897
- exports2.useInsertionEffect = useInsertionEffect;
1898
- exports2.useLayoutEffect = useLayoutEffect;
1899
- exports2.useMemo = useMemo4;
1900
- exports2.useReducer = useReducer;
1901
- exports2.useRef = useRef5;
1902
- exports2.useState = useState9;
1903
- exports2.useSyncExternalStore = useSyncExternalStore;
1904
- exports2.useTransition = useTransition;
1905
- exports2.version = ReactVersion;
1906
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
1907
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1908
- }
1909
- })();
1910
- }
1911
- }
1912
- });
1913
-
1914
- // node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
1915
- var require_react = __commonJS({
1916
- "node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports2, module2) {
1917
- "use strict";
1918
- if (false) {
1919
- module2.exports = null;
1920
- } else {
1921
- module2.exports = require_react_development();
1922
- }
1923
- }
1924
- });
1925
-
1926
- // node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
1927
- var require_react_jsx_runtime_development = __commonJS({
1928
- "node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports2) {
1929
- "use strict";
1930
- if (true) {
1931
- (function() {
1932
- "use strict";
1933
- var React3 = require_react();
1934
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
1935
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
1936
- var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
1937
- var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
1938
- var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
1939
- var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
1940
- var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
1941
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
1942
- var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
1943
- var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
1944
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
1945
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
1946
- var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
1947
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1948
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
1949
- function getIteratorFn(maybeIterable) {
1950
- if (maybeIterable === null || typeof maybeIterable !== "object") {
1951
- return null;
1952
- }
1953
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1954
- if (typeof maybeIterator === "function") {
1955
- return maybeIterator;
1956
- }
1957
- return null;
1958
- }
1959
- var ReactSharedInternals = React3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1960
- function error(format) {
1961
- {
1962
- {
1963
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1964
- args[_key2 - 1] = arguments[_key2];
1965
- }
1966
- printWarning("error", format, args);
1967
- }
1968
- }
1969
- }
1970
- function printWarning(level, format, args) {
1971
- {
1972
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
1973
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
1974
- if (stack !== "") {
1975
- format += "%s";
1976
- args = args.concat([stack]);
1977
- }
1978
- var argsWithFormat = args.map(function(item) {
1979
- return String(item);
1980
- });
1981
- argsWithFormat.unshift("Warning: " + format);
1982
- Function.prototype.apply.call(console[level], console, argsWithFormat);
1983
- }
1984
- }
1985
- var enableScopeAPI = false;
1986
- var enableCacheElement = false;
1987
- var enableTransitionTracing = false;
1988
- var enableLegacyHidden = false;
1989
- var enableDebugTracing = false;
1990
- var REACT_MODULE_REFERENCE;
1991
- {
1992
- REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
1993
- }
1994
- function isValidElementType(type) {
1995
- if (typeof type === "string" || typeof type === "function") {
1996
- return true;
1997
- }
1998
- 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) {
1999
- return true;
2000
- }
2001
- if (typeof type === "object" && type !== null) {
2002
- 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
2003
- // types supported by any Flight configuration anywhere since
2004
- // we don't know which Flight build this will end up being used
2005
- // with.
2006
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
2007
- return true;
2008
- }
2009
- }
2010
- return false;
2011
- }
2012
- function getWrappedName(outerType, innerType, wrapperName) {
2013
- var displayName = outerType.displayName;
2014
- if (displayName) {
2015
- return displayName;
2016
- }
2017
- var functionName = innerType.displayName || innerType.name || "";
2018
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
2019
- }
2020
- function getContextName(type) {
2021
- return type.displayName || "Context";
2022
- }
2023
- function getComponentNameFromType(type) {
2024
- if (type == null) {
2025
- return null;
2026
- }
2027
- {
2028
- if (typeof type.tag === "number") {
2029
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2030
- }
2031
- }
2032
- if (typeof type === "function") {
2033
- return type.displayName || type.name || null;
2034
- }
2035
- if (typeof type === "string") {
2036
- return type;
2037
- }
2038
- switch (type) {
2039
- case REACT_FRAGMENT_TYPE:
2040
- return "Fragment";
2041
- case REACT_PORTAL_TYPE:
2042
- return "Portal";
2043
- case REACT_PROFILER_TYPE:
2044
- return "Profiler";
2045
- case REACT_STRICT_MODE_TYPE:
2046
- return "StrictMode";
2047
- case REACT_SUSPENSE_TYPE:
2048
- return "Suspense";
2049
- case REACT_SUSPENSE_LIST_TYPE:
2050
- return "SuspenseList";
2051
- }
2052
- if (typeof type === "object") {
2053
- switch (type.$$typeof) {
2054
- case REACT_CONTEXT_TYPE:
2055
- var context = type;
2056
- return getContextName(context) + ".Consumer";
2057
- case REACT_PROVIDER_TYPE:
2058
- var provider = type;
2059
- return getContextName(provider._context) + ".Provider";
2060
- case REACT_FORWARD_REF_TYPE:
2061
- return getWrappedName(type, type.render, "ForwardRef");
2062
- case REACT_MEMO_TYPE:
2063
- var outerName = type.displayName || null;
2064
- if (outerName !== null) {
2065
- return outerName;
2066
- }
2067
- return getComponentNameFromType(type.type) || "Memo";
2068
- case REACT_LAZY_TYPE: {
2069
- var lazyComponent = type;
2070
- var payload = lazyComponent._payload;
2071
- var init = lazyComponent._init;
2072
- try {
2073
- return getComponentNameFromType(init(payload));
2074
- } catch (x) {
2075
- return null;
2076
- }
2077
- }
2078
- }
2079
- }
2080
- return null;
2081
- }
2082
- var assign = Object.assign;
2083
- var disabledDepth = 0;
2084
- var prevLog;
2085
- var prevInfo;
2086
- var prevWarn;
2087
- var prevError;
2088
- var prevGroup;
2089
- var prevGroupCollapsed;
2090
- var prevGroupEnd;
2091
- function disabledLog() {
2092
- }
2093
- disabledLog.__reactDisabledLog = true;
2094
- function disableLogs() {
2095
- {
2096
- if (disabledDepth === 0) {
2097
- prevLog = console.log;
2098
- prevInfo = console.info;
2099
- prevWarn = console.warn;
2100
- prevError = console.error;
2101
- prevGroup = console.group;
2102
- prevGroupCollapsed = console.groupCollapsed;
2103
- prevGroupEnd = console.groupEnd;
2104
- var props = {
2105
- configurable: true,
2106
- enumerable: true,
2107
- value: disabledLog,
2108
- writable: true
2109
- };
2110
- Object.defineProperties(console, {
2111
- info: props,
2112
- log: props,
2113
- warn: props,
2114
- error: props,
2115
- group: props,
2116
- groupCollapsed: props,
2117
- groupEnd: props
2118
- });
2119
- }
2120
- disabledDepth++;
2121
- }
2122
- }
2123
- function reenableLogs() {
2124
- {
2125
- disabledDepth--;
2126
- if (disabledDepth === 0) {
2127
- var props = {
2128
- configurable: true,
2129
- enumerable: true,
2130
- writable: true
2131
- };
2132
- Object.defineProperties(console, {
2133
- log: assign({}, props, {
2134
- value: prevLog
2135
- }),
2136
- info: assign({}, props, {
2137
- value: prevInfo
2138
- }),
2139
- warn: assign({}, props, {
2140
- value: prevWarn
2141
- }),
2142
- error: assign({}, props, {
2143
- value: prevError
2144
- }),
2145
- group: assign({}, props, {
2146
- value: prevGroup
2147
- }),
2148
- groupCollapsed: assign({}, props, {
2149
- value: prevGroupCollapsed
2150
- }),
2151
- groupEnd: assign({}, props, {
2152
- value: prevGroupEnd
2153
- })
2154
- });
2155
- }
2156
- if (disabledDepth < 0) {
2157
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2158
- }
2159
- }
2160
- }
2161
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2162
- var prefix;
2163
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2164
- {
2165
- if (prefix === void 0) {
2166
- try {
2167
- throw Error();
2168
- } catch (x) {
2169
- var match = x.stack.trim().match(/\n( *(at )?)/);
2170
- prefix = match && match[1] || "";
2171
- }
2172
- }
2173
- return "\n" + prefix + name;
2174
- }
2175
- }
2176
- var reentry = false;
2177
- var componentFrameCache;
2178
- {
2179
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
2180
- componentFrameCache = new PossiblyWeakMap();
2181
- }
2182
- function describeNativeComponentFrame(fn, construct) {
2183
- if (!fn || reentry) {
2184
- return "";
2185
- }
2186
- {
2187
- var frame = componentFrameCache.get(fn);
2188
- if (frame !== void 0) {
2189
- return frame;
2190
- }
2191
- }
2192
- var control;
2193
- reentry = true;
2194
- var previousPrepareStackTrace = Error.prepareStackTrace;
2195
- Error.prepareStackTrace = void 0;
2196
- var previousDispatcher;
2197
- {
2198
- previousDispatcher = ReactCurrentDispatcher.current;
2199
- ReactCurrentDispatcher.current = null;
2200
- disableLogs();
2201
- }
2202
- try {
2203
- if (construct) {
2204
- var Fake = function() {
2205
- throw Error();
2206
- };
2207
- Object.defineProperty(Fake.prototype, "props", {
2208
- set: function() {
2209
- throw Error();
2210
- }
2211
- });
2212
- if (typeof Reflect === "object" && Reflect.construct) {
2213
- try {
2214
- Reflect.construct(Fake, []);
2215
- } catch (x) {
2216
- control = x;
2217
- }
2218
- Reflect.construct(fn, [], Fake);
2219
- } else {
2220
- try {
2221
- Fake.call();
2222
- } catch (x) {
2223
- control = x;
2224
- }
2225
- fn.call(Fake.prototype);
2226
- }
2227
- } else {
2228
- try {
2229
- throw Error();
2230
- } catch (x) {
2231
- control = x;
2232
- }
2233
- fn();
2234
- }
2235
- } catch (sample) {
2236
- if (sample && control && typeof sample.stack === "string") {
2237
- var sampleLines = sample.stack.split("\n");
2238
- var controlLines = control.stack.split("\n");
2239
- var s = sampleLines.length - 1;
2240
- var c = controlLines.length - 1;
2241
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2242
- c--;
2243
- }
2244
- for (; s >= 1 && c >= 0; s--, c--) {
2245
- if (sampleLines[s] !== controlLines[c]) {
2246
- if (s !== 1 || c !== 1) {
2247
- do {
2248
- s--;
2249
- c--;
2250
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2251
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2252
- if (fn.displayName && _frame.includes("<anonymous>")) {
2253
- _frame = _frame.replace("<anonymous>", fn.displayName);
2254
- }
2255
- {
2256
- if (typeof fn === "function") {
2257
- componentFrameCache.set(fn, _frame);
2258
- }
2259
- }
2260
- return _frame;
2261
- }
2262
- } while (s >= 1 && c >= 0);
2263
- }
2264
- break;
2265
- }
2266
- }
2267
- }
2268
- } finally {
2269
- reentry = false;
2270
- {
2271
- ReactCurrentDispatcher.current = previousDispatcher;
2272
- reenableLogs();
2273
- }
2274
- Error.prepareStackTrace = previousPrepareStackTrace;
2275
- }
2276
- var name = fn ? fn.displayName || fn.name : "";
2277
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2278
- {
2279
- if (typeof fn === "function") {
2280
- componentFrameCache.set(fn, syntheticFrame);
2281
- }
2282
- }
2283
- return syntheticFrame;
2284
- }
2285
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2286
- {
2287
- return describeNativeComponentFrame(fn, false);
2288
- }
2289
- }
2290
- function shouldConstruct(Component) {
2291
- var prototype = Component.prototype;
2292
- return !!(prototype && prototype.isReactComponent);
2293
- }
2294
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2295
- if (type == null) {
2296
- return "";
2297
- }
2298
- if (typeof type === "function") {
2299
- {
2300
- return describeNativeComponentFrame(type, shouldConstruct(type));
2301
- }
2302
- }
2303
- if (typeof type === "string") {
2304
- return describeBuiltInComponentFrame(type);
2305
- }
2306
- switch (type) {
2307
- case REACT_SUSPENSE_TYPE:
2308
- return describeBuiltInComponentFrame("Suspense");
2309
- case REACT_SUSPENSE_LIST_TYPE:
2310
- return describeBuiltInComponentFrame("SuspenseList");
2311
- }
2312
- if (typeof type === "object") {
2313
- switch (type.$$typeof) {
2314
- case REACT_FORWARD_REF_TYPE:
2315
- return describeFunctionComponentFrame(type.render);
2316
- case REACT_MEMO_TYPE:
2317
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2318
- case REACT_LAZY_TYPE: {
2319
- var lazyComponent = type;
2320
- var payload = lazyComponent._payload;
2321
- var init = lazyComponent._init;
2322
- try {
2323
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2324
- } catch (x) {
2325
- }
2326
- }
2327
- }
2328
- }
2329
- return "";
2330
- }
2331
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2332
- var loggedTypeFailures = {};
2333
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2334
- function setCurrentlyValidatingElement(element) {
2335
- {
2336
- if (element) {
2337
- var owner = element._owner;
2338
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2339
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2340
- } else {
2341
- ReactDebugCurrentFrame.setExtraStackFrame(null);
2342
- }
2343
- }
2344
- }
2345
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2346
- {
2347
- var has = Function.call.bind(hasOwnProperty);
2348
- for (var typeSpecName in typeSpecs) {
2349
- if (has(typeSpecs, typeSpecName)) {
2350
- var error$1 = void 0;
2351
- try {
2352
- if (typeof typeSpecs[typeSpecName] !== "function") {
2353
- 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`.");
2354
- err.name = "Invariant Violation";
2355
- throw err;
2356
- }
2357
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2358
- } catch (ex) {
2359
- error$1 = ex;
2360
- }
2361
- if (error$1 && !(error$1 instanceof Error)) {
2362
- setCurrentlyValidatingElement(element);
2363
- 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);
2364
- setCurrentlyValidatingElement(null);
2365
- }
2366
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2367
- loggedTypeFailures[error$1.message] = true;
2368
- setCurrentlyValidatingElement(element);
2369
- error("Failed %s type: %s", location, error$1.message);
2370
- setCurrentlyValidatingElement(null);
2371
- }
2372
- }
2373
- }
2374
- }
2375
- }
2376
- var isArrayImpl = Array.isArray;
2377
- function isArray(a) {
2378
- return isArrayImpl(a);
2379
- }
2380
- function typeName(value) {
2381
- {
2382
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
2383
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2384
- return type;
2385
- }
2386
- }
2387
- function willCoercionThrow(value) {
2388
- {
2389
- try {
2390
- testStringCoercion(value);
2391
- return false;
2392
- } catch (e) {
2393
- return true;
2394
- }
2395
- }
2396
- }
2397
- function testStringCoercion(value) {
2398
- return "" + value;
2399
- }
2400
- function checkKeyStringCoercion(value) {
2401
- {
2402
- if (willCoercionThrow(value)) {
2403
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2404
- return testStringCoercion(value);
2405
- }
2406
- }
2407
- }
2408
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2409
- var RESERVED_PROPS = {
2410
- key: true,
2411
- ref: true,
2412
- __self: true,
2413
- __source: true
2414
- };
2415
- var specialPropKeyWarningShown;
2416
- var specialPropRefWarningShown;
2417
- var didWarnAboutStringRefs;
2418
- {
2419
- didWarnAboutStringRefs = {};
2420
- }
2421
- function hasValidRef(config) {
2422
- {
2423
- if (hasOwnProperty.call(config, "ref")) {
2424
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2425
- if (getter && getter.isReactWarning) {
2426
- return false;
2427
- }
2428
- }
2429
- }
2430
- return config.ref !== void 0;
2431
- }
2432
- function hasValidKey(config) {
2433
- {
2434
- if (hasOwnProperty.call(config, "key")) {
2435
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2436
- if (getter && getter.isReactWarning) {
2437
- return false;
2438
- }
2439
- }
2440
- }
2441
- return config.key !== void 0;
2442
- }
2443
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2444
- {
2445
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2446
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2447
- if (!didWarnAboutStringRefs[componentName]) {
2448
- error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2449
- didWarnAboutStringRefs[componentName] = true;
2450
- }
2451
- }
2452
- }
2453
- }
2454
- function defineKeyPropWarningGetter(props, displayName) {
2455
- {
2456
- var warnAboutAccessingKey = function() {
2457
- if (!specialPropKeyWarningShown) {
2458
- specialPropKeyWarningShown = true;
2459
- 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);
2460
- }
2461
- };
2462
- warnAboutAccessingKey.isReactWarning = true;
2463
- Object.defineProperty(props, "key", {
2464
- get: warnAboutAccessingKey,
2465
- configurable: true
2466
- });
2467
- }
2468
- }
2469
- function defineRefPropWarningGetter(props, displayName) {
2470
- {
2471
- var warnAboutAccessingRef = function() {
2472
- if (!specialPropRefWarningShown) {
2473
- specialPropRefWarningShown = true;
2474
- 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);
2475
- }
2476
- };
2477
- warnAboutAccessingRef.isReactWarning = true;
2478
- Object.defineProperty(props, "ref", {
2479
- get: warnAboutAccessingRef,
2480
- configurable: true
2481
- });
2482
- }
2483
- }
2484
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2485
- var element = {
2486
- // This tag allows us to uniquely identify this as a React Element
2487
- $$typeof: REACT_ELEMENT_TYPE,
2488
- // Built-in properties that belong on the element
2489
- type,
2490
- key,
2491
- ref,
2492
- props,
2493
- // Record the component responsible for creating this element.
2494
- _owner: owner
2495
- };
2496
- {
2497
- element._store = {};
2498
- Object.defineProperty(element._store, "validated", {
2499
- configurable: false,
2500
- enumerable: false,
2501
- writable: true,
2502
- value: false
2503
- });
2504
- Object.defineProperty(element, "_self", {
2505
- configurable: false,
2506
- enumerable: false,
2507
- writable: false,
2508
- value: self
2509
- });
2510
- Object.defineProperty(element, "_source", {
2511
- configurable: false,
2512
- enumerable: false,
2513
- writable: false,
2514
- value: source
2515
- });
2516
- if (Object.freeze) {
2517
- Object.freeze(element.props);
2518
- Object.freeze(element);
2519
- }
2520
- }
2521
- return element;
2522
- };
2523
- function jsxDEV(type, config, maybeKey, source, self) {
2524
- {
2525
- var propName;
2526
- var props = {};
2527
- var key = null;
2528
- var ref = null;
2529
- if (maybeKey !== void 0) {
2530
- {
2531
- checkKeyStringCoercion(maybeKey);
2532
- }
2533
- key = "" + maybeKey;
2534
- }
2535
- if (hasValidKey(config)) {
2536
- {
2537
- checkKeyStringCoercion(config.key);
2538
- }
2539
- key = "" + config.key;
2540
- }
2541
- if (hasValidRef(config)) {
2542
- ref = config.ref;
2543
- warnIfStringRefCannotBeAutoConverted(config, self);
2544
- }
2545
- for (propName in config) {
2546
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2547
- props[propName] = config[propName];
2548
- }
2549
- }
2550
- if (type && type.defaultProps) {
2551
- var defaultProps = type.defaultProps;
2552
- for (propName in defaultProps) {
2553
- if (props[propName] === void 0) {
2554
- props[propName] = defaultProps[propName];
2555
- }
2556
- }
2557
- }
2558
- if (key || ref) {
2559
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2560
- if (key) {
2561
- defineKeyPropWarningGetter(props, displayName);
2562
- }
2563
- if (ref) {
2564
- defineRefPropWarningGetter(props, displayName);
2565
- }
2566
- }
2567
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2568
- }
2569
- }
2570
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2571
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2572
- function setCurrentlyValidatingElement$1(element) {
2573
- {
2574
- if (element) {
2575
- var owner = element._owner;
2576
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2577
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2578
- } else {
2579
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2580
- }
2581
- }
2582
- }
2583
- var propTypesMisspellWarningShown;
2584
- {
2585
- propTypesMisspellWarningShown = false;
2586
- }
2587
- function isValidElement(object) {
2588
- {
2589
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2590
- }
2591
- }
2592
- function getDeclarationErrorAddendum() {
2593
- {
2594
- if (ReactCurrentOwner$1.current) {
2595
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2596
- if (name) {
2597
- return "\n\nCheck the render method of `" + name + "`.";
2598
- }
2599
- }
2600
- return "";
2601
- }
2602
- }
2603
- function getSourceInfoErrorAddendum(source) {
2604
- {
2605
- if (source !== void 0) {
2606
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2607
- var lineNumber = source.lineNumber;
2608
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2609
- }
2610
- return "";
2611
- }
2612
- }
2613
- var ownerHasKeyUseWarning = {};
2614
- function getCurrentComponentErrorInfo(parentType) {
2615
- {
2616
- var info = getDeclarationErrorAddendum();
2617
- if (!info) {
2618
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2619
- if (parentName) {
2620
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2621
- }
2622
- }
2623
- return info;
2624
- }
2625
- }
2626
- function validateExplicitKey(element, parentType) {
2627
- {
2628
- if (!element._store || element._store.validated || element.key != null) {
2629
- return;
2630
- }
2631
- element._store.validated = true;
2632
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2633
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2634
- return;
2635
- }
2636
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2637
- var childOwner = "";
2638
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
2639
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2640
- }
2641
- setCurrentlyValidatingElement$1(element);
2642
- 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);
2643
- setCurrentlyValidatingElement$1(null);
2644
- }
2645
- }
2646
- function validateChildKeys(node, parentType) {
2647
- {
2648
- if (typeof node !== "object") {
2649
- return;
2650
- }
2651
- if (isArray(node)) {
2652
- for (var i = 0; i < node.length; i++) {
2653
- var child = node[i];
2654
- if (isValidElement(child)) {
2655
- validateExplicitKey(child, parentType);
2656
- }
2657
- }
2658
- } else if (isValidElement(node)) {
2659
- if (node._store) {
2660
- node._store.validated = true;
2661
- }
2662
- } else if (node) {
2663
- var iteratorFn = getIteratorFn(node);
2664
- if (typeof iteratorFn === "function") {
2665
- if (iteratorFn !== node.entries) {
2666
- var iterator = iteratorFn.call(node);
2667
- var step;
2668
- while (!(step = iterator.next()).done) {
2669
- if (isValidElement(step.value)) {
2670
- validateExplicitKey(step.value, parentType);
2671
- }
2672
- }
2673
- }
2674
- }
2675
- }
2676
- }
2677
- }
2678
- function validatePropTypes(element) {
2679
- {
2680
- var type = element.type;
2681
- if (type === null || type === void 0 || typeof type === "string") {
2682
- return;
2683
- }
2684
- var propTypes;
2685
- if (typeof type === "function") {
2686
- propTypes = type.propTypes;
2687
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2688
- // Inner props are checked in the reconciler.
2689
- type.$$typeof === REACT_MEMO_TYPE)) {
2690
- propTypes = type.propTypes;
2691
- } else {
2692
- return;
2693
- }
2694
- if (propTypes) {
2695
- var name = getComponentNameFromType(type);
2696
- checkPropTypes(propTypes, element.props, "prop", name, element);
2697
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2698
- propTypesMisspellWarningShown = true;
2699
- var _name = getComponentNameFromType(type);
2700
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
2701
- }
2702
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
2703
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2704
- }
2705
- }
2706
- }
2707
- function validateFragmentProps(fragment) {
2708
- {
2709
- var keys = Object.keys(fragment.props);
2710
- for (var i = 0; i < keys.length; i++) {
2711
- var key = keys[i];
2712
- if (key !== "children" && key !== "key") {
2713
- setCurrentlyValidatingElement$1(fragment);
2714
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2715
- setCurrentlyValidatingElement$1(null);
2716
- break;
2717
- }
2718
- }
2719
- if (fragment.ref !== null) {
2720
- setCurrentlyValidatingElement$1(fragment);
2721
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
2722
- setCurrentlyValidatingElement$1(null);
2723
- }
2724
- }
2725
- }
2726
- var didWarnAboutKeySpread = {};
2727
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2728
- {
2729
- var validType = isValidElementType(type);
2730
- if (!validType) {
2731
- var info = "";
2732
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
2733
- 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.";
2734
- }
2735
- var sourceInfo = getSourceInfoErrorAddendum(source);
2736
- if (sourceInfo) {
2737
- info += sourceInfo;
2738
- } else {
2739
- info += getDeclarationErrorAddendum();
2740
- }
2741
- var typeString;
2742
- if (type === null) {
2743
- typeString = "null";
2744
- } else if (isArray(type)) {
2745
- typeString = "array";
2746
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
2747
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
2748
- info = " Did you accidentally export a JSX literal instead of a component?";
2749
- } else {
2750
- typeString = typeof type;
2751
- }
2752
- 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);
2753
- }
2754
- var element = jsxDEV(type, props, key, source, self);
2755
- if (element == null) {
2756
- return element;
2757
- }
2758
- if (validType) {
2759
- var children = props.children;
2760
- if (children !== void 0) {
2761
- if (isStaticChildren) {
2762
- if (isArray(children)) {
2763
- for (var i = 0; i < children.length; i++) {
2764
- validateChildKeys(children[i], type);
2765
- }
2766
- if (Object.freeze) {
2767
- Object.freeze(children);
2768
- }
2769
- } else {
2770
- 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.");
2771
- }
2772
- } else {
2773
- validateChildKeys(children, type);
2774
- }
2775
- }
2776
- }
2777
- {
2778
- if (hasOwnProperty.call(props, "key")) {
2779
- var componentName = getComponentNameFromType(type);
2780
- var keys = Object.keys(props).filter(function(k) {
2781
- return k !== "key";
2782
- });
2783
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
2784
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
2785
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
2786
- error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
2787
- didWarnAboutKeySpread[componentName + beforeExample] = true;
2788
- }
2789
- }
2790
- }
2791
- if (type === REACT_FRAGMENT_TYPE) {
2792
- validateFragmentProps(element);
2793
- } else {
2794
- validatePropTypes(element);
2795
- }
2796
- return element;
2797
- }
2798
- }
2799
- function jsxWithValidationStatic(type, props, key) {
2800
- {
2801
- return jsxWithValidation(type, props, key, true);
2802
- }
2803
- }
2804
- function jsxWithValidationDynamic(type, props, key) {
2805
- {
2806
- return jsxWithValidation(type, props, key, false);
2807
- }
2808
- }
2809
- var jsx15 = jsxWithValidationDynamic;
2810
- var jsxs11 = jsxWithValidationStatic;
2811
- exports2.Fragment = REACT_FRAGMENT_TYPE;
2812
- exports2.jsx = jsx15;
2813
- exports2.jsxs = jsxs11;
2814
- })();
2815
- }
2816
- }
2817
- });
2818
-
2819
- // node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
2820
- var require_jsx_runtime = __commonJS({
2821
- "node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports2, module2) {
2822
- "use strict";
2823
- if (false) {
2824
- module2.exports = null;
2825
- } else {
2826
- module2.exports = require_react_jsx_runtime_development();
2827
- }
2828
- }
2829
- });
2830
-
2831
40
  // (disabled):fs
2832
41
  var require_fs = __commonJS({
2833
42
  "(disabled):fs"() {
@@ -11855,10 +9064,10 @@ var require_pdf = __commonJS({
11855
9064
  value: true
11856
9065
  });
11857
9066
  exports2.GlobalWorkerOptions = void 0;
11858
- const GlobalWorkerOptions2 = /* @__PURE__ */ Object.create(null);
11859
- exports2.GlobalWorkerOptions = GlobalWorkerOptions2;
11860
- GlobalWorkerOptions2.workerPort = null;
11861
- GlobalWorkerOptions2.workerSrc = "";
9067
+ const GlobalWorkerOptions = /* @__PURE__ */ Object.create(null);
9068
+ exports2.GlobalWorkerOptions = GlobalWorkerOptions;
9069
+ GlobalWorkerOptions.workerPort = null;
9070
+ GlobalWorkerOptions.workerSrc = "";
11862
9071
  }),
11863
9072
  /* 15 */
11864
9073
  /***/
@@ -20860,7 +18069,7 @@ var require_pdf = __commonJS({
20860
18069
  }
20861
18070
  });
20862
18071
 
20863
- // node_modules/.pnpm/@page-speed+pdf-viewer@0.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/pdf-viewer/dist/index.js
18072
+ // node_modules/.pnpm/@page-speed+pdf-viewer@0.1.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/pdf-viewer/dist/index.js
20864
18073
  var dist_exports = {};
20865
18074
  __export(dist_exports, {
20866
18075
  PDFCanvas: () => PDFCanvas,
@@ -20881,17 +18090,36 @@ __export(dist_exports, {
20881
18090
  useSearch: () => useSearch,
20882
18091
  useZoom: () => useZoom
20883
18092
  });
18093
+ import { useEffect as useEffect42 } from "react";
18094
+ import { useState as useState5, useEffect as useEffect7, useRef as useRef3 } from "react";
18095
+ import { useState as useState22, useCallback as useCallback4 } from "react";
18096
+ import { useRef as useRef22, useState as useState32, useCallback as useCallback22 } from "react";
18097
+ import { useState as useState42, useCallback as useCallback32 } from "react";
18098
+ import { useState as useState52, useCallback as useCallback42 } from "react";
18099
+ import { useEffect as useEffect22, useRef as useRef32, useState as useState6 } from "react";
18100
+ import { jsx as jsx4 } from "react/jsx-runtime";
18101
+ import { jsx as jsx22, jsxs } from "react/jsx-runtime";
18102
+ import { useEffect as useEffect32, useState as useState7 } from "react";
18103
+ import { jsx as jsx32, jsxs as jsxs2 } from "react/jsx-runtime";
18104
+ import { jsx as jsx42, jsxs as jsxs3 } from "react/jsx-runtime";
20884
18105
  function usePDFDocument(url, onError) {
20885
- const [document2, setDocument] = (0, import_react9.useState)(null);
20886
- const [loading, setLoading] = (0, import_react9.useState)(true);
20887
- const [error, setError] = (0, import_react9.useState)(null);
20888
- const [pdfDoc, setPdfDoc] = (0, import_react9.useState)(null);
20889
- (0, import_react9.useEffect)(() => {
18106
+ const [document2, setDocument] = useState5(null);
18107
+ const [loading, setLoading] = useState5(true);
18108
+ const [error, setError] = useState5(null);
18109
+ const [pdfDoc, setPdfDoc] = useState5(null);
18110
+ const pdfjsInitialized = useRef3(false);
18111
+ useEffect7(() => {
20890
18112
  if (!url) return;
18113
+ if (typeof window === "undefined") return;
20891
18114
  setLoading(true);
20892
18115
  setError(null);
20893
18116
  const loadPDF = async () => {
20894
18117
  try {
18118
+ const pdfjsLib = await Promise.resolve().then(() => __toESM(require_pdf()));
18119
+ if (!pdfjsInitialized.current) {
18120
+ pdfjsLib.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjsLib.version}/pdf.worker.min.js`;
18121
+ pdfjsInitialized.current = true;
18122
+ }
20895
18123
  const loadingTask = pdfjsLib.getDocument({
20896
18124
  url,
20897
18125
  withCredentials: true,
@@ -20933,17 +18161,17 @@ function usePageState({
20933
18161
  totalPages,
20934
18162
  initialPage = 1
20935
18163
  }) {
20936
- const [currentPage, setCurrentPage] = (0, import_react10.useState)(
18164
+ const [currentPage, setCurrentPage] = useState22(
20937
18165
  Math.max(1, Math.min(initialPage, totalPages))
20938
18166
  );
20939
- const goToPage = (0, import_react10.useCallback)((page) => {
18167
+ const goToPage = useCallback4((page) => {
20940
18168
  const validPage = Math.max(1, Math.min(page, totalPages));
20941
18169
  setCurrentPage(validPage);
20942
18170
  }, [totalPages]);
20943
- const nextPage = (0, import_react10.useCallback)(() => {
18171
+ const nextPage = useCallback4(() => {
20944
18172
  goToPage(currentPage + 1);
20945
18173
  }, [currentPage, goToPage]);
20946
- const prevPage = (0, import_react10.useCallback)(() => {
18174
+ const prevPage = useCallback4(() => {
20947
18175
  goToPage(currentPage - 1);
20948
18176
  }, [currentPage, goToPage]);
20949
18177
  return {
@@ -20956,10 +18184,10 @@ function usePageState({
20956
18184
  };
20957
18185
  }
20958
18186
  function usePageRenderer(pdfDoc) {
20959
- const cacheRef = (0, import_react11.useRef)(/* @__PURE__ */ new Map());
20960
- const [rendering, setRendering] = (0, import_react11.useState)(false);
20961
- const [pageInfo, setPageInfo] = (0, import_react11.useState)(null);
20962
- const renderPage = (0, import_react11.useCallback)(
18187
+ const cacheRef = useRef22(/* @__PURE__ */ new Map());
18188
+ const [rendering, setRendering] = useState32(false);
18189
+ const [pageInfo, setPageInfo] = useState32(null);
18190
+ const renderPage = useCallback22(
20963
18191
  async (pageNumber, scale = DEFAULT_SCALE, rotation = 0) => {
20964
18192
  if (!pdfDoc) return null;
20965
18193
  try {
@@ -21018,21 +18246,21 @@ function usePageRenderer(pdfDoc) {
21018
18246
  return { renderPage, rendering, pageInfo };
21019
18247
  }
21020
18248
  function useZoom(initialZoom = 1.5) {
21021
- const [zoomLevel, setZoomLevel] = (0, import_react12.useState)(
18249
+ const [zoomLevel, setZoomLevel] = useState42(
21022
18250
  typeof initialZoom === "number" ? initialZoom : 1.5
21023
18251
  );
21024
- const [zoomMode, setZoomMode] = (0, import_react12.useState)(
18252
+ const [zoomMode, setZoomMode] = useState42(
21025
18253
  typeof initialZoom === "string" ? initialZoom : "custom"
21026
18254
  );
21027
- const zoomIn = (0, import_react12.useCallback)(() => {
18255
+ const zoomIn = useCallback32(() => {
21028
18256
  setZoomLevel((prev) => Math.min(MAX_ZOOM, prev + ZOOM_STEP));
21029
18257
  setZoomMode("custom");
21030
18258
  }, []);
21031
- const zoomOut = (0, import_react12.useCallback)(() => {
18259
+ const zoomOut = useCallback32(() => {
21032
18260
  setZoomLevel((prev) => Math.max(MIN_ZOOM, prev - ZOOM_STEP));
21033
18261
  setZoomMode("custom");
21034
18262
  }, []);
21035
- const setZoom = (0, import_react12.useCallback)((level) => {
18263
+ const setZoom = useCallback32((level) => {
21036
18264
  if (typeof level === "number") {
21037
18265
  setZoomLevel(Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, level)));
21038
18266
  setZoomMode("custom");
@@ -21051,11 +18279,11 @@ function useZoom(initialZoom = 1.5) {
21051
18279
  };
21052
18280
  }
21053
18281
  function useSearch(pdfDoc) {
21054
- const [query, setQuery] = (0, import_react13.useState)("");
21055
- const [results, setResults] = (0, import_react13.useState)([]);
21056
- const [searching, setSearching] = (0, import_react13.useState)(false);
21057
- const [currentResultIndex, setCurrentResultIndex] = (0, import_react13.useState)(0);
21058
- const search = (0, import_react13.useCallback)(
18282
+ const [query, setQuery] = useState52("");
18283
+ const [results, setResults] = useState52([]);
18284
+ const [searching, setSearching] = useState52(false);
18285
+ const [currentResultIndex, setCurrentResultIndex] = useState52(0);
18286
+ const search = useCallback42(
21059
18287
  async (searchText) => {
21060
18288
  if (!pdfDoc || !searchText.trim()) {
21061
18289
  setResults([]);
@@ -21092,10 +18320,10 @@ function useSearch(pdfDoc) {
21092
18320
  },
21093
18321
  [pdfDoc]
21094
18322
  );
21095
- const nextResult = (0, import_react13.useCallback)(() => {
18323
+ const nextResult = useCallback42(() => {
21096
18324
  setCurrentResultIndex((prev) => (prev + 1) % results.length);
21097
18325
  }, [results.length]);
21098
- const prevResult = (0, import_react13.useCallback)(() => {
18326
+ const prevResult = useCallback42(() => {
21099
18327
  setCurrentResultIndex((prev) => (prev - 1 + results.length) % results.length);
21100
18328
  }, [results.length]);
21101
18329
  return {
@@ -21114,9 +18342,9 @@ function PDFCanvas({
21114
18342
  scale,
21115
18343
  onRender
21116
18344
  }) {
21117
- const containerRef = (0, import_react14.useRef)(null);
21118
- const [canvas, setCanvas] = (0, import_react14.useState)(null);
21119
- (0, import_react14.useEffect)(() => {
18345
+ const containerRef = useRef32(null);
18346
+ const [canvas, setCanvas] = useState6(null);
18347
+ useEffect22(() => {
21120
18348
  const render = async () => {
21121
18349
  const renderedCanvas = await onRender(pageNumber, scale, 0);
21122
18350
  if (renderedCanvas && containerRef.current) {
@@ -21131,7 +18359,7 @@ function PDFCanvas({
21131
18359
  render();
21132
18360
  }
21133
18361
  }, [pdfDoc, pageNumber, scale, onRender]);
21134
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref: containerRef, className: PDFViewer_default.canvas });
18362
+ return /* @__PURE__ */ jsx4("div", { ref: containerRef, className: PDFViewer_default.canvas });
21135
18363
  }
21136
18364
  function PDFControls({
21137
18365
  pageState,
@@ -21144,8 +18372,8 @@ function PDFControls({
21144
18372
  url
21145
18373
  }) {
21146
18374
  if (!pdfDocument) return null;
21147
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: PDFViewer_default.controls, children: [
21148
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18375
+ return /* @__PURE__ */ jsxs("div", { className: PDFViewer_default.controls, children: [
18376
+ /* @__PURE__ */ jsx22(
21149
18377
  "button",
21150
18378
  {
21151
18379
  onClick: pageState.prevPage,
@@ -21154,7 +18382,7 @@ function PDFControls({
21154
18382
  children: "<"
21155
18383
  }
21156
18384
  ),
21157
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18385
+ /* @__PURE__ */ jsx22(
21158
18386
  "input",
21159
18387
  {
21160
18388
  type: "number",
@@ -21165,11 +18393,11 @@ function PDFControls({
21165
18393
  className: PDFViewer_default.pageInput
21166
18394
  }
21167
18395
  ),
21168
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: PDFViewer_default.pageTotal, children: [
18396
+ /* @__PURE__ */ jsxs("span", { className: PDFViewer_default.pageTotal, children: [
21169
18397
  "of ",
21170
18398
  pdfDocument.numPages
21171
18399
  ] }),
21172
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18400
+ /* @__PURE__ */ jsx22(
21173
18401
  "button",
21174
18402
  {
21175
18403
  onClick: pageState.nextPage,
@@ -21178,7 +18406,7 @@ function PDFControls({
21178
18406
  children: ">"
21179
18407
  }
21180
18408
  ),
21181
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18409
+ /* @__PURE__ */ jsx22(
21182
18410
  "button",
21183
18411
  {
21184
18412
  onClick: zoom.zoomOut,
@@ -21187,11 +18415,11 @@ function PDFControls({
21187
18415
  children: "-"
21188
18416
  }
21189
18417
  ),
21190
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: PDFViewer_default.zoomLevel, children: [
18418
+ /* @__PURE__ */ jsxs("span", { className: PDFViewer_default.zoomLevel, children: [
21191
18419
  Math.round(zoom.zoomLevel * 100),
21192
18420
  "%"
21193
18421
  ] }),
21194
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18422
+ /* @__PURE__ */ jsx22(
21195
18423
  "button",
21196
18424
  {
21197
18425
  onClick: zoom.zoomIn,
@@ -21200,7 +18428,7 @@ function PDFControls({
21200
18428
  children: "+"
21201
18429
  }
21202
18430
  ),
21203
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18431
+ /* @__PURE__ */ jsx22(
21204
18432
  "input",
21205
18433
  {
21206
18434
  type: "text",
@@ -21210,13 +18438,13 @@ function PDFControls({
21210
18438
  className: PDFViewer_default.searchInput
21211
18439
  }
21212
18440
  ),
21213
- search.results.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: PDFViewer_default.searchResults, children: [
18441
+ search.results.length > 0 && /* @__PURE__ */ jsxs("span", { className: PDFViewer_default.searchResults, children: [
21214
18442
  search.results.length,
21215
18443
  " results"
21216
18444
  ] }),
21217
- enableDownload && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href: url, download: true, className: PDFViewer_default.button, title: "Download", children: "Download" }),
21218
- enablePrint && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { onClick: () => window.print(), title: "Print", children: "Print" }),
21219
- enableFullscreen && typeof document !== "undefined" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
18445
+ enableDownload && /* @__PURE__ */ jsx22("a", { href: url, download: true, className: PDFViewer_default.button, title: "Download", children: "Download" }),
18446
+ enablePrint && /* @__PURE__ */ jsx22("button", { onClick: () => window.print(), title: "Print", children: "Print" }),
18447
+ enableFullscreen && typeof document !== "undefined" && /* @__PURE__ */ jsx22(
21220
18448
  "button",
21221
18449
  {
21222
18450
  onClick: () => {
@@ -21238,8 +18466,8 @@ function PDFThumbnails({
21238
18466
  onSelectPage,
21239
18467
  numPages
21240
18468
  }) {
21241
- const [thumbnails, setThumbnails] = (0, import_react15.useState)([]);
21242
- (0, import_react15.useEffect)(() => {
18469
+ const [thumbnails, setThumbnails] = useState7([]);
18470
+ useEffect32(() => {
21243
18471
  const generateThumbnails = async () => {
21244
18472
  if (!pdfDoc) return;
21245
18473
  const thumbs = [];
@@ -21268,13 +18496,13 @@ function PDFThumbnails({
21268
18496
  };
21269
18497
  generateThumbnails();
21270
18498
  }, [pdfDoc, numPages]);
21271
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: PDFViewer_default.thumbnails, children: thumbnails.map((thumb, idx) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
18499
+ return /* @__PURE__ */ jsx32("div", { className: PDFViewer_default.thumbnails, children: thumbnails.map((thumb, idx) => /* @__PURE__ */ jsxs2(
21272
18500
  "div",
21273
18501
  {
21274
18502
  className: `${PDFViewer_default.thumbnail} ${idx + 1 === currentPage ? PDFViewer_default.active : ""}`,
21275
18503
  onClick: () => onSelectPage(idx + 1),
21276
18504
  children: [
21277
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
18505
+ /* @__PURE__ */ jsx32(
21278
18506
  "canvas",
21279
18507
  {
21280
18508
  width: thumb.width,
@@ -21289,7 +18517,7 @@ function PDFThumbnails({
21289
18517
  }
21290
18518
  }
21291
18519
  ),
21292
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: PDFViewer_default.pageNumber, children: idx + 1 })
18520
+ /* @__PURE__ */ jsx32("span", { className: PDFViewer_default.pageNumber, children: idx + 1 })
21293
18521
  ]
21294
18522
  },
21295
18523
  idx
@@ -21326,35 +18554,35 @@ function PDFViewer({
21326
18554
  const { renderPage, pageInfo } = usePageRenderer(pdfDoc);
21327
18555
  const zoom = useZoom(initialZoom);
21328
18556
  const search = useSearch(pdfDoc);
21329
- (0, import_react8.useEffect)(() => {
18557
+ useEffect42(() => {
21330
18558
  if (document2) {
21331
18559
  onDocumentLoad?.(document2);
21332
18560
  }
21333
18561
  }, [document2, onDocumentLoad]);
21334
- (0, import_react8.useEffect)(() => {
18562
+ useEffect42(() => {
21335
18563
  onPageChange?.(pageState.currentPage);
21336
18564
  }, [pageState.currentPage, onPageChange]);
21337
- (0, import_react8.useEffect)(() => {
18565
+ useEffect42(() => {
21338
18566
  if (search.results.length > 0) {
21339
18567
  onSearchResults?.(search.results);
21340
18568
  }
21341
18569
  }, [search.results, onSearchResults]);
21342
18570
  if (error) {
21343
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: PDFViewer_default.error, style: { height, width }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { children: [
18571
+ return /* @__PURE__ */ jsx42("div", { className: PDFViewer_default.error, style: { height, width }, children: /* @__PURE__ */ jsxs3("p", { children: [
21344
18572
  "Failed to load PDF: ",
21345
18573
  error.message
21346
18574
  ] }) });
21347
18575
  }
21348
18576
  if (loading) {
21349
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: PDFViewer_default.loading, style: { height, width }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: "Loading PDF..." }) });
18577
+ return /* @__PURE__ */ jsx42("div", { className: PDFViewer_default.loading, style: { height, width }, children: /* @__PURE__ */ jsx42("p", { children: "Loading PDF..." }) });
21350
18578
  }
21351
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
18579
+ return /* @__PURE__ */ jsxs3(
21352
18580
  "div",
21353
18581
  {
21354
18582
  className: `${PDFViewer_default.viewer} ${className || ""}`,
21355
18583
  style: { height, width, ...style },
21356
18584
  children: [
21357
- showControls && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
18585
+ showControls && /* @__PURE__ */ jsx42(
21358
18586
  PDFControls,
21359
18587
  {
21360
18588
  pageState,
@@ -21367,8 +18595,8 @@ function PDFViewer({
21367
18595
  url
21368
18596
  }
21369
18597
  ),
21370
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: PDFViewer_default.content, children: [
21371
- showThumbnails && document2 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
18598
+ /* @__PURE__ */ jsxs3("div", { className: PDFViewer_default.content, children: [
18599
+ showThumbnails && document2 && /* @__PURE__ */ jsx42(
21372
18600
  PDFThumbnails,
21373
18601
  {
21374
18602
  pdfDoc,
@@ -21377,7 +18605,7 @@ function PDFViewer({
21377
18605
  numPages: document2.numPages
21378
18606
  }
21379
18607
  ),
21380
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
18608
+ /* @__PURE__ */ jsx42(
21381
18609
  PDFCanvas,
21382
18610
  {
21383
18611
  pdfDoc,
@@ -21455,25 +18683,10 @@ function createProgressiveFetchHandler(onProgress) {
21455
18683
  return response.arrayBuffer();
21456
18684
  };
21457
18685
  }
21458
- var import_react8, import_react9, pdfjsLib, import_react10, import_react11, import_react12, import_react13, import_react14, import_jsx_runtime5, import_jsx_runtime6, import_react15, import_jsx_runtime7, import_jsx_runtime8, DEFAULT_SCALE, CACHE_SIZE, MIN_ZOOM, MAX_ZOOM, ZOOM_STEP, PDFViewer_default, linearizedPDFConfig;
18686
+ var DEFAULT_SCALE, CACHE_SIZE, MIN_ZOOM, MAX_ZOOM, ZOOM_STEP, PDFViewer_default, linearizedPDFConfig;
21459
18687
  var init_dist = __esm({
21460
- "node_modules/.pnpm/@page-speed+pdf-viewer@0.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/pdf-viewer/dist/index.js"() {
21461
- import_react8 = __toESM(require_react());
21462
- import_react9 = __toESM(require_react());
21463
- pdfjsLib = __toESM(require_pdf());
21464
- import_react10 = __toESM(require_react());
21465
- import_react11 = __toESM(require_react());
21466
- import_react12 = __toESM(require_react());
21467
- import_react13 = __toESM(require_react());
21468
- import_react14 = __toESM(require_react());
21469
- import_jsx_runtime5 = __toESM(require_jsx_runtime());
21470
- import_jsx_runtime6 = __toESM(require_jsx_runtime());
21471
- import_react15 = __toESM(require_react());
21472
- import_jsx_runtime7 = __toESM(require_jsx_runtime());
21473
- import_jsx_runtime8 = __toESM(require_jsx_runtime());
21474
- if (typeof window !== "undefined") {
21475
- pdfjsLib.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjsLib.version}/pdf.worker.min.js`;
21476
- }
18688
+ "node_modules/.pnpm/@page-speed+pdf-viewer@0.1.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/pdf-viewer/dist/index.js"() {
18689
+ "use client";
21477
18690
  DEFAULT_SCALE = 1.5;
21478
18691
  CACHE_SIZE = 50 * 1024 * 1024;
21479
18692
  MIN_ZOOM = 0.5;
@@ -21507,20 +18720,27 @@ var init_dist = __esm({
21507
18720
  });
21508
18721
 
21509
18722
  // src/components/Lightbox.tsx
21510
- var import_react17 = __toESM(require_react());
18723
+ import {
18724
+ useCallback as useCallback5,
18725
+ useEffect as useEffect8,
18726
+ useMemo as useMemo3,
18727
+ useRef as useRef4,
18728
+ useState as useState8
18729
+ } from "react";
18730
+ import { createPortal } from "react-dom";
21511
18731
 
21512
18732
  // src/hooks/useGalleryState.ts
21513
- var import_react = __toESM(require_react());
18733
+ import { useState, useCallback } from "react";
21514
18734
  function useGalleryState({
21515
18735
  items,
21516
18736
  initialIndex = 0,
21517
18737
  onSelect
21518
18738
  }) {
21519
- const [currentIndex, setCurrentIndex] = (0, import_react.useState)(
18739
+ const [currentIndex, setCurrentIndex] = useState(
21520
18740
  Math.max(0, Math.min(initialIndex, items.length - 1))
21521
18741
  );
21522
18742
  const currentItem = items[currentIndex] ?? null;
21523
- const goToIndex = (0, import_react.useCallback)(
18743
+ const goToIndex = useCallback(
21524
18744
  (index) => {
21525
18745
  if (index < 0 || index >= items.length) return;
21526
18746
  setCurrentIndex(index);
@@ -21528,10 +18748,10 @@ function useGalleryState({
21528
18748
  },
21529
18749
  [items.length, onSelect]
21530
18750
  );
21531
- const next = (0, import_react.useCallback)(() => {
18751
+ const next = useCallback(() => {
21532
18752
  goToIndex(currentIndex + 1);
21533
18753
  }, [currentIndex, goToIndex]);
21534
- const prev = (0, import_react.useCallback)(() => {
18754
+ const prev = useCallback(() => {
21535
18755
  goToIndex(currentIndex - 1);
21536
18756
  }, [currentIndex, goToIndex]);
21537
18757
  return {
@@ -21546,9 +18766,9 @@ function useGalleryState({
21546
18766
  }
21547
18767
 
21548
18768
  // src/hooks/useKeyboardShortcuts.ts
21549
- var import_react2 = __toESM(require_react());
18769
+ import { useEffect } from "react";
21550
18770
  function useKeyboardShortcuts(shortcuts, enabled = true) {
21551
- (0, import_react2.useEffect)(() => {
18771
+ useEffect(() => {
21552
18772
  if (!enabled) return;
21553
18773
  const handleKeyDown = (e) => {
21554
18774
  const handler = shortcuts[e.key];
@@ -21562,10 +18782,10 @@ function useKeyboardShortcuts(shortcuts, enabled = true) {
21562
18782
  }
21563
18783
 
21564
18784
  // src/hooks/useResponsiveness.ts
21565
- var import_react3 = __toESM(require_react());
18785
+ import { useState as useState2, useEffect as useEffect2 } from "react";
21566
18786
  function useResponsiveness() {
21567
- const [breakpoint, setBreakpoint] = (0, import_react3.useState)("desktop");
21568
- (0, import_react3.useEffect)(() => {
18787
+ const [breakpoint, setBreakpoint] = useState2("desktop");
18788
+ useEffect2(() => {
21569
18789
  const updateBreakpoint = () => {
21570
18790
  if (window.innerWidth < 768) {
21571
18791
  setBreakpoint("mobile");
@@ -21625,7 +18845,7 @@ var Lightbox_default = {
21625
18845
  };
21626
18846
 
21627
18847
  // src/components/LightboxOverlay.tsx
21628
- var import_jsx_runtime = __toESM(require_jsx_runtime());
18848
+ import { jsx } from "react/jsx-runtime";
21629
18849
  function LightboxOverlay({
21630
18850
  onClose,
21631
18851
  closeOnBackdropClick = true
@@ -21635,7 +18855,7 @@ function LightboxOverlay({
21635
18855
  if (event.target !== event.currentTarget) return;
21636
18856
  onClose?.();
21637
18857
  };
21638
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
18858
+ return /* @__PURE__ */ jsx(
21639
18859
  "div",
21640
18860
  {
21641
18861
  className: Lightbox_default.overlay,
@@ -21646,11 +18866,11 @@ function LightboxOverlay({
21646
18866
  }
21647
18867
 
21648
18868
  // node_modules/.pnpm/@page-speed+img@0.4.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/img/dist/core/Img.js
21649
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
21650
- var import_react7 = __toESM(require_react(), 1);
18869
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18870
+ import { forwardRef, memo, useCallback as useCallback3, useEffect as useEffect6, useImperativeHandle, useMemo as useMemo2, useRef as useRef2, useState as useState4 } from "react";
21651
18871
 
21652
18872
  // node_modules/.pnpm/@page-speed+hooks@0.4.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/hooks/dist/chunk-JSF23IF7.js
21653
- var import_react4 = __toESM(require_react(), 1);
18873
+ import { useMemo, useState as useState3, useRef, useEffect as useEffect3, useCallback as useCallback2 } from "react";
21654
18874
  var BASE_URL = "https://octane.cdn.ing/api/v1/images/transform?";
21655
18875
  var DPR_MULTIPLIERS = [1, 2];
21656
18876
  function useOptimizedImage(options) {
@@ -21663,23 +18883,23 @@ function useOptimizedImage(options) {
21663
18883
  height,
21664
18884
  optixFlowConfig
21665
18885
  } = options;
21666
- const optixFlowApiKey = (0, import_react4.useMemo)(() => {
18886
+ const optixFlowApiKey = useMemo(() => {
21667
18887
  return optixFlowConfig?.apiKey;
21668
18888
  }, [optixFlowConfig?.apiKey]);
21669
- const useOptixFlow = (0, import_react4.useMemo)(() => {
18889
+ const useOptixFlow = useMemo(() => {
21670
18890
  return optixFlowApiKey ? true : false;
21671
18891
  }, [optixFlowApiKey]);
21672
- const [state, setState] = (0, import_react4.useState)({
18892
+ const [state, setState] = useState3({
21673
18893
  isLoaded: false,
21674
18894
  isInView: false
21675
18895
  });
21676
- const [size, setSize] = (0, import_react4.useState)({
18896
+ const [size, setSize] = useState3({
21677
18897
  width: width ?? 0,
21678
18898
  height: height ?? 0
21679
18899
  });
21680
- const imgRef = (0, import_react4.useRef)(null);
21681
- const observerRef = (0, import_react4.useRef)(null);
21682
- (0, import_react4.useEffect)(() => {
18900
+ const imgRef = useRef(null);
18901
+ const observerRef = useRef(null);
18902
+ useEffect3(() => {
21683
18903
  if (width !== void 0 || height !== void 0) {
21684
18904
  setSize((prev) => ({
21685
18905
  width: width ?? prev.width,
@@ -21687,7 +18907,7 @@ function useOptimizedImage(options) {
21687
18907
  }));
21688
18908
  }
21689
18909
  }, [width, height]);
21690
- (0, import_react4.useEffect)(() => {
18910
+ useEffect3(() => {
21691
18911
  if (!imgRef.current) return;
21692
18912
  const calculateRenderedSize = () => {
21693
18913
  const img2 = imgRef.current;
@@ -21720,7 +18940,7 @@ function useOptimizedImage(options) {
21720
18940
  resizeObserver?.disconnect();
21721
18941
  };
21722
18942
  }, [width, height, state.isLoaded]);
21723
- const buildOptixFlowUrl = (0, import_react4.useCallback)(
18943
+ const buildOptixFlowUrl = useCallback2(
21724
18944
  (imgWidth, imgHeight, format) => {
21725
18945
  if (!useOptixFlow) return src;
21726
18946
  if (!imgWidth || !imgHeight) return src;
@@ -21735,7 +18955,7 @@ function useOptimizedImage(options) {
21735
18955
  },
21736
18956
  [useOptixFlow, src, optixFlowConfig?.compressionLevel, optixFlowApiKey]
21737
18957
  );
21738
- const generateSrcset = (0, import_react4.useCallback)(
18958
+ const generateSrcset = useCallback2(
21739
18959
  (baseWidth, baseHeight, format) => {
21740
18960
  if (!useOptixFlow || baseWidth === 0 || baseHeight === 0) return "";
21741
18961
  return DPR_MULTIPLIERS.map((dpr) => {
@@ -21747,24 +18967,24 @@ function useOptimizedImage(options) {
21747
18967
  },
21748
18968
  [useOptixFlow, buildOptixFlowUrl]
21749
18969
  );
21750
- const primarySrc = (0, import_react4.useMemo)(() => {
18970
+ const primarySrc = useMemo(() => {
21751
18971
  const hasDimensions = size.width > 0 && size.height > 0;
21752
18972
  if (!useOptixFlow || !hasDimensions) return src;
21753
18973
  const fallbackFormat = optixFlowConfig?.renderedFileType ?? "jpeg";
21754
18974
  return buildOptixFlowUrl(size.width, size.height, fallbackFormat);
21755
18975
  }, [useOptixFlow, src, size.width, size.height, optixFlowConfig?.renderedFileType, buildOptixFlowUrl]);
21756
- const srcset = (0, import_react4.useMemo)(() => {
18976
+ const srcset = useMemo(() => {
21757
18977
  return {
21758
18978
  avif: generateSrcset(size.width, size.height, "avif"),
21759
18979
  webp: generateSrcset(size.width, size.height, "webp"),
21760
18980
  jpeg: generateSrcset(size.width, size.height, "jpeg")
21761
18981
  };
21762
18982
  }, [size.width, size.height, generateSrcset]);
21763
- const sizes = (0, import_react4.useMemo)(() => {
18983
+ const sizes = useMemo(() => {
21764
18984
  if (size.width === 0) return "";
21765
18985
  return `${size.width}px`;
21766
18986
  }, [size.width]);
21767
- (0, import_react4.useEffect)(() => {
18987
+ useEffect3(() => {
21768
18988
  if (typeof window === "undefined" || !imgRef.current) {
21769
18989
  return;
21770
18990
  }
@@ -21786,7 +19006,7 @@ function useOptimizedImage(options) {
21786
19006
  observerRef.current?.disconnect();
21787
19007
  };
21788
19008
  }, [eager, threshold, rootMargin]);
21789
- (0, import_react4.useEffect)(() => {
19009
+ useEffect3(() => {
21790
19010
  if (!imgRef.current) return;
21791
19011
  const handleLoad = () => {
21792
19012
  setState((prev) => ({ ...prev, isLoaded: true }));
@@ -21799,7 +19019,7 @@ function useOptimizedImage(options) {
21799
19019
  return () => img.removeEventListener("load", handleLoad);
21800
19020
  }
21801
19021
  }, [state.isInView]);
21802
- const ref = (0, import_react4.useCallback)((node) => {
19022
+ const ref = useCallback2((node) => {
21803
19023
  imgRef.current = node;
21804
19024
  }, []);
21805
19025
  const emptySrcset = { avif: "", webp: "", jpeg: "" };
@@ -21922,10 +19142,10 @@ async function fetchImageData(mediaId, options = {}) {
21922
19142
  }
21923
19143
 
21924
19144
  // node_modules/.pnpm/@page-speed+img@0.4.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/img/dist/core/useMediaSelectionEffect.js
21925
- var import_react5 = __toESM(require_react(), 1);
19145
+ import { useEffect as useEffect4 } from "react";
21926
19146
  var MEDIA_SELECTED_EVENT = "dt:media-selected";
21927
19147
  function useMediaSelectionEffect() {
21928
- (0, import_react5.useEffect)(() => {
19148
+ useEffect4(() => {
21929
19149
  if (typeof window === "undefined")
21930
19150
  return;
21931
19151
  const handler = () => {
@@ -21936,7 +19156,7 @@ function useMediaSelectionEffect() {
21936
19156
  }
21937
19157
 
21938
19158
  // node_modules/.pnpm/@page-speed+img@0.4.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@page-speed/img/dist/core/useResponsiveReset.js
21939
- var import_react6 = __toESM(require_react(), 1);
19159
+ import { useEffect as useEffect5 } from "react";
21940
19160
  function resetResponsivePictureState(element) {
21941
19161
  if (!element)
21942
19162
  return;
@@ -21952,7 +19172,7 @@ function resetResponsivePictureState(element) {
21952
19172
  });
21953
19173
  }
21954
19174
  function useResponsiveReset(ref) {
21955
- (0, import_react6.useEffect)(() => {
19175
+ useEffect5(() => {
21956
19176
  const element = ref.current;
21957
19177
  if (!element)
21958
19178
  return;
@@ -22009,7 +19229,7 @@ var parseDimension = (value) => {
22009
19229
  }
22010
19230
  return void 0;
22011
19231
  };
22012
- var composeRefs = (hookRef, forwardedRef, localRef) => (0, import_react7.useCallback)((node) => {
19232
+ var composeRefs = (hookRef, forwardedRef, localRef) => useCallback3((node) => {
22013
19233
  hookRef(node);
22014
19234
  localRef.current = node;
22015
19235
  if (typeof forwardedRef === "function") {
@@ -22036,14 +19256,14 @@ function pickBest(sizes) {
22036
19256
  }
22037
19257
  var DEFAULT_SIZES = "(max-width:640px) 640px, (max-width:1024px) 1024px, 1536px";
22038
19258
  var ModernImg = ({ sizes, loading, decoding, alt, title, src: directSrc, eager, intersectionMargin, intersectionThreshold, optixFlowConfig, forwardedRef, ...rest }) => {
22039
- const imgRef = (0, import_react7.useRef)(null);
22040
- const pictureRef = (0, import_react7.useRef)(null);
19259
+ const imgRef = useRef2(null);
19260
+ const pictureRef = useRef2(null);
22041
19261
  useResponsiveReset(pictureRef);
22042
19262
  useMediaSelectionEffect();
22043
- const normalizedSrc = (0, import_react7.useMemo)(() => typeof directSrc === "string" ? directSrc.trim() : "", [directSrc]);
22044
- const numericWidth = (0, import_react7.useMemo)(() => parseDimension(rest.width), [rest]);
22045
- const numericHeight = (0, import_react7.useMemo)(() => parseDimension(rest.height), [rest]);
22046
- const resolvedOptixConfig = (0, import_react7.useMemo)(() => resolveOptixFlowConfig(optixFlowConfig), [optixFlowConfig]);
19263
+ const normalizedSrc = useMemo2(() => typeof directSrc === "string" ? directSrc.trim() : "", [directSrc]);
19264
+ const numericWidth = useMemo2(() => parseDimension(rest.width), [rest]);
19265
+ const numericHeight = useMemo2(() => parseDimension(rest.height), [rest]);
19266
+ const resolvedOptixConfig = useMemo2(() => resolveOptixFlowConfig(optixFlowConfig), [optixFlowConfig]);
22047
19267
  const eagerLoad = eager ?? loading === "eager";
22048
19268
  const { ref: hookRef, src, srcset, sizes: computedSizes, loading: hookLoading, size } = useOptimizedImage({
22049
19269
  src: normalizedSrc,
@@ -22067,24 +19287,24 @@ var ModernImg = ({ sizes, loading, decoding, alt, title, src: directSrc, eager,
22067
19287
  const widthAttr = parsedWidth ?? (size.width || numericWidth || void 0);
22068
19288
  const heightAttr = parsedHeight ?? (size.height || numericHeight || void 0);
22069
19289
  if (!hasSrcSet) {
22070
- return (0, import_jsx_runtime2.jsx)("img", { ref: mergedRef, src: imgSrc, loading: loadingAttr, decoding: decodingAttr, alt, title, width: widthAttr, height: heightAttr, ...restProps });
19290
+ return _jsx("img", { ref: mergedRef, src: imgSrc, loading: loadingAttr, decoding: decodingAttr, alt, title, width: widthAttr, height: heightAttr, ...restProps });
22071
19291
  }
22072
- return (0, import_jsx_runtime2.jsxs)("picture", { ref: pictureRef, children: [srcset.avif ? (0, import_jsx_runtime2.jsx)("source", { type: "image/avif", srcSet: srcset.avif, sizes: sizesAttr }) : null, srcset.webp ? (0, import_jsx_runtime2.jsx)("source", { type: "image/webp", srcSet: srcset.webp, sizes: sizesAttr }) : null, (0, import_jsx_runtime2.jsx)("img", { ref: mergedRef, src: imgSrc, srcSet: inlineSrcSet || void 0, sizes: inlineSrcSet ? sizesAttr : void 0, loading: loadingAttr, decoding: decodingAttr, alt, title, width: widthAttr, height: heightAttr, ...restProps })] });
19292
+ return _jsxs("picture", { ref: pictureRef, children: [srcset.avif ? _jsx("source", { type: "image/avif", srcSet: srcset.avif, sizes: sizesAttr }) : null, srcset.webp ? _jsx("source", { type: "image/webp", srcSet: srcset.webp, sizes: sizesAttr }) : null, _jsx("img", { ref: mergedRef, src: imgSrc, srcSet: inlineSrcSet || void 0, sizes: inlineSrcSet ? sizesAttr : void 0, loading: loadingAttr, decoding: decodingAttr, alt, title, width: widthAttr, height: heightAttr, ...restProps })] });
22073
19293
  };
22074
19294
  var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt, title, src: directSrc, forwardedRef, ...rest }) => {
22075
- const imgRef = (0, import_react7.useRef)(null);
22076
- const pictureRef = (0, import_react7.useRef)(null);
22077
- (0, import_react7.useImperativeHandle)(forwardedRef, () => imgRef.current);
19295
+ const imgRef = useRef2(null);
19296
+ const pictureRef = useRef2(null);
19297
+ useImperativeHandle(forwardedRef, () => imgRef.current);
22078
19298
  useResponsiveReset(pictureRef);
22079
19299
  useMediaSelectionEffect();
22080
- const [data, setData] = (0, import_react7.useState)(null);
22081
- const [retryCount, setRetryCount] = (0, import_react7.useState)(0);
19300
+ const [data, setData] = useState4(null);
19301
+ const [retryCount, setRetryCount] = useState4(0);
22082
19302
  const hasMediaId = Number.isFinite(mediaId);
22083
19303
  const loadingAttr = loading ?? "lazy";
22084
19304
  const decodingAttr = decoding ?? "async";
22085
- const [isInView, setIsInView] = (0, import_react7.useState)(() => !hasMediaId || loadingAttr !== "lazy");
22086
- const cdnOrigin = (0, import_react7.useMemo)(() => (cdnHost ?? DEFAULT_CDN_HOST).replace(/\/$/, ""), [cdnHost]);
22087
- (0, import_react7.useEffect)(() => {
19305
+ const [isInView, setIsInView] = useState4(() => !hasMediaId || loadingAttr !== "lazy");
19306
+ const cdnOrigin = useMemo2(() => (cdnHost ?? DEFAULT_CDN_HOST).replace(/\/$/, ""), [cdnHost]);
19307
+ useEffect6(() => {
22088
19308
  if (!hasMediaId) {
22089
19309
  setData(null);
22090
19310
  setRetryCount(0);
@@ -22093,7 +19313,7 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22093
19313
  setData(null);
22094
19314
  setRetryCount(0);
22095
19315
  }, [hasMediaId, mediaId, cdnHost]);
22096
- (0, import_react7.useEffect)(() => {
19316
+ useEffect6(() => {
22097
19317
  if (!hasMediaId) {
22098
19318
  return;
22099
19319
  }
@@ -22112,14 +19332,14 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22112
19332
  });
22113
19333
  return () => controller.abort();
22114
19334
  }, [hasMediaId, mediaId, cdnHost, onImageData, retryCount]);
22115
- (0, import_react7.useEffect)(() => {
19335
+ useEffect6(() => {
22116
19336
  if (!hasMediaId || loadingAttr !== "lazy") {
22117
19337
  setIsInView(true);
22118
19338
  return;
22119
19339
  }
22120
19340
  setIsInView(false);
22121
19341
  }, [hasMediaId, mediaId, loadingAttr]);
22122
- (0, import_react7.useEffect)(() => {
19342
+ useEffect6(() => {
22123
19343
  if (!hasMediaId || loadingAttr !== "lazy" || isInView) {
22124
19344
  return;
22125
19345
  }
@@ -22140,7 +19360,7 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22140
19360
  observer.observe(node);
22141
19361
  return () => observer.disconnect();
22142
19362
  }, [hasMediaId, loadingAttr, isInView]);
22143
- const picture = (0, import_react7.useMemo)(() => {
19363
+ const picture = useMemo2(() => {
22144
19364
  if (!data)
22145
19365
  return null;
22146
19366
  const v = data.variants_data?.variants ?? {};
@@ -22209,14 +19429,14 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22209
19429
  };
22210
19430
  return { webp: webp2, avif: avif2, jpeg: jpeg2, toSrcSet: toSrcSet2, fallback: fallback2, widths, hasVariantSource: variantCandidates.length > 0 };
22211
19431
  }, [data, cdnOrigin]);
22212
- const hasVariantEntries = (0, import_react7.useMemo)(() => imageVariantsHaveRenderableSource(data?.variants_data?.variants ?? null), [data]);
22213
- const variantsStatus = (0, import_react7.useMemo)(() => {
19432
+ const hasVariantEntries = useMemo2(() => imageVariantsHaveRenderableSource(data?.variants_data?.variants ?? null), [data]);
19433
+ const variantsStatus = useMemo2(() => {
22214
19434
  const status = data?.variants_data?.status ?? data?.variants_status ?? "";
22215
19435
  return typeof status === "string" ? status.toLowerCase() : "";
22216
19436
  }, [data]);
22217
19437
  const variantsFailed = variantsStatus === "failed" || variantsStatus === "error";
22218
19438
  const shouldPollForVariants = hasMediaId && Boolean(data) && !variantsFailed && !hasVariantEntries && retryCount < MAX_VARIANT_REFRESH_ATTEMPTS;
22219
- (0, import_react7.useEffect)(() => {
19439
+ useEffect6(() => {
22220
19440
  if (!shouldPollForVariants) {
22221
19441
  return;
22222
19442
  }
@@ -22228,19 +19448,19 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22228
19448
  }, VARIANT_REFRESH_DELAY_MS);
22229
19449
  return () => window.clearTimeout(timeoutId);
22230
19450
  }, [shouldPollForVariants]);
22231
- const altAttr = (0, import_react7.useMemo)(() => {
19451
+ const altAttr = useMemo2(() => {
22232
19452
  if (typeof alt === "string")
22233
19453
  return alt;
22234
19454
  return data?.meta?.content_manifest?.summary ?? void 0;
22235
19455
  }, [alt, data]);
22236
- const titleAttr = (0, import_react7.useMemo)(() => {
19456
+ const titleAttr = useMemo2(() => {
22237
19457
  if (typeof title === "string")
22238
19458
  return title;
22239
19459
  return data?.meta?.content_manifest?.title ?? void 0;
22240
19460
  }, [title, data]);
22241
- const widthAttr = (0, import_react7.useMemo)(() => data?.meta?.sizing?.width ?? data?.variants_data?.metadata?.width ?? void 0, [data]);
22242
- const heightAttr = (0, import_react7.useMemo)(() => data?.meta?.sizing?.height ?? data?.variants_data?.metadata?.height ?? void 0, [data]);
22243
- const dataFilename = (0, import_react7.useMemo)(() => {
19461
+ const widthAttr = useMemo2(() => data?.meta?.sizing?.width ?? data?.variants_data?.metadata?.width ?? void 0, [data]);
19462
+ const heightAttr = useMemo2(() => data?.meta?.sizing?.height ?? data?.variants_data?.metadata?.height ?? void 0, [data]);
19463
+ const dataFilename = useMemo2(() => {
22244
19464
  const base = data?.meta?.content_manifest?.optimized_filename;
22245
19465
  if (!base)
22246
19466
  return void 0;
@@ -22253,12 +19473,12 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22253
19473
  }, [data, picture]);
22254
19474
  if (!hasMediaId) {
22255
19475
  const r = { ...rest };
22256
- return (0, import_jsx_runtime2.jsx)("img", { ref: imgRef, src: directSrc, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: r.width, height: r.height, ...r });
19476
+ return _jsx("img", { ref: imgRef, src: directSrc, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: r.width, height: r.height, ...r });
22257
19477
  }
22258
19478
  const placeholderSrc = buildPlaceholderImageUrl(mediaId, cdnHost);
22259
19479
  if (!data || !picture || !isInView) {
22260
19480
  const r = { ...rest };
22261
- return (0, import_jsx_runtime2.jsx)("img", { ref: imgRef, src: placeholderSrc, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: r.width ?? widthAttr, height: r.height ?? heightAttr, ...r });
19481
+ return _jsx("img", { ref: imgRef, src: placeholderSrc, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: r.width ?? widthAttr, height: r.height ?? heightAttr, ...r });
22262
19482
  }
22263
19483
  const sizesAttr = sizes ?? DEFAULT_SIZES;
22264
19484
  const { webp, avif, jpeg, toSrcSet, fallback } = picture;
@@ -22266,15 +19486,15 @@ var LegacyImg = ({ mediaId, cdnHost, sizes, onImageData, loading, decoding, alt,
22266
19486
  const avifSet = toSrcSet(avif);
22267
19487
  const jpegSet = toSrcSet(jpeg);
22268
19488
  if (webpSet || avifSet || jpegSet) {
22269
- return (0, import_jsx_runtime2.jsxs)("picture", { children: [avifSet ? (0, import_jsx_runtime2.jsx)("source", { type: "image/avif", srcSet: avifSet, sizes: sizesAttr }) : null, webpSet ? (0, import_jsx_runtime2.jsx)("source", { type: "image/webp", srcSet: webpSet, sizes: sizesAttr }) : null, (0, import_jsx_runtime2.jsx)("img", { ref: imgRef, src: fallback, srcSet: jpegSet && !webpSet && !avifSet ? jpegSet : void 0, sizes: jpegSet && !webpSet && !avifSet ? sizesAttr : void 0, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: widthAttr, height: heightAttr, "data-filename": dataFilename, ...rest })] });
19489
+ return _jsxs("picture", { children: [avifSet ? _jsx("source", { type: "image/avif", srcSet: avifSet, sizes: sizesAttr }) : null, webpSet ? _jsx("source", { type: "image/webp", srcSet: webpSet, sizes: sizesAttr }) : null, _jsx("img", { ref: imgRef, src: fallback, srcSet: jpegSet && !webpSet && !avifSet ? jpegSet : void 0, sizes: jpegSet && !webpSet && !avifSet ? sizesAttr : void 0, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: widthAttr, height: heightAttr, "data-filename": dataFilename, ...rest })] });
22270
19490
  }
22271
- return (0, import_jsx_runtime2.jsx)("img", { ref: imgRef, src: fallback, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: widthAttr, height: heightAttr, "data-filename": dataFilename, ...rest });
19491
+ return _jsx("img", { ref: imgRef, src: fallback, loading: loadingAttr, decoding: decodingAttr, alt: altAttr, title: titleAttr, width: widthAttr, height: heightAttr, "data-filename": dataFilename, ...rest });
22272
19492
  };
22273
- var ImgBase = (0, import_react7.forwardRef)(function Img(props, ref) {
19493
+ var ImgBase = forwardRef(function Img(props, ref) {
22274
19494
  const hasMediaId = Number.isFinite(props.mediaId);
22275
19495
  if (hasMediaId) {
22276
19496
  warnDeprecatedMediaId(props.mediaId);
22277
- return (0, import_jsx_runtime2.jsx)(LegacyImg, { ...props, forwardedRef: ref });
19497
+ return _jsx(LegacyImg, { ...props, forwardedRef: ref });
22278
19498
  }
22279
19499
  const hasSrc = typeof props.src === "string" && props.src.trim().length > 0;
22280
19500
  if (!hasSrc) {
@@ -22283,13 +19503,13 @@ var ImgBase = (0, import_react7.forwardRef)(function Img(props, ref) {
22283
19503
  }
22284
19504
  return null;
22285
19505
  }
22286
- return (0, import_jsx_runtime2.jsx)(ModernImg, { ...props, forwardedRef: ref });
19506
+ return _jsx(ModernImg, { ...props, forwardedRef: ref });
22287
19507
  });
22288
- var Img2 = (0, import_react7.memo)(ImgBase);
19508
+ var Img2 = memo(ImgBase);
22289
19509
  Img2.displayName = "PageSpeedImg";
22290
19510
 
22291
19511
  // src/renderers/ImageRenderer.tsx
22292
- var import_jsx_runtime3 = __toESM(require_jsx_runtime());
19512
+ import { jsx as jsx2 } from "react/jsx-runtime";
22293
19513
  var toImgOptixFlowConfig = (config) => {
22294
19514
  if (!config) return void 0;
22295
19515
  const { compression, ...rest } = config;
@@ -22301,7 +19521,7 @@ var toImgOptixFlowConfig = (config) => {
22301
19521
  };
22302
19522
  function ImageRenderer({ item, optixFlowConfig }) {
22303
19523
  if (!item.src) return null;
22304
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
19524
+ return /* @__PURE__ */ jsx2(
22305
19525
  Img2,
22306
19526
  {
22307
19527
  className: Lightbox_default.media,
@@ -22314,10 +19534,10 @@ function ImageRenderer({ item, optixFlowConfig }) {
22314
19534
  }
22315
19535
 
22316
19536
  // src/renderers/VideoRenderer.tsx
22317
- var import_jsx_runtime4 = __toESM(require_jsx_runtime());
19537
+ import { jsx as jsx3 } from "react/jsx-runtime";
22318
19538
  function VideoRenderer({ item }) {
22319
19539
  if (!item.src) return null;
22320
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
19540
+ return /* @__PURE__ */ jsx3(
22321
19541
  "video",
22322
19542
  {
22323
19543
  className: Lightbox_default.media,
@@ -22329,8 +19549,8 @@ function VideoRenderer({ item }) {
22329
19549
  }
22330
19550
 
22331
19551
  // src/renderers/PDFRenderer.tsx
22332
- var import_react16 = __toESM(require_react());
22333
- var import_jsx_runtime9 = __toESM(require_jsx_runtime());
19552
+ import React, { Suspense } from "react";
19553
+ import { jsx as jsx5 } from "react/jsx-runtime";
22334
19554
  function loadPDFViewer() {
22335
19555
  return Promise.resolve().then(() => (init_dist(), dist_exports)).then((mod) => ({
22336
19556
  // The PDF viewer package exposes a named PDFViewer export.
@@ -22338,34 +19558,34 @@ function loadPDFViewer() {
22338
19558
  default: mod.PDFViewer
22339
19559
  }));
22340
19560
  }
22341
- var LazyPDFViewer = import_react16.default.lazy(loadPDFViewer);
19561
+ var LazyPDFViewer = React.lazy(loadPDFViewer);
22342
19562
  var AnyPDFViewer = LazyPDFViewer;
22343
19563
  function PDFRenderer({ item }) {
22344
19564
  if (!item.src) return null;
22345
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: Lightbox_default.pdfContainer, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
22346
- import_react16.Suspense,
19565
+ return /* @__PURE__ */ jsx5("div", { className: Lightbox_default.pdfContainer, children: /* @__PURE__ */ jsx5(
19566
+ Suspense,
22347
19567
  {
22348
- fallback: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: Lightbox_default.pdfFallback, children: "Loading document..." }),
22349
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AnyPDFViewer, { url: item.src })
19568
+ fallback: /* @__PURE__ */ jsx5("div", { className: Lightbox_default.pdfFallback, children: "Loading document..." }),
19569
+ children: /* @__PURE__ */ jsx5(AnyPDFViewer, { url: item.src })
22350
19570
  }
22351
19571
  ) });
22352
19572
  }
22353
19573
 
22354
19574
  // src/renderers/ComponentRenderer.tsx
22355
- var import_jsx_runtime10 = __toESM(require_jsx_runtime());
19575
+ import { jsx as jsx6 } from "react/jsx-runtime";
22356
19576
  function ComponentRenderer({ item }) {
22357
19577
  if (!item.component) return null;
22358
19578
  const Component = item.component;
22359
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Component, { ...item.data || {} });
19579
+ return /* @__PURE__ */ jsx6(Component, { ...item.data || {} });
22360
19580
  }
22361
19581
 
22362
19582
  // src/components/LightboxContent.tsx
22363
- var import_jsx_runtime11 = __toESM(require_jsx_runtime());
19583
+ import { jsx as jsx7 } from "react/jsx-runtime";
22364
19584
  function LightboxContent({ item, layout, optixFlowConfig }) {
22365
19585
  if (!item) return null;
22366
19586
  switch (item.type) {
22367
19587
  case "image":
22368
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
19588
+ return /* @__PURE__ */ jsx7(
22369
19589
  ImageRenderer,
22370
19590
  {
22371
19591
  item,
@@ -22374,18 +19594,18 @@ function LightboxContent({ item, layout, optixFlowConfig }) {
22374
19594
  }
22375
19595
  );
22376
19596
  case "video":
22377
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(VideoRenderer, { item, layout });
19597
+ return /* @__PURE__ */ jsx7(VideoRenderer, { item, layout });
22378
19598
  case "pdf":
22379
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PDFRenderer, { item, layout });
19599
+ return /* @__PURE__ */ jsx7(PDFRenderer, { item, layout });
22380
19600
  case "component":
22381
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ComponentRenderer, { item });
19601
+ return /* @__PURE__ */ jsx7(ComponentRenderer, { item });
22382
19602
  default:
22383
19603
  return null;
22384
19604
  }
22385
19605
  }
22386
19606
 
22387
19607
  // src/components/LightboxChrome.tsx
22388
- var import_jsx_runtime12 = __toESM(require_jsx_runtime());
19608
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
22389
19609
  var DEFAULT_CONTROLS = {
22390
19610
  navigation: true,
22391
19611
  keyboard: true,
@@ -22415,9 +19635,9 @@ function LightboxChrome({
22415
19635
  onClose
22416
19636
  }) {
22417
19637
  const resolved = mergeControls(controls);
22418
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: Lightbox_default.chrome, children: [
22419
- resolved.navigation && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: Lightbox_default.chromeSection, children: [
22420
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19638
+ return /* @__PURE__ */ jsxs4("div", { className: Lightbox_default.chrome, children: [
19639
+ resolved.navigation && /* @__PURE__ */ jsxs4("div", { className: Lightbox_default.chromeSection, children: [
19640
+ /* @__PURE__ */ jsx8(
22421
19641
  "button",
22422
19642
  {
22423
19643
  type: "button",
@@ -22428,7 +19648,7 @@ function LightboxChrome({
22428
19648
  children: "\u2039"
22429
19649
  }
22430
19650
  ),
22431
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19651
+ /* @__PURE__ */ jsx8(
22432
19652
  "button",
22433
19653
  {
22434
19654
  type: "button",
@@ -22440,17 +19660,17 @@ function LightboxChrome({
22440
19660
  }
22441
19661
  )
22442
19662
  ] }),
22443
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: Lightbox_default.chromeSection, children: resolved.captions && currentItem && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: Lightbox_default.captionContainer, children: [
22444
- currentItem.title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: Lightbox_default.captionTitle, children: currentItem.title }),
22445
- currentItem.caption && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: Lightbox_default.captionText, children: currentItem.caption })
19663
+ /* @__PURE__ */ jsx8("div", { className: Lightbox_default.chromeSection, children: resolved.captions && currentItem && /* @__PURE__ */ jsxs4("div", { className: Lightbox_default.captionContainer, children: [
19664
+ currentItem.title && /* @__PURE__ */ jsx8("div", { className: Lightbox_default.captionTitle, children: currentItem.title }),
19665
+ currentItem.caption && /* @__PURE__ */ jsx8("div", { className: Lightbox_default.captionText, children: currentItem.caption })
22446
19666
  ] }) }),
22447
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: Lightbox_default.chromeSection, children: [
22448
- resolved.counter && totalItems > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: Lightbox_default.counter, children: [
19667
+ /* @__PURE__ */ jsxs4("div", { className: Lightbox_default.chromeSection, children: [
19668
+ resolved.counter && totalItems > 0 && /* @__PURE__ */ jsxs4("span", { className: Lightbox_default.counter, children: [
22449
19669
  currentIndex + 1,
22450
19670
  " / ",
22451
19671
  totalItems
22452
19672
  ] }),
22453
- resolved.closeButton && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
19673
+ resolved.closeButton && /* @__PURE__ */ jsx8(
22454
19674
  "button",
22455
19675
  {
22456
19676
  type: "button",
@@ -22465,7 +19685,7 @@ function LightboxChrome({
22465
19685
  }
22466
19686
 
22467
19687
  // src/components/Layouts/HorizontalLayout.tsx
22468
- var import_jsx_runtime13 = __toESM(require_jsx_runtime());
19688
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
22469
19689
  function HorizontalLayout({
22470
19690
  content,
22471
19691
  chrome,
@@ -22479,7 +19699,7 @@ function HorizontalLayout({
22479
19699
  height,
22480
19700
  ...style
22481
19701
  };
22482
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Lightbox_default.horizontalLayoutRoot, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
19702
+ return /* @__PURE__ */ jsx9("div", { className: Lightbox_default.horizontalLayoutRoot, style: containerStyle, children: /* @__PURE__ */ jsxs5(
22483
19703
  "div",
22484
19704
  {
22485
19705
  className: [
@@ -22487,15 +19707,15 @@ function HorizontalLayout({
22487
19707
  className || ""
22488
19708
  ].join(" ").trim(),
22489
19709
  children: [
22490
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Lightbox_default.mainContent, children: content }),
22491
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Lightbox_default.toolbar, children: chrome })
19710
+ /* @__PURE__ */ jsx9("div", { className: Lightbox_default.mainContent, children: content }),
19711
+ /* @__PURE__ */ jsx9("div", { className: Lightbox_default.toolbar, children: chrome })
22492
19712
  ]
22493
19713
  }
22494
19714
  ) });
22495
19715
  }
22496
19716
 
22497
19717
  // src/components/Layouts/VerticalSplitLayout.tsx
22498
- var import_jsx_runtime14 = __toESM(require_jsx_runtime());
19718
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
22499
19719
  function VerticalSplitLayout({
22500
19720
  content,
22501
19721
  chrome,
@@ -22509,7 +19729,7 @@ function VerticalSplitLayout({
22509
19729
  height,
22510
19730
  ...style
22511
19731
  };
22512
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: Lightbox_default.verticalSplitLayoutRoot, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
19732
+ return /* @__PURE__ */ jsx10("div", { className: Lightbox_default.verticalSplitLayoutRoot, style: containerStyle, children: /* @__PURE__ */ jsxs6(
22513
19733
  "div",
22514
19734
  {
22515
19735
  className: [
@@ -22517,15 +19737,15 @@ function VerticalSplitLayout({
22517
19737
  className || ""
22518
19738
  ].join(" ").trim(),
22519
19739
  children: [
22520
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: Lightbox_default.verticalSplitContent, children: content }),
22521
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: Lightbox_default.verticalSplitSidebar, children: chrome })
19740
+ /* @__PURE__ */ jsx10("div", { className: Lightbox_default.verticalSplitContent, children: content }),
19741
+ /* @__PURE__ */ jsx10("div", { className: Lightbox_default.verticalSplitSidebar, children: chrome })
22522
19742
  ]
22523
19743
  }
22524
19744
  ) });
22525
19745
  }
22526
19746
 
22527
19747
  // src/components/Layouts/CustomSlideLayout.tsx
22528
- var import_jsx_runtime15 = __toESM(require_jsx_runtime());
19748
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
22529
19749
  function CustomSlideLayout({
22530
19750
  content,
22531
19751
  chrome,
@@ -22539,7 +19759,7 @@ function CustomSlideLayout({
22539
19759
  height,
22540
19760
  ...style
22541
19761
  };
22542
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Lightbox_default.customSlideLayoutRoot, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
19762
+ return /* @__PURE__ */ jsx11("div", { className: Lightbox_default.customSlideLayoutRoot, style: containerStyle, children: /* @__PURE__ */ jsxs7(
22543
19763
  "div",
22544
19764
  {
22545
19765
  className: [
@@ -22547,22 +19767,22 @@ function CustomSlideLayout({
22547
19767
  className || ""
22548
19768
  ].join(" ").trim(),
22549
19769
  children: [
22550
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Lightbox_default.customSlideContent, children: content }),
22551
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Lightbox_default.customSlideChrome, children: chrome })
19770
+ /* @__PURE__ */ jsx11("div", { className: Lightbox_default.customSlideContent, children: content }),
19771
+ /* @__PURE__ */ jsx11("div", { className: Lightbox_default.customSlideChrome, children: chrome })
22552
19772
  ]
22553
19773
  }
22554
19774
  ) });
22555
19775
  }
22556
19776
 
22557
19777
  // src/components/Layouts/FullscreenLayout.tsx
22558
- var import_jsx_runtime16 = __toESM(require_jsx_runtime());
19778
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
22559
19779
  function FullscreenLayout({
22560
19780
  content,
22561
19781
  chrome,
22562
19782
  className,
22563
19783
  style
22564
19784
  }) {
22565
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: Lightbox_default.fullscreenLayoutRoot, style, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
19785
+ return /* @__PURE__ */ jsx12("div", { className: Lightbox_default.fullscreenLayoutRoot, style, children: /* @__PURE__ */ jsxs8(
22566
19786
  "div",
22567
19787
  {
22568
19788
  className: [
@@ -22570,15 +19790,15 @@ function FullscreenLayout({
22570
19790
  className || ""
22571
19791
  ].join(" ").trim(),
22572
19792
  children: [
22573
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: Lightbox_default.fullscreenContent, children: content }),
22574
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: Lightbox_default.fullscreenChrome, children: chrome })
19793
+ /* @__PURE__ */ jsx12("div", { className: Lightbox_default.fullscreenContent, children: content }),
19794
+ /* @__PURE__ */ jsx12("div", { className: Lightbox_default.fullscreenChrome, children: chrome })
22575
19795
  ]
22576
19796
  }
22577
19797
  ) });
22578
19798
  }
22579
19799
 
22580
19800
  // src/components/Layouts/InlineLayout.tsx
22581
- var import_jsx_runtime17 = __toESM(require_jsx_runtime());
19801
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
22582
19802
  function InlineLayout({
22583
19803
  content,
22584
19804
  chrome,
@@ -22592,7 +19812,7 @@ function InlineLayout({
22592
19812
  height,
22593
19813
  ...style
22594
19814
  };
22595
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: Lightbox_default.inlineLayoutRoot, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
19815
+ return /* @__PURE__ */ jsx13("div", { className: Lightbox_default.inlineLayoutRoot, style: containerStyle, children: /* @__PURE__ */ jsxs9(
22596
19816
  "div",
22597
19817
  {
22598
19818
  className: [
@@ -22600,15 +19820,15 @@ function InlineLayout({
22600
19820
  className || ""
22601
19821
  ].join(" ").trim(),
22602
19822
  children: [
22603
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: Lightbox_default.inlineContent, children: content }),
22604
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: Lightbox_default.inlineToolbar, children: chrome })
19823
+ /* @__PURE__ */ jsx13("div", { className: Lightbox_default.inlineContent, children: content }),
19824
+ /* @__PURE__ */ jsx13("div", { className: Lightbox_default.inlineToolbar, children: chrome })
22605
19825
  ]
22606
19826
  }
22607
19827
  ) });
22608
19828
  }
22609
19829
 
22610
19830
  // src/components/Lightbox.tsx
22611
- var import_jsx_runtime18 = __toESM(require_jsx_runtime());
19831
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
22612
19832
  function Lightbox(props) {
22613
19833
  const { items, initialIndex = 0 } = props;
22614
19834
  const gallery = useGalleryState({
@@ -22617,49 +19837,42 @@ function Lightbox(props) {
22617
19837
  onSelect: props.onSelect
22618
19838
  });
22619
19839
  const { breakpoint } = useResponsiveness();
22620
- const layout = (0, import_react17.useMemo)(() => {
19840
+ const layout = useMemo3(() => {
22621
19841
  if (props.layout) return props.layout;
22622
19842
  if (breakpoint === "mobile") return "fullscreen";
22623
19843
  if (breakpoint === "tablet") return "vertical-split";
22624
19844
  return "horizontal";
22625
19845
  }, [props.layout, breakpoint]);
22626
- const didCloseRef = (0, import_react17.useRef)(false);
22627
- (0, import_react17.useEffect)(() => {
19846
+ const didCloseRef = useRef4(false);
19847
+ const [isMounted, setIsMounted] = useState8(false);
19848
+ useEffect8(() => {
19849
+ setIsMounted(true);
19850
+ }, []);
19851
+ useEffect8(() => {
22628
19852
  props.onOpen?.();
22629
19853
  if (props.disableScroll === false) {
22630
- return () => {
22631
- if (!didCloseRef.current) {
22632
- props.onClose?.();
22633
- }
22634
- };
19854
+ return;
22635
19855
  }
22636
19856
  if (typeof document === "undefined") {
22637
- return () => {
22638
- if (!didCloseRef.current) {
22639
- props.onClose?.();
22640
- }
22641
- };
19857
+ return;
22642
19858
  }
22643
19859
  const previousOverflow = document.body.style.overflow;
22644
19860
  document.body.style.overflow = "hidden";
22645
19861
  return () => {
22646
19862
  document.body.style.overflow = previousOverflow;
22647
- if (!didCloseRef.current) {
22648
- props.onClose?.();
22649
- }
22650
19863
  };
22651
- }, [props.disableScroll, props.onOpen, props.onClose]);
22652
- const handleClose = (0, import_react17.useCallback)(() => {
19864
+ }, [props.disableScroll, props.onOpen]);
19865
+ const handleClose = useCallback5(() => {
22653
19866
  if (didCloseRef.current) return;
22654
19867
  didCloseRef.current = true;
22655
19868
  props.onClose?.();
22656
19869
  }, [props.onClose]);
22657
- const handleNext = (0, import_react17.useCallback)(() => {
19870
+ const handleNext = useCallback5(() => {
22658
19871
  if (!gallery.canNext) return;
22659
19872
  gallery.next();
22660
19873
  props.onNext?.();
22661
19874
  }, [gallery, props.onNext]);
22662
- const handlePrev = (0, import_react17.useCallback)(() => {
19875
+ const handlePrev = useCallback5(() => {
22663
19876
  if (!gallery.canPrev) return;
22664
19877
  gallery.prev();
22665
19878
  props.onPrev?.();
@@ -22685,7 +19898,7 @@ function Lightbox(props) {
22685
19898
  captions: true,
22686
19899
  ...props.controls
22687
19900
  };
22688
- const contentNode = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19901
+ const contentNode = /* @__PURE__ */ jsx14(
22689
19902
  LightboxContent,
22690
19903
  {
22691
19904
  item: currentItem,
@@ -22693,7 +19906,7 @@ function Lightbox(props) {
22693
19906
  optixFlowConfig: props.optixFlowConfig
22694
19907
  }
22695
19908
  );
22696
- const chromeNode = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19909
+ const chromeNode = /* @__PURE__ */ jsx14(
22697
19910
  LightboxChrome,
22698
19911
  {
22699
19912
  currentIndex: gallery.currentIndex,
@@ -22716,26 +19929,26 @@ function Lightbox(props) {
22716
19929
  style: props.style
22717
19930
  };
22718
19931
  if (layout === "inline") {
22719
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(InlineLayout, { ...layoutProps });
19932
+ return /* @__PURE__ */ jsx14(InlineLayout, { ...layoutProps });
22720
19933
  }
22721
19934
  let layoutComponent;
22722
19935
  switch (layout) {
22723
19936
  case "vertical-split":
22724
- layoutComponent = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(VerticalSplitLayout, { ...layoutProps });
19937
+ layoutComponent = /* @__PURE__ */ jsx14(VerticalSplitLayout, { ...layoutProps });
22725
19938
  break;
22726
19939
  case "custom-slide":
22727
- layoutComponent = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CustomSlideLayout, { ...layoutProps });
19940
+ layoutComponent = /* @__PURE__ */ jsx14(CustomSlideLayout, { ...layoutProps });
22728
19941
  break;
22729
19942
  case "fullscreen":
22730
- layoutComponent = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FullscreenLayout, { ...layoutProps });
19943
+ layoutComponent = /* @__PURE__ */ jsx14(FullscreenLayout, { ...layoutProps });
22731
19944
  break;
22732
19945
  case "horizontal":
22733
19946
  default:
22734
- layoutComponent = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HorizontalLayout, { ...layoutProps });
19947
+ layoutComponent = /* @__PURE__ */ jsx14(HorizontalLayout, { ...layoutProps });
22735
19948
  break;
22736
19949
  }
22737
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: Lightbox_default.lightboxPortal, role: "dialog", "aria-modal": "true", children: [
22738
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
19950
+ const lightboxContent = /* @__PURE__ */ jsxs10("div", { className: Lightbox_default.lightboxPortal, role: "dialog", "aria-modal": "true", children: [
19951
+ /* @__PURE__ */ jsx14(
22739
19952
  LightboxOverlay,
22740
19953
  {
22741
19954
  onClose: handleClose,
@@ -22744,31 +19957,35 @@ function Lightbox(props) {
22744
19957
  ),
22745
19958
  layoutComponent
22746
19959
  ] });
19960
+ if (isMounted && typeof document !== "undefined") {
19961
+ return createPortal(lightboxContent, document.body);
19962
+ }
19963
+ return null;
22747
19964
  }
22748
19965
 
22749
19966
  // src/hooks/useLightboxState.ts
22750
- var import_react18 = __toESM(require_react());
19967
+ import { useState as useState9, useCallback as useCallback6, useEffect as useEffect9 } from "react";
22751
19968
  function useLightboxState({
22752
19969
  onOpen,
22753
19970
  onClose,
22754
19971
  disableScroll = true
22755
19972
  }) {
22756
- const [isOpen, setIsOpen] = (0, import_react18.useState)(false);
22757
- const open = (0, import_react18.useCallback)(() => {
19973
+ const [isOpen, setIsOpen] = useState9(false);
19974
+ const open = useCallback6(() => {
22758
19975
  setIsOpen(true);
22759
19976
  onOpen?.();
22760
19977
  if (disableScroll) {
22761
19978
  document.body.style.overflow = "hidden";
22762
19979
  }
22763
19980
  }, [onOpen, disableScroll]);
22764
- const close = (0, import_react18.useCallback)(() => {
19981
+ const close = useCallback6(() => {
22765
19982
  setIsOpen(false);
22766
19983
  onClose?.();
22767
19984
  if (disableScroll) {
22768
19985
  document.body.style.overflow = "";
22769
19986
  }
22770
19987
  }, [onClose, disableScroll]);
22771
- (0, import_react18.useEffect)(() => {
19988
+ useEffect9(() => {
22772
19989
  return () => {
22773
19990
  if (disableScroll) {
22774
19991
  document.body.style.overflow = "";
@@ -22835,27 +20052,3 @@ export {
22835
20052
  useLightboxState,
22836
20053
  useResponsiveness
22837
20054
  };
22838
- /*! Bundled license information:
22839
-
22840
- react/cjs/react.development.js:
22841
- (**
22842
- * @license React
22843
- * react.development.js
22844
- *
22845
- * Copyright (c) Facebook, Inc. and its affiliates.
22846
- *
22847
- * This source code is licensed under the MIT license found in the
22848
- * LICENSE file in the root directory of this source tree.
22849
- *)
22850
-
22851
- react/cjs/react-jsx-runtime.development.js:
22852
- (**
22853
- * @license React
22854
- * react-jsx-runtime.development.js
22855
- *
22856
- * Copyright (c) Facebook, Inc. and its affiliates.
22857
- *
22858
- * This source code is licensed under the MIT license found in the
22859
- * LICENSE file in the root directory of this source tree.
22860
- *)
22861
- */