@vlprojects-chat/chat 0.26.0 → 0.27.0-LK-6357-centrifuge-sse.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +316 -280
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6546,8 +6546,8 @@ const mp = {
|
|
|
6546
6546
|
modeStorageKey: "mui-mode"
|
|
6547
6547
|
}, {
|
|
6548
6548
|
CssVarsProvider: jD,
|
|
6549
|
-
useColorScheme:
|
|
6550
|
-
getInitColorSchemeScript:
|
|
6549
|
+
useColorScheme: dde,
|
|
6550
|
+
getInitColorSchemeScript: pde
|
|
6551
6551
|
} = R9({
|
|
6552
6552
|
themeId: Di,
|
|
6553
6553
|
// @ts-ignore ignore module augmentation tests
|
|
@@ -6686,10 +6686,10 @@ function UR() {
|
|
|
6686
6686
|
VD || Se(I.env.NODE_ENV !== "production" ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available");
|
|
6687
6687
|
}
|
|
6688
6688
|
function ju(e) {
|
|
6689
|
-
I.env.NODE_ENV !== "production" &&
|
|
6689
|
+
I.env.NODE_ENV !== "production" && ve.verifyProxies && Se("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to " + e);
|
|
6690
6690
|
}
|
|
6691
6691
|
function yo() {
|
|
6692
|
-
return ++
|
|
6692
|
+
return ++ve.mobxGuid;
|
|
6693
6693
|
}
|
|
6694
6694
|
function vw(e) {
|
|
6695
6695
|
var t = !1;
|
|
@@ -7089,7 +7089,7 @@ function c8(e, t, n, r) {
|
|
|
7089
7089
|
}
|
|
7090
7090
|
function YR(e, t, n, r, o) {
|
|
7091
7091
|
var i, s, a, l, u, c, p;
|
|
7092
|
-
o === void 0 && (o =
|
|
7092
|
+
o === void 0 && (o = ve.safeDescriptors), c8(e, t, n, r);
|
|
7093
7093
|
var d = r.value;
|
|
7094
7094
|
if ((i = t.options_) != null && i.bound) {
|
|
7095
7095
|
var m;
|
|
@@ -7152,7 +7152,7 @@ function p8(e, t, n, r) {
|
|
|
7152
7152
|
'` + o + "' can only be used on properties with a generator function value."));
|
|
7153
7153
|
}
|
|
7154
7154
|
function KR(e, t, n, r, o, i) {
|
|
7155
|
-
i === void 0 && (i =
|
|
7155
|
+
i === void 0 && (i = ve.safeDescriptors), p8(e, t, n, r);
|
|
7156
7156
|
var s = r.value;
|
|
7157
7157
|
if (jc(s) || (s = sl(s)), o) {
|
|
7158
7158
|
var a;
|
|
@@ -7268,7 +7268,7 @@ function C8(e, t, n, r) {
|
|
|
7268
7268
|
if (n.set) {
|
|
7269
7269
|
var s = Ks(t.toString(), n.set);
|
|
7270
7270
|
return r === e.target_ ? e.defineProperty_(t, {
|
|
7271
|
-
configurable:
|
|
7271
|
+
configurable: ve.safeDescriptors ? e.isPlainObject_ : !0,
|
|
7272
7272
|
set: s
|
|
7273
7273
|
}) === null ? 0 : 2 : (Li(r, t, {
|
|
7274
7274
|
configurable: !0,
|
|
@@ -7297,7 +7297,7 @@ function O8(e, t, n, r) {
|
|
|
7297
7297
|
return st.extend_(e, t, n, r);
|
|
7298
7298
|
if (n.set)
|
|
7299
7299
|
return e.defineProperty_(t, {
|
|
7300
|
-
configurable:
|
|
7300
|
+
configurable: ve.safeDescriptors ? e.isPlainObject_ : !0,
|
|
7301
7301
|
set: Ks(t.toString(), n.set)
|
|
7302
7302
|
}, r);
|
|
7303
7303
|
if (typeof n.value == "function" && (o = this.options_) != null && o.autoBind) {
|
|
@@ -7355,7 +7355,7 @@ var L8 = {
|
|
|
7355
7355
|
},
|
|
7356
7356
|
array: function(t, n) {
|
|
7357
7357
|
var r = gp(n);
|
|
7358
|
-
return (
|
|
7358
|
+
return (ve.useProxies === !1 || r.proxy === !1 ? z7 : D7)(t, vp(r), r.name);
|
|
7359
7359
|
},
|
|
7360
7360
|
map: function(t, n) {
|
|
7361
7361
|
var r = gp(n);
|
|
@@ -7367,7 +7367,7 @@ var L8 = {
|
|
|
7367
7367
|
},
|
|
7368
7368
|
object: function(t, n, r) {
|
|
7369
7369
|
return pa(function() {
|
|
7370
|
-
return Hg(
|
|
7370
|
+
return Hg(ve.useProxies === !1 || (r == null ? void 0 : r.proxy) === !1 ? Tl({}, r) : N7({}, r), t, n);
|
|
7371
7371
|
});
|
|
7372
7372
|
},
|
|
7373
7373
|
ref: /* @__PURE__ */ Zo(k8),
|
|
@@ -7427,9 +7427,9 @@ function nP(e, t, n, r) {
|
|
|
7427
7427
|
arguments: s
|
|
7428
7428
|
});
|
|
7429
7429
|
}
|
|
7430
|
-
var a =
|
|
7430
|
+
var a = ve.trackingDerivation, l = !t || !a;
|
|
7431
7431
|
Vr();
|
|
7432
|
-
var u =
|
|
7432
|
+
var u = ve.allowStateChanges;
|
|
7433
7433
|
l && (Cl(), u = Ug(!0));
|
|
7434
7434
|
var c = Wg(!0), p = {
|
|
7435
7435
|
runAsAction_: l,
|
|
@@ -7444,9 +7444,9 @@ function nP(e, t, n, r) {
|
|
|
7444
7444
|
return Fh = p.actionId_, p;
|
|
7445
7445
|
}
|
|
7446
7446
|
function rP(e) {
|
|
7447
|
-
Fh !== e.actionId_ && Se(30), Fh = e.parentActionId_, e.error_ !== void 0 && (
|
|
7447
|
+
Fh !== e.actionId_ && Se(30), Fh = e.parentActionId_, e.error_ !== void 0 && (ve.suppressReactionErrors = !0), _g(e.prevAllowStateChanges_), yc(e.prevAllowStateReads_), Ur(), e.runAsAction_ && ps(e.prevDerivation_), I.env.NODE_ENV !== "production" && e.notifySpy_ && co({
|
|
7448
7448
|
time: Date.now() - e.startTime_
|
|
7449
|
-
}),
|
|
7449
|
+
}), ve.suppressReactionErrors = !1;
|
|
7450
7450
|
}
|
|
7451
7451
|
function ww(e, t) {
|
|
7452
7452
|
var n = Ug(e);
|
|
@@ -7457,11 +7457,11 @@ function ww(e, t) {
|
|
|
7457
7457
|
}
|
|
7458
7458
|
}
|
|
7459
7459
|
function Ug(e) {
|
|
7460
|
-
var t =
|
|
7461
|
-
return
|
|
7460
|
+
var t = ve.allowStateChanges;
|
|
7461
|
+
return ve.allowStateChanges = e, t;
|
|
7462
7462
|
}
|
|
7463
7463
|
function _g(e) {
|
|
7464
|
-
|
|
7464
|
+
ve.allowStateChanges = e;
|
|
7465
7465
|
}
|
|
7466
7466
|
var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
7467
7467
|
function t(r, o, i, s, a) {
|
|
@@ -7480,7 +7480,7 @@ var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
|
7480
7480
|
return this.dehancer !== void 0 ? this.dehancer(o) : o;
|
|
7481
7481
|
}, n.set = function(o) {
|
|
7482
7482
|
var i = this.value_;
|
|
7483
|
-
if (o = this.prepareNewValue_(o), o !==
|
|
7483
|
+
if (o = this.prepareNewValue_(o), o !== ve.UNCHANGED) {
|
|
7484
7484
|
var s = lr();
|
|
7485
7485
|
I.env.NODE_ENV !== "production" && s && lo({
|
|
7486
7486
|
type: Xo,
|
|
@@ -7499,10 +7499,10 @@ var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
|
7499
7499
|
newValue: o
|
|
7500
7500
|
});
|
|
7501
7501
|
if (!i)
|
|
7502
|
-
return
|
|
7502
|
+
return ve.UNCHANGED;
|
|
7503
7503
|
o = i.newValue;
|
|
7504
7504
|
}
|
|
7505
|
-
return o = this.enhancer(o, this.value_, this.name_), this.equals(this.value_, o) ?
|
|
7505
|
+
return o = this.enhancer(o, this.value_, this.name_), this.equals(this.value_, o) ? ve.UNCHANGED : o;
|
|
7506
7506
|
}, n.setNewValue_ = function(o) {
|
|
7507
7507
|
var i = this.value_;
|
|
7508
7508
|
this.value_ = o, this.reportChanged(), Qo(this) && $o(this, {
|
|
@@ -7551,12 +7551,12 @@ var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
|
7551
7551
|
return r();
|
|
7552
7552
|
});
|
|
7553
7553
|
}, t.get = function() {
|
|
7554
|
-
if (this.isComputing && Se(32, this.name_, this.derivation),
|
|
7554
|
+
if (this.isComputing && Se(32, this.name_, this.derivation), ve.inBatch === 0 && // !globalState.trackingDerivatpion &&
|
|
7555
7555
|
this.observers_.size === 0 && !this.keepAlive_)
|
|
7556
7556
|
Xb(this) && (this.warnAboutUntrackedRead_(), Vr(), this.value_ = this.computeValue_(!1), Ur());
|
|
7557
7557
|
else if (cP(this), Xb(this)) {
|
|
7558
|
-
var r =
|
|
7559
|
-
this.keepAlive_ && !r && (
|
|
7558
|
+
var r = ve.trackingContext;
|
|
7559
|
+
this.keepAlive_ && !r && (ve.trackingContext = this), this.trackAndCompute() && $8(this), ve.trackingContext = r;
|
|
7560
7560
|
}
|
|
7561
7561
|
var o = this.value_;
|
|
7562
7562
|
if (ah(o))
|
|
@@ -7590,7 +7590,7 @@ var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
|
7590
7590
|
var o = Ug(!1), i;
|
|
7591
7591
|
if (r)
|
|
7592
7592
|
i = oP(this, this.derivation, this.scope_);
|
|
7593
|
-
else if (
|
|
7593
|
+
else if (ve.disableErrorBoundaries === !0)
|
|
7594
7594
|
i = this.derivation.call(this.scope_);
|
|
7595
7595
|
else
|
|
7596
7596
|
try {
|
|
@@ -7619,7 +7619,7 @@ var _8 = "create", zs = /* @__PURE__ */ function(e) {
|
|
|
7619
7619
|
s = !1, a = l;
|
|
7620
7620
|
});
|
|
7621
7621
|
}, t.warnAboutUntrackedRead_ = function() {
|
|
7622
|
-
I.env.NODE_ENV !== "production" && (this.isTracing_ !== jo.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."), (typeof this.requiresReaction_ == "boolean" ? this.requiresReaction_ :
|
|
7622
|
+
I.env.NODE_ENV !== "production" && (this.isTracing_ !== jo.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."), (typeof this.requiresReaction_ == "boolean" ? this.requiresReaction_ : ve.computedRequiresReaction) && console.warn("[mobx] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."));
|
|
7623
7623
|
}, t.toString = function() {
|
|
7624
7624
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
7625
7625
|
}, t.valueOf = function() {
|
|
@@ -7698,7 +7698,7 @@ function Xb(e) {
|
|
|
7698
7698
|
for (var t = Wg(!0), n = Cl(), r = e.observing_, o = r.length, i = 0; i < o; i++) {
|
|
7699
7699
|
var s = r[i];
|
|
7700
7700
|
if (rl(s)) {
|
|
7701
|
-
if (
|
|
7701
|
+
if (ve.disableErrorBoundaries)
|
|
7702
7702
|
s.get();
|
|
7703
7703
|
else
|
|
7704
7704
|
try {
|
|
@@ -7715,16 +7715,16 @@ function Xb(e) {
|
|
|
7715
7715
|
}
|
|
7716
7716
|
}
|
|
7717
7717
|
function W8() {
|
|
7718
|
-
return
|
|
7718
|
+
return ve.trackingDerivation !== null;
|
|
7719
7719
|
}
|
|
7720
7720
|
function Ni(e) {
|
|
7721
7721
|
if (I.env.NODE_ENV !== "production") {
|
|
7722
7722
|
var t = e.observers_.size > 0;
|
|
7723
|
-
!
|
|
7723
|
+
!ve.allowStateChanges && (t || ve.enforceActions === "always") && console.warn("[MobX] " + (ve.enforceActions ? "Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: " : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ") + e.name_);
|
|
7724
7724
|
}
|
|
7725
7725
|
}
|
|
7726
7726
|
function H8(e) {
|
|
7727
|
-
I.env.NODE_ENV !== "production" && !
|
|
7727
|
+
I.env.NODE_ENV !== "production" && !ve.allowStateReads && ve.observableRequiresReaction && console.warn("[mobx] Observable '" + e.name_ + "' being read outside a reactive context.");
|
|
7728
7728
|
}
|
|
7729
7729
|
function oP(e, t, n) {
|
|
7730
7730
|
var r = Wg(!0);
|
|
@@ -7732,11 +7732,11 @@ function oP(e, t, n) {
|
|
|
7732
7732
|
// Reserve constant space for initial dependencies, dynamic space otherwise.
|
|
7733
7733
|
// See https://github.com/mobxjs/mobx/pull/3833
|
|
7734
7734
|
e.runId_ === 0 ? 100 : e.observing_.length
|
|
7735
|
-
), e.unboundDepsCount_ = 0, e.runId_ = ++
|
|
7736
|
-
var o =
|
|
7737
|
-
|
|
7735
|
+
), e.unboundDepsCount_ = 0, e.runId_ = ++ve.runId;
|
|
7736
|
+
var o = ve.trackingDerivation;
|
|
7737
|
+
ve.trackingDerivation = e, ve.inBatch++;
|
|
7738
7738
|
var i;
|
|
7739
|
-
if (
|
|
7739
|
+
if (ve.disableErrorBoundaries === !0)
|
|
7740
7740
|
i = t.call(n);
|
|
7741
7741
|
else
|
|
7742
7742
|
try {
|
|
@@ -7744,10 +7744,10 @@ function oP(e, t, n) {
|
|
|
7744
7744
|
} catch (s) {
|
|
7745
7745
|
i = new Vh(s);
|
|
7746
7746
|
}
|
|
7747
|
-
return
|
|
7747
|
+
return ve.inBatch--, ve.trackingDerivation = o, z8(e), G8(e), yc(r), i;
|
|
7748
7748
|
}
|
|
7749
7749
|
function G8(e) {
|
|
7750
|
-
I.env.NODE_ENV !== "production" && e.observing_.length === 0 && (typeof e.requiresObservable_ == "boolean" ? e.requiresObservable_ :
|
|
7750
|
+
I.env.NODE_ENV !== "production" && e.observing_.length === 0 && (typeof e.requiresObservable_ == "boolean" ? e.requiresObservable_ : ve.reactionRequiresObservable) && console.warn("[mobx] Derivation '" + e.name_ + "' is created/updated without reading any observable value.");
|
|
7751
7751
|
}
|
|
7752
7752
|
function z8(e) {
|
|
7753
7753
|
for (var t = e.observing_, n = e.observing_ = e.newObserving_, r = Mt.UP_TO_DATE_, o = 0, i = e.unboundDepsCount_, s = 0; s < i; s++) {
|
|
@@ -7780,18 +7780,18 @@ function xw(e) {
|
|
|
7780
7780
|
}
|
|
7781
7781
|
}
|
|
7782
7782
|
function Cl() {
|
|
7783
|
-
var e =
|
|
7784
|
-
return
|
|
7783
|
+
var e = ve.trackingDerivation;
|
|
7784
|
+
return ve.trackingDerivation = null, e;
|
|
7785
7785
|
}
|
|
7786
7786
|
function ps(e) {
|
|
7787
|
-
|
|
7787
|
+
ve.trackingDerivation = e;
|
|
7788
7788
|
}
|
|
7789
7789
|
function Wg(e) {
|
|
7790
|
-
var t =
|
|
7791
|
-
return
|
|
7790
|
+
var t = ve.allowStateReads;
|
|
7791
|
+
return ve.allowStateReads = e, t;
|
|
7792
7792
|
}
|
|
7793
7793
|
function yc(e) {
|
|
7794
|
-
|
|
7794
|
+
ve.allowStateReads = e;
|
|
7795
7795
|
}
|
|
7796
7796
|
function iP(e) {
|
|
7797
7797
|
if (e.dependenciesState_ !== Mt.UP_TO_DATE_) {
|
|
@@ -7802,26 +7802,26 @@ function iP(e) {
|
|
|
7802
7802
|
}
|
|
7803
7803
|
var q8 = ["mobxGuid", "spyListeners", "enforceActions", "computedRequiresReaction", "reactionRequiresObservable", "observableRequiresReaction", "allowStateReads", "disableErrorBoundaries", "runId", "UNCHANGED", "useProxies"], mf = function() {
|
|
7804
7804
|
this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0;
|
|
7805
|
-
}, lh = !0, sP = !1,
|
|
7805
|
+
}, lh = !0, sP = !1, ve = /* @__PURE__ */ function() {
|
|
7806
7806
|
var e = /* @__PURE__ */ Dg();
|
|
7807
7807
|
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (lh = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new mf().version && (lh = !1), lh ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new mf()) : (setTimeout(function() {
|
|
7808
7808
|
sP || Se(35);
|
|
7809
7809
|
}, 1), new mf());
|
|
7810
7810
|
}();
|
|
7811
7811
|
function Y8() {
|
|
7812
|
-
if ((
|
|
7812
|
+
if ((ve.pendingReactions.length || ve.inBatch || ve.isRunningReactions) && Se(36), sP = !0, lh) {
|
|
7813
7813
|
var e = Dg();
|
|
7814
|
-
--e.__mobxInstanceCount === 0 && (e.__mobxGlobals = void 0),
|
|
7814
|
+
--e.__mobxInstanceCount === 0 && (e.__mobxGlobals = void 0), ve = new mf();
|
|
7815
7815
|
}
|
|
7816
7816
|
}
|
|
7817
7817
|
function J8() {
|
|
7818
|
-
return
|
|
7818
|
+
return ve;
|
|
7819
7819
|
}
|
|
7820
7820
|
function K8() {
|
|
7821
7821
|
var e = new mf();
|
|
7822
7822
|
for (var t in e)
|
|
7823
|
-
q8.indexOf(t) === -1 && (
|
|
7824
|
-
|
|
7823
|
+
q8.indexOf(t) === -1 && (ve[t] = e[t]);
|
|
7824
|
+
ve.allowStateChanges = !ve.enforceActions;
|
|
7825
7825
|
}
|
|
7826
7826
|
function X8(e) {
|
|
7827
7827
|
return e.observers_ && e.observers_.size > 0;
|
|
@@ -7836,25 +7836,25 @@ function aP(e, t) {
|
|
|
7836
7836
|
e.observers_.delete(t), e.observers_.size === 0 && lP(e);
|
|
7837
7837
|
}
|
|
7838
7838
|
function lP(e) {
|
|
7839
|
-
e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0,
|
|
7839
|
+
e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, ve.pendingUnobservations.push(e));
|
|
7840
7840
|
}
|
|
7841
7841
|
function Vr() {
|
|
7842
|
-
|
|
7842
|
+
ve.inBatch++;
|
|
7843
7843
|
}
|
|
7844
7844
|
function Ur() {
|
|
7845
|
-
if (--
|
|
7845
|
+
if (--ve.inBatch === 0) {
|
|
7846
7846
|
pP();
|
|
7847
|
-
for (var e =
|
|
7847
|
+
for (var e = ve.pendingUnobservations, t = 0; t < e.length; t++) {
|
|
7848
7848
|
var n = e[t];
|
|
7849
7849
|
n.isPendingUnobservation = !1, n.observers_.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBUO()), n instanceof Lo && n.suspend_());
|
|
7850
7850
|
}
|
|
7851
|
-
|
|
7851
|
+
ve.pendingUnobservations = [];
|
|
7852
7852
|
}
|
|
7853
7853
|
}
|
|
7854
7854
|
function cP(e) {
|
|
7855
7855
|
H8(e);
|
|
7856
|
-
var t =
|
|
7857
|
-
return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved &&
|
|
7856
|
+
var t = ve.trackingDerivation;
|
|
7857
|
+
return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && ve.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && ve.inBatch > 0 && lP(e), !1);
|
|
7858
7858
|
}
|
|
7859
7859
|
function uP(e) {
|
|
7860
7860
|
e.lowestObserverState_ !== Mt.STALE_ && (e.lowestObserverState_ = Mt.STALE_, e.observers_.forEach(function(t) {
|
|
@@ -7909,12 +7909,12 @@ var ni = /* @__PURE__ */ function() {
|
|
|
7909
7909
|
return t.onBecomeStale_ = function() {
|
|
7910
7910
|
this.schedule_();
|
|
7911
7911
|
}, t.schedule_ = function() {
|
|
7912
|
-
this.isScheduled || (this.isScheduled = !0,
|
|
7912
|
+
this.isScheduled || (this.isScheduled = !0, ve.pendingReactions.push(this), pP());
|
|
7913
7913
|
}, t.runReaction_ = function() {
|
|
7914
7914
|
if (!this.isDisposed) {
|
|
7915
7915
|
Vr(), this.isScheduled = !1;
|
|
7916
|
-
var r =
|
|
7917
|
-
if (
|
|
7916
|
+
var r = ve.trackingContext;
|
|
7917
|
+
if (ve.trackingContext = this, Xb(this)) {
|
|
7918
7918
|
this.isTrackPending = !0;
|
|
7919
7919
|
try {
|
|
7920
7920
|
this.onInvalidate_(), I.env.NODE_ENV !== "production" && this.isTrackPending && lr() && ol({
|
|
@@ -7925,7 +7925,7 @@ var ni = /* @__PURE__ */ function() {
|
|
|
7925
7925
|
this.reportExceptionInDerivation_(o);
|
|
7926
7926
|
}
|
|
7927
7927
|
}
|
|
7928
|
-
|
|
7928
|
+
ve.trackingContext = r, Ur();
|
|
7929
7929
|
}
|
|
7930
7930
|
}, t.track = function(r) {
|
|
7931
7931
|
if (!this.isDisposed) {
|
|
@@ -7935,10 +7935,10 @@ var ni = /* @__PURE__ */ function() {
|
|
|
7935
7935
|
name: this.name_,
|
|
7936
7936
|
type: "reaction"
|
|
7937
7937
|
})), this.isRunning = !0;
|
|
7938
|
-
var s =
|
|
7939
|
-
|
|
7938
|
+
var s = ve.trackingContext;
|
|
7939
|
+
ve.trackingContext = this;
|
|
7940
7940
|
var a = oP(this, r, void 0);
|
|
7941
|
-
|
|
7941
|
+
ve.trackingContext = s, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && Zb(this), ah(a) && this.reportExceptionInDerivation_(a.cause), I.env.NODE_ENV !== "production" && o && co({
|
|
7942
7942
|
time: Date.now() - i
|
|
7943
7943
|
}), Ur();
|
|
7944
7944
|
}
|
|
@@ -7948,15 +7948,15 @@ var ni = /* @__PURE__ */ function() {
|
|
|
7948
7948
|
this.errorHandler_(r, this);
|
|
7949
7949
|
return;
|
|
7950
7950
|
}
|
|
7951
|
-
if (
|
|
7951
|
+
if (ve.disableErrorBoundaries)
|
|
7952
7952
|
throw r;
|
|
7953
7953
|
var i = I.env.NODE_ENV !== "production" ? "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'" : "[mobx] uncaught error in '" + this + "'";
|
|
7954
|
-
|
|
7954
|
+
ve.suppressReactionErrors ? I.env.NODE_ENV !== "production" && console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)") : console.error(i, r), I.env.NODE_ENV !== "production" && lr() && ol({
|
|
7955
7955
|
type: "error",
|
|
7956
7956
|
name: this.name_,
|
|
7957
7957
|
message: i,
|
|
7958
7958
|
error: "" + r
|
|
7959
|
-
}),
|
|
7959
|
+
}), ve.globalReactionErrorHandlers.forEach(function(s) {
|
|
7960
7960
|
return s(r, o);
|
|
7961
7961
|
});
|
|
7962
7962
|
}, t.dispose = function() {
|
|
@@ -8018,25 +8018,25 @@ ni.isTrackPendingMask_ = 4;
|
|
|
8018
8018
|
ni.isRunningMask_ = 8;
|
|
8019
8019
|
ni.diffValueMask_ = 16;
|
|
8020
8020
|
function t7(e) {
|
|
8021
|
-
return
|
|
8022
|
-
var t =
|
|
8023
|
-
t >= 0 &&
|
|
8021
|
+
return ve.globalReactionErrorHandlers.push(e), function() {
|
|
8022
|
+
var t = ve.globalReactionErrorHandlers.indexOf(e);
|
|
8023
|
+
t >= 0 && ve.globalReactionErrorHandlers.splice(t, 1);
|
|
8024
8024
|
};
|
|
8025
8025
|
}
|
|
8026
8026
|
var OE = 100, Qb = function(t) {
|
|
8027
8027
|
return t();
|
|
8028
8028
|
};
|
|
8029
8029
|
function pP() {
|
|
8030
|
-
|
|
8030
|
+
ve.inBatch > 0 || ve.isRunningReactions || Qb(n7);
|
|
8031
8031
|
}
|
|
8032
8032
|
function n7() {
|
|
8033
|
-
|
|
8034
|
-
for (var e =
|
|
8033
|
+
ve.isRunningReactions = !0;
|
|
8034
|
+
for (var e = ve.pendingReactions, t = 0; e.length > 0; ) {
|
|
8035
8035
|
++t === OE && (console.error(I.env.NODE_ENV !== "production" ? "Reaction doesn't converge to a stable state after " + OE + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0]) : "[mobx] cycle in reaction: " + e[0]), e.splice(0));
|
|
8036
8036
|
for (var n = e.splice(0), r = 0, o = n.length; r < o; r++)
|
|
8037
8037
|
n[r].runReaction_();
|
|
8038
8038
|
}
|
|
8039
|
-
|
|
8039
|
+
ve.isRunningReactions = !1;
|
|
8040
8040
|
}
|
|
8041
8041
|
var Uh = /* @__PURE__ */ fa("Reaction", ni);
|
|
8042
8042
|
function r7(e) {
|
|
@@ -8048,11 +8048,11 @@ function r7(e) {
|
|
|
8048
8048
|
};
|
|
8049
8049
|
}
|
|
8050
8050
|
function lr() {
|
|
8051
|
-
return I.env.NODE_ENV !== "production" && !!
|
|
8051
|
+
return I.env.NODE_ENV !== "production" && !!ve.spyListeners.length;
|
|
8052
8052
|
}
|
|
8053
8053
|
function ol(e) {
|
|
8054
|
-
if (I.env.NODE_ENV !== "production" &&
|
|
8055
|
-
for (var t =
|
|
8054
|
+
if (I.env.NODE_ENV !== "production" && ve.spyListeners.length)
|
|
8055
|
+
for (var t = ve.spyListeners, n = 0, r = t.length; n < r; n++)
|
|
8056
8056
|
t[n](e);
|
|
8057
8057
|
}
|
|
8058
8058
|
function lo(e) {
|
|
@@ -8075,8 +8075,8 @@ function co(e) {
|
|
|
8075
8075
|
}
|
|
8076
8076
|
function hP(e) {
|
|
8077
8077
|
return I.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() {
|
|
8078
|
-
}) : (
|
|
8079
|
-
|
|
8078
|
+
}) : (ve.spyListeners.push(e), vw(function() {
|
|
8079
|
+
ve.spyListeners = ve.spyListeners.filter(function(t) {
|
|
8080
8080
|
return t !== e;
|
|
8081
8081
|
});
|
|
8082
8082
|
}));
|
|
@@ -8195,13 +8195,13 @@ var p7 = "never", yp = "always", h7 = "observed";
|
|
|
8195
8195
|
function SP(e) {
|
|
8196
8196
|
e.isolateGlobalState === !0 && Y8();
|
|
8197
8197
|
var t = e.useProxies, n = e.enforceActions;
|
|
8198
|
-
if (t !== void 0 && (
|
|
8198
|
+
if (t !== void 0 && (ve.useProxies = t === yp ? !0 : t === p7 ? !1 : typeof Proxy < "u"), t === "ifavailable" && (ve.verifyProxies = !0), n !== void 0) {
|
|
8199
8199
|
var r = n === yp ? yp : n === h7;
|
|
8200
|
-
|
|
8200
|
+
ve.enforceActions = r, ve.allowStateChanges = !(r === !0 || r === yp);
|
|
8201
8201
|
}
|
|
8202
8202
|
["computedRequiresReaction", "reactionRequiresObservable", "observableRequiresReaction", "disableErrorBoundaries", "safeDescriptors"].forEach(function(o) {
|
|
8203
|
-
o in e && (
|
|
8204
|
-
}),
|
|
8203
|
+
o in e && (ve[o] = !!e[o]);
|
|
8204
|
+
}), ve.allowStateReads = !ve.observableRequiresReaction, I.env.NODE_ENV !== "production" && ve.disableErrorBoundaries === !0 && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."), e.reactionScheduler && r7(e.reactionScheduler);
|
|
8205
8205
|
}
|
|
8206
8206
|
function Hg(e, t, n, r) {
|
|
8207
8207
|
I.env.NODE_ENV !== "production" && (arguments.length > 4 && Se("'extendObservable' expected 2-4 arguments"), typeof e != "object" && Se("'extendObservable' expects an object as first argument"), jn(e) && Se("'extendObservable' should not be used on maps, use map.merge instead"), Wr(t) || Se("'extendObservable' only accepts plain objects as second argument"), (Bo(t) || Bo(n)) && Se("Extending an object with another observable (object) is not supported"));
|
|
@@ -8508,7 +8508,7 @@ function IP() {
|
|
|
8508
8508
|
function R7(e) {
|
|
8509
8509
|
switch (e.length) {
|
|
8510
8510
|
case 0:
|
|
8511
|
-
return
|
|
8511
|
+
return ve.trackingDerivation;
|
|
8512
8512
|
case 1:
|
|
8513
8513
|
return oi(e[0]);
|
|
8514
8514
|
case 2:
|
|
@@ -8575,7 +8575,7 @@ function xa(e) {
|
|
|
8575
8575
|
}
|
|
8576
8576
|
var k7 = {
|
|
8577
8577
|
has: function(t, n) {
|
|
8578
|
-
return I.env.NODE_ENV !== "production" &&
|
|
8578
|
+
return I.env.NODE_ENV !== "production" && ve.trackingDerivation && ju("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."), xa(t).has_(n);
|
|
8579
8579
|
},
|
|
8580
8580
|
get: function(t, n) {
|
|
8581
8581
|
return xa(t).get_(n);
|
|
@@ -8593,7 +8593,7 @@ var k7 = {
|
|
|
8593
8593
|
return I.env.NODE_ENV !== "production" && ju("define property on an observable object. Use 'defineProperty' from 'mobx' instead."), (o = xa(t).defineProperty_(n, r)) != null ? o : !0;
|
|
8594
8594
|
},
|
|
8595
8595
|
ownKeys: function(t) {
|
|
8596
|
-
return I.env.NODE_ENV !== "production" &&
|
|
8596
|
+
return I.env.NODE_ENV !== "production" && ve.trackingDerivation && ju("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."), xa(t).ownKeys_();
|
|
8597
8597
|
},
|
|
8598
8598
|
preventExtensions: function(t) {
|
|
8599
8599
|
Se(13);
|
|
@@ -8872,10 +8872,10 @@ var _h = {
|
|
|
8872
8872
|
return t.spliceWithArray_(0, 0, r), t.values_.length;
|
|
8873
8873
|
},
|
|
8874
8874
|
reverse: function() {
|
|
8875
|
-
return
|
|
8875
|
+
return ve.trackingDerivation && Se(37, "reverse"), this.replace(this.slice().reverse()), this;
|
|
8876
8876
|
},
|
|
8877
8877
|
sort: function() {
|
|
8878
|
-
|
|
8878
|
+
ve.trackingDerivation && Se(37, "sort");
|
|
8879
8879
|
var t = this.slice();
|
|
8880
8880
|
return t.sort.apply(t, arguments), this.replace(t), this;
|
|
8881
8881
|
},
|
|
@@ -8957,7 +8957,7 @@ var B7 = {}, _s = "add", Wh = "delete", qg = /* @__PURE__ */ function() {
|
|
|
8957
8957
|
return this.data_.has(r);
|
|
8958
8958
|
}, t.has = function(r) {
|
|
8959
8959
|
var o = this;
|
|
8960
|
-
if (!
|
|
8960
|
+
if (!ve.trackingDerivation)
|
|
8961
8961
|
return this.has_(r);
|
|
8962
8962
|
var i = this.hasMap_.get(r);
|
|
8963
8963
|
if (!i) {
|
|
@@ -9011,7 +9011,7 @@ var B7 = {}, _s = "add", Wh = "delete", qg = /* @__PURE__ */ function() {
|
|
|
9011
9011
|
return !1;
|
|
9012
9012
|
}, t.updateValue_ = function(r, o) {
|
|
9013
9013
|
var i = this.data_.get(r);
|
|
9014
|
-
if (o = i.prepareNewValue_(o), o !==
|
|
9014
|
+
if (o = i.prepareNewValue_(o), o !== ve.UNCHANGED) {
|
|
9015
9015
|
var s = lr(), a = Qo(this), l = a || s ? {
|
|
9016
9016
|
observableKind: "map",
|
|
9017
9017
|
debugObjectName: this.name_,
|
|
@@ -9356,7 +9356,7 @@ var IE = /* @__PURE__ */ Object.create(null), kE = "remove", n0 = /* @__PURE__ *
|
|
|
9356
9356
|
return null;
|
|
9357
9357
|
o = s.newValue;
|
|
9358
9358
|
}
|
|
9359
|
-
if (o = i.prepareNewValue_(o), o !==
|
|
9359
|
+
if (o = i.prepareNewValue_(o), o !== ve.UNCHANGED) {
|
|
9360
9360
|
var a = Qo(this), l = I.env.NODE_ENV !== "production" && lr(), u = a || l ? {
|
|
9361
9361
|
type: Xo,
|
|
9362
9362
|
observableKind: "object",
|
|
@@ -9370,7 +9370,7 @@ var IE = /* @__PURE__ */ Object.create(null), kE = "remove", n0 = /* @__PURE__ *
|
|
|
9370
9370
|
}
|
|
9371
9371
|
return !0;
|
|
9372
9372
|
}, t.get_ = function(r) {
|
|
9373
|
-
return
|
|
9373
|
+
return ve.trackingDerivation && !ao(this.target_, r) && this.has_(r), this.target_[r];
|
|
9374
9374
|
}, t.set_ = function(r, o, i) {
|
|
9375
9375
|
return i === void 0 && (i = !1), ao(this.target_, r) ? this.values_.has(r) ? this.setObservablePropValue_(r, o) : i ? Reflect.set(this.target_, r, o) : (this.target_[r] = o, !0) : this.extend_(r, {
|
|
9376
9376
|
value: o,
|
|
@@ -9379,7 +9379,7 @@ var IE = /* @__PURE__ */ Object.create(null), kE = "remove", n0 = /* @__PURE__ *
|
|
|
9379
9379
|
configurable: !0
|
|
9380
9380
|
}, this.defaultAnnotation_, i);
|
|
9381
9381
|
}, t.has_ = function(r) {
|
|
9382
|
-
if (!
|
|
9382
|
+
if (!ve.trackingDerivation)
|
|
9383
9383
|
return r in this.target_;
|
|
9384
9384
|
this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map());
|
|
9385
9385
|
var o = this.pendingKeys_.get(r);
|
|
@@ -9461,7 +9461,7 @@ var IE = /* @__PURE__ */ Object.create(null), kE = "remove", n0 = /* @__PURE__ *
|
|
|
9461
9461
|
o = l.newValue;
|
|
9462
9462
|
}
|
|
9463
9463
|
var u = NE(r), c = {
|
|
9464
|
-
configurable:
|
|
9464
|
+
configurable: ve.safeDescriptors ? this.isPlainObject_ : !0,
|
|
9465
9465
|
enumerable: !0,
|
|
9466
9466
|
get: u.get,
|
|
9467
9467
|
set: u.set
|
|
@@ -9496,7 +9496,7 @@ var IE = /* @__PURE__ */ Object.create(null), kE = "remove", n0 = /* @__PURE__ *
|
|
|
9496
9496
|
}
|
|
9497
9497
|
o.name || (o.name = I.env.NODE_ENV !== "production" ? this.name_ + "." + r.toString() : "ObservableObject.key"), o.context = this.proxy_ || this.target_;
|
|
9498
9498
|
var l = NE(r), u = {
|
|
9499
|
-
configurable:
|
|
9499
|
+
configurable: ve.safeDescriptors ? this.isPlainObject_ : !0,
|
|
9500
9500
|
enumerable: !1,
|
|
9501
9501
|
get: l.get,
|
|
9502
9502
|
set: l.set
|
|
@@ -14246,7 +14246,7 @@ const Kn = Symbol("noDefaultValue"), Ww = {
|
|
|
14246
14246
|
return o._fromSnapshotProcessor = n, o._toSnapshotProcessor = r, o;
|
|
14247
14247
|
}
|
|
14248
14248
|
};
|
|
14249
|
-
function
|
|
14249
|
+
function ge(e) {
|
|
14250
14250
|
if (!(arguments.length >= 1))
|
|
14251
14251
|
return S2;
|
|
14252
14252
|
let n = x2.get(e);
|
|
@@ -16867,7 +16867,7 @@ function ms(e, t) {
|
|
|
16867
16867
|
}
|
|
16868
16868
|
const n = arguments.length >= 2, r = Pl(e);
|
|
16869
16869
|
return CU(r, n ? t : EU, () => {
|
|
16870
|
-
const o = n ? SU(r, u5, f5) : r, i = Object.create(n ?
|
|
16870
|
+
const o = n ? SU(r, u5, f5) : r, i = Object.create(n ? ge(t) : ge());
|
|
16871
16871
|
return Object.assign(i, {
|
|
16872
16872
|
_typeChecker: r,
|
|
16873
16873
|
_fromSnapshotProcessor: OU.bind(void 0, o),
|
|
@@ -16924,7 +16924,7 @@ const S5 = (e, t, n, r) => {
|
|
|
16924
16924
|
n.$[t] = o;
|
|
16925
16925
|
}, RU = (e, t, n, r) => n[_w] ? (S5(e, t, n, r), !0) : !1, x5 = () => Bd().modelIdGenerator(), E5 = ms(mu, x5);
|
|
16926
16926
|
E5._isId = !0;
|
|
16927
|
-
const C5 =
|
|
16927
|
+
const C5 = ge(x5);
|
|
16928
16928
|
C5._isId = !0;
|
|
16929
16929
|
function PU({ modelProps: e, baseModel: t, type: n, valueType: r, fromSnapshotProcessor: o, toSnapshotProcessor: i }) {
|
|
16930
16930
|
if (uu(e, "modelProps"), e = Object.assign(/* @__PURE__ */ Object.create(null), e), t) {
|
|
@@ -22600,12 +22600,12 @@ const Iz = (e, t) => {
|
|
|
22600
22600
|
return e[n];
|
|
22601
22601
|
};
|
|
22602
22602
|
let ea = class extends ur({
|
|
22603
|
-
id:
|
|
22604
|
-
username:
|
|
22605
|
-
displayName:
|
|
22606
|
-
avatarUrl:
|
|
22607
|
-
role:
|
|
22608
|
-
isMuted:
|
|
22603
|
+
id: ge(""),
|
|
22604
|
+
username: ge(() => ""),
|
|
22605
|
+
displayName: ge(() => ""),
|
|
22606
|
+
avatarUrl: ge(() => ""),
|
|
22607
|
+
role: ge(() => xu.User),
|
|
22608
|
+
isMuted: ge(() => !1)
|
|
22609
22609
|
}) {
|
|
22610
22610
|
get getAvatarColor() {
|
|
22611
22611
|
const e = Iz(Object.keys(Xf), this.displayName);
|
|
@@ -22632,11 +22632,11 @@ var kz = Object.defineProperty, Nz = Object.getOwnPropertyDescriptor, dv = (e, t
|
|
|
22632
22632
|
return r && o && kz(t, n, o), o;
|
|
22633
22633
|
};
|
|
22634
22634
|
let gl = class extends ur({
|
|
22635
|
-
me:
|
|
22636
|
-
accessToken:
|
|
22637
|
-
appId:
|
|
22638
|
-
isAuthorized:
|
|
22639
|
-
isAnonymousAllowed:
|
|
22635
|
+
me: ge(() => new ea({})),
|
|
22636
|
+
accessToken: ge(""),
|
|
22637
|
+
appId: ge("").withSetter(),
|
|
22638
|
+
isAuthorized: ge(!1).withSetter(),
|
|
22639
|
+
isAnonymousAllowed: ge(!1).withSetter()
|
|
22640
22640
|
}) {
|
|
22641
22641
|
setAccessToken(t) {
|
|
22642
22642
|
O4(t), this.accessToken = t, this.isAuthorized = !0, Az(t);
|
|
@@ -25013,20 +25013,20 @@ var jr = /* @__PURE__ */ ((e) => (e.New = "new", e.InProgress = "in_progress", e
|
|
|
25013
25013
|
return r && o && mY(t, n, o), o;
|
|
25014
25014
|
};
|
|
25015
25015
|
let Gc = class extends ur({
|
|
25016
|
-
id:
|
|
25017
|
-
question:
|
|
25018
|
-
isOpenEnded:
|
|
25019
|
-
withAnswer:
|
|
25020
|
-
isVoted:
|
|
25021
|
-
options:
|
|
25022
|
-
validOptions:
|
|
25023
|
-
templateId:
|
|
25024
|
-
createdAt:
|
|
25025
|
-
stoppedAt:
|
|
25026
|
-
status:
|
|
25027
|
-
votes:
|
|
25028
|
-
updatedAt:
|
|
25029
|
-
isMultiselect:
|
|
25016
|
+
id: ge(),
|
|
25017
|
+
question: ge(""),
|
|
25018
|
+
isOpenEnded: ge(() => !1),
|
|
25019
|
+
withAnswer: ge(() => !1),
|
|
25020
|
+
isVoted: ge(() => !1),
|
|
25021
|
+
options: ge(() => []),
|
|
25022
|
+
validOptions: ge(() => []),
|
|
25023
|
+
templateId: ge(),
|
|
25024
|
+
createdAt: ge(),
|
|
25025
|
+
stoppedAt: ge(),
|
|
25026
|
+
status: ge(() => jr.New).withSetter(),
|
|
25027
|
+
votes: ge(() => []),
|
|
25028
|
+
updatedAt: ge(),
|
|
25029
|
+
isMultiselect: ge()
|
|
25030
25030
|
}) {
|
|
25031
25031
|
changeStatus(e) {
|
|
25032
25032
|
this.setStatus(e);
|
|
@@ -25075,15 +25075,15 @@ var yY = Object.defineProperty, bY = Object.getOwnPropertyDescriptor, RS = (e, t
|
|
|
25075
25075
|
return r && o && yY(t, n, o), o;
|
|
25076
25076
|
}, ef = /* @__PURE__ */ ((e) => (e.UserJoinedEvent = "user-joined", e.UserChangedEvent = "user-changed", e.UserChangedChannelEvent = "user-changed-channel", e.ChangedChannelEvent = "changed-channel", e))(ef || {});
|
|
25077
25077
|
let $f = class extends ur({
|
|
25078
|
-
randomId:
|
|
25079
|
-
id:
|
|
25080
|
-
text:
|
|
25081
|
-
type:
|
|
25082
|
-
user:
|
|
25083
|
-
createdAt:
|
|
25084
|
-
meta:
|
|
25085
|
-
attachments:
|
|
25086
|
-
systemData:
|
|
25078
|
+
randomId: ge(),
|
|
25079
|
+
id: ge(),
|
|
25080
|
+
text: ge(),
|
|
25081
|
+
type: ge(),
|
|
25082
|
+
user: ge(),
|
|
25083
|
+
createdAt: ge(),
|
|
25084
|
+
meta: ge(),
|
|
25085
|
+
attachments: ge(),
|
|
25086
|
+
systemData: ge()
|
|
25087
25087
|
}) {
|
|
25088
25088
|
get getUser() {
|
|
25089
25089
|
var e;
|
|
@@ -25129,11 +25129,11 @@ var wY = Object.defineProperty, SY = Object.getOwnPropertyDescriptor, xY = (e, t
|
|
|
25129
25129
|
return r && o && wY(t, n, o), o;
|
|
25130
25130
|
};
|
|
25131
25131
|
let cm = class extends ur({
|
|
25132
|
-
id:
|
|
25133
|
-
channelId:
|
|
25134
|
-
messageId:
|
|
25135
|
-
message:
|
|
25136
|
-
user:
|
|
25132
|
+
id: ge(),
|
|
25133
|
+
channelId: ge(),
|
|
25134
|
+
messageId: ge(),
|
|
25135
|
+
message: ge(),
|
|
25136
|
+
user: ge()
|
|
25137
25137
|
}) {
|
|
25138
25138
|
};
|
|
25139
25139
|
cm = xY([
|
|
@@ -25292,24 +25292,24 @@ var dt = /* @__PURE__ */ ((e) => (e.Login = "login", e.Signup = "signup", e.Prof
|
|
|
25292
25292
|
return r && o && IY(t, n, o), o;
|
|
25293
25293
|
};
|
|
25294
25294
|
let zt = class extends ur({
|
|
25295
|
-
name:
|
|
25296
|
-
id:
|
|
25297
|
-
externalId:
|
|
25298
|
-
type:
|
|
25299
|
-
messages:
|
|
25300
|
-
directUsersOnly:
|
|
25301
|
-
polls:
|
|
25302
|
-
activePoll:
|
|
25295
|
+
name: ge(() => ""),
|
|
25296
|
+
id: ge(),
|
|
25297
|
+
externalId: ge(""),
|
|
25298
|
+
type: ge(Cn.Public),
|
|
25299
|
+
messages: ge(() => gh()),
|
|
25300
|
+
directUsersOnly: ge(() => []).withSetter(),
|
|
25301
|
+
polls: ge(() => []),
|
|
25302
|
+
activePoll: ge(() => {
|
|
25303
25303
|
}).withSetter(),
|
|
25304
|
-
pinnedMessages:
|
|
25305
|
-
settings:
|
|
25306
|
-
timeLimit:
|
|
25307
|
-
drafts:
|
|
25308
|
-
loaded:
|
|
25309
|
-
lastReadTimestamp:
|
|
25310
|
-
unreadMessagesCount:
|
|
25311
|
-
isSubmitDelayed:
|
|
25312
|
-
submitAttemptTime:
|
|
25304
|
+
pinnedMessages: ge(() => []),
|
|
25305
|
+
settings: ge().withSetter(),
|
|
25306
|
+
timeLimit: ge(-1),
|
|
25307
|
+
drafts: ge(() => new PY({})),
|
|
25308
|
+
loaded: ge(!1).withSetter(),
|
|
25309
|
+
lastReadTimestamp: ge(Date.now()).withSetter(),
|
|
25310
|
+
unreadMessagesCount: ge(0).withSetter(),
|
|
25311
|
+
isSubmitDelayed: ge(!1).withSetter(),
|
|
25312
|
+
submitAttemptTime: ge(0).withSetter()
|
|
25313
25313
|
}) {
|
|
25314
25314
|
onInit() {
|
|
25315
25315
|
Lf.register(this);
|
|
@@ -25580,8 +25580,8 @@ var NY = Object.defineProperty, jY = Object.getOwnPropertyDescriptor, MY = (e, t
|
|
|
25580
25580
|
return r && o && NY(t, n, o), o;
|
|
25581
25581
|
};
|
|
25582
25582
|
let $0 = class extends ur({
|
|
25583
|
-
id:
|
|
25584
|
-
name:
|
|
25583
|
+
id: ge(""),
|
|
25584
|
+
name: ge("")
|
|
25585
25585
|
}) {
|
|
25586
25586
|
};
|
|
25587
25587
|
$0 = MY([
|
|
@@ -25593,15 +25593,15 @@ var DY = Object.defineProperty, LY = Object.getOwnPropertyDescriptor, Dr = (e, t
|
|
|
25593
25593
|
return r && o && DY(t, n, o), o;
|
|
25594
25594
|
};
|
|
25595
25595
|
let tr = class extends ur({
|
|
25596
|
-
channels:
|
|
25597
|
-
pubs:
|
|
25598
|
-
users:
|
|
25596
|
+
channels: ge(() => gh()),
|
|
25597
|
+
pubs: ge(() => gh()),
|
|
25598
|
+
users: ge(() => gh()),
|
|
25599
25599
|
// repository
|
|
25600
|
-
directChatStartDateISOString:
|
|
25601
|
-
tabId:
|
|
25602
|
-
clientUniqueId:
|
|
25603
|
-
chatJoinAttemptId:
|
|
25604
|
-
joinGeneration:
|
|
25600
|
+
directChatStartDateISOString: ge(null).withSetter(),
|
|
25601
|
+
tabId: ge(void 0).withSetter(),
|
|
25602
|
+
clientUniqueId: ge(void 0).withSetter(),
|
|
25603
|
+
chatJoinAttemptId: ge(void 0).withSetter(),
|
|
25604
|
+
joinGeneration: ge(0).withSetter()
|
|
25605
25605
|
}) {
|
|
25606
25606
|
constructor() {
|
|
25607
25607
|
super(...arguments), this._hostEventBus = null, this.joinObserver = new zz(() => ({
|
|
@@ -25777,24 +25777,26 @@ var BY = Object.defineProperty, FY = Object.getOwnPropertyDescriptor, kS = (e, t
|
|
|
25777
25777
|
return r && o && BY(t, n, o), o;
|
|
25778
25778
|
};
|
|
25779
25779
|
let zc = class extends ur({
|
|
25780
|
-
createChannelAllowed:
|
|
25781
|
-
accessUnregisteredUsers:
|
|
25782
|
-
accessChatGuest:
|
|
25783
|
-
accessRegister:
|
|
25784
|
-
displayDirect:
|
|
25785
|
-
displayUserList:
|
|
25786
|
-
displayChannelList:
|
|
25787
|
-
displaySystemMessages:
|
|
25788
|
-
displayHeader:
|
|
25789
|
-
displayFooter:
|
|
25790
|
-
socketUrl:
|
|
25791
|
-
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
|
|
25795
|
-
|
|
25796
|
-
|
|
25797
|
-
|
|
25780
|
+
createChannelAllowed: ge(!1).withSetter(),
|
|
25781
|
+
accessUnregisteredUsers: ge(!1).withSetter(),
|
|
25782
|
+
accessChatGuest: ge(!1).withSetter(),
|
|
25783
|
+
accessRegister: ge(!1).withSetter(),
|
|
25784
|
+
displayDirect: ge(!1).withSetter(),
|
|
25785
|
+
displayUserList: ge(!1).withSetter(),
|
|
25786
|
+
displayChannelList: ge(!1).withSetter(),
|
|
25787
|
+
displaySystemMessages: ge(!1).withSetter(),
|
|
25788
|
+
displayHeader: ge(!1).withSetter(),
|
|
25789
|
+
displayFooter: ge(!1).withSetter(),
|
|
25790
|
+
socketUrl: ge("").withSetter(),
|
|
25791
|
+
socketTransportEndpoints: ge(() => []).withSetter(),
|
|
25792
|
+
socketEmulationEndpoint: ge("").withSetter(),
|
|
25793
|
+
showCloseButton: ge(!0).withSetter(),
|
|
25794
|
+
showHeader: ge(!0).withSetter(),
|
|
25795
|
+
showMessageInput: ge(!0).withSetter(),
|
|
25796
|
+
showOpenInPopupButton: ge(!1).withSetter(),
|
|
25797
|
+
showPolls: ge(!0).withSetter(),
|
|
25798
|
+
showImagesPreview: ge(!0).withSetter(),
|
|
25799
|
+
previewImageMaxSize: ge(0).withSetter()
|
|
25798
25800
|
}) {
|
|
25799
25801
|
setAll({
|
|
25800
25802
|
createChannelAllowed: e = !1,
|
|
@@ -25807,9 +25809,11 @@ let zc = class extends ur({
|
|
|
25807
25809
|
displaySystemMessages: a = !1,
|
|
25808
25810
|
displayHeader: l = !1,
|
|
25809
25811
|
displayFooter: u = !1,
|
|
25810
|
-
socketUrl: c
|
|
25812
|
+
socketUrl: c,
|
|
25813
|
+
socketTransportEndpoints: p = [],
|
|
25814
|
+
socketEmulationEndpoint: d = ""
|
|
25811
25815
|
}) {
|
|
25812
|
-
this.createChannelAllowed = e, this.accessRegister = r, this.accessChatGuest = n, this.accessUnregisteredUsers = t, this.displayDirect = o, this.displayUserList = i, this.displayChannelList = s, this.displaySystemMessages = a, this.displayHeader = l, this.displayFooter = u, this.socketUrl = c;
|
|
25816
|
+
this.createChannelAllowed = e, this.accessRegister = r, this.accessChatGuest = n, this.accessUnregisteredUsers = t, this.displayDirect = o, this.displayUserList = i, this.displayChannelList = s, this.displaySystemMessages = a, this.displayHeader = l, this.displayFooter = u, this.socketUrl = c, this.socketTransportEndpoints = p, this.socketEmulationEndpoint = d;
|
|
25813
25817
|
}
|
|
25814
25818
|
get authMode() {
|
|
25815
25819
|
return {
|
|
@@ -28431,7 +28435,7 @@ var RJ = Object.defineProperty, PJ = Object.getOwnPropertyDescriptor, cI = (e, t
|
|
|
28431
28435
|
return r && o && RJ(t, n, o), o;
|
|
28432
28436
|
};
|
|
28433
28437
|
let td = class extends ur({
|
|
28434
|
-
isSocketConnected:
|
|
28438
|
+
isSocketConnected: ge(!1).withSetter()
|
|
28435
28439
|
}) {
|
|
28436
28440
|
constructor() {
|
|
28437
28441
|
super(...arguments), this.messageChunk = [], this.messageRate = 0;
|
|
@@ -28479,7 +28483,12 @@ let td = class extends ur({
|
|
|
28479
28483
|
};
|
|
28480
28484
|
}
|
|
28481
28485
|
async connect(e, t, n) {
|
|
28482
|
-
De.info("Start connecting to socket", {
|
|
28486
|
+
De.info("Start connecting to socket", {
|
|
28487
|
+
socketUrl: e.socketUrl,
|
|
28488
|
+
socketTransportEndpoints: e.socketTransportEndpoints,
|
|
28489
|
+
socketEmulationEndpoint: e.centrifugeOptions.emulationEndpoint,
|
|
28490
|
+
configuredTransportOrder: e.configuredTransportOrder
|
|
28491
|
+
});
|
|
28483
28492
|
const r = qf(this), o = !!n, i = n ? r.chat.joinObserver.getJoinTraceContext() : r.chat.joinObserver.getRuntimeTraceContext(), s = Date.now();
|
|
28484
28493
|
let a = !1;
|
|
28485
28494
|
const l = () => r.socket === this, u = () => l() && (!n || r.isActiveJoinAttempt(n)), c = () => l() && (!n || !r.isJoinInFlight() || r.isActiveJoinAttempt(n)), p = (D, U) => {
|
|
@@ -28489,7 +28498,7 @@ let td = class extends ur({
|
|
|
28489
28498
|
error: U
|
|
28490
28499
|
}));
|
|
28491
28500
|
};
|
|
28492
|
-
o && r.chat.joinObserver.socketConnectStarted(e, t);
|
|
28501
|
+
o && r.chat.joinObserver.socketConnectStarted(e.socketUrl, t);
|
|
28493
28502
|
const d = ({ channelId: D, message: U }) => {
|
|
28494
28503
|
this.messageRate += 1, Nc(() => this.messageChunk.push({ channelId: D, message: U }));
|
|
28495
28504
|
}, m = async (D) => {
|
|
@@ -28597,9 +28606,10 @@ let td = class extends ur({
|
|
|
28597
28606
|
})), U;
|
|
28598
28607
|
}
|
|
28599
28608
|
};
|
|
28600
|
-
this.centrifuge = new gv(
|
|
28609
|
+
this.centrifuge = new gv(e.centrifugeEndpoint, {
|
|
28601
28610
|
getToken: B,
|
|
28602
|
-
debug: !0
|
|
28611
|
+
debug: !0,
|
|
28612
|
+
...e.centrifugeOptions
|
|
28603
28613
|
}), this.centrifuge.on("join", ({ channel: D, info: U }) => {
|
|
28604
28614
|
De.info("Centrifuge joined to channel", { channel: D, info: U });
|
|
28605
28615
|
}), this.centrifuge.on("leave", ({ channel: D, info: U }) => {
|
|
@@ -29948,14 +29958,14 @@ var BJ = Object.defineProperty, FJ = Object.getOwnPropertyDescriptor, Kd = (e, t
|
|
|
29948
29958
|
return r && o && BJ(t, n, o), o;
|
|
29949
29959
|
};
|
|
29950
29960
|
let ta = class extends ur({
|
|
29951
|
-
route:
|
|
29952
|
-
channelId:
|
|
29953
|
-
parentChannelId:
|
|
29954
|
-
lang:
|
|
29955
|
-
params:
|
|
29956
|
-
isVisible:
|
|
29957
|
-
isMobile:
|
|
29958
|
-
chatVisualState:
|
|
29961
|
+
route: ge(""),
|
|
29962
|
+
channelId: ge("").withSetter(),
|
|
29963
|
+
parentChannelId: ge("").withSetter(),
|
|
29964
|
+
lang: ge(navigator.language.toLowerCase().includes("ru") ? "ru" : "en").withSetter(),
|
|
29965
|
+
params: ge(() => ({})).withSetter(),
|
|
29966
|
+
isVisible: ge(!1).withSetter(),
|
|
29967
|
+
isMobile: ge(BS()),
|
|
29968
|
+
chatVisualState: ge(Zf.Hidden).withSetter()
|
|
29959
29969
|
}) {
|
|
29960
29970
|
constructor() {
|
|
29961
29971
|
super(...arguments), this.messageListDimensions = null, this.jumpToMessage = () => {
|
|
@@ -29995,13 +30005,13 @@ var VJ = Object.defineProperty, UJ = Object.getOwnPropertyDescriptor, ga = (e, t
|
|
|
29995
30005
|
return r && o && VJ(t, n, o), o;
|
|
29996
30006
|
};
|
|
29997
30007
|
let qi = class extends ur({
|
|
29998
|
-
chat:
|
|
29999
|
-
auth:
|
|
30000
|
-
socket:
|
|
30001
|
-
ui:
|
|
30002
|
-
settings:
|
|
30003
|
-
toggleReset:
|
|
30004
|
-
unreadMsgsCount:
|
|
30008
|
+
chat: ge(() => new tr({})),
|
|
30009
|
+
auth: ge(() => new gl({})),
|
|
30010
|
+
socket: ge(() => new td({})),
|
|
30011
|
+
ui: ge(() => new ta({})),
|
|
30012
|
+
settings: ge(() => new zc({})),
|
|
30013
|
+
toggleReset: ge(!1),
|
|
30014
|
+
unreadMsgsCount: ge(0).withSetter()
|
|
30005
30015
|
// for initial channel
|
|
30006
30016
|
}) {
|
|
30007
30017
|
constructor() {
|
|
@@ -55268,7 +55278,7 @@ const qae = /* @__PURE__ */ Kt(() => {
|
|
|
55268
55278
|
/* @__PURE__ */ h.jsx(Xae, {})
|
|
55269
55279
|
] }) });
|
|
55270
55280
|
}), {
|
|
55271
|
-
Component:
|
|
55281
|
+
Component: Sde,
|
|
55272
55282
|
usePublisher: No,
|
|
55273
55283
|
useEmitterValue: bn,
|
|
55274
55284
|
useEmitter: KN
|
|
@@ -59482,18 +59492,44 @@ const zue = (e) => {
|
|
|
59482
59492
|
)
|
|
59483
59493
|
] })
|
|
59484
59494
|
] });
|
|
59485
|
-
}), sfe = (e
|
|
59495
|
+
}), sfe = "cf_protocol_version", afe = "v2", lfe = (e) => {
|
|
59496
|
+
const t = new URL(e, window.location.href);
|
|
59497
|
+
return t.searchParams.set(sfe, afe), t.toString();
|
|
59498
|
+
}, cfe = (e) => (e ?? []).filter(({ endpoint: t }) => t).map(({ transport: t, endpoint: n }) => ({
|
|
59499
|
+
transport: t,
|
|
59500
|
+
endpoint: n
|
|
59501
|
+
})), ufe = ({
|
|
59502
|
+
socketUrl: e,
|
|
59503
|
+
socketTransportEndpoints: t,
|
|
59504
|
+
socketEmulationEndpoint: n
|
|
59505
|
+
}) => {
|
|
59506
|
+
const r = cfe(t), o = r.length > 0, i = o ? r : lfe(e);
|
|
59507
|
+
return {
|
|
59508
|
+
socketUrl: e,
|
|
59509
|
+
centrifugeEndpoint: i,
|
|
59510
|
+
socketTransportEndpoints: r,
|
|
59511
|
+
centrifugeOptions: o && n ? { emulationEndpoint: n } : {},
|
|
59512
|
+
configuredTransportOrder: o ? r.map(({ transport: s }) => s) : ["websocket"]
|
|
59513
|
+
};
|
|
59514
|
+
}, ffe = (e, t) => {
|
|
59486
59515
|
if (!e)
|
|
59487
59516
|
return "loadingSocket";
|
|
59488
59517
|
if (!t)
|
|
59489
59518
|
return "loadingInitial";
|
|
59490
|
-
},
|
|
59519
|
+
}, dfe = ({ children: e }) => {
|
|
59491
59520
|
const t = rt(), { enqueueSnackbar: n } = Cu(), [r, o] = Ze(!1);
|
|
59492
59521
|
ht(() => Zs(async () => {
|
|
59493
59522
|
if (!t.socket.isSocketConnected) {
|
|
59494
59523
|
const s = t.getCurrentJoinScope();
|
|
59495
59524
|
try {
|
|
59496
|
-
|
|
59525
|
+
if (t.settings.socketUrl) {
|
|
59526
|
+
const a = ufe({
|
|
59527
|
+
socketUrl: t.settings.socketUrl,
|
|
59528
|
+
socketTransportEndpoints: t.settings.socketTransportEndpoints,
|
|
59529
|
+
socketEmulationEndpoint: t.settings.socketEmulationEndpoint
|
|
59530
|
+
});
|
|
59531
|
+
await t.socket.connect(a, t.ui.channelId, s);
|
|
59532
|
+
}
|
|
59497
59533
|
} catch (a) {
|
|
59498
59534
|
if (s && !t.isActiveJoinAttempt(s))
|
|
59499
59535
|
return;
|
|
@@ -59528,12 +59564,12 @@ const zue = (e) => {
|
|
|
59528
59564
|
}
|
|
59529
59565
|
}
|
|
59530
59566
|
), []);
|
|
59531
|
-
const i =
|
|
59567
|
+
const i = ffe(t.socket.isSocketConnected, r);
|
|
59532
59568
|
return i ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
59533
59569
|
/* @__PURE__ */ h.jsx(Cd, { color: "secondary" }),
|
|
59534
59570
|
/* @__PURE__ */ h.jsx(PI, { intlId: i })
|
|
59535
59571
|
] }) : /* @__PURE__ */ h.jsx(h.Fragment, { children: e });
|
|
59536
|
-
},
|
|
59572
|
+
}, pfe = ot(dfe), hfe = ut(
|
|
59537
59573
|
{
|
|
59538
59574
|
userRow: {
|
|
59539
59575
|
padding: "12px 16px",
|
|
@@ -59553,8 +59589,8 @@ const zue = (e) => {
|
|
|
59553
59589
|
}
|
|
59554
59590
|
},
|
|
59555
59591
|
{ name: "UserRow" }
|
|
59556
|
-
),
|
|
59557
|
-
const t = _n(), { user: n, displayDirect: r, openNewChat: o } = e, i =
|
|
59592
|
+
), mfe = (e) => {
|
|
59593
|
+
const t = _n(), { user: n, displayDirect: r, openNewChat: o } = e, i = hfe(), [s, a] = Ze(!1), l = async () => {
|
|
59558
59594
|
try {
|
|
59559
59595
|
a(!0), await o(n);
|
|
59560
59596
|
} finally {
|
|
@@ -59576,7 +59612,7 @@ const zue = (e) => {
|
|
|
59576
59612
|
/* @__PURE__ */ h.jsx(Ne, { item: !0, component: be, style: { marginLeft: 9 }, children: n.displayName }),
|
|
59577
59613
|
r && /* @__PURE__ */ h.jsx(Ne, { item: !0, className: i.sendMessageBtn, id: "sendMessageBtn", onClick: l, children: s ? t.formatMessage({ id: "loading" }) : /* @__PURE__ */ h.jsx(rie, {}) })
|
|
59578
59614
|
] }) : null;
|
|
59579
|
-
},
|
|
59615
|
+
}, gfe = (e) => {
|
|
59580
59616
|
const t = _n(), n = rt(), { settings: r } = n, [o, i] = Ze(""), { users: s } = e, a = $r(
|
|
59581
59617
|
() => o ? s.filter((c) => c.displayName.includes(o)) : s,
|
|
59582
59618
|
[o]
|
|
@@ -59601,25 +59637,25 @@ const zue = (e) => {
|
|
|
59601
59637
|
/* @__PURE__ */ h.jsx(pj, { fill: G.PRIMARY }),
|
|
59602
59638
|
/* @__PURE__ */ h.jsx(be, { style: { marginLeft: 8 }, children: a.length })
|
|
59603
59639
|
] }),
|
|
59604
|
-
/* @__PURE__ */ h.jsx(Ne, { item: !0, container: !0, wrap: "nowrap", direction: "column", overflow: "auto", children: a.map((c) => /* @__PURE__ */ h.jsx(
|
|
59640
|
+
/* @__PURE__ */ h.jsx(Ne, { item: !0, container: !0, wrap: "nowrap", direction: "column", overflow: "auto", children: a.map((c) => /* @__PURE__ */ h.jsx(mfe, { user: c, displayDirect: r.displayDirect, openNewChat: u }, c.id)) })
|
|
59605
59641
|
] });
|
|
59606
|
-
},
|
|
59642
|
+
}, vfe = ot(gfe), yfe = () => {
|
|
59607
59643
|
const { ui: e, chat: t } = rt();
|
|
59608
59644
|
let n;
|
|
59609
59645
|
const r = String(e.params.id);
|
|
59610
59646
|
return t.channels.get(r) ? n = Array.from(t.users.values()) : n = t.userList, /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
59611
59647
|
/* @__PURE__ */ h.jsx(va, { onBack: () => e.back(), children: /* @__PURE__ */ h.jsx(ti, { children: /* @__PURE__ */ h.jsx(Oe, { id: "userList" }) }) }),
|
|
59612
|
-
/* @__PURE__ */ h.jsx(
|
|
59648
|
+
/* @__PURE__ */ h.jsx(vfe, { users: n })
|
|
59613
59649
|
] });
|
|
59614
|
-
}, AA = ot(
|
|
59650
|
+
}, AA = ot(yfe), bfe = "@vlprojects-chat/chat", wfe = "vlprojects", Sfe = "0.27.0-LK-6357-centrifuge-sse.1", xfe = "vlprojects chat", Efe = "ISC", Cfe = "dist/index.d.ts", Ofe = "./dist/index.mjs", Tfe = "./dist/index.mjs", Afe = [
|
|
59615
59651
|
"dist"
|
|
59616
|
-
],
|
|
59652
|
+
], Rfe = {
|
|
59617
59653
|
type: "git",
|
|
59618
59654
|
url: "https://github.com/VLprojects/lsd-chat-react.git"
|
|
59619
|
-
},
|
|
59655
|
+
}, Pfe = {
|
|
59620
59656
|
start: "vite",
|
|
59621
59657
|
build: "tsc --noEmit && vite build --mode production"
|
|
59622
|
-
},
|
|
59658
|
+
}, Ife = {
|
|
59623
59659
|
production: [
|
|
59624
59660
|
">0.2%",
|
|
59625
59661
|
"not dead",
|
|
@@ -59630,7 +59666,7 @@ const zue = (e) => {
|
|
|
59630
59666
|
"last 1 firefox version",
|
|
59631
59667
|
"last 1 safari version"
|
|
59632
59668
|
]
|
|
59633
|
-
},
|
|
59669
|
+
}, kfe = {
|
|
59634
59670
|
"@emotion/css": "^11.13.4",
|
|
59635
59671
|
"@emotion/react": "^11.13.3",
|
|
59636
59672
|
"@emotion/styled": "^11.13.0",
|
|
@@ -59667,7 +59703,7 @@ const zue = (e) => {
|
|
|
59667
59703
|
"serialize-error": "^11.0.3",
|
|
59668
59704
|
"ua-parser-js": "^1.0.39",
|
|
59669
59705
|
uuid: "^11.0.2"
|
|
59670
|
-
},
|
|
59706
|
+
}, Nfe = {
|
|
59671
59707
|
"@babel/core": "^7.26.0",
|
|
59672
59708
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
59673
59709
|
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
@@ -59718,45 +59754,45 @@ const zue = (e) => {
|
|
|
59718
59754
|
vite: "^5.4.10",
|
|
59719
59755
|
"vite-plugin-node-polyfills": "^0.22.0",
|
|
59720
59756
|
"vite-tsconfig-paths": "^5.0.1"
|
|
59721
|
-
},
|
|
59757
|
+
}, jfe = {
|
|
59722
59758
|
"mobx-event-bus2": "^2.0.0",
|
|
59723
59759
|
react: "^17.0.2",
|
|
59724
59760
|
"react-dom": "^17.0.2"
|
|
59725
|
-
},
|
|
59761
|
+
}, Mfe = {
|
|
59726
59762
|
url: "https://github.com/VLprojects/lsd-chat-react/issues"
|
|
59727
|
-
},
|
|
59763
|
+
}, Dfe = "https://github.com/VLprojects/lsd-chat-react#readme", Lfe = [
|
|
59728
59764
|
"chat"
|
|
59729
|
-
],
|
|
59765
|
+
], Bfe = {
|
|
59730
59766
|
"react-select/**/@emotion/react": "^11.13.3",
|
|
59731
59767
|
"@vlprojects-chat/chat/**/@emotion/react": "^11.13.3",
|
|
59732
59768
|
"react-select/**/@emotion/styled": "^11.13.0",
|
|
59733
59769
|
"@vlprojects-chat/chat/**/@emotion/styled": "^11.13.0",
|
|
59734
59770
|
"@types/react": "^17.0.83",
|
|
59735
59771
|
"@vlprojects-chat/chat/**/@emotion/css": "^11.13.4"
|
|
59736
|
-
},
|
|
59737
|
-
name:
|
|
59738
|
-
author:
|
|
59739
|
-
version:
|
|
59740
|
-
description:
|
|
59741
|
-
license:
|
|
59742
|
-
types:
|
|
59743
|
-
main:
|
|
59744
|
-
module:
|
|
59745
|
-
files:
|
|
59746
|
-
repository:
|
|
59747
|
-
scripts:
|
|
59748
|
-
browserslist:
|
|
59749
|
-
dependencies:
|
|
59772
|
+
}, Ffe = {
|
|
59773
|
+
name: bfe,
|
|
59774
|
+
author: wfe,
|
|
59775
|
+
version: Sfe,
|
|
59776
|
+
description: xfe,
|
|
59777
|
+
license: Efe,
|
|
59778
|
+
types: Cfe,
|
|
59779
|
+
main: Ofe,
|
|
59780
|
+
module: Tfe,
|
|
59781
|
+
files: Afe,
|
|
59782
|
+
repository: Rfe,
|
|
59783
|
+
scripts: Pfe,
|
|
59784
|
+
browserslist: Ife,
|
|
59785
|
+
dependencies: kfe,
|
|
59750
59786
|
"lint-staged": {
|
|
59751
59787
|
"*.{js,jsx,ts,tsx,json,css,scss,md}": "prettier --write"
|
|
59752
59788
|
},
|
|
59753
|
-
devDependencies:
|
|
59754
|
-
peerDependencies:
|
|
59755
|
-
bugs:
|
|
59756
|
-
homepage:
|
|
59757
|
-
keywords:
|
|
59758
|
-
resolutions:
|
|
59759
|
-
},
|
|
59789
|
+
devDependencies: Nfe,
|
|
59790
|
+
peerDependencies: jfe,
|
|
59791
|
+
bugs: Mfe,
|
|
59792
|
+
homepage: Dfe,
|
|
59793
|
+
keywords: Lfe,
|
|
59794
|
+
resolutions: Bfe
|
|
59795
|
+
}, Vfe = ({
|
|
59760
59796
|
onClose: e
|
|
59761
59797
|
}) => {
|
|
59762
59798
|
const t = {
|
|
@@ -59771,7 +59807,7 @@ const zue = (e) => {
|
|
|
59771
59807
|
padding: 0
|
|
59772
59808
|
};
|
|
59773
59809
|
return /* @__PURE__ */ h.jsx("div", { style: t, children: /* @__PURE__ */ h.jsx(zn, { onClick: e, sx: n, children: /* @__PURE__ */ h.jsx(One, {}) }) });
|
|
59774
|
-
},
|
|
59810
|
+
}, Ufe = async (e, t) => {
|
|
59775
59811
|
const n = e.isOpenEnded ? { answer: t[0].trim(), poll_id: +e.id } : { ids: t.map(Number) };
|
|
59776
59812
|
return await Zr("polls/vote", n);
|
|
59777
59813
|
}, Aj = (e) => {
|
|
@@ -59810,7 +59846,7 @@ const zue = (e) => {
|
|
|
59810
59846
|
children: /* @__PURE__ */ h.jsx(Oe, { id: "reply" })
|
|
59811
59847
|
}
|
|
59812
59848
|
);
|
|
59813
|
-
},
|
|
59849
|
+
}, _fe = (e) => {
|
|
59814
59850
|
const { poll: t, voteHandler: n } = e, [r, o] = Ze(
|
|
59815
59851
|
t.options.reduce((a, l) => ({ ...a, [l.id]: !1 }), {})
|
|
59816
59852
|
), i = !Object.values(r).find((a) => a), s = (a) => () => {
|
|
@@ -59843,7 +59879,7 @@ const zue = (e) => {
|
|
|
59843
59879
|
}
|
|
59844
59880
|
) })
|
|
59845
59881
|
] });
|
|
59846
|
-
},
|
|
59882
|
+
}, Wfe = ut(
|
|
59847
59883
|
{
|
|
59848
59884
|
input: {
|
|
59849
59885
|
background: G.SECONDARY_01,
|
|
@@ -59856,8 +59892,8 @@ const zue = (e) => {
|
|
|
59856
59892
|
}
|
|
59857
59893
|
},
|
|
59858
59894
|
{ name: "Textarea" }
|
|
59859
|
-
), RA = 1, PA = 200,
|
|
59860
|
-
const { voteHandler: t } = e, n =
|
|
59895
|
+
), RA = 1, PA = 200, Hfe = (e) => {
|
|
59896
|
+
const { voteHandler: t } = e, n = Wfe(), r = _n(), [o, i] = Ze(""), [s, a] = Ze(!1), [l, u] = Ze(""), c = (p) => {
|
|
59861
59897
|
const d = p.target.value;
|
|
59862
59898
|
d.trim().length < RA ? (u(
|
|
59863
59899
|
r.formatMessage({ id: "pollValidateAnswerLongerLetters" }, { length: RA })
|
|
@@ -59883,7 +59919,7 @@ const zue = (e) => {
|
|
|
59883
59919
|
l && /* @__PURE__ */ h.jsx(be, { textAlign: "center", py: 1.5, children: l }),
|
|
59884
59920
|
/* @__PURE__ */ h.jsx(Ne, { children: /* @__PURE__ */ h.jsx(Rj, { disabled: !s, onSubmit: () => t([o]), dataQA: "deployReply" }) })
|
|
59885
59921
|
] });
|
|
59886
|
-
},
|
|
59922
|
+
}, Gfe = (e) => {
|
|
59887
59923
|
const { poll: t, voteHandler: n } = e, r = (o) => () => {
|
|
59888
59924
|
n([o]);
|
|
59889
59925
|
};
|
|
@@ -59896,17 +59932,17 @@ const zue = (e) => {
|
|
|
59896
59932
|
},
|
|
59897
59933
|
o.id
|
|
59898
59934
|
)) }) });
|
|
59899
|
-
},
|
|
59935
|
+
}, zfe = (e) => {
|
|
59900
59936
|
const { poll: t, channel: n } = e, r = async (o) => {
|
|
59901
59937
|
try {
|
|
59902
|
-
const i = await
|
|
59938
|
+
const i = await Ufe(t, o);
|
|
59903
59939
|
n.setPollVoted(o, i);
|
|
59904
59940
|
} catch (i) {
|
|
59905
59941
|
De.error("Failed to vote", { case: "voteHandler", error: i, pollId: t.id });
|
|
59906
59942
|
}
|
|
59907
59943
|
};
|
|
59908
|
-
return t.isOpenEnded ? /* @__PURE__ */ h.jsx(
|
|
59909
|
-
},
|
|
59944
|
+
return t.isOpenEnded ? /* @__PURE__ */ h.jsx(Hfe, { voteHandler: r }) : t.withAnswer ? /* @__PURE__ */ h.jsx(Gfe, { poll: t, voteHandler: r }) : /* @__PURE__ */ h.jsx(_fe, { poll: t, voteHandler: r });
|
|
59945
|
+
}, qfe = ut({
|
|
59910
59946
|
progress: {
|
|
59911
59947
|
border: "1px solid #F3F2F9",
|
|
59912
59948
|
borderRadius: 10,
|
|
@@ -59919,14 +59955,14 @@ const zue = (e) => {
|
|
|
59919
59955
|
progressLine: {
|
|
59920
59956
|
borderRadius: 10
|
|
59921
59957
|
}
|
|
59922
|
-
}),
|
|
59958
|
+
}), Yfe = (e) => {
|
|
59923
59959
|
const t = getComputedStyle(document.body), n = e.match(/var\((.+)\)/);
|
|
59924
59960
|
if (!n || n.length < 2)
|
|
59925
59961
|
return "#000";
|
|
59926
59962
|
const r = n[1];
|
|
59927
59963
|
return t.getPropertyValue(r);
|
|
59928
|
-
},
|
|
59929
|
-
const e = rt(), { auth: t, initialChannel: n } = e, r = n == null ? void 0 : n.getActivePoll, o =
|
|
59964
|
+
}, Jfe = () => {
|
|
59965
|
+
const e = rt(), { auth: t, initialChannel: n } = e, r = n == null ? void 0 : n.getActivePoll, o = qfe();
|
|
59930
59966
|
if (!r)
|
|
59931
59967
|
return null;
|
|
59932
59968
|
const i = r.options.reduce((s, a) => s + a.votesCount, 0);
|
|
@@ -59939,7 +59975,7 @@ const zue = (e) => {
|
|
|
59939
59975
|
return G.SUCCESS_BASE;
|
|
59940
59976
|
if (s.isVoted) {
|
|
59941
59977
|
const u = G[t.me.getAvatarColor];
|
|
59942
|
-
return
|
|
59978
|
+
return Yfe(u);
|
|
59943
59979
|
} else return s.votesCount > 0 ? G.SECONDARY_01 : G.BG;
|
|
59944
59980
|
}, l = (u) => u === G.SECONDARY_01 ? G.BG : `color-mix(in srgb,${u}, #fff 50%)`;
|
|
59945
59981
|
return /* @__PURE__ */ h.jsxs(
|
|
@@ -59989,7 +60025,7 @@ const zue = (e) => {
|
|
|
59989
60025
|
s.id
|
|
59990
60026
|
);
|
|
59991
60027
|
}) }) });
|
|
59992
|
-
},
|
|
60028
|
+
}, Kfe = ot(Jfe), Xfe = ut(
|
|
59993
60029
|
{
|
|
59994
60030
|
root: {
|
|
59995
60031
|
display: "flex",
|
|
@@ -60041,7 +60077,7 @@ const zue = (e) => {
|
|
|
60041
60077
|
{
|
|
60042
60078
|
name: "PollPortal"
|
|
60043
60079
|
}
|
|
60044
|
-
),
|
|
60080
|
+
), Zfe = (e, t) => {
|
|
60045
60081
|
const n = mn(null), [r, o] = Ze(null), i = mn(0), s = mn(100), a = mn(void 0), l = (v) => {
|
|
60046
60082
|
var y;
|
|
60047
60083
|
if (!t)
|
|
@@ -60085,16 +60121,16 @@ const zue = (e) => {
|
|
|
60085
60121
|
dragRef: o,
|
|
60086
60122
|
setInitialHeight: l
|
|
60087
60123
|
};
|
|
60088
|
-
},
|
|
60124
|
+
}, Qfe = () => {
|
|
60089
60125
|
let e = document.getElementById(DC);
|
|
60090
60126
|
return e || (e = document.createElement("div"), e.id = DC, document.body.appendChild(e)), e;
|
|
60091
|
-
},
|
|
60127
|
+
}, $fe = ({ currentChannel: e, poll: t }) => {
|
|
60092
60128
|
const {
|
|
60093
60129
|
auth: n
|
|
60094
|
-
} = rt(), r =
|
|
60130
|
+
} = rt(), r = Xfe(), o = BS(), i = jJ(), s = uI(), a = MJ(), l = pn(() => {
|
|
60095
60131
|
e.closePollPortal();
|
|
60096
|
-
}, [e]), { dragRef: u, setInitialHeight: c } =
|
|
60097
|
-
return /* @__PURE__ */ h.jsxs(wl, { container:
|
|
60132
|
+
}, [e]), { dragRef: u, setInitialHeight: c } = Zfe(l, a), p = (t == null ? void 0 : t.options.find((m) => m.isVoted)) || (t == null ? void 0 : t.isVoted), d = o || s;
|
|
60133
|
+
return /* @__PURE__ */ h.jsxs(wl, { container: Qfe(), children: [
|
|
60098
60134
|
d && /* @__PURE__ */ h.jsx(
|
|
60099
60135
|
"div",
|
|
60100
60136
|
{
|
|
@@ -60109,13 +60145,13 @@ const zue = (e) => {
|
|
|
60109
60145
|
/* @__PURE__ */ h.jsx(be, { variant: "h2", sx: { wordBreak: "break-word", marginRight: "5px" }, children: t == null ? void 0 : t.question }),
|
|
60110
60146
|
/* @__PURE__ */ h.jsx(be, { color: G.SECONDARY_BASE, marginBottom: "16px", children: /* @__PURE__ */ h.jsx(Oe, { id: hv(t) }) })
|
|
60111
60147
|
] }),
|
|
60112
|
-
p || n.isModerator && (t == null ? void 0 : t.status) === jr.Done ? /* @__PURE__ */ h.jsx(
|
|
60148
|
+
p || n.isModerator && (t == null ? void 0 : t.status) === jr.Done ? /* @__PURE__ */ h.jsx(Kfe, { poll: t }) : /* @__PURE__ */ h.jsx(zfe, { poll: t, channel: e })
|
|
60113
60149
|
] }),
|
|
60114
60150
|
a && /* @__PURE__ */ h.jsx("div", { className: r.pollDragHolder, children: /* @__PURE__ */ h.jsx("div", { className: r.pollDrag, ref: u }) }),
|
|
60115
|
-
!i && /* @__PURE__ */ h.jsx(
|
|
60151
|
+
!i && /* @__PURE__ */ h.jsx(Vfe, { onClose: l })
|
|
60116
60152
|
] })
|
|
60117
60153
|
] });
|
|
60118
|
-
},
|
|
60154
|
+
}, ede = ot($fe), tde = () => {
|
|
60119
60155
|
const {
|
|
60120
60156
|
settings: e,
|
|
60121
60157
|
chat: t,
|
|
@@ -60125,8 +60161,8 @@ const zue = (e) => {
|
|
|
60125
60161
|
if (!e.showPolls || !r)
|
|
60126
60162
|
return null;
|
|
60127
60163
|
const o = r.getActivePoll;
|
|
60128
|
-
return o ? /* @__PURE__ */ h.jsx(
|
|
60129
|
-
},
|
|
60164
|
+
return o ? /* @__PURE__ */ h.jsx(ede, { currentChannel: r, poll: o }) : null;
|
|
60165
|
+
}, nde = ot(tde), rde = ut(
|
|
60130
60166
|
{
|
|
60131
60167
|
snackbar: {
|
|
60132
60168
|
maxWidth: 310
|
|
@@ -60135,7 +60171,7 @@ const zue = (e) => {
|
|
|
60135
60171
|
{
|
|
60136
60172
|
name: "Snackbar"
|
|
60137
60173
|
}
|
|
60138
|
-
),
|
|
60174
|
+
), ode = {
|
|
60139
60175
|
width: "100%",
|
|
60140
60176
|
height: "100%",
|
|
60141
60177
|
background: G.BG,
|
|
@@ -60143,8 +60179,8 @@ const zue = (e) => {
|
|
|
60143
60179
|
position: "relative",
|
|
60144
60180
|
boxShadow: "0px 2px 16px rgba(29, 29, 44, 0.12)",
|
|
60145
60181
|
borderRadius: "10px"
|
|
60146
|
-
},
|
|
60147
|
-
const t =
|
|
60182
|
+
}, ide = ({ theme: e }) => {
|
|
60183
|
+
const t = rde(), n = ZJ(e);
|
|
60148
60184
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
60149
60185
|
/* @__PURE__ */ h.jsxs(
|
|
60150
60186
|
Ne,
|
|
@@ -60152,9 +60188,9 @@ const zue = (e) => {
|
|
|
60152
60188
|
flex: 1,
|
|
60153
60189
|
container: !0,
|
|
60154
60190
|
wrap: "nowrap",
|
|
60155
|
-
sx:
|
|
60191
|
+
sx: ode,
|
|
60156
60192
|
direction: "column",
|
|
60157
|
-
"data-version":
|
|
60193
|
+
"data-version": Ffe.version,
|
|
60158
60194
|
id: E4,
|
|
60159
60195
|
children: [
|
|
60160
60196
|
/* @__PURE__ */ h.jsx(pw, { styles: { html: n } }),
|
|
@@ -60165,7 +60201,7 @@ const zue = (e) => {
|
|
|
60165
60201
|
maxSnack: 3,
|
|
60166
60202
|
autoHideDuration: 3e3,
|
|
60167
60203
|
classes: { root: t.snackbar },
|
|
60168
|
-
children: /* @__PURE__ */ h.jsx(mne, { children: /* @__PURE__ */ h.jsxs(
|
|
60204
|
+
children: /* @__PURE__ */ h.jsx(mne, { children: /* @__PURE__ */ h.jsxs(pfe, { children: [
|
|
60169
60205
|
/* @__PURE__ */ h.jsx(mi, { route: dt.Profile, children: /* @__PURE__ */ h.jsx(ife, {}) }),
|
|
60170
60206
|
/* @__PURE__ */ h.jsx(mi, { route: `${dt.Users}/:id`, children: /* @__PURE__ */ h.jsx(AA, {}) }),
|
|
60171
60207
|
/* @__PURE__ */ h.jsx(mi, { route: dt.Users, children: /* @__PURE__ */ h.jsx(AA, {}) }),
|
|
@@ -60182,9 +60218,9 @@ const zue = (e) => {
|
|
|
60182
60218
|
]
|
|
60183
60219
|
}
|
|
60184
60220
|
),
|
|
60185
|
-
/* @__PURE__ */ h.jsx(
|
|
60221
|
+
/* @__PURE__ */ h.jsx(nde, {})
|
|
60186
60222
|
] });
|
|
60187
|
-
},
|
|
60223
|
+
}, xde = ot(({
|
|
60188
60224
|
isVisible: e,
|
|
60189
60225
|
appId: t,
|
|
60190
60226
|
apiUrl: n,
|
|
@@ -60321,7 +60357,7 @@ const zue = (e) => {
|
|
|
60321
60357
|
defaultLocale: "en",
|
|
60322
60358
|
children: /* @__PURE__ */ h.jsx($A, { injectFirst: !0, children: /* @__PURE__ */ h.jsxs(DD, { theme: QJ, children: [
|
|
60323
60359
|
/* @__PURE__ */ h.jsx(FR, {}),
|
|
60324
|
-
k ? /* @__PURE__ */ h.jsx(qS.Provider, { value: x, children: /* @__PURE__ */ h.jsx(
|
|
60360
|
+
k ? /* @__PURE__ */ h.jsx(qS.Provider, { value: x, children: /* @__PURE__ */ h.jsx(ide, { theme: S }) }) : /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
60325
60361
|
/* @__PURE__ */ h.jsx(Cd, { color: "secondary" }),
|
|
60326
60362
|
/* @__PURE__ */ h.jsx(PI, { intlId: "loadingSettings" })
|
|
60327
60363
|
] })
|
|
@@ -60330,5 +60366,5 @@ const zue = (e) => {
|
|
|
60330
60366
|
) });
|
|
60331
60367
|
});
|
|
60332
60368
|
export {
|
|
60333
|
-
|
|
60369
|
+
xde as default
|
|
60334
60370
|
};
|