jsxc-react-hook 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,695 @@
1
+ import './style.css';
2
+ import Pe, { useEffect as dr } from "react";
3
+ var ne = { exports: {} }, L = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var Oe;
14
+ function vr() {
15
+ if (Oe)
16
+ return L;
17
+ Oe = 1;
18
+ var w = Pe, j = Symbol.for("react.element"), S = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, P = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, k = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function T(E, f, R) {
20
+ var d, y = {}, _ = null, x = null;
21
+ R !== void 0 && (_ = "" + R), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (x = f.ref);
22
+ for (d in f)
23
+ b.call(f, d) && !k.hasOwnProperty(d) && (y[d] = f[d]);
24
+ if (E && E.defaultProps)
25
+ for (d in f = E.defaultProps, f)
26
+ y[d] === void 0 && (y[d] = f[d]);
27
+ return { $$typeof: j, type: E, key: _, ref: x, props: y, _owner: P.current };
28
+ }
29
+ return L.Fragment = S, L.jsx = T, L.jsxs = T, L;
30
+ }
31
+ var U = {};
32
+ /**
33
+ * @license React
34
+ * react-jsx-runtime.development.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */
41
+ var Se;
42
+ function pr() {
43
+ return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var w = Pe, j = Symbol.for("react.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), E = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, I = "@@iterator";
45
+ function A(e) {
46
+ if (e === null || typeof e != "object")
47
+ return null;
48
+ var r = M && e[M] || e[I];
49
+ return typeof r == "function" ? r : null;
50
+ }
51
+ var g = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function l(e) {
53
+ {
54
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
55
+ t[n - 1] = arguments[n];
56
+ ke("error", e, t);
57
+ }
58
+ }
59
+ function ke(e, r, t) {
60
+ {
61
+ var n = g.ReactDebugCurrentFrame, i = n.getStackAddendum();
62
+ i !== "" && (r += "%s", t = t.concat([i]));
63
+ var s = t.map(function(o) {
64
+ return String(o);
65
+ });
66
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
67
+ }
68
+ }
69
+ var Ae = !1, De = !1, Fe = !1, Ie = !1, We = !1, ae;
70
+ ae = Symbol.for("react.module.reference");
71
+ function $e(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === b || e === k || We || e === P || e === R || e === d || Ie || e === x || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === y || e.$$typeof === T || e.$$typeof === E || e.$$typeof === f || // This needs to include all possible module reference object
73
+ // types supported by any Flight configuration anywhere since
74
+ // we don't know which Flight build this will end up being used
75
+ // with.
76
+ e.$$typeof === ae || e.getModuleId !== void 0));
77
+ }
78
+ function Ye(e, r, t) {
79
+ var n = e.displayName;
80
+ if (n)
81
+ return n;
82
+ var i = r.displayName || r.name || "";
83
+ return i !== "" ? t + "(" + i + ")" : t;
84
+ }
85
+ function oe(e) {
86
+ return e.displayName || "Context";
87
+ }
88
+ function m(e) {
89
+ if (e == null)
90
+ return null;
91
+ if (typeof e.tag == "number" && l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
92
+ return e.displayName || e.name || null;
93
+ if (typeof e == "string")
94
+ return e;
95
+ switch (e) {
96
+ case b:
97
+ return "Fragment";
98
+ case S:
99
+ return "Portal";
100
+ case k:
101
+ return "Profiler";
102
+ case P:
103
+ return "StrictMode";
104
+ case R:
105
+ return "Suspense";
106
+ case d:
107
+ return "SuspenseList";
108
+ }
109
+ if (typeof e == "object")
110
+ switch (e.$$typeof) {
111
+ case E:
112
+ var r = e;
113
+ return oe(r) + ".Consumer";
114
+ case T:
115
+ var t = e;
116
+ return oe(t._context) + ".Provider";
117
+ case f:
118
+ return Ye(e, e.render, "ForwardRef");
119
+ case y:
120
+ var n = e.displayName || null;
121
+ return n !== null ? n : m(e.type) || "Memo";
122
+ case _: {
123
+ var i = e, s = i._payload, o = i._init;
124
+ try {
125
+ return m(o(s));
126
+ } catch {
127
+ return null;
128
+ }
129
+ }
130
+ }
131
+ return null;
132
+ }
133
+ var C = Object.assign, W = 0, ie, se, ue, ce, le, fe, de;
134
+ function ve() {
135
+ }
136
+ ve.__reactDisabledLog = !0;
137
+ function Le() {
138
+ {
139
+ if (W === 0) {
140
+ ie = console.log, se = console.info, ue = console.warn, ce = console.error, le = console.group, fe = console.groupCollapsed, de = console.groupEnd;
141
+ var e = {
142
+ configurable: !0,
143
+ enumerable: !0,
144
+ value: ve,
145
+ writable: !0
146
+ };
147
+ Object.defineProperties(console, {
148
+ info: e,
149
+ log: e,
150
+ warn: e,
151
+ error: e,
152
+ group: e,
153
+ groupCollapsed: e,
154
+ groupEnd: e
155
+ });
156
+ }
157
+ W++;
158
+ }
159
+ }
160
+ function Ue() {
161
+ {
162
+ if (W--, W === 0) {
163
+ var e = {
164
+ configurable: !0,
165
+ enumerable: !0,
166
+ writable: !0
167
+ };
168
+ Object.defineProperties(console, {
169
+ log: C({}, e, {
170
+ value: ie
171
+ }),
172
+ info: C({}, e, {
173
+ value: se
174
+ }),
175
+ warn: C({}, e, {
176
+ value: ue
177
+ }),
178
+ error: C({}, e, {
179
+ value: ce
180
+ }),
181
+ group: C({}, e, {
182
+ value: le
183
+ }),
184
+ groupCollapsed: C({}, e, {
185
+ value: fe
186
+ }),
187
+ groupEnd: C({}, e, {
188
+ value: de
189
+ })
190
+ });
191
+ }
192
+ W < 0 && l("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
+ }
194
+ }
195
+ var z = g.ReactCurrentDispatcher, G;
196
+ function V(e, r, t) {
197
+ {
198
+ if (G === void 0)
199
+ try {
200
+ throw Error();
201
+ } catch (i) {
202
+ var n = i.stack.trim().match(/\n( *(at )?)/);
203
+ G = n && n[1] || "";
204
+ }
205
+ return `
206
+ ` + G + e;
207
+ }
208
+ }
209
+ var X = !1, N;
210
+ {
211
+ var Me = typeof WeakMap == "function" ? WeakMap : Map;
212
+ N = new Me();
213
+ }
214
+ function pe(e, r) {
215
+ if (!e || X)
216
+ return "";
217
+ {
218
+ var t = N.get(e);
219
+ if (t !== void 0)
220
+ return t;
221
+ }
222
+ var n;
223
+ X = !0;
224
+ var i = Error.prepareStackTrace;
225
+ Error.prepareStackTrace = void 0;
226
+ var s;
227
+ s = z.current, z.current = null, Le();
228
+ try {
229
+ if (r) {
230
+ var o = function() {
231
+ throw Error();
232
+ };
233
+ if (Object.defineProperty(o.prototype, "props", {
234
+ set: function() {
235
+ throw Error();
236
+ }
237
+ }), typeof Reflect == "object" && Reflect.construct) {
238
+ try {
239
+ Reflect.construct(o, []);
240
+ } catch (p) {
241
+ n = p;
242
+ }
243
+ Reflect.construct(e, [], o);
244
+ } else {
245
+ try {
246
+ o.call();
247
+ } catch (p) {
248
+ n = p;
249
+ }
250
+ e.call(o.prototype);
251
+ }
252
+ } else {
253
+ try {
254
+ throw Error();
255
+ } catch (p) {
256
+ n = p;
257
+ }
258
+ e();
259
+ }
260
+ } catch (p) {
261
+ if (p && n && typeof p.stack == "string") {
262
+ for (var a = p.stack.split(`
263
+ `), v = n.stack.split(`
264
+ `), u = a.length - 1, c = v.length - 1; u >= 1 && c >= 0 && a[u] !== v[c]; )
265
+ c--;
266
+ for (; u >= 1 && c >= 0; u--, c--)
267
+ if (a[u] !== v[c]) {
268
+ if (u !== 1 || c !== 1)
269
+ do
270
+ if (u--, c--, c < 0 || a[u] !== v[c]) {
271
+ var h = `
272
+ ` + a[u].replace(" at new ", " at ");
273
+ return e.displayName && h.includes("<anonymous>") && (h = h.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, h), h;
274
+ }
275
+ while (u >= 1 && c >= 0);
276
+ break;
277
+ }
278
+ }
279
+ } finally {
280
+ X = !1, z.current = s, Ue(), Error.prepareStackTrace = i;
281
+ }
282
+ var F = e ? e.displayName || e.name : "", O = F ? V(F) : "";
283
+ return typeof e == "function" && N.set(e, O), O;
284
+ }
285
+ function Ve(e, r, t) {
286
+ return pe(e, !1);
287
+ }
288
+ function Ne(e) {
289
+ var r = e.prototype;
290
+ return !!(r && r.isReactComponent);
291
+ }
292
+ function J(e, r, t) {
293
+ if (e == null)
294
+ return "";
295
+ if (typeof e == "function")
296
+ return pe(e, Ne(e));
297
+ if (typeof e == "string")
298
+ return V(e);
299
+ switch (e) {
300
+ case R:
301
+ return V("Suspense");
302
+ case d:
303
+ return V("SuspenseList");
304
+ }
305
+ if (typeof e == "object")
306
+ switch (e.$$typeof) {
307
+ case f:
308
+ return Ve(e.render);
309
+ case y:
310
+ return J(e.type, r, t);
311
+ case _: {
312
+ var n = e, i = n._payload, s = n._init;
313
+ try {
314
+ return J(s(i), r, t);
315
+ } catch {
316
+ }
317
+ }
318
+ }
319
+ return "";
320
+ }
321
+ var $ = Object.prototype.hasOwnProperty, ge = {}, he = g.ReactDebugCurrentFrame;
322
+ function q(e) {
323
+ if (e) {
324
+ var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
325
+ he.setExtraStackFrame(t);
326
+ } else
327
+ he.setExtraStackFrame(null);
328
+ }
329
+ function Je(e, r, t, n, i) {
330
+ {
331
+ var s = Function.call.bind($);
332
+ for (var o in e)
333
+ if (s(e, o)) {
334
+ var a = void 0;
335
+ try {
336
+ if (typeof e[o] != "function") {
337
+ var v = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
+ throw v.name = "Invariant Violation", v;
339
+ }
340
+ a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
+ } catch (u) {
342
+ a = u;
343
+ }
344
+ a && !(a instanceof Error) && (q(i), l("%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).", n || "React class", t, o, typeof a), q(null)), a instanceof Error && !(a.message in ge) && (ge[a.message] = !0, q(i), l("Failed %s type: %s", t, a.message), q(null));
345
+ }
346
+ }
347
+ }
348
+ var qe = Array.isArray;
349
+ function H(e) {
350
+ return qe(e);
351
+ }
352
+ function Be(e) {
353
+ {
354
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
355
+ return t;
356
+ }
357
+ }
358
+ function Ke(e) {
359
+ try {
360
+ return ye(e), !1;
361
+ } catch {
362
+ return !0;
363
+ }
364
+ }
365
+ function ye(e) {
366
+ return "" + e;
367
+ }
368
+ function me(e) {
369
+ if (Ke(e))
370
+ return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ye(e);
371
+ }
372
+ var Y = g.ReactCurrentOwner, ze = {
373
+ key: !0,
374
+ ref: !0,
375
+ __self: !0,
376
+ __source: !0
377
+ }, be, Ee, Z;
378
+ Z = {};
379
+ function Ge(e) {
380
+ if ($.call(e, "ref")) {
381
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
382
+ if (r && r.isReactWarning)
383
+ return !1;
384
+ }
385
+ return e.ref !== void 0;
386
+ }
387
+ function Xe(e) {
388
+ if ($.call(e, "key")) {
389
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
390
+ if (r && r.isReactWarning)
391
+ return !1;
392
+ }
393
+ return e.key !== void 0;
394
+ }
395
+ function He(e, r) {
396
+ if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
397
+ var t = m(Y.current.type);
398
+ Z[t] || (l('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', m(Y.current.type), e.ref), Z[t] = !0);
399
+ }
400
+ }
401
+ function Ze(e, r) {
402
+ {
403
+ var t = function() {
404
+ be || (be = !0, l("%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)", r));
405
+ };
406
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
407
+ get: t,
408
+ configurable: !0
409
+ });
410
+ }
411
+ }
412
+ function Qe(e, r) {
413
+ {
414
+ var t = function() {
415
+ Ee || (Ee = !0, l("%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)", r));
416
+ };
417
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
418
+ get: t,
419
+ configurable: !0
420
+ });
421
+ }
422
+ }
423
+ var er = function(e, r, t, n, i, s, o) {
424
+ var a = {
425
+ // This tag allows us to uniquely identify this as a React Element
426
+ $$typeof: j,
427
+ // Built-in properties that belong on the element
428
+ type: e,
429
+ key: r,
430
+ ref: t,
431
+ props: o,
432
+ // Record the component responsible for creating this element.
433
+ _owner: s
434
+ };
435
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
436
+ configurable: !1,
437
+ enumerable: !1,
438
+ writable: !0,
439
+ value: !1
440
+ }), Object.defineProperty(a, "_self", {
441
+ configurable: !1,
442
+ enumerable: !1,
443
+ writable: !1,
444
+ value: n
445
+ }), Object.defineProperty(a, "_source", {
446
+ configurable: !1,
447
+ enumerable: !1,
448
+ writable: !1,
449
+ value: i
450
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
451
+ };
452
+ function rr(e, r, t, n, i) {
453
+ {
454
+ var s, o = {}, a = null, v = null;
455
+ t !== void 0 && (me(t), a = "" + t), Xe(r) && (me(r.key), a = "" + r.key), Ge(r) && (v = r.ref, He(r, i));
456
+ for (s in r)
457
+ $.call(r, s) && !ze.hasOwnProperty(s) && (o[s] = r[s]);
458
+ if (e && e.defaultProps) {
459
+ var u = e.defaultProps;
460
+ for (s in u)
461
+ o[s] === void 0 && (o[s] = u[s]);
462
+ }
463
+ if (a || v) {
464
+ var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
465
+ a && Ze(o, c), v && Qe(o, c);
466
+ }
467
+ return er(e, a, v, i, n, Y.current, o);
468
+ }
469
+ }
470
+ var Q = g.ReactCurrentOwner, Re = g.ReactDebugCurrentFrame;
471
+ function D(e) {
472
+ if (e) {
473
+ var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
474
+ Re.setExtraStackFrame(t);
475
+ } else
476
+ Re.setExtraStackFrame(null);
477
+ }
478
+ var ee;
479
+ ee = !1;
480
+ function re(e) {
481
+ return typeof e == "object" && e !== null && e.$$typeof === j;
482
+ }
483
+ function _e() {
484
+ {
485
+ if (Q.current) {
486
+ var e = m(Q.current.type);
487
+ if (e)
488
+ return `
489
+
490
+ Check the render method of \`` + e + "`.";
491
+ }
492
+ return "";
493
+ }
494
+ }
495
+ function tr(e) {
496
+ return "";
497
+ }
498
+ var we = {};
499
+ function nr(e) {
500
+ {
501
+ var r = _e();
502
+ if (!r) {
503
+ var t = typeof e == "string" ? e : e.displayName || e.name;
504
+ t && (r = `
505
+
506
+ Check the top-level render call using <` + t + ">.");
507
+ }
508
+ return r;
509
+ }
510
+ }
511
+ function je(e, r) {
512
+ {
513
+ if (!e._store || e._store.validated || e.key != null)
514
+ return;
515
+ e._store.validated = !0;
516
+ var t = nr(r);
517
+ if (we[t])
518
+ return;
519
+ we[t] = !0;
520
+ var n = "";
521
+ e && e._owner && e._owner !== Q.current && (n = " It was passed a child from " + m(e._owner.type) + "."), D(e), l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
522
+ }
523
+ }
524
+ function xe(e, r) {
525
+ {
526
+ if (typeof e != "object")
527
+ return;
528
+ if (H(e))
529
+ for (var t = 0; t < e.length; t++) {
530
+ var n = e[t];
531
+ re(n) && je(n, r);
532
+ }
533
+ else if (re(e))
534
+ e._store && (e._store.validated = !0);
535
+ else if (e) {
536
+ var i = A(e);
537
+ if (typeof i == "function" && i !== e.entries)
538
+ for (var s = i.call(e), o; !(o = s.next()).done; )
539
+ re(o.value) && je(o.value, r);
540
+ }
541
+ }
542
+ }
543
+ function ar(e) {
544
+ {
545
+ var r = e.type;
546
+ if (r == null || typeof r == "string")
547
+ return;
548
+ var t;
549
+ if (typeof r == "function")
550
+ t = r.propTypes;
551
+ else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
552
+ // Inner props are checked in the reconciler.
553
+ r.$$typeof === y))
554
+ t = r.propTypes;
555
+ else
556
+ return;
557
+ if (t) {
558
+ var n = m(r);
559
+ Je(t, e.props, "prop", n, e);
560
+ } else if (r.PropTypes !== void 0 && !ee) {
561
+ ee = !0;
562
+ var i = m(r);
563
+ l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
564
+ }
565
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
+ }
567
+ }
568
+ function or(e) {
569
+ {
570
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
571
+ var n = r[t];
572
+ if (n !== "children" && n !== "key") {
573
+ D(e), l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
574
+ break;
575
+ }
576
+ }
577
+ e.ref !== null && (D(e), l("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
578
+ }
579
+ }
580
+ var Te = {};
581
+ function Ce(e, r, t, n, i, s) {
582
+ {
583
+ var o = $e(e);
584
+ if (!o) {
585
+ var a = "";
586
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
+ var v = tr();
588
+ v ? a += v : a += _e();
589
+ var u;
590
+ e === null ? u = "null" : H(e) ? u = "array" : e !== void 0 && e.$$typeof === j ? (u = "<" + (m(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, a);
591
+ }
592
+ var c = rr(e, r, t, i, s);
593
+ if (c == null)
594
+ return c;
595
+ if (o) {
596
+ var h = r.children;
597
+ if (h !== void 0)
598
+ if (n)
599
+ if (H(h)) {
600
+ for (var F = 0; F < h.length; F++)
601
+ xe(h[F], e);
602
+ Object.freeze && Object.freeze(h);
603
+ } else
604
+ l("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
+ else
606
+ xe(h, e);
607
+ }
608
+ if ($.call(r, "key")) {
609
+ var O = m(e), p = Object.keys(r).filter(function(fr) {
610
+ return fr !== "key";
611
+ }), te = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
612
+ if (!Te[O + te]) {
613
+ var lr = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
614
+ l(`A props object containing a "key" prop is being spread into JSX:
615
+ let props = %s;
616
+ <%s {...props} />
617
+ React keys must be passed directly to JSX without using spread:
618
+ let props = %s;
619
+ <%s key={someKey} {...props} />`, te, O, lr, O), Te[O + te] = !0;
620
+ }
621
+ }
622
+ return e === b ? or(c) : ar(c), c;
623
+ }
624
+ }
625
+ function ir(e, r, t) {
626
+ return Ce(e, r, t, !0);
627
+ }
628
+ function sr(e, r, t) {
629
+ return Ce(e, r, t, !1);
630
+ }
631
+ var ur = sr, cr = ir;
632
+ U.Fragment = b, U.jsx = ur, U.jsxs = cr;
633
+ }()), U;
634
+ }
635
+ process.env.NODE_ENV === "production" ? ne.exports = vr() : ne.exports = pr();
636
+ var B = ne.exports;
637
+ let K = "";
638
+ async function hr(w) {
639
+ if (!K)
640
+ throw "user jid is empty, please initialize jsxc";
641
+ await window.jsxc.getAccount(K).account.getConnection().getRosterService().addContact(new window.jsxc.JID(w), ""), window.jsxc.getAccount(K).getContact(w).openChatWindow();
642
+ }
643
+ function yr(w) {
644
+ const j = "roster-append", S = "windowlist-append", b = "dialog-append", {
645
+ jqueryUrl: P = "https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js",
646
+ marginTop: k = "40px",
647
+ marginLeft: T = "40px",
648
+ marginBottom: E = "40px",
649
+ marginRight: f = "40px",
650
+ contactId: R = null,
651
+ showMenu: d,
652
+ fullscreen: y,
653
+ boshUrl: _,
654
+ id: x,
655
+ pw: M
656
+ } = w;
657
+ return K = x, dr(() => {
658
+ if (window.jsxc) {
659
+ R && window.jsxc.getAccount(x).getContact(R).openChatWindow();
660
+ return;
661
+ }
662
+ y && (document.getElementsByTagName("body")[0].className = "jsxc-fullscreen");
663
+ const I = document.createElement("script");
664
+ I.type = "text/javascript", I.src = P, document.head.appendChild(I);
665
+ let A = document.createElement("script");
666
+ A.type = "text/javascript", A.src = "/jsxc.bundle.js", document.head.appendChild(A);
667
+ const g = document.documentElement;
668
+ g.style.setProperty("--jsxc-margin-top", k), g.style.setProperty("--jsxc-margin-left", T), g.style.setProperty("--jsxc-margin-bottom", E), g.style.setProperty("--jsxc-margin-right", f), A.onload = () => {
669
+ localStorage.removeItem("jsxc2:accounts");
670
+ let l = new window.JSXC({
671
+ /* loadConnectionOptions: function(username: any, password: any) {
672
+ return Promise.resolve({
673
+ xmpp: {
674
+ // url: 'https://localhost:5443/bosh',
675
+ // domain: 'localhost',
676
+ }
677
+ });
678
+ },*/
679
+ rosterAppend: "#" + j,
680
+ dialogAppend: "#" + b,
681
+ windowListAppend: "#" + S
682
+ });
683
+ window.jsxc = l, l.start(_, x, M);
684
+ }, d === "yes" && (g.style.setProperty("--jsxc-show-menu", "none"), console.log("not show jsxc menu"));
685
+ }, []), // <Keepalive>
686
+ /* @__PURE__ */ B.jsxs("div", { id: "jsxc-containers", style: { width: "100%", height: "100%" }, children: [
687
+ /* @__PURE__ */ B.jsx("div", { style: { width: "100%", height: "100%" }, id: j }),
688
+ /* @__PURE__ */ B.jsx("div", { style: { width: "100%", height: "100%" }, id: b }),
689
+ /* @__PURE__ */ B.jsx("div", { style: { width: "100%", height: "100%" }, id: S })
690
+ ] });
691
+ }
692
+ export {
693
+ yr as Jsxc,
694
+ hr as directOpenChatWindow
695
+ };