@connorpham/live-chat-widget 17.0.3 → 17.0.5
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/cellcast-bot-widget.es.js +1115 -1113
- package/dist/cellcast-bot-widget.umd.js +12 -12
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var lD = (u, D, f) =>
|
|
4
|
-
import
|
|
1
|
+
var o0 = Object.defineProperty;
|
|
2
|
+
var d0 = (u, D, f) => D in u ? o0(u, D, { enumerable: !0, configurable: !0, writable: !0, value: f }) : u[D] = f;
|
|
3
|
+
var lD = (u, D, f) => d0(u, typeof D != "symbol" ? D + "" : D, f);
|
|
4
|
+
import sf, { createContext as qu, useRef as mu, useEffect as Z, useContext as Hu, useState as U, useCallback as Mu, useMemo as C0 } from "react";
|
|
5
5
|
var dD = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
|
-
function
|
|
6
|
+
function Ff(u) {
|
|
7
7
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var WD = { exports: {} }, eD = {};
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
14
|
*/
|
|
15
|
-
var PD,
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var PD, Of;
|
|
16
|
+
function Xf() {
|
|
17
|
+
if (Of) return PD;
|
|
18
|
+
Of = 1;
|
|
19
19
|
var u = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
|
|
20
20
|
function e(n) {
|
|
21
21
|
if (n == null)
|
|
@@ -66,11 +66,11 @@ function Jf() {
|
|
|
66
66
|
* This source code is licensed under the MIT license found in the
|
|
67
67
|
* LICENSE file in the root directory of this source tree.
|
|
68
68
|
*/
|
|
69
|
-
var
|
|
70
|
-
function
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
var u =
|
|
69
|
+
var Rf;
|
|
70
|
+
function c0() {
|
|
71
|
+
if (Rf) return eD;
|
|
72
|
+
Rf = 1, Xf();
|
|
73
|
+
var u = sf, D = 60103;
|
|
74
74
|
if (eD.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
75
75
|
var f = Symbol.for;
|
|
76
76
|
D = f("react.element"), eD.Fragment = f("react.fragment");
|
|
@@ -85,9 +85,9 @@ function C0() {
|
|
|
85
85
|
}
|
|
86
86
|
return eD.jsx = r, eD.jsxs = r, eD;
|
|
87
87
|
}
|
|
88
|
-
var ID = {},
|
|
89
|
-
function
|
|
90
|
-
return
|
|
88
|
+
var ID = {}, Pf;
|
|
89
|
+
function l0() {
|
|
90
|
+
return Pf || (Pf = 1, function(u) {
|
|
91
91
|
var D = {};
|
|
92
92
|
/** @license React v17.0.2
|
|
93
93
|
* react-jsx-runtime.development.js
|
|
@@ -98,7 +98,7 @@ function c0() {
|
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
99
|
*/
|
|
100
100
|
D.NODE_ENV !== "production" && function() {
|
|
101
|
-
var f =
|
|
101
|
+
var f = sf, e = Xf(), t = 60103, n = 60106;
|
|
102
102
|
u.Fragment = 60107;
|
|
103
103
|
var r = 60108, s = 60114, F = 60109, d = 60110, o = 60112, c = 60113, l = 60120, j = 60115, y = 60116, C = 60121, v = 60122, x = 60117, m = 60129, T = 60131;
|
|
104
104
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
@@ -191,7 +191,7 @@ function c0() {
|
|
|
191
191
|
function z() {
|
|
192
192
|
}
|
|
193
193
|
z.__reactDisabledLog = !0;
|
|
194
|
-
function
|
|
194
|
+
function Q() {
|
|
195
195
|
{
|
|
196
196
|
if (h === 0) {
|
|
197
197
|
A = console.log, p = console.info, R = console.warn, N = console.error, M = console.group, V = console.groupCollapsed, J = console.groupEnd;
|
|
@@ -281,7 +281,7 @@ function c0() {
|
|
|
281
281
|
var G = Error.prepareStackTrace;
|
|
282
282
|
Error.prepareStackTrace = void 0;
|
|
283
283
|
var K;
|
|
284
|
-
K = cu.current, cu.current = null,
|
|
284
|
+
K = cu.current, cu.current = null, Q();
|
|
285
285
|
try {
|
|
286
286
|
if (b) {
|
|
287
287
|
var Y = function() {
|
|
@@ -336,8 +336,8 @@ function c0() {
|
|
|
336
336
|
} finally {
|
|
337
337
|
ru = !1, cu.current = K, tu(), Error.prepareStackTrace = G;
|
|
338
338
|
}
|
|
339
|
-
var fD = i ? i.displayName || i.name : "",
|
|
340
|
-
return typeof i == "function" && du.set(i,
|
|
339
|
+
var fD = i ? i.displayName || i.name : "", Nf = fD ? Bu(fD) : "";
|
|
340
|
+
return typeof i == "function" && du.set(i, Nf), Nf;
|
|
341
341
|
}
|
|
342
342
|
function S(i, b, w) {
|
|
343
343
|
return Iu(i, !1);
|
|
@@ -385,7 +385,7 @@ function c0() {
|
|
|
385
385
|
} else
|
|
386
386
|
gu.setExtraStackFrame(null);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function K1(i, b, w, L, G) {
|
|
389
389
|
{
|
|
390
390
|
var K = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
391
391
|
for (var Y in i)
|
|
@@ -404,13 +404,13 @@ function c0() {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
var
|
|
407
|
+
var yf = q.ReactCurrentOwner, TD = Object.prototype.hasOwnProperty, J1 = {
|
|
408
408
|
key: !0,
|
|
409
409
|
ref: !0,
|
|
410
410
|
__self: !0,
|
|
411
411
|
__source: !0
|
|
412
|
-
},
|
|
413
|
-
function
|
|
412
|
+
}, vf, wf;
|
|
413
|
+
function G1(i) {
|
|
414
414
|
if (TD.call(i, "ref")) {
|
|
415
415
|
var b = Object.getOwnPropertyDescriptor(i, "ref").get;
|
|
416
416
|
if (b && b.isReactWarning)
|
|
@@ -418,7 +418,7 @@ function c0() {
|
|
|
418
418
|
}
|
|
419
419
|
return i.ref !== void 0;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function X1(i) {
|
|
422
422
|
if (TD.call(i, "key")) {
|
|
423
423
|
var b = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
424
424
|
if (b && b.isReactWarning)
|
|
@@ -426,13 +426,13 @@ function c0() {
|
|
|
426
426
|
}
|
|
427
427
|
return i.key !== void 0;
|
|
428
428
|
}
|
|
429
|
-
function X1(i, b) {
|
|
430
|
-
typeof i.ref == "string" && _f.current;
|
|
431
|
-
}
|
|
432
429
|
function Z1(i, b) {
|
|
430
|
+
typeof i.ref == "string" && yf.current;
|
|
431
|
+
}
|
|
432
|
+
function Q1(i, b) {
|
|
433
433
|
{
|
|
434
434
|
var w = function() {
|
|
435
|
-
|
|
435
|
+
vf || (vf = !0, g("%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)", b));
|
|
436
436
|
};
|
|
437
437
|
w.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
438
438
|
get: w,
|
|
@@ -440,10 +440,10 @@ function c0() {
|
|
|
440
440
|
});
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function u0(i, b) {
|
|
444
444
|
{
|
|
445
445
|
var w = function() {
|
|
446
|
-
|
|
446
|
+
wf || (wf = !0, g("%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)", b));
|
|
447
447
|
};
|
|
448
448
|
w.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
|
449
449
|
get: w,
|
|
@@ -451,7 +451,7 @@ function c0() {
|
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var D0 = function(i, b, w, L, G, K, Y) {
|
|
455
455
|
var H = {
|
|
456
456
|
// This tag allows us to uniquely identify this as a React Element
|
|
457
457
|
$$typeof: t,
|
|
@@ -480,12 +480,12 @@ function c0() {
|
|
|
480
480
|
value: G
|
|
481
481
|
}), Object.freeze && (Object.freeze(H.props), Object.freeze(H)), H;
|
|
482
482
|
};
|
|
483
|
-
function
|
|
483
|
+
function f0(i, b, w, L, G) {
|
|
484
484
|
{
|
|
485
485
|
var K, Y = {}, H = null, bu = null;
|
|
486
|
-
w !== void 0 && (H = "" + w),
|
|
486
|
+
w !== void 0 && (H = "" + w), X1(b) && (H = "" + b.key), G1(b) && (bu = b.ref, Z1(b, G));
|
|
487
487
|
for (K in b)
|
|
488
|
-
TD.call(b, K) && !
|
|
488
|
+
TD.call(b, K) && !J1.hasOwnProperty(K) && (Y[K] = b[K]);
|
|
489
489
|
if (i && i.defaultProps) {
|
|
490
490
|
var nu = i.defaultProps;
|
|
491
491
|
for (K in nu)
|
|
@@ -493,25 +493,25 @@ function c0() {
|
|
|
493
493
|
}
|
|
494
494
|
if (H || bu) {
|
|
495
495
|
var su = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
|
496
|
-
H &&
|
|
496
|
+
H && Q1(Y, su), bu && u0(Y, su);
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return D0(i, H, bu, G, L, yf.current, Y);
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
var ND = q.ReactCurrentOwner,
|
|
501
|
+
var ND = q.ReactCurrentOwner, Af = q.ReactDebugCurrentFrame;
|
|
502
502
|
function DD(i) {
|
|
503
503
|
if (i) {
|
|
504
504
|
var b = i._owner, w = au(i.type, i._source, b ? b.type : null);
|
|
505
|
-
|
|
505
|
+
Af.setExtraStackFrame(w);
|
|
506
506
|
} else
|
|
507
|
-
|
|
507
|
+
Af.setExtraStackFrame(null);
|
|
508
508
|
}
|
|
509
509
|
var OD;
|
|
510
510
|
OD = !1;
|
|
511
511
|
function RD(i) {
|
|
512
512
|
return typeof i == "object" && i !== null && i.$$typeof === t;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function xf() {
|
|
515
515
|
{
|
|
516
516
|
if (ND.current) {
|
|
517
517
|
var i = E(ND.current.type);
|
|
@@ -523,13 +523,13 @@ Check the render method of \`` + i + "`.";
|
|
|
523
523
|
return "";
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function e0(i) {
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
|
-
var
|
|
530
|
-
function
|
|
529
|
+
var kf = {};
|
|
530
|
+
function t0(i) {
|
|
531
531
|
{
|
|
532
|
-
var b =
|
|
532
|
+
var b = xf();
|
|
533
533
|
if (!b) {
|
|
534
534
|
var w = typeof i == "string" ? i : i.displayName || i.name;
|
|
535
535
|
w && (b = `
|
|
@@ -539,27 +539,27 @@ Check the top-level render call using <` + w + ">.");
|
|
|
539
539
|
return b;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function jf(i, b) {
|
|
543
543
|
{
|
|
544
544
|
if (!i._store || i._store.validated || i.key != null)
|
|
545
545
|
return;
|
|
546
546
|
i._store.validated = !0;
|
|
547
|
-
var w =
|
|
548
|
-
if (
|
|
547
|
+
var w = t0(b);
|
|
548
|
+
if (kf[w])
|
|
549
549
|
return;
|
|
550
|
-
|
|
550
|
+
kf[w] = !0;
|
|
551
551
|
var L = "";
|
|
552
552
|
i && i._owner && i._owner !== ND.current && (L = " It was passed a child from " + E(i._owner.type) + "."), DD(i), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, L), DD(null);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Sf(i, b) {
|
|
556
556
|
{
|
|
557
557
|
if (typeof i != "object")
|
|
558
558
|
return;
|
|
559
559
|
if (Array.isArray(i))
|
|
560
560
|
for (var w = 0; w < i.length; w++) {
|
|
561
561
|
var L = i[w];
|
|
562
|
-
RD(L) &&
|
|
562
|
+
RD(L) && jf(L, b);
|
|
563
563
|
}
|
|
564
564
|
else if (RD(i))
|
|
565
565
|
i._store && (i._store.validated = !0);
|
|
@@ -567,11 +567,11 @@ Check the top-level render call using <` + w + ">.");
|
|
|
567
567
|
var G = P(i);
|
|
568
568
|
if (typeof G == "function" && G !== i.entries)
|
|
569
569
|
for (var K = G.call(i), Y; !(Y = K.next()).done; )
|
|
570
|
-
RD(Y.value) &&
|
|
570
|
+
RD(Y.value) && jf(Y.value, b);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function n0(i) {
|
|
575
575
|
{
|
|
576
576
|
var b = i.type;
|
|
577
577
|
if (b == null || typeof b == "string")
|
|
@@ -587,7 +587,7 @@ Check the top-level render call using <` + w + ">.");
|
|
|
587
587
|
return;
|
|
588
588
|
if (w) {
|
|
589
589
|
var L = E(b);
|
|
590
|
-
|
|
590
|
+
K1(w, i.props, "prop", L, i);
|
|
591
591
|
} else if (b.PropTypes !== void 0 && !OD) {
|
|
592
592
|
OD = !0;
|
|
593
593
|
var G = E(b);
|
|
@@ -596,7 +596,7 @@ Check the top-level render call using <` + w + ">.");
|
|
|
596
596
|
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function r0(i) {
|
|
600
600
|
{
|
|
601
601
|
for (var b = Object.keys(i.props), w = 0; w < b.length; w++) {
|
|
602
602
|
var L = b[w];
|
|
@@ -608,18 +608,18 @@ Check the top-level render call using <` + w + ">.");
|
|
|
608
608
|
i.ref !== null && (DD(i), g("Invalid attribute `ref` supplied to `React.Fragment`."), DD(null));
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Tf(i, b, w, L, G, K) {
|
|
612
612
|
{
|
|
613
613
|
var Y = hu(i);
|
|
614
614
|
if (!Y) {
|
|
615
615
|
var H = "";
|
|
616
616
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (H += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
617
|
-
var bu =
|
|
618
|
-
bu ? H += bu : H +=
|
|
617
|
+
var bu = e0();
|
|
618
|
+
bu ? H += bu : H += xf();
|
|
619
619
|
var nu;
|
|
620
620
|
i === null ? nu = "null" : Array.isArray(i) ? nu = "array" : i !== void 0 && i.$$typeof === t ? (nu = "<" + (E(i.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : nu = typeof i, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", nu, H);
|
|
621
621
|
}
|
|
622
|
-
var su =
|
|
622
|
+
var su = f0(i, b, w, G, K);
|
|
623
623
|
if (su == null)
|
|
624
624
|
return su;
|
|
625
625
|
if (Y) {
|
|
@@ -628,38 +628,38 @@ Check the top-level render call using <` + w + ">.");
|
|
|
628
628
|
if (L)
|
|
629
629
|
if (Array.isArray(Lu)) {
|
|
630
630
|
for (var fD = 0; fD < Lu.length; fD++)
|
|
631
|
-
|
|
631
|
+
Sf(Lu[fD], i);
|
|
632
632
|
Object.freeze && Object.freeze(Lu);
|
|
633
633
|
} else
|
|
634
634
|
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
635
635
|
else
|
|
636
|
-
|
|
636
|
+
Sf(Lu, i);
|
|
637
637
|
}
|
|
638
|
-
return i === u.Fragment ?
|
|
638
|
+
return i === u.Fragment ? r0(su) : n0(su), su;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
function r0(i, b, w) {
|
|
642
|
-
return Sf(i, b, w, !0);
|
|
643
|
-
}
|
|
644
641
|
function a0(i, b, w) {
|
|
645
|
-
return
|
|
642
|
+
return Tf(i, b, w, !0);
|
|
643
|
+
}
|
|
644
|
+
function s0(i, b, w) {
|
|
645
|
+
return Tf(i, b, w, !1);
|
|
646
646
|
}
|
|
647
|
-
var
|
|
648
|
-
u.jsx =
|
|
647
|
+
var F0 = s0, i0 = a0;
|
|
648
|
+
u.jsx = F0, u.jsxs = i0;
|
|
649
649
|
}();
|
|
650
650
|
}(ID)), ID;
|
|
651
651
|
}
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
var a =
|
|
655
|
-
const
|
|
652
|
+
var E0 = {};
|
|
653
|
+
E0.NODE_ENV === "production" ? WD.exports = c0() : WD.exports = l0();
|
|
654
|
+
var a = WD.exports;
|
|
655
|
+
const Zf = qu(void 0), Qf = ({
|
|
656
656
|
children: u,
|
|
657
657
|
channelName: D
|
|
658
658
|
}) => {
|
|
659
659
|
const f = mu(
|
|
660
660
|
new BroadcastChannel(D)
|
|
661
661
|
), e = mu({});
|
|
662
|
-
|
|
662
|
+
Z(() => {
|
|
663
663
|
const r = ({ data: s }) => {
|
|
664
664
|
e.current[s.event].forEach((F) => F(s));
|
|
665
665
|
};
|
|
@@ -677,7 +677,7 @@ const Gf = qu(void 0), Xf = ({
|
|
|
677
677
|
f.current.postMessage(r);
|
|
678
678
|
};
|
|
679
679
|
return /* @__PURE__ */ a.jsx(
|
|
680
|
-
|
|
680
|
+
Zf.Provider,
|
|
681
681
|
{
|
|
682
682
|
value: {
|
|
683
683
|
subscribe: t,
|
|
@@ -686,50 +686,50 @@ const Gf = qu(void 0), Xf = ({
|
|
|
686
686
|
children: u
|
|
687
687
|
}
|
|
688
688
|
);
|
|
689
|
-
},
|
|
690
|
-
const u = Hu(
|
|
689
|
+
}, h0 = () => {
|
|
690
|
+
const u = Hu(Zf);
|
|
691
691
|
if (!u)
|
|
692
692
|
throw new Error(
|
|
693
693
|
"useBroadcastChannel must be used within a BroadcastChannelProvider"
|
|
694
694
|
);
|
|
695
695
|
return u;
|
|
696
|
-
},
|
|
697
|
-
const { subscribe: D } =
|
|
698
|
-
|
|
696
|
+
}, b0 = (...u) => {
|
|
697
|
+
const { subscribe: D } = h0();
|
|
698
|
+
Z(() => {
|
|
699
699
|
D(...u);
|
|
700
700
|
}, [D, ...u]);
|
|
701
701
|
};
|
|
702
|
-
var
|
|
703
|
-
const
|
|
702
|
+
var YD = /* @__PURE__ */ ((u) => (u.message = "message", u.delivery = "delivery", u.read = "read", u.typing = "typing", u.follow = "follow", u.echo = "echo", u.unknown = "", u))(YD || {}), uu = /* @__PURE__ */ ((u) => (u.sent = "sent", u.received = "received", u))(uu || {}), u1 = /* @__PURE__ */ ((u) => (u.text = "text", u.location = "location", u))(u1 || {}), Au = /* @__PURE__ */ ((u) => (u.text = "text", u.quick_reply = "quick_reply", u.postback = "postback", u.location = "location", u.file = "file", u.notify = "notify", u))(Au || {}), KD = /* @__PURE__ */ ((u) => (u.text = "text", u.buttons = "buttons", u.quick_replies = "quick_replies", u.file = "file", u.list = "list", u.carousel = "carousel", u))(KD || {}), iD = /* @__PURE__ */ ((u) => (u[u.sent = 0] = "sent", u[u.sending = 1] = "sending", u[u.uploading = 2] = "uploading", u))(iD || {}), tD = /* @__PURE__ */ ((u) => (u[u.disconnected = 0] = "disconnected", u[u.wantToConnect = 1] = "wantToConnect", u[u.tryingToConnect = 2] = "tryingToConnect", u[u.connected = 3] = "connected", u))(tD || {}), aD = {};
|
|
703
|
+
const D1 = {
|
|
704
704
|
apiUrl: aD.REACT_APP_WIDGET_API_URL || "http://localhost:4000",
|
|
705
705
|
channel: aD.REACT_APP_WIDGET_CHANNEL || "console-channel",
|
|
706
706
|
language: "en",
|
|
707
707
|
maxUploadSize: aD.UPLOAD_MAX_SIZE_IN_BYTES ?? "" ? Number(aD.UPLOAD_MAX_SIZE_IN_BYTES) : 20 * 1024 * 1024,
|
|
708
708
|
// 20 MB in bytes
|
|
709
709
|
ownerId: aD.REACT_APP_WIDGET_OWNER_ID || "68342cec1e3cef0065f1b563"
|
|
710
|
-
},
|
|
710
|
+
}, f1 = qu(D1), e1 = ({ children: u, ...D }) => {
|
|
711
711
|
const f = mu({
|
|
712
|
-
...
|
|
712
|
+
...D1,
|
|
713
713
|
...D
|
|
714
714
|
});
|
|
715
|
-
return /* @__PURE__ */ a.jsx(
|
|
715
|
+
return /* @__PURE__ */ a.jsx(f1.Provider, { value: f.current, children: u });
|
|
716
716
|
}, Wu = () => {
|
|
717
|
-
const u = Hu(
|
|
717
|
+
const u = Hu(f1);
|
|
718
718
|
if (!u)
|
|
719
719
|
throw new Error("useConfig must be used within a ConfigProvider");
|
|
720
720
|
return u;
|
|
721
|
-
},
|
|
721
|
+
}, p0 = {
|
|
722
722
|
get_started: "Start Chat",
|
|
723
723
|
first_name: "First Name",
|
|
724
724
|
last_name: "Last Name",
|
|
725
725
|
phone: "Phone Number",
|
|
726
726
|
email: "Email Address"
|
|
727
|
-
},
|
|
727
|
+
}, B0 = {
|
|
728
728
|
greeting: "Welcome !",
|
|
729
729
|
placeholder: "Write something...",
|
|
730
730
|
connection_lost: "Connection Lost",
|
|
731
731
|
back: "Back"
|
|
732
|
-
},
|
|
732
|
+
}, g0 = {
|
|
733
733
|
get_started: "Start Chat",
|
|
734
734
|
file_message: {
|
|
735
735
|
browser_audio_unsupport: "Browser does not support the audio element.",
|
|
@@ -738,22 +738,22 @@ const Qf = {
|
|
|
738
738
|
unsupported_file_type: "This file type is not supported.",
|
|
739
739
|
unsupported_file_size: "This file size is not supported."
|
|
740
740
|
}
|
|
741
|
-
}, g0 = {
|
|
742
|
-
user_subscription: b0,
|
|
743
|
-
settings: p0,
|
|
744
|
-
messages: B0
|
|
745
741
|
}, m0 = {
|
|
742
|
+
user_subscription: p0,
|
|
743
|
+
settings: B0,
|
|
744
|
+
messages: g0
|
|
745
|
+
}, _0 = {
|
|
746
746
|
get_started: "Commencer",
|
|
747
747
|
first_name: "Prénom",
|
|
748
748
|
last_name: "Nom",
|
|
749
749
|
phone: "Numéro de Téléphone",
|
|
750
750
|
email: "Adresse Email"
|
|
751
|
-
},
|
|
751
|
+
}, y0 = {
|
|
752
752
|
greeting: "Bienvenue !",
|
|
753
753
|
placeholder: "Écrivez quelque chose...",
|
|
754
754
|
connection_lost: "Connexion perdue",
|
|
755
755
|
back: "Retour"
|
|
756
|
-
},
|
|
756
|
+
}, v0 = {
|
|
757
757
|
get_started: "Démarrer",
|
|
758
758
|
file_message: {
|
|
759
759
|
browser_audio_unsupport: "Le navigateur ne prend pas en charge l'élément audio.",
|
|
@@ -762,55 +762,55 @@ const Qf = {
|
|
|
762
762
|
unsupported_file_type: "Ce type de fichier n'est pas pris en charge.",
|
|
763
763
|
unsupported_file_size: "Cette taille de fichier n'est pas prise en charge."
|
|
764
764
|
}
|
|
765
|
-
},
|
|
766
|
-
user_subscription:
|
|
767
|
-
settings:
|
|
768
|
-
messages:
|
|
769
|
-
},
|
|
765
|
+
}, w0 = {
|
|
766
|
+
user_subscription: _0,
|
|
767
|
+
settings: y0,
|
|
768
|
+
messages: v0
|
|
769
|
+
}, If = { en: m0, fr: w0 }, t1 = qu(
|
|
770
770
|
void 0
|
|
771
|
-
),
|
|
771
|
+
), n1 = ({
|
|
772
772
|
children: u
|
|
773
773
|
}) => {
|
|
774
|
-
const f = Wu().language, e = (r) => r in
|
|
774
|
+
const f = Wu().language, e = (r) => r in If, [t, n] = U(
|
|
775
775
|
e(f) ? f : "en"
|
|
776
776
|
);
|
|
777
777
|
return /* @__PURE__ */ a.jsx(
|
|
778
|
-
|
|
778
|
+
t1.Provider,
|
|
779
779
|
{
|
|
780
|
-
value: { translations:
|
|
780
|
+
value: { translations: If, language: t, setLanguage: n },
|
|
781
781
|
children: u
|
|
782
782
|
}
|
|
783
783
|
);
|
|
784
|
-
},
|
|
785
|
-
const u = Hu(
|
|
784
|
+
}, A0 = () => {
|
|
785
|
+
const u = Hu(t1);
|
|
786
786
|
if (!u)
|
|
787
787
|
throw new Error(
|
|
788
788
|
"useTranslationContext must be used within a TranslationProvider"
|
|
789
789
|
);
|
|
790
790
|
return u;
|
|
791
|
-
},
|
|
791
|
+
}, x0 = (u, D) => D.split(".").reduce((f, e) => {
|
|
792
792
|
if (typeof f == "object" && f !== null)
|
|
793
793
|
return f[e];
|
|
794
794
|
}, u), zu = () => {
|
|
795
|
-
const { translations: u, language: D } =
|
|
795
|
+
const { translations: u, language: D } = A0();
|
|
796
796
|
return { t: Mu(
|
|
797
|
-
(e, t = {}) => (
|
|
797
|
+
(e, t = {}) => (x0(u[D], e) || e).replace(
|
|
798
798
|
/{(\w+)}/g,
|
|
799
799
|
(r, s) => t[s] || `{${s}}`
|
|
800
800
|
),
|
|
801
801
|
[D, u]
|
|
802
802
|
) };
|
|
803
803
|
};
|
|
804
|
-
function
|
|
804
|
+
function k0(u, D) {
|
|
805
805
|
if (typeof D > "u")
|
|
806
806
|
throw new Error("Value cannot be undefined");
|
|
807
807
|
return sessionStorage.setItem(u, JSON.stringify(D)), !0;
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function j0(u) {
|
|
810
810
|
const D = sessionStorage.getItem(u);
|
|
811
811
|
return D === null ? null : JSON.parse(D);
|
|
812
812
|
}
|
|
813
|
-
const
|
|
813
|
+
const Lf = { setItem: k0, getItem: j0 }, Tu = /* @__PURE__ */ Object.create(null);
|
|
814
814
|
Tu.open = "0";
|
|
815
815
|
Tu.close = "1";
|
|
816
816
|
Tu.ping = "2";
|
|
@@ -822,59 +822,59 @@ const pD = /* @__PURE__ */ Object.create(null);
|
|
|
822
822
|
Object.keys(Tu).forEach((u) => {
|
|
823
823
|
pD[Tu[u]] = u;
|
|
824
824
|
});
|
|
825
|
-
const
|
|
825
|
+
const JD = { type: "error", data: "parser error" }, r1 = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", a1 = typeof ArrayBuffer == "function", s1 = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u && u.buffer instanceof ArrayBuffer, of = ({ type: u, data: D }, f, e) => r1 && D instanceof Blob ? f ? e(D) : $f(D, e) : a1 && (D instanceof ArrayBuffer || s1(D)) ? f ? e(D) : $f(new Blob([D]), e) : e(Tu[u] + (D || "")), $f = (u, D) => {
|
|
826
826
|
const f = new FileReader();
|
|
827
827
|
return f.onload = function() {
|
|
828
828
|
const e = f.result.split(",")[1];
|
|
829
829
|
D("b" + (e || ""));
|
|
830
830
|
}, f.readAsDataURL(u);
|
|
831
831
|
};
|
|
832
|
-
function
|
|
832
|
+
function Mf(u) {
|
|
833
833
|
return u instanceof Uint8Array ? u : u instanceof ArrayBuffer ? new Uint8Array(u) : new Uint8Array(u.buffer, u.byteOffset, u.byteLength);
|
|
834
834
|
}
|
|
835
835
|
let LD;
|
|
836
|
-
function
|
|
837
|
-
if (
|
|
838
|
-
return u.data.arrayBuffer().then(
|
|
839
|
-
if (
|
|
840
|
-
return D(
|
|
841
|
-
|
|
836
|
+
function S0(u, D) {
|
|
837
|
+
if (r1 && u.data instanceof Blob)
|
|
838
|
+
return u.data.arrayBuffer().then(Mf).then(D);
|
|
839
|
+
if (a1 && (u.data instanceof ArrayBuffer || s1(u.data)))
|
|
840
|
+
return D(Mf(u.data));
|
|
841
|
+
of(u, !1, (f) => {
|
|
842
842
|
LD || (LD = new TextEncoder()), D(LD.encode(f));
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
|
-
const
|
|
846
|
-
for (let u = 0; u <
|
|
847
|
-
FD[
|
|
848
|
-
const
|
|
845
|
+
const qf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", FD = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
846
|
+
for (let u = 0; u < qf.length; u++)
|
|
847
|
+
FD[qf.charCodeAt(u)] = u;
|
|
848
|
+
const T0 = (u) => {
|
|
849
849
|
let D = u.length * 0.75, f = u.length, e, t = 0, n, r, s, F;
|
|
850
850
|
u[u.length - 1] === "=" && (D--, u[u.length - 2] === "=" && D--);
|
|
851
851
|
const d = new ArrayBuffer(D), o = new Uint8Array(d);
|
|
852
852
|
for (e = 0; e < f; e += 4)
|
|
853
853
|
n = FD[u.charCodeAt(e)], r = FD[u.charCodeAt(e + 1)], s = FD[u.charCodeAt(e + 2)], F = FD[u.charCodeAt(e + 3)], o[t++] = n << 2 | r >> 4, o[t++] = (r & 15) << 4 | s >> 2, o[t++] = (s & 3) << 6 | F & 63;
|
|
854
854
|
return d;
|
|
855
|
-
},
|
|
855
|
+
}, N0 = typeof ArrayBuffer == "function", df = (u, D) => {
|
|
856
856
|
if (typeof u != "string")
|
|
857
857
|
return {
|
|
858
858
|
type: "message",
|
|
859
|
-
data:
|
|
859
|
+
data: F1(u, D)
|
|
860
860
|
};
|
|
861
861
|
const f = u.charAt(0);
|
|
862
862
|
return f === "b" ? {
|
|
863
863
|
type: "message",
|
|
864
|
-
data:
|
|
864
|
+
data: O0(u.substring(1), D)
|
|
865
865
|
} : pD[f] ? u.length > 1 ? {
|
|
866
866
|
type: pD[f],
|
|
867
867
|
data: u.substring(1)
|
|
868
868
|
} : {
|
|
869
869
|
type: pD[f]
|
|
870
|
-
} :
|
|
871
|
-
},
|
|
872
|
-
if (
|
|
873
|
-
const f =
|
|
874
|
-
return
|
|
870
|
+
} : JD;
|
|
871
|
+
}, O0 = (u, D) => {
|
|
872
|
+
if (N0) {
|
|
873
|
+
const f = T0(u);
|
|
874
|
+
return F1(f, D);
|
|
875
875
|
} else
|
|
876
876
|
return { base64: !0, data: u };
|
|
877
|
-
},
|
|
877
|
+
}, F1 = (u, D) => {
|
|
878
878
|
switch (D) {
|
|
879
879
|
case "blob":
|
|
880
880
|
return u instanceof Blob ? u : new Blob([u]);
|
|
@@ -882,27 +882,27 @@ const S0 = (u) => {
|
|
|
882
882
|
default:
|
|
883
883
|
return u instanceof ArrayBuffer ? u : u.buffer;
|
|
884
884
|
}
|
|
885
|
-
},
|
|
885
|
+
}, i1 = "", R0 = (u, D) => {
|
|
886
886
|
const f = u.length, e = new Array(f);
|
|
887
887
|
let t = 0;
|
|
888
888
|
u.forEach((n, r) => {
|
|
889
|
-
|
|
890
|
-
e[r] = s, ++t === f && D(e.join(
|
|
889
|
+
of(n, !1, (s) => {
|
|
890
|
+
e[r] = s, ++t === f && D(e.join(i1));
|
|
891
891
|
});
|
|
892
892
|
});
|
|
893
|
-
},
|
|
894
|
-
const f = u.split(
|
|
893
|
+
}, P0 = (u, D) => {
|
|
894
|
+
const f = u.split(i1), e = [];
|
|
895
895
|
for (let t = 0; t < f.length; t++) {
|
|
896
|
-
const n =
|
|
896
|
+
const n = df(f[t], D);
|
|
897
897
|
if (e.push(n), n.type === "error")
|
|
898
898
|
break;
|
|
899
899
|
}
|
|
900
900
|
return e;
|
|
901
901
|
};
|
|
902
|
-
function
|
|
902
|
+
function I0() {
|
|
903
903
|
return new TransformStream({
|
|
904
904
|
transform(u, D) {
|
|
905
|
-
|
|
905
|
+
S0(u, (f) => {
|
|
906
906
|
const e = f.length;
|
|
907
907
|
let t;
|
|
908
908
|
if (e < 126)
|
|
@@ -934,7 +934,7 @@ function hD(u, D) {
|
|
|
934
934
|
f[t] = u[0][e++], e === u[0].length && (u.shift(), e = 0);
|
|
935
935
|
return u.length && e < u[0].length && (u[0] = u[0].slice(e)), f;
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function L0(u, D) {
|
|
938
938
|
$D || ($D = new TextDecoder());
|
|
939
939
|
const f = [];
|
|
940
940
|
let e = 0, t = -1, n = !1;
|
|
@@ -956,7 +956,7 @@ function I0(u, D) {
|
|
|
956
956
|
break;
|
|
957
957
|
const F = hD(f, 8), d = new DataView(F.buffer, F.byteOffset, F.length), o = d.getUint32(0);
|
|
958
958
|
if (o > Math.pow(2, 21) - 1) {
|
|
959
|
-
s.enqueue(
|
|
959
|
+
s.enqueue(JD);
|
|
960
960
|
break;
|
|
961
961
|
}
|
|
962
962
|
t = o * Math.pow(2, 32) + d.getUint32(4), e = 3;
|
|
@@ -964,21 +964,21 @@ function I0(u, D) {
|
|
|
964
964
|
if (ED(f) < t)
|
|
965
965
|
break;
|
|
966
966
|
const F = hD(f, t);
|
|
967
|
-
s.enqueue(
|
|
967
|
+
s.enqueue(df(n ? F : $D.decode(F), D)), e = 0;
|
|
968
968
|
}
|
|
969
969
|
if (t === 0 || t > u) {
|
|
970
|
-
s.enqueue(
|
|
970
|
+
s.enqueue(JD);
|
|
971
971
|
break;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
|
-
const
|
|
977
|
+
const o1 = 4;
|
|
978
978
|
function Fu(u) {
|
|
979
|
-
if (u) return
|
|
979
|
+
if (u) return $0(u);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function $0(u) {
|
|
982
982
|
for (var D in Fu.prototype)
|
|
983
983
|
u[D] = Fu.prototype[D];
|
|
984
984
|
return u;
|
|
@@ -1024,34 +1024,34 @@ Fu.prototype.listeners = function(u) {
|
|
|
1024
1024
|
Fu.prototype.hasListeners = function(u) {
|
|
1025
1025
|
return !!this.listeners(u).length;
|
|
1026
1026
|
};
|
|
1027
|
-
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(),
|
|
1028
|
-
function
|
|
1027
|
+
const AD = typeof Promise == "function" && typeof Promise.resolve == "function" ? (D) => Promise.resolve().then(D) : (D, f) => f(D, 0), vu = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), M0 = "arraybuffer";
|
|
1028
|
+
function d1(u, ...D) {
|
|
1029
1029
|
return D.reduce((f, e) => (u.hasOwnProperty(e) && (f[e] = u[e]), f), {});
|
|
1030
1030
|
}
|
|
1031
|
-
const
|
|
1031
|
+
const q0 = vu.setTimeout, z0 = vu.clearTimeout;
|
|
1032
1032
|
function xD(u, D) {
|
|
1033
|
-
D.useNativeTimers ? (u.setTimeoutFn =
|
|
1034
|
-
}
|
|
1035
|
-
const z0 = 1.33;
|
|
1036
|
-
function U0(u) {
|
|
1037
|
-
return typeof u == "string" ? V0(u) : Math.ceil((u.byteLength || u.size) * z0);
|
|
1033
|
+
D.useNativeTimers ? (u.setTimeoutFn = q0.bind(vu), u.clearTimeoutFn = z0.bind(vu)) : (u.setTimeoutFn = vu.setTimeout.bind(vu), u.clearTimeoutFn = vu.clearTimeout.bind(vu));
|
|
1038
1034
|
}
|
|
1035
|
+
const U0 = 1.33;
|
|
1039
1036
|
function V0(u) {
|
|
1037
|
+
return typeof u == "string" ? H0(u) : Math.ceil((u.byteLength || u.size) * U0);
|
|
1038
|
+
}
|
|
1039
|
+
function H0(u) {
|
|
1040
1040
|
let D = 0, f = 0;
|
|
1041
1041
|
for (let e = 0, t = u.length; e < t; e++)
|
|
1042
1042
|
D = u.charCodeAt(e), D < 128 ? f += 1 : D < 2048 ? f += 2 : D < 55296 || D >= 57344 ? f += 3 : (e++, f += 4);
|
|
1043
1043
|
return f;
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function C1() {
|
|
1046
1046
|
return Date.now().toString(36).substring(3) + Math.random().toString(36).substring(2, 5);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function W0(u) {
|
|
1049
1049
|
let D = "";
|
|
1050
1050
|
for (let f in u)
|
|
1051
1051
|
u.hasOwnProperty(f) && (D.length && (D += "&"), D += encodeURIComponent(f) + "=" + encodeURIComponent(u[f]));
|
|
1052
1052
|
return D;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function Y0(u) {
|
|
1055
1055
|
let D = {}, f = u.split("&");
|
|
1056
1056
|
for (let e = 0, t = f.length; e < t; e++) {
|
|
1057
1057
|
let n = f[e].split("=");
|
|
@@ -1059,12 +1059,12 @@ function W0(u) {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
return D;
|
|
1061
1061
|
}
|
|
1062
|
-
class
|
|
1062
|
+
class K0 extends Error {
|
|
1063
1063
|
constructor(D, f, e) {
|
|
1064
1064
|
super(D), this.description = f, this.context = e, this.type = "TransportError";
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
|
-
class
|
|
1067
|
+
class Cf extends Fu {
|
|
1068
1068
|
/**
|
|
1069
1069
|
* Transport abstract constructor.
|
|
1070
1070
|
*
|
|
@@ -1084,7 +1084,7 @@ class df extends Fu {
|
|
|
1084
1084
|
* @protected
|
|
1085
1085
|
*/
|
|
1086
1086
|
onError(D, f, e) {
|
|
1087
|
-
return super.emitReserved("error", new
|
|
1087
|
+
return super.emitReserved("error", new K0(D, f, e)), this;
|
|
1088
1088
|
}
|
|
1089
1089
|
/**
|
|
1090
1090
|
* Opens the transport.
|
|
@@ -1121,7 +1121,7 @@ class df extends Fu {
|
|
|
1121
1121
|
* @protected
|
|
1122
1122
|
*/
|
|
1123
1123
|
onData(D) {
|
|
1124
|
-
const f =
|
|
1124
|
+
const f = df(D, this.socket.binaryType);
|
|
1125
1125
|
this.onPacket(f);
|
|
1126
1126
|
}
|
|
1127
1127
|
/**
|
|
@@ -1158,11 +1158,11 @@ class df extends Fu {
|
|
|
1158
1158
|
return this.opts.port && (this.opts.secure && +(this.opts.port !== 443) || !this.opts.secure && Number(this.opts.port) !== 80) ? ":" + this.opts.port : "";
|
|
1159
1159
|
}
|
|
1160
1160
|
_query(D) {
|
|
1161
|
-
const f =
|
|
1161
|
+
const f = W0(D);
|
|
1162
1162
|
return f.length ? "?" + f : "";
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
class
|
|
1165
|
+
class J0 extends Cf {
|
|
1166
1166
|
constructor() {
|
|
1167
1167
|
super(...arguments), this._polling = !1;
|
|
1168
1168
|
}
|
|
@@ -1218,7 +1218,7 @@ class K0 extends df {
|
|
|
1218
1218
|
return this.onClose({ description: "transport closed by the server" }), !1;
|
|
1219
1219
|
this.onPacket(e);
|
|
1220
1220
|
};
|
|
1221
|
-
|
|
1221
|
+
P0(D, this.socket.binaryType).forEach(f), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
|
|
1222
1222
|
}
|
|
1223
1223
|
/**
|
|
1224
1224
|
* For polling, send a close packet.
|
|
@@ -1238,7 +1238,7 @@ class K0 extends df {
|
|
|
1238
1238
|
* @protected
|
|
1239
1239
|
*/
|
|
1240
1240
|
write(D) {
|
|
1241
|
-
this.writable = !1,
|
|
1241
|
+
this.writable = !1, R0(D, (f) => {
|
|
1242
1242
|
this.doWrite(f, () => {
|
|
1243
1243
|
this.writable = !0, this.emitReserved("drain");
|
|
1244
1244
|
});
|
|
@@ -1251,18 +1251,18 @@ class K0 extends df {
|
|
|
1251
1251
|
*/
|
|
1252
1252
|
uri() {
|
|
1253
1253
|
const D = this.opts.secure ? "https" : "http", f = this.query || {};
|
|
1254
|
-
return this.opts.timestampRequests !== !1 && (f[this.opts.timestampParam] =
|
|
1254
|
+
return this.opts.timestampRequests !== !1 && (f[this.opts.timestampParam] = C1()), !this.supportsBinary && !f.sid && (f.b64 = 1), this.createUri(D, f);
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
let
|
|
1257
|
+
let c1 = !1;
|
|
1258
1258
|
try {
|
|
1259
|
-
|
|
1259
|
+
c1 = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
1260
1260
|
} catch {
|
|
1261
1261
|
}
|
|
1262
|
-
const
|
|
1263
|
-
function
|
|
1262
|
+
const G0 = c1;
|
|
1263
|
+
function X0() {
|
|
1264
1264
|
}
|
|
1265
|
-
class
|
|
1265
|
+
class Z0 extends J0 {
|
|
1266
1266
|
/**
|
|
1267
1267
|
* XHR Polling constructor.
|
|
1268
1268
|
*
|
|
@@ -1321,7 +1321,7 @@ class ju extends Fu {
|
|
|
1321
1321
|
*/
|
|
1322
1322
|
_create() {
|
|
1323
1323
|
var D;
|
|
1324
|
-
const f =
|
|
1324
|
+
const f = d1(this._opts, "agent", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "autoUnref");
|
|
1325
1325
|
f.xdomain = !!this._opts.xd;
|
|
1326
1326
|
const e = this._xhr = this.createRequest(f);
|
|
1327
1327
|
try {
|
|
@@ -1375,7 +1375,7 @@ class ju extends Fu {
|
|
|
1375
1375
|
*/
|
|
1376
1376
|
_cleanup(D) {
|
|
1377
1377
|
if (!(typeof this._xhr > "u" || this._xhr === null)) {
|
|
1378
|
-
if (this._xhr.onreadystatechange =
|
|
1378
|
+
if (this._xhr.onreadystatechange = X0, D)
|
|
1379
1379
|
try {
|
|
1380
1380
|
this._xhr.abort();
|
|
1381
1381
|
} catch {
|
|
@@ -1405,36 +1405,36 @@ ju.requestsCount = 0;
|
|
|
1405
1405
|
ju.requests = {};
|
|
1406
1406
|
if (typeof document < "u") {
|
|
1407
1407
|
if (typeof attachEvent == "function")
|
|
1408
|
-
attachEvent("onunload",
|
|
1408
|
+
attachEvent("onunload", zf);
|
|
1409
1409
|
else if (typeof addEventListener == "function") {
|
|
1410
1410
|
const u = "onpagehide" in vu ? "pagehide" : "unload";
|
|
1411
|
-
addEventListener(u,
|
|
1411
|
+
addEventListener(u, zf, !1);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1414
|
+
function zf() {
|
|
1415
1415
|
for (let u in ju.requests)
|
|
1416
1416
|
ju.requests.hasOwnProperty(u) && ju.requests[u].abort();
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1419
|
-
const u =
|
|
1418
|
+
const Q0 = function() {
|
|
1419
|
+
const u = l1({
|
|
1420
1420
|
xdomain: !1
|
|
1421
1421
|
});
|
|
1422
1422
|
return u && u.responseType !== null;
|
|
1423
1423
|
}();
|
|
1424
|
-
class
|
|
1424
|
+
class ue extends Z0 {
|
|
1425
1425
|
constructor(D) {
|
|
1426
1426
|
super(D);
|
|
1427
1427
|
const f = D && D.forceBase64;
|
|
1428
|
-
this.supportsBinary =
|
|
1428
|
+
this.supportsBinary = Q0 && !f;
|
|
1429
1429
|
}
|
|
1430
1430
|
request(D = {}) {
|
|
1431
|
-
return Object.assign(D, { xd: this.xd }, this.opts), new ju(
|
|
1431
|
+
return Object.assign(D, { xd: this.xd }, this.opts), new ju(l1, this.uri(), D);
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function l1(u) {
|
|
1435
1435
|
const D = u.xdomain;
|
|
1436
1436
|
try {
|
|
1437
|
-
if (typeof XMLHttpRequest < "u" && (!D ||
|
|
1437
|
+
if (typeof XMLHttpRequest < "u" && (!D || G0))
|
|
1438
1438
|
return new XMLHttpRequest();
|
|
1439
1439
|
} catch {
|
|
1440
1440
|
}
|
|
@@ -1444,13 +1444,13 @@ function C1(u) {
|
|
|
1444
1444
|
} catch {
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
1448
|
-
class
|
|
1447
|
+
const E1 = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
|
1448
|
+
class De extends Cf {
|
|
1449
1449
|
get name() {
|
|
1450
1450
|
return "websocket";
|
|
1451
1451
|
}
|
|
1452
1452
|
doOpen() {
|
|
1453
|
-
const D = this.uri(), f = this.opts.protocols, e =
|
|
1453
|
+
const D = this.uri(), f = this.opts.protocols, e = E1 ? {} : d1(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
|
1454
1454
|
this.opts.extraHeaders && (e.headers = this.opts.extraHeaders);
|
|
1455
1455
|
try {
|
|
1456
1456
|
this.ws = this.createSocket(D, f, e);
|
|
@@ -1476,7 +1476,7 @@ class ue extends df {
|
|
|
1476
1476
|
this.writable = !1;
|
|
1477
1477
|
for (let f = 0; f < D.length; f++) {
|
|
1478
1478
|
const e = D[f], t = f === D.length - 1;
|
|
1479
|
-
|
|
1479
|
+
of(e, this.supportsBinary, (n) => {
|
|
1480
1480
|
try {
|
|
1481
1481
|
this.doWrite(e, n);
|
|
1482
1482
|
} catch {
|
|
@@ -1498,19 +1498,19 @@ class ue extends df {
|
|
|
1498
1498
|
*/
|
|
1499
1499
|
uri() {
|
|
1500
1500
|
const D = this.opts.secure ? "wss" : "ws", f = this.query || {};
|
|
1501
|
-
return this.opts.timestampRequests && (f[this.opts.timestampParam] =
|
|
1501
|
+
return this.opts.timestampRequests && (f[this.opts.timestampParam] = C1()), this.supportsBinary || (f.b64 = 1), this.createUri(D, f);
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
const MD = vu.WebSocket || vu.MozWebSocket;
|
|
1505
|
-
class
|
|
1505
|
+
class fe extends De {
|
|
1506
1506
|
createSocket(D, f, e) {
|
|
1507
|
-
return
|
|
1507
|
+
return E1 ? new MD(D, f, e) : f ? new MD(D, f) : new MD(D);
|
|
1508
1508
|
}
|
|
1509
1509
|
doWrite(D, f) {
|
|
1510
1510
|
this.ws.send(f);
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
class
|
|
1513
|
+
class ee extends Cf {
|
|
1514
1514
|
get name() {
|
|
1515
1515
|
return "webtransport";
|
|
1516
1516
|
}
|
|
@@ -1526,7 +1526,7 @@ class fe extends df {
|
|
|
1526
1526
|
this.onError("webtransport error", D);
|
|
1527
1527
|
}), this._transport.ready.then(() => {
|
|
1528
1528
|
this._transport.createBidirectionalStream().then((D) => {
|
|
1529
|
-
const f =
|
|
1529
|
+
const f = L0(Number.MAX_SAFE_INTEGER, this.socket.binaryType), e = D.readable.pipeThrough(f).getReader(), t = I0();
|
|
1530
1530
|
t.readable.pipeTo(D.writable), this._writer = t.writable.getWriter();
|
|
1531
1531
|
const n = () => {
|
|
1532
1532
|
e.read().then(({ done: s, value: F }) => {
|
|
@@ -1556,11 +1556,11 @@ class fe extends df {
|
|
|
1556
1556
|
(D = this._transport) === null || D === void 0 || D.close();
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
const
|
|
1560
|
-
websocket:
|
|
1561
|
-
webtransport:
|
|
1562
|
-
polling:
|
|
1563
|
-
},
|
|
1559
|
+
const te = {
|
|
1560
|
+
websocket: fe,
|
|
1561
|
+
webtransport: ee,
|
|
1562
|
+
polling: ue
|
|
1563
|
+
}, ne = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, re = [
|
|
1564
1564
|
"source",
|
|
1565
1565
|
"protocol",
|
|
1566
1566
|
"authority",
|
|
@@ -1576,28 +1576,28 @@ const ee = {
|
|
|
1576
1576
|
"query",
|
|
1577
1577
|
"anchor"
|
|
1578
1578
|
];
|
|
1579
|
-
function
|
|
1579
|
+
function GD(u) {
|
|
1580
1580
|
if (u.length > 8e3)
|
|
1581
1581
|
throw "URI too long";
|
|
1582
1582
|
const D = u, f = u.indexOf("["), e = u.indexOf("]");
|
|
1583
1583
|
f != -1 && e != -1 && (u = u.substring(0, f) + u.substring(f, e).replace(/:/g, ";") + u.substring(e, u.length));
|
|
1584
|
-
let t =
|
|
1584
|
+
let t = ne.exec(u || ""), n = {}, r = 14;
|
|
1585
1585
|
for (; r--; )
|
|
1586
|
-
n[
|
|
1587
|
-
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames =
|
|
1586
|
+
n[re[r]] = t[r] || "";
|
|
1587
|
+
return f != -1 && e != -1 && (n.source = D, n.host = n.host.substring(1, n.host.length - 1).replace(/;/g, ":"), n.authority = n.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), n.ipv6uri = !0), n.pathNames = ae(n, n.path), n.queryKey = se(n, n.query), n;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function ae(u, D) {
|
|
1590
1590
|
const f = /\/{2,9}/g, e = D.replace(f, "/").split("/");
|
|
1591
1591
|
return (D.slice(0, 1) == "/" || D.length === 0) && e.splice(0, 1), D.slice(-1) == "/" && e.splice(e.length - 1, 1), e;
|
|
1592
1592
|
}
|
|
1593
|
-
function
|
|
1593
|
+
function se(u, D) {
|
|
1594
1594
|
const f = {};
|
|
1595
1595
|
return D.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(e, t, n) {
|
|
1596
1596
|
t && (f[t] = n);
|
|
1597
1597
|
}), f;
|
|
1598
1598
|
}
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1599
|
+
const XD = typeof addEventListener == "function" && typeof removeEventListener == "function", BD = [];
|
|
1600
|
+
XD && addEventListener("offline", () => {
|
|
1601
1601
|
BD.forEach((u) => u());
|
|
1602
1602
|
}, !1);
|
|
1603
1603
|
class Vu extends Fu {
|
|
@@ -1608,10 +1608,10 @@ class Vu extends Fu {
|
|
|
1608
1608
|
* @param {Object} opts - options
|
|
1609
1609
|
*/
|
|
1610
1610
|
constructor(D, f) {
|
|
1611
|
-
if (super(), this.binaryType =
|
|
1612
|
-
const e =
|
|
1611
|
+
if (super(), this.binaryType = M0, this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, D && typeof D == "object" && (f = D, D = null), D) {
|
|
1612
|
+
const e = GD(D);
|
|
1613
1613
|
f.hostname = e.host, f.secure = e.protocol === "https" || e.protocol === "wss", f.port = e.port, e.query && (f.query = e.query);
|
|
1614
|
-
} else f.host && (f.hostname =
|
|
1614
|
+
} else f.host && (f.hostname = GD(f.host).host);
|
|
1615
1615
|
xD(this, f), this.secure = f.secure != null ? f.secure : typeof location < "u" && location.protocol === "https:", f.hostname && !f.port && (f.port = this.secure ? "443" : "80"), this.hostname = f.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = f.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = [], this._transportsByName = {}, f.transports.forEach((e) => {
|
|
1616
1616
|
const t = e.prototype.name;
|
|
1617
1617
|
this.transports.push(t), this._transportsByName[t] = e;
|
|
@@ -1629,7 +1629,7 @@ class Vu extends Fu {
|
|
|
1629
1629
|
},
|
|
1630
1630
|
transportOptions: {},
|
|
1631
1631
|
closeOnBeforeunload: !1
|
|
1632
|
-
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query =
|
|
1632
|
+
}, f), this.opts.path = this.opts.path.replace(/\/$/, "") + (this.opts.addTrailingSlash ? "/" : ""), typeof this.opts.query == "string" && (this.opts.query = Y0(this.opts.query)), XD && (this.opts.closeOnBeforeunload && (this._beforeunloadEventListener = () => {
|
|
1633
1633
|
this.transport && (this.transport.removeAllListeners(), this.transport.close());
|
|
1634
1634
|
}, addEventListener("beforeunload", this._beforeunloadEventListener, !1)), this.hostname !== "localhost" && (this._offlineEventListener = () => {
|
|
1635
1635
|
this._onClose("transport close", {
|
|
@@ -1646,7 +1646,7 @@ class Vu extends Fu {
|
|
|
1646
1646
|
*/
|
|
1647
1647
|
createTransport(D) {
|
|
1648
1648
|
const f = Object.assign({}, this.opts.query);
|
|
1649
|
-
f.EIO =
|
|
1649
|
+
f.EIO = o1, f.transport = D, this.id && (f.sid = this.id);
|
|
1650
1650
|
const e = Object.assign({}, this.opts, {
|
|
1651
1651
|
query: f,
|
|
1652
1652
|
socket: this,
|
|
@@ -1764,7 +1764,7 @@ class Vu extends Fu {
|
|
|
1764
1764
|
let f = 1;
|
|
1765
1765
|
for (let e = 0; e < this.writeBuffer.length; e++) {
|
|
1766
1766
|
const t = this.writeBuffer[e].data;
|
|
1767
|
-
if (t && (f +=
|
|
1767
|
+
if (t && (f += V0(t)), e > 0 && f > this._maxPayload)
|
|
1768
1768
|
return this.writeBuffer.slice(0, e);
|
|
1769
1769
|
f += 2;
|
|
1770
1770
|
}
|
|
@@ -1862,7 +1862,7 @@ class Vu extends Fu {
|
|
|
1862
1862
|
*/
|
|
1863
1863
|
_onClose(D, f) {
|
|
1864
1864
|
if (this.readyState === "opening" || this.readyState === "open" || this.readyState === "closing") {
|
|
1865
|
-
if (this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(),
|
|
1865
|
+
if (this.clearTimeoutFn(this._pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), XD && (this._beforeunloadEventListener && removeEventListener("beforeunload", this._beforeunloadEventListener, !1), this._offlineEventListener)) {
|
|
1866
1866
|
const e = BD.indexOf(this._offlineEventListener);
|
|
1867
1867
|
e !== -1 && BD.splice(e, 1);
|
|
1868
1868
|
}
|
|
@@ -1870,8 +1870,8 @@ class Vu extends Fu {
|
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
Vu.protocol =
|
|
1874
|
-
class
|
|
1873
|
+
Vu.protocol = o1;
|
|
1874
|
+
class Fe extends Vu {
|
|
1875
1875
|
constructor() {
|
|
1876
1876
|
super(...arguments), this._upgrades = [];
|
|
1877
1877
|
}
|
|
@@ -1943,21 +1943,21 @@ class se extends Vu {
|
|
|
1943
1943
|
return f;
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
|
-
let
|
|
1946
|
+
let ie = class extends Fe {
|
|
1947
1947
|
constructor(D, f = {}) {
|
|
1948
1948
|
const e = typeof D == "object" ? D : f;
|
|
1949
|
-
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) =>
|
|
1949
|
+
(!e.transports || e.transports && typeof e.transports[0] == "string") && (e.transports = (e.transports || ["polling", "websocket", "webtransport"]).map((t) => te[t]).filter((t) => !!t)), super(D, e);
|
|
1950
1950
|
}
|
|
1951
1951
|
};
|
|
1952
|
-
function
|
|
1952
|
+
function oe(u, D = "", f) {
|
|
1953
1953
|
let e = u;
|
|
1954
|
-
f = f || typeof location < "u" && location, u == null && (u = f.protocol + "//" + f.host), typeof u == "string" && (u.charAt(0) === "/" && (u.charAt(1) === "/" ? u = f.protocol + u : u = f.host + u), /^(https?|wss?):\/\//.test(u) || (typeof f < "u" ? u = f.protocol + "//" + u : u = "https://" + u), e =
|
|
1954
|
+
f = f || typeof location < "u" && location, u == null && (u = f.protocol + "//" + f.host), typeof u == "string" && (u.charAt(0) === "/" && (u.charAt(1) === "/" ? u = f.protocol + u : u = f.host + u), /^(https?|wss?):\/\//.test(u) || (typeof f < "u" ? u = f.protocol + "//" + u : u = "https://" + u), e = GD(u)), e.port || (/^(http|ws)$/.test(e.protocol) ? e.port = "80" : /^(http|ws)s$/.test(e.protocol) && (e.port = "443")), e.path = e.path || "/";
|
|
1955
1955
|
const n = e.host.indexOf(":") !== -1 ? "[" + e.host + "]" : e.host;
|
|
1956
1956
|
return e.id = e.protocol + "://" + n + ":" + e.port + D, e.href = e.protocol + "://" + n + (f && f.port === e.port ? "" : ":" + e.port), e;
|
|
1957
1957
|
}
|
|
1958
|
-
const
|
|
1959
|
-
function
|
|
1960
|
-
return
|
|
1958
|
+
const de = typeof ArrayBuffer == "function", Ce = (u) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(u) : u.buffer instanceof ArrayBuffer, h1 = Object.prototype.toString, ce = typeof Blob == "function" || typeof Blob < "u" && h1.call(Blob) === "[object BlobConstructor]", le = typeof File == "function" || typeof File < "u" && h1.call(File) === "[object FileConstructor]";
|
|
1959
|
+
function cf(u) {
|
|
1960
|
+
return de && (u instanceof ArrayBuffer || Ce(u)) || ce && u instanceof Blob || le && u instanceof File;
|
|
1961
1961
|
}
|
|
1962
1962
|
function gD(u, D) {
|
|
1963
1963
|
if (!u || typeof u != "object")
|
|
@@ -1968,7 +1968,7 @@ function gD(u, D) {
|
|
|
1968
1968
|
return !0;
|
|
1969
1969
|
return !1;
|
|
1970
1970
|
}
|
|
1971
|
-
if (
|
|
1971
|
+
if (cf(u))
|
|
1972
1972
|
return !0;
|
|
1973
1973
|
if (u.toJSON && typeof u.toJSON == "function" && arguments.length === 1)
|
|
1974
1974
|
return gD(u.toJSON(), !0);
|
|
@@ -1977,33 +1977,33 @@ function gD(u, D) {
|
|
|
1977
1977
|
return !0;
|
|
1978
1978
|
return !1;
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function Ee(u) {
|
|
1981
1981
|
const D = [], f = u.data, e = u;
|
|
1982
|
-
return e.data =
|
|
1982
|
+
return e.data = ZD(f, D), e.attachments = D.length, { packet: e, buffers: D };
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function ZD(u, D) {
|
|
1985
1985
|
if (!u)
|
|
1986
1986
|
return u;
|
|
1987
|
-
if (
|
|
1987
|
+
if (cf(u)) {
|
|
1988
1988
|
const f = { _placeholder: !0, num: D.length };
|
|
1989
1989
|
return D.push(u), f;
|
|
1990
1990
|
} else if (Array.isArray(u)) {
|
|
1991
1991
|
const f = new Array(u.length);
|
|
1992
1992
|
for (let e = 0; e < u.length; e++)
|
|
1993
|
-
f[e] =
|
|
1993
|
+
f[e] = ZD(u[e], D);
|
|
1994
1994
|
return f;
|
|
1995
1995
|
} else if (typeof u == "object" && !(u instanceof Date)) {
|
|
1996
1996
|
const f = {};
|
|
1997
1997
|
for (const e in u)
|
|
1998
|
-
Object.prototype.hasOwnProperty.call(u, e) && (f[e] =
|
|
1998
|
+
Object.prototype.hasOwnProperty.call(u, e) && (f[e] = ZD(u[e], D));
|
|
1999
1999
|
return f;
|
|
2000
2000
|
}
|
|
2001
2001
|
return u;
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2004
|
-
return u.data =
|
|
2003
|
+
function he(u, D) {
|
|
2004
|
+
return u.data = QD(u.data, D), delete u.attachments, u;
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function QD(u, D) {
|
|
2007
2007
|
if (!u)
|
|
2008
2008
|
return u;
|
|
2009
2009
|
if (u && u._placeholder === !0) {
|
|
@@ -2012,13 +2012,13 @@ function ZD(u, D) {
|
|
|
2012
2012
|
throw new Error("illegal attachments");
|
|
2013
2013
|
} else if (Array.isArray(u))
|
|
2014
2014
|
for (let f = 0; f < u.length; f++)
|
|
2015
|
-
u[f] =
|
|
2015
|
+
u[f] = QD(u[f], D);
|
|
2016
2016
|
else if (typeof u == "object")
|
|
2017
2017
|
for (const f in u)
|
|
2018
|
-
Object.prototype.hasOwnProperty.call(u, f) && (u[f] =
|
|
2018
|
+
Object.prototype.hasOwnProperty.call(u, f) && (u[f] = QD(u[f], D));
|
|
2019
2019
|
return u;
|
|
2020
2020
|
}
|
|
2021
|
-
const
|
|
2021
|
+
const be = [
|
|
2022
2022
|
"connect",
|
|
2023
2023
|
"connect_error",
|
|
2024
2024
|
"disconnect",
|
|
@@ -2026,12 +2026,12 @@ const he = [
|
|
|
2026
2026
|
"newListener",
|
|
2027
2027
|
"removeListener"
|
|
2028
2028
|
// used by the Node.js EventEmitter
|
|
2029
|
-
],
|
|
2029
|
+
], pe = 5;
|
|
2030
2030
|
var W;
|
|
2031
2031
|
(function(u) {
|
|
2032
2032
|
u[u.CONNECT = 0] = "CONNECT", u[u.DISCONNECT = 1] = "DISCONNECT", u[u.EVENT = 2] = "EVENT", u[u.ACK = 3] = "ACK", u[u.CONNECT_ERROR = 4] = "CONNECT_ERROR", u[u.BINARY_EVENT = 5] = "BINARY_EVENT", u[u.BINARY_ACK = 6] = "BINARY_ACK";
|
|
2033
2033
|
})(W || (W = {}));
|
|
2034
|
-
class
|
|
2034
|
+
class Be {
|
|
2035
2035
|
/**
|
|
2036
2036
|
* Encoder constructor
|
|
2037
2037
|
*
|
|
@@ -2067,14 +2067,14 @@ class pe {
|
|
|
2067
2067
|
* a list of buffers.
|
|
2068
2068
|
*/
|
|
2069
2069
|
encodeAsBinary(D) {
|
|
2070
|
-
const f =
|
|
2070
|
+
const f = Ee(D), e = this.encodeAsString(f.packet), t = f.buffers;
|
|
2071
2071
|
return t.unshift(e), t;
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function Uf(u) {
|
|
2075
2075
|
return Object.prototype.toString.call(u) === "[object Object]";
|
|
2076
2076
|
}
|
|
2077
|
-
class
|
|
2077
|
+
class lf extends Fu {
|
|
2078
2078
|
/**
|
|
2079
2079
|
* Decoder constructor
|
|
2080
2080
|
*
|
|
@@ -2095,8 +2095,8 @@ class cf extends Fu {
|
|
|
2095
2095
|
throw new Error("got plaintext data when reconstructing a packet");
|
|
2096
2096
|
f = this.decodeString(D);
|
|
2097
2097
|
const e = f.type === W.BINARY_EVENT;
|
|
2098
|
-
e || f.type === W.BINARY_ACK ? (f.type = e ? W.EVENT : W.ACK, this.reconstructor = new
|
|
2099
|
-
} else if (
|
|
2098
|
+
e || f.type === W.BINARY_ACK ? (f.type = e ? W.EVENT : W.ACK, this.reconstructor = new ge(f), f.attachments === 0 && super.emitReserved("decoded", f)) : super.emitReserved("decoded", f);
|
|
2099
|
+
} else if (cf(D) || D.base64)
|
|
2100
2100
|
if (this.reconstructor)
|
|
2101
2101
|
f = this.reconstructor.takeBinaryData(D), f && (this.reconstructor = null, super.emitReserved("decoded", f));
|
|
2102
2102
|
else
|
|
@@ -2149,7 +2149,7 @@ class cf extends Fu {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
if (D.charAt(++f)) {
|
|
2151
2151
|
const n = this.tryParse(D.substr(f));
|
|
2152
|
-
if (
|
|
2152
|
+
if (lf.isPayloadValid(e.type, n))
|
|
2153
2153
|
e.data = n;
|
|
2154
2154
|
else
|
|
2155
2155
|
throw new Error("invalid payload");
|
|
@@ -2166,14 +2166,14 @@ class cf extends Fu {
|
|
|
2166
2166
|
static isPayloadValid(D, f) {
|
|
2167
2167
|
switch (D) {
|
|
2168
2168
|
case W.CONNECT:
|
|
2169
|
-
return
|
|
2169
|
+
return Uf(f);
|
|
2170
2170
|
case W.DISCONNECT:
|
|
2171
2171
|
return f === void 0;
|
|
2172
2172
|
case W.CONNECT_ERROR:
|
|
2173
|
-
return typeof f == "string" ||
|
|
2173
|
+
return typeof f == "string" || Uf(f);
|
|
2174
2174
|
case W.EVENT:
|
|
2175
2175
|
case W.BINARY_EVENT:
|
|
2176
|
-
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" &&
|
|
2176
|
+
return Array.isArray(f) && (typeof f[0] == "number" || typeof f[0] == "string" && be.indexOf(f[0]) === -1);
|
|
2177
2177
|
case W.ACK:
|
|
2178
2178
|
case W.BINARY_ACK:
|
|
2179
2179
|
return Array.isArray(f);
|
|
@@ -2186,7 +2186,7 @@ class cf extends Fu {
|
|
|
2186
2186
|
this.reconstructor && (this.reconstructor.finishedReconstruction(), this.reconstructor = null);
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
|
-
class
|
|
2189
|
+
class ge {
|
|
2190
2190
|
constructor(D) {
|
|
2191
2191
|
this.packet = D, this.buffers = [], this.reconPack = D;
|
|
2192
2192
|
}
|
|
@@ -2200,7 +2200,7 @@ class Be {
|
|
|
2200
2200
|
*/
|
|
2201
2201
|
takeBinaryData(D) {
|
|
2202
2202
|
if (this.buffers.push(D), this.buffers.length === this.reconPack.attachments) {
|
|
2203
|
-
const f =
|
|
2203
|
+
const f = he(this.reconPack, this.buffers);
|
|
2204
2204
|
return this.finishedReconstruction(), f;
|
|
2205
2205
|
}
|
|
2206
2206
|
return null;
|
|
@@ -2212,21 +2212,21 @@ class Be {
|
|
|
2212
2212
|
this.reconPack = null, this.buffers = [];
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
|
-
const
|
|
2215
|
+
const me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2216
2216
|
__proto__: null,
|
|
2217
|
-
Decoder:
|
|
2218
|
-
Encoder:
|
|
2217
|
+
Decoder: lf,
|
|
2218
|
+
Encoder: Be,
|
|
2219
2219
|
get PacketType() {
|
|
2220
2220
|
return W;
|
|
2221
2221
|
},
|
|
2222
|
-
protocol:
|
|
2222
|
+
protocol: pe
|
|
2223
2223
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2224
2224
|
function ku(u, D, f) {
|
|
2225
2225
|
return u.on(D, f), function() {
|
|
2226
2226
|
u.off(D, f);
|
|
2227
2227
|
};
|
|
2228
2228
|
}
|
|
2229
|
-
const
|
|
2229
|
+
const _e = Object.freeze({
|
|
2230
2230
|
connect: 1,
|
|
2231
2231
|
connect_error: 1,
|
|
2232
2232
|
disconnect: 1,
|
|
@@ -2235,7 +2235,7 @@ const me = Object.freeze({
|
|
|
2235
2235
|
newListener: 1,
|
|
2236
2236
|
removeListener: 1
|
|
2237
2237
|
});
|
|
2238
|
-
class
|
|
2238
|
+
class b1 extends Fu {
|
|
2239
2239
|
/**
|
|
2240
2240
|
* `Socket` constructor.
|
|
2241
2241
|
*/
|
|
@@ -2351,7 +2351,7 @@ class E1 extends Fu {
|
|
|
2351
2351
|
*/
|
|
2352
2352
|
emit(D, ...f) {
|
|
2353
2353
|
var e, t, n;
|
|
2354
|
-
if (
|
|
2354
|
+
if (_e.hasOwnProperty(D))
|
|
2355
2355
|
throw new Error('"' + D.toString() + '" is a reserved event name');
|
|
2356
2356
|
if (f.unshift(D), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
|
|
2357
2357
|
return this._addToQueue(f), this;
|
|
@@ -2850,7 +2850,7 @@ nD.prototype.setMax = function(u) {
|
|
|
2850
2850
|
nD.prototype.setJitter = function(u) {
|
|
2851
2851
|
this.jitter = u;
|
|
2852
2852
|
};
|
|
2853
|
-
class
|
|
2853
|
+
class uf extends Fu {
|
|
2854
2854
|
constructor(D, f) {
|
|
2855
2855
|
var e;
|
|
2856
2856
|
super(), this.nsps = {}, this.subs = [], D && typeof D == "object" && (f = D, D = void 0), f = f || {}, f.path = f.path || "/socket.io", this.opts = f, xD(this, f), this.reconnection(f.reconnection !== !1), this.reconnectionAttempts(f.reconnectionAttempts || 1 / 0), this.reconnectionDelay(f.reconnectionDelay || 1e3), this.reconnectionDelayMax(f.reconnectionDelayMax || 5e3), this.randomizationFactor((e = f.randomizationFactor) !== null && e !== void 0 ? e : 0.5), this.backoff = new nD({
|
|
@@ -2858,7 +2858,7 @@ class QD extends Fu {
|
|
|
2858
2858
|
max: this.reconnectionDelayMax(),
|
|
2859
2859
|
jitter: this.randomizationFactor()
|
|
2860
2860
|
}), this.timeout(f.timeout == null ? 2e4 : f.timeout), this._readyState = "closed", this.uri = D;
|
|
2861
|
-
const t = f.parser ||
|
|
2861
|
+
const t = f.parser || me;
|
|
2862
2862
|
this.encoder = new t.Encoder(), this.decoder = new t.Decoder(), this._autoConnect = f.autoConnect !== !1, this._autoConnect && this.open();
|
|
2863
2863
|
}
|
|
2864
2864
|
reconnection(D) {
|
|
@@ -2901,7 +2901,7 @@ class QD extends Fu {
|
|
|
2901
2901
|
open(D) {
|
|
2902
2902
|
if (~this._readyState.indexOf("open"))
|
|
2903
2903
|
return this;
|
|
2904
|
-
this.engine = new
|
|
2904
|
+
this.engine = new ie(this.uri, this.opts);
|
|
2905
2905
|
const f = this.engine, e = this;
|
|
2906
2906
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
2907
2907
|
const t = ku(f, "open", function() {
|
|
@@ -2991,7 +2991,7 @@ class QD extends Fu {
|
|
|
2991
2991
|
*/
|
|
2992
2992
|
socket(D, f) {
|
|
2993
2993
|
let e = this.nsps[D];
|
|
2994
|
-
return e ? this._autoConnect && !e.active && e.connect() : (e = new
|
|
2994
|
+
return e ? this._autoConnect && !e.active && e.connect() : (e = new b1(this, D, f), this.nsps[D] = e), e;
|
|
2995
2995
|
}
|
|
2996
2996
|
/**
|
|
2997
2997
|
* Called upon a socket close.
|
|
@@ -3091,29 +3091,29 @@ class QD extends Fu {
|
|
|
3091
3091
|
const sD = {};
|
|
3092
3092
|
function mD(u, D) {
|
|
3093
3093
|
typeof u == "object" && (D = u, u = void 0), D = D || {};
|
|
3094
|
-
const f =
|
|
3094
|
+
const f = oe(u, D.path || "/socket.io"), e = f.source, t = f.id, n = f.path, r = sD[t] && n in sD[t].nsps, s = D.forceNew || D["force new connection"] || D.multiplex === !1 || r;
|
|
3095
3095
|
let F;
|
|
3096
|
-
return s ? F = new
|
|
3096
|
+
return s ? F = new uf(e, D) : (sD[t] || (sD[t] = new uf(e, D)), F = sD[t]), f.query && !D.query && (D.query = f.queryKey), F.socket(f.path, D);
|
|
3097
3097
|
}
|
|
3098
3098
|
Object.assign(mD, {
|
|
3099
|
-
Manager:
|
|
3100
|
-
Socket:
|
|
3099
|
+
Manager: uf,
|
|
3100
|
+
Socket: b1,
|
|
3101
3101
|
io: mD,
|
|
3102
3102
|
connect: mD
|
|
3103
3103
|
});
|
|
3104
|
-
const
|
|
3105
|
-
function
|
|
3104
|
+
const ye = () => typeof location > "u" ? "unknown-host" : location.host, Ef = (u, D = ye()) => `${u}-${D}`;
|
|
3105
|
+
function ve(u, D, f) {
|
|
3106
3106
|
if (typeof D > "u") throw new Error("Value cannot be undefined");
|
|
3107
|
-
return localStorage.setItem(
|
|
3107
|
+
return localStorage.setItem(Ef(u, f), JSON.stringify(D)), !0;
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3110
|
-
const f = localStorage.getItem(
|
|
3109
|
+
function we(u, D) {
|
|
3110
|
+
const f = localStorage.getItem(Ef(u, D));
|
|
3111
3111
|
return f === null ? null : JSON.parse(f);
|
|
3112
3112
|
}
|
|
3113
|
-
function
|
|
3114
|
-
localStorage.removeItem(
|
|
3113
|
+
function Ae(u, D) {
|
|
3114
|
+
localStorage.removeItem(Ef(u, D));
|
|
3115
3115
|
}
|
|
3116
|
-
const
|
|
3116
|
+
const X = { setItem: ve, getItem: we, removeItem: Ae }, wD = class wD {
|
|
3117
3117
|
constructor(D, f, e) {
|
|
3118
3118
|
lD(this, "socket");
|
|
3119
3119
|
lD(this, "config");
|
|
@@ -3247,11 +3247,11 @@ lD(wD, "defaultConfig", {
|
|
|
3247
3247
|
upgrade: !0,
|
|
3248
3248
|
withCredentials: !0
|
|
3249
3249
|
});
|
|
3250
|
-
let
|
|
3251
|
-
const
|
|
3250
|
+
let Df = wD, qD;
|
|
3251
|
+
const xe = (u, D) => {
|
|
3252
3252
|
var e;
|
|
3253
|
-
const f = (e =
|
|
3254
|
-
return qD || (qD = new
|
|
3253
|
+
const f = (e = X.getItem("profileLiveChat")) == null ? void 0 : e.id;
|
|
3254
|
+
return qD || (qD = new Df(
|
|
3255
3255
|
u.apiUrl,
|
|
3256
3256
|
{
|
|
3257
3257
|
query: {
|
|
@@ -3262,11 +3262,11 @@ const Ae = (u, D) => {
|
|
|
3262
3262
|
},
|
|
3263
3263
|
D
|
|
3264
3264
|
)), qD;
|
|
3265
|
-
},
|
|
3265
|
+
}, p1 = qu({
|
|
3266
3266
|
socket: {}
|
|
3267
|
-
}),
|
|
3267
|
+
}), B1 = (u) => {
|
|
3268
3268
|
const D = Wu(), f = mu(
|
|
3269
|
-
|
|
3269
|
+
xe(D, {
|
|
3270
3270
|
onConnect: () => {
|
|
3271
3271
|
console.info(
|
|
3272
3272
|
"Hexabot Live Chat : Successfully established WS Connection!"
|
|
@@ -3280,13 +3280,13 @@ const Ae = (u, D) => {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
})
|
|
3282
3282
|
);
|
|
3283
|
-
return /* @__PURE__ */ a.jsx(
|
|
3284
|
-
}, Gu = () => Hu(
|
|
3283
|
+
return /* @__PURE__ */ a.jsx(p1.Provider, { value: { socket: f.current }, children: u.children });
|
|
3284
|
+
}, Gu = () => Hu(p1), ff = (u, D) => {
|
|
3285
3285
|
const { socket: f } = Gu();
|
|
3286
|
-
|
|
3287
|
-
},
|
|
3286
|
+
Z(() => (f.on(u, D), () => f.off(u, D)), [u, D, f]);
|
|
3287
|
+
}, ke = () => {
|
|
3288
3288
|
const { socket: u } = Gu();
|
|
3289
|
-
|
|
3289
|
+
Z(() => (u.connect(), () => {
|
|
3290
3290
|
u.disconnect();
|
|
3291
3291
|
}), []);
|
|
3292
3292
|
}, _D = {
|
|
@@ -3318,15 +3318,15 @@ const Ae = (u, D) => {
|
|
|
3318
3318
|
end_time: "",
|
|
3319
3319
|
time_zone: "Etc/GMT+12"
|
|
3320
3320
|
}
|
|
3321
|
-
},
|
|
3321
|
+
}, g1 = qu(_D), m1 = ({
|
|
3322
3322
|
children: u
|
|
3323
3323
|
}) => {
|
|
3324
|
-
const { t: D } = zu(), f =
|
|
3324
|
+
const { t: D } = zu(), f = Lf.getItem("settings"), [e, t] = U(
|
|
3325
3325
|
f || _D
|
|
3326
3326
|
), n = Mu((r) => {
|
|
3327
|
-
|
|
3327
|
+
Lf.setItem("settings", r), t(r);
|
|
3328
3328
|
}, []);
|
|
3329
|
-
return
|
|
3329
|
+
return ff("settings", (r) => {
|
|
3330
3330
|
var s;
|
|
3331
3331
|
n({
|
|
3332
3332
|
..._D,
|
|
@@ -3347,8 +3347,8 @@ const Ae = (u, D) => {
|
|
|
3347
3347
|
termsAndConditions: r.terms_and_conditions || _D.termsAndConditions,
|
|
3348
3348
|
offline_mode: r.offline_mode
|
|
3349
3349
|
});
|
|
3350
|
-
}), /* @__PURE__ */ a.jsx(
|
|
3351
|
-
}, pu = () => Hu(
|
|
3350
|
+
}), /* @__PURE__ */ a.jsx(g1.Provider, { value: e, children: u });
|
|
3351
|
+
}, pu = () => Hu(g1), _1 = qu(void 0), y1 = ({
|
|
3352
3352
|
onOpen: u,
|
|
3353
3353
|
onClose: D,
|
|
3354
3354
|
onScrollToTop: f,
|
|
@@ -3375,13 +3375,13 @@ const Ae = (u, D) => {
|
|
|
3375
3375
|
l(m), f && n && m === 0 && f();
|
|
3376
3376
|
}
|
|
3377
3377
|
};
|
|
3378
|
-
return /* @__PURE__ */ a.jsx(
|
|
3378
|
+
return /* @__PURE__ */ a.jsx(_1.Provider, { value: x, children: t });
|
|
3379
3379
|
}, Nu = () => {
|
|
3380
|
-
const u = Hu(
|
|
3380
|
+
const u = Hu(_1);
|
|
3381
3381
|
if (u === void 0)
|
|
3382
3382
|
throw new Error("useWidget must be used within a WidgetProvider");
|
|
3383
3383
|
return u;
|
|
3384
|
-
},
|
|
3384
|
+
}, je = (u) => new Intl.DateTimeFormat("en-GB", {
|
|
3385
3385
|
hour: "2-digit",
|
|
3386
3386
|
minute: "2-digit",
|
|
3387
3387
|
hour12: !1,
|
|
@@ -3390,7 +3390,7 @@ const Ae = (u, D) => {
|
|
|
3390
3390
|
const D = u || {};
|
|
3391
3391
|
if (!D || D.status !== "active") return !1;
|
|
3392
3392
|
if (D.start_time && D.end_time && D.time_zone) {
|
|
3393
|
-
const f =
|
|
3393
|
+
const f = je(D.time_zone);
|
|
3394
3394
|
return !(f >= D.start_time && f <= D.end_time);
|
|
3395
3395
|
}
|
|
3396
3396
|
return !0;
|
|
@@ -3448,7 +3448,7 @@ const Ae = (u, D) => {
|
|
|
3448
3448
|
isOfflineMode: !1,
|
|
3449
3449
|
setIsOfflineMode: () => {
|
|
3450
3450
|
}
|
|
3451
|
-
},
|
|
3451
|
+
}, v1 = qu(yu), w1 = ({ wantToConnect: u, defaultConnectionState: D = 0, children: f }) => {
|
|
3452
3452
|
const e = Wu(), t = pu(), { screen: n, setScreen: r } = Nu(), { setScroll: s, syncState: F, isOpen: d } = Nu(), o = Gu(), [c, l] = U(
|
|
3453
3453
|
yu.participants
|
|
3454
3454
|
), [j, y] = U(
|
|
@@ -3465,24 +3465,24 @@ const Ae = (u, D) => {
|
|
|
3465
3465
|
yu.isContactFormActive
|
|
3466
3466
|
), [M, V] = U(
|
|
3467
3467
|
yu.isOfflineMode
|
|
3468
|
-
), { send: J } = Cu(), { t: z } = zu(),
|
|
3468
|
+
), { send: J } = Cu(), { t: z } = zu(), Q = (S) => {
|
|
3469
3469
|
y(S), S === tD.wantToConnect && u && u(), S === tD.connected && t.alwaysScrollToBottom && s(101);
|
|
3470
3470
|
}, tu = t.offline_mode, cu = kD(tu), _u = (S) => {
|
|
3471
|
-
if (q(S),
|
|
3471
|
+
if (q(S), X.setItem(
|
|
3472
3472
|
"isOffline",
|
|
3473
3473
|
(S == null ? void 0 : S.isOffline) || !1
|
|
3474
|
-
),
|
|
3474
|
+
), X.setItem(
|
|
3475
3475
|
"submitedFormLateTime",
|
|
3476
3476
|
(S == null ? void 0 : S.submitedFormLateTime) || null
|
|
3477
3477
|
), S && "type" in S && S.type === "typing")
|
|
3478
3478
|
return T === !0;
|
|
3479
|
-
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ?
|
|
3479
|
+
_(!1), S && "mid" in S && !C.find((Du) => S.mid === Du.mid) && ("author" in S && (S.direction = S.author === "chatbot" ? uu.received : uu.sent, S.read = !0, S.delivery = !0), v((Du) => [
|
|
3480
3480
|
...Du.filter((au) => au.mid !== S.mid),
|
|
3481
3481
|
S
|
|
3482
|
-
]), s(0), "direction" in S && S.direction ===
|
|
3482
|
+
]), s(0), "direction" in S && S.direction === uu.received && !S.isOffline && V(!1)), S && "data" in S && "quick_replies" in S.data ? I(
|
|
3483
3483
|
(S.data.quick_replies || []).map(
|
|
3484
3484
|
(Du) => ({
|
|
3485
|
-
content_type:
|
|
3485
|
+
content_type: u1.text,
|
|
3486
3486
|
text: Du.title,
|
|
3487
3487
|
payload: Du.payload
|
|
3488
3488
|
})
|
|
@@ -3523,15 +3523,15 @@ const Ae = (u, D) => {
|
|
|
3523
3523
|
typeof Uu == "string" && Uu.trim() && au.append(gu, Uu);
|
|
3524
3524
|
}), au.append("owner_id", e.ownerId);
|
|
3525
3525
|
const { body: lu } = await Bu.get(`/webhook/${e.channel}/?${au.toString()}`);
|
|
3526
|
-
console.log("jump here 2"),
|
|
3526
|
+
console.log("jump here 2"), X.setItem("profileLiveChat", lu.profile), X.setItem("isOffline", cu || !1), X.setItem(
|
|
3527
3527
|
"submitedFormLateTime",
|
|
3528
3528
|
lu.profile.submitedFormLateTime || null
|
|
3529
3529
|
), v(
|
|
3530
3530
|
lu.messages.map((gu) => ({
|
|
3531
3531
|
...gu,
|
|
3532
|
-
direction: gu.author === lu.profile.foreignId || gu.author === lu.profile.id ?
|
|
3533
|
-
read: gu.direction ===
|
|
3534
|
-
delivery: gu.direction ===
|
|
3532
|
+
direction: gu.author === lu.profile.foreignId || gu.author === lu.profile.id ? uu.sent : uu.received,
|
|
3533
|
+
read: gu.direction === uu.sent || gu.read,
|
|
3534
|
+
delivery: gu.direction === uu.sent || gu.delivery,
|
|
3535
3535
|
isOffline: gu.isOffline || lu.profile.isOffline,
|
|
3536
3536
|
submitedFormLateTime: gu.submitedFormLateTime || lu.profile.submitedFormLateTime
|
|
3537
3537
|
}))
|
|
@@ -3568,32 +3568,32 @@ const Ae = (u, D) => {
|
|
|
3568
3568
|
o
|
|
3569
3569
|
]
|
|
3570
3570
|
);
|
|
3571
|
-
|
|
3571
|
+
ff(YD.message, (S) => {
|
|
3572
3572
|
console.log(
|
|
3573
3573
|
"=== CALLING handleNewIOMessage from useSubscribe (Socket Realtime) ==="
|
|
3574
3574
|
), _u(S);
|
|
3575
|
-
}),
|
|
3575
|
+
}), ff(YD.typing, _);
|
|
3576
3576
|
const Pu = (S) => {
|
|
3577
3577
|
S ? (p(S), r("webview")) : r("chat");
|
|
3578
3578
|
};
|
|
3579
|
-
|
|
3579
|
+
Z(() => {
|
|
3580
3580
|
F && d && m(0);
|
|
3581
|
-
}, [F, d]),
|
|
3581
|
+
}, [F, d]), Z(() => {
|
|
3582
3582
|
if (d && j === tD.connected) {
|
|
3583
3583
|
console.log("🔄 Widget opened - fetching fresh data");
|
|
3584
|
-
const S =
|
|
3584
|
+
const S = X.getItem("profileLiveChat");
|
|
3585
3585
|
if (S) {
|
|
3586
3586
|
const Du = S;
|
|
3587
3587
|
console.log("🔄 Widget opened - fetching fresh data", Du), du(Du.firstName, Du.lastName);
|
|
3588
3588
|
}
|
|
3589
3589
|
!S && !cu && r("prechat");
|
|
3590
3590
|
}
|
|
3591
|
-
}, [d]),
|
|
3591
|
+
}, [d]), b0("logout", () => {
|
|
3592
3592
|
o.socket.disconnect();
|
|
3593
|
-
}),
|
|
3593
|
+
}), Z(() => {
|
|
3594
3594
|
n === "chat" && j === tD.connected && du();
|
|
3595
3595
|
const S = () => {
|
|
3596
|
-
const Du =
|
|
3596
|
+
const Du = X.getItem("profileLiveChat");
|
|
3597
3597
|
if (Du) {
|
|
3598
3598
|
const au = Du;
|
|
3599
3599
|
du(au.firstName, au.lastName);
|
|
@@ -3602,7 +3602,7 @@ const Ae = (u, D) => {
|
|
|
3602
3602
|
return o.socket.io.on("reconnect", S), () => {
|
|
3603
3603
|
o.socket.io.off("reconnect", S);
|
|
3604
3604
|
};
|
|
3605
|
-
}, []),
|
|
3605
|
+
}, []), Z(() => {
|
|
3606
3606
|
const S = [...c];
|
|
3607
3607
|
S[0].imageUrl = t.avatarUrl, l(S);
|
|
3608
3608
|
}, [t.avatarUrl]);
|
|
@@ -3612,7 +3612,7 @@ const Ae = (u, D) => {
|
|
|
3612
3612
|
outgoingMessageState: $,
|
|
3613
3613
|
setOutgoingMessageState: hu,
|
|
3614
3614
|
connectionState: j,
|
|
3615
|
-
setConnectionState:
|
|
3615
|
+
setConnectionState: Q,
|
|
3616
3616
|
messages: C.sort((S, Du) => {
|
|
3617
3617
|
const au = Date.parse(S.createdAt), lu = Date.parse(Du.createdAt);
|
|
3618
3618
|
return +new Date(au) - +new Date(lu);
|
|
@@ -3641,9 +3641,9 @@ const Ae = (u, D) => {
|
|
|
3641
3641
|
isOfflineMode: M,
|
|
3642
3642
|
setIsOfflineMode: V
|
|
3643
3643
|
};
|
|
3644
|
-
return /* @__PURE__ */ a.jsx(
|
|
3644
|
+
return /* @__PURE__ */ a.jsx(v1.Provider, { value: Iu, children: f });
|
|
3645
3645
|
}, Cu = () => {
|
|
3646
|
-
const u = Hu(
|
|
3646
|
+
const u = Hu(v1);
|
|
3647
3647
|
if (!u)
|
|
3648
3648
|
throw new Error("useChat must be used within a ChatContext");
|
|
3649
3649
|
return u;
|
|
@@ -3893,21 +3893,21 @@ const Ae = (u, D) => {
|
|
|
3893
3893
|
text: "#9C9C9C"
|
|
3894
3894
|
}
|
|
3895
3895
|
}
|
|
3896
|
-
},
|
|
3896
|
+
}, Se = (u) => {
|
|
3897
3897
|
const D = u.replace("#", ""), f = parseInt(D.substring(0, 2), 16), e = parseInt(D.substring(2, 4), 16), t = parseInt(D.substring(4, 6), 16);
|
|
3898
3898
|
return (0.299 * f + 0.587 * e + 0.114 * t) / 255 > 0.5 ? "#000000" : "#FFFFFF";
|
|
3899
|
-
},
|
|
3899
|
+
}, Te = (u) => /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(u), Ne = (u) => {
|
|
3900
3900
|
const D = u.replace("#", "");
|
|
3901
3901
|
return {
|
|
3902
3902
|
r: parseInt(D.substring(0, 2), 16),
|
|
3903
3903
|
g: parseInt(D.substring(2, 4), 16),
|
|
3904
3904
|
b: parseInt(D.substring(4, 6), 16)
|
|
3905
3905
|
};
|
|
3906
|
-
},
|
|
3907
|
-
const D =
|
|
3908
|
-
if (!
|
|
3909
|
-
return console.warn(`Invalid color: ${u}, using default blue theme`),
|
|
3910
|
-
const f =
|
|
3906
|
+
}, Oe = (u) => (u.startsWith("#") || (u = "#" + u), u.length === 4 ? "#" + u[1] + u[1] + u[2] + u[2] + u[3] + u[3] : u), ef = (u) => {
|
|
3907
|
+
const D = Oe(u);
|
|
3908
|
+
if (!Te(D))
|
|
3909
|
+
return console.warn(`Invalid color: ${u}, using default blue theme`), ef("#0074D9");
|
|
3910
|
+
const f = Se(D), e = Ne(D), t = Math.min(255, Math.floor(e.r + (255 - e.r) * 0.9)), n = Math.min(255, Math.floor(e.g + (255 - e.g) * 0.9)), r = Math.min(255, Math.floor(e.b + (255 - e.b) * 0.9)), s = `#${t.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}${r.toString(16).padStart(2, "0")}`, F = Math.max(0, Math.floor(e.r * 0.8)), d = Math.max(0, Math.floor(e.g * 0.8)), o = Math.max(0, Math.floor(e.b * 0.8));
|
|
3911
3911
|
return `${F.toString(16).padStart(2, "0")}${d.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}`, {
|
|
3912
3912
|
header: {
|
|
3913
3913
|
bg: D,
|
|
@@ -3943,7 +3943,7 @@ const Ae = (u, D) => {
|
|
|
3943
3943
|
text: "#9C9C9C"
|
|
3944
3944
|
}
|
|
3945
3945
|
};
|
|
3946
|
-
},
|
|
3946
|
+
}, Vf = {
|
|
3947
3947
|
orange: "#FF851B",
|
|
3948
3948
|
red: "#FF4136",
|
|
3949
3949
|
green: "#2ECC40",
|
|
@@ -3951,14 +3951,14 @@ const Ae = (u, D) => {
|
|
|
3951
3951
|
teal: "#1BA089",
|
|
3952
3952
|
dark: "#000000",
|
|
3953
3953
|
purple: "#7950F2"
|
|
3954
|
-
},
|
|
3954
|
+
}, Re = (u) => Vf[u] ? ef(Vf[u]) : ef(u), Pe = () => ({
|
|
3955
3955
|
bg: "#f6f8f9",
|
|
3956
3956
|
// Light gray background
|
|
3957
3957
|
text: "#000"
|
|
3958
3958
|
// Black text
|
|
3959
|
-
}),
|
|
3960
|
-
colors:
|
|
3961
|
-
}),
|
|
3959
|
+
}), Ie = yD.orange, A1 = qu({
|
|
3960
|
+
colors: Ie
|
|
3961
|
+
}), x1 = ({
|
|
3962
3962
|
children: u
|
|
3963
3963
|
}) => {
|
|
3964
3964
|
const D = pu(), f = () => {
|
|
@@ -3967,24 +3967,24 @@ const Ae = (u, D) => {
|
|
|
3967
3967
|
return yD[e];
|
|
3968
3968
|
try {
|
|
3969
3969
|
return {
|
|
3970
|
-
...
|
|
3970
|
+
...Re(e),
|
|
3971
3971
|
// Keep received message colors fixed (admin chat)
|
|
3972
|
-
received:
|
|
3972
|
+
received: Pe()
|
|
3973
3973
|
};
|
|
3974
3974
|
} catch {
|
|
3975
3975
|
return console.warn(`Failed to generate theme for color: ${e}, using orange fallback`), yD.orange;
|
|
3976
3976
|
}
|
|
3977
3977
|
};
|
|
3978
|
-
return /* @__PURE__ */ a.jsx(
|
|
3978
|
+
return /* @__PURE__ */ a.jsx(A1.Provider, { value: { colors: f() }, children: u });
|
|
3979
3979
|
}, ou = () => {
|
|
3980
|
-
const u = Hu(
|
|
3980
|
+
const u = Hu(A1);
|
|
3981
3981
|
if (!u)
|
|
3982
3982
|
throw new Error("useColors must be used within a ColorProvider");
|
|
3983
3983
|
return u;
|
|
3984
|
-
},
|
|
3984
|
+
}, hf = ({
|
|
3985
3985
|
viewBox: u = "0 0 24 24",
|
|
3986
3986
|
...D
|
|
3987
|
-
}) => /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: /* @__PURE__ */ a.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }),
|
|
3987
|
+
}) => /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: /* @__PURE__ */ a.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }), k1 = ({
|
|
3988
3988
|
width: u = "24",
|
|
3989
3989
|
height: D = "24",
|
|
3990
3990
|
logoUrl: f,
|
|
@@ -4009,13 +4009,13 @@ const Ae = (u, D) => {
|
|
|
4009
4009
|
)
|
|
4010
4010
|
]
|
|
4011
4011
|
}
|
|
4012
|
-
),
|
|
4012
|
+
), Le = ({
|
|
4013
4013
|
onSendNoticeToStaff: u
|
|
4014
4014
|
}) => {
|
|
4015
4015
|
const [D, f] = U(!1), e = mu(null), { send: t } = Cu(), n = async (r) => {
|
|
4016
4016
|
r.preventDefault(), r.stopPropagation();
|
|
4017
4017
|
try {
|
|
4018
|
-
const s =
|
|
4018
|
+
const s = X.getItem("profileLiveChat");
|
|
4019
4019
|
if (!s) {
|
|
4020
4020
|
console.error("No profile found in localStorage");
|
|
4021
4021
|
return;
|
|
@@ -4059,7 +4059,7 @@ const Ae = (u, D) => {
|
|
|
4059
4059
|
}
|
|
4060
4060
|
) })
|
|
4061
4061
|
] });
|
|
4062
|
-
},
|
|
4062
|
+
}, $e = ({ children: u }) => {
|
|
4063
4063
|
const D = pu(), { colors: f } = ou(), e = Nu();
|
|
4064
4064
|
return /* @__PURE__ */ a.jsxs(
|
|
4065
4065
|
"div",
|
|
@@ -4084,14 +4084,14 @@ const Ae = (u, D) => {
|
|
|
4084
4084
|
className: "sc-open-icon",
|
|
4085
4085
|
style: { borderRadius: "50%" }
|
|
4086
4086
|
}
|
|
4087
|
-
) : /* @__PURE__ */ a.jsx(
|
|
4087
|
+
) : /* @__PURE__ */ a.jsx(k1, { width: 32, height: 32 })
|
|
4088
4088
|
}
|
|
4089
4089
|
),
|
|
4090
4090
|
/* @__PURE__ */ a.jsx("div", { className: "sc-header--title", children: D.title })
|
|
4091
4091
|
] }),
|
|
4092
4092
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-header--actions", children: [
|
|
4093
4093
|
/* @__PURE__ */ a.jsx(
|
|
4094
|
-
|
|
4094
|
+
Le,
|
|
4095
4095
|
{
|
|
4096
4096
|
onChatWithStaff: () => {
|
|
4097
4097
|
console.log("Chat with staff requested");
|
|
@@ -4106,14 +4106,14 @@ const Ae = (u, D) => {
|
|
|
4106
4106
|
{
|
|
4107
4107
|
className: "sc-header--close-button",
|
|
4108
4108
|
onClick: () => e.setIsOpen(!1),
|
|
4109
|
-
children: /* @__PURE__ */ a.jsx(
|
|
4109
|
+
children: /* @__PURE__ */ a.jsx(hf, {})
|
|
4110
4110
|
}
|
|
4111
4111
|
)
|
|
4112
4112
|
] })
|
|
4113
4113
|
]
|
|
4114
4114
|
}
|
|
4115
4115
|
);
|
|
4116
|
-
},
|
|
4116
|
+
}, Me = ({
|
|
4117
4117
|
width: u = "100",
|
|
4118
4118
|
height: D = "100",
|
|
4119
4119
|
x: f = "0",
|
|
@@ -4138,7 +4138,7 @@ const Ae = (u, D) => {
|
|
|
4138
4138
|
/* @__PURE__ */ a.jsx("path", { d: "M349.926 17.756c141.317 87.019 164.005 282.465 47.152 399.321-74.64 74.638-183.463 93.269-274.888 57.282 97.36 59.953 228.457 49.147 314.888-37.282 131.453-131.456 82.523-352.533-87.152-419.321z" })
|
|
4139
4139
|
]
|
|
4140
4140
|
}
|
|
4141
|
-
),
|
|
4141
|
+
), qe = ({ size: u = 50, color: D = "#000", ...f }) => /* @__PURE__ */ a.jsxs(
|
|
4142
4142
|
"svg",
|
|
4143
4143
|
{
|
|
4144
4144
|
width: u,
|
|
@@ -4198,7 +4198,7 @@ const Ae = (u, D) => {
|
|
|
4198
4198
|
] })
|
|
4199
4199
|
]
|
|
4200
4200
|
}
|
|
4201
|
-
),
|
|
4201
|
+
), ze = () => {
|
|
4202
4202
|
const { t: u } = zu(), { connectionState: D, setConnectionState: f } = Cu(), { colors: e } = ou(), t = () => {
|
|
4203
4203
|
D === 0 && f(1);
|
|
4204
4204
|
}, n = D > 0;
|
|
@@ -4207,8 +4207,8 @@ const Ae = (u, D) => {
|
|
|
4207
4207
|
{
|
|
4208
4208
|
className: "sc-chat--disconnected-icon-wrapper",
|
|
4209
4209
|
style: { backgroundColor: e.messageList.bg },
|
|
4210
|
-
children: n ? /* @__PURE__ */ a.jsx(
|
|
4211
|
-
/* @__PURE__ */ a.jsx(
|
|
4210
|
+
children: n ? /* @__PURE__ */ a.jsx(qe, { className: "loading-image" }) : /* @__PURE__ */ a.jsxs("div", { className: "sc-chat--disconnected-icon", children: [
|
|
4211
|
+
/* @__PURE__ */ a.jsx(Me, {}),
|
|
4212
4212
|
/* @__PURE__ */ a.jsx(
|
|
4213
4213
|
"h3",
|
|
4214
4214
|
{
|
|
@@ -4234,285 +4234,287 @@ const Ae = (u, D) => {
|
|
|
4234
4234
|
}
|
|
4235
4235
|
);
|
|
4236
4236
|
};
|
|
4237
|
-
var
|
|
4238
|
-
|
|
4239
|
-
(function(
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
var
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
return !A && p && (B = p), p || !A && B;
|
|
4278
|
-
}, O = function(k, E) {
|
|
4279
|
-
if (q(k)) return k.clone();
|
|
4280
|
-
var h = typeof E == "object" ? E : {};
|
|
4281
|
-
return h.date = k, h.args = arguments, new hu(h);
|
|
4282
|
-
}, $ = _;
|
|
4283
|
-
$.l = g, $.i = q, $.w = function(k, E) {
|
|
4284
|
-
return O(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
|
|
4285
|
-
};
|
|
4286
|
-
var hu = function() {
|
|
4287
|
-
function k(h) {
|
|
4288
|
-
this.$L = g(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[P] = !0;
|
|
4289
|
-
}
|
|
4290
|
-
var E = k.prototype;
|
|
4291
|
-
return E.parse = function(h) {
|
|
4292
|
-
this.$d = function(A) {
|
|
4293
|
-
var p = A.date, R = A.utc;
|
|
4294
|
-
if (p === null) return /* @__PURE__ */ new Date(NaN);
|
|
4295
|
-
if ($.u(p)) return /* @__PURE__ */ new Date();
|
|
4296
|
-
if (p instanceof Date) return new Date(p);
|
|
4297
|
-
if (typeof p == "string" && !/Z$/i.test(p)) {
|
|
4298
|
-
var N = p.match(v);
|
|
4299
|
-
if (N) {
|
|
4300
|
-
var M = N[2] - 1 || 0, V = (N[7] || "0").substring(0, 3);
|
|
4301
|
-
return R ? new Date(Date.UTC(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V)) : new Date(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V);
|
|
4302
|
-
}
|
|
4303
|
-
}
|
|
4304
|
-
return new Date(p);
|
|
4305
|
-
}(h), this.init();
|
|
4306
|
-
}, E.init = function() {
|
|
4307
|
-
var h = this.$d;
|
|
4308
|
-
this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
|
|
4309
|
-
}, E.$utils = function() {
|
|
4310
|
-
return $;
|
|
4311
|
-
}, E.isValid = function() {
|
|
4312
|
-
return this.$d.toString() !== C;
|
|
4313
|
-
}, E.isSame = function(h, A) {
|
|
4314
|
-
var p = O(h);
|
|
4315
|
-
return this.startOf(A) <= p && p <= this.endOf(A);
|
|
4316
|
-
}, E.isAfter = function(h, A) {
|
|
4317
|
-
return O(h) < this.startOf(A);
|
|
4318
|
-
}, E.isBefore = function(h, A) {
|
|
4319
|
-
return this.endOf(A) < O(h);
|
|
4320
|
-
}, E.$g = function(h, A, p) {
|
|
4321
|
-
return $.u(h) ? this[A] : this.set(p, h);
|
|
4322
|
-
}, E.unix = function() {
|
|
4323
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
4324
|
-
}, E.valueOf = function() {
|
|
4325
|
-
return this.$d.getTime();
|
|
4326
|
-
}, E.startOf = function(h, A) {
|
|
4327
|
-
var p = this, R = !!$.u(A) || A, N = $.p(h), M = function(Bu, ru) {
|
|
4328
|
-
var du = $.w(p.$u ? Date.UTC(p.$y, ru, Bu) : new Date(p.$y, ru, Bu), p);
|
|
4329
|
-
return R ? du : du.endOf(d);
|
|
4330
|
-
}, V = function(Bu, ru) {
|
|
4331
|
-
return $.w(p.toDate()[Bu].apply(p.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ru)), p);
|
|
4332
|
-
}, J = this.$W, z = this.$M, Z = this.$D, tu = "set" + (this.$u ? "UTC" : "");
|
|
4333
|
-
switch (N) {
|
|
4334
|
-
case j:
|
|
4335
|
-
return R ? M(1, 0) : M(31, 11);
|
|
4336
|
-
case c:
|
|
4337
|
-
return R ? M(1, z) : M(0, z + 1);
|
|
4338
|
-
case o:
|
|
4339
|
-
var cu = this.$locale().weekStart || 0, _u = (J < cu ? J + 7 : J) - cu;
|
|
4340
|
-
return M(R ? Z - _u : Z + (6 - _u), z);
|
|
4341
|
-
case d:
|
|
4342
|
-
case y:
|
|
4343
|
-
return V(tu + "Hours", 0);
|
|
4344
|
-
case F:
|
|
4345
|
-
return V(tu + "Minutes", 1);
|
|
4346
|
-
case s:
|
|
4347
|
-
return V(tu + "Seconds", 2);
|
|
4348
|
-
case r:
|
|
4349
|
-
return V(tu + "Milliseconds", 3);
|
|
4350
|
-
default:
|
|
4351
|
-
return this.clone();
|
|
4237
|
+
var zD = { exports: {} }, Hf;
|
|
4238
|
+
function j1() {
|
|
4239
|
+
return Hf || (Hf = 1, function(u, D) {
|
|
4240
|
+
(function(f, e) {
|
|
4241
|
+
u.exports = e();
|
|
4242
|
+
})(dD, function() {
|
|
4243
|
+
var f = 1e3, e = 6e4, t = 36e5, n = "millisecond", r = "second", s = "minute", F = "hour", d = "day", o = "week", c = "month", l = "quarter", j = "year", y = "date", C = "Invalid Date", v = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, x = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, m = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
|
|
4244
|
+
var E = ["th", "st", "nd", "rd"], h = k % 100;
|
|
4245
|
+
return "[" + k + (E[(h - 20) % 10] || E[h] || E[0]) + "]";
|
|
4246
|
+
} }, T = function(k, E, h) {
|
|
4247
|
+
var A = String(k);
|
|
4248
|
+
return !A || A.length >= E ? k : "" + Array(E + 1 - A.length).join(h) + k;
|
|
4249
|
+
}, _ = { s: T, z: function(k) {
|
|
4250
|
+
var E = -k.utcOffset(), h = Math.abs(E), A = Math.floor(h / 60), p = h % 60;
|
|
4251
|
+
return (E <= 0 ? "+" : "-") + T(A, 2, "0") + ":" + T(p, 2, "0");
|
|
4252
|
+
}, m: function k(E, h) {
|
|
4253
|
+
if (E.date() < h.date()) return -k(h, E);
|
|
4254
|
+
var A = 12 * (h.year() - E.year()) + (h.month() - E.month()), p = E.clone().add(A, c), R = h - p < 0, N = E.clone().add(A + (R ? -1 : 1), c);
|
|
4255
|
+
return +(-(A + (h - p) / (R ? p - N : N - p)) || 0);
|
|
4256
|
+
}, a: function(k) {
|
|
4257
|
+
return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
|
|
4258
|
+
}, p: function(k) {
|
|
4259
|
+
return { M: c, y: j, w: o, d, D: y, h: F, m: s, s: r, ms: n, Q: l }[k] || String(k || "").toLowerCase().replace(/s$/, "");
|
|
4260
|
+
}, u: function(k) {
|
|
4261
|
+
return k === void 0;
|
|
4262
|
+
} }, B = "en", I = {};
|
|
4263
|
+
I[B] = m;
|
|
4264
|
+
var P = "$isDayjsObject", q = function(k) {
|
|
4265
|
+
return k instanceof hu || !(!k || !k[P]);
|
|
4266
|
+
}, g = function k(E, h, A) {
|
|
4267
|
+
var p;
|
|
4268
|
+
if (!E) return B;
|
|
4269
|
+
if (typeof E == "string") {
|
|
4270
|
+
var R = E.toLowerCase();
|
|
4271
|
+
I[R] && (p = R), h && (I[R] = h, p = R);
|
|
4272
|
+
var N = E.split("-");
|
|
4273
|
+
if (!p && N.length > 1) return k(N[0]);
|
|
4274
|
+
} else {
|
|
4275
|
+
var M = E.name;
|
|
4276
|
+
I[M] = E, p = M;
|
|
4352
4277
|
}
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
var
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
}, E.subtract = function(h, A) {
|
|
4380
|
-
return this.add(-1 * h, A);
|
|
4381
|
-
}, E.format = function(h) {
|
|
4382
|
-
var A = this, p = this.$locale();
|
|
4383
|
-
if (!this.isValid()) return p.invalidDate || C;
|
|
4384
|
-
var R = h || "YYYY-MM-DDTHH:mm:ssZ", N = $.z(this), M = this.$H, V = this.$m, J = this.$M, z = p.weekdays, Z = p.months, tu = p.meridiem, cu = function(ru, du, Pu, Iu) {
|
|
4385
|
-
return ru && (ru[du] || ru(A, R)) || Pu[du].slice(0, Iu);
|
|
4386
|
-
}, _u = function(ru) {
|
|
4387
|
-
return $.s(M % 12 || 12, ru, "0");
|
|
4388
|
-
}, Bu = tu || function(ru, du, Pu) {
|
|
4389
|
-
var Iu = ru < 12 ? "AM" : "PM";
|
|
4390
|
-
return Pu ? Iu.toLowerCase() : Iu;
|
|
4391
|
-
};
|
|
4392
|
-
return R.replace(x, function(ru, du) {
|
|
4393
|
-
return du || function(Pu) {
|
|
4394
|
-
switch (Pu) {
|
|
4395
|
-
case "YY":
|
|
4396
|
-
return String(A.$y).slice(-2);
|
|
4397
|
-
case "YYYY":
|
|
4398
|
-
return $.s(A.$y, 4, "0");
|
|
4399
|
-
case "M":
|
|
4400
|
-
return J + 1;
|
|
4401
|
-
case "MM":
|
|
4402
|
-
return $.s(J + 1, 2, "0");
|
|
4403
|
-
case "MMM":
|
|
4404
|
-
return cu(p.monthsShort, J, Z, 3);
|
|
4405
|
-
case "MMMM":
|
|
4406
|
-
return cu(Z, J);
|
|
4407
|
-
case "D":
|
|
4408
|
-
return A.$D;
|
|
4409
|
-
case "DD":
|
|
4410
|
-
return $.s(A.$D, 2, "0");
|
|
4411
|
-
case "d":
|
|
4412
|
-
return String(A.$W);
|
|
4413
|
-
case "dd":
|
|
4414
|
-
return cu(p.weekdaysMin, A.$W, z, 2);
|
|
4415
|
-
case "ddd":
|
|
4416
|
-
return cu(p.weekdaysShort, A.$W, z, 3);
|
|
4417
|
-
case "dddd":
|
|
4418
|
-
return z[A.$W];
|
|
4419
|
-
case "H":
|
|
4420
|
-
return String(M);
|
|
4421
|
-
case "HH":
|
|
4422
|
-
return $.s(M, 2, "0");
|
|
4423
|
-
case "h":
|
|
4424
|
-
return _u(1);
|
|
4425
|
-
case "hh":
|
|
4426
|
-
return _u(2);
|
|
4427
|
-
case "a":
|
|
4428
|
-
return Bu(M, V, !0);
|
|
4429
|
-
case "A":
|
|
4430
|
-
return Bu(M, V, !1);
|
|
4431
|
-
case "m":
|
|
4432
|
-
return String(V);
|
|
4433
|
-
case "mm":
|
|
4434
|
-
return $.s(V, 2, "0");
|
|
4435
|
-
case "s":
|
|
4436
|
-
return String(A.$s);
|
|
4437
|
-
case "ss":
|
|
4438
|
-
return $.s(A.$s, 2, "0");
|
|
4439
|
-
case "SSS":
|
|
4440
|
-
return $.s(A.$ms, 3, "0");
|
|
4441
|
-
case "Z":
|
|
4442
|
-
return N;
|
|
4278
|
+
return !A && p && (B = p), p || !A && B;
|
|
4279
|
+
}, O = function(k, E) {
|
|
4280
|
+
if (q(k)) return k.clone();
|
|
4281
|
+
var h = typeof E == "object" ? E : {};
|
|
4282
|
+
return h.date = k, h.args = arguments, new hu(h);
|
|
4283
|
+
}, $ = _;
|
|
4284
|
+
$.l = g, $.i = q, $.w = function(k, E) {
|
|
4285
|
+
return O(k, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
|
|
4286
|
+
};
|
|
4287
|
+
var hu = function() {
|
|
4288
|
+
function k(h) {
|
|
4289
|
+
this.$L = g(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[P] = !0;
|
|
4290
|
+
}
|
|
4291
|
+
var E = k.prototype;
|
|
4292
|
+
return E.parse = function(h) {
|
|
4293
|
+
this.$d = function(A) {
|
|
4294
|
+
var p = A.date, R = A.utc;
|
|
4295
|
+
if (p === null) return /* @__PURE__ */ new Date(NaN);
|
|
4296
|
+
if ($.u(p)) return /* @__PURE__ */ new Date();
|
|
4297
|
+
if (p instanceof Date) return new Date(p);
|
|
4298
|
+
if (typeof p == "string" && !/Z$/i.test(p)) {
|
|
4299
|
+
var N = p.match(v);
|
|
4300
|
+
if (N) {
|
|
4301
|
+
var M = N[2] - 1 || 0, V = (N[7] || "0").substring(0, 3);
|
|
4302
|
+
return R ? new Date(Date.UTC(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V)) : new Date(N[1], M, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, V);
|
|
4303
|
+
}
|
|
4443
4304
|
}
|
|
4444
|
-
return
|
|
4445
|
-
}(
|
|
4446
|
-
})
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4305
|
+
return new Date(p);
|
|
4306
|
+
}(h), this.init();
|
|
4307
|
+
}, E.init = function() {
|
|
4308
|
+
var h = this.$d;
|
|
4309
|
+
this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
|
|
4310
|
+
}, E.$utils = function() {
|
|
4311
|
+
return $;
|
|
4312
|
+
}, E.isValid = function() {
|
|
4313
|
+
return this.$d.toString() !== C;
|
|
4314
|
+
}, E.isSame = function(h, A) {
|
|
4315
|
+
var p = O(h);
|
|
4316
|
+
return this.startOf(A) <= p && p <= this.endOf(A);
|
|
4317
|
+
}, E.isAfter = function(h, A) {
|
|
4318
|
+
return O(h) < this.startOf(A);
|
|
4319
|
+
}, E.isBefore = function(h, A) {
|
|
4320
|
+
return this.endOf(A) < O(h);
|
|
4321
|
+
}, E.$g = function(h, A, p) {
|
|
4322
|
+
return $.u(h) ? this[A] : this.set(p, h);
|
|
4323
|
+
}, E.unix = function() {
|
|
4324
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
4325
|
+
}, E.valueOf = function() {
|
|
4326
|
+
return this.$d.getTime();
|
|
4327
|
+
}, E.startOf = function(h, A) {
|
|
4328
|
+
var p = this, R = !!$.u(A) || A, N = $.p(h), M = function(Bu, ru) {
|
|
4329
|
+
var du = $.w(p.$u ? Date.UTC(p.$y, ru, Bu) : new Date(p.$y, ru, Bu), p);
|
|
4330
|
+
return R ? du : du.endOf(d);
|
|
4331
|
+
}, V = function(Bu, ru) {
|
|
4332
|
+
return $.w(p.toDate()[Bu].apply(p.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ru)), p);
|
|
4333
|
+
}, J = this.$W, z = this.$M, Q = this.$D, tu = "set" + (this.$u ? "UTC" : "");
|
|
4334
|
+
switch (N) {
|
|
4335
|
+
case j:
|
|
4336
|
+
return R ? M(1, 0) : M(31, 11);
|
|
4337
|
+
case c:
|
|
4338
|
+
return R ? M(1, z) : M(0, z + 1);
|
|
4339
|
+
case o:
|
|
4340
|
+
var cu = this.$locale().weekStart || 0, _u = (J < cu ? J + 7 : J) - cu;
|
|
4341
|
+
return M(R ? Q - _u : Q + (6 - _u), z);
|
|
4342
|
+
case d:
|
|
4343
|
+
case y:
|
|
4344
|
+
return V(tu + "Hours", 0);
|
|
4345
|
+
case F:
|
|
4346
|
+
return V(tu + "Minutes", 1);
|
|
4347
|
+
case s:
|
|
4348
|
+
return V(tu + "Seconds", 2);
|
|
4349
|
+
case r:
|
|
4350
|
+
return V(tu + "Milliseconds", 3);
|
|
4351
|
+
default:
|
|
4352
|
+
return this.clone();
|
|
4353
|
+
}
|
|
4354
|
+
}, E.endOf = function(h) {
|
|
4355
|
+
return this.startOf(h, !1);
|
|
4356
|
+
}, E.$set = function(h, A) {
|
|
4357
|
+
var p, R = $.p(h), N = "set" + (this.$u ? "UTC" : ""), M = (p = {}, p[d] = N + "Date", p[y] = N + "Date", p[c] = N + "Month", p[j] = N + "FullYear", p[F] = N + "Hours", p[s] = N + "Minutes", p[r] = N + "Seconds", p[n] = N + "Milliseconds", p)[R], V = R === d ? this.$D + (A - this.$W) : A;
|
|
4358
|
+
if (R === c || R === j) {
|
|
4359
|
+
var J = this.clone().set(y, 1);
|
|
4360
|
+
J.$d[M](V), J.init(), this.$d = J.set(y, Math.min(this.$D, J.daysInMonth())).$d;
|
|
4361
|
+
} else M && this.$d[M](V);
|
|
4362
|
+
return this.init(), this;
|
|
4363
|
+
}, E.set = function(h, A) {
|
|
4364
|
+
return this.clone().$set(h, A);
|
|
4365
|
+
}, E.get = function(h) {
|
|
4366
|
+
return this[$.p(h)]();
|
|
4367
|
+
}, E.add = function(h, A) {
|
|
4368
|
+
var p, R = this;
|
|
4369
|
+
h = Number(h);
|
|
4370
|
+
var N = $.p(A), M = function(z) {
|
|
4371
|
+
var Q = O(R);
|
|
4372
|
+
return $.w(Q.date(Q.date() + Math.round(z * h)), R);
|
|
4373
|
+
};
|
|
4374
|
+
if (N === c) return this.set(c, this.$M + h);
|
|
4375
|
+
if (N === j) return this.set(j, this.$y + h);
|
|
4376
|
+
if (N === d) return M(1);
|
|
4377
|
+
if (N === o) return M(7);
|
|
4378
|
+
var V = (p = {}, p[s] = e, p[F] = t, p[r] = f, p)[N] || 1, J = this.$d.getTime() + h * V;
|
|
4379
|
+
return $.w(J, this);
|
|
4380
|
+
}, E.subtract = function(h, A) {
|
|
4381
|
+
return this.add(-1 * h, A);
|
|
4382
|
+
}, E.format = function(h) {
|
|
4383
|
+
var A = this, p = this.$locale();
|
|
4384
|
+
if (!this.isValid()) return p.invalidDate || C;
|
|
4385
|
+
var R = h || "YYYY-MM-DDTHH:mm:ssZ", N = $.z(this), M = this.$H, V = this.$m, J = this.$M, z = p.weekdays, Q = p.months, tu = p.meridiem, cu = function(ru, du, Pu, Iu) {
|
|
4386
|
+
return ru && (ru[du] || ru(A, R)) || Pu[du].slice(0, Iu);
|
|
4387
|
+
}, _u = function(ru) {
|
|
4388
|
+
return $.s(M % 12 || 12, ru, "0");
|
|
4389
|
+
}, Bu = tu || function(ru, du, Pu) {
|
|
4390
|
+
var Iu = ru < 12 ? "AM" : "PM";
|
|
4391
|
+
return Pu ? Iu.toLowerCase() : Iu;
|
|
4392
|
+
};
|
|
4393
|
+
return R.replace(x, function(ru, du) {
|
|
4394
|
+
return du || function(Pu) {
|
|
4395
|
+
switch (Pu) {
|
|
4396
|
+
case "YY":
|
|
4397
|
+
return String(A.$y).slice(-2);
|
|
4398
|
+
case "YYYY":
|
|
4399
|
+
return $.s(A.$y, 4, "0");
|
|
4400
|
+
case "M":
|
|
4401
|
+
return J + 1;
|
|
4402
|
+
case "MM":
|
|
4403
|
+
return $.s(J + 1, 2, "0");
|
|
4404
|
+
case "MMM":
|
|
4405
|
+
return cu(p.monthsShort, J, Q, 3);
|
|
4406
|
+
case "MMMM":
|
|
4407
|
+
return cu(Q, J);
|
|
4408
|
+
case "D":
|
|
4409
|
+
return A.$D;
|
|
4410
|
+
case "DD":
|
|
4411
|
+
return $.s(A.$D, 2, "0");
|
|
4412
|
+
case "d":
|
|
4413
|
+
return String(A.$W);
|
|
4414
|
+
case "dd":
|
|
4415
|
+
return cu(p.weekdaysMin, A.$W, z, 2);
|
|
4416
|
+
case "ddd":
|
|
4417
|
+
return cu(p.weekdaysShort, A.$W, z, 3);
|
|
4418
|
+
case "dddd":
|
|
4419
|
+
return z[A.$W];
|
|
4420
|
+
case "H":
|
|
4421
|
+
return String(M);
|
|
4422
|
+
case "HH":
|
|
4423
|
+
return $.s(M, 2, "0");
|
|
4424
|
+
case "h":
|
|
4425
|
+
return _u(1);
|
|
4426
|
+
case "hh":
|
|
4427
|
+
return _u(2);
|
|
4428
|
+
case "a":
|
|
4429
|
+
return Bu(M, V, !0);
|
|
4430
|
+
case "A":
|
|
4431
|
+
return Bu(M, V, !1);
|
|
4432
|
+
case "m":
|
|
4433
|
+
return String(V);
|
|
4434
|
+
case "mm":
|
|
4435
|
+
return $.s(V, 2, "0");
|
|
4436
|
+
case "s":
|
|
4437
|
+
return String(A.$s);
|
|
4438
|
+
case "ss":
|
|
4439
|
+
return $.s(A.$s, 2, "0");
|
|
4440
|
+
case "SSS":
|
|
4441
|
+
return $.s(A.$ms, 3, "0");
|
|
4442
|
+
case "Z":
|
|
4443
|
+
return N;
|
|
4444
|
+
}
|
|
4445
|
+
return null;
|
|
4446
|
+
}(ru) || N.replace(":", "");
|
|
4447
|
+
});
|
|
4448
|
+
}, E.utcOffset = function() {
|
|
4449
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
4450
|
+
}, E.diff = function(h, A, p) {
|
|
4451
|
+
var R, N = this, M = $.p(A), V = O(h), J = (V.utcOffset() - this.utcOffset()) * e, z = this - V, Q = function() {
|
|
4452
|
+
return $.m(N, V);
|
|
4453
|
+
};
|
|
4454
|
+
switch (M) {
|
|
4455
|
+
case j:
|
|
4456
|
+
R = Q() / 12;
|
|
4457
|
+
break;
|
|
4458
|
+
case c:
|
|
4459
|
+
R = Q();
|
|
4460
|
+
break;
|
|
4461
|
+
case l:
|
|
4462
|
+
R = Q() / 3;
|
|
4463
|
+
break;
|
|
4464
|
+
case o:
|
|
4465
|
+
R = (z - J) / 6048e5;
|
|
4466
|
+
break;
|
|
4467
|
+
case d:
|
|
4468
|
+
R = (z - J) / 864e5;
|
|
4469
|
+
break;
|
|
4470
|
+
case F:
|
|
4471
|
+
R = z / t;
|
|
4472
|
+
break;
|
|
4473
|
+
case s:
|
|
4474
|
+
R = z / e;
|
|
4475
|
+
break;
|
|
4476
|
+
case r:
|
|
4477
|
+
R = z / f;
|
|
4478
|
+
break;
|
|
4479
|
+
default:
|
|
4480
|
+
R = z;
|
|
4481
|
+
}
|
|
4482
|
+
return p ? R : $.a(R);
|
|
4483
|
+
}, E.daysInMonth = function() {
|
|
4484
|
+
return this.endOf(c).$D;
|
|
4485
|
+
}, E.$locale = function() {
|
|
4486
|
+
return I[this.$L];
|
|
4487
|
+
}, E.locale = function(h, A) {
|
|
4488
|
+
if (!h) return this.$L;
|
|
4489
|
+
var p = this.clone(), R = g(h, A, !0);
|
|
4490
|
+
return R && (p.$L = R), p;
|
|
4491
|
+
}, E.clone = function() {
|
|
4492
|
+
return $.w(this.$d, this);
|
|
4493
|
+
}, E.toDate = function() {
|
|
4494
|
+
return new Date(this.valueOf());
|
|
4495
|
+
}, E.toJSON = function() {
|
|
4496
|
+
return this.isValid() ? this.toISOString() : null;
|
|
4497
|
+
}, E.toISOString = function() {
|
|
4498
|
+
return this.$d.toISOString();
|
|
4499
|
+
}, E.toString = function() {
|
|
4500
|
+
return this.$d.toUTCString();
|
|
4501
|
+
}, k;
|
|
4502
|
+
}(), fu = hu.prototype;
|
|
4503
|
+
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D", y]].forEach(function(k) {
|
|
4504
|
+
fu[k[1]] = function(E) {
|
|
4505
|
+
return this.$g(E, k[0], k[1]);
|
|
4452
4506
|
};
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
R = (z - J) / 6048e5;
|
|
4465
|
-
break;
|
|
4466
|
-
case d:
|
|
4467
|
-
R = (z - J) / 864e5;
|
|
4468
|
-
break;
|
|
4469
|
-
case F:
|
|
4470
|
-
R = z / t;
|
|
4471
|
-
break;
|
|
4472
|
-
case s:
|
|
4473
|
-
R = z / e;
|
|
4474
|
-
break;
|
|
4475
|
-
case r:
|
|
4476
|
-
R = z / f;
|
|
4477
|
-
break;
|
|
4478
|
-
default:
|
|
4479
|
-
R = z;
|
|
4480
|
-
}
|
|
4481
|
-
return p ? R : $.a(R);
|
|
4482
|
-
}, E.daysInMonth = function() {
|
|
4483
|
-
return this.endOf(c).$D;
|
|
4484
|
-
}, E.$locale = function() {
|
|
4485
|
-
return I[this.$L];
|
|
4486
|
-
}, E.locale = function(h, A) {
|
|
4487
|
-
if (!h) return this.$L;
|
|
4488
|
-
var p = this.clone(), R = g(h, A, !0);
|
|
4489
|
-
return R && (p.$L = R), p;
|
|
4490
|
-
}, E.clone = function() {
|
|
4491
|
-
return $.w(this.$d, this);
|
|
4492
|
-
}, E.toDate = function() {
|
|
4493
|
-
return new Date(this.valueOf());
|
|
4494
|
-
}, E.toJSON = function() {
|
|
4495
|
-
return this.isValid() ? this.toISOString() : null;
|
|
4496
|
-
}, E.toISOString = function() {
|
|
4497
|
-
return this.$d.toISOString();
|
|
4498
|
-
}, E.toString = function() {
|
|
4499
|
-
return this.$d.toUTCString();
|
|
4500
|
-
}, k;
|
|
4501
|
-
}(), fu = hu.prototype;
|
|
4502
|
-
return O.prototype = fu, [["$ms", n], ["$s", r], ["$m", s], ["$H", F], ["$W", d], ["$M", c], ["$y", j], ["$D", y]].forEach(function(k) {
|
|
4503
|
-
fu[k[1]] = function(E) {
|
|
4504
|
-
return this.$g(E, k[0], k[1]);
|
|
4505
|
-
};
|
|
4506
|
-
}), O.extend = function(k, E) {
|
|
4507
|
-
return k.$i || (k(E, hu, O), k.$i = !0), O;
|
|
4508
|
-
}, O.locale = g, O.isDayjs = q, O.unix = function(k) {
|
|
4509
|
-
return O(1e3 * k);
|
|
4510
|
-
}, O.en = I[B], O.Ls = I, O.p = {}, O;
|
|
4511
|
-
});
|
|
4512
|
-
})(x1);
|
|
4513
|
-
var k1 = x1.exports;
|
|
4514
|
-
const j1 = /* @__PURE__ */ sf(k1);
|
|
4515
|
-
var ze = { exports: {} };
|
|
4507
|
+
}), O.extend = function(k, E) {
|
|
4508
|
+
return k.$i || (k(E, hu, O), k.$i = !0), O;
|
|
4509
|
+
}, O.locale = g, O.isDayjs = q, O.unix = function(k) {
|
|
4510
|
+
return O(1e3 * k);
|
|
4511
|
+
}, O.en = I[B], O.Ls = I, O.p = {}, O;
|
|
4512
|
+
});
|
|
4513
|
+
}(zD)), zD.exports;
|
|
4514
|
+
}
|
|
4515
|
+
var Ue = j1();
|
|
4516
|
+
const S1 = /* @__PURE__ */ Ff(Ue);
|
|
4517
|
+
var Ve = { exports: {} };
|
|
4516
4518
|
(function(u, D) {
|
|
4517
4519
|
(function(f, e) {
|
|
4518
4520
|
u.exports = e();
|
|
@@ -4522,11 +4524,11 @@ var ze = { exports: {} };
|
|
|
4522
4524
|
return "[" + f + (e[(t - 20) % 10] || e[t] || e[0]) + "]";
|
|
4523
4525
|
} };
|
|
4524
4526
|
});
|
|
4525
|
-
})(
|
|
4526
|
-
var
|
|
4527
|
+
})(Ve);
|
|
4528
|
+
var He = { exports: {} };
|
|
4527
4529
|
(function(u, D) {
|
|
4528
4530
|
(function(f, e) {
|
|
4529
|
-
u.exports = e(
|
|
4531
|
+
u.exports = e(j1());
|
|
4530
4532
|
})(dD, function(f) {
|
|
4531
4533
|
function e(r) {
|
|
4532
4534
|
return r && typeof r == "object" && "default" in r ? r : { default: r };
|
|
@@ -4536,8 +4538,8 @@ var Ue = { exports: {} };
|
|
|
4536
4538
|
} };
|
|
4537
4539
|
return t.default.locale(n, null, !0), n;
|
|
4538
4540
|
});
|
|
4539
|
-
})(
|
|
4540
|
-
var
|
|
4541
|
+
})(He);
|
|
4542
|
+
var T1 = { exports: {} };
|
|
4541
4543
|
(function(u, D) {
|
|
4542
4544
|
(function(f, e) {
|
|
4543
4545
|
u.exports = e();
|
|
@@ -4578,9 +4580,9 @@ var S1 = { exports: {} };
|
|
|
4578
4580
|
};
|
|
4579
4581
|
};
|
|
4580
4582
|
});
|
|
4581
|
-
})(
|
|
4582
|
-
var
|
|
4583
|
-
const
|
|
4583
|
+
})(T1);
|
|
4584
|
+
var We = T1.exports;
|
|
4585
|
+
const Ye = /* @__PURE__ */ Ff(We), N1 = ({
|
|
4584
4586
|
width: u = "18",
|
|
4585
4587
|
height: D = "18",
|
|
4586
4588
|
...f
|
|
@@ -4675,10 +4677,10 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4675
4677
|
},
|
|
4676
4678
|
F
|
|
4677
4679
|
)) });
|
|
4678
|
-
},
|
|
4679
|
-
let D =
|
|
4680
|
-
return D =
|
|
4681
|
-
},
|
|
4680
|
+
}, Ke = (u, D = 100) => u.length > D ? u.substr(0, D) + "..." : u, Je = (u) => u.replace(/\n/g, "<br />"), Ge = (u) => {
|
|
4681
|
+
let D = Ke(u, 50);
|
|
4682
|
+
return D = Je(u), D;
|
|
4683
|
+
}, Xe = ({ message: u }) => /* @__PURE__ */ a.jsx("div", { className: "sc-message--carousel-element-wrapper", children: /* @__PURE__ */ a.jsxs("div", { className: "sc-message--carousel-element", children: [
|
|
4682
4684
|
u.image_url && /* @__PURE__ */ a.jsx(
|
|
4683
4685
|
"div",
|
|
4684
4686
|
{
|
|
@@ -4692,7 +4694,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4692
4694
|
"p",
|
|
4693
4695
|
{
|
|
4694
4696
|
dangerouslySetInnerHTML: {
|
|
4695
|
-
__html:
|
|
4697
|
+
__html: Ge(u.subtitle)
|
|
4696
4698
|
}
|
|
4697
4699
|
}
|
|
4698
4700
|
)
|
|
@@ -4703,7 +4705,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4703
4705
|
message: { data: { buttons: u.buttons } }
|
|
4704
4706
|
}
|
|
4705
4707
|
)
|
|
4706
|
-
] }) }),
|
|
4708
|
+
] }) }), Ze = ({
|
|
4707
4709
|
messageCarousel: u
|
|
4708
4710
|
}) => {
|
|
4709
4711
|
const { colors: D } = ou(), [f, e] = U(0), t = u.data.elements, n = () => {
|
|
@@ -4727,7 +4729,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4727
4729
|
{
|
|
4728
4730
|
className: "sc-message--carousel-inner",
|
|
4729
4731
|
style: { transform: `translateX(-${f * 100}%)` },
|
|
4730
|
-
children: t.map((d, o) => /* @__PURE__ */ a.jsx(
|
|
4732
|
+
children: t.map((d, o) => /* @__PURE__ */ a.jsx(Xe, { message: d, idx: o }, o))
|
|
4731
4733
|
}
|
|
4732
4734
|
),
|
|
4733
4735
|
F && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -4751,15 +4753,15 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4751
4753
|
]
|
|
4752
4754
|
}
|
|
4753
4755
|
);
|
|
4754
|
-
},
|
|
4756
|
+
}, Qe = ({
|
|
4755
4757
|
viewBox: u = "0 0 512 512",
|
|
4756
4758
|
...D
|
|
4757
4759
|
}) => /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: /* @__PURE__ */ a.jsxs("g", { "data-name": "1", children: [
|
|
4758
4760
|
/* @__PURE__ */ a.jsx("path", { d: "M378.83 450H150a50.17 50.17 0 01-50.11-50.11V98.11A50.17 50.17 0 01150 48h150.1a15 15 0 0110.61 4.39l113.84 113.88a15 15 0 014.39 10.61v223A50.17 50.17 0 01378.83 450zM150 78a20.13 20.13 0 00-20.11 20.11v301.78A20.13 20.13 0 00150 420h228.83a20.13 20.13 0 0020.11-20.11v-216.8L293.85 78z" }),
|
|
4759
4761
|
/* @__PURE__ */ a.jsx("path", { d: "M413.94 191.88h-78.77a50.17 50.17 0 01-50.11-50.11V63a15 15 0 0130 0v78.77a20.13 20.13 0 0020.11 20.11h78.77a15 15 0 010 30zM264.4 375a15 15 0 01-10.61-4.4l-54.45-54.44a15 15 0 1121.21-21.22l43.85 43.84 43.84-43.84a15 15 0 1121.21 21.22L275 370.55a15 15 0 01-10.6 4.45z" }),
|
|
4760
4762
|
/* @__PURE__ */ a.jsx("path", { d: "M264.4 365a15 15 0 01-15-15V231a15 15 0 0130 0v119a15 15 0 01-15 15z" })
|
|
4761
|
-
] }) }),
|
|
4762
|
-
const { t: D } = zu(), { colors: f } = ou(), e = f[u.direction ||
|
|
4763
|
+
] }) }), u3 = ({ message: u }) => {
|
|
4764
|
+
const { t: D } = zu(), { colors: f } = ou(), e = f[u.direction || uu.received];
|
|
4763
4765
|
if (!("type" in u.data))
|
|
4764
4766
|
throw new Error("Unable to detect type for file message");
|
|
4765
4767
|
if (u.data && u.data.type !== "image" && u.data.type !== "audio" && u.data.type !== "video" && u.data.type !== "file")
|
|
@@ -4798,7 +4800,7 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4798
4800
|
rel: "noopener noreferrer",
|
|
4799
4801
|
download: !0,
|
|
4800
4802
|
children: [
|
|
4801
|
-
/* @__PURE__ */ a.jsx(
|
|
4803
|
+
/* @__PURE__ */ a.jsx(Qe, {}),
|
|
4802
4804
|
D("messages.file_message.download")
|
|
4803
4805
|
]
|
|
4804
4806
|
}
|
|
@@ -4808,21 +4810,21 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4808
4810
|
]
|
|
4809
4811
|
}
|
|
4810
4812
|
);
|
|
4811
|
-
},
|
|
4813
|
+
}, D3 = ({ message: u }) => {
|
|
4812
4814
|
var d;
|
|
4813
4815
|
const { colors: D } = ou(), f = Nu(), [e, t] = U(!1), n = mu(null);
|
|
4814
|
-
if (
|
|
4816
|
+
if (Z(() => {
|
|
4815
4817
|
const o = new IntersectionObserver((c) => {
|
|
4816
4818
|
!e && c[0].intersectionRatio > 0 && t(!0);
|
|
4817
4819
|
});
|
|
4818
4820
|
return n.current && o.observe(n.current), () => {
|
|
4819
4821
|
n.current && o.unobserve(n.current);
|
|
4820
4822
|
};
|
|
4821
|
-
}, [e]),
|
|
4823
|
+
}, [e]), Z(() => {
|
|
4822
4824
|
e && f && f.scroll > 85 && (f.scroll = 101);
|
|
4823
4825
|
}, [e, f]), !("coordinates" in u.data))
|
|
4824
4826
|
throw new Error("Unable to find coordinates");
|
|
4825
|
-
const r = ((d = u.data) == null ? void 0 : d.coordinates) || { lat: 0, lng: 0 }, s = `https://www.openstreetmap.org/export/embed.html?bbox=${r.lng - 0.1},${r.lat - 0.1},${r.lng + 0.1},${r.lat + 0.1}&layer=mapnik&marker=${r.lat},${r.lng}`, F = D[u.direction ||
|
|
4827
|
+
const r = ((d = u.data) == null ? void 0 : d.coordinates) || { lat: 0, lng: 0 }, s = `https://www.openstreetmap.org/export/embed.html?bbox=${r.lng - 0.1},${r.lat - 0.1},${r.lng + 0.1},${r.lat + 0.1}&layer=mapnik&marker=${r.lat},${r.lng}`, F = D[u.direction || uu.received];
|
|
4826
4828
|
return /* @__PURE__ */ a.jsx(
|
|
4827
4829
|
"div",
|
|
4828
4830
|
{
|
|
@@ -4846,14 +4848,14 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4846
4848
|
)
|
|
4847
4849
|
}
|
|
4848
4850
|
);
|
|
4849
|
-
},
|
|
4851
|
+
}, f3 = ({ messageList: u }) => {
|
|
4850
4852
|
const { colors: D } = ou(), f = (r) => {
|
|
4851
4853
|
let s = e(r, 50);
|
|
4852
4854
|
return s = t(r), s;
|
|
4853
4855
|
}, e = (r, s = 100) => r.length > s ? r.substr(0, s) + "..." : r, t = (r) => r.replace(/\n/g, "<br />");
|
|
4854
4856
|
if (!("elements" in u.data))
|
|
4855
4857
|
throw new Error("Unable to find elements");
|
|
4856
|
-
const n = D[u.direction ||
|
|
4858
|
+
const n = D[u.direction || uu.received];
|
|
4857
4859
|
return /* @__PURE__ */ a.jsxs(
|
|
4858
4860
|
"div",
|
|
4859
4861
|
{
|
|
@@ -4918,17 +4920,17 @@ const He = /* @__PURE__ */ sf(Ve), T1 = ({
|
|
|
4918
4920
|
}
|
|
4919
4921
|
);
|
|
4920
4922
|
};
|
|
4921
|
-
var
|
|
4922
|
-
return
|
|
4923
|
+
var tf = function(u, D) {
|
|
4924
|
+
return tf = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, e) {
|
|
4923
4925
|
f.__proto__ = e;
|
|
4924
4926
|
} || function(f, e) {
|
|
4925
4927
|
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && (f[t] = e[t]);
|
|
4926
|
-
},
|
|
4928
|
+
}, tf(u, D);
|
|
4927
4929
|
};
|
|
4928
4930
|
function CD(u, D) {
|
|
4929
4931
|
if (typeof D != "function" && D !== null)
|
|
4930
4932
|
throw new TypeError("Class extends value " + String(D) + " is not a constructor or null");
|
|
4931
|
-
|
|
4933
|
+
tf(u, D);
|
|
4932
4934
|
function f() {
|
|
4933
4935
|
this.constructor = u;
|
|
4934
4936
|
}
|
|
@@ -4943,7 +4945,7 @@ var iu = function() {
|
|
|
4943
4945
|
return D;
|
|
4944
4946
|
}, iu.apply(this, arguments);
|
|
4945
4947
|
};
|
|
4946
|
-
function
|
|
4948
|
+
function e3(u, D) {
|
|
4947
4949
|
var f = typeof Symbol == "function" && u[Symbol.iterator];
|
|
4948
4950
|
if (!f) return u;
|
|
4949
4951
|
var e = f.call(u), t, n = [], r;
|
|
@@ -4960,16 +4962,16 @@ function D3(u, D) {
|
|
|
4960
4962
|
}
|
|
4961
4963
|
return n;
|
|
4962
4964
|
}
|
|
4963
|
-
function
|
|
4965
|
+
function t3(u, D, f) {
|
|
4964
4966
|
if (f || arguments.length === 2) for (var e = 0, t = D.length, n; e < t; e++)
|
|
4965
4967
|
(n || !(e in D)) && (n || (n = Array.prototype.slice.call(D, 0, e)), n[e] = D[e]);
|
|
4966
4968
|
return u.concat(n || Array.prototype.slice.call(D));
|
|
4967
4969
|
}
|
|
4968
|
-
var
|
|
4970
|
+
var n3 = "4.1.5", r3 = Object.prototype.hasOwnProperty;
|
|
4969
4971
|
function wu(u) {
|
|
4970
4972
|
return typeof u == "boolean";
|
|
4971
4973
|
}
|
|
4972
|
-
function
|
|
4974
|
+
function a3(u, D, f) {
|
|
4973
4975
|
var e;
|
|
4974
4976
|
return u.length > D && (f == null ? (f = "…", e = 3) : e = f.length, u = u.substring(0, D - e) + f), u;
|
|
4975
4977
|
}
|
|
@@ -4980,7 +4982,7 @@ function Ku(u, D) {
|
|
|
4980
4982
|
function Xu(u) {
|
|
4981
4983
|
throw new Error("Unhandled case for value: '".concat(u, "'"));
|
|
4982
4984
|
}
|
|
4983
|
-
var bD = /\s+/,
|
|
4985
|
+
var bD = /\s+/, O1 = (
|
|
4984
4986
|
/** @class */
|
|
4985
4987
|
function() {
|
|
4986
4988
|
function u(D) {
|
|
@@ -5029,32 +5031,32 @@ var bD = /\s+/, N1 = (
|
|
|
5029
5031
|
}, u.prototype.buildAttrsStr = function() {
|
|
5030
5032
|
var D = this.getAttrs(), f = [];
|
|
5031
5033
|
for (var e in D)
|
|
5032
|
-
|
|
5034
|
+
r3.call(D, e) && f.push(e + '="' + D[e] + '"');
|
|
5033
5035
|
return f.join(" ");
|
|
5034
5036
|
}, u;
|
|
5035
5037
|
}()
|
|
5036
5038
|
);
|
|
5037
|
-
function
|
|
5039
|
+
function s3(u, D, f) {
|
|
5038
5040
|
var e, t;
|
|
5039
5041
|
if (f == null ? (f = "…", t = 3, e = 8) : (t = f.length, e = f.length), u.length <= D)
|
|
5040
5042
|
return u;
|
|
5041
|
-
var n = D - t, r =
|
|
5043
|
+
var n = D - t, r = F3(u);
|
|
5042
5044
|
if (r.query) {
|
|
5043
5045
|
var s = r.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);
|
|
5044
|
-
s && (r.query = r.query.substr(0, s[1].length), u =
|
|
5046
|
+
s && (r.query = r.query.substr(0, s[1].length), u = Wf(r));
|
|
5045
5047
|
}
|
|
5046
|
-
if (u.length <= D || (r.host && (r.host = r.host.replace(/^www\./, ""), u =
|
|
5048
|
+
if (u.length <= D || (r.host && (r.host = r.host.replace(/^www\./, ""), u = Wf(r)), u.length <= D))
|
|
5047
5049
|
return u;
|
|
5048
5050
|
var F = "";
|
|
5049
5051
|
if (r.host && (F += r.host), F.length >= n)
|
|
5050
|
-
return r.host.length === D ? (r.host.substr(0, D - t) + f).substr(0, n + e) :
|
|
5052
|
+
return r.host.length === D ? (r.host.substr(0, D - t) + f).substr(0, n + e) : UD(F, n, f).substr(0, n + e);
|
|
5051
5053
|
var d = "";
|
|
5052
5054
|
if (r.path && (d += "/" + r.path), r.query && (d += "?" + r.query), d)
|
|
5053
5055
|
if ((F + d).length >= n) {
|
|
5054
5056
|
if ((F + d).length == D)
|
|
5055
5057
|
return (F + d).substr(0, D);
|
|
5056
5058
|
var o = n - F.length;
|
|
5057
|
-
return (F +
|
|
5059
|
+
return (F + UD(d, o, f)).substr(0, n + e);
|
|
5058
5060
|
} else
|
|
5059
5061
|
F += d;
|
|
5060
5062
|
if (r.fragment) {
|
|
@@ -5063,7 +5065,7 @@ function r3(u, D, f) {
|
|
|
5063
5065
|
if ((F + c).length == D)
|
|
5064
5066
|
return (F + c).substr(0, D);
|
|
5065
5067
|
var l = n - F.length;
|
|
5066
|
-
return (F +
|
|
5068
|
+
return (F + UD(c, l, f)).substr(0, n + e);
|
|
5067
5069
|
} else
|
|
5068
5070
|
F += c;
|
|
5069
5071
|
}
|
|
@@ -5077,19 +5079,19 @@ function r3(u, D, f) {
|
|
|
5077
5079
|
var y = "";
|
|
5078
5080
|
return n > 0 && (y = F.substr(-1 * Math.floor(n / 2))), (F.substr(0, Math.ceil(n / 2)) + f + y).substr(0, n + e);
|
|
5079
5081
|
}
|
|
5080
|
-
function
|
|
5082
|
+
function F3(u) {
|
|
5081
5083
|
var D = {}, f = u, e = f.match(/^([a-z]+):\/\//i);
|
|
5082
5084
|
return e && (D.scheme = e[1], f = f.slice(e[0].length)), e = f.match(/^(.*?)(?=(\?|#|\/|$))/i), e && (D.host = e[1], f = f.slice(e[0].length)), e = f.match(/^\/(.*?)(?=(\?|#|$))/i), e && (D.path = e[1], f = f.slice(e[0].length)), e = f.match(/^\?(.*?)(?=(#|$))/i), e && (D.query = e[1], f = f.slice(e[0].length)), e = f.match(/^#(.*?)$/i), e && (D.fragment = e[1]), D;
|
|
5083
5085
|
}
|
|
5084
|
-
function
|
|
5086
|
+
function Wf(u) {
|
|
5085
5087
|
var D = "";
|
|
5086
5088
|
return u.scheme && u.host && (D += u.scheme + "://"), u.host && (D += u.host), u.path && (D += "/" + u.path), u.query && (D += "?" + u.query), u.fragment && (D += "#" + u.fragment), D;
|
|
5087
5089
|
}
|
|
5088
|
-
function
|
|
5090
|
+
function UD(u, D, f) {
|
|
5089
5091
|
var e = D / 2, t = Math.ceil(e), n = -1 * Math.floor(e), r = "";
|
|
5090
5092
|
return n < 0 && (r = u.substr(n)), u.substr(0, t) + f + r;
|
|
5091
5093
|
}
|
|
5092
|
-
function
|
|
5094
|
+
function i3(u, D, f) {
|
|
5093
5095
|
if (u.length <= D)
|
|
5094
5096
|
return u;
|
|
5095
5097
|
var e, t;
|
|
@@ -5097,17 +5099,17 @@ function s3(u, D, f) {
|
|
|
5097
5099
|
var n = D - t, r = "";
|
|
5098
5100
|
return n > 0 && (r = u.substr(-1 * Math.floor(n / 2))), (u.substr(0, Math.ceil(n / 2)) + f + r).substr(0, n + e);
|
|
5099
5101
|
}
|
|
5100
|
-
function
|
|
5101
|
-
return
|
|
5102
|
+
function o3(u, D, f) {
|
|
5103
|
+
return a3(u, D, f);
|
|
5102
5104
|
}
|
|
5103
|
-
var
|
|
5105
|
+
var d3 = (
|
|
5104
5106
|
/** @class */
|
|
5105
5107
|
function() {
|
|
5106
5108
|
function u(D) {
|
|
5107
5109
|
D === void 0 && (D = {}), this.newWindow = !1, this.truncate = {}, this.className = "", this.newWindow = D.newWindow || !1, this.truncate = D.truncate || {}, this.className = D.className || "";
|
|
5108
5110
|
}
|
|
5109
5111
|
return u.prototype.build = function(D) {
|
|
5110
|
-
return new
|
|
5112
|
+
return new O1({
|
|
5111
5113
|
tagName: "a",
|
|
5112
5114
|
attrs: this.createAttrs(D),
|
|
5113
5115
|
innerHtml: this.processAnchorText(D.getAnchorText())
|
|
@@ -5133,7 +5135,7 @@ var i3 = (
|
|
|
5133
5135
|
if (!f.length)
|
|
5134
5136
|
return D;
|
|
5135
5137
|
var e = f.length, t = f.location;
|
|
5136
|
-
return t === "smart" ?
|
|
5138
|
+
return t === "smart" ? s3(D, e) : t === "middle" ? i3(D, e) : o3(D, e);
|
|
5137
5139
|
}, u;
|
|
5138
5140
|
}()
|
|
5139
5141
|
), cD = (
|
|
@@ -5155,7 +5157,7 @@ var i3 = (
|
|
|
5155
5157
|
}, u;
|
|
5156
5158
|
}()
|
|
5157
5159
|
);
|
|
5158
|
-
function
|
|
5160
|
+
function C3(u) {
|
|
5159
5161
|
return u >= 0 && u <= 31 || u == 127;
|
|
5160
5162
|
}
|
|
5161
5163
|
function rD(u) {
|
|
@@ -5164,7 +5166,7 @@ function rD(u) {
|
|
|
5164
5166
|
function Eu(u) {
|
|
5165
5167
|
return u >= 48 && u <= 57;
|
|
5166
5168
|
}
|
|
5167
|
-
function
|
|
5169
|
+
function bf(u) {
|
|
5168
5170
|
return u == 34 || u == 39;
|
|
5169
5171
|
}
|
|
5170
5172
|
function Zu(u) {
|
|
@@ -5173,67 +5175,67 @@ function Zu(u) {
|
|
|
5173
5175
|
function Qu(u) {
|
|
5174
5176
|
return u < 4800 ? u < 2949 ? u < 2451 ? u < 1425 ? u < 768 ? u < 192 ? u < 169 ? u < 65 ? u >= 48 && u <= 57 : u >= 65 && u <= 90 || u >= 97 && u <= 122 : u < 181 ? u >= 169 && u <= 170 || u == 174 : u == 181 || u == 186 : u < 710 ? u < 216 ? u >= 192 && u <= 214 : u >= 216 && u <= 246 || u >= 248 && u <= 705 : u < 748 ? u >= 710 && u <= 721 || u >= 736 && u <= 740 : u == 748 || u == 750 : u < 910 ? u < 895 ? u < 886 ? u >= 768 && u <= 884 : u >= 886 && u <= 887 || u >= 890 && u <= 893 : u < 904 ? u == 895 || u == 902 : u >= 904 && u <= 906 || u == 908 : u < 1155 ? u < 931 ? u >= 910 && u <= 929 : u >= 931 && u <= 1013 || u >= 1015 && u <= 1153 : u < 1369 ? u >= 1155 && u <= 1327 || u >= 1329 && u <= 1366 : u == 1369 || u >= 1377 && u <= 1415 : u < 1808 ? u < 1552 ? u < 1476 ? u < 1471 ? u >= 1425 && u <= 1469 : u == 1471 || u >= 1473 && u <= 1474 : u < 1488 ? u >= 1476 && u <= 1477 || u == 1479 : u >= 1488 && u <= 1514 || u >= 1520 && u <= 1522 : u < 1749 ? u < 1568 ? u >= 1552 && u <= 1562 : u >= 1568 && u <= 1641 || u >= 1646 && u <= 1747 : u < 1770 ? u >= 1749 && u <= 1756 || u >= 1759 && u <= 1768 : u >= 1770 && u <= 1788 || u == 1791 : u < 2230 ? u < 2042 ? u < 1869 ? u >= 1808 && u <= 1866 : u >= 1869 && u <= 1969 || u >= 1984 && u <= 2037 : u < 2112 ? u == 2042 || u >= 2048 && u <= 2093 : u >= 2112 && u <= 2139 || u >= 2208 && u <= 2228 : u < 2406 ? u < 2260 ? u >= 2230 && u <= 2237 : u >= 2260 && u <= 2273 || u >= 2275 && u <= 2403 : u < 2437 ? u >= 2406 && u <= 2415 || u >= 2417 && u <= 2435 : u >= 2437 && u <= 2444 || u >= 2447 && u <= 2448 : u < 2693 ? u < 2579 ? u < 2519 ? u < 2486 ? u < 2474 ? u >= 2451 && u <= 2472 : u >= 2474 && u <= 2480 || u == 2482 : u < 2503 ? u >= 2486 && u <= 2489 || u >= 2492 && u <= 2500 : u >= 2503 && u <= 2504 || u >= 2507 && u <= 2510 : u < 2534 ? u < 2524 ? u == 2519 : u >= 2524 && u <= 2525 || u >= 2527 && u <= 2531 : u < 2565 ? u >= 2534 && u <= 2545 || u >= 2561 && u <= 2563 : u >= 2565 && u <= 2570 || u >= 2575 && u <= 2576 : u < 2631 ? u < 2613 ? u < 2602 ? u >= 2579 && u <= 2600 : u >= 2602 && u <= 2608 || u >= 2610 && u <= 2611 : u < 2620 ? u >= 2613 && u <= 2614 || u >= 2616 && u <= 2617 : u == 2620 || u >= 2622 && u <= 2626 : u < 2649 ? u < 2635 ? u >= 2631 && u <= 2632 : u >= 2635 && u <= 2637 || u == 2641 : u < 2662 ? u >= 2649 && u <= 2652 || u == 2654 : u >= 2662 && u <= 2677 || u >= 2689 && u <= 2691 : u < 2821 ? u < 2759 ? u < 2730 ? u < 2703 ? u >= 2693 && u <= 2701 : u >= 2703 && u <= 2705 || u >= 2707 && u <= 2728 : u < 2741 ? u >= 2730 && u <= 2736 || u >= 2738 && u <= 2739 : u >= 2741 && u <= 2745 || u >= 2748 && u <= 2757 : u < 2784 ? u < 2763 ? u >= 2759 && u <= 2761 : u >= 2763 && u <= 2765 || u == 2768 : u < 2809 ? u >= 2784 && u <= 2787 || u >= 2790 && u <= 2799 : u == 2809 || u >= 2817 && u <= 2819 : u < 2887 ? u < 2858 ? u < 2831 ? u >= 2821 && u <= 2828 : u >= 2831 && u <= 2832 || u >= 2835 && u <= 2856 : u < 2869 ? u >= 2858 && u <= 2864 || u >= 2866 && u <= 2867 : u >= 2869 && u <= 2873 || u >= 2876 && u <= 2884 : u < 2911 ? u < 2902 ? u >= 2887 && u <= 2888 || u >= 2891 && u <= 2893 : u >= 2902 && u <= 2903 || u >= 2908 && u <= 2909 : u < 2929 ? u >= 2911 && u <= 2915 || u >= 2918 && u <= 2927 : u == 2929 || u >= 2946 && u <= 2947 : u < 3517 ? u < 3205 ? u < 3046 ? u < 2984 ? u < 2969 ? u < 2958 ? u >= 2949 && u <= 2954 : u >= 2958 && u <= 2960 || u >= 2962 && u <= 2965 : u < 2974 ? u >= 2969 && u <= 2970 || u == 2972 : u >= 2974 && u <= 2975 || u >= 2979 && u <= 2980 : u < 3014 ? u < 2990 ? u >= 2984 && u <= 2986 : u >= 2990 && u <= 3001 || u >= 3006 && u <= 3010 : u < 3024 ? u >= 3014 && u <= 3016 || u >= 3018 && u <= 3021 : u == 3024 || u == 3031 : u < 3142 ? u < 3086 ? u < 3072 ? u >= 3046 && u <= 3055 : u >= 3072 && u <= 3075 || u >= 3077 && u <= 3084 : u < 3114 ? u >= 3086 && u <= 3088 || u >= 3090 && u <= 3112 : u >= 3114 && u <= 3129 || u >= 3133 && u <= 3140 : u < 3160 ? u < 3146 ? u >= 3142 && u <= 3144 : u >= 3146 && u <= 3149 || u >= 3157 && u <= 3158 : u < 3174 ? u >= 3160 && u <= 3162 || u >= 3168 && u <= 3171 : u >= 3174 && u <= 3183 || u >= 3200 && u <= 3203 : u < 3333 ? u < 3274 ? u < 3242 ? u < 3214 ? u >= 3205 && u <= 3212 : u >= 3214 && u <= 3216 || u >= 3218 && u <= 3240 : u < 3260 ? u >= 3242 && u <= 3251 || u >= 3253 && u <= 3257 : u >= 3260 && u <= 3268 || u >= 3270 && u <= 3272 : u < 3296 ? u < 3285 ? u >= 3274 && u <= 3277 : u >= 3285 && u <= 3286 || u == 3294 : u < 3313 ? u >= 3296 && u <= 3299 || u >= 3302 && u <= 3311 : u >= 3313 && u <= 3314 || u >= 3329 && u <= 3331 : u < 3423 ? u < 3389 ? u < 3342 ? u >= 3333 && u <= 3340 : u >= 3342 && u <= 3344 || u >= 3346 && u <= 3386 : u < 3402 ? u >= 3389 && u <= 3396 || u >= 3398 && u <= 3400 : u >= 3402 && u <= 3406 || u >= 3412 && u <= 3415 : u < 3458 ? u < 3430 ? u >= 3423 && u <= 3427 : u >= 3430 && u <= 3439 || u >= 3450 && u <= 3455 : u < 3482 ? u >= 3458 && u <= 3459 || u >= 3461 && u <= 3478 : u >= 3482 && u <= 3505 || u >= 3507 && u <= 3515 : u < 3804 ? u < 3722 ? u < 3570 ? u < 3535 ? u < 3520 ? u == 3517 : u >= 3520 && u <= 3526 || u == 3530 : u < 3544 ? u >= 3535 && u <= 3540 || u == 3542 : u >= 3544 && u <= 3551 || u >= 3558 && u <= 3567 : u < 3664 ? u < 3585 ? u >= 3570 && u <= 3571 : u >= 3585 && u <= 3642 || u >= 3648 && u <= 3662 : u < 3716 ? u >= 3664 && u <= 3673 || u >= 3713 && u <= 3714 : u == 3716 || u >= 3719 && u <= 3720 : u < 3754 ? u < 3737 ? u < 3725 ? u == 3722 : u == 3725 || u >= 3732 && u <= 3735 : u < 3749 ? u >= 3737 && u <= 3743 || u >= 3745 && u <= 3747 : u == 3749 || u == 3751 : u < 3776 ? u < 3757 ? u >= 3754 && u <= 3755 : u >= 3757 && u <= 3769 || u >= 3771 && u <= 3773 : u < 3784 ? u >= 3776 && u <= 3780 || u == 3782 : u >= 3784 && u <= 3789 || u >= 3792 && u <= 3801 : u < 4176 ? u < 3902 ? u < 3872 ? u < 3840 ? u >= 3804 && u <= 3807 : u == 3840 || u >= 3864 && u <= 3865 : u < 3895 ? u >= 3872 && u <= 3881 || u == 3893 : u == 3895 || u == 3897 : u < 3974 ? u < 3913 ? u >= 3902 && u <= 3911 : u >= 3913 && u <= 3948 || u >= 3953 && u <= 3972 : u < 4038 ? u >= 3974 && u <= 3991 || u >= 3993 && u <= 4028 : u == 4038 || u >= 4096 && u <= 4169 : u < 4688 ? u < 4301 ? u < 4256 ? u >= 4176 && u <= 4253 : u >= 4256 && u <= 4293 || u == 4295 : u < 4348 ? u == 4301 || u >= 4304 && u <= 4346 : u >= 4348 && u <= 4680 || u >= 4682 && u <= 4685 : u < 4746 ? u < 4698 ? u >= 4688 && u <= 4694 || u == 4696 : u >= 4698 && u <= 4701 || u >= 4704 && u <= 4744 : u < 4786 ? u >= 4746 && u <= 4749 || u >= 4752 && u <= 4784 : u >= 4786 && u <= 4789 || u >= 4792 && u <= 4798 : u < 11035 ? u < 7416 ? u < 6176 ? u < 5873 ? u < 4992 ? u < 4824 ? u < 4802 ? u == 4800 : u >= 4802 && u <= 4805 || u >= 4808 && u <= 4822 : u < 4888 ? u >= 4824 && u <= 4880 || u >= 4882 && u <= 4885 : u >= 4888 && u <= 4954 || u >= 4957 && u <= 4959 : u < 5121 ? u < 5024 ? u >= 4992 && u <= 5007 : u >= 5024 && u <= 5109 || u >= 5112 && u <= 5117 : u < 5761 ? u >= 5121 && u <= 5740 || u >= 5743 && u <= 5759 : u >= 5761 && u <= 5786 || u >= 5792 && u <= 5866 : u < 6002 ? u < 5920 ? u < 5888 ? u >= 5873 && u <= 5880 : u >= 5888 && u <= 5900 || u >= 5902 && u <= 5908 : u < 5984 ? u >= 5920 && u <= 5940 || u >= 5952 && u <= 5971 : u >= 5984 && u <= 5996 || u >= 5998 && u <= 6e3 : u < 6108 ? u < 6016 ? u >= 6002 && u <= 6003 : u >= 6016 && u <= 6099 || u == 6103 : u < 6155 ? u >= 6108 && u <= 6109 || u >= 6112 && u <= 6121 : u >= 6155 && u <= 6157 || u >= 6160 && u <= 6169 : u < 6783 ? u < 6512 ? u < 6400 ? u < 6272 ? u >= 6176 && u <= 6263 : u >= 6272 && u <= 6314 || u >= 6320 && u <= 6389 : u < 6448 ? u >= 6400 && u <= 6430 || u >= 6432 && u <= 6443 : u >= 6448 && u <= 6459 || u >= 6470 && u <= 6509 : u < 6608 ? u < 6528 ? u >= 6512 && u <= 6516 : u >= 6528 && u <= 6571 || u >= 6576 && u <= 6601 : u < 6688 ? u >= 6608 && u <= 6617 || u >= 6656 && u <= 6683 : u >= 6688 && u <= 6750 || u >= 6752 && u <= 6780 : u < 7040 ? u < 6832 ? u < 6800 ? u >= 6783 && u <= 6793 : u >= 6800 && u <= 6809 || u == 6823 : u < 6992 ? u >= 6832 && u <= 6846 || u >= 6912 && u <= 6987 : u >= 6992 && u <= 7001 || u >= 7019 && u <= 7027 : u < 7245 ? u < 7168 ? u >= 7040 && u <= 7155 : u >= 7168 && u <= 7223 || u >= 7232 && u <= 7241 : u < 7376 ? u >= 7245 && u <= 7293 || u >= 7296 && u <= 7304 : u >= 7376 && u <= 7378 || u >= 7380 && u <= 7414 : u < 8450 ? u < 8130 ? u < 8025 ? u < 7960 ? u < 7424 ? u >= 7416 && u <= 7417 : u >= 7424 && u <= 7669 || u >= 7675 && u <= 7957 : u < 8008 ? u >= 7960 && u <= 7965 || u >= 7968 && u <= 8005 : u >= 8008 && u <= 8013 || u >= 8016 && u <= 8023 : u < 8031 ? u < 8027 ? u == 8025 : u == 8027 || u == 8029 : u < 8118 ? u >= 8031 && u <= 8061 || u >= 8064 && u <= 8116 : u >= 8118 && u <= 8124 || u == 8126 : u < 8205 ? u < 8150 ? u < 8134 ? u >= 8130 && u <= 8132 : u >= 8134 && u <= 8140 || u >= 8144 && u <= 8147 : u < 8178 ? u >= 8150 && u <= 8155 || u >= 8160 && u <= 8172 : u >= 8178 && u <= 8180 || u >= 8182 && u <= 8188 : u < 8305 ? u < 8252 ? u == 8205 : u == 8252 || u == 8265 : u < 8336 ? u == 8305 || u == 8319 : u >= 8336 && u <= 8348 || u >= 8400 && u <= 8432 : u < 8579 ? u < 8486 ? u < 8469 ? u < 8455 ? u == 8450 : u == 8455 || u >= 8458 && u <= 8467 : u < 8482 ? u == 8469 || u >= 8473 && u <= 8477 : u == 8482 || u == 8484 : u < 8495 ? u < 8488 ? u == 8486 : u == 8488 || u >= 8490 && u <= 8493 : u < 8517 ? u >= 8495 && u <= 8505 || u >= 8508 && u <= 8511 : u >= 8517 && u <= 8521 || u == 8526 : u < 9410 ? u < 9e3 ? u < 8592 ? u >= 8579 && u <= 8580 : u >= 8592 && u <= 8703 || u >= 8986 && u <= 8987 : u < 9193 ? u == 9e3 || u == 9167 : u >= 9193 && u <= 9203 || u >= 9208 && u <= 9210 : u < 9723 ? u < 9654 ? u == 9410 || u >= 9642 && u <= 9643 : u == 9654 || u == 9664 : u < 10548 ? u >= 9723 && u <= 9726 || u >= 9728 && u <= 10175 : u >= 10548 && u <= 10549 || u >= 11013 && u <= 11015 : u < 43259 ? u < 12445 ? u < 11688 ? u < 11520 ? u < 11264 ? u < 11088 ? u >= 11035 && u <= 11036 : u == 11088 || u == 11093 : u < 11360 ? u >= 11264 && u <= 11310 || u >= 11312 && u <= 11358 : u >= 11360 && u <= 11492 || u >= 11499 && u <= 11507 : u < 11568 ? u < 11559 ? u >= 11520 && u <= 11557 : u == 11559 || u == 11565 : u < 11647 ? u >= 11568 && u <= 11623 || u == 11631 : u >= 11647 && u <= 11670 || u >= 11680 && u <= 11686 : u < 11744 ? u < 11712 ? u < 11696 ? u >= 11688 && u <= 11694 : u >= 11696 && u <= 11702 || u >= 11704 && u <= 11710 : u < 11728 ? u >= 11712 && u <= 11718 || u >= 11720 && u <= 11726 : u >= 11728 && u <= 11734 || u >= 11736 && u <= 11742 : u < 12330 ? u < 11823 ? u >= 11744 && u <= 11775 : u == 11823 || u >= 12293 && u <= 12294 : u < 12353 ? u >= 12330 && u <= 12341 || u >= 12347 && u <= 12349 : u >= 12353 && u <= 12438 || u >= 12441 && u <= 12442 : u < 42512 ? u < 12951 ? u < 12549 ? u < 12449 ? u >= 12445 && u <= 12447 : u >= 12449 && u <= 12538 || u >= 12540 && u <= 12543 : u < 12704 ? u >= 12549 && u <= 12589 || u >= 12593 && u <= 12686 : u >= 12704 && u <= 12730 || u >= 12784 && u <= 12799 : u < 19968 ? u < 12953 ? u == 12951 : u == 12953 || u >= 13312 && u <= 19893 : u < 42192 ? u >= 19968 && u <= 40917 || u >= 40960 && u <= 42124 : u >= 42192 && u <= 42237 || u >= 42240 && u <= 42508 : u < 42891 ? u < 42623 ? u < 42560 ? u >= 42512 && u <= 42539 : u >= 42560 && u <= 42610 || u >= 42612 && u <= 42621 : u < 42775 ? u >= 42623 && u <= 42725 || u >= 42736 && u <= 42737 : u >= 42775 && u <= 42783 || u >= 42786 && u <= 42888 : u < 43072 ? u < 42928 ? u >= 42891 && u <= 42926 : u >= 42928 && u <= 42935 || u >= 42999 && u <= 43047 : u < 43216 ? u >= 43072 && u <= 43123 || u >= 43136 && u <= 43205 : u >= 43216 && u <= 43225 || u >= 43232 && u <= 43255 : u < 55243 ? u < 43744 ? u < 43488 ? u < 43312 ? u < 43261 ? u == 43259 : u == 43261 || u >= 43264 && u <= 43309 : u < 43392 ? u >= 43312 && u <= 43347 || u >= 43360 && u <= 43388 : u >= 43392 && u <= 43456 || u >= 43471 && u <= 43481 : u < 43600 ? u < 43520 ? u >= 43488 && u <= 43518 : u >= 43520 && u <= 43574 || u >= 43584 && u <= 43597 : u < 43642 ? u >= 43600 && u <= 43609 || u >= 43616 && u <= 43638 : u >= 43642 && u <= 43714 || u >= 43739 && u <= 43741 : u < 43824 ? u < 43785 ? u < 43762 ? u >= 43744 && u <= 43759 : u >= 43762 && u <= 43766 || u >= 43777 && u <= 43782 : u < 43808 ? u >= 43785 && u <= 43790 || u >= 43793 && u <= 43798 : u >= 43808 && u <= 43814 || u >= 43816 && u <= 43822 : u < 44012 ? u < 43868 ? u >= 43824 && u <= 43866 : u >= 43868 && u <= 43877 || u >= 43888 && u <= 44010 : u < 44032 ? u >= 44012 && u <= 44013 || u >= 44016 && u <= 44025 : u >= 44032 && u <= 55203 || u >= 55216 && u <= 55238 : u < 64848 ? u < 64298 ? u < 64112 ? u < 55296 ? u >= 55243 && u <= 55291 : u >= 55296 && u <= 57343 || u >= 63744 && u <= 64109 : u < 64275 ? u >= 64112 && u <= 64217 || u >= 64256 && u <= 64262 : u >= 64275 && u <= 64279 || u >= 64285 && u <= 64296 : u < 64320 ? u < 64312 ? u >= 64298 && u <= 64310 : u >= 64312 && u <= 64316 || u == 64318 : u < 64326 ? u >= 64320 && u <= 64321 || u >= 64323 && u <= 64324 : u >= 64326 && u <= 64433 || u >= 64467 && u <= 64829 : u < 65296 ? u < 65024 ? u < 64914 ? u >= 64848 && u <= 64911 : u >= 64914 && u <= 64967 || u >= 65008 && u <= 65019 : u < 65136 ? u >= 65024 && u <= 65039 || u >= 65056 && u <= 65071 : u >= 65136 && u <= 65140 || u >= 65142 && u <= 65276 : u < 65474 ? u < 65345 ? u >= 65296 && u <= 65305 || u >= 65313 && u <= 65338 : u >= 65345 && u <= 65370 || u >= 65382 && u <= 65470 : u < 65490 ? u >= 65474 && u <= 65479 || u >= 65482 && u <= 65487 : u >= 65490 && u <= 65495 || u >= 65498 && u <= 65500;
|
|
5175
5177
|
}
|
|
5176
|
-
function
|
|
5178
|
+
function c3(u) {
|
|
5177
5179
|
return u < 47 ? u < 42 ? u == 33 || u >= 35 && u <= 39 : u >= 42 && u <= 43 || u == 45 : u < 63 ? u == 47 || u == 61 : u < 94 ? u == 63 : u >= 94 && u <= 96 || u >= 123 && u <= 126;
|
|
5178
5180
|
}
|
|
5179
|
-
function
|
|
5181
|
+
function l3(u) {
|
|
5180
5182
|
return u < 91 ? u < 47 ? u >= 35 && u <= 43 || u == 45 : u < 61 ? u == 47 : u == 61 || u == 64 : u < 95 ? u == 91 || u == 93 : u < 123 ? u == 95 : u >= 123 && u <= 126 || u == 10003;
|
|
5181
5183
|
}
|
|
5182
|
-
function
|
|
5184
|
+
function R1(u) {
|
|
5183
5185
|
return u < 58 ? u < 44 ? u == 33 : u == 44 || u == 46 : u < 63 ? u >= 58 && u <= 59 : u == 63 || u == 94;
|
|
5184
5186
|
}
|
|
5185
|
-
function
|
|
5187
|
+
function E3(u) {
|
|
5186
5188
|
return u < 91 ? u == 40 : u == 91 || u == 123;
|
|
5187
5189
|
}
|
|
5188
|
-
function
|
|
5190
|
+
function Yf(u) {
|
|
5189
5191
|
return u < 93 ? u == 41 : u == 93 || u == 125;
|
|
5190
5192
|
}
|
|
5191
|
-
var l3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, R1 = /https?:\/\//i, E3 = new RegExp("^" + R1.source, "i"), h3 = /^(javascript|vbscript):/i, b3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, p3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5192
|
-
function
|
|
5193
|
+
var h3 = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, P1 = /https?:\/\//i, b3 = new RegExp("^" + P1.source, "i"), p3 = /^(javascript|vbscript):/i, B3 = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, g3 = /^(?:\/\/)?([^/#?:]+)/, oD = rD;
|
|
5194
|
+
function I1(u) {
|
|
5193
5195
|
return rD(u) || Eu(u) || u === 43 || // '+'
|
|
5194
5196
|
u === 45 || // '-'
|
|
5195
5197
|
u === 46;
|
|
5196
5198
|
}
|
|
5197
5199
|
var Yu = Qu;
|
|
5198
|
-
function
|
|
5200
|
+
function pf(u) {
|
|
5199
5201
|
return u === 95 || Yu(u);
|
|
5200
5202
|
}
|
|
5201
|
-
function
|
|
5202
|
-
return Qu(u) ||
|
|
5203
|
+
function L1(u) {
|
|
5204
|
+
return Qu(u) || l3(u) || R1(u);
|
|
5203
5205
|
}
|
|
5204
|
-
function
|
|
5206
|
+
function Bf(u) {
|
|
5205
5207
|
return u === 47 || // '/'
|
|
5206
5208
|
u === 63 || // '?'
|
|
5207
5209
|
u === 35;
|
|
5208
5210
|
}
|
|
5209
|
-
function
|
|
5210
|
-
return
|
|
5211
|
+
function $1(u) {
|
|
5212
|
+
return h3.test(u.toLowerCase());
|
|
5211
5213
|
}
|
|
5212
|
-
function
|
|
5213
|
-
if (
|
|
5214
|
+
function m3(u) {
|
|
5215
|
+
if (p3.test(u))
|
|
5214
5216
|
return !1;
|
|
5215
|
-
var D = u.match(
|
|
5217
|
+
var D = u.match(B3);
|
|
5216
5218
|
if (!D)
|
|
5217
5219
|
return !1;
|
|
5218
5220
|
var f = !!D[1], e = D[2];
|
|
5219
5221
|
return f ? !0 : !(e.indexOf(".") === -1 || !/[A-Za-z]/.test(e));
|
|
5220
5222
|
}
|
|
5221
|
-
function
|
|
5222
|
-
var D = u.match(
|
|
5223
|
+
function _3(u) {
|
|
5224
|
+
var D = u.match(g3);
|
|
5223
5225
|
if (!D)
|
|
5224
5226
|
return !1;
|
|
5225
5227
|
var f = D[0], e = f.split(".");
|
|
5226
5228
|
if (e.length < 2)
|
|
5227
5229
|
return !1;
|
|
5228
5230
|
var t = e[e.length - 1];
|
|
5229
|
-
return
|
|
5231
|
+
return !!$1(t);
|
|
5230
5232
|
}
|
|
5231
|
-
var
|
|
5232
|
-
function
|
|
5233
|
-
var D = u.split(
|
|
5234
|
-
return
|
|
5233
|
+
var y3 = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, v3 = /[:/?#]/;
|
|
5234
|
+
function w3(u) {
|
|
5235
|
+
var D = u.split(v3, 1)[0];
|
|
5236
|
+
return y3.test(D);
|
|
5235
5237
|
}
|
|
5236
|
-
var
|
|
5238
|
+
var A3 = /^(https?:\/\/)?(?:www\.)?/i, x3 = /^\/\//, k3 = (
|
|
5237
5239
|
/** @class */
|
|
5238
5240
|
function(u) {
|
|
5239
5241
|
CD(D, u);
|
|
@@ -5256,23 +5258,23 @@ var v3 = /^(https?:\/\/)?(?:www\.)?/i, w3 = /^\/\//, A3 = (
|
|
|
5256
5258
|
return f.replace(/&/g, "&");
|
|
5257
5259
|
}, D.prototype.getAnchorText = function() {
|
|
5258
5260
|
var f = this.getMatchedText();
|
|
5259
|
-
return this.protocolRelativeMatch && (f =
|
|
5261
|
+
return this.protocolRelativeMatch && (f = T3(f)), this.stripPrefix.scheme && (f = j3(f)), this.stripPrefix.www && (f = S3(f)), this.stripTrailingSlash && (f = N3(f)), this.decodePercentEncoding && (f = O3(f)), f;
|
|
5260
5262
|
}, D;
|
|
5261
5263
|
}(cD)
|
|
5262
5264
|
);
|
|
5263
|
-
function x3(u) {
|
|
5264
|
-
return u.replace(E3, "");
|
|
5265
|
-
}
|
|
5266
|
-
function k3(u) {
|
|
5267
|
-
return u.includes("www.") ? u.replace(v3, "$1") : u;
|
|
5268
|
-
}
|
|
5269
5265
|
function j3(u) {
|
|
5270
|
-
return u.replace(
|
|
5266
|
+
return u.replace(b3, "");
|
|
5271
5267
|
}
|
|
5272
5268
|
function S3(u) {
|
|
5273
|
-
return u.
|
|
5269
|
+
return u.includes("www.") ? u.replace(A3, "$1") : u;
|
|
5274
5270
|
}
|
|
5275
5271
|
function T3(u) {
|
|
5272
|
+
return u.replace(x3, "");
|
|
5273
|
+
}
|
|
5274
|
+
function N3(u) {
|
|
5275
|
+
return u.charAt(u.length - 1) === "/" && (u = u.slice(0, -1)), u;
|
|
5276
|
+
}
|
|
5277
|
+
function O3(u) {
|
|
5276
5278
|
var D = u.replace(/%(?:22|26|27|3C|3E)/gi, function(f) {
|
|
5277
5279
|
return f === "%22" ? """ : f === "%26" ? "&" : f === "%27" ? "'" : f === "%3C" || f === "%3c" ? "<" : ">";
|
|
5278
5280
|
});
|
|
@@ -5283,15 +5285,15 @@ function T3(u) {
|
|
|
5283
5285
|
}
|
|
5284
5286
|
return D;
|
|
5285
5287
|
}
|
|
5286
|
-
var
|
|
5287
|
-
function
|
|
5288
|
-
return
|
|
5288
|
+
var R3 = /^mailto:/i, M1 = Qu;
|
|
5289
|
+
function gf(u) {
|
|
5290
|
+
return M1(u) || c3(u);
|
|
5289
5291
|
}
|
|
5290
|
-
function
|
|
5292
|
+
function P3(u) {
|
|
5291
5293
|
var D = u.split(".").pop();
|
|
5292
|
-
return
|
|
5294
|
+
return $1(D);
|
|
5293
5295
|
}
|
|
5294
|
-
var
|
|
5296
|
+
var I3 = (
|
|
5295
5297
|
/** @class */
|
|
5296
5298
|
function(u) {
|
|
5297
5299
|
CD(D, u);
|
|
@@ -5310,19 +5312,19 @@ var R3 = (
|
|
|
5310
5312
|
}, D;
|
|
5311
5313
|
}(cD)
|
|
5312
5314
|
);
|
|
5313
|
-
function
|
|
5315
|
+
function q1(u) {
|
|
5314
5316
|
return u === 95 || Qu(u);
|
|
5315
5317
|
}
|
|
5316
|
-
function
|
|
5318
|
+
function L3(u) {
|
|
5317
5319
|
return u.length <= 140;
|
|
5318
5320
|
}
|
|
5319
|
-
var
|
|
5321
|
+
var $3 = [
|
|
5320
5322
|
"twitter",
|
|
5321
5323
|
"facebook",
|
|
5322
5324
|
"instagram",
|
|
5323
5325
|
"tiktok",
|
|
5324
5326
|
"youtube"
|
|
5325
|
-
],
|
|
5327
|
+
], M3 = (
|
|
5326
5328
|
/** @class */
|
|
5327
5329
|
function(u) {
|
|
5328
5330
|
CD(D, u);
|
|
@@ -5359,7 +5361,7 @@ var I3 = [
|
|
|
5359
5361
|
return e && f.push(e), f;
|
|
5360
5362
|
}, D;
|
|
5361
5363
|
}(cD)
|
|
5362
|
-
),
|
|
5364
|
+
), q3 = {
|
|
5363
5365
|
twitter: /^@\w{1,15}$/,
|
|
5364
5366
|
instagram: /^@[_\w]{1,30}$/,
|
|
5365
5367
|
soundcloud: /^@[-a-z0-9_]{3,25}$/,
|
|
@@ -5371,23 +5373,23 @@ var I3 = [
|
|
|
5371
5373
|
// https://support.google.com/youtube/answer/11585688?hl=en&co=GENIE.Platform%3DAndroid#tns
|
|
5372
5374
|
youtube: /^@[-.·\w]{3,30}$/
|
|
5373
5375
|
};
|
|
5374
|
-
function
|
|
5376
|
+
function z1(u) {
|
|
5375
5377
|
return u === 45 || // '-'
|
|
5376
5378
|
u === 46 || // '.'
|
|
5377
5379
|
u === 95 || // '_'
|
|
5378
5380
|
rD(u) || Eu(u);
|
|
5379
5381
|
}
|
|
5380
|
-
function
|
|
5381
|
-
var f =
|
|
5382
|
+
function z3(u, D) {
|
|
5383
|
+
var f = q3[D];
|
|
5382
5384
|
return f.test(u);
|
|
5383
5385
|
}
|
|
5384
|
-
var
|
|
5386
|
+
var U3 = [
|
|
5385
5387
|
"twitter",
|
|
5386
5388
|
"instagram",
|
|
5387
5389
|
"soundcloud",
|
|
5388
5390
|
"tiktok",
|
|
5389
5391
|
"youtube"
|
|
5390
|
-
],
|
|
5392
|
+
], V3 = (
|
|
5391
5393
|
/** @class */
|
|
5392
5394
|
function(u) {
|
|
5393
5395
|
CD(D, u);
|
|
@@ -5423,21 +5425,21 @@ var q3 = [
|
|
|
5423
5425
|
return e && f.push(e), f;
|
|
5424
5426
|
}, D;
|
|
5425
5427
|
}(cD)
|
|
5426
|
-
),
|
|
5427
|
-
function
|
|
5428
|
+
), H3 = /[-. ()]/, W3 = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, Y3 = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, K3 = new RegExp("^".concat(W3.source, "|").concat(Y3.source, "$"));
|
|
5429
|
+
function U1(u) {
|
|
5428
5430
|
return u === 45 || // '-'
|
|
5429
5431
|
u === 46 || // '.'
|
|
5430
5432
|
u === 32;
|
|
5431
5433
|
}
|
|
5432
|
-
function
|
|
5434
|
+
function mf(u) {
|
|
5433
5435
|
return u === 44 || // ','
|
|
5434
5436
|
u === 59;
|
|
5435
5437
|
}
|
|
5436
|
-
function
|
|
5437
|
-
var D = u.charAt(0) === "+" ||
|
|
5438
|
-
return D &&
|
|
5438
|
+
function J3(u) {
|
|
5439
|
+
var D = u.charAt(0) === "+" || H3.test(u);
|
|
5440
|
+
return D && K3.test(u);
|
|
5439
5441
|
}
|
|
5440
|
-
var
|
|
5442
|
+
var G3 = (
|
|
5441
5443
|
/** @class */
|
|
5442
5444
|
function(u) {
|
|
5443
5445
|
CD(D, u);
|
|
@@ -5457,7 +5459,7 @@ var K3 = (
|
|
|
5457
5459
|
return this.matchedText;
|
|
5458
5460
|
}, D;
|
|
5459
5461
|
}(cD)
|
|
5460
|
-
),
|
|
5462
|
+
), X3 = (
|
|
5461
5463
|
/** @class */
|
|
5462
5464
|
function() {
|
|
5463
5465
|
function u(D, f) {
|
|
@@ -5470,18 +5472,18 @@ var K3 = (
|
|
|
5470
5472
|
enumerable: !1,
|
|
5471
5473
|
configurable: !0
|
|
5472
5474
|
}), u.prototype.addMachine = function(D) {
|
|
5473
|
-
this._stateMachines.push(D),
|
|
5475
|
+
this._stateMachines.push(D), Jf(D) && this.schemeUrlMachinesCount++;
|
|
5474
5476
|
}, u.prototype.removeMachine = function(D) {
|
|
5475
5477
|
this._stateMachines = this._stateMachines.filter(function(f) {
|
|
5476
5478
|
return f !== D;
|
|
5477
|
-
}),
|
|
5479
|
+
}), Jf(D) && this.schemeUrlMachinesCount--;
|
|
5478
5480
|
}, u.prototype.hasSchemeUrlMachine = function() {
|
|
5479
5481
|
return this.schemeUrlMachinesCount > 0;
|
|
5480
5482
|
}, u;
|
|
5481
5483
|
}()
|
|
5482
5484
|
);
|
|
5483
|
-
function
|
|
5484
|
-
for (var f = new
|
|
5485
|
+
function Z3(u, D) {
|
|
5486
|
+
for (var f = new X3(u, D); f.charIdx < f.text.length; f.charIdx++) {
|
|
5485
5487
|
var e = u.charAt(f.charIdx), t = u.charCodeAt(f.charIdx);
|
|
5486
5488
|
if (f.stateMachines.length === 0)
|
|
5487
5489
|
jD(f, e, t);
|
|
@@ -5490,130 +5492,130 @@ function G3(u, D) {
|
|
|
5490
5492
|
var r = f.stateMachines[n];
|
|
5491
5493
|
switch (r.state) {
|
|
5492
5494
|
case 11:
|
|
5493
|
-
|
|
5495
|
+
t2(f, r, t);
|
|
5494
5496
|
break;
|
|
5495
5497
|
case 12:
|
|
5496
|
-
|
|
5498
|
+
n2(f, r, t);
|
|
5497
5499
|
break;
|
|
5498
5500
|
case 0:
|
|
5499
|
-
|
|
5501
|
+
Q3(f, r, t);
|
|
5500
5502
|
break;
|
|
5501
5503
|
case 1:
|
|
5502
|
-
|
|
5504
|
+
u2(f, r, t);
|
|
5503
5505
|
break;
|
|
5504
5506
|
case 2:
|
|
5505
|
-
|
|
5507
|
+
D2(f, r, t);
|
|
5506
5508
|
break;
|
|
5507
5509
|
case 3:
|
|
5508
|
-
|
|
5510
|
+
f2(f, r, t);
|
|
5509
5511
|
break;
|
|
5510
5512
|
case 4:
|
|
5511
|
-
|
|
5513
|
+
e2(f, r, e, t);
|
|
5512
5514
|
break;
|
|
5513
5515
|
case 5:
|
|
5514
|
-
|
|
5516
|
+
r2(f, r, t);
|
|
5515
5517
|
break;
|
|
5516
5518
|
case 6:
|
|
5517
|
-
|
|
5519
|
+
a2(f, r, e, t);
|
|
5518
5520
|
break;
|
|
5519
5521
|
case 7:
|
|
5520
|
-
|
|
5522
|
+
s2(f, r, e, t);
|
|
5521
5523
|
break;
|
|
5522
5524
|
case 13:
|
|
5523
|
-
|
|
5525
|
+
F2(f, r, t);
|
|
5524
5526
|
break;
|
|
5525
5527
|
case 14:
|
|
5526
|
-
|
|
5528
|
+
i2(f, r, t);
|
|
5527
5529
|
break;
|
|
5528
5530
|
case 8:
|
|
5529
|
-
|
|
5531
|
+
o2(f, r, t);
|
|
5530
5532
|
break;
|
|
5531
5533
|
case 9:
|
|
5532
|
-
|
|
5534
|
+
d2(f, r, t);
|
|
5533
5535
|
break;
|
|
5534
5536
|
case 10:
|
|
5535
|
-
|
|
5537
|
+
C2(f, r, t);
|
|
5536
5538
|
break;
|
|
5537
5539
|
case 15:
|
|
5538
|
-
|
|
5540
|
+
c2(f, r, e, t);
|
|
5539
5541
|
break;
|
|
5540
5542
|
case 16:
|
|
5541
|
-
|
|
5543
|
+
l2(f, r, e, t);
|
|
5542
5544
|
break;
|
|
5543
5545
|
case 17:
|
|
5544
|
-
|
|
5546
|
+
E2(f, r, e, t);
|
|
5545
5547
|
break;
|
|
5546
5548
|
case 18:
|
|
5547
|
-
|
|
5549
|
+
h2(f, r, e, t);
|
|
5548
5550
|
break;
|
|
5549
5551
|
case 19:
|
|
5550
|
-
|
|
5552
|
+
b2(f, r, e, t);
|
|
5551
5553
|
break;
|
|
5552
5554
|
case 20:
|
|
5553
|
-
|
|
5555
|
+
p2(f, r, t);
|
|
5554
5556
|
break;
|
|
5555
5557
|
case 21:
|
|
5556
|
-
|
|
5558
|
+
B2(f, r, t);
|
|
5557
5559
|
break;
|
|
5558
5560
|
case 22:
|
|
5559
5561
|
uD(f, r, t);
|
|
5560
5562
|
break;
|
|
5561
5563
|
case 23:
|
|
5562
|
-
|
|
5564
|
+
g2(f, r, t);
|
|
5563
5565
|
break;
|
|
5564
5566
|
case 24:
|
|
5565
|
-
|
|
5567
|
+
m2(f, r, t);
|
|
5566
5568
|
break;
|
|
5567
5569
|
case 25:
|
|
5568
|
-
|
|
5570
|
+
_2(f, r, t);
|
|
5569
5571
|
break;
|
|
5570
5572
|
case 26:
|
|
5571
|
-
|
|
5573
|
+
y2(f, r, t);
|
|
5572
5574
|
break;
|
|
5573
5575
|
case 27:
|
|
5574
|
-
|
|
5576
|
+
v2(f, r, t);
|
|
5575
5577
|
break;
|
|
5576
5578
|
case 28:
|
|
5577
|
-
|
|
5579
|
+
w2(f, r, t);
|
|
5578
5580
|
break;
|
|
5579
5581
|
case 29:
|
|
5580
|
-
|
|
5582
|
+
A2(f, r, t);
|
|
5581
5583
|
break;
|
|
5582
5584
|
case 30:
|
|
5583
|
-
|
|
5585
|
+
x2(f, r, t);
|
|
5584
5586
|
break;
|
|
5585
5587
|
case 31:
|
|
5586
|
-
|
|
5588
|
+
k2(f, r, t);
|
|
5587
5589
|
break;
|
|
5588
5590
|
case 32:
|
|
5589
|
-
|
|
5591
|
+
S2(f, r, e, t);
|
|
5590
5592
|
break;
|
|
5591
5593
|
case 33:
|
|
5592
|
-
|
|
5594
|
+
T2(f, r, t);
|
|
5593
5595
|
break;
|
|
5594
5596
|
case 34:
|
|
5595
|
-
|
|
5597
|
+
N2(f, r, t);
|
|
5596
5598
|
break;
|
|
5597
5599
|
case 35:
|
|
5598
|
-
|
|
5600
|
+
O2(f, r, t);
|
|
5599
5601
|
break;
|
|
5600
5602
|
case 36:
|
|
5601
|
-
|
|
5603
|
+
R2(f, r, e, t);
|
|
5602
5604
|
break;
|
|
5603
5605
|
case 37:
|
|
5604
|
-
|
|
5606
|
+
j2(f, r, e, t);
|
|
5605
5607
|
break;
|
|
5606
5608
|
case 38:
|
|
5607
|
-
|
|
5609
|
+
P2(f, r, e, t);
|
|
5608
5610
|
break;
|
|
5609
5611
|
case 39:
|
|
5610
|
-
|
|
5612
|
+
I2(f, r, e, t);
|
|
5611
5613
|
break;
|
|
5612
5614
|
case 40:
|
|
5613
|
-
|
|
5615
|
+
L2(f, r, t);
|
|
5614
5616
|
break;
|
|
5615
5617
|
case 41:
|
|
5616
|
-
|
|
5618
|
+
$2(f, r, t);
|
|
5617
5619
|
break;
|
|
5618
5620
|
default:
|
|
5619
5621
|
Xu(r.state);
|
|
@@ -5638,71 +5640,71 @@ function G3(u, D) {
|
|
|
5638
5640
|
function jD(u, D, f) {
|
|
5639
5641
|
var e = u.charIdx;
|
|
5640
5642
|
if (f === 35)
|
|
5641
|
-
u.addMachine(
|
|
5643
|
+
u.addMachine(V2(
|
|
5642
5644
|
e,
|
|
5643
5645
|
28
|
|
5644
5646
|
/* State.HashtagHashChar */
|
|
5645
5647
|
));
|
|
5646
5648
|
else if (f === 64)
|
|
5647
|
-
u.addMachine(
|
|
5649
|
+
u.addMachine(H2(
|
|
5648
5650
|
e,
|
|
5649
5651
|
30
|
|
5650
5652
|
/* State.MentionAtChar */
|
|
5651
5653
|
));
|
|
5652
5654
|
else if (f === 47)
|
|
5653
|
-
u.addMachine(
|
|
5655
|
+
u.addMachine(nf(
|
|
5654
5656
|
e,
|
|
5655
5657
|
11
|
|
5656
5658
|
/* State.ProtocolRelativeSlash1 */
|
|
5657
5659
|
));
|
|
5658
5660
|
else if (f === 43)
|
|
5659
|
-
u.addMachine(
|
|
5661
|
+
u.addMachine(VD(
|
|
5660
5662
|
e,
|
|
5661
5663
|
37
|
|
5662
5664
|
/* State.PhoneNumberPlus */
|
|
5663
5665
|
));
|
|
5664
5666
|
else if (f === 40)
|
|
5665
|
-
u.addMachine(
|
|
5667
|
+
u.addMachine(VD(
|
|
5666
5668
|
e,
|
|
5667
5669
|
32
|
|
5668
5670
|
/* State.PhoneNumberOpenParen */
|
|
5669
5671
|
));
|
|
5670
5672
|
else {
|
|
5671
|
-
if (Eu(f) && (u.addMachine(
|
|
5673
|
+
if (Eu(f) && (u.addMachine(VD(
|
|
5672
5674
|
e,
|
|
5673
5675
|
38
|
|
5674
5676
|
/* State.PhoneNumberDigit */
|
|
5675
|
-
)), u.addMachine(
|
|
5677
|
+
)), u.addMachine(z2(
|
|
5676
5678
|
e,
|
|
5677
5679
|
13
|
|
5678
5680
|
/* State.IpV4Digit */
|
|
5679
|
-
))),
|
|
5681
|
+
))), M1(f)) {
|
|
5680
5682
|
var t = D.toLowerCase() === "m" ? 15 : 22;
|
|
5681
|
-
u.addMachine(
|
|
5683
|
+
u.addMachine(U2(e, t));
|
|
5682
5684
|
}
|
|
5683
5685
|
oD(f) && u.addMachine(SD(
|
|
5684
5686
|
e,
|
|
5685
5687
|
0
|
|
5686
5688
|
/* State.SchemeChar */
|
|
5687
|
-
)), Qu(f) && u.addMachine(
|
|
5689
|
+
)), Qu(f) && u.addMachine(nf(
|
|
5688
5690
|
e,
|
|
5689
5691
|
5
|
|
5690
5692
|
/* State.DomainLabelChar */
|
|
5691
5693
|
));
|
|
5692
5694
|
}
|
|
5693
5695
|
}
|
|
5694
|
-
function
|
|
5695
|
-
f === 58 ? D.state = 2 : f === 45 ? D.state = 1 :
|
|
5696
|
+
function Q3(u, D, f) {
|
|
5697
|
+
f === 58 ? D.state = 2 : f === 45 ? D.state = 1 : I1(f) || u.removeMachine(D);
|
|
5696
5698
|
}
|
|
5697
|
-
function
|
|
5699
|
+
function u2(u, D, f) {
|
|
5698
5700
|
var e = u.charIdx;
|
|
5699
|
-
f === 45 || (f === 47 ? (u.removeMachine(D), u.addMachine(
|
|
5701
|
+
f === 45 || (f === 47 ? (u.removeMachine(D), u.addMachine(nf(
|
|
5700
5702
|
e,
|
|
5701
5703
|
11
|
|
5702
5704
|
/* State.ProtocolRelativeSlash1 */
|
|
5703
|
-
))) :
|
|
5705
|
+
))) : I1(f) ? D.state = 0 : u.removeMachine(D));
|
|
5704
5706
|
}
|
|
5705
|
-
function
|
|
5707
|
+
function D2(u, D, f) {
|
|
5706
5708
|
var e = u.charIdx;
|
|
5707
5709
|
f === 47 ? D.state = 3 : f === 46 ? u.removeMachine(D) : Yu(f) ? (D.state = 5, oD(f) && u.addMachine(SD(
|
|
5708
5710
|
e,
|
|
@@ -5710,162 +5712,162 @@ function Q3(u, D, f) {
|
|
|
5710
5712
|
/* State.SchemeChar */
|
|
5711
5713
|
))) : u.removeMachine(D);
|
|
5712
5714
|
}
|
|
5713
|
-
function
|
|
5714
|
-
f === 47 ? D.state = 4 :
|
|
5715
|
+
function f2(u, D, f) {
|
|
5716
|
+
f === 47 ? D.state = 4 : L1(f) ? (D.state = 10, D.acceptStateReached = !0) : eu(u, D);
|
|
5715
5717
|
}
|
|
5716
|
-
function
|
|
5718
|
+
function e2(u, D, f, e) {
|
|
5717
5719
|
e === 47 ? (D.state = 10, D.acceptStateReached = !0) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5718
5720
|
}
|
|
5719
|
-
function
|
|
5721
|
+
function t2(u, D, f) {
|
|
5720
5722
|
f === 47 ? D.state = 12 : u.removeMachine(D);
|
|
5721
5723
|
}
|
|
5722
|
-
function
|
|
5724
|
+
function n2(u, D, f) {
|
|
5723
5725
|
Yu(f) ? D.state = 5 : u.removeMachine(D);
|
|
5724
5726
|
}
|
|
5725
|
-
function
|
|
5726
|
-
f === 46 ? D.state = 7 : f === 45 ? D.state = 6 : f === 58 ? D.state = 8 :
|
|
5727
|
+
function r2(u, D, f) {
|
|
5728
|
+
f === 46 ? D.state = 7 : f === 45 ? D.state = 6 : f === 58 ? D.state = 8 : Bf(f) ? D.state = 10 : pf(f) || eu(u, D);
|
|
5727
5729
|
}
|
|
5728
|
-
function
|
|
5730
|
+
function a2(u, D, f, e) {
|
|
5729
5731
|
e === 45 || (e === 46 ? eu(u, D) : Yu(e) ? D.state = 5 : eu(u, D));
|
|
5730
5732
|
}
|
|
5731
|
-
function
|
|
5733
|
+
function s2(u, D, f, e) {
|
|
5732
5734
|
e === 46 ? eu(u, D) : Yu(e) ? (D.state = 5, D.acceptStateReached = !0) : eu(u, D);
|
|
5733
5735
|
}
|
|
5734
|
-
function
|
|
5735
|
-
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (
|
|
5736
|
+
function F2(u, D, f) {
|
|
5737
|
+
f === 46 ? D.state = 14 : f === 58 ? D.state = 8 : Eu(f) || (Bf(f) ? D.state = 10 : Qu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5736
5738
|
}
|
|
5737
|
-
function
|
|
5739
|
+
function i2(u, D, f) {
|
|
5738
5740
|
Eu(f) ? (D.octetsEncountered++, D.octetsEncountered === 4 && (D.acceptStateReached = !0), D.state = 13) : eu(u, D);
|
|
5739
5741
|
}
|
|
5740
|
-
function
|
|
5742
|
+
function o2(u, D, f) {
|
|
5741
5743
|
Eu(f) ? D.state = 9 : eu(u, D);
|
|
5742
5744
|
}
|
|
5743
|
-
function
|
|
5744
|
-
Eu(f) || (
|
|
5745
|
+
function d2(u, D, f) {
|
|
5746
|
+
Eu(f) || (Bf(f) ? D.state = 10 : eu(u, D));
|
|
5745
5747
|
}
|
|
5746
|
-
function
|
|
5747
|
-
|
|
5748
|
+
function C2(u, D, f) {
|
|
5749
|
+
L1(f) || eu(u, D);
|
|
5748
5750
|
}
|
|
5749
|
-
function
|
|
5751
|
+
function c2(u, D, f, e) {
|
|
5750
5752
|
f.toLowerCase() === "a" ? D.state = 16 : uD(u, D, e);
|
|
5751
5753
|
}
|
|
5752
|
-
function
|
|
5754
|
+
function l2(u, D, f, e) {
|
|
5753
5755
|
f.toLowerCase() === "i" ? D.state = 17 : uD(u, D, e);
|
|
5754
5756
|
}
|
|
5755
|
-
function
|
|
5757
|
+
function E2(u, D, f, e) {
|
|
5756
5758
|
f.toLowerCase() === "l" ? D.state = 18 : uD(u, D, e);
|
|
5757
5759
|
}
|
|
5758
|
-
function
|
|
5760
|
+
function h2(u, D, f, e) {
|
|
5759
5761
|
f.toLowerCase() === "t" ? D.state = 19 : uD(u, D, e);
|
|
5760
5762
|
}
|
|
5761
|
-
function
|
|
5763
|
+
function b2(u, D, f, e) {
|
|
5762
5764
|
f.toLowerCase() === "o" ? D.state = 20 : uD(u, D, e);
|
|
5763
5765
|
}
|
|
5764
|
-
function
|
|
5766
|
+
function p2(u, D, f) {
|
|
5765
5767
|
f === 58 ? D.state = 21 : uD(u, D, f);
|
|
5766
5768
|
}
|
|
5767
|
-
function
|
|
5768
|
-
|
|
5769
|
+
function B2(u, D, f) {
|
|
5770
|
+
gf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5769
5771
|
}
|
|
5770
5772
|
function uD(u, D, f) {
|
|
5771
|
-
f === 46 ? D.state = 23 : f === 64 ? D.state = 24 :
|
|
5772
|
-
}
|
|
5773
|
-
function p2(u, D, f) {
|
|
5774
|
-
f === 46 || f === 64 ? u.removeMachine(D) : Bf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5775
|
-
}
|
|
5776
|
-
function B2(u, D, f) {
|
|
5777
|
-
Yu(f) ? D.state = 25 : u.removeMachine(D);
|
|
5773
|
+
f === 46 ? D.state = 23 : f === 64 ? D.state = 24 : gf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5778
5774
|
}
|
|
5779
5775
|
function g2(u, D, f) {
|
|
5780
|
-
f === 46 ? D
|
|
5776
|
+
f === 46 || f === 64 ? u.removeMachine(D) : gf(f) ? D.state = 22 : u.removeMachine(D);
|
|
5781
5777
|
}
|
|
5782
5778
|
function m2(u, D, f) {
|
|
5783
|
-
|
|
5779
|
+
Yu(f) ? D.state = 25 : u.removeMachine(D);
|
|
5784
5780
|
}
|
|
5785
5781
|
function _2(u, D, f) {
|
|
5786
|
-
f === 46
|
|
5782
|
+
f === 46 ? D.state = 27 : f === 45 ? D.state = 26 : pf(f) || eu(u, D);
|
|
5787
5783
|
}
|
|
5788
5784
|
function y2(u, D, f) {
|
|
5789
|
-
|
|
5785
|
+
f === 45 || f === 46 ? eu(u, D) : pf(f) ? D.state = 25 : eu(u, D);
|
|
5790
5786
|
}
|
|
5791
5787
|
function v2(u, D, f) {
|
|
5792
|
-
|
|
5788
|
+
f === 46 || f === 45 ? eu(u, D) : Yu(f) ? (D.state = 25, D.acceptStateReached = !0) : eu(u, D);
|
|
5793
5789
|
}
|
|
5794
5790
|
function w2(u, D, f) {
|
|
5795
|
-
q1(f) ? (D.state =
|
|
5791
|
+
q1(f) ? (D.state = 29, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5796
5792
|
}
|
|
5797
5793
|
function A2(u, D, f) {
|
|
5798
|
-
q1(f) ||
|
|
5794
|
+
q1(f) || eu(u, D);
|
|
5795
|
+
}
|
|
5796
|
+
function x2(u, D, f) {
|
|
5797
|
+
z1(f) ? (D.state = 31, D.acceptStateReached = !0) : u.removeMachine(D);
|
|
5799
5798
|
}
|
|
5800
|
-
function
|
|
5799
|
+
function k2(u, D, f) {
|
|
5800
|
+
z1(f) || (Qu(f) ? u.removeMachine(D) : eu(u, D));
|
|
5801
|
+
}
|
|
5802
|
+
function j2(u, D, f, e) {
|
|
5801
5803
|
Eu(e) ? D.state = 38 : (u.removeMachine(D), jD(u, f, e));
|
|
5802
5804
|
}
|
|
5803
|
-
function
|
|
5805
|
+
function S2(u, D, f, e) {
|
|
5804
5806
|
Eu(e) ? D.state = 33 : u.removeMachine(D), jD(u, f, e);
|
|
5805
5807
|
}
|
|
5806
|
-
function
|
|
5808
|
+
function T2(u, D, f) {
|
|
5807
5809
|
Eu(f) ? D.state = 34 : u.removeMachine(D);
|
|
5808
5810
|
}
|
|
5809
|
-
function
|
|
5811
|
+
function N2(u, D, f) {
|
|
5810
5812
|
Eu(f) ? D.state = 35 : u.removeMachine(D);
|
|
5811
5813
|
}
|
|
5812
|
-
function
|
|
5814
|
+
function O2(u, D, f) {
|
|
5813
5815
|
f === 41 ? D.state = 36 : u.removeMachine(D);
|
|
5814
5816
|
}
|
|
5815
|
-
function
|
|
5816
|
-
Eu(e) ? D.state = 38 :
|
|
5817
|
+
function R2(u, D, f, e) {
|
|
5818
|
+
Eu(e) ? D.state = 38 : U1(e) ? D.state = 39 : u.removeMachine(D);
|
|
5817
5819
|
}
|
|
5818
|
-
function
|
|
5820
|
+
function P2(u, D, f, e) {
|
|
5819
5821
|
var t = u.charIdx;
|
|
5820
|
-
D.acceptStateReached = !0,
|
|
5822
|
+
D.acceptStateReached = !0, mf(e) ? D.state = 40 : e === 35 ? D.state = 41 : Eu(e) || (e === 40 ? D.state = 32 : U1(e) ? D.state = 39 : (eu(u, D), oD(e) && u.addMachine(SD(
|
|
5821
5823
|
t,
|
|
5822
5824
|
0
|
|
5823
5825
|
/* State.SchemeChar */
|
|
5824
5826
|
))));
|
|
5825
5827
|
}
|
|
5826
|
-
function
|
|
5828
|
+
function I2(u, D, f, e) {
|
|
5827
5829
|
Eu(e) ? D.state = 38 : e === 40 ? D.state = 32 : (eu(u, D), jD(u, f, e));
|
|
5828
5830
|
}
|
|
5829
|
-
function
|
|
5830
|
-
|
|
5831
|
+
function L2(u, D, f) {
|
|
5832
|
+
mf(f) || (f === 35 ? D.state = 41 : Eu(f) ? D.state = 38 : eu(u, D));
|
|
5831
5833
|
}
|
|
5832
|
-
function
|
|
5833
|
-
|
|
5834
|
+
function $2(u, D, f) {
|
|
5835
|
+
mf(f) ? D.state = 40 : Eu(f) ? u.removeMachine(D) : eu(u, D);
|
|
5834
5836
|
}
|
|
5835
5837
|
function eu(u, D) {
|
|
5836
5838
|
var f = u.matches, e = u.text, t = u.charIdx, n = u.tagBuilder, r = u.stripPrefix, s = u.stripTrailingSlash, F = u.decodePercentEncoding, d = u.hashtagServiceName, o = u.mentionServiceName;
|
|
5837
5839
|
if (u.removeMachine(D), !!D.acceptStateReached) {
|
|
5838
5840
|
var c = D.startIdx, l = e.slice(D.startIdx, t);
|
|
5839
|
-
switch (l =
|
|
5841
|
+
switch (l = q2(l), D.type) {
|
|
5840
5842
|
case 0: {
|
|
5841
5843
|
var j = e.charCodeAt(D.startIdx - 1);
|
|
5842
5844
|
if (j === 64)
|
|
5843
5845
|
return;
|
|
5844
5846
|
switch (D.matchType) {
|
|
5845
5847
|
case 0: {
|
|
5846
|
-
var y =
|
|
5847
|
-
if (y && (c = c + y.index, l = l.slice(y.index)), !
|
|
5848
|
+
var y = P1.exec(l);
|
|
5849
|
+
if (y && (c = c + y.index, l = l.slice(y.index)), !m3(l))
|
|
5848
5850
|
return;
|
|
5849
5851
|
break;
|
|
5850
5852
|
}
|
|
5851
5853
|
case 1: {
|
|
5852
|
-
if (!
|
|
5854
|
+
if (!_3(l))
|
|
5853
5855
|
return;
|
|
5854
5856
|
break;
|
|
5855
5857
|
}
|
|
5856
5858
|
case 2: {
|
|
5857
|
-
if (!
|
|
5859
|
+
if (!w3(l))
|
|
5858
5860
|
return;
|
|
5859
5861
|
break;
|
|
5860
5862
|
}
|
|
5861
5863
|
default:
|
|
5862
5864
|
Xu(D);
|
|
5863
5865
|
}
|
|
5864
|
-
f.push(new
|
|
5866
|
+
f.push(new k3({
|
|
5865
5867
|
tagBuilder: n,
|
|
5866
5868
|
matchedText: l,
|
|
5867
5869
|
offset: c,
|
|
5868
|
-
urlMatchType:
|
|
5870
|
+
urlMatchType: M2(D.matchType),
|
|
5869
5871
|
url: l,
|
|
5870
5872
|
protocolRelativeMatch: l.slice(0, 2) === "//",
|
|
5871
5873
|
// TODO: Do these settings need to be passed to the match,
|
|
@@ -5877,16 +5879,16 @@ function eu(u, D) {
|
|
|
5877
5879
|
break;
|
|
5878
5880
|
}
|
|
5879
5881
|
case 1: {
|
|
5880
|
-
|
|
5882
|
+
P3(l) && f.push(new I3({
|
|
5881
5883
|
tagBuilder: n,
|
|
5882
5884
|
matchedText: l,
|
|
5883
5885
|
offset: c,
|
|
5884
|
-
email: l.replace(
|
|
5886
|
+
email: l.replace(R3, "")
|
|
5885
5887
|
}));
|
|
5886
5888
|
break;
|
|
5887
5889
|
}
|
|
5888
5890
|
case 2: {
|
|
5889
|
-
|
|
5891
|
+
L3(l) && f.push(new M3({
|
|
5890
5892
|
tagBuilder: n,
|
|
5891
5893
|
matchedText: l,
|
|
5892
5894
|
offset: c,
|
|
@@ -5896,7 +5898,7 @@ function eu(u, D) {
|
|
|
5896
5898
|
break;
|
|
5897
5899
|
}
|
|
5898
5900
|
case 3: {
|
|
5899
|
-
|
|
5901
|
+
z3(l, o) && f.push(new V3({
|
|
5900
5902
|
tagBuilder: n,
|
|
5901
5903
|
matchedText: l,
|
|
5902
5904
|
offset: c,
|
|
@@ -5907,9 +5909,9 @@ function eu(u, D) {
|
|
|
5907
5909
|
break;
|
|
5908
5910
|
}
|
|
5909
5911
|
case 4: {
|
|
5910
|
-
if (l = l.replace(/ +$/g, ""),
|
|
5912
|
+
if (l = l.replace(/ +$/g, ""), J3(l)) {
|
|
5911
5913
|
var C = l.replace(/[^0-9,;#]/g, "");
|
|
5912
|
-
f.push(new
|
|
5914
|
+
f.push(new G3({
|
|
5913
5915
|
tagBuilder: n,
|
|
5914
5916
|
matchedText: l,
|
|
5915
5917
|
offset: c,
|
|
@@ -5924,7 +5926,7 @@ function eu(u, D) {
|
|
|
5924
5926
|
}
|
|
5925
5927
|
}
|
|
5926
5928
|
}
|
|
5927
|
-
function
|
|
5929
|
+
function M2(u) {
|
|
5928
5930
|
switch (u) {
|
|
5929
5931
|
case 0:
|
|
5930
5932
|
return "scheme";
|
|
@@ -5936,29 +5938,29 @@ function L2(u) {
|
|
|
5936
5938
|
Xu(u);
|
|
5937
5939
|
}
|
|
5938
5940
|
}
|
|
5939
|
-
var
|
|
5941
|
+
var Kf = {
|
|
5940
5942
|
")": "(",
|
|
5941
5943
|
"}": "{",
|
|
5942
5944
|
"]": "["
|
|
5943
5945
|
};
|
|
5944
|
-
function
|
|
5946
|
+
function q2(u) {
|
|
5945
5947
|
for (var D = {
|
|
5946
5948
|
"(": 0,
|
|
5947
5949
|
"{": 0,
|
|
5948
5950
|
"[": 0
|
|
5949
5951
|
}, f = 0; f < u.length; f++) {
|
|
5950
5952
|
var e = u.charAt(f), t = u.charCodeAt(f);
|
|
5951
|
-
|
|
5953
|
+
E3(t) ? D[e]++ : Yf(t) && D[Kf[e]]--;
|
|
5952
5954
|
}
|
|
5953
5955
|
for (var n = u.length - 1; n >= 0; ) {
|
|
5954
5956
|
var e = u.charAt(n), t = u.charCodeAt(n);
|
|
5955
|
-
if (
|
|
5956
|
-
var r =
|
|
5957
|
+
if (Yf(t)) {
|
|
5958
|
+
var r = Kf[e];
|
|
5957
5959
|
if (D[r] < 0)
|
|
5958
5960
|
D[r]++, n--;
|
|
5959
5961
|
else
|
|
5960
5962
|
break;
|
|
5961
|
-
} else if (
|
|
5963
|
+
} else if (R1(t))
|
|
5962
5964
|
n--;
|
|
5963
5965
|
else
|
|
5964
5966
|
break;
|
|
@@ -5974,7 +5976,7 @@ function SD(u, D) {
|
|
|
5974
5976
|
matchType: 0
|
|
5975
5977
|
};
|
|
5976
5978
|
}
|
|
5977
|
-
function
|
|
5979
|
+
function nf(u, D) {
|
|
5978
5980
|
return {
|
|
5979
5981
|
type: 0,
|
|
5980
5982
|
startIdx: u,
|
|
@@ -5983,7 +5985,7 @@ function tf(u, D) {
|
|
|
5983
5985
|
matchType: 1
|
|
5984
5986
|
};
|
|
5985
5987
|
}
|
|
5986
|
-
function
|
|
5988
|
+
function z2(u, D) {
|
|
5987
5989
|
return {
|
|
5988
5990
|
type: 0,
|
|
5989
5991
|
startIdx: u,
|
|
@@ -5994,7 +5996,7 @@ function M2(u, D) {
|
|
|
5994
5996
|
// starts at 1 because we create this machine when encountering the first octet
|
|
5995
5997
|
};
|
|
5996
5998
|
}
|
|
5997
|
-
function
|
|
5999
|
+
function U2(u, D) {
|
|
5998
6000
|
return {
|
|
5999
6001
|
type: 1,
|
|
6000
6002
|
startIdx: u,
|
|
@@ -6002,7 +6004,7 @@ function q2(u, D) {
|
|
|
6002
6004
|
acceptStateReached: !1
|
|
6003
6005
|
};
|
|
6004
6006
|
}
|
|
6005
|
-
function
|
|
6007
|
+
function V2(u, D) {
|
|
6006
6008
|
return {
|
|
6007
6009
|
type: 2,
|
|
6008
6010
|
startIdx: u,
|
|
@@ -6010,7 +6012,7 @@ function z2(u, D) {
|
|
|
6010
6012
|
acceptStateReached: !1
|
|
6011
6013
|
};
|
|
6012
6014
|
}
|
|
6013
|
-
function
|
|
6015
|
+
function H2(u, D) {
|
|
6014
6016
|
return {
|
|
6015
6017
|
type: 3,
|
|
6016
6018
|
startIdx: u,
|
|
@@ -6018,7 +6020,7 @@ function U2(u, D) {
|
|
|
6018
6020
|
acceptStateReached: !1
|
|
6019
6021
|
};
|
|
6020
6022
|
}
|
|
6021
|
-
function
|
|
6023
|
+
function VD(u, D) {
|
|
6022
6024
|
return {
|
|
6023
6025
|
type: 4,
|
|
6024
6026
|
startIdx: u,
|
|
@@ -6026,7 +6028,7 @@ function UD(u, D) {
|
|
|
6026
6028
|
acceptStateReached: !1
|
|
6027
6029
|
};
|
|
6028
6030
|
}
|
|
6029
|
-
function
|
|
6031
|
+
function Jf(u) {
|
|
6030
6032
|
return u.type === 0 && u.matchType === 0;
|
|
6031
6033
|
}
|
|
6032
6034
|
var Su = (
|
|
@@ -6037,155 +6039,155 @@ var Su = (
|
|
|
6037
6039
|
}
|
|
6038
6040
|
return u;
|
|
6039
6041
|
}()
|
|
6040
|
-
),
|
|
6042
|
+
), _f = new Su(), W2 = (
|
|
6041
6043
|
/** @class */
|
|
6042
6044
|
/* @__PURE__ */ function() {
|
|
6043
6045
|
function u(D, f) {
|
|
6044
|
-
this.charIdx = 0, this.state = 0, this.currentDataIdx = 0, this.currentTag =
|
|
6046
|
+
this.charIdx = 0, this.state = 0, this.currentDataIdx = 0, this.currentTag = _f, this.html = D, this.callbacks = f;
|
|
6045
6047
|
}
|
|
6046
6048
|
return u;
|
|
6047
6049
|
}()
|
|
6048
6050
|
);
|
|
6049
|
-
function
|
|
6050
|
-
for (var f = new
|
|
6051
|
+
function Y2(u, D) {
|
|
6052
|
+
for (var f = new W2(u, D), e = u.length; f.charIdx < e; ) {
|
|
6051
6053
|
var t = u.charAt(f.charIdx), n = u.charCodeAt(f.charIdx);
|
|
6052
6054
|
switch (f.state) {
|
|
6053
6055
|
case 0:
|
|
6054
|
-
|
|
6056
|
+
K2(f, t);
|
|
6055
6057
|
break;
|
|
6056
6058
|
case 1:
|
|
6057
|
-
|
|
6059
|
+
J2(f, t, n);
|
|
6058
6060
|
break;
|
|
6059
6061
|
case 2:
|
|
6060
|
-
|
|
6062
|
+
X2(f, t, n);
|
|
6061
6063
|
break;
|
|
6062
6064
|
case 3:
|
|
6063
|
-
|
|
6065
|
+
G2(f, t, n);
|
|
6064
6066
|
break;
|
|
6065
6067
|
case 4:
|
|
6066
|
-
|
|
6068
|
+
Z2(f, t, n);
|
|
6067
6069
|
break;
|
|
6068
6070
|
case 5:
|
|
6069
|
-
|
|
6071
|
+
Q2(f, t, n);
|
|
6070
6072
|
break;
|
|
6071
6073
|
case 6:
|
|
6072
|
-
|
|
6074
|
+
ut(f, t, n);
|
|
6073
6075
|
break;
|
|
6074
6076
|
case 7:
|
|
6075
|
-
|
|
6077
|
+
Dt(f, t, n);
|
|
6076
6078
|
break;
|
|
6077
6079
|
case 8:
|
|
6078
|
-
|
|
6080
|
+
ft(f, t);
|
|
6079
6081
|
break;
|
|
6080
6082
|
case 9:
|
|
6081
|
-
|
|
6083
|
+
et(f, t);
|
|
6082
6084
|
break;
|
|
6083
6085
|
case 10:
|
|
6084
|
-
|
|
6086
|
+
tt(f, t, n);
|
|
6085
6087
|
break;
|
|
6086
6088
|
case 11:
|
|
6087
|
-
|
|
6089
|
+
nt(f, t, n);
|
|
6088
6090
|
break;
|
|
6089
6091
|
case 12:
|
|
6090
|
-
|
|
6092
|
+
rt(f, t);
|
|
6091
6093
|
break;
|
|
6092
6094
|
case 13:
|
|
6093
|
-
|
|
6095
|
+
at(f);
|
|
6094
6096
|
break;
|
|
6095
6097
|
case 14:
|
|
6096
|
-
|
|
6098
|
+
st(f, t);
|
|
6097
6099
|
break;
|
|
6098
6100
|
case 15:
|
|
6099
|
-
|
|
6101
|
+
Ft(f, t);
|
|
6100
6102
|
break;
|
|
6101
6103
|
case 16:
|
|
6102
|
-
|
|
6104
|
+
it(f, t);
|
|
6103
6105
|
break;
|
|
6104
6106
|
case 17:
|
|
6105
|
-
|
|
6107
|
+
ot(f, t);
|
|
6106
6108
|
break;
|
|
6107
6109
|
case 18:
|
|
6108
|
-
|
|
6110
|
+
dt(f, t);
|
|
6109
6111
|
break;
|
|
6110
6112
|
case 19:
|
|
6111
|
-
|
|
6113
|
+
Ct(f, t);
|
|
6112
6114
|
break;
|
|
6113
6115
|
case 20:
|
|
6114
|
-
|
|
6116
|
+
ct(f, t);
|
|
6115
6117
|
break;
|
|
6116
6118
|
default:
|
|
6117
6119
|
Xu(f.state);
|
|
6118
6120
|
}
|
|
6119
6121
|
f.charIdx++;
|
|
6120
6122
|
}
|
|
6121
|
-
f.currentDataIdx < f.charIdx &&
|
|
6123
|
+
f.currentDataIdx < f.charIdx && lt(f);
|
|
6122
6124
|
}
|
|
6123
|
-
function
|
|
6125
|
+
function K2(u, D) {
|
|
6124
6126
|
D === "<" && Ou(u);
|
|
6125
6127
|
}
|
|
6126
|
-
function Y2(u, D, f) {
|
|
6127
|
-
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(iu(iu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = mf);
|
|
6128
|
-
}
|
|
6129
|
-
function K2(u, D, f) {
|
|
6130
|
-
Zu(f) ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: VD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: VD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: VD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
|
|
6131
|
-
}
|
|
6132
6128
|
function J2(u, D, f) {
|
|
6133
|
-
D === "
|
|
6129
|
+
D === "!" ? u.state = 13 : D === "/" ? (u.state = 2, u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 }))) : D === "<" ? Ou(u) : rD(f) ? (u.state = 3, u.currentTag = new Su(iu(iu({}, u.currentTag), { isOpening: !0 }))) : (u.state = 0, u.currentTag = _f);
|
|
6134
6130
|
}
|
|
6135
6131
|
function G2(u, D, f) {
|
|
6136
|
-
Zu(f)
|
|
6132
|
+
Zu(f) ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), u.state = 4) : D === "<" ? Ou(u) : D === "/" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), u.state = 12) : D === ">" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { name: HD(u) })), Ru(u)) : !rD(f) && !Eu(f) && D !== ":" && xu(u);
|
|
6137
6133
|
}
|
|
6138
6134
|
function X2(u, D, f) {
|
|
6139
|
-
|
|
6135
|
+
D === ">" ? xu(u) : rD(f) ? u.state = 3 : xu(u);
|
|
6140
6136
|
}
|
|
6141
6137
|
function Z2(u, D, f) {
|
|
6142
|
-
Zu(f) || (D === "/" ? u.state = 12 : D === "
|
|
6138
|
+
Zu(f) || (D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : D === "=" || bf(f) || C3(f) ? xu(u) : u.state = 5);
|
|
6143
6139
|
}
|
|
6144
6140
|
function Q2(u, D, f) {
|
|
6141
|
+
Zu(f) ? u.state = 6 : D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : bf(f) && xu(u);
|
|
6142
|
+
}
|
|
6143
|
+
function ut(u, D, f) {
|
|
6144
|
+
Zu(f) || (D === "/" ? u.state = 12 : D === "=" ? u.state = 7 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : bf(f) ? xu(u) : u.state = 5);
|
|
6145
|
+
}
|
|
6146
|
+
function Dt(u, D, f) {
|
|
6145
6147
|
Zu(f) || (D === '"' ? u.state = 8 : D === "'" ? u.state = 9 : /[>=`]/.test(D) ? xu(u) : D === "<" ? Ou(u) : u.state = 10);
|
|
6146
6148
|
}
|
|
6147
|
-
function
|
|
6149
|
+
function ft(u, D) {
|
|
6148
6150
|
D === '"' && (u.state = 11);
|
|
6149
6151
|
}
|
|
6150
|
-
function
|
|
6152
|
+
function et(u, D) {
|
|
6151
6153
|
D === "'" && (u.state = 11);
|
|
6152
6154
|
}
|
|
6153
|
-
function
|
|
6155
|
+
function tt(u, D, f) {
|
|
6154
6156
|
Zu(f) ? u.state = 4 : D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6155
6157
|
}
|
|
6156
|
-
function
|
|
6157
|
-
Zu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : (u.state = 4,
|
|
6158
|
+
function nt(u, D, f) {
|
|
6159
|
+
Zu(f) ? u.state = 4 : D === "/" ? u.state = 12 : D === ">" ? Ru(u) : D === "<" ? Ou(u) : (u.state = 4, Et(u));
|
|
6158
6160
|
}
|
|
6159
|
-
function
|
|
6161
|
+
function rt(u, D) {
|
|
6160
6162
|
D === ">" ? (u.currentTag = new Su(iu(iu({}, u.currentTag), { isClosing: !0 })), Ru(u)) : xu(u);
|
|
6161
6163
|
}
|
|
6162
|
-
function
|
|
6164
|
+
function at(u) {
|
|
6163
6165
|
var D = u.html, f = u.charIdx;
|
|
6164
6166
|
D.slice(f, f + 2) === "--" ? (u.charIdx++, u.currentTag = new Su(iu(iu({}, u.currentTag), { type: "comment" })), u.state = 14) : D.slice(f, f + 7).toUpperCase() === "DOCTYPE" ? (u.charIdx += 6, u.currentTag = new Su(iu(iu({}, u.currentTag), { type: "doctype" })), u.state = 20) : xu(u);
|
|
6165
6167
|
}
|
|
6166
|
-
function
|
|
6168
|
+
function st(u, D) {
|
|
6167
6169
|
D === "-" ? u.state = 15 : D === ">" ? xu(u) : u.state = 16;
|
|
6168
6170
|
}
|
|
6169
|
-
function
|
|
6171
|
+
function Ft(u, D) {
|
|
6170
6172
|
D === "-" ? u.state = 18 : D === ">" ? xu(u) : u.state = 16;
|
|
6171
6173
|
}
|
|
6172
|
-
function
|
|
6174
|
+
function it(u, D) {
|
|
6173
6175
|
D === "-" && (u.state = 17);
|
|
6174
6176
|
}
|
|
6175
|
-
function
|
|
6177
|
+
function ot(u, D) {
|
|
6176
6178
|
D === "-" ? u.state = 18 : u.state = 16;
|
|
6177
6179
|
}
|
|
6178
|
-
function
|
|
6180
|
+
function dt(u, D) {
|
|
6179
6181
|
D === ">" ? Ru(u) : D === "!" ? u.state = 19 : D === "-" || (u.state = 16);
|
|
6180
6182
|
}
|
|
6181
|
-
function
|
|
6183
|
+
function Ct(u, D) {
|
|
6182
6184
|
D === "-" ? u.state = 17 : D === ">" ? Ru(u) : u.state = 16;
|
|
6183
6185
|
}
|
|
6184
|
-
function
|
|
6186
|
+
function ct(u, D) {
|
|
6185
6187
|
D === ">" ? Ru(u) : D === "<" && Ou(u);
|
|
6186
6188
|
}
|
|
6187
6189
|
function xu(u) {
|
|
6188
|
-
u.state = 0, u.currentTag =
|
|
6190
|
+
u.state = 0, u.currentTag = _f;
|
|
6189
6191
|
}
|
|
6190
6192
|
function Ou(u) {
|
|
6191
6193
|
u.state = 1, u.currentTag = new Su({ idx: u.charIdx });
|
|
@@ -6196,18 +6198,18 @@ function Ru(u) {
|
|
|
6196
6198
|
var f = u.currentTag;
|
|
6197
6199
|
f.type === "comment" ? u.callbacks.onComment(f.idx) : f.type === "doctype" ? u.callbacks.onDoctype(f.idx) : (f.isOpening && u.callbacks.onOpenTag(f.name, f.idx), f.isClosing && u.callbacks.onCloseTag(f.name, f.idx)), xu(u), u.currentDataIdx = u.charIdx + 1;
|
|
6198
6200
|
}
|
|
6199
|
-
function
|
|
6201
|
+
function lt(u) {
|
|
6200
6202
|
var D = u.html.slice(u.currentDataIdx, u.charIdx);
|
|
6201
6203
|
u.callbacks.onText(D, u.currentDataIdx), u.currentDataIdx = u.charIdx + 1;
|
|
6202
6204
|
}
|
|
6203
|
-
function
|
|
6205
|
+
function HD(u) {
|
|
6204
6206
|
var D = u.currentTag.idx + (u.currentTag.isClosing ? 2 : 1);
|
|
6205
6207
|
return u.html.slice(D, u.charIdx).toLowerCase();
|
|
6206
6208
|
}
|
|
6207
|
-
function
|
|
6209
|
+
function Et(u) {
|
|
6208
6210
|
u.charIdx--;
|
|
6209
6211
|
}
|
|
6210
|
-
var
|
|
6212
|
+
var ht = (
|
|
6211
6213
|
/** @class */
|
|
6212
6214
|
function() {
|
|
6213
6215
|
function u(D) {
|
|
@@ -6217,14 +6219,14 @@ var lt = (
|
|
|
6217
6219
|
}, this.stripTrailingSlash = !0, this.decodePercentEncoding = !0, this.truncate = {
|
|
6218
6220
|
length: 0,
|
|
6219
6221
|
location: "end"
|
|
6220
|
-
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls =
|
|
6222
|
+
}, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls = bt(D.urls), this.email = wu(D.email) ? D.email : this.email, this.phone = wu(D.phone) ? D.phone : this.phone, this.hashtag = D.hashtag || this.hashtag, this.mention = D.mention || this.mention, this.newWindow = wu(D.newWindow) ? D.newWindow : this.newWindow, this.stripPrefix = pt(D.stripPrefix), this.stripTrailingSlash = wu(D.stripTrailingSlash) ? D.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = wu(D.decodePercentEncoding) ? D.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = D.sanitizeHtml || !1;
|
|
6221
6223
|
var f = this.mention;
|
|
6222
|
-
if (f !== !1 &&
|
|
6224
|
+
if (f !== !1 && U3.indexOf(f) === -1)
|
|
6223
6225
|
throw new Error("invalid `mention` cfg '".concat(f, "' - see docs"));
|
|
6224
6226
|
var e = this.hashtag;
|
|
6225
|
-
if (e !== !1 &&
|
|
6227
|
+
if (e !== !1 && $3.indexOf(e) === -1)
|
|
6226
6228
|
throw new Error("invalid `hashtag` cfg '".concat(e, "' - see docs"));
|
|
6227
|
-
this.truncate =
|
|
6229
|
+
this.truncate = Bt(D.truncate), this.className = D.className || this.className, this.replaceFn = D.replaceFn || this.replaceFn, this.context = D.context || this;
|
|
6228
6230
|
}
|
|
6229
6231
|
return u.link = function(D, f) {
|
|
6230
6232
|
var e = new u(f);
|
|
@@ -6234,7 +6236,7 @@ var lt = (
|
|
|
6234
6236
|
return e.parse(D);
|
|
6235
6237
|
}, u.prototype.parse = function(D) {
|
|
6236
6238
|
var f = this, e = ["a", "style", "script"], t = 0, n = [];
|
|
6237
|
-
return
|
|
6239
|
+
return Y2(D, {
|
|
6238
6240
|
onOpenTag: function(r) {
|
|
6239
6241
|
e.indexOf(r) >= 0 && t++;
|
|
6240
6242
|
},
|
|
@@ -6244,7 +6246,7 @@ var lt = (
|
|
|
6244
6246
|
d.forEach(function(c, l) {
|
|
6245
6247
|
if (l % 2 === 0) {
|
|
6246
6248
|
var j = f.parseText(c, o);
|
|
6247
|
-
n.push.apply(n,
|
|
6249
|
+
n.push.apply(n, t3([], e3(j), !1));
|
|
6248
6250
|
}
|
|
6249
6251
|
o += c.length;
|
|
6250
6252
|
});
|
|
@@ -6261,7 +6263,7 @@ var lt = (
|
|
|
6261
6263
|
// no need to process doctype nodes
|
|
6262
6264
|
}), n = this.compactMatches(n), n = this.removeUnwantedMatches(n), n;
|
|
6263
6265
|
}, u.prototype.compactMatches = function(D) {
|
|
6264
|
-
D.sort(
|
|
6266
|
+
D.sort(gt);
|
|
6265
6267
|
for (var f = 0; f < D.length - 1; ) {
|
|
6266
6268
|
var e = D[f], t = e.getOffset(), n = e.getMatchedText().length;
|
|
6267
6269
|
if (f + 1 < D.length && D[f + 1].getOffset() === t) {
|
|
@@ -6290,7 +6292,7 @@ var lt = (
|
|
|
6290
6292
|
}), D;
|
|
6291
6293
|
}, u.prototype.parseText = function(D, f) {
|
|
6292
6294
|
f = f || 0;
|
|
6293
|
-
for (var e =
|
|
6295
|
+
for (var e = Z3(D, {
|
|
6294
6296
|
tagBuilder: this.getTagBuilder(),
|
|
6295
6297
|
stripPrefix: this.stripPrefix,
|
|
6296
6298
|
stripTrailingSlash: this.stripTrailingSlash,
|
|
@@ -6315,37 +6317,37 @@ var lt = (
|
|
|
6315
6317
|
return f;
|
|
6316
6318
|
if (f === !1)
|
|
6317
6319
|
return D.getMatchedText();
|
|
6318
|
-
if (f instanceof
|
|
6320
|
+
if (f instanceof O1)
|
|
6319
6321
|
return f.toAnchorString();
|
|
6320
6322
|
var e = D.buildTag();
|
|
6321
6323
|
return e.toAnchorString();
|
|
6322
6324
|
}, u.prototype.getTagBuilder = function() {
|
|
6323
6325
|
var D = this.tagBuilder;
|
|
6324
|
-
return D || (D = this.tagBuilder = new
|
|
6326
|
+
return D || (D = this.tagBuilder = new d3({
|
|
6325
6327
|
newWindow: this.newWindow,
|
|
6326
6328
|
truncate: this.truncate,
|
|
6327
6329
|
className: this.className
|
|
6328
6330
|
})), D;
|
|
6329
|
-
}, u.version =
|
|
6331
|
+
}, u.version = n3, u;
|
|
6330
6332
|
}()
|
|
6331
6333
|
);
|
|
6332
|
-
function
|
|
6334
|
+
function bt(u) {
|
|
6333
6335
|
return u == null && (u = !0), wu(u) ? { schemeMatches: u, tldMatches: u, ipV4Matches: u } : {
|
|
6334
6336
|
schemeMatches: wu(u.schemeMatches) ? u.schemeMatches : !0,
|
|
6335
6337
|
tldMatches: wu(u.tldMatches) ? u.tldMatches : !0,
|
|
6336
6338
|
ipV4Matches: wu(u.ipV4Matches) ? u.ipV4Matches : !0
|
|
6337
6339
|
};
|
|
6338
6340
|
}
|
|
6339
|
-
function
|
|
6341
|
+
function pt(u) {
|
|
6340
6342
|
return u == null && (u = !0), wu(u) ? { scheme: u, www: u } : {
|
|
6341
6343
|
scheme: wu(u.scheme) ? u.scheme : !0,
|
|
6342
6344
|
www: wu(u.www) ? u.www : !0
|
|
6343
6345
|
};
|
|
6344
6346
|
}
|
|
6345
|
-
function
|
|
6347
|
+
function Bt(u) {
|
|
6346
6348
|
return typeof u == "number" ? { length: u, location: "end" } : iu({ length: Number.POSITIVE_INFINITY, location: "end" }, u);
|
|
6347
6349
|
}
|
|
6348
|
-
function
|
|
6350
|
+
function gt(u, D) {
|
|
6349
6351
|
return u.getOffset() - D.getOffset();
|
|
6350
6352
|
}
|
|
6351
6353
|
const Ju = [
|
|
@@ -6354,28 +6356,28 @@ const Ju = [
|
|
|
6354
6356
|
{ name: "New Zealand", countryCode: "+64", code: "NZ", flag: "🇳🇿" },
|
|
6355
6357
|
{ name: "United Kingdom", countryCode: "+44", code: "UK", flag: "🇬🇧" },
|
|
6356
6358
|
{ name: "Indonesia", countryCode: "+62", code: "ID", flag: "🇮🇩" }
|
|
6357
|
-
],
|
|
6359
|
+
], mt = {
|
|
6358
6360
|
AU: /^(?:\+?(61))? ?(?:\((?=.*\))\))?(0?[4])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$/gm,
|
|
6359
6361
|
US: /^(\+?1\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6360
6362
|
UK: /^(\+?44\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6361
6363
|
NZ: /^(\+?64\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm,
|
|
6362
6364
|
ID: /^(\+?62\s?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm
|
|
6363
|
-
},
|
|
6365
|
+
}, _t = {
|
|
6364
6366
|
AU: "+61",
|
|
6365
6367
|
US: "+1",
|
|
6366
6368
|
NZ: "+64",
|
|
6367
6369
|
UK: "+44",
|
|
6368
6370
|
ID: "+62"
|
|
6369
|
-
},
|
|
6370
|
-
function
|
|
6371
|
-
const f =
|
|
6371
|
+
}, yt = (u) => u.toUpperCase(), vt = (u) => u.replace(/\s+/g, "").replace(/[^0-9+]/g, "");
|
|
6372
|
+
function wt(u, D) {
|
|
6373
|
+
const f = _t[u];
|
|
6372
6374
|
return D.startsWith(f) ? { cleanNumber: D.slice(f.length), countryCode: f } : { cleanNumber: D, countryCode: f };
|
|
6373
6375
|
}
|
|
6374
|
-
function
|
|
6375
|
-
const f =
|
|
6376
|
+
function At(u, D) {
|
|
6377
|
+
const f = mt[u];
|
|
6376
6378
|
return new RegExp(f.source, "mi").test(D);
|
|
6377
6379
|
}
|
|
6378
|
-
function
|
|
6380
|
+
function xt({
|
|
6379
6381
|
number: u,
|
|
6380
6382
|
region: D,
|
|
6381
6383
|
validateDuplicate: f,
|
|
@@ -6387,26 +6389,26 @@ function wt({
|
|
|
6387
6389
|
cleanNumber: "",
|
|
6388
6390
|
errorMessage: "",
|
|
6389
6391
|
isValid: !1
|
|
6390
|
-
}, n =
|
|
6392
|
+
}, n = yt(D);
|
|
6391
6393
|
if (!u)
|
|
6392
6394
|
return t.errorMessage = "Number is empty", t;
|
|
6393
6395
|
const r = u.trim();
|
|
6394
|
-
let s =
|
|
6396
|
+
let s = vt(u);
|
|
6395
6397
|
s = s.startsWith("0") ? s.slice(1) : s;
|
|
6396
|
-
const { cleanNumber: F, countryCode: d } =
|
|
6398
|
+
const { cleanNumber: F, countryCode: d } = wt(
|
|
6397
6399
|
n,
|
|
6398
6400
|
s
|
|
6399
6401
|
);
|
|
6400
6402
|
s = F, t.fullNumber = `${d}${s}`, t.cleanNumber = s;
|
|
6401
6403
|
try {
|
|
6402
|
-
if (!
|
|
6404
|
+
if (!At(n, r)) throw new Error("Please enter a valid phone number");
|
|
6403
6405
|
t.isValid = !0;
|
|
6404
6406
|
} catch (o) {
|
|
6405
6407
|
t.errorMessage = o.message, t.isValid = !1;
|
|
6406
6408
|
}
|
|
6407
6409
|
return t;
|
|
6408
6410
|
}
|
|
6409
|
-
const
|
|
6411
|
+
const V1 = ({
|
|
6410
6412
|
initialData: u,
|
|
6411
6413
|
loadFromDataUserSubs: D = !1
|
|
6412
6414
|
} = {}) => {
|
|
@@ -6435,7 +6437,7 @@ const U1 = ({
|
|
|
6435
6437
|
if (!C.isRequired && _ && I === "")
|
|
6436
6438
|
return "";
|
|
6437
6439
|
if (m) {
|
|
6438
|
-
const P =
|
|
6440
|
+
const P = xt({
|
|
6439
6441
|
number: m,
|
|
6440
6442
|
region: B,
|
|
6441
6443
|
validateDuplicate: !1,
|
|
@@ -6446,10 +6448,10 @@ const U1 = ({
|
|
|
6446
6448
|
}
|
|
6447
6449
|
return x;
|
|
6448
6450
|
};
|
|
6449
|
-
|
|
6451
|
+
Z(() => {
|
|
6450
6452
|
if (D)
|
|
6451
6453
|
try {
|
|
6452
|
-
const C =
|
|
6454
|
+
const C = X.getItem("dataUserSubs");
|
|
6453
6455
|
C && e(C);
|
|
6454
6456
|
} catch (C) {
|
|
6455
6457
|
console.error("Error loading dataUserSubs from localStorage:", C);
|
|
@@ -6760,7 +6762,7 @@ const U1 = ({
|
|
|
6760
6762
|
validateAll: y
|
|
6761
6763
|
};
|
|
6762
6764
|
};
|
|
6763
|
-
function
|
|
6765
|
+
function kt(u) {
|
|
6764
6766
|
const D = {};
|
|
6765
6767
|
return Object.entries(u).forEach(([f, e]) => {
|
|
6766
6768
|
if (e) {
|
|
@@ -6773,17 +6775,17 @@ function At(u) {
|
|
|
6773
6775
|
}
|
|
6774
6776
|
}), D;
|
|
6775
6777
|
}
|
|
6776
|
-
const
|
|
6778
|
+
const jt = ({
|
|
6777
6779
|
onSubmit: u,
|
|
6778
6780
|
onFormStateChange: D
|
|
6779
6781
|
}) => {
|
|
6780
6782
|
const { colors: f } = ou(), e = Wu(), t = pu(), { socket: n } = Gu(), { setScreen: r } = Nu();
|
|
6781
6783
|
zu();
|
|
6782
|
-
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = Cu(), { formData: j, renderContactFormField: y, errors: C, validateAll: v } =
|
|
6784
|
+
const { setIsOfflineMode: s, send: F, participants: d, setMessages: o, setParticipants: c, setConnectionState: l } = Cu(), { formData: j, renderContactFormField: y, errors: C, validateAll: v } = V1({
|
|
6783
6785
|
initialData: {},
|
|
6784
6786
|
loadFromDataUserSubs: !0
|
|
6785
6787
|
}), [x, m] = U(!1), [T, _] = U(!1);
|
|
6786
|
-
|
|
6788
|
+
Z(() => {
|
|
6787
6789
|
D && !T && D(!0), D && T && D(!1);
|
|
6788
6790
|
}, [T]);
|
|
6789
6791
|
const B = async (P) => {
|
|
@@ -6796,20 +6798,20 @@ const xt = ({
|
|
|
6796
6798
|
var h;
|
|
6797
6799
|
E.isDisplay && j[E.key] !== void 0 && (O[E.key] = ((h = j[E.key]) == null ? void 0 : h.toString().trim()) || "");
|
|
6798
6800
|
});
|
|
6799
|
-
const $ =
|
|
6800
|
-
if (!
|
|
6801
|
+
const $ = kt(O);
|
|
6802
|
+
if (!X.getItem("profileLiveChat"))
|
|
6801
6803
|
try {
|
|
6802
6804
|
const E = new URLSearchParams();
|
|
6803
6805
|
Object.entries($).forEach(([M, V]) => {
|
|
6804
6806
|
typeof V == "string" && V && E.append(M, V);
|
|
6805
6807
|
}), E.append("owner_id", e.ownerId), E.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString());
|
|
6806
6808
|
const { body: h } = await n.get(`/webhook/${e.channel}/?${E.toString()}`), { messages: A, profile: p } = h;
|
|
6807
|
-
|
|
6809
|
+
X.setItem("profileLiveChat", p), X.setItem("isOffline", !1), X.setItem(
|
|
6808
6810
|
"submitedFormLateTime",
|
|
6809
6811
|
(p == null ? void 0 : p.submitedFormLateTime) || null
|
|
6810
6812
|
), A.forEach((M) => {
|
|
6811
|
-
const V = M.author === p.foreignId || M.author === p.id ?
|
|
6812
|
-
M.direction = V, M.direction ===
|
|
6813
|
+
const V = M.author === p.foreignId || M.author === p.id ? uu.sent : uu.received;
|
|
6814
|
+
M.direction = V, M.direction === uu.sent && (M.read = !0, M.delivery = !1);
|
|
6813
6815
|
}), o(A), c([
|
|
6814
6816
|
d[0],
|
|
6815
6817
|
{
|
|
@@ -6868,7 +6870,7 @@ const xt = ({
|
|
|
6868
6870
|
m(!1);
|
|
6869
6871
|
}
|
|
6870
6872
|
}
|
|
6871
|
-
}, I = f[
|
|
6873
|
+
}, I = f[uu.received];
|
|
6872
6874
|
return T ? null : /* @__PURE__ */ a.jsx(
|
|
6873
6875
|
"div",
|
|
6874
6876
|
{
|
|
@@ -6906,18 +6908,18 @@ const xt = ({
|
|
|
6906
6908
|
] }) })
|
|
6907
6909
|
}
|
|
6908
6910
|
);
|
|
6909
|
-
},
|
|
6911
|
+
}, St = ({
|
|
6910
6912
|
message: u,
|
|
6911
6913
|
onFormSubmitted: D
|
|
6912
6914
|
}) => {
|
|
6913
6915
|
const { colors: f } = ou(), { setIsContactFormActive: e } = Cu(), t = mu(null);
|
|
6914
|
-
|
|
6916
|
+
Z(() => {
|
|
6915
6917
|
n();
|
|
6916
6918
|
}, [u]);
|
|
6917
6919
|
const n = () => {
|
|
6918
|
-
if (u.direction ===
|
|
6920
|
+
if (u.direction === uu.received && t.current) {
|
|
6919
6921
|
const F = t.current.innerText;
|
|
6920
|
-
let d =
|
|
6922
|
+
let d = ht.link(F, {
|
|
6921
6923
|
className: "chatLink",
|
|
6922
6924
|
truncate: { length: 50, location: "smart" }
|
|
6923
6925
|
});
|
|
@@ -6926,9 +6928,9 @@ const xt = ({
|
|
|
6926
6928
|
};
|
|
6927
6929
|
if (!("text" in u.data))
|
|
6928
6930
|
throw new Error("Unable to find text.");
|
|
6929
|
-
const r = f[u.direction ||
|
|
6931
|
+
const r = f[u.direction || uu.received];
|
|
6930
6932
|
return "isShowForm" in u.data && u.data.isShowForm ? /* @__PURE__ */ a.jsx(
|
|
6931
|
-
|
|
6933
|
+
jt,
|
|
6932
6934
|
{
|
|
6933
6935
|
onFormStateChange: (F) => {
|
|
6934
6936
|
e(F), !F && D && D(!0);
|
|
@@ -6945,7 +6947,7 @@ const xt = ({
|
|
|
6945
6947
|
children: /* @__PURE__ */ a.jsx("p", { className: "sc-message--text-content", ref: t, children: u.data.text })
|
|
6946
6948
|
}
|
|
6947
6949
|
) });
|
|
6948
|
-
},
|
|
6950
|
+
}, Gf = ({
|
|
6949
6951
|
viewBox: u = "0 0 24 24",
|
|
6950
6952
|
fill: D = "none",
|
|
6951
6953
|
stroke: f = "",
|
|
@@ -6966,13 +6968,13 @@ const xt = ({
|
|
|
6966
6968
|
...r,
|
|
6967
6969
|
children: /* @__PURE__ */ a.jsx("path", { d: "M20 6L9 17l-5-5" })
|
|
6968
6970
|
}
|
|
6969
|
-
),
|
|
6971
|
+
), Tt = ({ message: u }) => {
|
|
6970
6972
|
const { colors: D } = ou();
|
|
6971
6973
|
if (!("delivery" in u && "read" in u))
|
|
6972
6974
|
throw new Error("Unable to find delivery/read attributes");
|
|
6973
6975
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc--status", style: { color: D.messageStatus.bg }, children: [
|
|
6974
6976
|
u.read && /* @__PURE__ */ a.jsx("div", { className: "sc--status-wrapper sc--status-read", title: "Read", children: /* @__PURE__ */ a.jsx(
|
|
6975
|
-
|
|
6977
|
+
Gf,
|
|
6976
6978
|
{
|
|
6977
6979
|
width: "16px",
|
|
6978
6980
|
height: "16px",
|
|
@@ -6986,7 +6988,7 @@ const xt = ({
|
|
|
6986
6988
|
className: "sc--status-wrapper sc--status-delivery",
|
|
6987
6989
|
title: "Delivered",
|
|
6988
6990
|
children: /* @__PURE__ */ a.jsx(
|
|
6989
|
-
|
|
6991
|
+
Gf,
|
|
6990
6992
|
{
|
|
6991
6993
|
width: "16px",
|
|
6992
6994
|
height: "16px",
|
|
@@ -6998,15 +7000,15 @@ const xt = ({
|
|
|
6998
7000
|
)
|
|
6999
7001
|
] });
|
|
7000
7002
|
};
|
|
7001
|
-
|
|
7002
|
-
const
|
|
7003
|
+
S1.extend(Ye);
|
|
7004
|
+
const Nt = ({ message: u, Avatar: D }) => {
|
|
7003
7005
|
const { participants: f } = Cu(), { colors: e } = ou(), [t, n] = U(!1), [r, s] = U(!1), F = pu(), d = u.data && "text" in u.data && "isShowForm" in u.data && u.data.isShowForm, o = f.find(
|
|
7004
7006
|
(j) => j.id === u.author
|
|
7005
7007
|
) || {
|
|
7006
7008
|
name: "Anon"
|
|
7007
7009
|
}, c = () => {
|
|
7008
7010
|
n(!t);
|
|
7009
|
-
}, l = (j) =>
|
|
7011
|
+
}, l = (j) => S1(j).fromNow();
|
|
7010
7012
|
return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${u.direction}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${u.direction}`, children: [
|
|
7011
7013
|
(!r || !d) && /* @__PURE__ */ a.jsx(
|
|
7012
7014
|
"div",
|
|
@@ -7024,24 +7026,24 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7024
7026
|
height: 32,
|
|
7025
7027
|
style: { borderRadius: "50%" }
|
|
7026
7028
|
}
|
|
7027
|
-
) : D ? /* @__PURE__ */ a.jsx(D, {}) : o.imageUrl ? null : /* @__PURE__ */ a.jsx(
|
|
7029
|
+
) : D ? /* @__PURE__ */ a.jsx(D, {}) : o.imageUrl ? null : /* @__PURE__ */ a.jsx(N1, { width: "32px", height: "32px" })
|
|
7028
7030
|
}
|
|
7029
7031
|
),
|
|
7030
7032
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--wrapper", onClick: c, children: [
|
|
7031
7033
|
u.data && "text" in u.data && /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
7032
|
-
|
|
7034
|
+
St,
|
|
7033
7035
|
{
|
|
7034
7036
|
message: u,
|
|
7035
7037
|
onFormSubmitted: s
|
|
7036
7038
|
}
|
|
7037
7039
|
) }),
|
|
7038
|
-
u.type === "file" && /* @__PURE__ */ a.jsx(
|
|
7039
|
-
u.type === "location" && /* @__PURE__ */ a.jsx(
|
|
7040
|
-
u.type === "list" && /* @__PURE__ */ a.jsx(
|
|
7041
|
-
u.type === "carousel" && /* @__PURE__ */ a.jsx(
|
|
7040
|
+
u.type === "file" && /* @__PURE__ */ a.jsx(u3, { message: u }),
|
|
7041
|
+
u.type === "location" && /* @__PURE__ */ a.jsx(D3, { message: u }),
|
|
7042
|
+
u.type === "list" && /* @__PURE__ */ a.jsx(f3, { messageList: u }),
|
|
7043
|
+
u.type === "carousel" && /* @__PURE__ */ a.jsx(Ze, { messageCarousel: u }),
|
|
7042
7044
|
u.type === "buttons" && /* @__PURE__ */ a.jsx(vD, { message: u }),
|
|
7043
7045
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--meta", children: [
|
|
7044
|
-
u.direction === "sent" && /* @__PURE__ */ a.jsx(
|
|
7046
|
+
u.direction === "sent" && /* @__PURE__ */ a.jsx(Tt, { message: u }),
|
|
7045
7047
|
/* @__PURE__ */ a.jsx(
|
|
7046
7048
|
"div",
|
|
7047
7049
|
{
|
|
@@ -7053,7 +7055,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7053
7055
|
] })
|
|
7054
7056
|
] })
|
|
7055
7057
|
] }) });
|
|
7056
|
-
},
|
|
7058
|
+
}, Ot = () => {
|
|
7057
7059
|
const { colors: u } = ou();
|
|
7058
7060
|
return /* @__PURE__ */ a.jsxs(
|
|
7059
7061
|
"div",
|
|
@@ -7070,27 +7072,27 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7070
7072
|
]
|
|
7071
7073
|
}
|
|
7072
7074
|
);
|
|
7073
|
-
},
|
|
7075
|
+
}, Rt = ({
|
|
7074
7076
|
Avatar: u,
|
|
7075
7077
|
phone: D
|
|
7076
7078
|
}) => {
|
|
7077
|
-
const { colors:
|
|
7079
|
+
const f = X.getItem("profileLiveChat"), { colors: e } = ou(), t = e[uu.received];
|
|
7078
7080
|
pu();
|
|
7079
|
-
const { participants:
|
|
7080
|
-
(
|
|
7081
|
+
const { participants: n } = Cu(), r = n.find(
|
|
7082
|
+
(o) => o.id === "chatbot"
|
|
7081
7083
|
) || {
|
|
7082
7084
|
name: "Bot"
|
|
7083
|
-
}
|
|
7084
|
-
return /* @__PURE__ */ a.jsx("div", { className: `sc-message ${
|
|
7085
|
+
}, s = (f == null ? void 0 : f.mobile) || "", d = `${(f == null ? void 0 : f.countryCode) || "+61"} ${s}`;
|
|
7086
|
+
return console.log("fullPhone", d), /* @__PURE__ */ a.jsx("div", { className: `sc-message ${uu.received}`, children: /* @__PURE__ */ a.jsxs("div", { className: `sc-message--content ${uu.received}`, children: [
|
|
7085
7087
|
/* @__PURE__ */ a.jsx(
|
|
7086
7088
|
"div",
|
|
7087
7089
|
{
|
|
7088
|
-
title:
|
|
7090
|
+
title: r.name,
|
|
7089
7091
|
className: "sc-message--avatar",
|
|
7090
|
-
style:
|
|
7091
|
-
backgroundImage: `url(${
|
|
7092
|
+
style: r.imageUrl ? {
|
|
7093
|
+
backgroundImage: `url(${r.imageUrl}?color=${encodeURIComponent(e.header.bg)})`
|
|
7092
7094
|
} : void 0,
|
|
7093
|
-
children: u ? /* @__PURE__ */ a.jsx(u, {}) :
|
|
7095
|
+
children: u ? /* @__PURE__ */ a.jsx(u, {}) : r.imageUrl ? null : /* @__PURE__ */ a.jsx(N1, { width: "32px", height: "32px" })
|
|
7094
7096
|
}
|
|
7095
7097
|
),
|
|
7096
7098
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
@@ -7098,16 +7100,16 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7098
7100
|
{
|
|
7099
7101
|
className: "sc-message--text chatLink sc-message--contact-form-confirmation",
|
|
7100
7102
|
style: {
|
|
7101
|
-
color:
|
|
7102
|
-
backgroundColor:
|
|
7103
|
+
color: t.text,
|
|
7104
|
+
backgroundColor: t.bg
|
|
7103
7105
|
},
|
|
7104
7106
|
children: [
|
|
7105
7107
|
/* @__PURE__ */ a.jsx("div", { className: "sc-message--contact-form-phone-display", children: /* @__PURE__ */ a.jsx(
|
|
7106
7108
|
"a",
|
|
7107
7109
|
{
|
|
7108
|
-
href: `tel:${
|
|
7110
|
+
href: `tel:${d}`,
|
|
7109
7111
|
className: "sc-message--contact-form-phone-link",
|
|
7110
|
-
children:
|
|
7112
|
+
children: d
|
|
7111
7113
|
}
|
|
7112
7114
|
) }),
|
|
7113
7115
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-message--contact-form-response-text", children: [
|
|
@@ -7118,7 +7120,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7118
7120
|
}
|
|
7119
7121
|
) })
|
|
7120
7122
|
] }) });
|
|
7121
|
-
},
|
|
7123
|
+
}, Pt = ({ Avatar: u }) => {
|
|
7122
7124
|
const { scroll: D, setScroll: f, isOpen: e } = Nu(), { messages: t, showTypingIndicator: n, setNewIOMessage: r, setMessages: s } = Cu(), F = pu(), { colors: d } = ou(), { formSettings: o } = pu(), [c, l] = U(""), j = F.offline_mode, y = kD(j), C = (T) => {
|
|
7123
7125
|
if (!("text" in T.data)) return !1;
|
|
7124
7126
|
const _ = T.data.text || "", B = (g) => g.toLowerCase().replace(/\s+/g, "").replace(/[^a-z0-9_]/g, ""), I = _.split(`
|
|
@@ -7131,7 +7133,7 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7131
7133
|
(g) => P.has(B(g.label)) || P.has(B(g.key))
|
|
7132
7134
|
);
|
|
7133
7135
|
}, v = mu(null), [x, m] = U();
|
|
7134
|
-
return
|
|
7136
|
+
return Z(() => {
|
|
7135
7137
|
const T = (_) => {
|
|
7136
7138
|
if (v.current) {
|
|
7137
7139
|
const B = Math.round(
|
|
@@ -7151,14 +7153,14 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7151
7153
|
e && setTimeout(() => {
|
|
7152
7154
|
T(D);
|
|
7153
7155
|
}, 100);
|
|
7154
|
-
}, [D, e]),
|
|
7156
|
+
}, [D, e]), Z(() => {
|
|
7155
7157
|
const T = () => {
|
|
7156
|
-
const B =
|
|
7158
|
+
const B = X.getItem("profileLiveChat") || {};
|
|
7157
7159
|
if (B.mobile) {
|
|
7158
7160
|
const q = B.mobile, O = `${B.countryCode || "+61"} ${q}`;
|
|
7159
7161
|
l(O);
|
|
7160
7162
|
}
|
|
7161
|
-
const I =
|
|
7163
|
+
const I = X.getItem("submitedFormLateTime") || B.submitedFormLateTime, P = t.some(
|
|
7162
7164
|
(q) => q.data && "isShowForm" in q.data && q.data.isShowForm
|
|
7163
7165
|
);
|
|
7164
7166
|
if (y && !I && !P) {
|
|
@@ -7166,10 +7168,10 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7166
7168
|
mid: `show-text-${Date.now()}`,
|
|
7167
7169
|
author: "system",
|
|
7168
7170
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7169
|
-
direction:
|
|
7171
|
+
direction: uu.received,
|
|
7170
7172
|
read: !0,
|
|
7171
7173
|
delivery: !0,
|
|
7172
|
-
type:
|
|
7174
|
+
type: KD.text,
|
|
7173
7175
|
data: {
|
|
7174
7176
|
text: "Enter your information, and our team will text you shortly.",
|
|
7175
7177
|
isOffline: !0,
|
|
@@ -7182,10 +7184,10 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7182
7184
|
mid: `show-form-${Date.now()}`,
|
|
7183
7185
|
author: "user",
|
|
7184
7186
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7185
|
-
direction:
|
|
7187
|
+
direction: uu.received,
|
|
7186
7188
|
read: !0,
|
|
7187
7189
|
delivery: !0,
|
|
7188
|
-
type:
|
|
7190
|
+
type: KD.text,
|
|
7189
7191
|
data: {
|
|
7190
7192
|
text: "Show Form",
|
|
7191
7193
|
isOffline: !0,
|
|
@@ -7205,9 +7207,9 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7205
7207
|
return window.addEventListener("storage", _), () => {
|
|
7206
7208
|
window.removeEventListener("storage", _);
|
|
7207
7209
|
};
|
|
7208
|
-
}, [y]),
|
|
7210
|
+
}, [y]), Z(() => {
|
|
7209
7211
|
r(t[t.length - 1]);
|
|
7210
|
-
}, []),
|
|
7212
|
+
}, []), Z(() => {
|
|
7211
7213
|
const T = t[t.length - 1];
|
|
7212
7214
|
(x == null ? void 0 : x.mid) !== (T == null ? void 0 : T.mid) && (m(T), f(100));
|
|
7213
7215
|
}, [t]), /* @__PURE__ */ a.jsxs(
|
|
@@ -7217,16 +7219,16 @@ const St = ({ message: u, Avatar: D }) => {
|
|
|
7217
7219
|
ref: v,
|
|
7218
7220
|
style: { backgroundColor: d.messageList.bg },
|
|
7219
7221
|
children: [
|
|
7220
|
-
t.map((T) => /* @__PURE__ */ a.jsxs(
|
|
7221
|
-
/* @__PURE__ */ a.jsx(
|
|
7222
|
-
C(T) && y && /* @__PURE__ */ a.jsx(
|
|
7222
|
+
t.map((T) => /* @__PURE__ */ a.jsxs(sf.Fragment, { children: [
|
|
7223
|
+
/* @__PURE__ */ a.jsx(Nt, { message: T, Avatar: u }),
|
|
7224
|
+
C(T) && y && /* @__PURE__ */ a.jsx(Rt, { phone: c })
|
|
7223
7225
|
] }, T.mid)),
|
|
7224
|
-
n && /* @__PURE__ */ a.jsx(
|
|
7226
|
+
n && /* @__PURE__ */ a.jsx(Ot, {})
|
|
7225
7227
|
]
|
|
7226
7228
|
}
|
|
7227
7229
|
);
|
|
7228
7230
|
};
|
|
7229
|
-
var
|
|
7231
|
+
var rf = { exports: {} };
|
|
7230
7232
|
(function(u, D) {
|
|
7231
7233
|
(function() {
|
|
7232
7234
|
var f = this, e = f.EmojiConvertor, t = function() {
|
|
@@ -9815,9 +9817,9 @@ var nf = { exports: {} };
|
|
|
9815
9817
|
}).call(/* @__PURE__ */ function() {
|
|
9816
9818
|
return this || (typeof window < "u" ? window : dD);
|
|
9817
9819
|
}());
|
|
9818
|
-
})(
|
|
9819
|
-
var
|
|
9820
|
-
const
|
|
9820
|
+
})(rf, rf.exports);
|
|
9821
|
+
var It = rf.exports;
|
|
9822
|
+
const Lt = /* @__PURE__ */ Ff(It), $t = [
|
|
9821
9823
|
{
|
|
9822
9824
|
name: "People",
|
|
9823
9825
|
emojis: [
|
|
@@ -10471,9 +10473,9 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10471
10473
|
"🔹"
|
|
10472
10474
|
]
|
|
10473
10475
|
}
|
|
10474
|
-
],
|
|
10475
|
-
const f = mu(new
|
|
10476
|
-
|
|
10476
|
+
], Mt = ({ onBlur: u, onSelect: D }) => {
|
|
10477
|
+
const f = mu(new Lt()), e = mu(null);
|
|
10478
|
+
Z(() => {
|
|
10477
10479
|
const n = e.current;
|
|
10478
10480
|
n && (n.style.opacity = "0", window.requestAnimationFrame(() => {
|
|
10479
10481
|
n.style.transition = "opacity 350ms", n.style.opacity = "1";
|
|
@@ -10482,7 +10484,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10482
10484
|
const t = (n, r) => {
|
|
10483
10485
|
D(n, r), e.current && e.current.blur();
|
|
10484
10486
|
};
|
|
10485
|
-
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children:
|
|
10487
|
+
return /* @__PURE__ */ a.jsx("div", { tabIndex: 0, onBlur: u, className: "sc-emoji-picker", ref: e, children: /* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--content", children: $t.map((n) => /* @__PURE__ */ a.jsxs("div", { className: "sc-emoji-picker--category", children: [
|
|
10486
10488
|
/* @__PURE__ */ a.jsx("div", { className: "sc-emoji-picker--category-title", children: n.name }),
|
|
10487
10489
|
n.emojis.map((r) => /* @__PURE__ */ a.jsx(
|
|
10488
10490
|
"span",
|
|
@@ -10494,7 +10496,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10494
10496
|
r
|
|
10495
10497
|
))
|
|
10496
10498
|
] }, n.name)) }) });
|
|
10497
|
-
},
|
|
10499
|
+
}, qt = ({
|
|
10498
10500
|
x: u = "0",
|
|
10499
10501
|
y: D = "0",
|
|
10500
10502
|
className: f = "sc-user-input--emoji-icon",
|
|
@@ -10517,7 +10519,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10517
10519
|
/* @__PURE__ */ a.jsx("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5" })
|
|
10518
10520
|
]
|
|
10519
10521
|
}
|
|
10520
|
-
),
|
|
10522
|
+
), zt = ({ inputRef: u, onInput: D }) => {
|
|
10521
10523
|
const [f, e] = U(!1), t = mu(null), n = () => {
|
|
10522
10524
|
e(!f);
|
|
10523
10525
|
}, r = (d) => {
|
|
@@ -10533,7 +10535,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10533
10535
|
}
|
|
10534
10536
|
};
|
|
10535
10537
|
return /* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--picker-wrapper", children: [
|
|
10536
|
-
f && /* @__PURE__ */ a.jsx(
|
|
10538
|
+
f && /* @__PURE__ */ a.jsx(Mt, { onBlur: r, onSelect: s }),
|
|
10537
10539
|
/* @__PURE__ */ a.jsx(
|
|
10538
10540
|
"button",
|
|
10539
10541
|
{
|
|
@@ -10543,11 +10545,11 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10543
10545
|
id: "sc-emoji-button",
|
|
10544
10546
|
className: "sc-user-input--emoji-icon-wrapper",
|
|
10545
10547
|
ref: t,
|
|
10546
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10548
|
+
children: /* @__PURE__ */ a.jsx(qt, {})
|
|
10547
10549
|
}
|
|
10548
10550
|
)
|
|
10549
10551
|
] });
|
|
10550
|
-
},
|
|
10552
|
+
}, Ut = {
|
|
10551
10553
|
images: ["image/jpeg", "image/png", "image/webp", "image/bmp"],
|
|
10552
10554
|
videos: [
|
|
10553
10555
|
"video/mp4",
|
|
@@ -10593,7 +10595,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10593
10595
|
"application/json",
|
|
10594
10596
|
"text/csv"
|
|
10595
10597
|
]
|
|
10596
|
-
},
|
|
10598
|
+
}, H1 = ({
|
|
10597
10599
|
x: u = "0",
|
|
10598
10600
|
y: D = "0",
|
|
10599
10601
|
className: f = "sc-user-input--file-icon",
|
|
@@ -10613,17 +10615,17 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10613
10615
|
" "
|
|
10614
10616
|
]
|
|
10615
10617
|
}
|
|
10616
|
-
),
|
|
10618
|
+
), Vt = () => {
|
|
10617
10619
|
const { setFile: u } = Cu(), D = (t) => {
|
|
10618
10620
|
t.target.value = "";
|
|
10619
10621
|
}, f = (t) => {
|
|
10620
10622
|
t.target.files && t.target.files[0] && u && u(t.target.files[0]);
|
|
10621
|
-
}, e =
|
|
10622
|
-
() => Object.values(
|
|
10623
|
+
}, e = C0(
|
|
10624
|
+
() => Object.values(Ut).flat().join(","),
|
|
10623
10625
|
[]
|
|
10624
10626
|
);
|
|
10625
10627
|
return /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--file-wrapper", children: /* @__PURE__ */ a.jsxs("button", { className: "sc-user-input--file-icon-wrapper", type: "button", children: [
|
|
10626
|
-
/* @__PURE__ */ a.jsx(
|
|
10628
|
+
/* @__PURE__ */ a.jsx(H1, {}),
|
|
10627
10629
|
/* @__PURE__ */ a.jsx(
|
|
10628
10630
|
"input",
|
|
10629
10631
|
{
|
|
@@ -10635,7 +10637,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10635
10637
|
}
|
|
10636
10638
|
)
|
|
10637
10639
|
] }) });
|
|
10638
|
-
},
|
|
10640
|
+
}, Ht = ({
|
|
10639
10641
|
x: u = "0",
|
|
10640
10642
|
y: D = "0",
|
|
10641
10643
|
className: f = "sc-user-input--location-icon",
|
|
@@ -10654,7 +10656,7 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10654
10656
|
...n,
|
|
10655
10657
|
children: /* @__PURE__ */ a.jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5" })
|
|
10656
10658
|
}
|
|
10657
|
-
),
|
|
10659
|
+
), Wt = () => {
|
|
10658
10660
|
const { setPayload: u, send: D } = Cu(), f = pu(), e = (t) => {
|
|
10659
10661
|
navigator.geolocation ? navigator.geolocation.getCurrentPosition(
|
|
10660
10662
|
(n) => {
|
|
@@ -10688,12 +10690,12 @@ const Pt = /* @__PURE__ */ sf(Rt), It = [
|
|
|
10688
10690
|
onClick: e,
|
|
10689
10691
|
type: "button",
|
|
10690
10692
|
className: "sc-user-input--location-icon-wrapper",
|
|
10691
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10693
|
+
children: /* @__PURE__ */ a.jsx(Ht, {})
|
|
10692
10694
|
}
|
|
10693
10695
|
) });
|
|
10694
10696
|
};
|
|
10695
|
-
var
|
|
10696
|
-
const
|
|
10697
|
+
var af = /* @__PURE__ */ ((u) => (u.web_url = "web_url", u.postback = "postback", u.nested = "nested", u))(af || {});
|
|
10698
|
+
const Yt = ({ item: u, onPostback: D }) => {
|
|
10697
10699
|
const { colors: f } = ou(), e = () => {
|
|
10698
10700
|
switch (u.type) {
|
|
10699
10701
|
case "web_url":
|
|
@@ -10714,16 +10716,16 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10714
10716
|
children: /* @__PURE__ */ a.jsx("span", { className: "sc-menu-item-text", children: u.title })
|
|
10715
10717
|
}
|
|
10716
10718
|
) });
|
|
10717
|
-
},
|
|
10719
|
+
}, Kt = () => {
|
|
10718
10720
|
const u = pu(), { send: D, setPayload: f } = Cu(), [e, t] = U({
|
|
10719
10721
|
title: "Menu",
|
|
10720
|
-
type:
|
|
10722
|
+
type: af.nested,
|
|
10721
10723
|
call_to_actions: (u == null ? void 0 : u.menu) || []
|
|
10722
10724
|
}), n = mu(null);
|
|
10723
|
-
|
|
10725
|
+
Z(() => {
|
|
10724
10726
|
t({
|
|
10725
10727
|
title: "Menu",
|
|
10726
|
-
type:
|
|
10728
|
+
type: af.nested,
|
|
10727
10729
|
call_to_actions: (u == null ? void 0 : u.menu) || []
|
|
10728
10730
|
});
|
|
10729
10731
|
}, [u]);
|
|
@@ -10751,7 +10753,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10751
10753
|
ref: n,
|
|
10752
10754
|
className: "sc-menu-elements-carousel sc-menu-always-visible",
|
|
10753
10755
|
children: e.call_to_actions && /* @__PURE__ */ a.jsx(a.Fragment, { children: e.call_to_actions.map((F, d) => /* @__PURE__ */ a.jsx("div", { className: "sc-menu-carousel-card", children: /* @__PURE__ */ a.jsx(
|
|
10754
|
-
|
|
10756
|
+
Yt,
|
|
10755
10757
|
{
|
|
10756
10758
|
item: F,
|
|
10757
10759
|
parent: e,
|
|
@@ -10761,13 +10763,13 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10761
10763
|
) }, d)) })
|
|
10762
10764
|
}
|
|
10763
10765
|
) });
|
|
10764
|
-
},
|
|
10766
|
+
}, Jt = ({
|
|
10765
10767
|
viewBox: u = "0 0 48 48",
|
|
10766
10768
|
...D
|
|
10767
10769
|
}) => /* @__PURE__ */ a.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: u, ...D, children: [
|
|
10768
10770
|
/* @__PURE__ */ a.jsx("path", { d: "M4.02 42L46 24 4.02 6 4 20l30 4-30 4z" }),
|
|
10769
10771
|
/* @__PURE__ */ a.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
10770
|
-
] }),
|
|
10772
|
+
] }), Gt = (u) => {
|
|
10771
10773
|
const { onClick: D, ...f } = u;
|
|
10772
10774
|
return /* @__PURE__ */ a.jsx(
|
|
10773
10775
|
"button",
|
|
@@ -10775,10 +10777,10 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10775
10777
|
onClick: D,
|
|
10776
10778
|
...f,
|
|
10777
10779
|
className: "sc-user-input--button-icon-wrapper",
|
|
10778
|
-
children: /* @__PURE__ */ a.jsx(
|
|
10780
|
+
children: /* @__PURE__ */ a.jsx(Jt, {})
|
|
10779
10781
|
}
|
|
10780
10782
|
);
|
|
10781
|
-
},
|
|
10783
|
+
}, Xt = () => {
|
|
10782
10784
|
const { setPayload: u, send: D, suggestions: f } = Cu(), e = pu(), { colors: t } = ou(), n = (r, s) => {
|
|
10783
10785
|
u(s), D({
|
|
10784
10786
|
event: r,
|
|
@@ -10806,7 +10808,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10806
10808
|
))
|
|
10807
10809
|
}
|
|
10808
10810
|
);
|
|
10809
|
-
},
|
|
10811
|
+
}, Zt = () => {
|
|
10810
10812
|
var J;
|
|
10811
10813
|
const { maxUploadSize: u } = Wu(), { t: D } = zu(), { colors: f } = ou(), {
|
|
10812
10814
|
suggestions: e,
|
|
@@ -10829,24 +10831,24 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10829
10831
|
showFile: T,
|
|
10830
10832
|
placeholder: _
|
|
10831
10833
|
} = pu(), B = mu(null), [I, P] = U(null), [q, g] = U(!1), [O, $] = U(!1), [hu, fu] = U(!1);
|
|
10832
|
-
|
|
10834
|
+
Z(() => {
|
|
10833
10835
|
y && p();
|
|
10834
|
-
}, [t, y]),
|
|
10836
|
+
}, [t, y]), Z(() => {
|
|
10835
10837
|
t === "" && B.current && (B.current.innerHTML = "", B.current.innerText = "");
|
|
10836
|
-
}, [t]),
|
|
10838
|
+
}, [t]), Z(() => {
|
|
10837
10839
|
P(null);
|
|
10838
10840
|
}, [r]);
|
|
10839
10841
|
const k = () => {
|
|
10840
10842
|
s(null), P(null);
|
|
10841
10843
|
}, E = () => {
|
|
10842
|
-
var
|
|
10844
|
+
var Q, tu;
|
|
10843
10845
|
if (hu) {
|
|
10844
10846
|
console.log("handleInput called but isClearing is true, ignoring");
|
|
10845
10847
|
return;
|
|
10846
10848
|
}
|
|
10847
|
-
const z = ((
|
|
10849
|
+
const z = ((Q = B.current) == null ? void 0 : Q.innerText) || ((tu = B.current) == null ? void 0 : tu.textContent) || "";
|
|
10848
10850
|
n(z);
|
|
10849
|
-
}, h = (z,
|
|
10851
|
+
}, h = (z, Q = "send-button") => {
|
|
10850
10852
|
if (O) {
|
|
10851
10853
|
console.log("Already sending, ignoring duplicate call");
|
|
10852
10854
|
return;
|
|
@@ -10856,7 +10858,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10856
10858
|
const tu = t;
|
|
10857
10859
|
F({
|
|
10858
10860
|
event: z,
|
|
10859
|
-
source:
|
|
10861
|
+
source: Q,
|
|
10860
10862
|
data: {
|
|
10861
10863
|
type: Au.text,
|
|
10862
10864
|
data: { text: tu }
|
|
@@ -10869,7 +10871,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10869
10871
|
}
|
|
10870
10872
|
r && (P(null), v.includes(r.type) || !1 ? r.size > u ? P(D("messages.file_message.unsupported_file_size")) : (F({
|
|
10871
10873
|
event: z,
|
|
10872
|
-
source:
|
|
10874
|
+
source: Q,
|
|
10873
10875
|
data: {
|
|
10874
10876
|
type: Au.file,
|
|
10875
10877
|
data: {
|
|
@@ -10885,11 +10887,11 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10885
10887
|
}, p = () => {
|
|
10886
10888
|
var z;
|
|
10887
10889
|
(z = B.current) == null || z.focus();
|
|
10888
|
-
}, R = d === iD.uploading, N =
|
|
10890
|
+
}, R = d === iD.uploading, N = X.getItem("profileLiveChat") || {}, M = X.getItem("isOffline") || (N == null ? void 0 : N.isOffline), V = ((J = N == null ? void 0 : N.channel) == null ? void 0 : J.name) === "console-channel";
|
|
10889
10891
|
return (M || !(N != null && N.id)) && !V ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
10890
|
-
j.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10892
|
+
j.length > 0 && /* @__PURE__ */ a.jsx(Kt, {}),
|
|
10891
10893
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input-wrapper", children: [
|
|
10892
|
-
e.length > 0 && /* @__PURE__ */ a.jsx(
|
|
10894
|
+
e.length > 0 && /* @__PURE__ */ a.jsx(Xt, {}),
|
|
10893
10895
|
(r || R) && /* @__PURE__ */ a.jsxs(
|
|
10894
10896
|
"div",
|
|
10895
10897
|
{
|
|
@@ -10900,7 +10902,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10900
10902
|
},
|
|
10901
10903
|
children: [
|
|
10902
10904
|
/* @__PURE__ */ a.jsx(
|
|
10903
|
-
|
|
10905
|
+
H1,
|
|
10904
10906
|
{
|
|
10905
10907
|
width: "16px",
|
|
10906
10908
|
height: "16px",
|
|
@@ -10910,7 +10912,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10910
10912
|
I && /* @__PURE__ */ a.jsx("span", { children: I }),
|
|
10911
10913
|
R && /* @__PURE__ */ a.jsx("span", { children: "Loading..." }),
|
|
10912
10914
|
r && r.name && !I && /* @__PURE__ */ a.jsx("span", { children: r.name.length > 23 ? `${r.name.substring(0, 23)}...` : r.name }),
|
|
10913
|
-
/* @__PURE__ */ a.jsx("span", { className: "delete-file-message", onClick: k, children: /* @__PURE__ */ a.jsx(
|
|
10915
|
+
/* @__PURE__ */ a.jsx("span", { className: "delete-file-message", onClick: k, children: /* @__PURE__ */ a.jsx(hf, { height: "10" }) })
|
|
10914
10916
|
]
|
|
10915
10917
|
}
|
|
10916
10918
|
),
|
|
@@ -10935,9 +10937,9 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10935
10937
|
onPaste: async (z) => {
|
|
10936
10938
|
var cu;
|
|
10937
10939
|
z.preventDefault();
|
|
10938
|
-
const
|
|
10939
|
-
if (tu &&
|
|
10940
|
-
const _u = document.createTextNode(
|
|
10940
|
+
const Q = await navigator.clipboard.readText(), tu = (cu = window.getSelection()) == null ? void 0 : cu.getRangeAt(0);
|
|
10941
|
+
if (tu && Q) {
|
|
10942
|
+
const _u = document.createTextNode(Q);
|
|
10941
10943
|
tu.deleteContents(), tu.insertNode(_u), tu.collapse(!1);
|
|
10942
10944
|
}
|
|
10943
10945
|
E();
|
|
@@ -10953,11 +10955,11 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10953
10955
|
}
|
|
10954
10956
|
),
|
|
10955
10957
|
/* @__PURE__ */ a.jsxs("div", { className: "sc-user-input--buttons", children: [
|
|
10956
|
-
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10957
|
-
m && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10958
|
-
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10958
|
+
x && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(zt, { inputRef: B, onInput: E }) }),
|
|
10959
|
+
m && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Wt, {}) }),
|
|
10960
|
+
T && /* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(Vt, {}) }),
|
|
10959
10961
|
/* @__PURE__ */ a.jsx("div", { className: "sc-user-input--button", children: /* @__PURE__ */ a.jsx(
|
|
10960
|
-
|
|
10962
|
+
Gt,
|
|
10961
10963
|
{
|
|
10962
10964
|
disabled: !t,
|
|
10963
10965
|
onClick: (z) => h(z)
|
|
@@ -10969,7 +10971,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10969
10971
|
)
|
|
10970
10972
|
] })
|
|
10971
10973
|
] });
|
|
10972
|
-
},
|
|
10974
|
+
}, Qt = ({
|
|
10973
10975
|
width: u = "24",
|
|
10974
10976
|
height: D = "24",
|
|
10975
10977
|
fill: f = "none",
|
|
@@ -10994,9 +10996,9 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
10994
10996
|
...F,
|
|
10995
10997
|
children: /* @__PURE__ */ a.jsx("path", { stroke: "#fff", strokeOpacity: "1", d: "M15 18L9 12 15 6" })
|
|
10996
10998
|
}
|
|
10997
|
-
),
|
|
10999
|
+
), u8 = () => {
|
|
10998
11000
|
const { t: u } = zu(), { colors: D } = ou(), { setWebviewUrl: f, webviewUrl: e } = Cu(), [t, n] = U(!1);
|
|
10999
|
-
|
|
11001
|
+
Z(() => {
|
|
11000
11002
|
n(!0);
|
|
11001
11003
|
}, []);
|
|
11002
11004
|
const r = () => {
|
|
@@ -11010,13 +11012,13 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11010
11012
|
className: "sc-webview--footer",
|
|
11011
11013
|
style: { background: D.header.bg, color: D.header.text },
|
|
11012
11014
|
children: /* @__PURE__ */ a.jsxs("h3", { className: "sc-webview--button", onClick: r, children: [
|
|
11013
|
-
/* @__PURE__ */ a.jsx(
|
|
11015
|
+
/* @__PURE__ */ a.jsx(Qt, { width: "16px", height: "16px" }),
|
|
11014
11016
|
u("settings.back")
|
|
11015
11017
|
] })
|
|
11016
11018
|
}
|
|
11017
11019
|
)
|
|
11018
11020
|
] });
|
|
11019
|
-
},
|
|
11021
|
+
}, D8 = ({
|
|
11020
11022
|
CustomHeader: u,
|
|
11021
11023
|
CustomAvatar: D,
|
|
11022
11024
|
PreChat: f,
|
|
@@ -11024,15 +11026,15 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11024
11026
|
}) => {
|
|
11025
11027
|
const { connectionState: t } = Cu(), { screen: n, isOpen: r } = Nu();
|
|
11026
11028
|
return /* @__PURE__ */ a.jsxs("div", { className: `sc-chat-window ${r ? "opened" : "closed"}`, children: [
|
|
11027
|
-
/* @__PURE__ */ a.jsx(
|
|
11029
|
+
/* @__PURE__ */ a.jsx($e, { children: u && /* @__PURE__ */ a.jsx(u, {}) }),
|
|
11028
11030
|
n === "prechat" && f && /* @__PURE__ */ a.jsx(f, {}),
|
|
11029
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11030
|
-
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(
|
|
11031
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Pt, { Avatar: D }),
|
|
11032
|
+
n !== "prechat" && n !== "postchat" && t !== 3 && /* @__PURE__ */ a.jsx(ze, {}),
|
|
11031
11033
|
n === "postchat" && e && /* @__PURE__ */ a.jsx(e, {}),
|
|
11032
|
-
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(
|
|
11033
|
-
n === "webview" && /* @__PURE__ */ a.jsx(
|
|
11034
|
+
["prechat", "postchat", "webview"].indexOf(n) === -1 && t === 3 && /* @__PURE__ */ a.jsx(Zt, {}),
|
|
11035
|
+
n === "webview" && /* @__PURE__ */ a.jsx(u8, {})
|
|
11034
11036
|
] });
|
|
11035
|
-
},
|
|
11037
|
+
}, W1 = ({
|
|
11036
11038
|
CustomLauncher: u,
|
|
11037
11039
|
CustomHeader: D,
|
|
11038
11040
|
CustomAvatar: f,
|
|
@@ -11043,8 +11045,8 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11043
11045
|
const n = Wu(), r = Cu(), s = Nu(), { socket: F } = Gu(), { setScreen: d } = Nu(), o = pu(), c = o.offline_mode, l = kD(c), j = (C) => {
|
|
11044
11046
|
C.preventDefault(), s.setIsOpen(!s.isOpen);
|
|
11045
11047
|
};
|
|
11046
|
-
return
|
|
11047
|
-
if (!l && !
|
|
11048
|
+
return ke(), new URLSearchParams().append("owner_id", n.ownerId), Z(() => {
|
|
11049
|
+
if (!l && !X.getItem("profileLiveChat")) {
|
|
11048
11050
|
d("prechat");
|
|
11049
11051
|
return;
|
|
11050
11052
|
}
|
|
@@ -11069,20 +11071,20 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11069
11071
|
children: [
|
|
11070
11072
|
r.newMessagesCount > 0 && !s.isOpen && /* @__PURE__ */ a.jsx("div", { className: "sc-new-messages-count", children: r.newMessagesCount }),
|
|
11071
11073
|
s.isOpen ? /* @__PURE__ */ a.jsx(
|
|
11072
|
-
|
|
11074
|
+
hf,
|
|
11073
11075
|
{
|
|
11074
11076
|
className: "sc-closed-icon",
|
|
11075
11077
|
width: "16px",
|
|
11076
11078
|
height: "16px"
|
|
11077
11079
|
}
|
|
11078
|
-
) : /* @__PURE__ */ a.jsx(
|
|
11080
|
+
) : /* @__PURE__ */ a.jsx(k1, { className: "sc-open-icon" })
|
|
11079
11081
|
]
|
|
11080
11082
|
}
|
|
11081
11083
|
)
|
|
11082
11084
|
}
|
|
11083
11085
|
),
|
|
11084
11086
|
s.isOpen && /* @__PURE__ */ a.jsx(
|
|
11085
|
-
|
|
11087
|
+
D8,
|
|
11086
11088
|
{
|
|
11087
11089
|
CustomHeader: D,
|
|
11088
11090
|
CustomAvatar: f,
|
|
@@ -11091,7 +11093,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11091
11093
|
}
|
|
11092
11094
|
)
|
|
11093
11095
|
] });
|
|
11094
|
-
},
|
|
11096
|
+
}, Y1 = ({
|
|
11095
11097
|
onFormDataSubmit: u
|
|
11096
11098
|
}) => {
|
|
11097
11099
|
const D = Wu(), { t: f } = zu(), { colors: e } = ou(), { socket: t } = Gu(), n = pu(), { setScreen: r } = Nu(), {
|
|
@@ -11100,7 +11102,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11100
11102
|
setConnectionState: d,
|
|
11101
11103
|
participants: o,
|
|
11102
11104
|
setParticipants: c
|
|
11103
|
-
} = Cu(), { formData: l, setFormData: j, renderFormField: y, errors: C, validateAll: v } =
|
|
11105
|
+
} = Cu(), { formData: l, setFormData: j, renderFormField: y, errors: C, validateAll: v } = V1({
|
|
11104
11106
|
loadFromDataUserSubs: !1,
|
|
11105
11107
|
initialData: {}
|
|
11106
11108
|
}), x = n.offline_mode, m = kD(x);
|
|
@@ -11110,8 +11112,8 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11110
11112
|
);
|
|
11111
11113
|
const T = mu(!1), _ = Mu(
|
|
11112
11114
|
async (B) => {
|
|
11113
|
-
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!
|
|
11114
|
-
Object.keys(l).length > 0 &&
|
|
11115
|
+
if (B == null || B.preventDefault(), B == null || B.stopPropagation(), !(!X.getItem("profileLiveChat") && !v(n.formSettings))) {
|
|
11116
|
+
Object.keys(l).length > 0 && X.setItem("dataUserSubs", l);
|
|
11115
11117
|
try {
|
|
11116
11118
|
d(2);
|
|
11117
11119
|
const P = new URLSearchParams();
|
|
@@ -11119,12 +11121,12 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11119
11121
|
typeof k == "string" && k.trim() && P.append(fu, k);
|
|
11120
11122
|
}), P.append("contactLateTime", (/* @__PURE__ */ new Date()).toISOString()), P.append("owner_id", D.ownerId);
|
|
11121
11123
|
const { body: q } = await t.get(`/webhook/${D.channel}/?${P.toString()}`), { messages: g, profile: O } = q;
|
|
11122
|
-
console.log("jump here 1"),
|
|
11124
|
+
console.log("jump here 1"), X.setItem("profileLiveChat", O), X.setItem("isOffline", m || !1), X.setItem(
|
|
11123
11125
|
"submitedFormLateTime",
|
|
11124
11126
|
(O == null ? void 0 : O.submitedFormLateTime) || null
|
|
11125
11127
|
), g.forEach((fu) => {
|
|
11126
|
-
const k = fu.author === O.foreignId || fu.author === O.id ?
|
|
11127
|
-
fu.direction = k, fu.direction ===
|
|
11128
|
+
const k = fu.author === O.foreignId || fu.author === O.id ? uu.sent : uu.received;
|
|
11129
|
+
fu.direction = k, fu.direction === uu.sent && (fu.read = !0, fu.delivery = !1);
|
|
11128
11130
|
}), F(g), c([
|
|
11129
11131
|
o[0],
|
|
11130
11132
|
{
|
|
@@ -11173,10 +11175,10 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11173
11175
|
t
|
|
11174
11176
|
]
|
|
11175
11177
|
);
|
|
11176
|
-
return
|
|
11178
|
+
return Z(() => {
|
|
11177
11179
|
if (!T.current) {
|
|
11178
11180
|
T.current = !0;
|
|
11179
|
-
const B =
|
|
11181
|
+
const B = X.getItem("profileLiveChat");
|
|
11180
11182
|
if (B) {
|
|
11181
11183
|
const I = B, P = {};
|
|
11182
11184
|
Object.entries(I).forEach(([q, g]) => {
|
|
@@ -11213,7 +11215,7 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11213
11215
|
) })
|
|
11214
11216
|
] })
|
|
11215
11217
|
] }) });
|
|
11216
|
-
},
|
|
11218
|
+
}, f8 = qu({}), e8 = ({
|
|
11217
11219
|
children: u
|
|
11218
11220
|
}) => {
|
|
11219
11221
|
const D = Wu(), [f, e] = U(!1), t = async () => {
|
|
@@ -11225,35 +11227,35 @@ const Ht = ({ item: u, onPostback: D }) => {
|
|
|
11225
11227
|
console.warn("Unable to get cookies ...");
|
|
11226
11228
|
}
|
|
11227
11229
|
};
|
|
11228
|
-
return
|
|
11230
|
+
return Z(() => {
|
|
11229
11231
|
f || t();
|
|
11230
|
-
}, []), f ? /* @__PURE__ */ a.jsx(
|
|
11232
|
+
}, []), f ? /* @__PURE__ */ a.jsx(f8.Provider, { value: {}, children: u }) : null;
|
|
11231
11233
|
};
|
|
11232
|
-
function
|
|
11233
|
-
return /* @__PURE__ */ a.jsx(
|
|
11234
|
+
function a8(u) {
|
|
11235
|
+
return /* @__PURE__ */ a.jsx(e1, { ...u, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(e8, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(m1, { children: /* @__PURE__ */ a.jsx(x1, { children: /* @__PURE__ */ a.jsx(y1, { children: /* @__PURE__ */ a.jsx(Qf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(w1, { children: /* @__PURE__ */ a.jsx(W1, { PreChat: Y1 }) }) }) }) }) }) }) }) }) });
|
|
11234
11236
|
}
|
|
11235
|
-
function
|
|
11237
|
+
function s8({
|
|
11236
11238
|
CustomHeader: u,
|
|
11237
11239
|
CustomAvatar: D,
|
|
11238
11240
|
config: f
|
|
11239
11241
|
}) {
|
|
11240
|
-
return /* @__PURE__ */ a.jsx(
|
|
11241
|
-
|
|
11242
|
+
return /* @__PURE__ */ a.jsx(e1, { ...f, children: /* @__PURE__ */ a.jsx(n1, { children: /* @__PURE__ */ a.jsx(B1, { children: /* @__PURE__ */ a.jsx(m1, { children: /* @__PURE__ */ a.jsx(x1, { children: /* @__PURE__ */ a.jsx(Qf, { channelName: "main-channel", children: /* @__PURE__ */ a.jsx(y1, { defaultScreen: "chat", children: /* @__PURE__ */ a.jsx(
|
|
11243
|
+
w1,
|
|
11242
11244
|
{
|
|
11243
11245
|
defaultConnectionState: tD.connected,
|
|
11244
11246
|
children: /* @__PURE__ */ a.jsx(
|
|
11245
|
-
|
|
11247
|
+
W1,
|
|
11246
11248
|
{
|
|
11247
11249
|
CustomHeader: u,
|
|
11248
11250
|
CustomAvatar: D,
|
|
11249
|
-
PreChat:
|
|
11251
|
+
PreChat: Y1
|
|
11250
11252
|
}
|
|
11251
11253
|
)
|
|
11252
11254
|
}
|
|
11253
11255
|
) }) }) }) }) }) }) });
|
|
11254
11256
|
}
|
|
11255
11257
|
export {
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11258
|
+
a8 as ChatWidget,
|
|
11259
|
+
X as LocalStorageScoped,
|
|
11260
|
+
s8 as UiChatWidget
|
|
11259
11261
|
};
|