@wexio/messenger-widget-react 1.0.16 → 1.0.17
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/{widget-react-DZJiLBUu.js → widget-react-5a308JRT.js} +2 -2
- package/dist/{widget-react-BM-kpFSq2.js → widget-react-BSMmfqW72.js} +4 -4
- package/dist/{widget-react-Cs9iXvYx.js → widget-react-BxWwGQRD.js} +2 -2
- package/dist/{widget-react-Chf-xoIT.js → widget-react-CQ4e_16G.js} +311 -294
- package/dist/{widget-react-vsD5e1Dv.js → widget-react-DDQvg3DT.js} +2 -2
- package/dist/{widget-react-CiS8hW6r2.js → widget-react-brIi2vMI2.js} +4 -4
- package/dist/widget-react.js +4 -4
- package/package.json +1 -1
|
@@ -2630,26 +2630,26 @@ function _i(e, t) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
function vi(e) {
|
|
2632
2632
|
var t = e.constructor;
|
|
2633
|
-
return t !== void 0 && (t = t[gi], t === null && (t = void 0)), t === void 0 ?
|
|
2633
|
+
return t !== void 0 && (t = t[gi], t === null && (t = void 0)), t === void 0 ? Oi : t;
|
|
2634
2634
|
}
|
|
2635
2635
|
function yi(e) {
|
|
2636
|
-
return e instanceof
|
|
2636
|
+
return e instanceof Oi;
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2639
|
-
|
|
2638
|
+
function B(e) {
|
|
2639
|
+
B.log ? B.log(e) : setTimeout(function() {
|
|
2640
2640
|
throw e;
|
|
2641
2641
|
});
|
|
2642
2642
|
}
|
|
2643
|
-
function
|
|
2643
|
+
function bi(e) {
|
|
2644
2644
|
Promise.resolve().then(function() {
|
|
2645
2645
|
try {
|
|
2646
2646
|
e();
|
|
2647
2647
|
} catch (e) {
|
|
2648
|
-
|
|
2648
|
+
B(e);
|
|
2649
2649
|
}
|
|
2650
2650
|
});
|
|
2651
2651
|
}
|
|
2652
|
-
function
|
|
2652
|
+
function xi(e) {
|
|
2653
2653
|
var t = e._cleanup;
|
|
2654
2654
|
if (t !== void 0 && (e._cleanup = void 0, t)) try {
|
|
2655
2655
|
if (typeof t == "function") t();
|
|
@@ -2658,20 +2658,20 @@ function Si(e) {
|
|
|
2658
2658
|
n && n.call(t);
|
|
2659
2659
|
}
|
|
2660
2660
|
} catch (e) {
|
|
2661
|
-
|
|
2661
|
+
B(e);
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2664
|
+
function Si(e) {
|
|
2665
2665
|
e._observer = void 0, e._queue = void 0, e._state = "closed";
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2667
|
+
function Ci(e) {
|
|
2668
2668
|
var t = e._queue;
|
|
2669
2669
|
if (t) {
|
|
2670
2670
|
e._queue = void 0, e._state = "ready";
|
|
2671
|
-
for (var n = 0; n < t.length && (
|
|
2671
|
+
for (var n = 0; n < t.length && (wi(e, t[n].type, t[n].value), e._state !== "closed"); ++n);
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function wi(e, t, n) {
|
|
2675
2675
|
e._state = "running";
|
|
2676
2676
|
var r = e._observer;
|
|
2677
2677
|
try {
|
|
@@ -2681,19 +2681,19 @@ function Ti(e, t, n) {
|
|
|
2681
2681
|
i && i.call(r, n);
|
|
2682
2682
|
break;
|
|
2683
2683
|
case "error":
|
|
2684
|
-
if (
|
|
2684
|
+
if (Si(e), i) i.call(r, n);
|
|
2685
2685
|
else throw n;
|
|
2686
2686
|
break;
|
|
2687
2687
|
case "complete":
|
|
2688
|
-
|
|
2688
|
+
Si(e), i && i.call(r);
|
|
2689
2689
|
break;
|
|
2690
2690
|
}
|
|
2691
2691
|
} catch (e) {
|
|
2692
|
-
|
|
2692
|
+
B(e);
|
|
2693
2693
|
}
|
|
2694
|
-
e._state === "closed" ?
|
|
2694
|
+
e._state === "closed" ? xi(e) : e._state === "running" && (e._state = "ready");
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2696
|
+
function Ti(e, t, n) {
|
|
2697
2697
|
if (e._state !== "closed") {
|
|
2698
2698
|
if (e._state === "buffering") {
|
|
2699
2699
|
e._queue.push({
|
|
@@ -2706,18 +2706,18 @@ function Ei(e, t, n) {
|
|
|
2706
2706
|
e._state = "buffering", e._queue = [{
|
|
2707
2707
|
type: t,
|
|
2708
2708
|
value: n
|
|
2709
|
-
}],
|
|
2710
|
-
return
|
|
2709
|
+
}], bi(function() {
|
|
2710
|
+
return Ci(e);
|
|
2711
2711
|
});
|
|
2712
2712
|
return;
|
|
2713
2713
|
}
|
|
2714
|
-
|
|
2714
|
+
wi(e, t, n);
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
|
-
var
|
|
2717
|
+
var Ei = /* @__PURE__ */ function() {
|
|
2718
2718
|
function e(e, t) {
|
|
2719
2719
|
this._cleanup = void 0, this._observer = e, this._queue = void 0, this._state = "initializing";
|
|
2720
|
-
var n = new
|
|
2720
|
+
var n = new Di(this);
|
|
2721
2721
|
try {
|
|
2722
2722
|
this._cleanup = t.call(void 0, n);
|
|
2723
2723
|
} catch (e) {
|
|
@@ -2727,31 +2727,31 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2727
2727
|
}
|
|
2728
2728
|
var t = e.prototype;
|
|
2729
2729
|
return t.unsubscribe = function() {
|
|
2730
|
-
this._state !== "closed" && (
|
|
2730
|
+
this._state !== "closed" && (Si(this), xi(this));
|
|
2731
2731
|
}, ui(e, [{
|
|
2732
2732
|
key: "closed",
|
|
2733
2733
|
get: function() {
|
|
2734
2734
|
return this._state === "closed";
|
|
2735
2735
|
}
|
|
2736
2736
|
}]), e;
|
|
2737
|
-
}(),
|
|
2737
|
+
}(), Di = /* @__PURE__ */ function() {
|
|
2738
2738
|
function e(e) {
|
|
2739
2739
|
this._subscription = e;
|
|
2740
2740
|
}
|
|
2741
2741
|
var t = e.prototype;
|
|
2742
2742
|
return t.next = function(e) {
|
|
2743
|
-
|
|
2743
|
+
Ti(this._subscription, "next", e);
|
|
2744
2744
|
}, t.error = function(e) {
|
|
2745
|
-
|
|
2745
|
+
Ti(this._subscription, "error", e);
|
|
2746
2746
|
}, t.complete = function() {
|
|
2747
|
-
|
|
2747
|
+
Ti(this._subscription, "complete");
|
|
2748
2748
|
}, ui(e, [{
|
|
2749
2749
|
key: "closed",
|
|
2750
2750
|
get: function() {
|
|
2751
2751
|
return this._subscription._state === "closed";
|
|
2752
2752
|
}
|
|
2753
2753
|
}]), e;
|
|
2754
|
-
}(),
|
|
2754
|
+
}(), Oi = /* @__PURE__ */ function() {
|
|
2755
2755
|
function e(t) {
|
|
2756
2756
|
if (!(this instanceof e)) throw TypeError("Observable cannot be called as a function");
|
|
2757
2757
|
if (typeof t != "function") throw TypeError("Observable initializer must be a function");
|
|
@@ -2763,7 +2763,7 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2763
2763
|
next: e,
|
|
2764
2764
|
error: arguments[1],
|
|
2765
2765
|
complete: arguments[2]
|
|
2766
|
-
}), new
|
|
2766
|
+
}), new Ei(e, this._subscriber);
|
|
2767
2767
|
}, t.forEach = function(e) {
|
|
2768
2768
|
var t = this;
|
|
2769
2769
|
return new Promise(function(n, r) {
|
|
@@ -2929,7 +2929,7 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2929
2929
|
});
|
|
2930
2930
|
}
|
|
2931
2931
|
if (fi("iterator") && (r = _i(t, mi), r)) return new n(function(e) {
|
|
2932
|
-
|
|
2932
|
+
bi(function() {
|
|
2933
2933
|
if (!e.closed) {
|
|
2934
2934
|
for (var n = oi(r.call(t)), i; !(i = n()).done;) {
|
|
2935
2935
|
var a = i.value;
|
|
@@ -2940,7 +2940,7 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2940
2940
|
});
|
|
2941
2941
|
});
|
|
2942
2942
|
if (Array.isArray(t)) return new n(function(e) {
|
|
2943
|
-
|
|
2943
|
+
bi(function() {
|
|
2944
2944
|
if (!e.closed) {
|
|
2945
2945
|
for (var n = 0; n < t.length; ++n) if (e.next(t[n]), e.closed) return;
|
|
2946
2946
|
e.complete();
|
|
@@ -2951,7 +2951,7 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2951
2951
|
}, e.of = function() {
|
|
2952
2952
|
var t = [...arguments];
|
|
2953
2953
|
return new (typeof this == "function" ? this : e)(function(e) {
|
|
2954
|
-
|
|
2954
|
+
bi(function() {
|
|
2955
2955
|
if (!e.closed) {
|
|
2956
2956
|
for (var n = 0; n < t.length; ++n) if (e.next(t[n]), e.closed) return;
|
|
2957
2957
|
e.complete();
|
|
@@ -2965,52 +2965,52 @@ var Di = /* @__PURE__ */ function() {
|
|
|
2965
2965
|
}
|
|
2966
2966
|
}]), e;
|
|
2967
2967
|
}();
|
|
2968
|
-
di() && Object.defineProperty(
|
|
2968
|
+
di() && Object.defineProperty(Oi, Symbol("extensions"), {
|
|
2969
2969
|
value: {
|
|
2970
2970
|
symbol: hi,
|
|
2971
|
-
hostReportError:
|
|
2971
|
+
hostReportError: B
|
|
2972
2972
|
},
|
|
2973
2973
|
configurable: !0
|
|
2974
2974
|
});
|
|
2975
2975
|
//#endregion
|
|
2976
2976
|
//#region node_modules/@apollo/client/utilities/promises/preventUnhandledRejection.js
|
|
2977
|
-
function
|
|
2977
|
+
function ki(e) {
|
|
2978
2978
|
return e.catch(function() {}), e;
|
|
2979
2979
|
}
|
|
2980
2980
|
//#endregion
|
|
2981
2981
|
//#region node_modules/@apollo/client/utilities/common/cloneDeep.js
|
|
2982
|
-
var
|
|
2983
|
-
function
|
|
2984
|
-
return
|
|
2982
|
+
var Ai = Object.prototype.toString;
|
|
2983
|
+
function ji(e) {
|
|
2984
|
+
return Mi(e);
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2987
|
-
switch (
|
|
2986
|
+
function Mi(e, t) {
|
|
2987
|
+
switch (Ai.call(e)) {
|
|
2988
2988
|
case "[object Array]":
|
|
2989
2989
|
if (t = t || /* @__PURE__ */ new Map(), t.has(e)) return t.get(e);
|
|
2990
2990
|
var n = e.slice(0);
|
|
2991
2991
|
return t.set(e, n), n.forEach(function(e, r) {
|
|
2992
|
-
n[r] =
|
|
2992
|
+
n[r] = Mi(e, t);
|
|
2993
2993
|
}), n;
|
|
2994
2994
|
case "[object Object]":
|
|
2995
2995
|
if (t = t || /* @__PURE__ */ new Map(), t.has(e)) return t.get(e);
|
|
2996
2996
|
var r = Object.create(Object.getPrototypeOf(e));
|
|
2997
2997
|
return t.set(e, r), Object.keys(e).forEach(function(n) {
|
|
2998
|
-
r[n] =
|
|
2998
|
+
r[n] = Mi(e[n], t);
|
|
2999
2999
|
}), r;
|
|
3000
3000
|
default: return e;
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
3003
|
//#endregion
|
|
3004
3004
|
//#region node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js
|
|
3005
|
-
function
|
|
3005
|
+
function Ni(e) {
|
|
3006
3006
|
var t = new Set([e]);
|
|
3007
3007
|
return t.forEach(function(e) {
|
|
3008
|
-
sn(e) &&
|
|
3008
|
+
sn(e) && Pi(e) === e && Object.getOwnPropertyNames(e).forEach(function(n) {
|
|
3009
3009
|
sn(e[n]) && t.add(e[n]);
|
|
3010
3010
|
});
|
|
3011
3011
|
}), e;
|
|
3012
3012
|
}
|
|
3013
|
-
function
|
|
3013
|
+
function Pi(e) {
|
|
3014
3014
|
if (globalThis.__DEV__ !== !1 && !Object.isFrozen(e)) try {
|
|
3015
3015
|
Object.freeze(e);
|
|
3016
3016
|
} catch (e) {
|
|
@@ -3019,12 +3019,12 @@ function Fi(e) {
|
|
|
3019
3019
|
}
|
|
3020
3020
|
return e;
|
|
3021
3021
|
}
|
|
3022
|
-
function
|
|
3023
|
-
return globalThis.__DEV__ !== !1 &&
|
|
3022
|
+
function Fi(e) {
|
|
3023
|
+
return globalThis.__DEV__ !== !1 && Ni(e), e;
|
|
3024
3024
|
}
|
|
3025
3025
|
//#endregion
|
|
3026
3026
|
//#region node_modules/@apollo/client/utilities/observables/iteration.js
|
|
3027
|
-
function
|
|
3027
|
+
function Ii(e, t, n) {
|
|
3028
3028
|
var r = [];
|
|
3029
3029
|
e.forEach(function(e) {
|
|
3030
3030
|
return e[t] && r.push(e);
|
|
@@ -3034,15 +3034,15 @@ function Li(e, t, n) {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
//#endregion
|
|
3036
3036
|
//#region node_modules/@apollo/client/utilities/observables/subclassing.js
|
|
3037
|
-
function
|
|
3037
|
+
function Li(e) {
|
|
3038
3038
|
function t(t) {
|
|
3039
|
-
Object.defineProperty(e, t, { value:
|
|
3039
|
+
Object.defineProperty(e, t, { value: Oi });
|
|
3040
3040
|
}
|
|
3041
3041
|
return tn && Symbol.species && t(Symbol.species), t("@@species"), e;
|
|
3042
3042
|
}
|
|
3043
3043
|
//#endregion
|
|
3044
3044
|
//#region node_modules/@apollo/client/utilities/common/compact.js
|
|
3045
|
-
function
|
|
3045
|
+
function Ri() {
|
|
3046
3046
|
var e = [...arguments], t = Object.create(null);
|
|
3047
3047
|
return e.forEach(function(e) {
|
|
3048
3048
|
e && Object.keys(e).forEach(function(n) {
|
|
@@ -3054,7 +3054,7 @@ function B() {
|
|
|
3054
3054
|
//#endregion
|
|
3055
3055
|
//#region node_modules/@apollo/client/utilities/common/mergeOptions.js
|
|
3056
3056
|
function zi(e, t) {
|
|
3057
|
-
return
|
|
3057
|
+
return Ri(e, t, t.variables && { variables: Ri(E(E({}, e && e.variables), t.variables)) });
|
|
3058
3058
|
}
|
|
3059
3059
|
//#endregion
|
|
3060
3060
|
//#region node_modules/@apollo/client/utilities/deprecation/index.js
|
|
@@ -3464,7 +3464,7 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3464
3464
|
globalThis.__DEV__ !== !1 && A.warn(31);
|
|
3465
3465
|
})), this.reobserve(e);
|
|
3466
3466
|
}, t.prototype.silentSetOptions = function(e) {
|
|
3467
|
-
var t =
|
|
3467
|
+
var t = Ri(this.options, e || {});
|
|
3468
3468
|
va(this.options, t);
|
|
3469
3469
|
}, t.prototype.setVariables = function(e) {
|
|
3470
3470
|
var t = this;
|
|
@@ -3537,13 +3537,13 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3537
3537
|
return n.getLastError();
|
|
3538
3538
|
});
|
|
3539
3539
|
return r && this.last && !W(t, this.last.variables) && (r = void 0), this.last = E({
|
|
3540
|
-
result: this.queryManager.assumeImmutableResults ? e :
|
|
3540
|
+
result: this.queryManager.assumeImmutableResults ? e : ji(e),
|
|
3541
3541
|
variables: t
|
|
3542
3542
|
}, r ? { error: r } : null);
|
|
3543
3543
|
}, t.prototype.reobserveAsConcast = function(e, t) {
|
|
3544
3544
|
var n = this;
|
|
3545
3545
|
this.isTornDown = !1;
|
|
3546
|
-
var r = t === G.refetch || t === G.fetchMore || t === G.poll, i = this.options.variables, a = this.options.fetchPolicy, o =
|
|
3546
|
+
var r = t === G.refetch || t === G.fetchMore || t === G.poll, i = this.options.variables, a = this.options.fetchPolicy, o = Ri(this.options, e || {}), s = r ? o : va(this.options, o), c = this.transformDocument(s.query);
|
|
3547
3547
|
this.lastQuery = c, r || (this.updatePolling(), e && e.variables && !W(e.variables, i) && s.fetchPolicy !== "standby" && (s.fetchPolicy === a || typeof s.nextFetchPolicy == "function") && (this.applyNextFetchPolicy("variables-changed", s), t === void 0 && (t = G.setVariables))), this.waitForOwnResult && (this.waitForOwnResult = Ca(s.fetchPolicy));
|
|
3548
3548
|
var l = function() {
|
|
3549
3549
|
n.concast === f && (n.waitForOwnResult = !1);
|
|
@@ -3557,7 +3557,7 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3557
3557
|
};
|
|
3558
3558
|
return !r && (p || !this.concast) && (this.concast && this.observer && this.concast.removeObserver(this.observer), this.concast = f, this.observer = m), f.addObserver(m), f;
|
|
3559
3559
|
}, t.prototype.reobserve = function(e, t) {
|
|
3560
|
-
return
|
|
3560
|
+
return ki(this.reobserveAsConcast(e, t).promise.then(this.maskResult));
|
|
3561
3561
|
}, t.prototype.resubscribeAfterError = function() {
|
|
3562
3562
|
for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
|
|
3563
3563
|
var r = this.last;
|
|
@@ -3572,7 +3572,7 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3572
3572
|
var n = this, r = V("getLastError", function() {
|
|
3573
3573
|
return n.getLastError();
|
|
3574
3574
|
}), i = this.isDifferentFromLastResult(e, t);
|
|
3575
|
-
(r || !e.partial || this.options.returnPartialData) && this.updateLastResult(e, t), (r || i) &&
|
|
3575
|
+
(r || !e.partial || this.options.returnPartialData) && this.updateLastResult(e, t), (r || i) && Ii(this.observers, "next", this.maskResult(e));
|
|
3576
3576
|
}, t.prototype.reportError = function(e, t) {
|
|
3577
3577
|
var n = this, r = E(E({}, V("getLastResult", function() {
|
|
3578
3578
|
return n.getLastResult();
|
|
@@ -3582,7 +3582,7 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3582
3582
|
networkStatus: G.error,
|
|
3583
3583
|
loading: !1
|
|
3584
3584
|
});
|
|
3585
|
-
this.updateLastResult(r, t),
|
|
3585
|
+
this.updateLastResult(r, t), Ii(this.observers, "error", this.last.error = e);
|
|
3586
3586
|
}, t.prototype.hasObservers = function() {
|
|
3587
3587
|
return this.observers.size > 0;
|
|
3588
3588
|
}, t.prototype.tearDownQuery = function() {
|
|
@@ -3618,8 +3618,8 @@ var va = Object.assign, ya = Object.hasOwnProperty, ba = function(e) {
|
|
|
3618
3618
|
}
|
|
3619
3619
|
}) : this.reobserve();
|
|
3620
3620
|
}, t.inactiveOnCreation = new Tr(), t;
|
|
3621
|
-
}(
|
|
3622
|
-
|
|
3621
|
+
}(Oi);
|
|
3622
|
+
Li(ba);
|
|
3623
3623
|
function xa(e) {
|
|
3624
3624
|
globalThis.__DEV__ !== !1 && A.error(33, e.message, e.stack);
|
|
3625
3625
|
}
|
|
@@ -3922,7 +3922,7 @@ function to(e, t, n, r) {
|
|
|
3922
3922
|
}
|
|
3923
3923
|
function no(e, t, n, r) {
|
|
3924
3924
|
var i = [], a = t.defaultOptions.watchQuery;
|
|
3925
|
-
return a && i.push(a), n.defaultOptions && i.push(n.defaultOptions), i.push(
|
|
3925
|
+
return a && i.push(a), n.defaultOptions && i.push(n.defaultOptions), i.push(Ri(e && e.options, r)), i.reduce(zi);
|
|
3926
3926
|
}
|
|
3927
3927
|
function ro(e, t, n, r, i, a, o) {
|
|
3928
3928
|
var s = t.current;
|
|
@@ -3965,12 +3965,12 @@ function lo(e, t, n) {
|
|
|
3965
3965
|
networkStatus: G.refetch
|
|
3966
3966
|
})) : e;
|
|
3967
3967
|
}
|
|
3968
|
-
var uo =
|
|
3968
|
+
var uo = Fi({
|
|
3969
3969
|
loading: !0,
|
|
3970
3970
|
data: void 0,
|
|
3971
3971
|
error: void 0,
|
|
3972
3972
|
networkStatus: G.loading
|
|
3973
|
-
}), fo =
|
|
3973
|
+
}), fo = Fi({
|
|
3974
3974
|
loading: !1,
|
|
3975
3975
|
data: void 0,
|
|
3976
3976
|
error: void 0,
|
|
@@ -4282,6 +4282,8 @@ function Ao() {
|
|
|
4282
4282
|
//#region lib/api.ts
|
|
4283
4283
|
var jo = "https://api.wexio.io", Mo = "http://localhost:3001", No = "https://local.api.wexio.io:3443";
|
|
4284
4284
|
function Po() {
|
|
4285
|
+
let e = Fo("NEXT_PUBLIC_WEXIO_API_URL");
|
|
4286
|
+
if (e) return e;
|
|
4285
4287
|
if (typeof window < "u") {
|
|
4286
4288
|
let { protocol: e, hostname: t } = window.location;
|
|
4287
4289
|
if (e === "https:" && /^local\.[a-z-]+\.wexio\.io$/i.test(t)) return No;
|
|
@@ -4293,10 +4295,25 @@ function Po() {
|
|
|
4293
4295
|
}
|
|
4294
4296
|
return jo;
|
|
4295
4297
|
}
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
+
function Fo(e) {
|
|
4299
|
+
try {
|
|
4300
|
+
if (e === "NEXT_PUBLIC_WEXIO_API_URL") {
|
|
4301
|
+
let e = process.env.NEXT_PUBLIC_WEXIO_API_URL;
|
|
4302
|
+
return typeof e == "string" ? e : "";
|
|
4303
|
+
}
|
|
4304
|
+
let t = process.env.NEXT_PUBLIC_WEXIO_DEMO_PK;
|
|
4305
|
+
return typeof t == "string" ? t : "";
|
|
4306
|
+
} catch {
|
|
4307
|
+
return "";
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
function Io() {
|
|
4311
|
+
return Fo("NEXT_PUBLIC_WEXIO_DEMO_PK");
|
|
4312
|
+
}
|
|
4313
|
+
var Lo = /* @__PURE__ */ new Map();
|
|
4314
|
+
function Ro(e, t) {
|
|
4298
4315
|
if (!e) return Promise.resolve(null);
|
|
4299
|
-
let n = `${e}|${t ?? ""}`, r =
|
|
4316
|
+
let n = `${e}|${t ?? ""}`, r = Lo.get(n);
|
|
4300
4317
|
if (r) return r;
|
|
4301
4318
|
let i = (async () => {
|
|
4302
4319
|
try {
|
|
@@ -4307,22 +4324,22 @@ function Io(e, t) {
|
|
|
4307
4324
|
headers: { "x-web-public-key": e },
|
|
4308
4325
|
credentials: "omit"
|
|
4309
4326
|
});
|
|
4310
|
-
return r.ok ?
|
|
4327
|
+
return r.ok ? Uo(await r.json()) : null;
|
|
4311
4328
|
} catch {
|
|
4312
4329
|
return null;
|
|
4313
4330
|
}
|
|
4314
4331
|
})();
|
|
4315
|
-
return
|
|
4332
|
+
return Lo.set(n, i.then((e) => (e === null && Lo.delete(n), e))), Lo.get(n) ?? i;
|
|
4316
4333
|
}
|
|
4317
|
-
var
|
|
4334
|
+
var zo = [
|
|
4318
4335
|
"NAME",
|
|
4319
4336
|
"EMAIL",
|
|
4320
4337
|
"PHONE",
|
|
4321
4338
|
"CUSTOM_TEXT"
|
|
4322
|
-
],
|
|
4323
|
-
function
|
|
4339
|
+
], Bo = ["HINT", "SYSTEM"];
|
|
4340
|
+
function Vo(e) {
|
|
4324
4341
|
if (e === null || !e) return null;
|
|
4325
|
-
let t = Array.isArray(e.commands) ? e.commands.filter((e) => typeof e == "string" && e.length > 0).slice(0, 20) : [], n = Array.isArray(e.messages) ? e.messages.filter((e) => !!e && typeof e.text == "string" && e.text.length > 0 && typeof e.kind == "string" &&
|
|
4342
|
+
let t = Array.isArray(e.commands) ? e.commands.filter((e) => typeof e == "string" && e.length > 0).slice(0, 20) : [], n = Array.isArray(e.messages) ? e.messages.filter((e) => !!e && typeof e.text == "string" && e.text.length > 0 && typeof e.kind == "string" && Bo.includes(e.kind)).map((e) => ({
|
|
4326
4343
|
kind: e.kind,
|
|
4327
4344
|
text: e.text
|
|
4328
4345
|
})).slice(0, 10) : [];
|
|
@@ -4338,9 +4355,9 @@ function zo(e) {
|
|
|
4338
4355
|
profile: Array.isArray(e.profile?.fields) && e.profile.fields.length > 0 ? { fields: e.profile.fields.filter((e) => typeof e == "string") } : null
|
|
4339
4356
|
};
|
|
4340
4357
|
}
|
|
4341
|
-
function
|
|
4358
|
+
function Ho(e) {
|
|
4342
4359
|
if (!e) return null;
|
|
4343
|
-
let t = (Array.isArray(e.fields) ? e.fields : []).filter((e) => e &&
|
|
4360
|
+
let t = (Array.isArray(e.fields) ? e.fields : []).filter((e) => e && zo.includes(e.kind)).map((e) => ({
|
|
4344
4361
|
kind: e.kind,
|
|
4345
4362
|
key: String(e.key ?? ""),
|
|
4346
4363
|
label: String(e.label ?? ""),
|
|
@@ -4351,7 +4368,7 @@ function Bo(e) {
|
|
|
4351
4368
|
fields: t
|
|
4352
4369
|
};
|
|
4353
4370
|
}
|
|
4354
|
-
function
|
|
4371
|
+
function Uo(e) {
|
|
4355
4372
|
return {
|
|
4356
4373
|
status: e.status,
|
|
4357
4374
|
defaultTab: e.defaultTab?.toLowerCase() ?? "home",
|
|
@@ -4376,7 +4393,7 @@ function Vo(e) {
|
|
|
4376
4393
|
},
|
|
4377
4394
|
theme: e.theme ?? null,
|
|
4378
4395
|
themeMode: "auto",
|
|
4379
|
-
prechatForm:
|
|
4396
|
+
prechatForm: Ho(e.prechatForm),
|
|
4380
4397
|
operatorAvatars: Array.isArray(e.operatorAvatars) ? e.operatorAvatars.filter((e) => !!e?.src).map((e) => ({
|
|
4381
4398
|
src: e.src,
|
|
4382
4399
|
alt: e.alt ?? ""
|
|
@@ -4397,17 +4414,17 @@ function Vo(e) {
|
|
|
4397
4414
|
outboundSoundId: e.sounds.outboundSoundId ?? null,
|
|
4398
4415
|
volume: typeof e.sounds.volume == "number" ? Math.max(0, Math.min(1, e.sounds.volume)) : .5
|
|
4399
4416
|
} : null,
|
|
4400
|
-
messenger:
|
|
4417
|
+
messenger: Vo(e.messenger),
|
|
4401
4418
|
botProtection: e.botProtection?.turnstile?.enabled && e.botProtection.turnstile.siteKey ? { turnstile: {
|
|
4402
4419
|
enabled: !0,
|
|
4403
4420
|
siteKey: e.botProtection.turnstile.siteKey
|
|
4404
4421
|
} } : null
|
|
4405
4422
|
};
|
|
4406
4423
|
}
|
|
4407
|
-
var
|
|
4408
|
-
function
|
|
4424
|
+
var Wo = /* @__PURE__ */ new Map();
|
|
4425
|
+
function Go(e) {
|
|
4409
4426
|
if (!e) return Promise.resolve(null);
|
|
4410
|
-
let t =
|
|
4427
|
+
let t = Wo.get(e);
|
|
4411
4428
|
if (t) return t;
|
|
4412
4429
|
let n = (async () => {
|
|
4413
4430
|
try {
|
|
@@ -4436,11 +4453,11 @@ function Uo(e) {
|
|
|
4436
4453
|
return null;
|
|
4437
4454
|
}
|
|
4438
4455
|
})();
|
|
4439
|
-
return
|
|
4456
|
+
return Wo.set(e, n.then((t) => (t === null && Wo.delete(e), t))), Wo.get(e) ?? n;
|
|
4440
4457
|
}
|
|
4441
4458
|
//#endregion
|
|
4442
4459
|
//#region dummy/authors.ts
|
|
4443
|
-
var
|
|
4460
|
+
var Ko = {
|
|
4444
4461
|
maya: {
|
|
4445
4462
|
_id: "demo-author-maya",
|
|
4446
4463
|
name: "Maya Chen",
|
|
@@ -4462,12 +4479,12 @@ var Wo = {
|
|
|
4462
4479
|
photo: { url: "https://i.pravatar.cc/96?img=68" }
|
|
4463
4480
|
}
|
|
4464
4481
|
};
|
|
4465
|
-
function
|
|
4466
|
-
return e.map((e) =>
|
|
4482
|
+
function qo(e) {
|
|
4483
|
+
return e.map((e) => Ko[e]);
|
|
4467
4484
|
}
|
|
4468
4485
|
//#endregion
|
|
4469
4486
|
//#region lib/theme-font.ts
|
|
4470
|
-
var
|
|
4487
|
+
var Jo = {
|
|
4471
4488
|
inter: "Inter:wght@400;500;600;700",
|
|
4472
4489
|
poppins: "Poppins:wght@400;500;600;700",
|
|
4473
4490
|
"dm sans": "DM+Sans:wght@400;500;600;700",
|
|
@@ -4479,11 +4496,11 @@ var Ko = {
|
|
|
4479
4496
|
raleway: "Raleway:wght@400;500;600;700",
|
|
4480
4497
|
"work sans": "Work+Sans:wght@400;500;600;700"
|
|
4481
4498
|
};
|
|
4482
|
-
function
|
|
4499
|
+
function Yo(e) {
|
|
4483
4500
|
if (!e || typeof document > "u") return;
|
|
4484
4501
|
let t = e.split(",")[0]?.trim().replace(/^['"]|['"]$/g, "");
|
|
4485
4502
|
if (!t) return;
|
|
4486
|
-
let n =
|
|
4503
|
+
let n = Jo[t.toLowerCase()];
|
|
4487
4504
|
if (!n) return;
|
|
4488
4505
|
let r = `wexio-font-${t.toLowerCase().replace(/\s+/g, "-")}`;
|
|
4489
4506
|
if (document.getElementById(r)) return;
|
|
@@ -4492,7 +4509,7 @@ function qo(e) {
|
|
|
4492
4509
|
}
|
|
4493
4510
|
//#endregion
|
|
4494
4511
|
//#region lib/widget-config.ts
|
|
4495
|
-
var
|
|
4512
|
+
var Xo = {
|
|
4496
4513
|
status: "active",
|
|
4497
4514
|
defaultTab: "home",
|
|
4498
4515
|
localeStrategy: "AUTO",
|
|
@@ -4563,7 +4580,7 @@ var Jo = {
|
|
|
4563
4580
|
profile: null
|
|
4564
4581
|
},
|
|
4565
4582
|
botProtection: null
|
|
4566
|
-
},
|
|
4583
|
+
}, Zo = [
|
|
4567
4584
|
{ kind: "ask-question" },
|
|
4568
4585
|
{ kind: "recent-message" },
|
|
4569
4586
|
{ kind: "featured-article" },
|
|
@@ -4616,20 +4633,20 @@ var Jo = {
|
|
|
4616
4633
|
];
|
|
4617
4634
|
//#endregion
|
|
4618
4635
|
//#region lib/use-widget-config.ts
|
|
4619
|
-
function
|
|
4636
|
+
function Qo() {
|
|
4620
4637
|
let e = Ao(), t = p(), [n, r] = C({
|
|
4621
4638
|
mode: "demo",
|
|
4622
|
-
config:
|
|
4639
|
+
config: Xo,
|
|
4623
4640
|
isDummy: !0,
|
|
4624
4641
|
isLoading: !0,
|
|
4625
4642
|
error: null
|
|
4626
4643
|
}), [i, a] = C(null);
|
|
4627
4644
|
b(() => {
|
|
4628
|
-
let n = new URL(window.location.href), i = n.searchParams.get("pk") ?? void 0, o = n.searchParams.get("mode"),
|
|
4645
|
+
let n = new URL(window.location.href), i = n.searchParams.get("pk") ?? void 0, o = Io() || void 0, s = n.searchParams.get("mode"), c = e.publicKeyOverride ?? i ?? o, l = e.modeOverride ?? (c ? "production" : s === "preview" ? "preview" : "demo"), u = !1;
|
|
4629
4646
|
if ((async () => {
|
|
4630
4647
|
if (e.configBase) {
|
|
4631
|
-
let t =
|
|
4632
|
-
if (
|
|
4648
|
+
let t = c ? await Go(c) : null;
|
|
4649
|
+
if (u) return;
|
|
4633
4650
|
let n = e.configBase.security, i = t?.security, a = {
|
|
4634
4651
|
requireAuth: n?.requireAuth ?? i?.requireAuth ?? !1,
|
|
4635
4652
|
google: {
|
|
@@ -4637,11 +4654,11 @@ function Xo() {
|
|
|
4637
4654
|
clientId: i?.google?.clientId ?? null
|
|
4638
4655
|
},
|
|
4639
4656
|
passkey: { enabled: n?.passkey?.enabled ?? i?.passkey?.enabled ?? !1 }
|
|
4640
|
-
}, { security: o, ...
|
|
4657
|
+
}, { security: o, ...s } = e.configBase;
|
|
4641
4658
|
r({
|
|
4642
|
-
mode:
|
|
4659
|
+
mode: l,
|
|
4643
4660
|
config: {
|
|
4644
|
-
...
|
|
4661
|
+
...s,
|
|
4645
4662
|
security: a,
|
|
4646
4663
|
branding: t?.branding ?? null,
|
|
4647
4664
|
status: t?.status ?? "active"
|
|
@@ -4654,20 +4671,20 @@ function Xo() {
|
|
|
4654
4671
|
}
|
|
4655
4672
|
if (e.forceDummyData !== void 0) {
|
|
4656
4673
|
r({
|
|
4657
|
-
mode:
|
|
4658
|
-
config:
|
|
4674
|
+
mode: l,
|
|
4675
|
+
config: Xo,
|
|
4659
4676
|
isDummy: e.forceDummyData,
|
|
4660
4677
|
isLoading: !1,
|
|
4661
4678
|
error: null
|
|
4662
4679
|
});
|
|
4663
4680
|
return;
|
|
4664
4681
|
}
|
|
4665
|
-
if (
|
|
4666
|
-
let e = await
|
|
4667
|
-
if (
|
|
4682
|
+
if (c) {
|
|
4683
|
+
let e = await Ro(c, t);
|
|
4684
|
+
if (u) return;
|
|
4668
4685
|
if (e) {
|
|
4669
4686
|
r({
|
|
4670
|
-
mode:
|
|
4687
|
+
mode: l,
|
|
4671
4688
|
config: e,
|
|
4672
4689
|
isDummy: !1,
|
|
4673
4690
|
isLoading: !1,
|
|
@@ -4676,8 +4693,8 @@ function Xo() {
|
|
|
4676
4693
|
return;
|
|
4677
4694
|
}
|
|
4678
4695
|
r({
|
|
4679
|
-
mode:
|
|
4680
|
-
config:
|
|
4696
|
+
mode: l,
|
|
4697
|
+
config: Xo,
|
|
4681
4698
|
isDummy: !0,
|
|
4682
4699
|
isLoading: !1,
|
|
4683
4700
|
error: "publicKeyInvalid"
|
|
@@ -4685,22 +4702,22 @@ function Xo() {
|
|
|
4685
4702
|
return;
|
|
4686
4703
|
}
|
|
4687
4704
|
r({
|
|
4688
|
-
mode:
|
|
4689
|
-
config:
|
|
4705
|
+
mode: l,
|
|
4706
|
+
config: Xo,
|
|
4690
4707
|
isDummy: !0,
|
|
4691
4708
|
isLoading: !1,
|
|
4692
4709
|
error: null
|
|
4693
4710
|
});
|
|
4694
|
-
})(),
|
|
4695
|
-
|
|
4711
|
+
})(), l !== "preview") return () => {
|
|
4712
|
+
u = !0;
|
|
4696
4713
|
};
|
|
4697
|
-
let
|
|
4714
|
+
let d = (e) => {
|
|
4698
4715
|
if (!e.data || typeof e.data != "object" || e.data.type !== "wexio:preview-config:v1") return;
|
|
4699
4716
|
let t = e.data.config;
|
|
4700
|
-
t && a((e) =>
|
|
4717
|
+
t && a((e) => $o(e ?? {}, t));
|
|
4701
4718
|
};
|
|
4702
|
-
return window.addEventListener("message",
|
|
4703
|
-
|
|
4719
|
+
return window.addEventListener("message", d), () => {
|
|
4720
|
+
u = !0, window.removeEventListener("message", d);
|
|
4704
4721
|
};
|
|
4705
4722
|
}, [
|
|
4706
4723
|
e.publicKeyOverride,
|
|
@@ -4711,9 +4728,9 @@ function Xo() {
|
|
|
4711
4728
|
]);
|
|
4712
4729
|
let o = n.isDummy || e.forceDummyData === !0, s = S(() => {
|
|
4713
4730
|
let t = n.config;
|
|
4714
|
-
return i && (t =
|
|
4731
|
+
return i && (t = $o(t, i)), e.configOverride && (t = $o(t, e.configOverride)), o && t.operatorAvatars.length === 0 && (t = {
|
|
4715
4732
|
...t,
|
|
4716
|
-
operatorAvatars:
|
|
4733
|
+
operatorAvatars: Xo.operatorAvatars
|
|
4717
4734
|
}), t;
|
|
4718
4735
|
}, [
|
|
4719
4736
|
n.config,
|
|
@@ -4722,9 +4739,9 @@ function Xo() {
|
|
|
4722
4739
|
o
|
|
4723
4740
|
]), c = e.styleRoot;
|
|
4724
4741
|
ne(() => {
|
|
4725
|
-
s.theme &&
|
|
4742
|
+
s.theme && os(s.theme, c ?? document);
|
|
4726
4743
|
}, [s.theme, c]), b(() => {
|
|
4727
|
-
s.theme &&
|
|
4744
|
+
s.theme && Yo(s.theme.fontFamily);
|
|
4728
4745
|
}, [s.theme]);
|
|
4729
4746
|
let l = e.onLocaleStrategy;
|
|
4730
4747
|
return b(() => {
|
|
@@ -4742,7 +4759,7 @@ function Xo() {
|
|
|
4742
4759
|
error: n.error
|
|
4743
4760
|
};
|
|
4744
4761
|
}
|
|
4745
|
-
function
|
|
4762
|
+
function $o(e, t) {
|
|
4746
4763
|
return {
|
|
4747
4764
|
...e,
|
|
4748
4765
|
...t,
|
|
@@ -4757,7 +4774,7 @@ function Zo(e, t) {
|
|
|
4757
4774
|
theme: t.theme === void 0 ? e.theme : t.theme
|
|
4758
4775
|
};
|
|
4759
4776
|
}
|
|
4760
|
-
var
|
|
4777
|
+
var es = {
|
|
4761
4778
|
background: "--wx-bg",
|
|
4762
4779
|
surface: "--wx-bg-elevated",
|
|
4763
4780
|
surfaceElevated: "--wx-bg-elevated-2",
|
|
@@ -4773,30 +4790,30 @@ var Qo = {
|
|
|
4773
4790
|
launcherForeground: "--wx-launcher-fg",
|
|
4774
4791
|
success: "--wx-success",
|
|
4775
4792
|
danger: "--wx-danger"
|
|
4776
|
-
},
|
|
4793
|
+
}, ts = {
|
|
4777
4794
|
sm: "--wx-radius-sm",
|
|
4778
4795
|
md: "--wx-radius",
|
|
4779
4796
|
lg: "--wx-radius-lg",
|
|
4780
4797
|
xl: "--wx-radius-xl"
|
|
4781
4798
|
};
|
|
4782
|
-
function
|
|
4783
|
-
return e ? Object.entries(e).filter(([, e]) => typeof e == "string" && e.length > 0).map(([e, t]) => `${
|
|
4784
|
-
}
|
|
4785
|
-
function ts(e) {
|
|
4786
|
-
return e ? Object.entries(e).filter(([, e]) => typeof e == "number" && Number.isFinite(e)).map(([e, t]) => `${$o[e]}: ${t}px;`).join(" ") : "";
|
|
4799
|
+
function ns(e) {
|
|
4800
|
+
return e ? Object.entries(e).filter(([, e]) => typeof e == "string" && e.length > 0).map(([e, t]) => `${es[e]}: ${t};`).join(" ") : "";
|
|
4787
4801
|
}
|
|
4788
|
-
var ns = /* @__PURE__ */ new WeakMap();
|
|
4789
4802
|
function rs(e) {
|
|
4790
|
-
|
|
4803
|
+
return e ? Object.entries(e).filter(([, e]) => typeof e == "number" && Number.isFinite(e)).map(([e, t]) => `${ts[e]}: ${t}px;`).join(" ") : "";
|
|
4804
|
+
}
|
|
4805
|
+
var is = /* @__PURE__ */ new WeakMap();
|
|
4806
|
+
function as(e) {
|
|
4807
|
+
let t = [rs(e.radii), typeof e.fontFamily == "string" && e.fontFamily.trim().length > 0 ? `--wx-font: ${e.fontFamily};` : ""].filter(Boolean).join(" "), n = [ns(e.light), t].filter(Boolean).join(" "), r = [ns(e.dark), t].filter(Boolean).join(" "), i = [];
|
|
4791
4808
|
return n && i.push(`:root, :host { ${n} }`), r && i.push(`[data-theme="dark"] { ${r} }`), i.join(" ");
|
|
4792
4809
|
}
|
|
4793
|
-
function
|
|
4794
|
-
let n =
|
|
4810
|
+
function os(e, t) {
|
|
4811
|
+
let n = as(e);
|
|
4795
4812
|
if (!(t instanceof Document)) {
|
|
4796
4813
|
let e = t;
|
|
4797
4814
|
if (typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype) {
|
|
4798
|
-
let t =
|
|
4799
|
-
t || (t = new CSSStyleSheet(),
|
|
4815
|
+
let t = is.get(e);
|
|
4816
|
+
t || (t = new CSSStyleSheet(), is.set(e, t), e.adoptedStyleSheets = [...e.adoptedStyleSheets, t]), t.replaceSync(n);
|
|
4800
4817
|
return;
|
|
4801
4818
|
}
|
|
4802
4819
|
let r = e.querySelector("#wexio-theme-vars");
|
|
@@ -4806,19 +4823,19 @@ function is(e, t) {
|
|
|
4806
4823
|
let r = t.getElementById("wexio-theme-vars");
|
|
4807
4824
|
r || (r = document.createElement("style"), r.id = "wexio-theme-vars", t.head.appendChild(r)), r.textContent = n;
|
|
4808
4825
|
}
|
|
4809
|
-
var
|
|
4826
|
+
var ss = m("check", [["path", {
|
|
4810
4827
|
d: "M20 6 9 17l-5-5",
|
|
4811
4828
|
key: "1gmf2c"
|
|
4812
|
-
}]]),
|
|
4829
|
+
}]]), cs = m("chevron-down", [["path", {
|
|
4813
4830
|
d: "m6 9 6 6 6-6",
|
|
4814
4831
|
key: "qrunsl"
|
|
4815
|
-
}]]),
|
|
4832
|
+
}]]), ls = m("chevron-left", [["path", {
|
|
4816
4833
|
d: "m15 18-6-6 6-6",
|
|
4817
4834
|
key: "1wnfg3"
|
|
4818
|
-
}]]),
|
|
4835
|
+
}]]), us = m("chevron-right", [["path", {
|
|
4819
4836
|
d: "m9 18 6-6-6-6",
|
|
4820
4837
|
key: "mthhwq"
|
|
4821
|
-
}]]),
|
|
4838
|
+
}]]), ds = m("x", [["path", {
|
|
4822
4839
|
d: "M18 6 6 18",
|
|
4823
4840
|
key: "1bl5f8"
|
|
4824
4841
|
}], ["path", {
|
|
@@ -4827,77 +4844,77 @@ var as = m("check", [["path", {
|
|
|
4827
4844
|
}]]);
|
|
4828
4845
|
//#endregion
|
|
4829
4846
|
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
4830
|
-
function
|
|
4847
|
+
function fs(e, t) {
|
|
4831
4848
|
if (typeof e == "function") return e(t);
|
|
4832
4849
|
e != null && (e.current = t);
|
|
4833
4850
|
}
|
|
4834
|
-
function
|
|
4851
|
+
function ps(...e) {
|
|
4835
4852
|
return (t) => {
|
|
4836
4853
|
let n = !1, r = e.map((e) => {
|
|
4837
|
-
let r =
|
|
4854
|
+
let r = fs(e, t);
|
|
4838
4855
|
return !n && typeof r == "function" && (n = !0), r;
|
|
4839
4856
|
});
|
|
4840
4857
|
if (n) return () => {
|
|
4841
4858
|
for (let t = 0; t < r.length; t++) {
|
|
4842
4859
|
let n = r[t];
|
|
4843
|
-
typeof n == "function" ? n() :
|
|
4860
|
+
typeof n == "function" ? n() : fs(e[t], null);
|
|
4844
4861
|
}
|
|
4845
4862
|
};
|
|
4846
4863
|
};
|
|
4847
4864
|
}
|
|
4848
4865
|
function Y(...e) {
|
|
4849
|
-
return h.useCallback(
|
|
4866
|
+
return h.useCallback(ps(...e), e);
|
|
4850
4867
|
}
|
|
4851
4868
|
//#endregion
|
|
4852
4869
|
//#region components/ui/card.tsx
|
|
4853
|
-
var
|
|
4870
|
+
var ms = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
4854
4871
|
ref: n,
|
|
4855
4872
|
className: f("rounded-wx-lg bg-wx-bg-elevated text-wx-fg", e),
|
|
4856
4873
|
...t
|
|
4857
4874
|
}));
|
|
4858
|
-
|
|
4859
|
-
var
|
|
4875
|
+
ms.displayName = "Card";
|
|
4876
|
+
var hs = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
4860
4877
|
ref: n,
|
|
4861
4878
|
className: f("rounded-wx bg-wx-bg-elevated-2 text-wx-fg", e),
|
|
4862
4879
|
...t
|
|
4863
4880
|
}));
|
|
4864
|
-
|
|
4865
|
-
var
|
|
4881
|
+
hs.displayName = "CardNested";
|
|
4882
|
+
var gs = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
4866
4883
|
ref: n,
|
|
4867
4884
|
className: f("flex flex-col gap-1 px-5 pt-5", e),
|
|
4868
4885
|
...t
|
|
4869
4886
|
}));
|
|
4870
|
-
|
|
4871
|
-
var
|
|
4887
|
+
gs.displayName = "CardHeader";
|
|
4888
|
+
var _s = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("p", {
|
|
4872
4889
|
ref: n,
|
|
4873
4890
|
className: f("text-base font-semibold text-wx-fg", e),
|
|
4874
4891
|
...t
|
|
4875
4892
|
}));
|
|
4876
|
-
|
|
4877
|
-
var
|
|
4893
|
+
_s.displayName = "CardTitle";
|
|
4894
|
+
var vs = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("p", {
|
|
4878
4895
|
ref: n,
|
|
4879
4896
|
className: f("text-sm text-wx-fg-muted", e),
|
|
4880
4897
|
...t
|
|
4881
4898
|
}));
|
|
4882
|
-
|
|
4883
|
-
var
|
|
4899
|
+
vs.displayName = "CardSubtitle";
|
|
4900
|
+
var ys = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
4884
4901
|
ref: n,
|
|
4885
4902
|
className: f("px-5 py-4", e),
|
|
4886
4903
|
...t
|
|
4887
4904
|
}));
|
|
4888
|
-
|
|
4889
|
-
var
|
|
4905
|
+
ys.displayName = "CardBody";
|
|
4906
|
+
var bs = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w("div", {
|
|
4890
4907
|
ref: n,
|
|
4891
4908
|
className: f("flex items-center justify-between px-5 py-3 border-t border-wx-border", e),
|
|
4892
4909
|
...t
|
|
4893
4910
|
}));
|
|
4894
|
-
|
|
4911
|
+
bs.displayName = "CardFooter";
|
|
4895
4912
|
//#endregion
|
|
4896
4913
|
//#region node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
4897
4914
|
/* @__NO_SIDE_EFFECTS__ */
|
|
4898
|
-
function
|
|
4899
|
-
let t = /* @__PURE__ */
|
|
4900
|
-
let { children: r, ...i } = e, a = h.Children.toArray(r), o = a.find(
|
|
4915
|
+
function xs(e) {
|
|
4916
|
+
let t = /* @__PURE__ */ Ss(e), n = h.forwardRef((e, n) => {
|
|
4917
|
+
let { children: r, ...i } = e, a = h.Children.toArray(r), o = a.find(ws);
|
|
4901
4918
|
if (o) {
|
|
4902
4919
|
let e = o.props.children, r = a.map((t) => t === o ? h.Children.count(e) > 1 ? h.Children.only(null) : h.isValidElement(e) ? e.props.children : null : t);
|
|
4903
4920
|
return /* @__PURE__ */ w(t, {
|
|
@@ -4915,22 +4932,22 @@ function ys(e) {
|
|
|
4915
4932
|
return n.displayName = `${e}.Slot`, n;
|
|
4916
4933
|
}
|
|
4917
4934
|
/* @__NO_SIDE_EFFECTS__ */
|
|
4918
|
-
function
|
|
4935
|
+
function Ss(e) {
|
|
4919
4936
|
let t = h.forwardRef((e, t) => {
|
|
4920
4937
|
let { children: n, ...r } = e;
|
|
4921
4938
|
if (h.isValidElement(n)) {
|
|
4922
|
-
let e =
|
|
4923
|
-
return n.type !== h.Fragment && (i.ref = t ?
|
|
4939
|
+
let e = Es(n), i = Ts(r, n.props);
|
|
4940
|
+
return n.type !== h.Fragment && (i.ref = t ? ps(t, e) : e), h.cloneElement(n, i);
|
|
4924
4941
|
}
|
|
4925
4942
|
return h.Children.count(n) > 1 ? h.Children.only(null) : null;
|
|
4926
4943
|
});
|
|
4927
4944
|
return t.displayName = `${e}.SlotClone`, t;
|
|
4928
4945
|
}
|
|
4929
|
-
var
|
|
4930
|
-
function
|
|
4931
|
-
return h.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
4946
|
+
var Cs = Symbol("radix.slottable");
|
|
4947
|
+
function ws(e) {
|
|
4948
|
+
return h.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Cs;
|
|
4932
4949
|
}
|
|
4933
|
-
function
|
|
4950
|
+
function Ts(e, t) {
|
|
4934
4951
|
let n = { ...t };
|
|
4935
4952
|
for (let r in t) {
|
|
4936
4953
|
let i = e[r], a = t[r];
|
|
@@ -4947,13 +4964,13 @@ function Cs(e, t) {
|
|
|
4947
4964
|
...n
|
|
4948
4965
|
};
|
|
4949
4966
|
}
|
|
4950
|
-
function
|
|
4967
|
+
function Es(e) {
|
|
4951
4968
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
4952
4969
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
4953
4970
|
}
|
|
4954
4971
|
//#endregion
|
|
4955
4972
|
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
4956
|
-
var
|
|
4973
|
+
var Ds = [
|
|
4957
4974
|
"a",
|
|
4958
4975
|
"button",
|
|
4959
4976
|
"div",
|
|
@@ -4972,7 +4989,7 @@ var Ts = [
|
|
|
4972
4989
|
"svg",
|
|
4973
4990
|
"ul"
|
|
4974
4991
|
].reduce((e, t) => {
|
|
4975
|
-
let n = /* @__PURE__ */
|
|
4992
|
+
let n = /* @__PURE__ */ xs(`Primitive.${t}`), r = h.forwardRef((e, r) => {
|
|
4976
4993
|
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
4977
4994
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ w(o, {
|
|
4978
4995
|
...a,
|
|
@@ -4984,24 +5001,24 @@ var Ts = [
|
|
|
4984
5001
|
[t]: r
|
|
4985
5002
|
};
|
|
4986
5003
|
}, {});
|
|
4987
|
-
function
|
|
5004
|
+
function Os(e, t) {
|
|
4988
5005
|
e && ae.flushSync(() => e.dispatchEvent(t));
|
|
4989
5006
|
}
|
|
4990
5007
|
//#endregion
|
|
4991
5008
|
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
4992
|
-
var
|
|
5009
|
+
var ks = globalThis?.document ? h.useLayoutEffect : () => {};
|
|
4993
5010
|
//#endregion
|
|
4994
5011
|
//#region node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
4995
|
-
function
|
|
5012
|
+
function As(e, t) {
|
|
4996
5013
|
return h.useReducer((e, n) => t[e][n] ?? e, e);
|
|
4997
5014
|
}
|
|
4998
|
-
var
|
|
4999
|
-
let { present: t, children: n } = e, r =
|
|
5015
|
+
var js = (e) => {
|
|
5016
|
+
let { present: t, children: n } = e, r = Ms(t), i = typeof n == "function" ? n({ present: r.isPresent }) : h.Children.only(n), a = Y(r.ref, Ps(i));
|
|
5000
5017
|
return typeof n == "function" || r.isPresent ? h.cloneElement(i, { ref: a }) : null;
|
|
5001
5018
|
};
|
|
5002
|
-
|
|
5003
|
-
function
|
|
5004
|
-
let [t, n] = h.useState(), r = h.useRef(null), i = h.useRef(e), a = h.useRef("none"), [o, s] =
|
|
5019
|
+
js.displayName = "Presence";
|
|
5020
|
+
function Ms(e) {
|
|
5021
|
+
let [t, n] = h.useState(), r = h.useRef(null), i = h.useRef(e), a = h.useRef("none"), [o, s] = As(e ? "mounted" : "unmounted", {
|
|
5005
5022
|
mounted: {
|
|
5006
5023
|
UNMOUNT: "unmounted",
|
|
5007
5024
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -5013,18 +5030,18 @@ function As(e) {
|
|
|
5013
5030
|
unmounted: { MOUNT: "mounted" }
|
|
5014
5031
|
});
|
|
5015
5032
|
return h.useEffect(() => {
|
|
5016
|
-
let e =
|
|
5033
|
+
let e = Ns(r.current);
|
|
5017
5034
|
a.current = o === "mounted" ? e : "none";
|
|
5018
|
-
}, [o]),
|
|
5035
|
+
}, [o]), ks(() => {
|
|
5019
5036
|
let t = r.current, n = i.current;
|
|
5020
5037
|
if (n !== e) {
|
|
5021
|
-
let r = a.current, o =
|
|
5038
|
+
let r = a.current, o = Ns(t);
|
|
5022
5039
|
e ? s("MOUNT") : o === "none" || t?.display === "none" ? s("UNMOUNT") : s(n && r !== o ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
5023
5040
|
}
|
|
5024
|
-
}, [e, s]),
|
|
5041
|
+
}, [e, s]), ks(() => {
|
|
5025
5042
|
if (t) {
|
|
5026
5043
|
let e, n = t.ownerDocument.defaultView ?? window, o = (a) => {
|
|
5027
|
-
let o =
|
|
5044
|
+
let o = Ns(r.current).includes(CSS.escape(a.animationName));
|
|
5028
5045
|
if (a.target === t && o && (s("ANIMATION_END"), !i.current)) {
|
|
5029
5046
|
let r = t.style.animationFillMode;
|
|
5030
5047
|
t.style.animationFillMode = "forwards", e = n.setTimeout(() => {
|
|
@@ -5032,7 +5049,7 @@ function As(e) {
|
|
|
5032
5049
|
});
|
|
5033
5050
|
}
|
|
5034
5051
|
}, c = (e) => {
|
|
5035
|
-
e.target === t && (a.current =
|
|
5052
|
+
e.target === t && (a.current = Ns(r.current));
|
|
5036
5053
|
};
|
|
5037
5054
|
return t.addEventListener("animationstart", c), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
|
|
5038
5055
|
n.clearTimeout(e), t.removeEventListener("animationstart", c), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
|
|
@@ -5045,16 +5062,16 @@ function As(e) {
|
|
|
5045
5062
|
}, [])
|
|
5046
5063
|
};
|
|
5047
5064
|
}
|
|
5048
|
-
function
|
|
5065
|
+
function Ns(e) {
|
|
5049
5066
|
return e?.animationName || "none";
|
|
5050
5067
|
}
|
|
5051
|
-
function
|
|
5068
|
+
function Ps(e) {
|
|
5052
5069
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
5053
5070
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
5054
5071
|
}
|
|
5055
5072
|
//#endregion
|
|
5056
5073
|
//#region node_modules/@radix-ui/react-context/dist/index.mjs
|
|
5057
|
-
function
|
|
5074
|
+
function Fs(e, t = []) {
|
|
5058
5075
|
let n = [];
|
|
5059
5076
|
function r(t, r) {
|
|
5060
5077
|
let i = h.createContext(r), a = n.length;
|
|
@@ -5085,9 +5102,9 @@ function Ns(e, t = []) {
|
|
|
5085
5102
|
} }), [n, r]);
|
|
5086
5103
|
};
|
|
5087
5104
|
};
|
|
5088
|
-
return i.scopeName = e, [r,
|
|
5105
|
+
return i.scopeName = e, [r, Is(i, ...t)];
|
|
5089
5106
|
}
|
|
5090
|
-
function
|
|
5107
|
+
function Is(...e) {
|
|
5091
5108
|
let t = e[0];
|
|
5092
5109
|
if (e.length === 1) return t;
|
|
5093
5110
|
let n = () => {
|
|
@@ -5118,14 +5135,14 @@ function X(e) {
|
|
|
5118
5135
|
}
|
|
5119
5136
|
//#endregion
|
|
5120
5137
|
//#region node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
5121
|
-
var
|
|
5122
|
-
function
|
|
5123
|
-
let t = h.useContext(
|
|
5138
|
+
var Ls = h.createContext(void 0);
|
|
5139
|
+
function Rs(e) {
|
|
5140
|
+
let t = h.useContext(Ls);
|
|
5124
5141
|
return e || t || "ltr";
|
|
5125
5142
|
}
|
|
5126
5143
|
//#endregion
|
|
5127
5144
|
//#region node_modules/@radix-ui/number/dist/index.mjs
|
|
5128
|
-
function
|
|
5145
|
+
function zs(e, [t, n]) {
|
|
5129
5146
|
return Math.min(n, Math.max(t, e));
|
|
5130
5147
|
}
|
|
5131
5148
|
typeof window < "u" && window.document && window.document.createElement;
|
|
@@ -5136,12 +5153,12 @@ function Z(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
5136
5153
|
}
|
|
5137
5154
|
//#endregion
|
|
5138
5155
|
//#region node_modules/@radix-ui/react-scroll-area/dist/index.mjs
|
|
5139
|
-
function
|
|
5156
|
+
function Bs(e, t) {
|
|
5140
5157
|
return h.useReducer((e, n) => t[e][n] ?? e, e);
|
|
5141
5158
|
}
|
|
5142
|
-
var
|
|
5143
|
-
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: a = 600, ...o } = e, [s, c] = h.useState(null), [l, u] = h.useState(null), [d, f] = h.useState(null), [p, m] = h.useState(null), [g, _] = h.useState(null), [v, y] = h.useState(0), [ee, b] = h.useState(0), [x, te] = h.useState(!1), [ne, S] = h.useState(!1), re = Y(t, (e) => c(e)), C =
|
|
5144
|
-
return /* @__PURE__ */ w(
|
|
5159
|
+
var Vs = "ScrollArea", [Hs, Us] = Fs(Vs), [Ws, Q] = Hs(Vs), Gs = h.forwardRef((e, t) => {
|
|
5160
|
+
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: a = 600, ...o } = e, [s, c] = h.useState(null), [l, u] = h.useState(null), [d, f] = h.useState(null), [p, m] = h.useState(null), [g, _] = h.useState(null), [v, y] = h.useState(0), [ee, b] = h.useState(0), [x, te] = h.useState(!1), [ne, S] = h.useState(!1), re = Y(t, (e) => c(e)), C = Rs(i);
|
|
5161
|
+
return /* @__PURE__ */ w(Ws, {
|
|
5145
5162
|
scope: n,
|
|
5146
5163
|
type: r,
|
|
5147
5164
|
dir: C,
|
|
@@ -5161,7 +5178,7 @@ var zs = "ScrollArea", [Bs, Vs] = Ns(zs), [Hs, Q] = Bs(zs), Us = h.forwardRef((e
|
|
|
5161
5178
|
onScrollbarYEnabledChange: S,
|
|
5162
5179
|
onCornerWidthChange: y,
|
|
5163
5180
|
onCornerHeightChange: b,
|
|
5164
|
-
children: /* @__PURE__ */ w(
|
|
5181
|
+
children: /* @__PURE__ */ w(Ds.div, {
|
|
5165
5182
|
dir: C,
|
|
5166
5183
|
...o,
|
|
5167
5184
|
ref: re,
|
|
@@ -5174,13 +5191,13 @@ var zs = "ScrollArea", [Bs, Vs] = Ns(zs), [Hs, Q] = Bs(zs), Us = h.forwardRef((e
|
|
|
5174
5191
|
})
|
|
5175
5192
|
});
|
|
5176
5193
|
});
|
|
5177
|
-
|
|
5178
|
-
var
|
|
5179
|
-
let { __scopeScrollArea: n, children: r, nonce: i, ...a } = e, o = Q(
|
|
5194
|
+
Gs.displayName = Vs;
|
|
5195
|
+
var Ks = "ScrollAreaViewport", qs = h.forwardRef((e, t) => {
|
|
5196
|
+
let { __scopeScrollArea: n, children: r, nonce: i, ...a } = e, o = Q(Ks, n), s = Y(t, h.useRef(null), o.onViewportChange);
|
|
5180
5197
|
return /* @__PURE__ */ T(ie, { children: [/* @__PURE__ */ w("style", {
|
|
5181
5198
|
dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
|
|
5182
5199
|
nonce: i
|
|
5183
|
-
}), /* @__PURE__ */ w(
|
|
5200
|
+
}), /* @__PURE__ */ w(Ds.div, {
|
|
5184
5201
|
"data-radix-scroll-area-viewport": "",
|
|
5185
5202
|
...a,
|
|
5186
5203
|
ref: s,
|
|
@@ -5199,8 +5216,8 @@ var Ws = "ScrollAreaViewport", Gs = h.forwardRef((e, t) => {
|
|
|
5199
5216
|
})
|
|
5200
5217
|
})] });
|
|
5201
5218
|
});
|
|
5202
|
-
|
|
5203
|
-
var $ = "ScrollAreaScrollbar",
|
|
5219
|
+
qs.displayName = Ks;
|
|
5220
|
+
var $ = "ScrollAreaScrollbar", Js = h.forwardRef((e, t) => {
|
|
5204
5221
|
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: o } = i, s = e.orientation === "horizontal";
|
|
5205
5222
|
return h.useEffect(() => (s ? a(!0) : o(!0), () => {
|
|
5206
5223
|
s ? a(!1) : o(!1);
|
|
@@ -5208,25 +5225,25 @@ var $ = "ScrollAreaScrollbar", Ks = h.forwardRef((e, t) => {
|
|
|
5208
5225
|
s,
|
|
5209
5226
|
a,
|
|
5210
5227
|
o
|
|
5211
|
-
]), i.type === "hover" ? /* @__PURE__ */ w(
|
|
5228
|
+
]), i.type === "hover" ? /* @__PURE__ */ w(Ys, {
|
|
5212
5229
|
...r,
|
|
5213
5230
|
ref: t,
|
|
5214
5231
|
forceMount: n
|
|
5215
|
-
}) : i.type === "scroll" ? /* @__PURE__ */ w(
|
|
5232
|
+
}) : i.type === "scroll" ? /* @__PURE__ */ w(Xs, {
|
|
5216
5233
|
...r,
|
|
5217
5234
|
ref: t,
|
|
5218
5235
|
forceMount: n
|
|
5219
|
-
}) : i.type === "auto" ? /* @__PURE__ */ w(
|
|
5236
|
+
}) : i.type === "auto" ? /* @__PURE__ */ w(Zs, {
|
|
5220
5237
|
...r,
|
|
5221
5238
|
ref: t,
|
|
5222
5239
|
forceMount: n
|
|
5223
|
-
}) : i.type === "always" ? /* @__PURE__ */ w(
|
|
5240
|
+
}) : i.type === "always" ? /* @__PURE__ */ w(Qs, {
|
|
5224
5241
|
...r,
|
|
5225
5242
|
ref: t
|
|
5226
5243
|
}) : null;
|
|
5227
5244
|
});
|
|
5228
|
-
|
|
5229
|
-
var
|
|
5245
|
+
Js.displayName = $;
|
|
5246
|
+
var Ys = h.forwardRef((e, t) => {
|
|
5230
5247
|
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), [a, o] = h.useState(!1);
|
|
5231
5248
|
return h.useEffect(() => {
|
|
5232
5249
|
let e = i.scrollArea, t = 0;
|
|
@@ -5240,16 +5257,16 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5240
5257
|
window.clearTimeout(t), e.removeEventListener("pointerenter", n), e.removeEventListener("pointerleave", r);
|
|
5241
5258
|
};
|
|
5242
5259
|
}
|
|
5243
|
-
}, [i.scrollArea, i.scrollHideDelay]), /* @__PURE__ */ w(
|
|
5260
|
+
}, [i.scrollArea, i.scrollHideDelay]), /* @__PURE__ */ w(js, {
|
|
5244
5261
|
present: n || a,
|
|
5245
|
-
children: /* @__PURE__ */ w(
|
|
5262
|
+
children: /* @__PURE__ */ w(Zs, {
|
|
5246
5263
|
"data-state": a ? "visible" : "hidden",
|
|
5247
5264
|
...r,
|
|
5248
5265
|
ref: t
|
|
5249
5266
|
})
|
|
5250
5267
|
});
|
|
5251
|
-
}),
|
|
5252
|
-
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), a = e.orientation === "horizontal", o =
|
|
5268
|
+
}), Xs = h.forwardRef((e, t) => {
|
|
5269
|
+
let { forceMount: n, ...r } = e, i = Q($, e.__scopeScrollArea), a = e.orientation === "horizontal", o = vc(() => c("SCROLL_END"), 100), [s, c] = Bs("hidden", {
|
|
5253
5270
|
hidden: { SCROLL: "scrolling" },
|
|
5254
5271
|
scrolling: {
|
|
5255
5272
|
SCROLL_END: "idle",
|
|
@@ -5288,9 +5305,9 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5288
5305
|
a,
|
|
5289
5306
|
c,
|
|
5290
5307
|
o
|
|
5291
|
-
]), /* @__PURE__ */ w(
|
|
5308
|
+
]), /* @__PURE__ */ w(js, {
|
|
5292
5309
|
present: n || s !== "hidden",
|
|
5293
|
-
children: /* @__PURE__ */ w(
|
|
5310
|
+
children: /* @__PURE__ */ w(Qs, {
|
|
5294
5311
|
"data-state": s === "hidden" ? "hidden" : "visible",
|
|
5295
5312
|
...r,
|
|
5296
5313
|
ref: t,
|
|
@@ -5298,22 +5315,22 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5298
5315
|
onPointerLeave: Z(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
5299
5316
|
})
|
|
5300
5317
|
});
|
|
5301
|
-
}),
|
|
5302
|
-
let n = Q($, e.__scopeScrollArea), { forceMount: r, ...i } = e, [a, o] = h.useState(!1), s = e.orientation === "horizontal", c =
|
|
5318
|
+
}), Zs = h.forwardRef((e, t) => {
|
|
5319
|
+
let n = Q($, e.__scopeScrollArea), { forceMount: r, ...i } = e, [a, o] = h.useState(!1), s = e.orientation === "horizontal", c = vc(() => {
|
|
5303
5320
|
if (n.viewport) {
|
|
5304
5321
|
let e = n.viewport.offsetWidth < n.viewport.scrollWidth, t = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
5305
5322
|
o(s ? e : t);
|
|
5306
5323
|
}
|
|
5307
5324
|
}, 10);
|
|
5308
|
-
return
|
|
5325
|
+
return yc(n.viewport, c), yc(n.content, c), /* @__PURE__ */ w(js, {
|
|
5309
5326
|
present: r || a,
|
|
5310
|
-
children: /* @__PURE__ */ w(
|
|
5327
|
+
children: /* @__PURE__ */ w(Qs, {
|
|
5311
5328
|
"data-state": a ? "visible" : "hidden",
|
|
5312
5329
|
...i,
|
|
5313
5330
|
ref: t
|
|
5314
5331
|
})
|
|
5315
5332
|
});
|
|
5316
|
-
}),
|
|
5333
|
+
}), Qs = h.forwardRef((e, t) => {
|
|
5317
5334
|
let { orientation: n = "vertical", ...r } = e, i = Q($, e.__scopeScrollArea), a = h.useRef(null), o = h.useRef(0), [s, c] = h.useState({
|
|
5318
5335
|
content: 0,
|
|
5319
5336
|
viewport: 0,
|
|
@@ -5322,7 +5339,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5322
5339
|
paddingStart: 0,
|
|
5323
5340
|
paddingEnd: 0
|
|
5324
5341
|
}
|
|
5325
|
-
}), l =
|
|
5342
|
+
}), l = dc(s.viewport, s.content), u = {
|
|
5326
5343
|
...r,
|
|
5327
5344
|
sizes: s,
|
|
5328
5345
|
onSizesChange: c,
|
|
@@ -5332,14 +5349,14 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5332
5349
|
onThumbPointerDown: (e) => o.current = e
|
|
5333
5350
|
};
|
|
5334
5351
|
function d(e, t) {
|
|
5335
|
-
return
|
|
5352
|
+
return pc(e, o.current, s, t);
|
|
5336
5353
|
}
|
|
5337
|
-
return n === "horizontal" ? /* @__PURE__ */ w(
|
|
5354
|
+
return n === "horizontal" ? /* @__PURE__ */ w($s, {
|
|
5338
5355
|
...u,
|
|
5339
5356
|
ref: t,
|
|
5340
5357
|
onThumbPositionChange: () => {
|
|
5341
5358
|
if (i.viewport && a.current) {
|
|
5342
|
-
let e = i.viewport.scrollLeft, t =
|
|
5359
|
+
let e = i.viewport.scrollLeft, t = mc(e, s, i.dir);
|
|
5343
5360
|
a.current.style.transform = `translate3d(${t}px, 0, 0)`;
|
|
5344
5361
|
}
|
|
5345
5362
|
},
|
|
@@ -5349,12 +5366,12 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5349
5366
|
onDragScroll: (e) => {
|
|
5350
5367
|
i.viewport && (i.viewport.scrollLeft = d(e, i.dir));
|
|
5351
5368
|
}
|
|
5352
|
-
}) : n === "vertical" ? /* @__PURE__ */ w(
|
|
5369
|
+
}) : n === "vertical" ? /* @__PURE__ */ w(ec, {
|
|
5353
5370
|
...u,
|
|
5354
5371
|
ref: t,
|
|
5355
5372
|
onThumbPositionChange: () => {
|
|
5356
5373
|
if (i.viewport && a.current) {
|
|
5357
|
-
let e = i.viewport.scrollTop, t =
|
|
5374
|
+
let e = i.viewport.scrollTop, t = mc(e, s);
|
|
5358
5375
|
a.current.style.transform = `translate3d(0, ${t}px, 0)`;
|
|
5359
5376
|
}
|
|
5360
5377
|
},
|
|
@@ -5365,11 +5382,11 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5365
5382
|
i.viewport && (i.viewport.scrollTop = d(e));
|
|
5366
5383
|
}
|
|
5367
5384
|
}) : null;
|
|
5368
|
-
}),
|
|
5385
|
+
}), $s = h.forwardRef((e, t) => {
|
|
5369
5386
|
let { sizes: n, onSizesChange: r, ...i } = e, a = Q($, e.__scopeScrollArea), [o, s] = h.useState(), c = h.useRef(null), l = Y(t, c, a.onScrollbarXChange);
|
|
5370
5387
|
return h.useEffect(() => {
|
|
5371
5388
|
c.current && s(getComputedStyle(c.current));
|
|
5372
|
-
}, [c]), /* @__PURE__ */ w(
|
|
5389
|
+
}, [c]), /* @__PURE__ */ w(rc, {
|
|
5373
5390
|
"data-orientation": "horizontal",
|
|
5374
5391
|
...i,
|
|
5375
5392
|
ref: l,
|
|
@@ -5378,7 +5395,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5378
5395
|
bottom: 0,
|
|
5379
5396
|
left: a.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
5380
5397
|
right: a.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
5381
|
-
"--radix-scroll-area-thumb-width":
|
|
5398
|
+
"--radix-scroll-area-thumb-width": fc(n) + "px",
|
|
5382
5399
|
...e.style
|
|
5383
5400
|
},
|
|
5384
5401
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.x),
|
|
@@ -5386,7 +5403,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5386
5403
|
onWheelScroll: (t, n) => {
|
|
5387
5404
|
if (a.viewport) {
|
|
5388
5405
|
let r = a.viewport.scrollLeft + t.deltaX;
|
|
5389
|
-
e.onWheelScroll(r),
|
|
5406
|
+
e.onWheelScroll(r), gc(r, n) && t.preventDefault();
|
|
5390
5407
|
}
|
|
5391
5408
|
},
|
|
5392
5409
|
onResize: () => {
|
|
@@ -5395,17 +5412,17 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5395
5412
|
viewport: a.viewport.offsetWidth,
|
|
5396
5413
|
scrollbar: {
|
|
5397
5414
|
size: c.current.clientWidth,
|
|
5398
|
-
paddingStart:
|
|
5399
|
-
paddingEnd:
|
|
5415
|
+
paddingStart: uc(o.paddingLeft),
|
|
5416
|
+
paddingEnd: uc(o.paddingRight)
|
|
5400
5417
|
}
|
|
5401
5418
|
});
|
|
5402
5419
|
}
|
|
5403
5420
|
});
|
|
5404
|
-
}),
|
|
5421
|
+
}), ec = h.forwardRef((e, t) => {
|
|
5405
5422
|
let { sizes: n, onSizesChange: r, ...i } = e, a = Q($, e.__scopeScrollArea), [o, s] = h.useState(), c = h.useRef(null), l = Y(t, c, a.onScrollbarYChange);
|
|
5406
5423
|
return h.useEffect(() => {
|
|
5407
5424
|
c.current && s(getComputedStyle(c.current));
|
|
5408
|
-
}, [c]), /* @__PURE__ */ w(
|
|
5425
|
+
}, [c]), /* @__PURE__ */ w(rc, {
|
|
5409
5426
|
"data-orientation": "vertical",
|
|
5410
5427
|
...i,
|
|
5411
5428
|
ref: l,
|
|
@@ -5415,7 +5432,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5415
5432
|
right: a.dir === "ltr" ? 0 : void 0,
|
|
5416
5433
|
left: a.dir === "rtl" ? 0 : void 0,
|
|
5417
5434
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
5418
|
-
"--radix-scroll-area-thumb-height":
|
|
5435
|
+
"--radix-scroll-area-thumb-height": fc(n) + "px",
|
|
5419
5436
|
...e.style
|
|
5420
5437
|
},
|
|
5421
5438
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.y),
|
|
@@ -5423,7 +5440,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5423
5440
|
onWheelScroll: (t, n) => {
|
|
5424
5441
|
if (a.viewport) {
|
|
5425
5442
|
let r = a.viewport.scrollTop + t.deltaY;
|
|
5426
|
-
e.onWheelScroll(r),
|
|
5443
|
+
e.onWheelScroll(r), gc(r, n) && t.preventDefault();
|
|
5427
5444
|
}
|
|
5428
5445
|
},
|
|
5429
5446
|
onResize: () => {
|
|
@@ -5432,14 +5449,14 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5432
5449
|
viewport: a.viewport.offsetHeight,
|
|
5433
5450
|
scrollbar: {
|
|
5434
5451
|
size: c.current.clientHeight,
|
|
5435
|
-
paddingStart:
|
|
5436
|
-
paddingEnd:
|
|
5452
|
+
paddingStart: uc(o.paddingTop),
|
|
5453
|
+
paddingEnd: uc(o.paddingBottom)
|
|
5437
5454
|
}
|
|
5438
5455
|
});
|
|
5439
5456
|
}
|
|
5440
5457
|
});
|
|
5441
|
-
}), [
|
|
5442
|
-
let { __scopeScrollArea: n, sizes: r, hasThumb: i, onThumbChange: a, onThumbPointerUp: o, onThumbPointerDown: s, onThumbPositionChange: c, onDragScroll: l, onWheelScroll: u, onResize: d, ...f } = e, p = Q($, n), [m, g] = h.useState(null), _ = Y(t, (e) => g(e)), v = h.useRef(null), y = h.useRef(""), ee = p.viewport, b = r.content - r.viewport, x = X(u), te = X(c), ne =
|
|
5458
|
+
}), [tc, nc] = Hs($), rc = h.forwardRef((e, t) => {
|
|
5459
|
+
let { __scopeScrollArea: n, sizes: r, hasThumb: i, onThumbChange: a, onThumbPointerUp: o, onThumbPointerDown: s, onThumbPositionChange: c, onDragScroll: l, onWheelScroll: u, onResize: d, ...f } = e, p = Q($, n), [m, g] = h.useState(null), _ = Y(t, (e) => g(e)), v = h.useRef(null), y = h.useRef(""), ee = p.viewport, b = r.content - r.viewport, x = X(u), te = X(c), ne = vc(d, 10);
|
|
5443
5460
|
function S(e) {
|
|
5444
5461
|
v.current && l({
|
|
5445
5462
|
x: e.clientX - v.current.left,
|
|
@@ -5457,7 +5474,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5457
5474
|
m,
|
|
5458
5475
|
b,
|
|
5459
5476
|
x
|
|
5460
|
-
]), h.useEffect(te, [r, te]),
|
|
5477
|
+
]), h.useEffect(te, [r, te]), yc(m, ne), yc(p.content, ne), /* @__PURE__ */ w(tc, {
|
|
5461
5478
|
scope: n,
|
|
5462
5479
|
scrollbar: m,
|
|
5463
5480
|
hasThumb: i,
|
|
@@ -5465,7 +5482,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5465
5482
|
onThumbPointerUp: X(o),
|
|
5466
5483
|
onThumbPositionChange: te,
|
|
5467
5484
|
onThumbPointerDown: X(s),
|
|
5468
|
-
children: /* @__PURE__ */ w(
|
|
5485
|
+
children: /* @__PURE__ */ w(Ds.div, {
|
|
5469
5486
|
...f,
|
|
5470
5487
|
ref: _,
|
|
5471
5488
|
style: {
|
|
@@ -5482,24 +5499,24 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5482
5499
|
})
|
|
5483
5500
|
})
|
|
5484
5501
|
});
|
|
5485
|
-
}),
|
|
5486
|
-
let { forceMount: n, ...r } = e, i =
|
|
5487
|
-
return /* @__PURE__ */ w(
|
|
5502
|
+
}), ic = "ScrollAreaThumb", ac = h.forwardRef((e, t) => {
|
|
5503
|
+
let { forceMount: n, ...r } = e, i = nc(ic, e.__scopeScrollArea);
|
|
5504
|
+
return /* @__PURE__ */ w(js, {
|
|
5488
5505
|
present: n || i.hasThumb,
|
|
5489
|
-
children: /* @__PURE__ */ w(
|
|
5506
|
+
children: /* @__PURE__ */ w(oc, {
|
|
5490
5507
|
ref: t,
|
|
5491
5508
|
...r
|
|
5492
5509
|
})
|
|
5493
5510
|
});
|
|
5494
|
-
}),
|
|
5495
|
-
let { __scopeScrollArea: n, style: r, ...i } = e, a = Q(
|
|
5511
|
+
}), oc = h.forwardRef((e, t) => {
|
|
5512
|
+
let { __scopeScrollArea: n, style: r, ...i } = e, a = Q(ic, n), o = nc(ic, n), { onThumbPositionChange: s } = o, c = Y(t, (e) => o.onThumbChange(e)), l = h.useRef(void 0), u = vc(() => {
|
|
5496
5513
|
l.current && (l.current(), l.current = void 0);
|
|
5497
5514
|
}, 100);
|
|
5498
5515
|
return h.useEffect(() => {
|
|
5499
5516
|
let e = a.viewport;
|
|
5500
5517
|
if (e) {
|
|
5501
5518
|
let t = () => {
|
|
5502
|
-
u(), l.current || (l.current =
|
|
5519
|
+
u(), l.current || (l.current = _c(e, s), s());
|
|
5503
5520
|
};
|
|
5504
5521
|
return s(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
5505
5522
|
}
|
|
@@ -5507,7 +5524,7 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5507
5524
|
a.viewport,
|
|
5508
5525
|
u,
|
|
5509
5526
|
s
|
|
5510
|
-
]), /* @__PURE__ */ w(
|
|
5527
|
+
]), /* @__PURE__ */ w(Ds.div, {
|
|
5511
5528
|
"data-state": o.hasThumb ? "visible" : "hidden",
|
|
5512
5529
|
...i,
|
|
5513
5530
|
ref: c,
|
|
@@ -5526,24 +5543,24 @@ var qs = h.forwardRef((e, t) => {
|
|
|
5526
5543
|
onPointerUp: Z(e.onPointerUp, o.onThumbPointerUp)
|
|
5527
5544
|
});
|
|
5528
5545
|
});
|
|
5529
|
-
|
|
5530
|
-
var
|
|
5531
|
-
let n = Q(
|
|
5532
|
-
return n.type !== "scroll" && r ? /* @__PURE__ */ w(
|
|
5546
|
+
ac.displayName = ic;
|
|
5547
|
+
var sc = "ScrollAreaCorner", cc = h.forwardRef((e, t) => {
|
|
5548
|
+
let n = Q(sc, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
5549
|
+
return n.type !== "scroll" && r ? /* @__PURE__ */ w(lc, {
|
|
5533
5550
|
...e,
|
|
5534
5551
|
ref: t
|
|
5535
5552
|
}) : null;
|
|
5536
5553
|
});
|
|
5537
|
-
|
|
5538
|
-
var
|
|
5539
|
-
let { __scopeScrollArea: n, ...r } = e, i = Q(
|
|
5540
|
-
return
|
|
5554
|
+
cc.displayName = sc;
|
|
5555
|
+
var lc = h.forwardRef((e, t) => {
|
|
5556
|
+
let { __scopeScrollArea: n, ...r } = e, i = Q(sc, n), [a, o] = h.useState(0), [s, c] = h.useState(0), l = !!(a && s);
|
|
5557
|
+
return yc(i.scrollbarX, () => {
|
|
5541
5558
|
let e = i.scrollbarX?.offsetHeight || 0;
|
|
5542
5559
|
i.onCornerHeightChange(e), c(e);
|
|
5543
|
-
}),
|
|
5560
|
+
}), yc(i.scrollbarY, () => {
|
|
5544
5561
|
let e = i.scrollbarY?.offsetWidth || 0;
|
|
5545
5562
|
i.onCornerWidthChange(e), o(e);
|
|
5546
|
-
}), l ? /* @__PURE__ */ w(
|
|
5563
|
+
}), l ? /* @__PURE__ */ w(Ds.div, {
|
|
5547
5564
|
...r,
|
|
5548
5565
|
ref: t,
|
|
5549
5566
|
style: {
|
|
@@ -5557,36 +5574,36 @@ var sc = h.forwardRef((e, t) => {
|
|
|
5557
5574
|
}
|
|
5558
5575
|
}) : null;
|
|
5559
5576
|
});
|
|
5560
|
-
function
|
|
5577
|
+
function uc(e) {
|
|
5561
5578
|
return e ? parseInt(e, 10) : 0;
|
|
5562
5579
|
}
|
|
5563
|
-
function
|
|
5580
|
+
function dc(e, t) {
|
|
5564
5581
|
let n = e / t;
|
|
5565
5582
|
return isNaN(n) ? 0 : n;
|
|
5566
5583
|
}
|
|
5567
|
-
function
|
|
5568
|
-
let t =
|
|
5584
|
+
function fc(e) {
|
|
5585
|
+
let t = dc(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
5569
5586
|
return Math.max(r, 18);
|
|
5570
5587
|
}
|
|
5571
|
-
function
|
|
5572
|
-
let i =
|
|
5573
|
-
return
|
|
5588
|
+
function pc(e, t, n, r = "ltr") {
|
|
5589
|
+
let i = fc(n), a = i / 2, o = t || a, s = i - o, c = n.scrollbar.paddingStart + o, l = n.scrollbar.size - n.scrollbar.paddingEnd - s, u = n.content - n.viewport, d = r === "ltr" ? [0, u] : [u * -1, 0];
|
|
5590
|
+
return hc([c, l], d)(e);
|
|
5574
5591
|
}
|
|
5575
|
-
function
|
|
5576
|
-
let r =
|
|
5577
|
-
return
|
|
5592
|
+
function mc(e, t, n = "ltr") {
|
|
5593
|
+
let r = fc(t), i = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - i, o = t.content - t.viewport, s = a - r, c = zs(e, n === "ltr" ? [0, o] : [o * -1, 0]);
|
|
5594
|
+
return hc([0, o], [0, s])(c);
|
|
5578
5595
|
}
|
|
5579
|
-
function
|
|
5596
|
+
function hc(e, t) {
|
|
5580
5597
|
return (n) => {
|
|
5581
5598
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
5582
5599
|
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
5583
5600
|
return t[0] + r * (n - e[0]);
|
|
5584
5601
|
};
|
|
5585
5602
|
}
|
|
5586
|
-
function
|
|
5603
|
+
function gc(e, t) {
|
|
5587
5604
|
return e > 0 && e < t;
|
|
5588
5605
|
}
|
|
5589
|
-
var
|
|
5606
|
+
var _c = (e, t = () => {}) => {
|
|
5590
5607
|
let n = {
|
|
5591
5608
|
left: e.scrollLeft,
|
|
5592
5609
|
top: e.scrollTop
|
|
@@ -5599,15 +5616,15 @@ var hc = (e, t = () => {}) => {
|
|
|
5599
5616
|
(o || s) && t(), n = a, r = window.requestAnimationFrame(i);
|
|
5600
5617
|
})(), () => window.cancelAnimationFrame(r);
|
|
5601
5618
|
};
|
|
5602
|
-
function
|
|
5619
|
+
function vc(e, t) {
|
|
5603
5620
|
let n = X(e), r = h.useRef(0);
|
|
5604
5621
|
return h.useEffect(() => () => window.clearTimeout(r.current), []), h.useCallback(() => {
|
|
5605
5622
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
5606
5623
|
}, [n, t]);
|
|
5607
5624
|
}
|
|
5608
|
-
function
|
|
5625
|
+
function yc(e, t) {
|
|
5609
5626
|
let n = X(t);
|
|
5610
|
-
|
|
5627
|
+
ks(() => {
|
|
5611
5628
|
let t = 0;
|
|
5612
5629
|
if (e) {
|
|
5613
5630
|
let r = new ResizeObserver(() => {
|
|
@@ -5619,34 +5636,34 @@ function _c(e, t) {
|
|
|
5619
5636
|
}
|
|
5620
5637
|
}, [e, n]);
|
|
5621
5638
|
}
|
|
5622
|
-
var
|
|
5639
|
+
var bc = Gs, xc = qs, Sc = cc;
|
|
5623
5640
|
//#endregion
|
|
5624
5641
|
//#region components/ui/scroll-area.tsx
|
|
5625
|
-
function
|
|
5626
|
-
return /* @__PURE__ */ T(
|
|
5642
|
+
function Cc({ className: e, viewportRef: t, children: n, onScroll: r, ...i }) {
|
|
5643
|
+
return /* @__PURE__ */ T(bc, {
|
|
5627
5644
|
"data-slot": "scroll-area",
|
|
5628
5645
|
className: f("relative min-h-0 min-w-0 overflow-hidden", e),
|
|
5629
5646
|
...i,
|
|
5630
5647
|
children: [
|
|
5631
|
-
/* @__PURE__ */ w(
|
|
5648
|
+
/* @__PURE__ */ w(xc, {
|
|
5632
5649
|
ref: t,
|
|
5633
5650
|
"data-slot": "scroll-area-viewport",
|
|
5634
5651
|
onScroll: r,
|
|
5635
5652
|
className: f("h-full w-full rounded-[inherit]", "[&>div]:!block [&>div]:!w-full [&>div]:!max-w-full", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary/40"),
|
|
5636
5653
|
children: n
|
|
5637
5654
|
}),
|
|
5638
|
-
/* @__PURE__ */ w(
|
|
5639
|
-
/* @__PURE__ */ w(
|
|
5655
|
+
/* @__PURE__ */ w(wc, {}),
|
|
5656
|
+
/* @__PURE__ */ w(Sc, {})
|
|
5640
5657
|
]
|
|
5641
5658
|
});
|
|
5642
5659
|
}
|
|
5643
|
-
function
|
|
5644
|
-
return /* @__PURE__ */ w(
|
|
5660
|
+
function wc({ className: e, orientation: t = "vertical", ...n }) {
|
|
5661
|
+
return /* @__PURE__ */ w(Js, {
|
|
5645
5662
|
"data-slot": "scroll-area-scrollbar",
|
|
5646
5663
|
orientation: t,
|
|
5647
5664
|
className: f("flex touch-none select-none transition-opacity duration-150", "opacity-0 data-[state=visible]:opacity-100", "hover:opacity-100", t === "vertical" && "h-full w-1.5 border-l border-l-transparent p-px", t === "horizontal" && "h-1.5 flex-col border-t border-t-transparent p-px", e),
|
|
5648
5665
|
...n,
|
|
5649
|
-
children: /* @__PURE__ */ w(
|
|
5666
|
+
children: /* @__PURE__ */ w(ac, {
|
|
5650
5667
|
"data-slot": "scroll-area-thumb",
|
|
5651
5668
|
className: f("relative flex-1 rounded-full", "bg-wx-fg-muted/40 hover:bg-wx-fg-muted/60 transition-colors")
|
|
5652
5669
|
})
|
|
@@ -5654,7 +5671,7 @@ function Sc({ className: e, orientation: t = "vertical", ...n }) {
|
|
|
5654
5671
|
}
|
|
5655
5672
|
//#endregion
|
|
5656
5673
|
//#region components/widget/tabs/messages-tab/message/media-lightbox.tsx
|
|
5657
|
-
function
|
|
5674
|
+
function Tc({ items: e, initialIndex: t, open: r, onClose: i }) {
|
|
5658
5675
|
let a = d("lightbox"), [o, s] = C(t), c = Ao(), l = !(c.embedded ?? !1) || (c.lightboxViewport ?? !0);
|
|
5659
5676
|
b(() => {
|
|
5660
5677
|
r && s(t);
|
|
@@ -5700,7 +5717,7 @@ function Cc({ items: e, initialIndex: t, open: r, onClose: i }) {
|
|
|
5700
5717
|
},
|
|
5701
5718
|
"aria-label": a("close"),
|
|
5702
5719
|
className: f("absolute top-4 right-4 z-10 flex h-9 w-9 items-center justify-center rounded-full", "bg-white/10 text-white transition-colors hover:bg-white/20"),
|
|
5703
|
-
children: /* @__PURE__ */ w(
|
|
5720
|
+
children: /* @__PURE__ */ w(ds, { size: 18 })
|
|
5704
5721
|
}),
|
|
5705
5722
|
u > 1 && /* @__PURE__ */ T(ie, { children: [/* @__PURE__ */ w("button", {
|
|
5706
5723
|
type: "button",
|
|
@@ -5709,7 +5726,7 @@ function Cc({ items: e, initialIndex: t, open: r, onClose: i }) {
|
|
|
5709
5726
|
},
|
|
5710
5727
|
"aria-label": a("previous"),
|
|
5711
5728
|
className: f("absolute left-4 top-1/2 z-10 -translate-y-1/2 flex h-10 w-10 items-center justify-center rounded-full", "bg-white/10 text-white transition-colors hover:bg-white/20"),
|
|
5712
|
-
children: /* @__PURE__ */ w(
|
|
5729
|
+
children: /* @__PURE__ */ w(ls, { size: 20 })
|
|
5713
5730
|
}), /* @__PURE__ */ w("button", {
|
|
5714
5731
|
type: "button",
|
|
5715
5732
|
onClick: (e) => {
|
|
@@ -5717,7 +5734,7 @@ function Cc({ items: e, initialIndex: t, open: r, onClose: i }) {
|
|
|
5717
5734
|
},
|
|
5718
5735
|
"aria-label": a("next"),
|
|
5719
5736
|
className: f("absolute right-4 top-1/2 z-10 -translate-y-1/2 flex h-10 w-10 items-center justify-center rounded-full", "bg-white/10 text-white transition-colors hover:bg-white/20"),
|
|
5720
|
-
children: /* @__PURE__ */ w(
|
|
5737
|
+
children: /* @__PURE__ */ w(us, { size: 20 })
|
|
5721
5738
|
})] }),
|
|
5722
5739
|
/* @__PURE__ */ w(n.div, {
|
|
5723
5740
|
initial: {
|
|
@@ -5779,7 +5796,7 @@ function Cc({ items: e, initialIndex: t, open: r, onClose: i }) {
|
|
|
5779
5796
|
}
|
|
5780
5797
|
//#endregion
|
|
5781
5798
|
//#region lib/content-languages.ts
|
|
5782
|
-
var
|
|
5799
|
+
var Ec = [
|
|
5783
5800
|
{
|
|
5784
5801
|
value: "en",
|
|
5785
5802
|
label: "English"
|
|
@@ -5913,13 +5930,13 @@ var wc = [
|
|
|
5913
5930
|
label: "中文(繁體)"
|
|
5914
5931
|
}
|
|
5915
5932
|
];
|
|
5916
|
-
function
|
|
5917
|
-
let t =
|
|
5933
|
+
function Dc(e) {
|
|
5934
|
+
let t = Ec.find((t) => t.value === e);
|
|
5918
5935
|
if (t) return t.label;
|
|
5919
|
-
let n = e.split("-")[0].toLowerCase(), r =
|
|
5936
|
+
let n = e.split("-")[0].toLowerCase(), r = Ec.find((e) => e.value === n);
|
|
5920
5937
|
return r ? r.label : n.toUpperCase();
|
|
5921
5938
|
}
|
|
5922
5939
|
//#endregion
|
|
5923
|
-
export { H as $, Rt as $t, mo as A, nr as At, ba as B, un as Bt,
|
|
5940
|
+
export { H as $, Rt as $t, mo as A, nr as At, ba as B, un as Bt, Zo as C, cr as Ct, Ao as D, Wn as Dt, ko as E, ur as Et, Ja as F, En as Ft, fa as G, $t as Gt, G as H, dn as Ht, Za as I, Tn as It, ua as J, Gt as Jt, ca as K, en as Kt, J as L, Cn as Lt, oo as M, kn as Mt, no as N, Dn as Nt, Eo as O, Un as Ot, co as P, On as Pt, V as Q, Lt as Qt, Ha as R, bn as Rt, Qo as S, ar as St, Po as T, lr as Tt, _a as U, sn as Ut, Sa as V, cn as Vt, pa as W, nn as Wt, Ji as X, Vt as Xt, W as Y, Ht as Yt, qi as Z, Bt as Zt, Y as _, _r as _t, zs as a, Ce as an, Fi as at, cs as b, hr as bt, Fs as c, ye as cn, ii as ct, Os as d, ce as dn, $r as dt, nt as en, Gi as et, ms as f, de as fn, Tr as ft, ps as g, mr as gt, _s as h, gr as ht, Z as i, Te as in, Ii as it, to as j, zn as jt, wo as k, sr as kt, ks as l, E as ln, ai as lt, vs as m, D as mn, vr as mt, Tc as n, Ae as nn, Ri as nt, Rs as o, Se as on, ji as ot, ys as p, le as pn, dr as pt, la as q, Xt as qt, Cc as r, A as rn, Li as rt, X as s, k as sn, Oi as st, Dc as t, M as tn, zi as tt, Ds as u, ue as un, ri as ut, ds as v, fr as vt, qo as w, Gn as wt, ss as x, or as xt, us as y, pr as yt, Na as z, ln as zt };
|
|
5924
5941
|
|
|
5925
|
-
//# sourceMappingURL=widget-react-
|
|
5942
|
+
//# sourceMappingURL=widget-react-CQ4e_16G.js.map
|