@methodfi/opal-react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,624 @@
1
+ 'use strict';
2
+
3
+ var require$$0 = require('react');
4
+
5
+ var jsxRuntime = {exports: {}};
6
+
7
+ var reactJsxRuntime_production = {};
8
+
9
+ /**
10
+ * @license React
11
+ * react-jsx-runtime.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+
19
+ var hasRequiredReactJsxRuntime_production;
20
+
21
+ function requireReactJsxRuntime_production () {
22
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
23
+ hasRequiredReactJsxRuntime_production = 1;
24
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
25
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
26
+ function jsxProd(type, config, maybeKey) {
27
+ var key = null;
28
+ void 0 !== maybeKey && (key = "" + maybeKey);
29
+ void 0 !== config.key && (key = "" + config.key);
30
+ if ("key" in config) {
31
+ maybeKey = {};
32
+ for (var propName in config)
33
+ "key" !== propName && (maybeKey[propName] = config[propName]);
34
+ } else maybeKey = config;
35
+ config = maybeKey.ref;
36
+ return {
37
+ $$typeof: REACT_ELEMENT_TYPE,
38
+ type: type,
39
+ key: key,
40
+ ref: void 0 !== config ? config : null,
41
+ props: maybeKey
42
+ };
43
+ }
44
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
45
+ reactJsxRuntime_production.jsx = jsxProd;
46
+ reactJsxRuntime_production.jsxs = jsxProd;
47
+ return reactJsxRuntime_production;
48
+ }
49
+
50
+ var reactJsxRuntime_development = {};
51
+
52
+ /**
53
+ * @license React
54
+ * react-jsx-runtime.development.js
55
+ *
56
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
57
+ *
58
+ * This source code is licensed under the MIT license found in the
59
+ * LICENSE file in the root directory of this source tree.
60
+ */
61
+
62
+ var hasRequiredReactJsxRuntime_development;
63
+
64
+ function requireReactJsxRuntime_development () {
65
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
66
+ hasRequiredReactJsxRuntime_development = 1;
67
+ "production" !== process.env.NODE_ENV &&
68
+ (function () {
69
+ function getComponentNameFromType(type) {
70
+ if (null == type) return null;
71
+ if ("function" === typeof type)
72
+ return type.$$typeof === REACT_CLIENT_REFERENCE
73
+ ? null
74
+ : type.displayName || type.name || null;
75
+ if ("string" === typeof type) return type;
76
+ switch (type) {
77
+ case REACT_FRAGMENT_TYPE:
78
+ return "Fragment";
79
+ case REACT_PROFILER_TYPE:
80
+ return "Profiler";
81
+ case REACT_STRICT_MODE_TYPE:
82
+ return "StrictMode";
83
+ case REACT_SUSPENSE_TYPE:
84
+ return "Suspense";
85
+ case REACT_SUSPENSE_LIST_TYPE:
86
+ return "SuspenseList";
87
+ case REACT_ACTIVITY_TYPE:
88
+ return "Activity";
89
+ }
90
+ if ("object" === typeof type)
91
+ switch (
92
+ ("number" === typeof type.tag &&
93
+ console.error(
94
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
95
+ ),
96
+ type.$$typeof)
97
+ ) {
98
+ case REACT_PORTAL_TYPE:
99
+ return "Portal";
100
+ case REACT_CONTEXT_TYPE:
101
+ return (type.displayName || "Context") + ".Provider";
102
+ case REACT_CONSUMER_TYPE:
103
+ return (type._context.displayName || "Context") + ".Consumer";
104
+ case REACT_FORWARD_REF_TYPE:
105
+ var innerType = type.render;
106
+ type = type.displayName;
107
+ type ||
108
+ ((type = innerType.displayName || innerType.name || ""),
109
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
110
+ return type;
111
+ case REACT_MEMO_TYPE:
112
+ return (
113
+ (innerType = type.displayName || null),
114
+ null !== innerType
115
+ ? innerType
116
+ : getComponentNameFromType(type.type) || "Memo"
117
+ );
118
+ case REACT_LAZY_TYPE:
119
+ innerType = type._payload;
120
+ type = type._init;
121
+ try {
122
+ return getComponentNameFromType(type(innerType));
123
+ } catch (x) {}
124
+ }
125
+ return null;
126
+ }
127
+ function testStringCoercion(value) {
128
+ return "" + value;
129
+ }
130
+ function checkKeyStringCoercion(value) {
131
+ try {
132
+ testStringCoercion(value);
133
+ var JSCompiler_inline_result = !1;
134
+ } catch (e) {
135
+ JSCompiler_inline_result = true;
136
+ }
137
+ if (JSCompiler_inline_result) {
138
+ JSCompiler_inline_result = console;
139
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
140
+ var JSCompiler_inline_result$jscomp$0 =
141
+ ("function" === typeof Symbol &&
142
+ Symbol.toStringTag &&
143
+ value[Symbol.toStringTag]) ||
144
+ value.constructor.name ||
145
+ "Object";
146
+ JSCompiler_temp_const.call(
147
+ JSCompiler_inline_result,
148
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
149
+ JSCompiler_inline_result$jscomp$0
150
+ );
151
+ return testStringCoercion(value);
152
+ }
153
+ }
154
+ function getTaskName(type) {
155
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
156
+ if (
157
+ "object" === typeof type &&
158
+ null !== type &&
159
+ type.$$typeof === REACT_LAZY_TYPE
160
+ )
161
+ return "<...>";
162
+ try {
163
+ var name = getComponentNameFromType(type);
164
+ return name ? "<" + name + ">" : "<...>";
165
+ } catch (x) {
166
+ return "<...>";
167
+ }
168
+ }
169
+ function getOwner() {
170
+ var dispatcher = ReactSharedInternals.A;
171
+ return null === dispatcher ? null : dispatcher.getOwner();
172
+ }
173
+ function UnknownOwner() {
174
+ return Error("react-stack-top-frame");
175
+ }
176
+ function hasValidKey(config) {
177
+ if (hasOwnProperty.call(config, "key")) {
178
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
179
+ if (getter && getter.isReactWarning) return false;
180
+ }
181
+ return void 0 !== config.key;
182
+ }
183
+ function defineKeyPropWarningGetter(props, displayName) {
184
+ function warnAboutAccessingKey() {
185
+ specialPropKeyWarningShown ||
186
+ ((specialPropKeyWarningShown = true),
187
+ console.error(
188
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
189
+ displayName
190
+ ));
191
+ }
192
+ warnAboutAccessingKey.isReactWarning = true;
193
+ Object.defineProperty(props, "key", {
194
+ get: warnAboutAccessingKey,
195
+ configurable: true
196
+ });
197
+ }
198
+ function elementRefGetterWithDeprecationWarning() {
199
+ var componentName = getComponentNameFromType(this.type);
200
+ didWarnAboutElementRef[componentName] ||
201
+ ((didWarnAboutElementRef[componentName] = true),
202
+ console.error(
203
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
204
+ ));
205
+ componentName = this.props.ref;
206
+ return void 0 !== componentName ? componentName : null;
207
+ }
208
+ function ReactElement(
209
+ type,
210
+ key,
211
+ self,
212
+ source,
213
+ owner,
214
+ props,
215
+ debugStack,
216
+ debugTask
217
+ ) {
218
+ self = props.ref;
219
+ type = {
220
+ $$typeof: REACT_ELEMENT_TYPE,
221
+ type: type,
222
+ key: key,
223
+ props: props,
224
+ _owner: owner
225
+ };
226
+ null !== (void 0 !== self ? self : null)
227
+ ? Object.defineProperty(type, "ref", {
228
+ enumerable: false,
229
+ get: elementRefGetterWithDeprecationWarning
230
+ })
231
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
232
+ type._store = {};
233
+ Object.defineProperty(type._store, "validated", {
234
+ configurable: false,
235
+ enumerable: false,
236
+ writable: true,
237
+ value: 0
238
+ });
239
+ Object.defineProperty(type, "_debugInfo", {
240
+ configurable: false,
241
+ enumerable: false,
242
+ writable: true,
243
+ value: null
244
+ });
245
+ Object.defineProperty(type, "_debugStack", {
246
+ configurable: false,
247
+ enumerable: false,
248
+ writable: true,
249
+ value: debugStack
250
+ });
251
+ Object.defineProperty(type, "_debugTask", {
252
+ configurable: false,
253
+ enumerable: false,
254
+ writable: true,
255
+ value: debugTask
256
+ });
257
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
258
+ return type;
259
+ }
260
+ function jsxDEVImpl(
261
+ type,
262
+ config,
263
+ maybeKey,
264
+ isStaticChildren,
265
+ source,
266
+ self,
267
+ debugStack,
268
+ debugTask
269
+ ) {
270
+ var children = config.children;
271
+ if (void 0 !== children)
272
+ if (isStaticChildren)
273
+ if (isArrayImpl(children)) {
274
+ for (
275
+ isStaticChildren = 0;
276
+ isStaticChildren < children.length;
277
+ isStaticChildren++
278
+ )
279
+ validateChildKeys(children[isStaticChildren]);
280
+ Object.freeze && Object.freeze(children);
281
+ } else
282
+ console.error(
283
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
284
+ );
285
+ else validateChildKeys(children);
286
+ if (hasOwnProperty.call(config, "key")) {
287
+ children = getComponentNameFromType(type);
288
+ var keys = Object.keys(config).filter(function (k) {
289
+ return "key" !== k;
290
+ });
291
+ isStaticChildren =
292
+ 0 < keys.length
293
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
294
+ : "{key: someKey}";
295
+ didWarnAboutKeySpread[children + isStaticChildren] ||
296
+ ((keys =
297
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
298
+ console.error(
299
+ '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} />',
300
+ isStaticChildren,
301
+ children,
302
+ keys,
303
+ children
304
+ ),
305
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
306
+ }
307
+ children = null;
308
+ void 0 !== maybeKey &&
309
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
310
+ hasValidKey(config) &&
311
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
312
+ if ("key" in config) {
313
+ maybeKey = {};
314
+ for (var propName in config)
315
+ "key" !== propName && (maybeKey[propName] = config[propName]);
316
+ } else maybeKey = config;
317
+ children &&
318
+ defineKeyPropWarningGetter(
319
+ maybeKey,
320
+ "function" === typeof type
321
+ ? type.displayName || type.name || "Unknown"
322
+ : type
323
+ );
324
+ return ReactElement(
325
+ type,
326
+ children,
327
+ self,
328
+ source,
329
+ getOwner(),
330
+ maybeKey,
331
+ debugStack,
332
+ debugTask
333
+ );
334
+ }
335
+ function validateChildKeys(node) {
336
+ "object" === typeof node &&
337
+ null !== node &&
338
+ node.$$typeof === REACT_ELEMENT_TYPE &&
339
+ node._store &&
340
+ (node._store.validated = 1);
341
+ }
342
+ var React = require$$0,
343
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
344
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
345
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
346
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
347
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
348
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
349
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
350
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
351
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
352
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
353
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
354
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
355
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
356
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
357
+ ReactSharedInternals =
358
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
359
+ hasOwnProperty = Object.prototype.hasOwnProperty,
360
+ isArrayImpl = Array.isArray,
361
+ createTask = console.createTask
362
+ ? console.createTask
363
+ : function () {
364
+ return null;
365
+ };
366
+ React = {
367
+ "react-stack-bottom-frame": function (callStackForError) {
368
+ return callStackForError();
369
+ }
370
+ };
371
+ var specialPropKeyWarningShown;
372
+ var didWarnAboutElementRef = {};
373
+ var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(
374
+ React,
375
+ UnknownOwner
376
+ )();
377
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
378
+ var didWarnAboutKeySpread = {};
379
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
380
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
381
+ var trackActualOwner =
382
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
383
+ return jsxDEVImpl(
384
+ type,
385
+ config,
386
+ maybeKey,
387
+ false,
388
+ source,
389
+ self,
390
+ trackActualOwner
391
+ ? Error("react-stack-top-frame")
392
+ : unknownOwnerDebugStack,
393
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
394
+ );
395
+ };
396
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
397
+ var trackActualOwner =
398
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
399
+ return jsxDEVImpl(
400
+ type,
401
+ config,
402
+ maybeKey,
403
+ true,
404
+ source,
405
+ self,
406
+ trackActualOwner
407
+ ? Error("react-stack-top-frame")
408
+ : unknownOwnerDebugStack,
409
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
410
+ );
411
+ };
412
+ })();
413
+ return reactJsxRuntime_development;
414
+ }
415
+
416
+ if (process.env.NODE_ENV === 'production') {
417
+ jsxRuntime.exports = requireReactJsxRuntime_production();
418
+ } else {
419
+ jsxRuntime.exports = requireReactJsxRuntime_development();
420
+ }
421
+
422
+ var jsxRuntimeExports = jsxRuntime.exports;
423
+
424
+ function OpalIframe({ token, opalUrl, onMessage, style, }) {
425
+ const iframeRef = require$$0.useRef(null);
426
+ const handleMessage = require$$0.useCallback((event) => {
427
+ var _a;
428
+ // Check if the event is from an allowed origin
429
+ const allowedOrigins = [
430
+ 'https://opal.production.methodfi.com',
431
+ 'https://opal.sandbox.methodfi.com',
432
+ 'https://opal.dev.methodfi.com',
433
+ 'http://localhost:3000'
434
+ ];
435
+ if (!allowedOrigins.includes(event.origin)) {
436
+ return;
437
+ }
438
+ try {
439
+ // Forward the properly structured event
440
+ if ((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) {
441
+ onMessage(event.data);
442
+ }
443
+ }
444
+ catch (error) {
445
+ onMessage({
446
+ type: 'opal.session.errored',
447
+ mode: 'opal',
448
+ object: 'session',
449
+ action: 'errored',
450
+ timestamp: new Date().toISOString(),
451
+ data: null,
452
+ });
453
+ }
454
+ }, [onMessage]);
455
+ require$$0.useEffect(() => {
456
+ // Add event listener for iframe messages
457
+ window.addEventListener('message', handleMessage);
458
+ return () => {
459
+ window.removeEventListener('message', handleMessage);
460
+ };
461
+ }, [handleMessage]);
462
+ if (!token || !opalUrl) {
463
+ return null;
464
+ }
465
+ return (jsxRuntimeExports.jsx("iframe", { ref: iframeRef, src: opalUrl, style: style, sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation", title: "Opal" }));
466
+ }
467
+
468
+ const OPAL_URLS = {
469
+ local: 'http://localhost:3000',
470
+ dev: 'https://opal.dev.methodfi.com',
471
+ sandbox: 'https://opal.sandbox.methodfi.com',
472
+ production: 'https://opal.production.methodfi.com',
473
+ };
474
+
475
+ const OpalContext = require$$0.createContext(null);
476
+ /**
477
+ * Provider component that wraps your app to enable Opal functionality.
478
+ * This component manages the Opal iframe state and provides context to child components.
479
+ *
480
+ * @example
481
+ * ```tsx
482
+ * import { OpalProvider } from '@methodfi/opal-react';
483
+ *
484
+ * export default function App() {
485
+ * return (
486
+ * <OpalProvider>
487
+ * <YourAppContent />
488
+ * </OpalProvider>
489
+ * );
490
+ * }
491
+ * ```
492
+ */
493
+ function OpalProvider({ children }) {
494
+ const [isOpen, setIsOpen] = require$$0.useState(false);
495
+ const [isReady, setIsReady] = require$$0.useState(false);
496
+ const [error, setError] = require$$0.useState(null);
497
+ const [currentToken, setCurrentToken] = require$$0.useState(null);
498
+ const [currentConfig, setCurrentConfig] = require$$0.useState({});
499
+ const environment = currentConfig.env || 'production';
500
+ const baseUrl = OPAL_URLS[environment];
501
+ const opalUrl = currentToken
502
+ ? `${baseUrl}/?token=${currentToken}`
503
+ : '';
504
+ const handleMessage = (event) => {
505
+ var _a, _b;
506
+ // Always call onEvent if provided with properly typed event
507
+ (_a = currentConfig.onEvent) === null || _a === void 0 ? void 0 : _a.call(currentConfig, event);
508
+ // Handle structured event format
509
+ const { action, data } = event;
510
+ // Legacy support for action-based handling
511
+ switch (action) {
512
+ case 'started':
513
+ if (!isReady)
514
+ setIsReady(true);
515
+ break;
516
+ case 'exited':
517
+ close();
518
+ break;
519
+ case 'errored':
520
+ if (!error && data) {
521
+ setError(data);
522
+ (_b = currentConfig.onError) === null || _b === void 0 ? void 0 : _b.call(currentConfig, data);
523
+ }
524
+ break;
525
+ }
526
+ };
527
+ const open = (options) => {
528
+ var _a;
529
+ setCurrentToken(options.token);
530
+ setIsOpen(true);
531
+ setError(null);
532
+ setIsReady(false);
533
+ (_a = currentConfig.onOpen) === null || _a === void 0 ? void 0 : _a.call(currentConfig);
534
+ };
535
+ const close = () => {
536
+ setTimeout(() => {
537
+ var _a;
538
+ setIsOpen(false);
539
+ setIsReady(false);
540
+ setCurrentToken(null);
541
+ (_a = currentConfig.onExit) === null || _a === void 0 ? void 0 : _a.call(currentConfig);
542
+ }, 500);
543
+ };
544
+ const updateConfig = (config) => {
545
+ setCurrentConfig(config);
546
+ };
547
+ const contextValue = {
548
+ isOpen,
549
+ isReady,
550
+ error,
551
+ open,
552
+ close,
553
+ updateConfig,
554
+ };
555
+ return (jsxRuntimeExports.jsxs(OpalContext.Provider, { value: contextValue, children: [children, isOpen && currentToken && (jsxRuntimeExports.jsx(OpalIframe, { token: currentToken, opalUrl: opalUrl, onMessage: handleMessage, onClose: close, style: {
556
+ position: 'fixed',
557
+ inset: 0,
558
+ width: '100%',
559
+ height: '100%',
560
+ border: 'none',
561
+ zIndex: 1000,
562
+ } }))] }));
563
+ }
564
+ function useOpalContext() {
565
+ const context = require$$0.useContext(OpalContext);
566
+ if (!context) {
567
+ throw new Error('useOpalContext must be used within an OpalProvider');
568
+ }
569
+ return context;
570
+ }
571
+
572
+ /**
573
+ * Hook for interacting with Opal within an OpalProvider context.
574
+ * This hook allows you to configure event handlers and open/close Opal sessions.
575
+ * Supports multiple modes (card_connect, connect, etc.) with flexible event handling.
576
+ *
577
+ * @example
578
+ * ```tsx
579
+ * const { open, close, isReady, isOpen, error } = useOpal({
580
+ * env: 'dev',
581
+ * onOpen: () => console.log('Opal opened'),
582
+ * onExit: () => console.log('Opal closed'),
583
+ * onEvent: (event) => {
584
+ * switch (event.type) {
585
+ * case 'opal.session.started':
586
+ * console.log('Session started');
587
+ * break;
588
+ * case 'card_connect.card.verified':
589
+ * console.log('Card verified:', event.data);
590
+ * break;
591
+ * }
592
+ * },
593
+ * onError: (error) => console.error('Opal error:', error),
594
+ * });
595
+ *
596
+ * // Open Opal with a token
597
+ * const handleOpenOpal = async () => {
598
+ * const token = await getOpalToken(); // Your token fetching logic
599
+ * open({ token });
600
+ * };
601
+ * ```
602
+ *
603
+ * @param config Configuration object with event handlers and environment settings
604
+ * @returns Object with open function and current state
605
+ */
606
+ function useOpal(config = {}) {
607
+ const context = useOpalContext();
608
+ // Update the provider's config when this hook's config changes
609
+ require$$0.useEffect(() => {
610
+ context.updateConfig(config);
611
+ }, []);
612
+ return {
613
+ open: context.open,
614
+ close: context.close,
615
+ isReady: context.isReady,
616
+ isOpen: context.isOpen,
617
+ error: context.error,
618
+ };
619
+ }
620
+
621
+ exports.OpalIframe = OpalIframe;
622
+ exports.OpalProvider = OpalProvider;
623
+ exports.useOpal = useOpal;
624
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/components/OpalIframe.tsx","../src/constants/index.ts","../src/components/OpalProvider.tsx","../src/hooks/useOpal.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n '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} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n",null,null,null,null],"names":["jsxRuntimeModule","require$$0","require$$1","useRef","useCallback","useEffect","_jsx","createContext","useState","_jsxs","useContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWA,CAAA,IAAI,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;AACjE,GAAE,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACpD,CAAA,SAAS,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE;GACvC,IAAI,GAAG,GAAG,IAAI;GACd,MAAM,KAAK,QAAQ,KAAK,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC;AAC9C,GAAE,MAAM,KAAK,MAAM,CAAC,GAAG,KAAK,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC;AAClD,GAAE,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