@elcrm/telegram 0.0.33 → 0.0.35
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.css +1 -1
- package/dist/index.es.js +119 -112
- package/dist/index.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -260,7 +260,7 @@ function Xa(e, t) {
|
|
|
260
260
|
function Qa(e, t, a) {
|
|
261
261
|
j[e].time = a, j[e].data[t.item][t.name] = t.value, localStorage.setItem(e, N.enCode(j[e]));
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const le = {
|
|
264
264
|
setSSID: va,
|
|
265
265
|
getSSID: ka,
|
|
266
266
|
getPORT: lt,
|
|
@@ -313,23 +313,23 @@ function un(e) {
|
|
|
313
313
|
t && (window.URL || window.webkitURL).revokeObjectURL(t);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const de = {};
|
|
317
317
|
function tr(e) {
|
|
318
|
-
return e && (
|
|
318
|
+
return e && (de.s = e), de.s;
|
|
319
319
|
}
|
|
320
320
|
function nr(e) {
|
|
321
|
-
return e && (
|
|
321
|
+
return e && (de.a = e), de.a;
|
|
322
322
|
}
|
|
323
323
|
function ar(e) {
|
|
324
|
-
return e && (
|
|
324
|
+
return e && (de.c = e), de.c;
|
|
325
325
|
}
|
|
326
326
|
function rr(e) {
|
|
327
|
-
return e && (
|
|
327
|
+
return e && (de.h = e), de.h;
|
|
328
328
|
}
|
|
329
329
|
const xt = { version: { Api: nr, Server: tr, Client: ar }, Host: rr };
|
|
330
330
|
let ir = "api", or = "elcrm", sr = "online";
|
|
331
331
|
function lr() {
|
|
332
|
-
let e =
|
|
332
|
+
let e = le.getPORT(), t = "", a = "";
|
|
333
333
|
return e.address === "localhost" ? (t = `http://localhost:${e.socket}/documents`, a = `http://localhost:${e.socket}/files`) : (t = "https://" + e.address + "/documents", a = "https://" + e.address + "/files"), {
|
|
334
334
|
documents: t,
|
|
335
335
|
files: a
|
|
@@ -337,9 +337,9 @@ function lr() {
|
|
|
337
337
|
}
|
|
338
338
|
let fn = `${ir}.${or}.${sr}`;
|
|
339
339
|
function cr(e) {
|
|
340
|
-
return "https://" +
|
|
340
|
+
return "https://" + le.getPORT().address + "/audio/" + e;
|
|
341
341
|
}
|
|
342
|
-
function Ue(e, t = {}, a =
|
|
342
|
+
function Ue(e, t = {}, a = le.getAUTH()) {
|
|
343
343
|
return new Promise((r) => {
|
|
344
344
|
const i = new un();
|
|
345
345
|
i.onmessage = (o) => {
|
|
@@ -352,7 +352,7 @@ function Ue(e, t = {}, a = se.getAUTH()) {
|
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
function _r(e, t = {}, a =
|
|
355
|
+
function _r(e, t = {}, a = le.getAUTH()) {
|
|
356
356
|
return new Promise((r) => {
|
|
357
357
|
const i = new un();
|
|
358
358
|
i.onmessage = (o) => {
|
|
@@ -376,7 +376,7 @@ function dr(e, t = {}, a) {
|
|
|
376
376
|
}
|
|
377
377
|
let mn = {
|
|
378
378
|
"Content-type": "application/json;charset=utf-8",
|
|
379
|
-
ssid:
|
|
379
|
+
ssid: le.getAUTH() || ""
|
|
380
380
|
};
|
|
381
381
|
async function ur(e, t, a = {}) {
|
|
382
382
|
try {
|
|
@@ -467,10 +467,10 @@ function hr() {
|
|
|
467
467
|
F.unshift("Warning: " + h), Function.prototype.apply.call(console[s], console, F);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
var T = !1, P = !1, O = !1, K = !1,
|
|
470
|
+
var T = !1, P = !1, O = !1, K = !1, se = !1, z;
|
|
471
471
|
z = Symbol.for("react.module.reference");
|
|
472
472
|
function M(s) {
|
|
473
|
-
return !!(typeof s == "string" || typeof s == "function" || s === r || s === o ||
|
|
473
|
+
return !!(typeof s == "string" || typeof s == "function" || s === r || s === o || se || s === i || s === _ || s === u || K || s === m || T || P || O || typeof s == "object" && s !== null && (s.$$typeof === x || s.$$typeof === f || s.$$typeof === l || s.$$typeof === c || s.$$typeof === d || // This needs to include all possible module reference object
|
|
474
474
|
// types supported by any Flight configuration anywhere since
|
|
475
475
|
// we don't know which Flight build this will end up being used
|
|
476
476
|
// with.
|
|
@@ -680,8 +680,8 @@ function hr() {
|
|
|
680
680
|
} finally {
|
|
681
681
|
Xe = !1, qe.current = F, Ln(), Error.prepareStackTrace = D;
|
|
682
682
|
}
|
|
683
|
-
var Ce = s ? s.displayName || s.name : "",
|
|
684
|
-
return typeof s == "function" && Oe.set(s,
|
|
683
|
+
var Ce = s ? s.displayName || s.name : "", he = Ce ? Ae(Ce) : "";
|
|
684
|
+
return typeof s == "function" && Oe.set(s, he), he;
|
|
685
685
|
}
|
|
686
686
|
function On(s, h, k) {
|
|
687
687
|
return Mt(s, !1);
|
|
@@ -1007,17 +1007,17 @@ Check the top-level render call using <` + k + ">.");
|
|
|
1007
1007
|
zt(Q, s);
|
|
1008
1008
|
}
|
|
1009
1009
|
if (Be.call(h, "key")) {
|
|
1010
|
-
var
|
|
1010
|
+
var he = E(s), q = Object.keys(h).filter(function(ca) {
|
|
1011
1011
|
return ca !== "key";
|
|
1012
1012
|
}), rt = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1013
|
-
if (!Wt[
|
|
1013
|
+
if (!Wt[he + rt]) {
|
|
1014
1014
|
var la = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
|
|
1015
1015
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
1016
1016
|
let props = %s;
|
|
1017
1017
|
<%s {...props} />
|
|
1018
1018
|
React keys must be passed directly to JSX without using spread:
|
|
1019
1019
|
let props = %s;
|
|
1020
|
-
<%s key={someKey} {...props} />`, rt,
|
|
1020
|
+
<%s key={someKey} {...props} />`, rt, he, la, he), Wt[he + rt] = !0;
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
return s === r ? aa(G) : na(G), G;
|
|
@@ -1035,21 +1035,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1035
1035
|
}
|
|
1036
1036
|
process.env.NODE_ENV === "production" ? _t.exports = mr() : _t.exports = hr();
|
|
1037
1037
|
var n = _t.exports;
|
|
1038
|
-
const gr = "
|
|
1038
|
+
const gr = "_notice_1fns6_2", pr = "_error_1fns6_11", xr = "_success_1fns6_14", vr = "_warning_1fns6_17", kr = "_copy_1fns6_20", br = {
|
|
1039
1039
|
notice: gr,
|
|
1040
1040
|
error: pr,
|
|
1041
1041
|
success: xr,
|
|
1042
|
-
|
|
1042
|
+
warning: vr,
|
|
1043
1043
|
copy: kr,
|
|
1044
|
-
"show-notice": "_show-
|
|
1045
|
-
"hide-notice": "_hide-
|
|
1044
|
+
"show-notice": "_show-notice_1fns6_1",
|
|
1045
|
+
"hide-notice": "_hide-notice_1fns6_1"
|
|
1046
1046
|
};
|
|
1047
|
-
let
|
|
1047
|
+
let ue = {};
|
|
1048
1048
|
function Cr() {
|
|
1049
1049
|
let [e, t] = b.useState([]);
|
|
1050
|
-
return
|
|
1050
|
+
return ue.set = (a) => {
|
|
1051
1051
|
t([...e, a]);
|
|
1052
|
-
},
|
|
1052
|
+
}, ue.del = (a) => {
|
|
1053
1053
|
t(e.filter((r) => r.key !== a));
|
|
1054
1054
|
}, e.length === 0 ? "" : /* @__PURE__ */ n.jsx("ul", { className: br.notice, children: e.map((a) => a.item) });
|
|
1055
1055
|
}
|
|
@@ -1059,55 +1059,54 @@ function Pe({ data: e }) {
|
|
|
1059
1059
|
setTimeout(function() {
|
|
1060
1060
|
a("hide");
|
|
1061
1061
|
}, 1800), setTimeout(function() {
|
|
1062
|
-
|
|
1062
|
+
ue.del(e.key);
|
|
1063
1063
|
}, 2500);
|
|
1064
1064
|
}, [e.key]);
|
|
1065
|
-
let r
|
|
1065
|
+
let r;
|
|
1066
1066
|
switch (e.type) {
|
|
1067
1067
|
case "error":
|
|
1068
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1068
|
+
r = /* @__PURE__ */ n.jsx(pe.error, {});
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "success":
|
|
1071
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1071
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1072
1072
|
break;
|
|
1073
1073
|
case "copy":
|
|
1074
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1074
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1075
1075
|
break;
|
|
1076
1076
|
case "remark":
|
|
1077
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1077
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1078
1078
|
break;
|
|
1079
1079
|
default:
|
|
1080
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1080
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1081
1081
|
break;
|
|
1082
1082
|
}
|
|
1083
1083
|
return /* @__PURE__ */ n.jsxs("li", { className: "item " + e.type, "data-status": t, children: [
|
|
1084
1084
|
r,
|
|
1085
|
-
/* @__PURE__ */ n.jsx("b", { children: i }),
|
|
1086
1085
|
/* @__PURE__ */ n.jsx("p", { children: e.text })
|
|
1087
1086
|
] });
|
|
1088
1087
|
}
|
|
1089
1088
|
function jr(e) {
|
|
1090
1089
|
let t = Date.now(), a = { key: t, ...e };
|
|
1091
|
-
|
|
1090
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1092
1091
|
}
|
|
1093
1092
|
function yr(e) {
|
|
1094
1093
|
let t = Date.now(), a = { key: t, text: e, type: "error" };
|
|
1095
|
-
|
|
1094
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1096
1095
|
}
|
|
1097
1096
|
function wr(e) {
|
|
1098
1097
|
let t = Date.now(), a = { key: t, text: e, type: "success" };
|
|
1099
|
-
|
|
1098
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1100
1099
|
}
|
|
1101
1100
|
function Sr(e) {
|
|
1102
1101
|
let t = Date.now(), a = { key: t, text: e, type: "remark" };
|
|
1103
|
-
|
|
1102
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1104
1103
|
}
|
|
1105
1104
|
function Er(e) {
|
|
1106
1105
|
let t = Date.now(), a = { key: t, text: e, type: "copy" };
|
|
1107
|
-
|
|
1106
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1108
1107
|
}
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1108
|
+
const pe = {};
|
|
1109
|
+
pe.error = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", children: [
|
|
1111
1110
|
/* @__PURE__ */ n.jsx(
|
|
1112
1111
|
"path",
|
|
1113
1112
|
{
|
|
@@ -1123,7 +1122,7 @@ ge.error = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "no
|
|
|
1123
1122
|
}
|
|
1124
1123
|
)
|
|
1125
1124
|
] });
|
|
1126
|
-
|
|
1125
|
+
pe.success = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", children: [
|
|
1127
1126
|
/* @__PURE__ */ n.jsx(
|
|
1128
1127
|
"path",
|
|
1129
1128
|
{
|
|
@@ -1230,12 +1229,12 @@ const Ar = "_white_11p39_14", Or = "_black_11p39_26", Gr = "_shake_11p39_1", zr
|
|
|
1230
1229
|
sx: _i,
|
|
1231
1230
|
sf: di
|
|
1232
1231
|
};
|
|
1233
|
-
let
|
|
1232
|
+
let ve = {};
|
|
1234
1233
|
function ui({ config: e }) {
|
|
1235
1234
|
let [t, a] = b.useState([]);
|
|
1236
|
-
return
|
|
1235
|
+
return ve.x = (r) => {
|
|
1237
1236
|
r || a([]);
|
|
1238
|
-
},
|
|
1237
|
+
}, ve.config = e, ve.add = (r) => {
|
|
1239
1238
|
a([...t, r]);
|
|
1240
1239
|
}, /* @__PURE__ */ n.jsx(n.Fragment, { children: t.map((r) => r) });
|
|
1241
1240
|
}
|
|
@@ -1318,7 +1317,7 @@ function fi({
|
|
|
1318
1317
|
) : "" });
|
|
1319
1318
|
}
|
|
1320
1319
|
function mi(e) {
|
|
1321
|
-
|
|
1320
|
+
ve.add(/* @__PURE__ */ n.jsx(hi, { children: e }, String(Date.now())));
|
|
1322
1321
|
}
|
|
1323
1322
|
function hi({ children: e }) {
|
|
1324
1323
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: e });
|
|
@@ -1334,14 +1333,14 @@ function gi(e) {
|
|
|
1334
1333
|
function pi({ type: e, name: t, params: a }) {
|
|
1335
1334
|
let [r, i] = b.useState(null);
|
|
1336
1335
|
return b.useEffect(() => {
|
|
1337
|
-
|
|
1336
|
+
ve.config(e, t, a, i);
|
|
1338
1337
|
}, [a.id]), /* @__PURE__ */ n.jsx(n.Fragment, { children: r });
|
|
1339
1338
|
}
|
|
1340
1339
|
function xi(e, t) {
|
|
1341
|
-
|
|
1340
|
+
ve.config(e, t);
|
|
1342
1341
|
}
|
|
1343
1342
|
function vi(e) {
|
|
1344
|
-
|
|
1343
|
+
ve.x(e);
|
|
1345
1344
|
}
|
|
1346
1345
|
const ut = {};
|
|
1347
1346
|
function ki(e, t) {
|
|
@@ -1350,22 +1349,22 @@ function ki(e, t) {
|
|
|
1350
1349
|
function bi(e, t) {
|
|
1351
1350
|
ut[e] !== void 0 && ut[e](t);
|
|
1352
1351
|
}
|
|
1353
|
-
const
|
|
1352
|
+
const ce = {};
|
|
1354
1353
|
function Ci(e, t) {
|
|
1355
1354
|
const [a, r] = b.useState(t);
|
|
1356
1355
|
return b.useEffect(() => {
|
|
1357
|
-
if (
|
|
1358
|
-
return
|
|
1359
|
-
|
|
1356
|
+
if (ce[e])
|
|
1357
|
+
return ce[e].push(r);
|
|
1358
|
+
ce[e] = [r];
|
|
1360
1359
|
}, []), [a];
|
|
1361
1360
|
}
|
|
1362
1361
|
function ji(e, t) {
|
|
1363
|
-
if (
|
|
1364
|
-
return
|
|
1365
|
-
|
|
1362
|
+
if (ce[e])
|
|
1363
|
+
return ce[e].push(t);
|
|
1364
|
+
ce[e] = [t];
|
|
1366
1365
|
}
|
|
1367
1366
|
function yi(e, t) {
|
|
1368
|
-
|
|
1367
|
+
ce[e] && ce[e].forEach((a) => a(t));
|
|
1369
1368
|
}
|
|
1370
1369
|
const He = { setListener: bi, useListener: ki, setEmitter: yi, useEmitter: Ci, subEmitter: ji };
|
|
1371
1370
|
function wi() {
|
|
@@ -1374,7 +1373,7 @@ function wi() {
|
|
|
1374
1373
|
t([a]);
|
|
1375
1374
|
}), /* @__PURE__ */ n.jsx(n.Fragment, { children: e.map((a) => a) });
|
|
1376
1375
|
}
|
|
1377
|
-
const
|
|
1376
|
+
const _e = {
|
|
1378
1377
|
Path: $a,
|
|
1379
1378
|
setPage: wa,
|
|
1380
1379
|
getPage: an,
|
|
@@ -1496,20 +1495,20 @@ function xn(e) {
|
|
|
1496
1495
|
)
|
|
1497
1496
|
] });
|
|
1498
1497
|
}
|
|
1499
|
-
let
|
|
1500
|
-
|
|
1498
|
+
let me = {};
|
|
1499
|
+
me.KeyDown = (e) => {
|
|
1501
1500
|
e.key === "Enter" && e.preventDefault();
|
|
1502
1501
|
};
|
|
1503
|
-
|
|
1502
|
+
me.PasteOne = (e) => {
|
|
1504
1503
|
e.preventDefault(), navigator.clipboard.readText().then((t) => {
|
|
1505
1504
|
t = t.replace(/^\s*/, "").replace(/\s*$/, ""), window.document.execCommand("insertText", !1, t);
|
|
1506
1505
|
}).catch((t) => {
|
|
1507
1506
|
});
|
|
1508
1507
|
};
|
|
1509
|
-
|
|
1508
|
+
me.Focus = (e) => {
|
|
1510
1509
|
e.target.textContent.length === 0 && (e.target.innerHTML = "<br>");
|
|
1511
1510
|
};
|
|
1512
|
-
|
|
1511
|
+
me.Blur = (e) => {
|
|
1513
1512
|
e.target.scrollLeft = 0, e.target.querySelector("br") !== null && e.target.querySelector("br").remove();
|
|
1514
1513
|
};
|
|
1515
1514
|
function vn({ value: e, onValue: t, placeholder: a = "", name: r }) {
|
|
@@ -1541,7 +1540,7 @@ function vn({ value: e, onValue: t, placeholder: a = "", name: r }) {
|
|
|
1541
1540
|
ref: l,
|
|
1542
1541
|
onPaste: u,
|
|
1543
1542
|
onInput: _,
|
|
1544
|
-
onBlur:
|
|
1543
|
+
onBlur: me.Blur,
|
|
1545
1544
|
onKeyDown: d,
|
|
1546
1545
|
contentEditable: "plaintext-only",
|
|
1547
1546
|
suppressContentEditableWarning: !0,
|
|
@@ -2543,7 +2542,7 @@ function wn({
|
|
|
2543
2542
|
onPaste: m,
|
|
2544
2543
|
onInput: f,
|
|
2545
2544
|
onKeyDown: x,
|
|
2546
|
-
onBlur:
|
|
2545
|
+
onBlur: me.Blur,
|
|
2547
2546
|
contentEditable: c && d ? "plaintext-only" : "false",
|
|
2548
2547
|
...v,
|
|
2549
2548
|
suppressContentEditableWarning: !0,
|
|
@@ -3988,11 +3987,11 @@ function jt({
|
|
|
3988
3987
|
}, O = T(e), K = ($) => {
|
|
3989
3988
|
let E = T($.target.textContent);
|
|
3990
3989
|
$.target.textContent = E.q, E.i = E.q.lastIndexOf(E.v.substr(-1)), E.i < E.q.length && E.q !== v ? E.i++ : E.i = E.q.indexOf("_"), y(E.i, $.target), t && t({ value: E.q.replace(/\D/g, ""), name: r });
|
|
3991
|
-
},
|
|
3990
|
+
}, se = ($) => {
|
|
3992
3991
|
$.key === "Enter" && $.preventDefault();
|
|
3993
3992
|
};
|
|
3994
3993
|
const z = ($) => {
|
|
3995
|
-
|
|
3994
|
+
me.Blur($), a && a({
|
|
3996
3995
|
value: $.target.textContent.replace(/\D/g, ""),
|
|
3997
3996
|
name: r
|
|
3998
3997
|
});
|
|
@@ -4007,7 +4006,7 @@ function jt({
|
|
|
4007
4006
|
...W,
|
|
4008
4007
|
onPaste: B,
|
|
4009
4008
|
onInput: K,
|
|
4010
|
-
onKeyDown:
|
|
4009
|
+
onKeyDown: se,
|
|
4011
4010
|
onContextMenu: P,
|
|
4012
4011
|
onBlur: z,
|
|
4013
4012
|
suppressContentEditableWarning: !0,
|
|
@@ -4311,7 +4310,7 @@ function ft({
|
|
|
4311
4310
|
}
|
|
4312
4311
|
);
|
|
4313
4312
|
case "Select":
|
|
4314
|
-
return g && (p =
|
|
4313
|
+
return g && (p = le.getSelect(parseInt(g)) ? le.getSelect(parseInt(g)) : { 0: { s: "1", n: "не известно" } }), /* @__PURE__ */ n.jsx(
|
|
4315
4314
|
yt,
|
|
4316
4315
|
{
|
|
4317
4316
|
title: o,
|
|
@@ -4329,7 +4328,7 @@ function ft({
|
|
|
4329
4328
|
}
|
|
4330
4329
|
);
|
|
4331
4330
|
case "Users":
|
|
4332
|
-
return
|
|
4331
|
+
return le.getSelect("user"), /* @__PURE__ */ n.jsx(
|
|
4333
4332
|
St,
|
|
4334
4333
|
{
|
|
4335
4334
|
title: o,
|
|
@@ -4515,12 +4514,12 @@ function Bn({
|
|
|
4515
4514
|
M.target.value = P(M.target.value).join(""), M.target.setSelectionRange(W, $), t == null || t({ name: a, value: M.target.value });
|
|
4516
4515
|
}, K = {};
|
|
4517
4516
|
K.field = "input", g && (K.className = g);
|
|
4518
|
-
const
|
|
4519
|
-
r && (
|
|
4517
|
+
const se = {};
|
|
4518
|
+
r && (se.placeholder = r);
|
|
4520
4519
|
let z = !1;
|
|
4521
4520
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("dl", { ...K, children: [
|
|
4522
4521
|
i ? /* @__PURE__ */ n.jsx("dt", { children: i }) : "",
|
|
4523
|
-
/* @__PURE__ */ n.jsx("dd", { ...
|
|
4522
|
+
/* @__PURE__ */ n.jsx("dd", { ...se, children: /* @__PURE__ */ n.jsx(
|
|
4524
4523
|
"input",
|
|
4525
4524
|
{
|
|
4526
4525
|
type: "tel",
|
|
@@ -4607,11 +4606,11 @@ function Mn({
|
|
|
4607
4606
|
const P = {};
|
|
4608
4607
|
P.field = "group", g && (P.className = g);
|
|
4609
4608
|
const O = (z) => {
|
|
4610
|
-
|
|
4609
|
+
me.Blur(z), m && m({ value: z.target.textContent, name: a });
|
|
4611
4610
|
};
|
|
4612
4611
|
let K = (z, M) => {
|
|
4613
4612
|
v[M] = z.target.textContent, t !== void 0 && t({ value: v.join(","), name: a });
|
|
4614
|
-
},
|
|
4613
|
+
}, se = (z) => {
|
|
4615
4614
|
z.key === "Enter" && z.preventDefault();
|
|
4616
4615
|
};
|
|
4617
4616
|
return /* @__PURE__ */ n.jsxs("dl", { ...P, children: [
|
|
@@ -4644,7 +4643,7 @@ function Mn({
|
|
|
4644
4643
|
placeholder: r,
|
|
4645
4644
|
onPaste: T,
|
|
4646
4645
|
contentEditable: !0,
|
|
4647
|
-
onKeyDown:
|
|
4646
|
+
onKeyDown: se,
|
|
4648
4647
|
onBlur: O,
|
|
4649
4648
|
suppressContentEditableWarning: !0,
|
|
4650
4649
|
children: v[M]
|
|
@@ -4777,7 +4776,7 @@ const Xi = {
|
|
|
4777
4776
|
Toogle: Rn,
|
|
4778
4777
|
Group: Mn,
|
|
4779
4778
|
Options: In
|
|
4780
|
-
}, Qi = "_debug_ug20b_34", eo = "_b_ug20b_46", to = "_o_ug20b_50", no = "_mb_ug20b_55", ao = "_tm_ug20b_66", ro = "_ta_ug20b_133",
|
|
4779
|
+
}, Qi = "_debug_ug20b_34", eo = "_b_ug20b_46", to = "_o_ug20b_50", no = "_mb_ug20b_55", ao = "_tm_ug20b_66", ro = "_ta_ug20b_133", ge = {
|
|
4781
4780
|
debug: Qi,
|
|
4782
4781
|
b: eo,
|
|
4783
4782
|
o: to,
|
|
@@ -4785,9 +4784,9 @@ const Xi = {
|
|
|
4785
4784
|
tm: ao,
|
|
4786
4785
|
ta: ro,
|
|
4787
4786
|
"--body": "_--body_ug20b_143"
|
|
4788
|
-
}, S = window.Telegram.WebApp,
|
|
4789
|
-
let
|
|
4790
|
-
|
|
4787
|
+
}, S = window.Telegram.WebApp, oe = { is: !1, MainButton: {}, BackButton: {} };
|
|
4788
|
+
let xe = {};
|
|
4789
|
+
xe.dark = {
|
|
4791
4790
|
"--tg-theme-bg-color": "#212121",
|
|
4792
4791
|
"--tg-theme-text-color": "#ffffff",
|
|
4793
4792
|
"--tg-theme-hint-color": "#aaaaaa",
|
|
@@ -4802,7 +4801,7 @@ pe.dark = {
|
|
|
4802
4801
|
"--tg-theme-subtitle-text-color": "#aaaaaa",
|
|
4803
4802
|
"--tg-theme-destructive-text-color": "#e53935"
|
|
4804
4803
|
};
|
|
4805
|
-
|
|
4804
|
+
xe.light = {
|
|
4806
4805
|
"--tg-theme-bg-color": "#ffffff",
|
|
4807
4806
|
"--tg-theme-text-color": "#000000",
|
|
4808
4807
|
"--tg-theme-hint-color": "#999999",
|
|
@@ -4811,7 +4810,7 @@ pe.light = {
|
|
|
4811
4810
|
"--tg-theme-button-text-color": "#ffffff",
|
|
4812
4811
|
"--tg-theme-secondary-bg-color": "#efeff3"
|
|
4813
4812
|
};
|
|
4814
|
-
|
|
4813
|
+
xe.users = {
|
|
4815
4814
|
"--tg-theme-bg-color": "#000000",
|
|
4816
4815
|
"--tg-theme-text-color": "#ffffff",
|
|
4817
4816
|
"--tg-theme-hint-color": "#98989e",
|
|
@@ -4826,11 +4825,11 @@ S.getUser = () => {
|
|
|
4826
4825
|
};
|
|
4827
4826
|
S.MainButton.callback = [];
|
|
4828
4827
|
S.MainButton.set = (e) => {
|
|
4829
|
-
|
|
4828
|
+
oe.is ? oe.MainButton.set(e) : (S.MainButton.callback.forEach((t) => {
|
|
4830
4829
|
S.MainButton.offClick(t);
|
|
4831
4830
|
}), S.MainButton.callback = [], typeof e == "boolean" ? S.MainButton.isVisible = !1 : (S.MainButton.text = e.text, e.color && (S.MainButton.color = e.color), e.textColor && (S.MainButton.textColor = e.textColor), S.MainButton.isVisible = !0, S.MainButton.isActive = e.isActive === void 0 ? !0 : e.isActive, S.MainButton.callback.push(() => {
|
|
4832
4831
|
var t;
|
|
4833
|
-
e.page === void 0 ? (t = e.callback) == null || t.call(e) :
|
|
4832
|
+
e.page === void 0 ? (t = e.callback) == null || t.call(e) : _e.setPage(e.page);
|
|
4834
4833
|
}), S.MainButton.onClick(S.MainButton.callback[0])));
|
|
4835
4834
|
};
|
|
4836
4835
|
S.BackButton.state = [!1];
|
|
@@ -4839,7 +4838,7 @@ S.BackButton.router = (e) => {
|
|
|
4839
4838
|
e === !1 ? (S.BackButton.isVisible = !1, S.BackButton.offClick(S.BackButton.listen[0]), S.BackButton.listen.shift(), S.BackButton.state.length !== 1 && S.BackButton.state.pop()) : (S.BackButton.isVisible = !0, S.BackButton.offClick(S.BackButton.listen[0]), S.BackButton.listen.shift(), S.BackButton.listen.push(() => {
|
|
4840
4839
|
let t = S.BackButton.state.pop();
|
|
4841
4840
|
if (t.page !== void 0)
|
|
4842
|
-
|
|
4841
|
+
_e.setPage(t.page);
|
|
4843
4842
|
else {
|
|
4844
4843
|
let a = S.BackButton.state[S.BackButton.state.length - 1];
|
|
4845
4844
|
S.BackButton.router(a);
|
|
@@ -4847,54 +4846,62 @@ S.BackButton.router = (e) => {
|
|
|
4847
4846
|
}), S.BackButton.onClick(S.BackButton.listen[0]));
|
|
4848
4847
|
};
|
|
4849
4848
|
S.BackButton.set = (e) => {
|
|
4850
|
-
|
|
4849
|
+
oe.is ? oe.BackButton.set(e) : (S.BackButton.state.push(e), S.BackButton.router(e));
|
|
4851
4850
|
};
|
|
4852
4851
|
S.Notice = (e, t) => {
|
|
4853
|
-
t !== void 0 ? (Ke.Send({ type: e, text: t }), S.HapticFeedback.notificationOccurred(e)) : (Ke.Send(e), S.HapticFeedback.notificationOccurred(e.type));
|
|
4852
|
+
t !== void 0 ? (Ke.Send({ type: e, text: t }), oe.is || S.HapticFeedback.notificationOccurred(e)) : (Ke.Send(e), oe.is || S.HapticFeedback.notificationOccurred(e.type));
|
|
4854
4853
|
};
|
|
4855
4854
|
S.Init = ({ dev: e }) => {
|
|
4856
4855
|
if (e) {
|
|
4857
4856
|
let [t, a] = b.useState(!1), [r, i] = b.useState(!1), [o, l] = b.useState("dark"), [c, d] = b.useState(!1), [_, u] = b.useState(!1);
|
|
4858
|
-
|
|
4859
|
-
for (let m in
|
|
4857
|
+
oe.is = !0, oe.MainButton.set = a, oe.BackButton.set = i, b.useEffect(() => {
|
|
4858
|
+
for (let m in xe[o])
|
|
4860
4859
|
document.documentElement.style.setProperty(
|
|
4861
4860
|
m,
|
|
4862
|
-
|
|
4861
|
+
xe[o][m]
|
|
4863
4862
|
);
|
|
4864
4863
|
}, []);
|
|
4865
4864
|
let f = (m) => {
|
|
4866
|
-
for (let g in
|
|
4867
|
-
document.documentElement.style.setProperty(g,
|
|
4865
|
+
for (let g in xe[m])
|
|
4866
|
+
document.documentElement.style.setProperty(g, xe[m][g]);
|
|
4868
4867
|
l(m), d(!1);
|
|
4869
4868
|
}, x = () => {
|
|
4870
4869
|
d(!1), u(!0);
|
|
4871
4870
|
};
|
|
4872
4871
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4873
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
4874
|
-
r === !1 ? /* @__PURE__ */ n.jsx("div", { className:
|
|
4872
|
+
/* @__PURE__ */ n.jsxs("div", { className: ge.debug, children: [
|
|
4873
|
+
r === !1 ? /* @__PURE__ */ n.jsx("div", { className: ge.b, children: "Отмена" }) : /* @__PURE__ */ n.jsx(
|
|
4875
4874
|
"div",
|
|
4876
4875
|
{
|
|
4877
4876
|
onClick: () => {
|
|
4878
|
-
r.page === void 0 ||
|
|
4877
|
+
r.page === void 0 || _e.setPage(r.page);
|
|
4879
4878
|
},
|
|
4880
|
-
className:
|
|
4879
|
+
className: ge.b,
|
|
4881
4880
|
children: "Назад"
|
|
4882
4881
|
}
|
|
4883
4882
|
),
|
|
4884
4883
|
/* @__PURE__ */ n.jsx(
|
|
4885
4884
|
"div",
|
|
4886
4885
|
{
|
|
4887
|
-
className:
|
|
4886
|
+
className: ge.o,
|
|
4888
4887
|
onClick: () => d(!c),
|
|
4889
4888
|
children: "Меню"
|
|
4890
4889
|
}
|
|
4891
4890
|
)
|
|
4892
4891
|
] }),
|
|
4893
|
-
t && /* @__PURE__ */ n.jsx("div", { className:
|
|
4894
|
-
|
|
4892
|
+
t && /* @__PURE__ */ n.jsx("div", { className: ge.mb, children: /* @__PURE__ */ n.jsx(
|
|
4893
|
+
"button",
|
|
4894
|
+
{
|
|
4895
|
+
onClick: () => {
|
|
4896
|
+
t.page && _e.setPage(t.page), t.callback && t.callback();
|
|
4897
|
+
},
|
|
4898
|
+
children: t.text
|
|
4899
|
+
}
|
|
4900
|
+
) }),
|
|
4901
|
+
c ? /* @__PURE__ */ n.jsxs("div", { className: ge.tm, children: [
|
|
4895
4902
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
4896
4903
|
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: x, children: "Authorization" }) }),
|
|
4897
|
-
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () =>
|
|
4904
|
+
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => _e.setPage("Add"), children: "Add Page" }) })
|
|
4898
4905
|
] }),
|
|
4899
4906
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
4900
4907
|
/* @__PURE__ */ n.jsxs("li", { children: [
|
|
@@ -4937,7 +4944,7 @@ const io = ({ setAuthorization: e }) => {
|
|
|
4937
4944
|
}, r = (i) => {
|
|
4938
4945
|
localStorage.setItem("auth", t);
|
|
4939
4946
|
};
|
|
4940
|
-
return /* @__PURE__ */ n.jsx("div", { className:
|
|
4947
|
+
return /* @__PURE__ */ n.jsx("div", { className: ge.ta, children: /* @__PURE__ */ n.jsxs("div", { className: "--body", children: [
|
|
4941
4948
|
/* @__PURE__ */ n.jsx("fieldset", { children: /* @__PURE__ */ n.jsx(
|
|
4942
4949
|
Xi.Notes,
|
|
4943
4950
|
{
|
|
@@ -5475,13 +5482,13 @@ H.offline = async (e) => {
|
|
|
5475
5482
|
H.chat = (e) => {
|
|
5476
5483
|
switch (e.data.action) {
|
|
5477
5484
|
case "new_message":
|
|
5478
|
-
|
|
5485
|
+
_e.getModule();
|
|
5479
5486
|
break;
|
|
5480
5487
|
case "view_message":
|
|
5481
|
-
|
|
5488
|
+
_e.getModule();
|
|
5482
5489
|
break;
|
|
5483
5490
|
case "write_message":
|
|
5484
|
-
|
|
5491
|
+
_e.getModule();
|
|
5485
5492
|
break;
|
|
5486
5493
|
}
|
|
5487
5494
|
};
|
|
@@ -5566,7 +5573,7 @@ class us {
|
|
|
5566
5573
|
}
|
|
5567
5574
|
}
|
|
5568
5575
|
let st, A = {};
|
|
5569
|
-
const Se = () => (st || (st = new us()), st),
|
|
5576
|
+
const Se = () => (st || (st = new us()), st), fe = (e, t, a = Se()) => a._withIDBStore("readwrite", (r) => {
|
|
5570
5577
|
A[e] = t, r.put(N.enCode(t), e);
|
|
5571
5578
|
}), ie = (e, t = Se()) => A[e] === void 0 ? new Promise((a, r) => {
|
|
5572
5579
|
let i;
|
|
@@ -5635,21 +5642,21 @@ const Se = () => (st || (st = new us()), st), ue = (e, t, a = Se()) => a._withID
|
|
|
5635
5642
|
});
|
|
5636
5643
|
}, ps = async (e, t, a, r) => {
|
|
5637
5644
|
let i, o;
|
|
5638
|
-
o = await ie(a), o[e.id] = e, await
|
|
5645
|
+
o = await ie(a), o[e.id] = e, await fe(a, o), i !== null && (i = await ie(t), i[e.id] = e.eDate, await fe(t, i)), r !== void 0 && r({ type: "load", page: i, base: o });
|
|
5639
5646
|
}, xs = async (e, t, a, r) => {
|
|
5640
5647
|
let i = await ie(t), o = await ie(a);
|
|
5641
5648
|
for (let l in e)
|
|
5642
5649
|
o[l] = e[l], i[l] = e[l].eDate;
|
|
5643
|
-
await
|
|
5650
|
+
await fe(t, i), await fe(a, o), r !== void 0 && r({ type: "load", page: i, base: o });
|
|
5644
5651
|
}, vs = async (e, t, a, r) => {
|
|
5645
5652
|
let i = await ie(t), o = await ie(a);
|
|
5646
|
-
e.forEach((l) => delete i[l]), await
|
|
5653
|
+
e.forEach((l) => delete i[l]), await fe(t, i), r !== void 0 && r({ type: "load", page: i, base: o });
|
|
5647
5654
|
}, ks = async (e, t, a) => {
|
|
5648
5655
|
let r = await ie(t);
|
|
5649
|
-
e.forEach((i) => delete r[i]), await
|
|
5656
|
+
e.forEach((i) => delete r[i]), await fe(t, r);
|
|
5650
5657
|
}, bs = async (e, t, a) => {
|
|
5651
5658
|
let r = await ie(t);
|
|
5652
|
-
e.forEach((i) => r[i.id] = i.eDate), await
|
|
5659
|
+
e.forEach((i) => r[i.id] = i.eDate), await fe(t, r);
|
|
5653
5660
|
}, Cs = async (e, t, a) => {
|
|
5654
5661
|
let r = await ie(t);
|
|
5655
5662
|
if (a !== void 0)
|
|
@@ -5659,7 +5666,7 @@ const Se = () => (st || (st = new us()), st), ue = (e, t, a = Se()) => a._withID
|
|
|
5659
5666
|
}, js = (e) => A[e], gl = {
|
|
5660
5667
|
id: Cs,
|
|
5661
5668
|
get: ie,
|
|
5662
|
-
set:
|
|
5669
|
+
set: fe,
|
|
5663
5670
|
add: ps,
|
|
5664
5671
|
del: fs,
|
|
5665
5672
|
upd: gs,
|
|
@@ -6186,13 +6193,13 @@ export {
|
|
|
6186
6193
|
Cn as Modal,
|
|
6187
6194
|
Ke as Notice,
|
|
6188
6195
|
jl as Notifications,
|
|
6189
|
-
|
|
6196
|
+
_e as Router,
|
|
6190
6197
|
xl as Scrolling,
|
|
6191
6198
|
bl as Search,
|
|
6192
6199
|
ul as Setting,
|
|
6193
6200
|
xt as Sistym,
|
|
6194
6201
|
mt as Socket,
|
|
6195
|
-
|
|
6202
|
+
le as Store,
|
|
6196
6203
|
yl as Switch,
|
|
6197
6204
|
oo as Tabs,
|
|
6198
6205
|
S as Telegram,
|