@yuneta/gobj-js 7.26.12 → 7.26.14
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/gobj-js.cjs.js +36 -9
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +192 -184
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +36 -9
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +216 -208
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +36 -9
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +192 -184
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +36 -9
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +192 -184
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
667
667
|
}
|
|
668
668
|
function Re(e, t) {
|
|
669
|
-
let n =
|
|
669
|
+
let n = nl(e.dl_children, t);
|
|
670
670
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
671
671
|
}
|
|
672
672
|
function De(e, t) {
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
if (1 === C) L(n("🔄 %s %s%s %s from %s%s", t || "", e.running ? "" : "!!", et(e), o.state_name, l && !l.running ? "!!" : "", et(l)));
|
|
1099
1099
|
else {
|
|
1100
1100
|
let r = "";
|
|
1101
|
-
i.action && (r =
|
|
1101
|
+
i.action && (r = ll(i.action)), L(n("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Ze(e), Xe(e), o.state_name, "", t || "", "", r, l && !l.running ? "!!" : "", Ze(l), Xe(l)));
|
|
1102
1102
|
}
|
|
1103
1103
|
r && q(e) && zn(r) && Un(r);
|
|
1104
1104
|
}
|
|
@@ -1404,23 +1404,23 @@
|
|
|
1404
1404
|
return n;
|
|
1405
1405
|
}
|
|
1406
1406
|
function hn(e, ...t) {
|
|
1407
|
-
let n = mn(e, ...t), r =
|
|
1407
|
+
let n = mn(e, ...t), r = tl();
|
|
1408
1408
|
tn && (tn === en.error ? cn("error", n) && tn("%c" + r + " ERROR: " + String(n), "color:red") : (cn("error", n) && en.error("%c" + r + " ERROR: " + String(n), "color:red"), tn(`${r} ERROR: ${String(n)}`))), gn("error", n, r);
|
|
1409
1409
|
}
|
|
1410
1410
|
function yn(e, ...t) {
|
|
1411
|
-
let n = mn(e, ...t), r =
|
|
1411
|
+
let n = mn(e, ...t), r = tl();
|
|
1412
1412
|
nn && (nn === en.warn ? cn("warning", n) && nn("%c" + r + " WARNING: " + String(n), "color:yellow") : (cn("warning", n) && en.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), nn(`${r} WARNING: ${String(n)}`))), gn("warning", n, r);
|
|
1413
1413
|
}
|
|
1414
1414
|
function En(e, ...t) {
|
|
1415
|
-
let n = mn(e, ...t), r =
|
|
1415
|
+
let n = mn(e, ...t), r = tl();
|
|
1416
1416
|
ln && cn("debug", n) && ln("%c" + r + " DEBUG: " + String(n), "color:silver"), gn("debug", n, r);
|
|
1417
1417
|
}
|
|
1418
1418
|
function Tn(e, ...t) {
|
|
1419
|
-
let n = mn(e, ...t), r =
|
|
1419
|
+
let n = mn(e, ...t), r = tl();
|
|
1420
1420
|
ln && cn("msg", n) && ln("%c" + r + " MSG: " + String(n), "color:cyan"), gn("msg", n, r);
|
|
1421
1421
|
}
|
|
1422
1422
|
function vn(e, t) {
|
|
1423
|
-
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e,
|
|
1423
|
+
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e, tl());
|
|
1424
1424
|
}
|
|
1425
1425
|
var jn = [
|
|
1426
1426
|
"passw",
|
|
@@ -1846,7 +1846,7 @@
|
|
|
1846
1846
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1847
1847
|
let o = mr(e, t, n, !1);
|
|
1848
1848
|
const s = l && l & Zt.KW_REQUIRED, i = l && l & Zt.KW_CREATE, _ = l && l & Zt.KW_EXTRACT;
|
|
1849
|
-
return void 0 === o ? i && Zn(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : Zn(o) ? (_ && hr(e, t, n), o) : (s && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json dict: '${n}'`), Un(t)), r);
|
|
1849
|
+
return void 0 === o ? i && Zn(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : Zn(o) ? (_ && hr(e, t, n), o) : i && null === o && Zn(r) ? (Sr(e, t, n, r), r) : ((s || i) && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json dict: '${n}'` + (i ? ", cannot create" : "")), Un(t)), r);
|
|
1850
1850
|
}
|
|
1851
1851
|
function Or(e, t, n, r, l) {
|
|
1852
1852
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
@@ -1865,6 +1865,7 @@
|
|
|
1865
1865
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1866
1866
|
if (!tr(n)) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
1867
1867
|
if ("" === n) return hn((e ? et(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
1868
|
+
if (n.split("`").includes("")) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
1868
1869
|
let l = n.split("`"), o = l.length;
|
|
1869
1870
|
for (let s = 0; s < o; s++) {
|
|
1870
1871
|
let i = l[s];
|
|
@@ -2092,7 +2093,14 @@
|
|
|
2092
2093
|
]), Zn(e[r]) && Kr(e[r], t, n), n = n.slice(0, -l.length);
|
|
2093
2094
|
}
|
|
2094
2095
|
}
|
|
2095
|
-
function Yr(e
|
|
2096
|
+
function Yr(e) {
|
|
2097
|
+
try {
|
|
2098
|
+
return JSON.stringify(e);
|
|
2099
|
+
} catch (t) {
|
|
2100
|
+
return `<${typeof e}: not json (${t.message})>`;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
function Br(e, t, n, r) {
|
|
2096
2104
|
if (!e) return null;
|
|
2097
2105
|
let l, o = e.length;
|
|
2098
2106
|
for (l = 0; l < o; l++) {
|
|
@@ -2101,14 +2109,14 @@
|
|
|
2101
2109
|
let e = o.id;
|
|
2102
2110
|
if (e && e === n) return o;
|
|
2103
2111
|
if (r && gr(o, t)) {
|
|
2104
|
-
let e =
|
|
2112
|
+
let e = Br(o[t], t, n, r);
|
|
2105
2113
|
if (e) return e;
|
|
2106
2114
|
}
|
|
2107
2115
|
}
|
|
2108
2116
|
}
|
|
2109
2117
|
return null;
|
|
2110
2118
|
}
|
|
2111
|
-
function
|
|
2119
|
+
function Jr(e) {
|
|
2112
2120
|
function t(e) {
|
|
2113
2121
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2114
2122
|
switch (t.length % 4) {
|
|
@@ -2139,10 +2147,10 @@
|
|
|
2139
2147
|
signature: t(n[2])
|
|
2140
2148
|
};
|
|
2141
2149
|
}
|
|
2142
|
-
function
|
|
2150
|
+
function qr(e) {
|
|
2143
2151
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2144
2152
|
}
|
|
2145
|
-
var
|
|
2153
|
+
var Hr = class {
|
|
2146
2154
|
constructor(e) {
|
|
2147
2155
|
this.html = e, Object.freeze(this);
|
|
2148
2156
|
}
|
|
@@ -2150,41 +2158,41 @@
|
|
|
2150
2158
|
return this.html;
|
|
2151
2159
|
}
|
|
2152
2160
|
};
|
|
2153
|
-
function Hr(e) {
|
|
2154
|
-
return e instanceof qr;
|
|
2155
|
-
}
|
|
2156
2161
|
function zr(e) {
|
|
2162
|
+
return e instanceof Hr;
|
|
2163
|
+
}
|
|
2164
|
+
function Qr(e) {
|
|
2157
2165
|
const t = document.createElement("template");
|
|
2158
2166
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2159
2167
|
}
|
|
2160
|
-
var
|
|
2161
|
-
function
|
|
2168
|
+
var Xr = !1, Zr = /* @__PURE__ */ new Set();
|
|
2169
|
+
function el(e) {
|
|
2162
2170
|
const t = document.createElement("template");
|
|
2163
2171
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2164
2172
|
}
|
|
2165
|
-
function
|
|
2173
|
+
function tl(e) {
|
|
2166
2174
|
const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), l = e.getTimezoneOffset();
|
|
2167
2175
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2168
2176
|
}
|
|
2169
|
-
function
|
|
2177
|
+
function nl(e, t) {
|
|
2170
2178
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2171
2179
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2172
2180
|
return -1;
|
|
2173
2181
|
}
|
|
2174
|
-
function
|
|
2182
|
+
function rl() {
|
|
2175
2183
|
let e = "";
|
|
2176
2184
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
2177
2185
|
}
|
|
2178
|
-
function
|
|
2186
|
+
function ll(e) {
|
|
2179
2187
|
let t = null;
|
|
2180
2188
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2181
2189
|
}
|
|
2182
|
-
var
|
|
2183
|
-
function
|
|
2190
|
+
var ol = 256, sl = 1e5;
|
|
2191
|
+
function il(e) {
|
|
2184
2192
|
const t = String(e).replace(/`/g, "``");
|
|
2185
2193
|
return "[" === t[0] ? "[" + t : t;
|
|
2186
2194
|
}
|
|
2187
|
-
function
|
|
2195
|
+
function _l(e) {
|
|
2188
2196
|
if ("string" != typeof e) return null;
|
|
2189
2197
|
let t = [], n = "";
|
|
2190
2198
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2205,13 +2213,13 @@
|
|
|
2205
2213
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2206
2214
|
});
|
|
2207
2215
|
}
|
|
2208
|
-
function
|
|
2216
|
+
function al(e, t) {
|
|
2209
2217
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2210
2218
|
}
|
|
2211
|
-
function
|
|
2219
|
+
function ul(e) {
|
|
2212
2220
|
return "persistent-attrs-" + et(e);
|
|
2213
2221
|
}
|
|
2214
|
-
function
|
|
2222
|
+
function cl(e, t) {
|
|
2215
2223
|
if (tr(t)) {
|
|
2216
2224
|
if (-1 === t.indexOf("^")) {
|
|
2217
2225
|
let n, r, l = e.fkey;
|
|
@@ -2241,7 +2249,7 @@
|
|
|
2241
2249
|
hook_name: t.hook_name
|
|
2242
2250
|
} : (hn("bad fkey 3"), hn(e), hn(t), null);
|
|
2243
2251
|
}
|
|
2244
|
-
var
|
|
2252
|
+
var fl = [
|
|
2245
2253
|
"string",
|
|
2246
2254
|
"integer",
|
|
2247
2255
|
"object",
|
|
@@ -2251,7 +2259,7 @@
|
|
|
2251
2259
|
"real",
|
|
2252
2260
|
"boolean",
|
|
2253
2261
|
"blob"
|
|
2254
|
-
],
|
|
2262
|
+
], gl = [
|
|
2255
2263
|
"persistent",
|
|
2256
2264
|
"required",
|
|
2257
2265
|
"notnull",
|
|
@@ -2263,7 +2271,7 @@
|
|
|
2263
2271
|
"stats",
|
|
2264
2272
|
"rstats",
|
|
2265
2273
|
"pstats"
|
|
2266
|
-
],
|
|
2274
|
+
], dl = [
|
|
2267
2275
|
"hook",
|
|
2268
2276
|
"fkey",
|
|
2269
2277
|
"enum",
|
|
@@ -2292,7 +2300,7 @@
|
|
|
2292
2300
|
"coordinates",
|
|
2293
2301
|
"gbuffer"
|
|
2294
2302
|
];
|
|
2295
|
-
function
|
|
2303
|
+
function bl(e) {
|
|
2296
2304
|
let t = {
|
|
2297
2305
|
name: e.id,
|
|
2298
2306
|
header: e.header,
|
|
@@ -2311,7 +2319,7 @@
|
|
|
2311
2319
|
if (!e.flag) return t;
|
|
2312
2320
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2313
2321
|
let r = e.flag[n];
|
|
2314
|
-
if (Ur(
|
|
2322
|
+
if (Ur(dl, r)) {
|
|
2315
2323
|
switch (r) {
|
|
2316
2324
|
case "enum":
|
|
2317
2325
|
t.enum_list = e.enum;
|
|
@@ -2325,7 +2333,7 @@
|
|
|
2325
2333
|
case "file": t.is_file = !0;
|
|
2326
2334
|
}
|
|
2327
2335
|
t.type = r;
|
|
2328
|
-
} else if (Ur(
|
|
2336
|
+
} else if (Ur(gl, r)) switch (r) {
|
|
2329
2337
|
case "writable":
|
|
2330
2338
|
t.is_writable = !0;
|
|
2331
2339
|
break;
|
|
@@ -2338,23 +2346,23 @@
|
|
|
2338
2346
|
}
|
|
2339
2347
|
return t.is_file && (t.type = "file"), t;
|
|
2340
2348
|
}
|
|
2341
|
-
var
|
|
2349
|
+
var pl = [
|
|
2342
2350
|
j(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2343
2351
|
j(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2344
2352
|
j(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2345
2353
|
v()
|
|
2346
|
-
],
|
|
2354
|
+
], ml = {
|
|
2347
2355
|
periodic: !1,
|
|
2348
2356
|
msec: 0,
|
|
2349
2357
|
timer_id: -1
|
|
2350
|
-
},
|
|
2351
|
-
function
|
|
2358
|
+
}, hl = null;
|
|
2359
|
+
function yl(e, t, n, r) {
|
|
2352
2360
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2353
2361
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2354
2362
|
Vt(e, "EV_TIMEOUT", {}, e);
|
|
2355
2363
|
}, l.msec) : l.timer_id = -1, lt(e) ? Vt(nt(e), o, {}, e) : Xt(e, o, {}), l.periodic || -1 !== l.timer_id || Ke(e) && Ve(e), 0;
|
|
2356
2364
|
}
|
|
2357
|
-
var
|
|
2365
|
+
var El = {
|
|
2358
2366
|
mt_create: function(e) {
|
|
2359
2367
|
let t = e.priv;
|
|
2360
2368
|
const n = Ot(e, "subscriber");
|
|
@@ -2379,16 +2387,16 @@
|
|
|
2379
2387
|
},
|
|
2380
2388
|
mt_destroy: function(e) {}
|
|
2381
2389
|
};
|
|
2382
|
-
function
|
|
2390
|
+
function Tl(e, t) {
|
|
2383
2391
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2384
2392
|
}
|
|
2385
|
-
function
|
|
2393
|
+
function vl(e, t) {
|
|
2386
2394
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2387
2395
|
}
|
|
2388
|
-
function
|
|
2396
|
+
function jl(e) {
|
|
2389
2397
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2390
2398
|
}
|
|
2391
|
-
var
|
|
2399
|
+
var Ol = [
|
|
2392
2400
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2393
2401
|
j(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2394
2402
|
j(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2408,26 +2416,26 @@
|
|
|
2408
2416
|
j(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2409
2417
|
j(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2410
2418
|
v()
|
|
2411
|
-
],
|
|
2412
|
-
function
|
|
2419
|
+
], Sl = { gobj_timer: null }, wl = null;
|
|
2420
|
+
function Nl(e, t, n, r) {
|
|
2413
2421
|
let l = yt(e, t);
|
|
2414
2422
|
return Zn(l) || (l = {}), l[n] = r, St(e, t, l), De(e, t);
|
|
2415
2423
|
}
|
|
2416
|
-
function
|
|
2424
|
+
function $l(e) {
|
|
2417
2425
|
if (!0 === e || !1 === e) return e;
|
|
2418
2426
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2419
2427
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2420
2428
|
}
|
|
2421
|
-
function
|
|
2429
|
+
function Rl() {
|
|
2422
2430
|
return `${ze()}^${He()}`;
|
|
2423
2431
|
}
|
|
2424
|
-
function
|
|
2432
|
+
function Dl(e, t, n, r) {
|
|
2425
2433
|
return Xt(e, t, n), 0;
|
|
2426
2434
|
}
|
|
2427
|
-
var
|
|
2435
|
+
var kl = {
|
|
2428
2436
|
mt_create: function(e) {
|
|
2429
2437
|
let t = e.priv;
|
|
2430
|
-
Rt(e, "start_date",
|
|
2438
|
+
Rt(e, "start_date", tl()), Rt(e, "node_uuid", rl()), e.priv.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.periodic_timeout = yt(e, "periodic_timeout"), function(e) {
|
|
2431
2439
|
let t = yt(e, "trace_levels");
|
|
2432
2440
|
if (!Zn(t)) return 0;
|
|
2433
2441
|
let n = t.__global_trace__;
|
|
@@ -2461,10 +2469,10 @@
|
|
|
2461
2469
|
},
|
|
2462
2470
|
mt_writing: function(e, t) {},
|
|
2463
2471
|
mt_start: function(e) {
|
|
2464
|
-
return
|
|
2472
|
+
return vl(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2465
2473
|
},
|
|
2466
2474
|
mt_stop: function(e) {
|
|
2467
|
-
return
|
|
2475
|
+
return jl(e.priv.gobj_timer), Me(e), 0;
|
|
2468
2476
|
},
|
|
2469
2477
|
mt_destroy: function(e) {},
|
|
2470
2478
|
mt_play: function(e) {
|
|
@@ -2481,24 +2489,24 @@
|
|
|
2481
2489
|
case "get-global-no-trace": return l(0, 0, null, null, ne());
|
|
2482
2490
|
case "set-global-trace":
|
|
2483
2491
|
case "set-global-no-trace": {
|
|
2484
|
-
let r = "set-global-no-trace" === t, o = n.level, s =
|
|
2485
|
-
return o ? null === s ? l(0, -1, `${
|
|
2492
|
+
let r = "set-global-no-trace" === t, o = n.level, s = $l(n.set);
|
|
2493
|
+
return o ? null === s ? l(0, -1, `${Rl()}: bitmask set or re-set?`, null, null) : (r ? X(o, s) : Q(o, s)) < 0 ? l(0, -1, `${Rl()}: global trace level not found: ${o}`, null, null) : r ? (Nl(e, "no_trace_levels", "__global_no_trace__", ne()), l(0, 0, null, null, ne())) : (Nl(e, "trace_levels", "__global_trace__", te()), l(0, 0, null, null, te())) : l(0, -1, `${Rl()}: what level?`, null, null);
|
|
2486
2494
|
}
|
|
2487
2495
|
case "get-gclass-trace":
|
|
2488
2496
|
case "get-gclass-no-trace":
|
|
2489
2497
|
case "set-gclass-trace":
|
|
2490
2498
|
case "set-gclass-no-trace": {
|
|
2491
2499
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2492
|
-
if (!s) return l(0, -1, `${
|
|
2500
|
+
if (!s) return l(0, -1, `${Rl()}: what gclass is '${o}'?`, null, null);
|
|
2493
2501
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2494
|
-
let i = n.level, _ =
|
|
2495
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2502
|
+
let i = n.level, _ = $l(n.set);
|
|
2503
|
+
return i ? null === _ ? l(0, -1, `${Rl()}: bitmask set or re-set?`, null, null) : (r ? ie(s, i, _) : se(s, i, _)) < 0 ? l(0, -1, `${Rl()}: trace level of ${o} not found: ${i}`, null, null) : r ? (Nl(e, "no_trace_levels", o, oe(s)), l(0, 0, null, null, oe(s))) : (Nl(e, "trace_levels", o, le(s)), l(0, 0, null, null, re(s))) : l(0, -1, `${Rl()}: what level?`, null, null);
|
|
2496
2504
|
}
|
|
2497
|
-
default: return l(0, -1, `${
|
|
2505
|
+
default: return l(0, -1, `${Rl()}: command not available: ${t}`, null, null);
|
|
2498
2506
|
}
|
|
2499
2507
|
}
|
|
2500
2508
|
};
|
|
2501
|
-
var
|
|
2509
|
+
var Al = "ievent_gate_stack", Il = [
|
|
2502
2510
|
j(y.DTP_STRING, "wanted_yuno_role", E.SDF_RD, "", "wanted yuno role"),
|
|
2503
2511
|
j(y.DTP_STRING, "wanted_yuno_name", E.SDF_RD, "", "wanted yuno name"),
|
|
2504
2512
|
j(y.DTP_STRING, "wanted_yuno_service", E.SDF_RD, "", "wanted yuno service"),
|
|
@@ -2515,15 +2523,15 @@
|
|
|
2515
2523
|
j(y.DTP_INTEGER, "timeout_idack", E.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2516
2524
|
j(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2517
2525
|
v()
|
|
2518
|
-
],
|
|
2526
|
+
], Cl = [
|
|
2519
2527
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2520
2528
|
["ievents2", "Trace inter-events with full kw"],
|
|
2521
2529
|
["identity-card", "Trace identity_card messages"]
|
|
2522
2530
|
];
|
|
2523
|
-
function
|
|
2531
|
+
function Ll(e) {
|
|
2524
2532
|
return !!(3 & x(e));
|
|
2525
2533
|
}
|
|
2526
|
-
var
|
|
2534
|
+
var Pl = {
|
|
2527
2535
|
url: null,
|
|
2528
2536
|
remote_yuno_name: null,
|
|
2529
2537
|
remote_yuno_role: null,
|
|
@@ -2533,8 +2541,8 @@
|
|
|
2533
2541
|
websocket: null,
|
|
2534
2542
|
inside_on_open: !1,
|
|
2535
2543
|
retry_ms: 0
|
|
2536
|
-
},
|
|
2537
|
-
function
|
|
2544
|
+
}, Ul = null;
|
|
2545
|
+
function Fl(e) {
|
|
2538
2546
|
e.priv.websocket && hn("Websocket ALREADY setup");
|
|
2539
2547
|
const t = jt(e, "url");
|
|
2540
2548
|
En(`====> Starting WebSocket to '${t}' (${et(e)})`);
|
|
@@ -2549,7 +2557,7 @@
|
|
|
2549
2557
|
code: 1006,
|
|
2550
2558
|
reason: r.message,
|
|
2551
2559
|
was_clean: !1
|
|
2552
|
-
}, e) < 0 &&
|
|
2560
|
+
}, e) < 0 && Tl(e.priv.gobj_timer, Hl(e)), null;
|
|
2553
2561
|
}
|
|
2554
2562
|
return r ? (r.onopen = () => {
|
|
2555
2563
|
n !== e.priv.ws_seq || ot(e) || Vt(e, "EV_ON_OPEN", {
|
|
@@ -2571,7 +2579,7 @@
|
|
|
2571
2579
|
}, e));
|
|
2572
2580
|
}, r) : (hn(`${et(e)}: Failed to initialize WebSocket.`), null);
|
|
2573
2581
|
}
|
|
2574
|
-
function
|
|
2582
|
+
function Vl(e, t = 1e3, n = "") {
|
|
2575
2583
|
let r = e.priv, l = r.websocket;
|
|
2576
2584
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
2577
2585
|
En(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -2582,25 +2590,25 @@
|
|
|
2582
2590
|
}
|
|
2583
2591
|
} else yn("WebSocket is already closed or in the process of closing.");
|
|
2584
2592
|
}
|
|
2585
|
-
function
|
|
2586
|
-
let r =
|
|
2593
|
+
function Gl(e, t, n) {
|
|
2594
|
+
let r = tl();
|
|
2587
2595
|
try {
|
|
2588
2596
|
En("\n" + r + " " + t + "\n"), Un(n);
|
|
2589
2597
|
} catch (e) {
|
|
2590
2598
|
En("ERROR in trace_inter_event: " + e);
|
|
2591
2599
|
}
|
|
2592
2600
|
}
|
|
2593
|
-
var
|
|
2601
|
+
var Ml = class {
|
|
2594
2602
|
constructor(e, t) {
|
|
2595
2603
|
this.event = e, this.kw = t || {};
|
|
2596
2604
|
}
|
|
2597
2605
|
};
|
|
2598
|
-
function
|
|
2606
|
+
function Wl(e, t, n, r) {
|
|
2599
2607
|
return function(e, t) {
|
|
2600
2608
|
let n = e.priv, r = JSON.stringify(t);
|
|
2601
|
-
if (
|
|
2609
|
+
if (Ll(e)) {
|
|
2602
2610
|
let n = jt(e, "url"), l = Xe(qe()) + " ==> " + n, o = yt(qe(), "trace_ievent_callback");
|
|
2603
|
-
o ? o(l, t, 1, r.length) :
|
|
2611
|
+
o ? o(l, t, 1, r.length) : Gl(0, l, t);
|
|
2604
2612
|
}
|
|
2605
2613
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return yn(`${et(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
2606
2614
|
try {
|
|
@@ -2610,10 +2618,10 @@
|
|
|
2610
2618
|
}
|
|
2611
2619
|
return 0;
|
|
2612
2620
|
}(e, function(e, t) {
|
|
2613
|
-
return ir(e) ? (hn("iev_create() event NULL"), null) : new
|
|
2621
|
+
return ir(e) ? (hn("iev_create() event NULL"), null) : new Ml(e, t);
|
|
2614
2622
|
}(t, n));
|
|
2615
2623
|
}
|
|
2616
|
-
function
|
|
2624
|
+
function xl(e, t, n) {
|
|
2617
2625
|
return ir(n) && (n = jt(e, "wanted_yuno_service")), {
|
|
2618
2626
|
dst_yuno: jt(e, "wanted_yuno_name"),
|
|
2619
2627
|
dst_role: jt(e, "wanted_yuno_role"),
|
|
@@ -2621,10 +2629,10 @@
|
|
|
2621
2629
|
src_yuno: He(),
|
|
2622
2630
|
src_role: ze(),
|
|
2623
2631
|
src_service: t,
|
|
2624
|
-
host:
|
|
2632
|
+
host: rl()
|
|
2625
2633
|
};
|
|
2626
2634
|
}
|
|
2627
|
-
function
|
|
2635
|
+
function Kl(e) {
|
|
2628
2636
|
let t = e.priv, n = Je(qe()), r = jt(qe(), "yuno_version"), l = jt(qe(), "yuno_release"), o = jt(qe(), "yuno_tag"), i = yt(e, "required_services");
|
|
2629
2637
|
i && i.length || (i = yt(qe(), "required_services"));
|
|
2630
2638
|
let _ = {
|
|
@@ -2642,27 +2650,27 @@
|
|
|
2642
2650
|
username: jt(qe(), "__username__"),
|
|
2643
2651
|
launch_id: 0,
|
|
2644
2652
|
yuno_startdate: jt(qe(), "start_date"),
|
|
2645
|
-
id:
|
|
2653
|
+
id: rl(),
|
|
2646
2654
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
2647
2655
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
2648
2656
|
required_services: i
|
|
2649
2657
|
};
|
|
2650
|
-
return Gr(e, _,
|
|
2658
|
+
return Gr(e, _, Al, xl(e, Xe(nt(e)), null)), Wr(e, _, "__identity__"), Tl(t.gobj_timer, vt(e, "timeout_idack")), Wl(e, "EV_IDENTITY_CARD", _);
|
|
2651
2659
|
}
|
|
2652
|
-
function
|
|
2660
|
+
function Yl(e, t) {
|
|
2653
2661
|
if (ir(t.event)) return -1;
|
|
2654
2662
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, s = t.__service__, i = t.subscriber;
|
|
2655
2663
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
2656
|
-
return Gr(e, n,
|
|
2657
|
-
}
|
|
2658
|
-
function Yl(e, t, n, r) {
|
|
2659
|
-
let l = e.priv;
|
|
2660
|
-
return Ke(e) && (l.websocket = Ul(e)), 0;
|
|
2664
|
+
return Gr(e, n, Al, xl(e, Xe(i), s)), Wr(e, n, "__subscribing__"), Wl(e, t.event, n);
|
|
2661
2665
|
}
|
|
2662
2666
|
function Bl(e, t, n, r) {
|
|
2663
|
-
|
|
2667
|
+
let l = e.priv;
|
|
2668
|
+
return Ke(e) && (l.websocket = Fl(e)), 0;
|
|
2664
2669
|
}
|
|
2665
2670
|
function Jl(e, t, n, r) {
|
|
2671
|
+
return En("Websocket opened: " + e.priv.url), Kl(e), 0;
|
|
2672
|
+
}
|
|
2673
|
+
function ql(e, t, n, r) {
|
|
2666
2674
|
let l = e.priv, o = n.url;
|
|
2667
2675
|
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (bn(), yn(`${et(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, Xt(e, "EV_ON_CLOSE", {
|
|
2668
2676
|
url: o,
|
|
@@ -2677,25 +2685,25 @@
|
|
|
2677
2685
|
code: n.code,
|
|
2678
2686
|
reason: n.reason,
|
|
2679
2687
|
was_clean: n.was_clean
|
|
2680
|
-
})), Ke(e) &&
|
|
2688
|
+
})), Ke(e) && Tl(l.gobj_timer, Hl(e))), 0;
|
|
2681
2689
|
}
|
|
2682
|
-
function
|
|
2690
|
+
function Hl(e) {
|
|
2683
2691
|
let t = e.priv, n = vt(e, "timeout_retry"), r = vt(e, "timeout_retry_max");
|
|
2684
2692
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
2685
2693
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
2686
2694
|
return Math.max(1, Math.round(o));
|
|
2687
2695
|
}
|
|
2688
|
-
function Hl(e, t, n, r) {
|
|
2689
|
-
return xl(e), 0;
|
|
2690
|
-
}
|
|
2691
2696
|
function zl(e, t, n, r) {
|
|
2697
|
+
return Kl(e), 0;
|
|
2698
|
+
}
|
|
2699
|
+
function Ql(e, t, n, r) {
|
|
2692
2700
|
let l = e.priv;
|
|
2693
|
-
|
|
2694
|
-
let o = Mr(e, n,
|
|
2701
|
+
jl(l.gobj_timer);
|
|
2702
|
+
let o = Mr(e, n, Al, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2695
2703
|
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2696
2704
|
let a = Er(e, n, "result", -1, 0), u = Tr(e, n, "comment", "", 0), c = Tr(e, n, "username", "", 0), f = Or(e, n, "services_roles", {});
|
|
2697
2705
|
if (a < 0) {
|
|
2698
|
-
|
|
2706
|
+
Vl(e);
|
|
2699
2707
|
let t = {
|
|
2700
2708
|
url: jt(e, "url"),
|
|
2701
2709
|
result: a,
|
|
@@ -2720,12 +2728,12 @@
|
|
|
2720
2728
|
}
|
|
2721
2729
|
l.inside_on_open = !1, function(e) {
|
|
2722
2730
|
let t = zt(e, null, null, null);
|
|
2723
|
-
for (let n = 0; n < t.length; n++)
|
|
2731
|
+
for (let n = 0; n < t.length; n++) Yl(e, t[n]);
|
|
2724
2732
|
}(e);
|
|
2725
2733
|
}
|
|
2726
2734
|
return 0;
|
|
2727
2735
|
}
|
|
2728
|
-
function
|
|
2736
|
+
function Xl(e, t, n, r) {
|
|
2729
2737
|
let l = e.priv.url, o = function(e, t) {
|
|
2730
2738
|
let n;
|
|
2731
2739
|
try {
|
|
@@ -2744,19 +2752,19 @@
|
|
|
2744
2752
|
} : (yn(`${et(e)}: parsing inter_event: kw not a json object`), null) : (yn(`${et(e)}: parsing inter_kw: no kw`), null);
|
|
2745
2753
|
}(e, n.data);
|
|
2746
2754
|
if (!o) return yn(`${et(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
2747
|
-
if (
|
|
2755
|
+
if (Ll(e)) {
|
|
2748
2756
|
let e = Xe(qe()) + " <== " + l, t = n.data.length, r = yt(qe(), "trace_ievent_callback");
|
|
2749
|
-
r ? r(e, o, 2, t) :
|
|
2757
|
+
r ? r(e, o, 2, t) : Gl(0, e, o);
|
|
2750
2758
|
}
|
|
2751
2759
|
let s = o.event, i = o.kw;
|
|
2752
2760
|
if ("ST_SESSION" !== kt(e)) {
|
|
2753
2761
|
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2754
2762
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2755
2763
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2756
|
-
return
|
|
2764
|
+
return Vl(e), -1;
|
|
2757
2765
|
}
|
|
2758
2766
|
o = null;
|
|
2759
|
-
let _ = xr(e, i), a = Mr(e, i,
|
|
2767
|
+
let _ = xr(e, i), a = Mr(e, i, Al), u = Tr(e, a, "dst_role", "");
|
|
2760
2768
|
if (u.toLowerCase() !== ze().toLowerCase()) return hn(`"It's not my role, dst_role: ${u}, my_role: ${ze()}`), 0;
|
|
2761
2769
|
let c = Tr(e, a, "dst_service", "");
|
|
2762
2770
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
@@ -2768,13 +2776,13 @@
|
|
|
2768
2776
|
}
|
|
2769
2777
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2770
2778
|
}
|
|
2771
|
-
function
|
|
2779
|
+
function Zl(e, t, n, r) {
|
|
2772
2780
|
return 0;
|
|
2773
2781
|
}
|
|
2774
|
-
function
|
|
2782
|
+
function eo(e, t, n, r) {
|
|
2775
2783
|
return 0;
|
|
2776
2784
|
}
|
|
2777
|
-
var
|
|
2785
|
+
var to = {
|
|
2778
2786
|
mt_create: function(e) {
|
|
2779
2787
|
let t = e.priv;
|
|
2780
2788
|
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"), Rt(e, "wanted_yuno_name", t.remote_yuno_name), Rt(e, "wanted_yuno_role", t.remote_yuno_role), Rt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -2804,43 +2812,43 @@
|
|
|
2804
2812
|
code: 1e3,
|
|
2805
2813
|
reason: "restarted",
|
|
2806
2814
|
was_clean: !0
|
|
2807
|
-
}, e),
|
|
2815
|
+
}, e), jl(t.gobj_timer)), t.websocket = Fl(e), 0;
|
|
2808
2816
|
},
|
|
2809
2817
|
mt_stop: function(e) {
|
|
2810
2818
|
let t = e.priv;
|
|
2811
|
-
return
|
|
2819
|
+
return jl(t.gobj_timer), t.websocket && Vl(e), 0;
|
|
2812
2820
|
},
|
|
2813
2821
|
mt_destroy: function(e) {},
|
|
2814
2822
|
mt_stats: function(e, t, n, r) {
|
|
2815
2823
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2816
2824
|
n || (n = {});
|
|
2817
|
-
let l =
|
|
2825
|
+
let l = xl(e, Xe(r), Tr(e, n, "service", null, 0)), o = Or(e, n, "__md_stats__", null, Zt.KW_EXTRACT);
|
|
2818
2826
|
return o || (o = {}), Gr(e, n, "stats_stack", {
|
|
2819
2827
|
stats: t,
|
|
2820
2828
|
kw: o
|
|
2821
|
-
}), Gr(e, n,
|
|
2829
|
+
}), Gr(e, n, Al, l), n.__stats__ = t, Wr(e, n, "__stats__"), Wl(e, "EV_MT_STATS", n, r), null;
|
|
2822
2830
|
},
|
|
2823
2831
|
mt_command_parser: function(e, t, n, r) {
|
|
2824
2832
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2825
2833
|
n || (n = {});
|
|
2826
|
-
let l =
|
|
2834
|
+
let l = xl(e, Xe(r), Tr(e, n, "service", "", 0)), o = Or(e, n, "__md_command__", null, Zt.KW_EXTRACT);
|
|
2827
2835
|
return o || (o = {}), Gr(e, n, "command_stack", {
|
|
2828
2836
|
command: t,
|
|
2829
2837
|
kw: o
|
|
2830
|
-
}), Gr(e, n,
|
|
2838
|
+
}), Gr(e, n, Al, l), n.__command__ = t, Wr(e, n, "__command__"), Wl(e, "EV_MT_COMMAND", n, r), null;
|
|
2831
2839
|
},
|
|
2832
2840
|
mt_inject_event: function(e, t, n, r) {
|
|
2833
2841
|
if ("ST_SESSION" !== kt(e)) return window.console.error("Not in session"), -1;
|
|
2834
|
-
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n,
|
|
2842
|
+
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n, Al));
|
|
2835
2843
|
else {
|
|
2836
|
-
let l =
|
|
2837
|
-
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n,
|
|
2844
|
+
let l = xl(e, Xe(r), Tr(e, n, "__service__", 0, 0));
|
|
2845
|
+
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n, Al, l);
|
|
2838
2846
|
}
|
|
2839
|
-
return Wr(e, n, "__message__"),
|
|
2847
|
+
return Wr(e, n, "__message__"), Wl(e, t, n, r);
|
|
2840
2848
|
},
|
|
2841
2849
|
mt_subscription_added: function(e, t) {
|
|
2842
2850
|
let n = e.priv;
|
|
2843
|
-
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
2851
|
+
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 : Yl(e, t) : 0;
|
|
2844
2852
|
},
|
|
2845
2853
|
mt_subscription_deleted: function(e, t) {
|
|
2846
2854
|
let n = e.priv;
|
|
@@ -2849,7 +2857,7 @@
|
|
|
2849
2857
|
if (ir(t.event)) return 0;
|
|
2850
2858
|
let r = {}, l = t.__global__, o = t.__config__, s = t.__filter__, i = t.__service__, _ = t.subscriber;
|
|
2851
2859
|
o && (r.__config__ = o), l && (r.__global__ = l), s && (r.__filter__ = s);
|
|
2852
|
-
return Gr(e, r,
|
|
2860
|
+
return Gr(e, r, Al, xl(e, Xe(_), i)), Wr(e, r, "__unsubscribing__"), Wl(e, t.event, r, e);
|
|
2853
2861
|
}
|
|
2854
2862
|
};
|
|
2855
2863
|
e.GObj = S, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, l, o) => new T(e, t, n, null, o, r, null, 0, null, l, null), e.SDATACM = (e, t, n, r, l, o) => new T(e, t, 0, null, o, n, null, 0, l, r, null), e.SDATACM2 = (e, t, n, r, l, o, s) => new T(e, t, n, null, s, r, null, 0, o, l, null), e.SDATADF = (e, t, n, r, l, o) => new T(e, t, n, null, o, null, r, l), e.SDATAPM = (e, t, n, r, l) => new T(e, t, n, r, l), e.SDATAPM0 = (e, t, n, r, l) => new T(e, t, n, null, l, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = T, e.YUNETA_VERSION = s, Object.defineProperty(e, "__yuno__", {
|
|
@@ -2863,7 +2871,7 @@
|
|
|
2863
2871
|
return t;
|
|
2864
2872
|
}, e.build_stats_response = o, e.clean_name = function(e) {
|
|
2865
2873
|
return e.replace(/[?# ^:]/g, "_");
|
|
2866
|
-
}, e.clear_timeout =
|
|
2874
|
+
}, e.clear_timeout = jl, e.cmp_two_simple_json = cr, e.command_parser = function(e, t, n, r) {}, e.createElement2 = function e(t, n) {
|
|
2867
2875
|
let [r, l, o, s] = t;
|
|
2868
2876
|
if (!r) return void hn("Tag must be a valid HTML element.");
|
|
2869
2877
|
let i = document.createElement(r), _ = "";
|
|
@@ -2872,21 +2880,21 @@
|
|
|
2872
2880
|
for (const n of Object.keys(l[e])) t += `${n}: ${l[e][n]};`;
|
|
2873
2881
|
i.style.cssText = t;
|
|
2874
2882
|
} else "style" === e ? i.style.cssText = l[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== l[e] && void 0 !== l[e] && (_ = l[e], i.setAttribute("data-i18n", _)) : i.setAttribute(e, l[e]);
|
|
2875
|
-
if (
|
|
2876
|
-
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !
|
|
2883
|
+
if (zr(o)) i.appendChild(Qr(o));
|
|
2884
|
+
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !Xr) i.appendChild(el(o));
|
|
2877
2885
|
else if (o.length > 0 && "<" === o[0] && function(e) {
|
|
2878
|
-
if (
|
|
2886
|
+
if (Zr.size >= 100) return;
|
|
2879
2887
|
const t = e.slice(0, 80);
|
|
2880
|
-
|
|
2888
|
+
Zr.has(t) || (Zr.add(t), yn(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2881
2889
|
}(o), n && _) i.textContent = n(_) || o;
|
|
2882
2890
|
else i.textContent = o;
|
|
2883
2891
|
else if (er(o)) {
|
|
2884
2892
|
if (o.length > 0) if (tr(o[0])) i.appendChild(e(o, n));
|
|
2885
|
-
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) :
|
|
2893
|
+
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) : zr(t) ? i.appendChild(Qr(t)) : tr(t) ? i.appendChild(document.createTextNode(t)) : null != t && !1 !== t && hn("createElement2: child ignored, type " + typeof t);
|
|
2886
2894
|
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? i.appendChild(o) : null != o && (hn("content ignored"), vn(o));
|
|
2887
2895
|
if (s && "object" == typeof s) for (const e of Object.keys(s)) i.addEventListener(e, s[e]);
|
|
2888
2896
|
return i;
|
|
2889
|
-
}, e.createOneHtml =
|
|
2897
|
+
}, e.createOneHtml = el, e.create_json_record = function(e, t) {
|
|
2890
2898
|
let n = Fn(e);
|
|
2891
2899
|
return Mn(n, t), n;
|
|
2892
2900
|
}, e.create_template_record = function(e, t) {
|
|
@@ -2897,21 +2905,21 @@
|
|
|
2897
2905
|
let o = Or(null, t, e, l);
|
|
2898
2906
|
Yn(n, e, o);
|
|
2899
2907
|
}), n;
|
|
2900
|
-
}, e.current_timestamp =
|
|
2901
|
-
let n = kr(
|
|
2908
|
+
}, e.current_timestamp = tl, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2909
|
+
let n = kr(ul(e), null, !1), r = {};
|
|
2902
2910
|
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2903
2911
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2904
|
-
let n = Et(e, E.SDF_PERSIST), r = kr(
|
|
2912
|
+
let n = Et(e, E.SDF_PERSIST), r = kr(ul(e), null, !1);
|
|
2905
2913
|
if (r && Zn(r)) {
|
|
2906
2914
|
let l = Rr(e, r, t, !1);
|
|
2907
2915
|
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2908
2916
|
}
|
|
2909
2917
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2910
|
-
let n = Dr(e, kr(
|
|
2911
|
-
0 === zn(n) ? Ir(
|
|
2918
|
+
let n = Dr(e, kr(ul(e), null, !1), t, !1);
|
|
2919
|
+
0 === zn(n) ? Ir(ul(e)) : Ar(ul(e), n);
|
|
2912
2920
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2913
|
-
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(
|
|
2914
|
-
return r && Zn(r) && Wn(n, r), Ar(
|
|
2921
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(ul(e), null, !1);
|
|
2922
|
+
return r && Zn(r) && Wn(n, r), Ar(ul(e), n);
|
|
2915
2923
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2916
2924
|
let r = null, l = null, o = null;
|
|
2917
2925
|
const s = (...s) => {
|
|
@@ -2935,20 +2943,20 @@
|
|
|
2935
2943
|
return t;
|
|
2936
2944
|
}, e.empty_json = function(e) {
|
|
2937
2945
|
return 0 === Xn(e);
|
|
2938
|
-
}, e.empty_string = ir, e.escapeHtml =
|
|
2946
|
+
}, e.empty_string = ir, e.escapeHtml = qr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2939
2947
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2940
2948
|
let t = null;
|
|
2941
2949
|
for (const n of Object.keys(e)) {
|
|
2942
|
-
const r =
|
|
2950
|
+
const r = _l(n);
|
|
2943
2951
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2944
|
-
if (r.length >
|
|
2952
|
+
if (r.length > ol) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2945
2953
|
const l = "number" == typeof r[0];
|
|
2946
2954
|
if (null === t) t = l ? [] : {};
|
|
2947
2955
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2948
2956
|
let o = t;
|
|
2949
2957
|
for (let t = 0; t < r.length; t++) {
|
|
2950
2958
|
const l = r[t], s = "number" == typeof l, i = t === r.length - 1, _ = !i && "number" == typeof r[t + 1];
|
|
2951
|
-
if (s && l >
|
|
2959
|
+
if (s && l > sl) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2952
2960
|
if (s !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${s ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2953
2961
|
if (i) {
|
|
2954
2962
|
if (Array.isArray(o)) {
|
|
@@ -2988,15 +2996,15 @@
|
|
|
2988
2996
|
removed: {},
|
|
2989
2997
|
changed: {}
|
|
2990
2998
|
};
|
|
2991
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2999
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? al(n[e], r[e]) || br(l.changed, e, {
|
|
2992
3000
|
from: n[e],
|
|
2993
3001
|
to: r[e]
|
|
2994
3002
|
}) : br(l.removed, e, n[e]);
|
|
2995
3003
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || br(l.added, e, r[e]);
|
|
2996
3004
|
return l;
|
|
2997
3005
|
}, e.flat_key_join = function(e) {
|
|
2998
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
2999
|
-
}, e.flat_key_split =
|
|
3006
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : il(e)).join("`") : "";
|
|
3007
|
+
}, e.flat_key_split = _l, e.gclass_add_ev_action = ye, e.gclass_add_event_type = Te, e.gclass_add_state = he, e.gclass_check_fsm = je, e.gclass_create = de, e.gclass_event_type = ve, e.gclass_find_by_name = Oe, e.gclass_flag_t = w, e.gclass_unregister = be, e.getPositionRelativeToBody = function(e) {
|
|
3000
3008
|
if (!e) return {
|
|
3001
3009
|
top: 0,
|
|
3002
3010
|
left: 0,
|
|
@@ -3015,7 +3023,7 @@
|
|
|
3015
3023
|
right: n + i + r,
|
|
3016
3024
|
bottom: t + s + l
|
|
3017
3025
|
};
|
|
3018
|
-
}, e.get_function_name =
|
|
3026
|
+
}, e.get_function_name = ll, e.get_now = function() {
|
|
3019
3027
|
return Math.floor(Date.now() / 1e3);
|
|
3020
3028
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3021
3029
|
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Re(e.parent, e), e.parent = null), $e(t, e), t.gclass.gmt.mt_child_added && (Y(e) && En(n("👦👦🔵 child_added(%s): %s", tt(t), et(e))), t.gclass.gmt.mt_child_added(t, e)), 0) : (hn(`${et(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
@@ -3163,10 +3171,10 @@
|
|
|
3163
3171
|
}
|
|
3164
3172
|
return _ ? yn(`${et(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${_})`) : i || a || (yn(`${et(e)}: No subscription found`), Un(n, "No subscription found")), 0;
|
|
3165
3173
|
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr = $t, e.gobj_write_str_attr = Rt, e.gobj_yuno = qe, e.gobj_yuno_id = Qe, e.gobj_yuno_name = He, e.gobj_yuno_role = ze, e.html_markup = function(e) {
|
|
3166
|
-
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new
|
|
3167
|
-
}, e.id_index_in_obj_list = Pr, e.index_in_list =
|
|
3174
|
+
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new Hr("")) : new Hr(e);
|
|
3175
|
+
}, e.id_index_in_obj_list = Pr, e.index_in_list = nl, e.is_array = er, e.is_boolean = rr, e.is_date = function(e) {
|
|
3168
3176
|
return e instanceof Date && !isNaN(e);
|
|
3169
|
-
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup =
|
|
3177
|
+
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup = zr, e.is_metadata_key = function(e) {
|
|
3170
3178
|
if (!tr(e)) return !1;
|
|
3171
3179
|
let t = 0;
|
|
3172
3180
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -3184,17 +3192,17 @@
|
|
|
3184
3192
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3185
3193
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3186
3194
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3187
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${
|
|
3195
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${Yr(r)}`), null;
|
|
3188
3196
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3189
3197
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3190
3198
|
let o, s = n.split("`"), i = l;
|
|
3191
|
-
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i =
|
|
3199
|
+
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Br(i, null, o, !1);
|
|
3192
3200
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
3193
3201
|
let _ = er(i) ? i : Or(null, i, e.hook, null, 0), a = Pr(_, r.id);
|
|
3194
3202
|
return a < 0 ? (hn(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (_.splice(a, 1), l);
|
|
3195
3203
|
}, e.jdb_get = function(e, t, n, r) {
|
|
3196
3204
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3197
|
-
return l ? (void 0 === r && (r = !0),
|
|
3205
|
+
return l ? (void 0 === r && (r = !0), Br(l, e.hook, n, r)) : (hn("jdb_get: topic not found: " + t), null);
|
|
3198
3206
|
}, e.jdb_get_by_idx = function(e, t, n) {
|
|
3199
3207
|
let r = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3200
3208
|
return r ? n < r.length ? r[n] : {} : (hn("jdb_get_by_idx: topic not found: " + t), null);
|
|
@@ -3213,11 +3221,11 @@
|
|
|
3213
3221
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3214
3222
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3215
3223
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3216
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${
|
|
3224
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${Yr(r)}`), null;
|
|
3217
3225
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3218
3226
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3219
3227
|
let o, s, i = n.split("`"), _ = l;
|
|
3220
|
-
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ =
|
|
3228
|
+
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Br(_, null, o, !1);
|
|
3221
3229
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
3222
3230
|
if (er(_)) s = _;
|
|
3223
3231
|
else {
|
|
@@ -3225,11 +3233,11 @@
|
|
|
3225
3233
|
if (s = Or(null, _, e.hook, null, 0), null == s) s = [], Yn(_, e.hook, s);
|
|
3226
3234
|
else if (!er(s)) return hn(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
3227
3235
|
}
|
|
3228
|
-
let a =
|
|
3236
|
+
let a = Br(s, e.hook, r.id, !1);
|
|
3229
3237
|
return a ? Gn(a, r) : s.push(r), l;
|
|
3230
3238
|
}, e.json2flat = function(e) {
|
|
3231
3239
|
const t = {}, n = (e, r, l) => {
|
|
3232
|
-
if (l >
|
|
3240
|
+
if (l > ol) throw new Error("json2flat: deeper than 256");
|
|
3233
3241
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
3234
3242
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
3235
3243
|
const o = `[${t}]`;
|
|
@@ -3239,7 +3247,7 @@
|
|
|
3239
3247
|
const t = Object.keys(e);
|
|
3240
3248
|
if (t.length > 0) {
|
|
3241
3249
|
for (const o of t) {
|
|
3242
|
-
const t =
|
|
3250
|
+
const t = il(o);
|
|
3243
3251
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
3244
3252
|
}
|
|
3245
3253
|
return;
|
|
@@ -3252,7 +3260,7 @@
|
|
|
3252
3260
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
3253
3261
|
}, e.json_array_remove = Hn, e.json_array_size = Qn, e.json_deep_copy = Fn, e.json_is_identical = Vn, e.json_mask_secrets = Pn, e.json_object_del = Kn, e.json_object_get = xn, e.json_object_set = Yn, e.json_object_set_new = Bn, e.json_object_size = zn, e.json_object_update = Gn, e.json_object_update_existing = Mn, e.json_object_update_missing = Wn, e.json_size = Xn, e.jwt2json = function(e, t) {
|
|
3254
3262
|
try {
|
|
3255
|
-
let n =
|
|
3263
|
+
let n = Jr(e);
|
|
3256
3264
|
switch (t) {
|
|
3257
3265
|
case "header": return JSON.parse(n.header);
|
|
3258
3266
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -3261,7 +3269,7 @@
|
|
|
3261
3269
|
} catch (e) {
|
|
3262
3270
|
return null;
|
|
3263
3271
|
}
|
|
3264
|
-
}, e.jwtDecode =
|
|
3272
|
+
}, e.jwtDecode = Jr, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3265
3273
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3266
3274
|
r || (r = $r);
|
|
3267
3275
|
let l = [];
|
|
@@ -3282,7 +3290,7 @@
|
|
|
3282
3290
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
3283
3291
|
let o = mr(e, t, n, !1);
|
|
3284
3292
|
const s = l && l & Zt.KW_REQUIRED, i = l && l & Zt.KW_CREATE, _ = l && l & Zt.KW_EXTRACT;
|
|
3285
|
-
return void 0 === o ? i && er(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : er(o) ? (_ && hr(e, t, n), o) : (s && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json list: '${n}'`), Un(t)), r);
|
|
3293
|
+
return void 0 === o ? i && er(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : er(o) ? (_ && hr(e, t, n), o) : i && null === o && er(r) ? (Sr(e, t, n, r), r) : ((s || i) && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json list: '${n}'` + (i ? ", cannot create" : "")), Un(t)), r);
|
|
3286
3294
|
}, e.kw_get_local_storage_value = kr, e.kw_get_pointer = vr, e.kw_get_real = function(e, t, n, r, l) {
|
|
3287
3295
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
3288
3296
|
let o = mr(e, t, n, !1);
|
|
@@ -3405,9 +3413,9 @@
|
|
|
3405
3413
|
var e;
|
|
3406
3414
|
}, r.send();
|
|
3407
3415
|
}, e.log_debug = En, e.log_error = hn, e.log_info = function(e, ...t) {
|
|
3408
|
-
let n = mn(e, ...t), r =
|
|
3416
|
+
let n = mn(e, ...t), r = tl();
|
|
3409
3417
|
rn && cn("info", n) && rn("%c" + r + " INFO: " + String(n), "color:cyan"), gn("info", n, r);
|
|
3410
|
-
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid =
|
|
3418
|
+
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid = rl, e.parseBoolean = _r, e.parseSVG = function(e) {
|
|
3411
3419
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
3412
3420
|
}, e.refresh_language = function(e, t) {
|
|
3413
3421
|
if (!or(t)) return void hn("You must supply a translation function");
|
|
@@ -3434,22 +3442,22 @@
|
|
|
3434
3442
|
});
|
|
3435
3443
|
}, e.register_c_ievent_cli = function() {
|
|
3436
3444
|
return function(e) {
|
|
3437
|
-
if (
|
|
3445
|
+
if (Ul) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3438
3446
|
const t = [
|
|
3439
3447
|
["ST_DISCONNECTED", [
|
|
3440
3448
|
[
|
|
3441
3449
|
"EV_ON_OPEN",
|
|
3442
|
-
|
|
3450
|
+
Jl,
|
|
3443
3451
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3444
3452
|
],
|
|
3445
3453
|
[
|
|
3446
3454
|
"EV_ON_CLOSE",
|
|
3447
|
-
|
|
3455
|
+
ql,
|
|
3448
3456
|
null
|
|
3449
3457
|
],
|
|
3450
3458
|
[
|
|
3451
3459
|
"EV_TIMEOUT",
|
|
3452
|
-
|
|
3460
|
+
Bl,
|
|
3453
3461
|
null
|
|
3454
3462
|
],
|
|
3455
3463
|
[
|
|
@@ -3461,22 +3469,22 @@
|
|
|
3461
3469
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3462
3470
|
[
|
|
3463
3471
|
"EV_ON_MESSAGE",
|
|
3464
|
-
|
|
3472
|
+
Xl,
|
|
3465
3473
|
null
|
|
3466
3474
|
],
|
|
3467
3475
|
[
|
|
3468
3476
|
"EV_IDENTITY_CARD_ACK",
|
|
3469
|
-
|
|
3477
|
+
Ql,
|
|
3470
3478
|
null
|
|
3471
3479
|
],
|
|
3472
3480
|
[
|
|
3473
3481
|
"EV_ON_CLOSE",
|
|
3474
|
-
|
|
3482
|
+
ql,
|
|
3475
3483
|
"ST_DISCONNECTED"
|
|
3476
3484
|
],
|
|
3477
3485
|
[
|
|
3478
3486
|
"EV_TIMEOUT",
|
|
3479
|
-
|
|
3487
|
+
zl,
|
|
3480
3488
|
null
|
|
3481
3489
|
],
|
|
3482
3490
|
[
|
|
@@ -3488,22 +3496,22 @@
|
|
|
3488
3496
|
["ST_SESSION", [
|
|
3489
3497
|
[
|
|
3490
3498
|
"EV_ON_MESSAGE",
|
|
3491
|
-
|
|
3499
|
+
Xl,
|
|
3492
3500
|
null
|
|
3493
3501
|
],
|
|
3494
3502
|
[
|
|
3495
3503
|
"EV_MT_STATS",
|
|
3496
|
-
|
|
3504
|
+
Zl,
|
|
3497
3505
|
null
|
|
3498
3506
|
],
|
|
3499
3507
|
[
|
|
3500
3508
|
"EV_MT_COMMAND",
|
|
3501
|
-
|
|
3509
|
+
eo,
|
|
3502
3510
|
null
|
|
3503
3511
|
],
|
|
3504
3512
|
[
|
|
3505
3513
|
"EV_ON_CLOSE",
|
|
3506
|
-
|
|
3514
|
+
ql,
|
|
3507
3515
|
"ST_DISCONNECTED"
|
|
3508
3516
|
],
|
|
3509
3517
|
[
|
|
@@ -3514,7 +3522,7 @@
|
|
|
3514
3522
|
]],
|
|
3515
3523
|
[null, null]
|
|
3516
3524
|
];
|
|
3517
|
-
return (
|
|
3525
|
+
return (Ul = de(e, [
|
|
3518
3526
|
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3519
3527
|
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3520
3528
|
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
@@ -3525,36 +3533,36 @@
|
|
|
3525
3533
|
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3526
3534
|
["EV_TIMEOUT", 0],
|
|
3527
3535
|
[null, 0]
|
|
3528
|
-
], t,
|
|
3536
|
+
], t, to, 0, Il, Pl, 0, 0, Cl, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3529
3537
|
}("C_IEVENT_CLI");
|
|
3530
3538
|
}, e.register_c_timer = function() {
|
|
3531
3539
|
return function(e) {
|
|
3532
|
-
if (
|
|
3540
|
+
if (hl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3533
3541
|
const t = [["ST_IDLE", [[
|
|
3534
3542
|
"EV_TIMEOUT",
|
|
3535
|
-
|
|
3543
|
+
yl,
|
|
3536
3544
|
null
|
|
3537
3545
|
]]]];
|
|
3538
|
-
return (
|
|
3546
|
+
return (hl = de(e, [
|
|
3539
3547
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3540
3548
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3541
3549
|
[0, 0]
|
|
3542
|
-
], t,
|
|
3550
|
+
], t, El, 0, pl, ml, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3543
3551
|
}("C_TIMER");
|
|
3544
3552
|
}, e.register_c_yuno = function() {
|
|
3545
3553
|
return function(e) {
|
|
3546
|
-
if (
|
|
3554
|
+
if (wl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3547
3555
|
const t = [["ST_IDLE", [[
|
|
3548
3556
|
"EV_TIMEOUT_PERIODIC",
|
|
3549
|
-
|
|
3557
|
+
Dl,
|
|
3550
3558
|
null
|
|
3551
3559
|
]]]];
|
|
3552
|
-
return (
|
|
3560
|
+
return (wl = de(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, kl, 0, Ol, Sl, 0, 0, 0, 0)) ? 0 : -1;
|
|
3553
3561
|
}("C_YUNO");
|
|
3554
3562
|
}, e.safeSrc = function(e) {
|
|
3555
3563
|
if (!e) return "";
|
|
3556
3564
|
const t = String(e).trim();
|
|
3557
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
3565
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : qr(t);
|
|
3558
3566
|
}, e.sdata_flag_t = E, e.send_http_json_post = function(e, t, n) {
|
|
3559
3567
|
let r = new XMLHttpRequest();
|
|
3560
3568
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
@@ -3578,9 +3586,9 @@
|
|
|
3578
3586
|
}
|
|
3579
3587
|
} else on = e;
|
|
3580
3588
|
}, e.set_remote_log_functions = bn, e.set_strings_are_text = function(e) {
|
|
3581
|
-
|
|
3582
|
-
}, e.set_timeout =
|
|
3583
|
-
return
|
|
3589
|
+
Xr = !!e;
|
|
3590
|
+
}, e.set_timeout = Tl, e.set_timeout_periodic = vl, e.sprintf = n, e.stats_parser = function(e, t, n, r) {}, e.str_in_list = Ur, e.strcasecmp = ur, e.strcmp = ar, e.strings_are_text = function() {
|
|
3591
|
+
return Xr;
|
|
3584
3592
|
}, e.strncmp = function(e, t, n) {
|
|
3585
3593
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
3586
3594
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
@@ -3610,9 +3618,9 @@
|
|
|
3610
3618
|
let e = t.split(".");
|
|
3611
3619
|
for (let t = 0; t < e.length; t++) {
|
|
3612
3620
|
let r = e[t];
|
|
3613
|
-
if (Ur(
|
|
3614
|
-
else if (Ur(
|
|
3615
|
-
else if (Ur(
|
|
3621
|
+
if (Ur(fl, r)) n.real_type || (n.real_type = r);
|
|
3622
|
+
else if (Ur(dl, r)) n.type || (n.type = r);
|
|
3623
|
+
else if (Ur(gl, r)) switch (r) {
|
|
3616
3624
|
case "writable":
|
|
3617
3625
|
n.is_writable = !0;
|
|
3618
3626
|
break;
|
|
@@ -3624,7 +3632,7 @@
|
|
|
3624
3632
|
}
|
|
3625
3633
|
}
|
|
3626
3634
|
n.real_type || (n.real_type = "string");
|
|
3627
|
-
} else Zn(t) ? (n =
|
|
3635
|
+
} else Zn(t) ? (n = bl(t), n.name || (n.name = e), n.header || (n.header = e)) : er(t) && (n.real_type = "array", n.enum_list = t);
|
|
3628
3636
|
return n.type || (n.type = n.real_type), n;
|
|
3629
3637
|
}, e.timeTracker = function(e = "Time Tracker", t = !1) {
|
|
3630
3638
|
const n = e, r = performance.now();
|
|
@@ -3636,7 +3644,7 @@
|
|
|
3636
3644
|
total: _
|
|
3637
3645
|
};
|
|
3638
3646
|
} };
|
|
3639
|
-
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey =
|
|
3647
|
+
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey = cl, e.treedb_decoder_hook = function(e, t) {
|
|
3640
3648
|
if (tr(t)) {
|
|
3641
3649
|
if (-1 === t.indexOf("^")) {
|
|
3642
3650
|
let n, r = e.hook;
|
|
@@ -3663,9 +3671,9 @@
|
|
|
3663
3671
|
id: t.id
|
|
3664
3672
|
} : (hn("bad hook 3"), hn(e), hn(t), null);
|
|
3665
3673
|
}, e.treedb_encoder_fkey = function(e, t) {
|
|
3666
|
-
let n =
|
|
3674
|
+
let n = cl(e, t);
|
|
3667
3675
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
3668
|
-
}, e.treedb_get_field_desc =
|
|
3676
|
+
}, e.treedb_get_field_desc = bl, e.treedb_hook_data_size = function(e) {
|
|
3669
3677
|
if (er(e) && 1 === Xn(e)) {
|
|
3670
3678
|
let t = e[0];
|
|
3671
3679
|
return gr(t, "size") ? t.size : 1;
|