@yuneta/gobj-js 7.26.1 → 7.26.3
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 +129 -36
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +1013 -978
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +126 -37
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +394 -357
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +129 -36
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1070 -1035
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +129 -36
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1070 -1035
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +3 -3
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -133,7 +133,7 @@ function s(e, t, n, r, l) {
|
|
|
133
133
|
data: l || []
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = Object.create(null), h = null, E = null,
|
|
136
|
+
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = Object.create(null), h = null, E = null, y = 0, T = Object.freeze({
|
|
137
137
|
DTP_STRING: 1,
|
|
138
138
|
DTP_BOOLEAN: 2,
|
|
139
139
|
DTP_INTEGER: 3,
|
|
@@ -143,7 +143,7 @@ var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b
|
|
|
143
143
|
DTP_JSON: 7,
|
|
144
144
|
DTP_POINTER: 8
|
|
145
145
|
});
|
|
146
|
-
|
|
146
|
+
T.DTP_POINTER;
|
|
147
147
|
var v = Object.freeze({
|
|
148
148
|
SDF_NOTACCESS: 1,
|
|
149
149
|
SDF_RD: 2,
|
|
@@ -230,7 +230,7 @@ function K() {
|
|
|
230
230
|
return W;
|
|
231
231
|
}
|
|
232
232
|
function Y(e) {
|
|
233
|
-
Yr(e) && (e = JSON.stringify(e)), ur(" ".repeat(Math.max(1, 2 *
|
|
233
|
+
Yr(e) && (e = JSON.stringify(e)), ur(" ".repeat(Math.max(1, 2 * y)) + String(e));
|
|
234
234
|
}
|
|
235
235
|
var B = Object.freeze({
|
|
236
236
|
TRACE_MACHINE: 65536,
|
|
@@ -324,8 +324,8 @@ var B = Object.freeze({
|
|
|
324
324
|
B.TRACE_COMMANDS,
|
|
325
325
|
"Trace commands"
|
|
326
326
|
]
|
|
327
|
-
], q = 0, H = 0,
|
|
328
|
-
function
|
|
327
|
+
], q = 0, H = 0, z = 0;
|
|
328
|
+
function Q(e, t) {
|
|
329
329
|
let n = [];
|
|
330
330
|
for (const [t, r] of J) e & r && n.push(t);
|
|
331
331
|
if (Array.isArray(t)) for (let r = 0; r < t.length && r < 16; r++) t[r] && e & 1 << r && n.push(t[r][0]);
|
|
@@ -346,7 +346,7 @@ function X(e, t, n) {
|
|
|
346
346
|
}(String(e), n) || (ir(`${t}: trace level NOT FOUND: ${e}`), 0);
|
|
347
347
|
}
|
|
348
348
|
function Z(e) {
|
|
349
|
-
if (
|
|
349
|
+
if (z) return 4294967295;
|
|
350
350
|
let t = q;
|
|
351
351
|
return e && (t |= e.trace_level || 0, e.gclass && (t |= e.gclass.trace_level || 0)), t;
|
|
352
352
|
}
|
|
@@ -367,13 +367,13 @@ function le(e) {
|
|
|
367
367
|
return Z(e) & B.TRACE_EV_KW;
|
|
368
368
|
}
|
|
369
369
|
function oe(e, t) {
|
|
370
|
-
if (
|
|
370
|
+
if (z > 1) return !0;
|
|
371
371
|
if (!e) return !1;
|
|
372
372
|
const n = Z(e);
|
|
373
373
|
return !!(n & B.TRACE_MACHINE || n & B.TRACE_TIMER_PERIODIC && "EV_TIMEOUT_PERIODIC" === t || n & B.TRACE_TIMER && "EV_TIMEOUT" === t);
|
|
374
374
|
}
|
|
375
375
|
function ie(e, t) {
|
|
376
|
-
if (
|
|
376
|
+
if (z > 1) return !1;
|
|
377
377
|
if (!e) return !0;
|
|
378
378
|
const n = ee(e);
|
|
379
379
|
return !!(n & B.TRACE_MACHINE || n & B.TRACE_TIMER_PERIODIC && "EV_TIMEOUT_PERIODIC" === t || n & B.TRACE_TIMER && "EV_TIMEOUT" === t);
|
|
@@ -399,25 +399,25 @@ function fe(e, t) {
|
|
|
399
399
|
return H = t ? (H | e) >>> 0 : (H & ~e) >>> 0, 0;
|
|
400
400
|
}
|
|
401
401
|
function ge() {
|
|
402
|
-
return
|
|
402
|
+
return Q(q, null);
|
|
403
403
|
}
|
|
404
404
|
function de() {
|
|
405
|
-
return
|
|
405
|
+
return Q(H, null);
|
|
406
406
|
}
|
|
407
407
|
function be(e) {
|
|
408
408
|
const t = Jr(e) ? Me(e) : e;
|
|
409
|
-
return t ?
|
|
409
|
+
return t ? Q(t.trace_level | q, t.s_user_trace_level) : (ir(`gobj_get_gclass_trace_level: gclass NOT FOUND: ${e}`), []);
|
|
410
410
|
}
|
|
411
411
|
function pe(e) {
|
|
412
412
|
const t = Jr(e) ? Me(e) : e;
|
|
413
|
-
return t ?
|
|
413
|
+
return t ? Q(t.trace_level, t.s_user_trace_level) : (ir(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
414
414
|
}
|
|
415
415
|
function me(e) {
|
|
416
416
|
const t = Jr(e) ? Me(e) : e;
|
|
417
|
-
return t ?
|
|
417
|
+
return t ? Q(t.no_trace_level, t.s_user_trace_level) : (ir(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
418
418
|
}
|
|
419
419
|
function he(e) {
|
|
420
|
-
return
|
|
420
|
+
return z = Number(e) || 0, 0;
|
|
421
421
|
}
|
|
422
422
|
function Ee(e, t, n) {
|
|
423
423
|
const r = Jr(e) ? Me(e) : e;
|
|
@@ -425,12 +425,12 @@ function Ee(e, t, n) {
|
|
|
425
425
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
426
426
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function ye(e, t, n) {
|
|
429
429
|
if (!e) return ir("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
430
430
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
431
431
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Te(e, t, n) {
|
|
434
434
|
const r = Jr(e) ? Me(e) : e;
|
|
435
435
|
if (!r) return ir(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
436
436
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
@@ -470,19 +470,19 @@ function Ne(e, t) {
|
|
|
470
470
|
function we(e, t, n) {
|
|
471
471
|
let r, l = n.default_value;
|
|
472
472
|
switch (n.type) {
|
|
473
|
-
case
|
|
473
|
+
case T.DTP_STRING:
|
|
474
474
|
r = String(l);
|
|
475
475
|
break;
|
|
476
|
-
case
|
|
476
|
+
case T.DTP_BOOLEAN:
|
|
477
477
|
r = nl(l);
|
|
478
478
|
break;
|
|
479
|
-
case
|
|
479
|
+
case T.DTP_INTEGER:
|
|
480
480
|
r = parseInt(l), isNaN(r) && ir(`${$t(e)}: attr NaN: ${n.name}`);
|
|
481
481
|
break;
|
|
482
|
-
case
|
|
482
|
+
case T.DTP_REAL:
|
|
483
483
|
r = Number(l), isNaN(r) && ir(`${$t(e)}: attr NaN: ${n.name}`);
|
|
484
484
|
break;
|
|
485
|
-
case
|
|
485
|
+
case T.DTP_LIST:
|
|
486
486
|
if (Jr(l)) try {
|
|
487
487
|
r = JSON.parse(l);
|
|
488
488
|
} catch (e) {
|
|
@@ -491,7 +491,7 @@ function we(e, t, n) {
|
|
|
491
491
|
else r = l;
|
|
492
492
|
Br(r) || (r = []);
|
|
493
493
|
break;
|
|
494
|
-
case
|
|
494
|
+
case T.DTP_DICT:
|
|
495
495
|
if (Jr(l)) try {
|
|
496
496
|
r = JSON.parse(l);
|
|
497
497
|
} catch (e) {
|
|
@@ -500,7 +500,7 @@ function we(e, t, n) {
|
|
|
500
500
|
else r = l;
|
|
501
501
|
Yr(r) || (r = {});
|
|
502
502
|
break;
|
|
503
|
-
case
|
|
503
|
+
case T.DTP_JSON:
|
|
504
504
|
if ("" === l || void 0 === l) r = null;
|
|
505
505
|
else if (Jr(l)) try {
|
|
506
506
|
r = JSON.parse(l);
|
|
@@ -509,14 +509,14 @@ function we(e, t, n) {
|
|
|
509
509
|
}
|
|
510
510
|
else r = l;
|
|
511
511
|
break;
|
|
512
|
-
case
|
|
512
|
+
case T.DTP_POINTER: r = l;
|
|
513
513
|
}
|
|
514
514
|
return void 0 === r && (ir(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
516
|
function je(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
|
-
case
|
|
519
|
+
case T.DTP_STRING:
|
|
520
520
|
if (null == r) l = "";
|
|
521
521
|
else if (Jr(r)) l = String(r);
|
|
522
522
|
else {
|
|
@@ -524,16 +524,16 @@ function je(e, t, n, r) {
|
|
|
524
524
|
e && (l = String(e));
|
|
525
525
|
}
|
|
526
526
|
break;
|
|
527
|
-
case
|
|
527
|
+
case T.DTP_BOOLEAN:
|
|
528
528
|
l = nl(r);
|
|
529
529
|
break;
|
|
530
|
-
case
|
|
530
|
+
case T.DTP_INTEGER:
|
|
531
531
|
if (l = parseInt(r), isNaN(l)) return ir(`${$t(e)}: attr NaN: ${n.name}`), -1;
|
|
532
532
|
break;
|
|
533
|
-
case
|
|
533
|
+
case T.DTP_REAL:
|
|
534
534
|
if (l = Number(r), isNaN(l)) return ir(`${$t(e)}: attr NaN: ${n.name}`), -1;
|
|
535
535
|
break;
|
|
536
|
-
case
|
|
536
|
+
case T.DTP_LIST:
|
|
537
537
|
if (Jr(r)) try {
|
|
538
538
|
l = JSON.parse(r);
|
|
539
539
|
} catch (e) {
|
|
@@ -542,7 +542,7 @@ function je(e, t, n, r) {
|
|
|
542
542
|
else l = r;
|
|
543
543
|
if (!Br(l)) return ir(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
|
-
case
|
|
545
|
+
case T.DTP_DICT:
|
|
546
546
|
if (Jr(r)) try {
|
|
547
547
|
l = JSON.parse(r);
|
|
548
548
|
} catch (e) {
|
|
@@ -551,7 +551,7 @@ function je(e, t, n, r) {
|
|
|
551
551
|
else l = r;
|
|
552
552
|
if (!Yr(l)) return ir(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
|
-
case
|
|
554
|
+
case T.DTP_JSON:
|
|
555
555
|
if (l = r, Jr(r)) {
|
|
556
556
|
const e = r.trim();
|
|
557
557
|
if (e.startsWith("{") || e.startsWith("[")) try {
|
|
@@ -561,15 +561,15 @@ function je(e, t, n, r) {
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
break;
|
|
564
|
-
case
|
|
564
|
+
case T.DTP_POINTER: l = r;
|
|
565
565
|
}
|
|
566
|
-
return void 0 === l && ir(`${$t(e)}: attr undefined: ${n.name}`), t[n.name] = l, Yr(e.priv) &&
|
|
566
|
+
return void 0 === l && ir(`${$t(e)}: attr undefined: ${n.name}`), t[n.name] = l, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
567
567
|
}
|
|
568
568
|
function Re(e) {
|
|
569
569
|
return e.jn_attrs;
|
|
570
570
|
}
|
|
571
571
|
function $e(e, t, n) {
|
|
572
|
-
return
|
|
572
|
+
return zt(e, t) ? Re(e) : e && e.bottom_gobj ? $e(e.bottom_gobj, t, n) : (n && ir(`GClass Attribute NOT FOUND: ${$t(e)}, attr ${t}`), null);
|
|
573
573
|
}
|
|
574
574
|
function De(e, t, n) {
|
|
575
575
|
if (!(e && e instanceof I)) return n && ir("gclass NULL"), null;
|
|
@@ -714,19 +714,19 @@ function Be(e, t) {
|
|
|
714
714
|
t.parent && ir(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
715
715
|
}
|
|
716
716
|
function Je(e, t) {
|
|
717
|
-
let n =
|
|
717
|
+
let n = Ao(e.dl_children, t);
|
|
718
718
|
n >= 0 && (Vr(e.dl_children, n), t.parent = null);
|
|
719
719
|
}
|
|
720
720
|
function qe(e, t) {
|
|
721
|
-
return
|
|
721
|
+
return Tt(e) ? u ? u(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
722
722
|
}
|
|
723
723
|
function He(e, t) {
|
|
724
|
-
return
|
|
725
|
-
}
|
|
726
|
-
function Qe(e, t) {
|
|
727
|
-
return yt(e) ? c ? c(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
724
|
+
return Tt(e) ? _ ? _(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
728
725
|
}
|
|
729
726
|
function ze(e, t) {
|
|
727
|
+
return Tt(e) ? c ? c(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
728
|
+
}
|
|
729
|
+
function Qe(e, t) {
|
|
730
730
|
return f ? f(e, t) : null;
|
|
731
731
|
}
|
|
732
732
|
function Xe(e, t) {
|
|
@@ -823,13 +823,13 @@ function at(e) {
|
|
|
823
823
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
824
824
|
}
|
|
825
825
|
function ut(e, t, n) {
|
|
826
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) ||
|
|
826
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) || yt(e) || at(e), 0;
|
|
827
827
|
}
|
|
828
828
|
function _t(e) {
|
|
829
829
|
return Ct(e) ? (ir("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
830
830
|
}
|
|
831
831
|
function ct(e, t, n) {
|
|
832
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start ||
|
|
832
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || yt(e) ? 1 : (Et(e) || at(e), 0);
|
|
833
833
|
}
|
|
834
834
|
function ft(e) {
|
|
835
835
|
return Ct(e) ? (ir("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", Dt(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Vt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
@@ -868,10 +868,10 @@ function ht(e) {
|
|
|
868
868
|
function Et(e) {
|
|
869
869
|
return !Ct(e) && e.running;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function yt(e) {
|
|
872
872
|
return !!Ct(e) || e.disabled;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Tt(e) {
|
|
875
875
|
return !!(e && e.gobj_flag & L.gobj_flag_service);
|
|
876
876
|
}
|
|
877
877
|
function vt(e) {
|
|
@@ -991,7 +991,7 @@ function Yt(e, t) {
|
|
|
991
991
|
}
|
|
992
992
|
if (o && o !== cn(e)) return !1;
|
|
993
993
|
let i = e.jn_attrs;
|
|
994
|
-
for (const n of Object.keys(t)) if ("__gclass_name__" !== n && "__gobj_name__" !== n && "__prefix_gobj_name__" !== n && "__disabled__" !== n && "__state__" !== n &&
|
|
994
|
+
for (const n of Object.keys(t)) if ("__gclass_name__" !== n && "__gobj_name__" !== n && "__prefix_gobj_name__" !== n && "__disabled__" !== n && "__state__" !== n && zt(e, n) && i[n] !== t[n]) return !1;
|
|
995
995
|
return !0;
|
|
996
996
|
}
|
|
997
997
|
function Bt(e, t) {
|
|
@@ -1044,12 +1044,12 @@ function Ht(e, t) {
|
|
|
1044
1044
|
let o = Bt(e, l);
|
|
1045
1045
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function zt(e, t) {
|
|
1048
1048
|
return !tl(t) && !!De(e.gclass, t, !1);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Qt(e, t, n) {
|
|
1051
1051
|
let r = e.jn_attrs;
|
|
1052
|
-
if (t in r &&
|
|
1052
|
+
if (t in r && Object.prototype.hasOwnProperty.call(r, t)) {
|
|
1053
1053
|
let n = r[t];
|
|
1054
1054
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
1055
1055
|
}
|
|
@@ -1068,10 +1068,10 @@ function Xt(e, t, n) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
function Zt(e, t) {
|
|
1070
1070
|
if (t) {
|
|
1071
|
-
if (0 === ol(t, "__disabled__")) return
|
|
1071
|
+
if (0 === ol(t, "__disabled__")) return yt(e);
|
|
1072
1072
|
if (0 === ol(t, "__running__")) return Et(e);
|
|
1073
1073
|
if (0 === ol(t, "__playing__")) return vt(e);
|
|
1074
|
-
if (0 === ol(t, "__service__")) return
|
|
1074
|
+
if (0 === ol(t, "__service__")) return Tt(e);
|
|
1075
1075
|
}
|
|
1076
1076
|
let n = $e(e, t, !1);
|
|
1077
1077
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? kr(n, t) : e.gclass.gmt.mt_reading(e, t) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
@@ -1095,7 +1095,7 @@ function rn(e, n, r, l) {
|
|
|
1095
1095
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1096
1096
|
if (s.length <= 1) {
|
|
1097
1097
|
let l = n;
|
|
1098
|
-
return l in i &&
|
|
1098
|
+
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (ir(t("gobj_write_attr(%s): attr not found '%s'", $t(e), l)), -1);
|
|
1099
1099
|
}
|
|
1100
1100
|
let a = s.length;
|
|
1101
1101
|
for (let t = 0; t < a; t++) {
|
|
@@ -1106,7 +1106,7 @@ function rn(e, n, r, l) {
|
|
|
1106
1106
|
continue;
|
|
1107
1107
|
}
|
|
1108
1108
|
let l = e.jn_attrs;
|
|
1109
|
-
if (o in l &&
|
|
1109
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
1112
1112
|
return ir(t("gobj_write_attr(%s): attr not found '%s'", $t(e), o)), -1;
|
|
@@ -1117,7 +1117,7 @@ function ln(e) {
|
|
|
1117
1117
|
let r = e.gclass.attrs_table;
|
|
1118
1118
|
for (let l = 0; l < r.length; l++) {
|
|
1119
1119
|
const o = r[l];
|
|
1120
|
-
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), Yr(e.priv) &&
|
|
1120
|
+
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o.name) && (e.priv[o.name] = e.jn_attrs[o.name]), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name)));
|
|
1121
1121
|
}
|
|
1122
1122
|
return 0;
|
|
1123
1123
|
}(e, v.SDF_VOLATIL, 0);
|
|
@@ -1132,15 +1132,15 @@ function on(e, t, n, r) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
function sn(e, t, n) {
|
|
1134
1134
|
let r = $e(e, t, !1);
|
|
1135
|
-
return r ? (r[t] = nl(n), Yr(e.priv) &&
|
|
1135
|
+
return r ? (r[t] = nl(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1136
1136
|
}
|
|
1137
1137
|
function an(e, t, n) {
|
|
1138
1138
|
let r = $e(e, t, !1);
|
|
1139
|
-
return r ? (r[t] = parseInt(n), Yr(e.priv) &&
|
|
1139
|
+
return r ? (r[t] = parseInt(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1140
1140
|
}
|
|
1141
1141
|
function un(e, t, n) {
|
|
1142
1142
|
let r = $e(e, t, !1);
|
|
1143
|
-
return r ? (r[t] = String(n), Yr(e.priv) &&
|
|
1143
|
+
return r ? (r[t] = String(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1144
1144
|
}
|
|
1145
1145
|
function _n(e, n) {
|
|
1146
1146
|
if (Ct(e)) return ir("gobj NULL or DESTROYED"), null;
|
|
@@ -1187,12 +1187,12 @@ function hn(e, n, r, l) {
|
|
|
1187
1187
|
event: n,
|
|
1188
1188
|
kw: r,
|
|
1189
1189
|
src: l
|
|
1190
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", $t(e), n, pn.length)), mn || (mn = !0, setTimeout(
|
|
1190
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", $t(e), n, pn.length)), mn || (mn = !0, setTimeout(yn, 0)), 0) : (ir(`gobj_post_event(): event NOT DEFINED in gclass ${Rt(e)}, event ${n}`), -1) : (ir(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1191
1191
|
}
|
|
1192
1192
|
function En() {
|
|
1193
1193
|
return pn.length;
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function yn() {
|
|
1196
1196
|
mn = !1;
|
|
1197
1197
|
let e = pn;
|
|
1198
1198
|
pn = [];
|
|
@@ -1201,29 +1201,29 @@ function Tn() {
|
|
|
1201
1201
|
const r = e[n];
|
|
1202
1202
|
if (!(r.dst.obflag & (P.obflag_destroyed | P.obflag_destroying))) {
|
|
1203
1203
|
try {
|
|
1204
|
-
|
|
1204
|
+
Tn(r.dst, r.event, r.kw, r.src);
|
|
1205
1205
|
} catch (t) {
|
|
1206
|
-
throw (pn = e.slice(n + 1).concat(pn)).length > 0 && !mn && (mn = !0, setTimeout(
|
|
1206
|
+
throw (pn = e.slice(n + 1).concat(pn)).length > 0 && !mn && (mn = !0, setTimeout(yn, 0)), t;
|
|
1207
1207
|
}
|
|
1208
1208
|
t++;
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
return pn.length > 0 && !mn && (mn = !0, setTimeout(
|
|
1211
|
+
return pn.length > 0 && !mn && (mn = !0, setTimeout(yn, 0)), t;
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Tn(e, n, r, l) {
|
|
1214
1214
|
if (!(e && e instanceof k)) return ir("gobj dst NULL"), -1;
|
|
1215
1215
|
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return ir("gobj dst DESTROYED"), -1;
|
|
1216
1216
|
let o = e.current_state;
|
|
1217
1217
|
if (!o) return ir(`${$t(e)}: current_state NULL`), -1;
|
|
1218
1218
|
let i = oe(e, n) && !ie(l, n);
|
|
1219
|
-
|
|
1219
|
+
y++;
|
|
1220
1220
|
let s = Ce(o, n);
|
|
1221
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (
|
|
1221
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", $t(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", $t(e), o.state_name, n || "", l && !l.running ? "!!" : "", $t(l))), r && le(e) && Mr(r) && wr(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", Rt(e), jt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l), jt(l))), ir(`📛📛 Event NOT DEFINED in state 📛📛: ${$t(e)}, ${o.state_name}, ${n}`), y--, -1);
|
|
1222
1222
|
if (i) {
|
|
1223
1223
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", $t(e), o.state_name, l && !l.running ? "!!" : "", $t(l)));
|
|
1224
1224
|
else {
|
|
1225
1225
|
let r = "";
|
|
1226
|
-
s.action && (r =
|
|
1226
|
+
s.action && (r = Co(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Rt(e), jt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", Rt(l), jt(l)));
|
|
1227
1227
|
}
|
|
1228
1228
|
r && le(e) && Mr(r) && wr(r);
|
|
1229
1229
|
}
|
|
@@ -1232,7 +1232,7 @@ function yn(e, n, r, l) {
|
|
|
1232
1232
|
try {
|
|
1233
1233
|
s.action && (a = s.action(e, n, r, l));
|
|
1234
1234
|
} catch (t) {
|
|
1235
|
-
if (
|
|
1235
|
+
if (y--, !t || !t.__gobj_logged__) {
|
|
1236
1236
|
ir(`${$t(e)}: action of ${n} in ${o.state_name} THREW: ${t && t.stack ? t.stack : t}`);
|
|
1237
1237
|
try {
|
|
1238
1238
|
t.__gobj_logged__ = !0;
|
|
@@ -1240,7 +1240,7 @@ function yn(e, n, r, l) {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
throw t;
|
|
1242
1242
|
}
|
|
1243
|
-
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Rt(e), jt(e), e.current_state.state_name, n || "", qr(a) ? a : 0)),
|
|
1243
|
+
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Rt(e), jt(e), e.current_state.state_name, n || "", qr(a) ? a : 0)), y--, a;
|
|
1244
1244
|
}
|
|
1245
1245
|
var vn = Object.freeze({
|
|
1246
1246
|
__rename_event_name__: 1,
|
|
@@ -1259,16 +1259,16 @@ function On(e) {
|
|
|
1259
1259
|
return null;
|
|
1260
1260
|
}
|
|
1261
1261
|
var Sn = [
|
|
1262
|
-
N(
|
|
1263
|
-
N(
|
|
1264
|
-
N(
|
|
1265
|
-
N(
|
|
1266
|
-
N(
|
|
1267
|
-
N(
|
|
1268
|
-
N(
|
|
1269
|
-
N(
|
|
1270
|
-
N(
|
|
1271
|
-
N(
|
|
1262
|
+
N(T.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
1263
|
+
N(T.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
1264
|
+
N(T.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
1265
|
+
N(T.DTP_STRING, "renamed_event", 0, "", "rename event name"),
|
|
1266
|
+
N(T.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
|
|
1267
|
+
N(T.DTP_JSON, "__config__", 0, null, "subscription config"),
|
|
1268
|
+
N(T.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
|
|
1269
|
+
N(T.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
1270
|
+
N(T.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
1271
|
+
N(T.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
1272
1272
|
S()
|
|
1273
1273
|
];
|
|
1274
1274
|
function Nn(e, t) {
|
|
@@ -1277,26 +1277,26 @@ function Nn(e, t) {
|
|
|
1277
1277
|
kw: e,
|
|
1278
1278
|
renamed_event: ""
|
|
1279
1279
|
};
|
|
1280
|
-
let r =
|
|
1280
|
+
let r = Dr({}, e), l = Dr({}, n);
|
|
1281
1281
|
r.__config__ = l;
|
|
1282
1282
|
let o = "", i = l.__rename_event_name__, s = "string" != typeof i || tl(i) ? null : On(i);
|
|
1283
|
-
return s && (o = s.event_name, delete l.__rename_event_name__, t && xr(r.__global__) > 0 && (r.__global__ =
|
|
1283
|
+
return s && (o = s.event_name, delete l.__rename_event_name__, t && xr(r.__global__) > 0 && (r.__global__ = Dr(Dr({}, r.__global__), { __original_event_name__: t }))), delete l.__hard_subscription__, delete l.__own_event__, {
|
|
1284
1284
|
kw: r,
|
|
1285
1285
|
renamed_event: o
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
function wn(e, t, n, r, l, o) {
|
|
1289
|
-
let i =
|
|
1290
|
-
if (t && t !==
|
|
1291
|
-
let t =
|
|
1289
|
+
let i = Tl(t, l, "__config__", null), s = Tl(t, l, "__global__", null), a = Tl(t, l, "__local__", null), u = vl(t, l, "__filter__", null), _ = !0;
|
|
1290
|
+
if (t && t !== yl(null, e, "publisher", null) && (_ = !1), o && o !== yl(null, e, "subscriber", null) && (_ = !1), n && n !== El(null, e, "event", "") && (_ = !1), r && r !== El(null, e, "renamed_event", "") && (_ = !1), xr(i) > 0) {
|
|
1291
|
+
let t = Tl(null, e, "__config__", null);
|
|
1292
1292
|
xr(t) > 0 && $r(t, i) || (_ = !1);
|
|
1293
1293
|
}
|
|
1294
1294
|
if (xr(s) > 0) {
|
|
1295
|
-
let t =
|
|
1295
|
+
let t = Tl(null, e, "__global__", null);
|
|
1296
1296
|
xr(t) > 0 && $r(t, s) || (_ = !1);
|
|
1297
1297
|
}
|
|
1298
1298
|
if (xr(a) > 0) {
|
|
1299
|
-
let t =
|
|
1299
|
+
let t = Tl(null, e, "__local__", null);
|
|
1300
1300
|
xr(t) > 0 && $r(t, a) || (_ = !1);
|
|
1301
1301
|
}
|
|
1302
1302
|
if (xr(u) > 0) {
|
|
@@ -1317,7 +1317,7 @@ function Rn(e, t) {
|
|
|
1317
1317
|
return e.indexOf(t);
|
|
1318
1318
|
}
|
|
1319
1319
|
function $n(e, n, r, l) {
|
|
1320
|
-
let o =
|
|
1320
|
+
let o = yl(e, n, "publisher", null, Vn.KW_REQUIRED), i = yl(e, n, "subscriber", null, Vn.KW_REQUIRED), s = El(e, n, "event", "", Vn.KW_REQUIRED);
|
|
1321
1321
|
if (!!(ml(e, n, "subs_flag", null, Vn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1322
1322
|
let a = ne(i) || ne(o);
|
|
1323
1323
|
if (Rn(o.dl_subscriptions, n) < 0) return a && Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", s || "", $t(o), $t(i))), 1;
|
|
@@ -1351,7 +1351,7 @@ function Dn(e, n, r, l) {
|
|
|
1351
1351
|
Pr(l, "event", t), Pr(l, "subscriber", r), Pr(l, "publisher", e);
|
|
1352
1352
|
let o = 0;
|
|
1353
1353
|
if (n) {
|
|
1354
|
-
let r =
|
|
1354
|
+
let r = Tl(e, n, "__config__", null), i = Tl(e, n, "__global__", null), s = Tl(e, n, "__local__", null), a = vl(e, n, "__filter__", null), u = El(e, n, "__service__", "");
|
|
1355
1355
|
if (xr(i) > 0 && Pr(l, "__global__", jr(i)), xr(r) > 0) {
|
|
1356
1356
|
let n = jr(r);
|
|
1357
1357
|
Pr(l, "__config__", n);
|
|
@@ -1360,7 +1360,7 @@ function Dn(e, n, r, l) {
|
|
|
1360
1360
|
let r = On(i);
|
|
1361
1361
|
if (r) {
|
|
1362
1362
|
Pr(l, "renamed_event", r.event_name), delete n.__rename_event_name__, o |= vn.__rename_event_name__;
|
|
1363
|
-
let i =
|
|
1363
|
+
let i = Tl(e, l, "__global__", null);
|
|
1364
1364
|
Yr(i) || (i = {}, Pr(l, "__global__", i)), i.__original_event_name__ = t;
|
|
1365
1365
|
} else ir(`${$t(e)}: EVENT NOT FOUND (__rename_event_name__: ${i})`);
|
|
1366
1366
|
}
|
|
@@ -1416,12 +1416,12 @@ function kn(e, t, n, r) {
|
|
|
1416
1416
|
function Cn(e) {
|
|
1417
1417
|
let t = kn(e, null, null, null);
|
|
1418
1418
|
for (let n = 0; n < t.length; n++) {
|
|
1419
|
-
let r = t[n], l =
|
|
1419
|
+
let r = t[n], l = yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1420
1420
|
Pr(r, "s_event", El(e, r, "event", "", Vn.KW_REQUIRED)), Pr(r, "s_publisher", $t(l)), Pr(r, "s_subscriber", $t(o));
|
|
1421
1421
|
}
|
|
1422
1422
|
let n = Ln(e, 0, null, 0);
|
|
1423
1423
|
for (let t = 0; t < n.length; t++) {
|
|
1424
|
-
let r = n[t], l =
|
|
1424
|
+
let r = n[t], l = yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1425
1425
|
Pr(r, "s_event", El(e, r, "event", "", Vn.KW_REQUIRED)), Pr(r, "s_publisher", $t(l)), Pr(r, "s_subscriber", $t(o));
|
|
1426
1426
|
}
|
|
1427
1427
|
return {
|
|
@@ -1452,12 +1452,12 @@ function Pn(e, n, r) {
|
|
|
1452
1452
|
if (t < 0) break;
|
|
1453
1453
|
if (!t) continue;
|
|
1454
1454
|
}
|
|
1455
|
-
let _ =
|
|
1455
|
+
let _ = yl(e, u, "subscriber", null, Vn.KW_REQUIRED);
|
|
1456
1456
|
if (!_ || Ct(_)) continue;
|
|
1457
1457
|
let c = ml(e, u, "subs_flag", 0, Vn.KW_REQUIRED), f = El(e, u, "event", "", Vn.KW_REQUIRED);
|
|
1458
1458
|
if (tl(f) || 0 === ol(f, n)) {
|
|
1459
|
-
|
|
1460
|
-
let l =
|
|
1459
|
+
Tl(e, u, "__config__", null, 0);
|
|
1460
|
+
let l = Tl(e, u, "__global__", null, 0), i = Tl(e, u, "__local__", null, 0), f = vl(e, u, "__filter__", null, 0), g = u.renamed_event;
|
|
1461
1461
|
tl(g) && (g = n);
|
|
1462
1462
|
let d = 1;
|
|
1463
1463
|
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) : xr(f) > 0 && (d = jl(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", $t(_), $t(e))), cr(f))), d < 0) break;
|
|
@@ -1465,8 +1465,8 @@ function Pn(e, n, r) {
|
|
|
1465
1465
|
let b = gn(_, n, !0);
|
|
1466
1466
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1467
1467
|
let p = r;
|
|
1468
|
-
(xr(i) > 0 || xr(l) > 0) && (p =
|
|
1469
|
-
let m =
|
|
1468
|
+
(xr(i) > 0 || xr(l) > 0) && (p = Dr({}, r)), xr(i) > 0 && _l(p, i), xr(l) > 0 && Dr(p, jr(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", g || "", _.running ? "" : "!!", $t(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", _.running ? "" : "!!", $t(_), cn(_), n || "", g || "", e && !e.running ? "!!" : "", $t(e))), le(e) && Mr(p) && wr(p));
|
|
1469
|
+
let m = Tn(_, g, p, e);
|
|
1470
1470
|
if (m < 0 && c & vn.__own_event__) {
|
|
1471
1471
|
s = -1;
|
|
1472
1472
|
break;
|
|
@@ -1479,9 +1479,9 @@ function Pn(e, n, r) {
|
|
|
1479
1479
|
function Un(e, n, r, l) {
|
|
1480
1480
|
if (Ct(e)) return ir("gobj NULL or DESTROYED"), -1;
|
|
1481
1481
|
if (function(e) {
|
|
1482
|
-
return
|
|
1482
|
+
return z > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1483
1483
|
}(e) || oe(e, null) && !ie(l, null)) {
|
|
1484
|
-
let o =
|
|
1484
|
+
let o = yr(n);
|
|
1485
1485
|
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", $t(e), null !== o ? o : n, $t(l))), le(e) && wr(r);
|
|
1486
1486
|
}
|
|
1487
1487
|
return e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", $t(e)), 0, 0) : o(0, -1, t("%s: command table not available", $t(e)), 0, 0);
|
|
@@ -1525,18 +1525,18 @@ function qn(e) {
|
|
|
1525
1525
|
} else Yn = e;
|
|
1526
1526
|
}
|
|
1527
1527
|
var Hn = !0;
|
|
1528
|
-
function
|
|
1528
|
+
function zn(e) {
|
|
1529
1529
|
Hn = !!e;
|
|
1530
1530
|
}
|
|
1531
|
-
var
|
|
1531
|
+
var Qn = null;
|
|
1532
1532
|
function Xn(e) {
|
|
1533
|
-
|
|
1533
|
+
Qn = "function" == typeof e ? e : null;
|
|
1534
1534
|
}
|
|
1535
1535
|
function Zn(e, t) {
|
|
1536
1536
|
if (!Hn) return !1;
|
|
1537
|
-
if (!
|
|
1537
|
+
if (!Qn) return !0;
|
|
1538
1538
|
try {
|
|
1539
|
-
return !!
|
|
1539
|
+
return !!Qn(e, t);
|
|
1540
1540
|
} catch (e) {
|
|
1541
1541
|
return !0;
|
|
1542
1542
|
}
|
|
@@ -1601,27 +1601,27 @@ function or(e) {
|
|
|
1601
1601
|
return n;
|
|
1602
1602
|
}
|
|
1603
1603
|
function ir(e, ...t) {
|
|
1604
|
-
let n = or(e, ...t), r =
|
|
1604
|
+
let n = or(e, ...t), r = $o();
|
|
1605
1605
|
Mn && (Mn === Gn.error ? Zn("error", n) && Mn("%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), Mn(`${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1606
1606
|
}
|
|
1607
1607
|
function sr(e, ...t) {
|
|
1608
|
-
let n = or(e, ...t), r =
|
|
1608
|
+
let n = or(e, ...t), r = $o();
|
|
1609
1609
|
Wn && (Wn === Gn.warn ? Zn("warning", n) && Wn("%c" + r + " WARNING: " + String(n), "color:yellow") : (Zn("warning", n) && Gn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), Wn(`${r} WARNING: ${String(n)}`))), tr("warning", n, r);
|
|
1610
1610
|
}
|
|
1611
1611
|
function ar(e, ...t) {
|
|
1612
|
-
let n = or(e, ...t), r =
|
|
1612
|
+
let n = or(e, ...t), r = $o();
|
|
1613
1613
|
xn && Zn("info", n) && xn("%c" + r + " INFO: " + String(n), "color:cyan"), tr("info", n, r);
|
|
1614
1614
|
}
|
|
1615
1615
|
function ur(e, ...t) {
|
|
1616
|
-
let n = or(e, ...t), r =
|
|
1616
|
+
let n = or(e, ...t), r = $o();
|
|
1617
1617
|
Kn && Zn("debug", n) && Kn("%c" + r + " DEBUG: " + String(n), "color:silver"), tr("debug", n, r);
|
|
1618
1618
|
}
|
|
1619
1619
|
function _r(e, ...t) {
|
|
1620
|
-
let n = or(e, ...t), r =
|
|
1620
|
+
let n = or(e, ...t), r = $o();
|
|
1621
1621
|
Kn && Zn("msg", n) && Kn("%c" + r + " MSG: " + String(n), "color:cyan"), tr("msg", n, r);
|
|
1622
1622
|
}
|
|
1623
1623
|
function cr(e, t) {
|
|
1624
|
-
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e,
|
|
1624
|
+
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e, $o());
|
|
1625
1625
|
}
|
|
1626
1626
|
var fr = [
|
|
1627
1627
|
"passw",
|
|
@@ -1699,7 +1699,7 @@ function pr(e, t, n) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
1701
|
var mr = 128, hr = 4194304, Er = "<not shown: too large to mask>";
|
|
1702
|
-
function
|
|
1702
|
+
function yr(e) {
|
|
1703
1703
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1704
1704
|
if (e.length > hr) return Er;
|
|
1705
1705
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
@@ -1731,13 +1731,13 @@ function Tr(e) {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1733
1733
|
}
|
|
1734
|
-
var
|
|
1734
|
+
var Tr = 64, vr = "<not shown: the masking failed>";
|
|
1735
1735
|
var Or = Symbol("mask-in-progress");
|
|
1736
1736
|
function Sr(e, t, n, r) {
|
|
1737
1737
|
if ("string" == typeof e) {
|
|
1738
1738
|
if (e.length > r.left) return r.left = 0, Er;
|
|
1739
1739
|
r.left -= e.length;
|
|
1740
|
-
let t =
|
|
1740
|
+
let t = yr(e);
|
|
1741
1741
|
return null !== t ? t : e;
|
|
1742
1742
|
}
|
|
1743
1743
|
let l = Array.isArray(e);
|
|
@@ -1751,7 +1751,7 @@ function Sr(e, t, n, r) {
|
|
|
1751
1751
|
let n = t.get(e);
|
|
1752
1752
|
return n === Or ? "<cycle>" : n;
|
|
1753
1753
|
}
|
|
1754
|
-
if (n >=
|
|
1754
|
+
if (n >= Tr) return "<deeper not shown>";
|
|
1755
1755
|
r.left -= 1, t.set(e, Or);
|
|
1756
1756
|
let o, i = !1, s = !1;
|
|
1757
1757
|
if (l) {
|
|
@@ -1798,10 +1798,7 @@ function jr(e) {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
function Rr(...e) {
|
|
1800
1800
|
const t = {};
|
|
1801
|
-
for (const n of e)
|
|
1802
|
-
const e = structuredClone(n);
|
|
1803
|
-
Object.assign(t, e);
|
|
1804
|
-
}
|
|
1801
|
+
for (const n of e) Dr(t, structuredClone(n));
|
|
1805
1802
|
return t;
|
|
1806
1803
|
}
|
|
1807
1804
|
function $r(e, t) {
|
|
@@ -1891,10 +1888,10 @@ function qr(e) {
|
|
|
1891
1888
|
function Hr(e) {
|
|
1892
1889
|
return "boolean" == typeof e;
|
|
1893
1890
|
}
|
|
1894
|
-
function
|
|
1891
|
+
function zr(e) {
|
|
1895
1892
|
return null == e;
|
|
1896
1893
|
}
|
|
1897
|
-
function
|
|
1894
|
+
function Qr(e) {
|
|
1898
1895
|
if (qr(e)) return !0;
|
|
1899
1896
|
if (!Jr(e)) return !1;
|
|
1900
1897
|
const t = Number(e);
|
|
@@ -1980,6 +1977,10 @@ function dl(e, t, n, r) {
|
|
|
1980
1977
|
if (!Jr(n)) return void ir(`${l}path must be a string: ${String(n)}`);
|
|
1981
1978
|
let o = n.split("`"), i = o.length;
|
|
1982
1979
|
for (let e = 0; e < i; e++) {
|
|
1980
|
+
if (Br(t)) {
|
|
1981
|
+
if (!/^[0-9]+$/.test(o[e])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
1982
|
+
o[e] = String(Number(o[e]));
|
|
1983
|
+
}
|
|
1983
1984
|
if (fl(t, o[e])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
1984
1985
|
if (e === i - 1) break;
|
|
1985
1986
|
if (null == (t = t[o[e]])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
@@ -2083,7 +2084,7 @@ function El(e, t, n, r, l) {
|
|
|
2083
2084
|
return !(!Yr(r) && !Br(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
2084
2085
|
}(t, n) && (ir(`path not found: '${n}'`), wr(t)), r) : Jr(o) ? (a && bl(e, t, n), o) : (null !== o && (ir(`${e ? $t(e) + ": " : ""}path MUST BE a json str: '${n}'`), wr(t)), r);
|
|
2085
2086
|
}
|
|
2086
|
-
function
|
|
2087
|
+
function yl(e, t, n, r, l) {
|
|
2087
2088
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2088
2089
|
let o = dl(e, t, n, !1);
|
|
2089
2090
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
@@ -2096,7 +2097,7 @@ function Tl(e, t, n, r, l) {
|
|
|
2096
2097
|
}
|
|
2097
2098
|
return a && bl(e, t, n), o;
|
|
2098
2099
|
}
|
|
2099
|
-
function
|
|
2100
|
+
function Tl(e, t, n, r, l) {
|
|
2100
2101
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2101
2102
|
let o = dl(e, t, n, !1);
|
|
2102
2103
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
@@ -2138,8 +2139,8 @@ function Sl(e, t, n, r) {
|
|
|
2138
2139
|
}
|
|
2139
2140
|
function Nl(e, t, n, r, l) {
|
|
2140
2141
|
if (e && !el(e) && ir("GObj bad instanceof"), !Yr(t)) return ir("kw is not an object"), -1;
|
|
2141
|
-
let o =
|
|
2142
|
-
return Yr(o) ? (o
|
|
2142
|
+
let o = Tl(e, t, n, {}, Vn.KW_CREATE);
|
|
2143
|
+
return Yr(o) ? (gl(o, r, l), 0) : (ir("subdict is not an object"), -1);
|
|
2143
2144
|
}
|
|
2144
2145
|
function wl(e, n, r) {
|
|
2145
2146
|
let l = "", o = !1;
|
|
@@ -2265,7 +2266,7 @@ function Ll(e) {
|
|
|
2265
2266
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2266
2267
|
}
|
|
2267
2268
|
function Pl(e, t) {
|
|
2268
|
-
if (
|
|
2269
|
+
if (zr(e) || zr(t)) return !0;
|
|
2269
2270
|
if (Br(e)) {
|
|
2270
2271
|
if (0 === e.length) return !0;
|
|
2271
2272
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
@@ -2303,7 +2304,7 @@ function Fl(e, t, n) {
|
|
|
2303
2304
|
if (tl(n) || (t = dl(e, t, n)), Yr(t)) r = t;
|
|
2304
2305
|
else if (Br(t)) for (let n = 0; n < t.length; n++) {
|
|
2305
2306
|
let l = t[n], o = El(e, l, "id", "", Vn.KW_REQUIRED);
|
|
2306
|
-
tl(o) || (r
|
|
2307
|
+
tl(o) || gl(r, o, l);
|
|
2307
2308
|
}
|
|
2308
2309
|
else ir(`${$t(e)} kwid_new_dict: data type unknown`);
|
|
2309
2310
|
return r;
|
|
@@ -2426,13 +2427,13 @@ function Hl(e, t, n, r) {
|
|
|
2426
2427
|
ir(e);
|
|
2427
2428
|
}
|
|
2428
2429
|
}
|
|
2429
|
-
function
|
|
2430
|
+
function zl(e, t, n, r) {
|
|
2430
2431
|
if (!el(e)) return ir("gobj is not a GObj"), null;
|
|
2431
2432
|
if (!Yr(t)) return ir("kw is not a dict"), null;
|
|
2432
2433
|
let l = Jl(t, n);
|
|
2433
2434
|
return l ? 0 === l.length ? (r && ir(`stack empty: ${n}`), null) : l[0] : (r && ir(`stack NOT FOUND: ${n}`), null);
|
|
2434
2435
|
}
|
|
2435
|
-
function
|
|
2436
|
+
function Ql(e, t, n) {
|
|
2436
2437
|
return tl(n) ? bl(e, t, "__md_iev__`__msg_type__") : Nl(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2437
2438
|
}
|
|
2438
2439
|
function Xl(e, t) {
|
|
@@ -2485,10 +2486,10 @@ function ro(e, t, n, r) {
|
|
|
2485
2486
|
let o, i = n.split("`"), s = l;
|
|
2486
2487
|
for (; (o = i.shift()) && !tl(o) && s;) Yr(s) && (s = vl(null, s, e.hook, [], 1)), s = ao(s, null, o, !1);
|
|
2487
2488
|
if (0 === i.length && s) if (Br(s)) s.push(r);
|
|
2488
|
-
else if (s.id === r.id)
|
|
2489
|
+
else if (s.id === r.id) Dr(s, r);
|
|
2489
2490
|
else {
|
|
2490
2491
|
let t = vl(null, s, e.hook, [], 1), n = ao(t, e.hook, r.id, !1);
|
|
2491
|
-
n ?
|
|
2492
|
+
n ? Dr(n, r) : t.push(r);
|
|
2492
2493
|
}
|
|
2493
2494
|
return l;
|
|
2494
2495
|
}
|
|
@@ -2591,11 +2592,36 @@ function go(e) {
|
|
|
2591
2592
|
const t = String(e).trim();
|
|
2592
2593
|
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : fo(t);
|
|
2593
2594
|
}
|
|
2594
|
-
|
|
2595
|
+
var bo = class {
|
|
2596
|
+
constructor(e) {
|
|
2597
|
+
this.html = e, Object.freeze(this);
|
|
2598
|
+
}
|
|
2599
|
+
toString() {
|
|
2600
|
+
return this.html;
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
function po(e) {
|
|
2604
|
+
return "string" != typeof e ? (ir("html_markup: not a string, type " + typeof e), new bo("")) : new bo(e);
|
|
2605
|
+
}
|
|
2606
|
+
function mo(e) {
|
|
2607
|
+
return e instanceof bo;
|
|
2608
|
+
}
|
|
2609
|
+
function ho(e) {
|
|
2610
|
+
const t = document.createElement("template");
|
|
2611
|
+
return t.innerHTML = e.html.trim(), t.content;
|
|
2612
|
+
}
|
|
2613
|
+
var Eo = !1, yo = /* @__PURE__ */ new Set();
|
|
2614
|
+
function To(e) {
|
|
2615
|
+
Eo = !!e;
|
|
2616
|
+
}
|
|
2617
|
+
function vo() {
|
|
2618
|
+
return Eo;
|
|
2619
|
+
}
|
|
2620
|
+
function Oo(e) {
|
|
2595
2621
|
const t = document.createElement("template");
|
|
2596
2622
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2597
2623
|
}
|
|
2598
|
-
function
|
|
2624
|
+
function So(e, t) {
|
|
2599
2625
|
let [n, r, l, o] = e;
|
|
2600
2626
|
if (!n) return void ir("Tag must be a valid HTML element.");
|
|
2601
2627
|
let i = document.createElement(n), s = "";
|
|
@@ -2604,17 +2630,22 @@ function po(e, t) {
|
|
|
2604
2630
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2605
2631
|
i.style.cssText = t;
|
|
2606
2632
|
} else "style" === e ? i.style.cssText = r[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== r[e] && void 0 !== r[e] && (s = r[e], i.setAttribute("data-i18n", s)) : i.setAttribute(e, r[e]);
|
|
2607
|
-
if (
|
|
2608
|
-
else if (
|
|
2633
|
+
if (mo(l)) i.appendChild(ho(l));
|
|
2634
|
+
else if (Jr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !Eo) i.appendChild(Oo(l));
|
|
2635
|
+
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
2636
|
+
if (yo.size >= 100) return;
|
|
2637
|
+
const t = e.slice(0, 80);
|
|
2638
|
+
yo.has(t) || (yo.add(t), sr(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2639
|
+
}(l), t && s) i.textContent = t(s) || l;
|
|
2609
2640
|
else i.textContent = l;
|
|
2610
2641
|
else if (Br(l)) {
|
|
2611
|
-
if (l.length > 0) if (Jr(l[0])) i.appendChild(
|
|
2612
|
-
else for (let e of l) Array.isArray(e)
|
|
2642
|
+
if (l.length > 0) if (Jr(l[0])) i.appendChild(So(l, t));
|
|
2643
|
+
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(So(e, t)) : e instanceof Node ? i.appendChild(e) : mo(e) ? i.appendChild(ho(e)) : Jr(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && ir("createElement2: child ignored, type " + typeof e);
|
|
2613
2644
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (ir("content ignored"), cr(l));
|
|
2614
2645
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2615
2646
|
return i;
|
|
2616
2647
|
}
|
|
2617
|
-
function
|
|
2648
|
+
function No(e) {
|
|
2618
2649
|
if (!e) return {
|
|
2619
2650
|
top: 0,
|
|
2620
2651
|
left: 0,
|
|
@@ -2634,10 +2665,10 @@ function mo(e) {
|
|
|
2634
2665
|
bottom: t + i + l
|
|
2635
2666
|
};
|
|
2636
2667
|
}
|
|
2637
|
-
function
|
|
2668
|
+
function wo(e) {
|
|
2638
2669
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2639
2670
|
}
|
|
2640
|
-
function
|
|
2671
|
+
function jo(e, t) {
|
|
2641
2672
|
if (!Zr(t)) return void ir("You must supply a translation function");
|
|
2642
2673
|
e || (e = document);
|
|
2643
2674
|
const n = (t) => {
|
|
@@ -2661,7 +2692,7 @@ function Eo(e, t) {
|
|
|
2661
2692
|
n && e.setAttribute("placeholder", t(n));
|
|
2662
2693
|
});
|
|
2663
2694
|
}
|
|
2664
|
-
function
|
|
2695
|
+
function Ro(e = "Time Tracker", t = !1) {
|
|
2665
2696
|
const n = e, r = performance.now();
|
|
2666
2697
|
let l = r;
|
|
2667
2698
|
return t && sr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2672,30 +2703,30 @@ function To(e = "Time Tracker", t = !1) {
|
|
|
2672
2703
|
};
|
|
2673
2704
|
} };
|
|
2674
2705
|
}
|
|
2675
|
-
function
|
|
2706
|
+
function $o(e) {
|
|
2676
2707
|
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();
|
|
2677
2708
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2678
2709
|
}
|
|
2679
|
-
function
|
|
2710
|
+
function Do() {
|
|
2680
2711
|
return Math.floor(Date.now() / 1e3);
|
|
2681
2712
|
}
|
|
2682
|
-
function
|
|
2713
|
+
function Ao(e, t) {
|
|
2683
2714
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2684
2715
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2685
2716
|
return -1;
|
|
2686
2717
|
}
|
|
2687
|
-
function
|
|
2718
|
+
function Io() {
|
|
2688
2719
|
let e = "";
|
|
2689
2720
|
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;
|
|
2690
2721
|
}
|
|
2691
|
-
function
|
|
2722
|
+
function ko(e) {
|
|
2692
2723
|
return e.replace(/[?# ^:]/g, "_");
|
|
2693
2724
|
}
|
|
2694
|
-
function
|
|
2725
|
+
function Co(e) {
|
|
2695
2726
|
let t = null;
|
|
2696
2727
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2697
2728
|
}
|
|
2698
|
-
function
|
|
2729
|
+
function Lo(e, t = 0, n = !1) {
|
|
2699
2730
|
let r = null, l = null, o = null;
|
|
2700
2731
|
const i = (...i) => {
|
|
2701
2732
|
o = this, l = i;
|
|
@@ -2710,20 +2741,20 @@ function jo(e, t = 0, n = !1) {
|
|
|
2710
2741
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2711
2742
|
}, i;
|
|
2712
2743
|
}
|
|
2713
|
-
function
|
|
2744
|
+
function Po(...e) {
|
|
2714
2745
|
let t = "", n = 0;
|
|
2715
2746
|
for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
|
|
2716
2747
|
return t;
|
|
2717
2748
|
}
|
|
2718
|
-
var
|
|
2719
|
-
function
|
|
2749
|
+
var Uo = 256, Fo = 1e5;
|
|
2750
|
+
function Vo(e) {
|
|
2720
2751
|
const t = String(e).replace(/`/g, "``");
|
|
2721
2752
|
return "[" === t[0] ? "[" + t : t;
|
|
2722
2753
|
}
|
|
2723
|
-
function
|
|
2724
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
2754
|
+
function Go(e) {
|
|
2755
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Vo(e)).join("`") : "";
|
|
2725
2756
|
}
|
|
2726
|
-
function
|
|
2757
|
+
function Mo(e) {
|
|
2727
2758
|
if ("string" != typeof e) return null;
|
|
2728
2759
|
let t = [], n = "";
|
|
2729
2760
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2744,9 +2775,9 @@ function ko(e) {
|
|
|
2744
2775
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2745
2776
|
});
|
|
2746
2777
|
}
|
|
2747
|
-
function
|
|
2778
|
+
function Wo(e) {
|
|
2748
2779
|
const t = {}, n = (e, r, l) => {
|
|
2749
|
-
if (l >
|
|
2780
|
+
if (l > Uo) throw new Error("json2flat: deeper than 256");
|
|
2750
2781
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2751
2782
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2752
2783
|
const o = `[${t}]`;
|
|
@@ -2756,7 +2787,7 @@ function Co(e) {
|
|
|
2756
2787
|
const t = Object.keys(e);
|
|
2757
2788
|
if (t.length > 0) {
|
|
2758
2789
|
for (const o of t) {
|
|
2759
|
-
const t =
|
|
2790
|
+
const t = Vo(o);
|
|
2760
2791
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2761
2792
|
}
|
|
2762
2793
|
return;
|
|
@@ -2766,20 +2797,20 @@ function Co(e) {
|
|
|
2766
2797
|
};
|
|
2767
2798
|
return null == e || n(e, "", 0), t;
|
|
2768
2799
|
}
|
|
2769
|
-
function
|
|
2800
|
+
function xo(e) {
|
|
2770
2801
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2771
2802
|
let t = null;
|
|
2772
2803
|
for (const n of Object.keys(e)) {
|
|
2773
|
-
const r =
|
|
2804
|
+
const r = Mo(n);
|
|
2774
2805
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2775
|
-
if (r.length >
|
|
2806
|
+
if (r.length > Uo) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2776
2807
|
const l = "number" == typeof r[0];
|
|
2777
2808
|
if (null === t) t = l ? [] : {};
|
|
2778
2809
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2779
2810
|
let o = t;
|
|
2780
2811
|
for (let t = 0; t < r.length; t++) {
|
|
2781
2812
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2782
|
-
if (i && l >
|
|
2813
|
+
if (i && l > Fo) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2783
2814
|
if (i !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2784
2815
|
if (s) {
|
|
2785
2816
|
if (Array.isArray(o)) {
|
|
@@ -2803,23 +2834,23 @@ function Lo(e) {
|
|
|
2803
2834
|
}
|
|
2804
2835
|
return null === t ? {} : t;
|
|
2805
2836
|
}
|
|
2806
|
-
function
|
|
2837
|
+
function Ko(e, t) {
|
|
2807
2838
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2808
2839
|
}
|
|
2809
|
-
function
|
|
2840
|
+
function Yo(e, t) {
|
|
2810
2841
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2811
2842
|
added: {},
|
|
2812
2843
|
removed: {},
|
|
2813
2844
|
changed: {}
|
|
2814
2845
|
};
|
|
2815
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2846
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Ko(n[e], r[e]) || gl(l.changed, e, {
|
|
2816
2847
|
from: n[e],
|
|
2817
2848
|
to: r[e]
|
|
2818
|
-
}) : l.removed
|
|
2819
|
-
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added
|
|
2849
|
+
}) : gl(l.removed, e, n[e]);
|
|
2850
|
+
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || gl(l.added, e, r[e]);
|
|
2820
2851
|
return l;
|
|
2821
2852
|
}
|
|
2822
|
-
function
|
|
2853
|
+
function Bo(e, t) {
|
|
2823
2854
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2824
2855
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2825
2856
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2831,36 +2862,36 @@ function Fo(e, t) {
|
|
|
2831
2862
|
}
|
|
2832
2863
|
return e;
|
|
2833
2864
|
}
|
|
2834
|
-
function
|
|
2865
|
+
function Jo(e) {
|
|
2835
2866
|
return "persistent-attrs-" + $t(e);
|
|
2836
2867
|
}
|
|
2837
|
-
function
|
|
2838
|
-
let n = Xt(e, v.SDF_PERSIST), r = kl(
|
|
2868
|
+
function qo(e, t) {
|
|
2869
|
+
let n = Xt(e, v.SDF_PERSIST), r = kl(Jo(e), null, !1);
|
|
2839
2870
|
if (r && Yr(r)) {
|
|
2840
2871
|
let l = Al(e, r, t, !1);
|
|
2841
2872
|
l = Al(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2842
2873
|
}
|
|
2843
2874
|
}
|
|
2844
|
-
function
|
|
2845
|
-
let n = Al(e, Xt(e, v.SDF_PERSIST), t, !1), r = kl(
|
|
2846
|
-
return r && Yr(r) && Ir(n, r), Cl(
|
|
2875
|
+
function Ho(e, t) {
|
|
2876
|
+
let n = Al(e, Xt(e, v.SDF_PERSIST), t, !1), r = kl(Jo(e), null, !1);
|
|
2877
|
+
return r && Yr(r) && Ir(n, r), Cl(Jo(e), n);
|
|
2847
2878
|
}
|
|
2848
|
-
function
|
|
2849
|
-
let n = Il(e, kl(
|
|
2850
|
-
0 === Mr(n) ? Ll(
|
|
2879
|
+
function zo(e, t) {
|
|
2880
|
+
let n = Il(e, kl(Jo(e), null, !1), t, !1);
|
|
2881
|
+
0 === Mr(n) ? Ll(Jo(e)) : Cl(Jo(e), n);
|
|
2851
2882
|
}
|
|
2852
|
-
function
|
|
2853
|
-
let n = kl(
|
|
2883
|
+
function Qo(e, t) {
|
|
2884
|
+
let n = kl(Jo(e), null, !1), r = {};
|
|
2854
2885
|
return n && Yr(n) && (r = Al(e, n, t, !1)), r;
|
|
2855
2886
|
}
|
|
2856
|
-
function
|
|
2887
|
+
function Xo(e) {
|
|
2857
2888
|
if (Br(e) && 1 === xr(e)) {
|
|
2858
2889
|
let t = e[0];
|
|
2859
2890
|
return cl(t, "size") ? t.size : 1;
|
|
2860
2891
|
}
|
|
2861
2892
|
return xr(e);
|
|
2862
2893
|
}
|
|
2863
|
-
function
|
|
2894
|
+
function Zo(e, t) {
|
|
2864
2895
|
if (Jr(t)) {
|
|
2865
2896
|
if (-1 === t.indexOf("^")) {
|
|
2866
2897
|
let n, r, l = e.fkey;
|
|
@@ -2890,11 +2921,11 @@ function Yo(e, t) {
|
|
|
2890
2921
|
hook_name: t.hook_name
|
|
2891
2922
|
} : (ir("bad fkey 3"), ir(e), ir(t), null);
|
|
2892
2923
|
}
|
|
2893
|
-
function
|
|
2894
|
-
let n =
|
|
2924
|
+
function ei(e, t) {
|
|
2925
|
+
let n = Zo(e, t);
|
|
2895
2926
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2896
2927
|
}
|
|
2897
|
-
function
|
|
2928
|
+
function ti(e, t) {
|
|
2898
2929
|
if (Jr(t)) {
|
|
2899
2930
|
if (-1 === t.indexOf("^")) {
|
|
2900
2931
|
let n, r = e.hook;
|
|
@@ -2921,7 +2952,7 @@ function Jo(e, t) {
|
|
|
2921
2952
|
id: t.id
|
|
2922
2953
|
} : (ir("bad hook 3"), ir(e), ir(t), null);
|
|
2923
2954
|
}
|
|
2924
|
-
var
|
|
2955
|
+
var ni = [
|
|
2925
2956
|
"string",
|
|
2926
2957
|
"integer",
|
|
2927
2958
|
"object",
|
|
@@ -2931,7 +2962,7 @@ var qo = [
|
|
|
2931
2962
|
"real",
|
|
2932
2963
|
"boolean",
|
|
2933
2964
|
"blob"
|
|
2934
|
-
],
|
|
2965
|
+
], ri = [
|
|
2935
2966
|
"persistent",
|
|
2936
2967
|
"required",
|
|
2937
2968
|
"notnull",
|
|
@@ -2943,7 +2974,7 @@ var qo = [
|
|
|
2943
2974
|
"stats",
|
|
2944
2975
|
"rstats",
|
|
2945
2976
|
"pstats"
|
|
2946
|
-
],
|
|
2977
|
+
], li = [
|
|
2947
2978
|
"hook",
|
|
2948
2979
|
"fkey",
|
|
2949
2980
|
"enum",
|
|
@@ -2972,7 +3003,7 @@ var qo = [
|
|
|
2972
3003
|
"coordinates",
|
|
2973
3004
|
"gbuffer"
|
|
2974
3005
|
];
|
|
2975
|
-
function
|
|
3006
|
+
function oi(e) {
|
|
2976
3007
|
let t = {
|
|
2977
3008
|
name: e.id,
|
|
2978
3009
|
header: e.header,
|
|
@@ -2991,7 +3022,7 @@ function zo(e) {
|
|
|
2991
3022
|
if (!e.flag) return t;
|
|
2992
3023
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2993
3024
|
let r = e.flag[n];
|
|
2994
|
-
if (Kl(
|
|
3025
|
+
if (Kl(li, r)) {
|
|
2995
3026
|
switch (r) {
|
|
2996
3027
|
case "enum":
|
|
2997
3028
|
t.enum_list = e.enum;
|
|
@@ -3005,7 +3036,7 @@ function zo(e) {
|
|
|
3005
3036
|
case "file": t.is_file = !0;
|
|
3006
3037
|
}
|
|
3007
3038
|
t.type = r;
|
|
3008
|
-
} else if (Kl(
|
|
3039
|
+
} else if (Kl(ri, r)) switch (r) {
|
|
3009
3040
|
case "writable":
|
|
3010
3041
|
t.is_writable = !0;
|
|
3011
3042
|
break;
|
|
@@ -3018,7 +3049,7 @@ function zo(e) {
|
|
|
3018
3049
|
}
|
|
3019
3050
|
return t.is_file && (t.type = "file"), t;
|
|
3020
3051
|
}
|
|
3021
|
-
function
|
|
3052
|
+
function ii(e, t) {
|
|
3022
3053
|
let n = {
|
|
3023
3054
|
name: e,
|
|
3024
3055
|
header: e,
|
|
@@ -3036,9 +3067,9 @@ function Xo(e, t) {
|
|
|
3036
3067
|
let e = t.split(".");
|
|
3037
3068
|
for (let t = 0; t < e.length; t++) {
|
|
3038
3069
|
let r = e[t];
|
|
3039
|
-
if (Kl(
|
|
3040
|
-
else if (Kl(
|
|
3041
|
-
else if (Kl(
|
|
3070
|
+
if (Kl(ni, r)) n.real_type || (n.real_type = r);
|
|
3071
|
+
else if (Kl(li, r)) n.type || (n.type = r);
|
|
3072
|
+
else if (Kl(ri, r)) switch (r) {
|
|
3042
3073
|
case "writable":
|
|
3043
3074
|
n.is_writable = !0;
|
|
3044
3075
|
break;
|
|
@@ -3050,10 +3081,10 @@ function Xo(e, t) {
|
|
|
3050
3081
|
}
|
|
3051
3082
|
}
|
|
3052
3083
|
n.real_type || (n.real_type = "string");
|
|
3053
|
-
} else Yr(t) ? (n =
|
|
3084
|
+
} else Yr(t) ? (n = oi(t), n.name || (n.name = e), n.header || (n.header = e)) : Br(t) && (n.real_type = "array", n.enum_list = t);
|
|
3054
3085
|
return n.type || (n.type = n.real_type), n;
|
|
3055
3086
|
}
|
|
3056
|
-
function
|
|
3087
|
+
function si(e, t) {
|
|
3057
3088
|
let n = {};
|
|
3058
3089
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
3059
3090
|
let l;
|
|
@@ -3062,23 +3093,23 @@ function Zo(e, t) {
|
|
|
3062
3093
|
n[e] = o;
|
|
3063
3094
|
}), n;
|
|
3064
3095
|
}
|
|
3065
|
-
var
|
|
3066
|
-
N(
|
|
3067
|
-
N(
|
|
3068
|
-
N(
|
|
3096
|
+
var ai = [
|
|
3097
|
+
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3098
|
+
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3099
|
+
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3069
3100
|
S()
|
|
3070
|
-
],
|
|
3101
|
+
], ui = {
|
|
3071
3102
|
periodic: !1,
|
|
3072
3103
|
msec: 0,
|
|
3073
3104
|
timer_id: -1
|
|
3074
|
-
},
|
|
3075
|
-
function
|
|
3105
|
+
}, _i = null;
|
|
3106
|
+
function ci(e, t, n, r) {
|
|
3076
3107
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3077
3108
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3078
|
-
|
|
3079
|
-
}, l.msec) : l.timer_id = -1, kt(e) ?
|
|
3109
|
+
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3110
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? Tn(At(e), o, {}, e) : Pn(e, o, {}), l.periodic || -1 !== l.timer_id || Et(e) && gt(e), 0;
|
|
3080
3111
|
}
|
|
3081
|
-
var
|
|
3112
|
+
var fi = {
|
|
3082
3113
|
mt_create: function(e) {
|
|
3083
3114
|
let t = e.priv;
|
|
3084
3115
|
const n = nn(e, "subscriber");
|
|
@@ -3091,7 +3122,7 @@ var li = {
|
|
|
3091
3122
|
n.periodic = Zt(e, "periodic");
|
|
3092
3123
|
break;
|
|
3093
3124
|
case "msec": n.msec = en(e, "msec"), -1 !== n.timer_id && (clearTimeout(n.timer_id), n.timer_id = -1), n.msec > 0 && (n.timer_id = setTimeout(function() {
|
|
3094
|
-
|
|
3125
|
+
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3095
3126
|
}, n.msec)), n.msec > 0 ? Et(e) || at(e) : Et(e) && gt(e);
|
|
3096
3127
|
}
|
|
3097
3128
|
},
|
|
@@ -3103,71 +3134,71 @@ var li = {
|
|
|
3103
3134
|
},
|
|
3104
3135
|
mt_destroy: function(e) {}
|
|
3105
3136
|
};
|
|
3106
|
-
function
|
|
3137
|
+
function gi() {
|
|
3107
3138
|
return function(e) {
|
|
3108
|
-
if (
|
|
3139
|
+
if (_i) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3109
3140
|
const t = [["ST_IDLE", [[
|
|
3110
3141
|
"EV_TIMEOUT",
|
|
3111
|
-
|
|
3142
|
+
ci,
|
|
3112
3143
|
null
|
|
3113
3144
|
]]]];
|
|
3114
|
-
return (
|
|
3145
|
+
return (_i = Ae(e, [
|
|
3115
3146
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
3116
3147
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
3117
3148
|
[0, 0]
|
|
3118
|
-
], t,
|
|
3149
|
+
], t, fi, 0, ai, ui, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
3119
3150
|
}("C_TIMER");
|
|
3120
3151
|
}
|
|
3121
|
-
function
|
|
3152
|
+
function di(e, t) {
|
|
3122
3153
|
return e instanceof k ? "C_TIMER" !== Rt(e) ? (ir("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (ir("not GObj TYPE"), -1);
|
|
3123
3154
|
}
|
|
3124
|
-
function
|
|
3155
|
+
function bi(e, t) {
|
|
3125
3156
|
return e instanceof k ? "C_TIMER" !== Rt(e) ? (ir("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (ir("not GObj TYPE"), -1);
|
|
3126
3157
|
}
|
|
3127
|
-
function
|
|
3158
|
+
function pi(e) {
|
|
3128
3159
|
return e instanceof k ? "C_TIMER" !== Rt(e) ? (ir("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (ir("not GObj TYPE"), -1);
|
|
3129
3160
|
}
|
|
3130
|
-
var
|
|
3131
|
-
N(
|
|
3132
|
-
N(
|
|
3133
|
-
N(
|
|
3134
|
-
N(
|
|
3135
|
-
N(
|
|
3136
|
-
N(
|
|
3137
|
-
N(
|
|
3138
|
-
N(
|
|
3139
|
-
N(
|
|
3140
|
-
N(
|
|
3141
|
-
N(
|
|
3142
|
-
N(
|
|
3143
|
-
N(
|
|
3144
|
-
N(
|
|
3145
|
-
N(
|
|
3146
|
-
N(
|
|
3147
|
-
N(
|
|
3148
|
-
N(
|
|
3161
|
+
var mi = [
|
|
3162
|
+
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3163
|
+
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3164
|
+
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
3165
|
+
N(T.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
|
|
3166
|
+
N(T.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
|
|
3167
|
+
N(T.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
|
|
3168
|
+
N(T.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
|
|
3169
|
+
N(T.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
|
|
3170
|
+
N(T.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
|
|
3171
|
+
N(T.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
|
|
3172
|
+
N(T.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
|
|
3173
|
+
N(T.DTP_STRING, "yuneta_version", 0, a, "Yuneta version"),
|
|
3174
|
+
N(T.DTP_LIST, "required_services", 0, "[]", "Required services"),
|
|
3175
|
+
N(T.DTP_DICT, "trace_levels", v.SDF_PERSIST, "{}", "Trace levels"),
|
|
3176
|
+
N(T.DTP_DICT, "no_trace_levels", v.SDF_PERSIST, "{}", "No trace levels"),
|
|
3177
|
+
N(T.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
3178
|
+
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3179
|
+
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3149
3180
|
S()
|
|
3150
|
-
],
|
|
3151
|
-
function
|
|
3152
|
-
let l =
|
|
3181
|
+
], hi = { gobj_timer: null }, Ei = null;
|
|
3182
|
+
function yi(e, t, n, r) {
|
|
3183
|
+
let l = Qt(e, t);
|
|
3153
3184
|
return Yr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
3154
3185
|
}
|
|
3155
|
-
function
|
|
3186
|
+
function Ti(e) {
|
|
3156
3187
|
if (!0 === e || !1 === e) return e;
|
|
3157
3188
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
3158
3189
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
3159
3190
|
}
|
|
3160
|
-
function
|
|
3191
|
+
function vi() {
|
|
3161
3192
|
return `${Nt()}^${St()}`;
|
|
3162
3193
|
}
|
|
3163
|
-
function
|
|
3194
|
+
function Oi(e, t, n, r) {
|
|
3164
3195
|
return Pn(e, t, n), 0;
|
|
3165
3196
|
}
|
|
3166
|
-
var
|
|
3197
|
+
var Si = {
|
|
3167
3198
|
mt_create: function(e) {
|
|
3168
3199
|
let t = e.priv;
|
|
3169
|
-
un(e, "start_date",
|
|
3170
|
-
let t =
|
|
3200
|
+
un(e, "start_date", $o()), un(e, "node_uuid", Io()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = Qt(e, "periodic_timeout"), function(e) {
|
|
3201
|
+
let t = Qt(e, "trace_levels");
|
|
3171
3202
|
if (!Yr(t)) return 0;
|
|
3172
3203
|
let n = t.__global_trace__;
|
|
3173
3204
|
if (Br(n)) {
|
|
@@ -3182,7 +3213,7 @@ var pi = {
|
|
|
3182
3213
|
} else ir(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
3183
3214
|
}
|
|
3184
3215
|
}(e), function(e) {
|
|
3185
|
-
let t =
|
|
3216
|
+
let t = Qt(e, "no_trace_levels");
|
|
3186
3217
|
if (!Yr(t)) return 0;
|
|
3187
3218
|
let n = t.__global_no_trace__;
|
|
3188
3219
|
if (Br(n)) {
|
|
@@ -3192,18 +3223,18 @@ var pi = {
|
|
|
3192
3223
|
for (const [n, r] of Object.entries(t)) {
|
|
3193
3224
|
let t = Me(n);
|
|
3194
3225
|
if (t) if (Br(r)) {
|
|
3195
|
-
|
|
3196
|
-
for (let e of r)
|
|
3226
|
+
Te(t, null, !1);
|
|
3227
|
+
for (let e of r) Te(t, e, !0);
|
|
3197
3228
|
} else ir(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
3198
3229
|
}
|
|
3199
3230
|
}(e);
|
|
3200
3231
|
},
|
|
3201
3232
|
mt_writing: function(e, t) {},
|
|
3202
3233
|
mt_start: function(e) {
|
|
3203
|
-
return
|
|
3234
|
+
return bi(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3204
3235
|
},
|
|
3205
3236
|
mt_stop: function(e) {
|
|
3206
|
-
return
|
|
3237
|
+
return pi(e.priv.gobj_timer), bt(e), 0;
|
|
3207
3238
|
},
|
|
3208
3239
|
mt_destroy: function(e) {},
|
|
3209
3240
|
mt_play: function(e) {
|
|
@@ -3220,60 +3251,60 @@ var pi = {
|
|
|
3220
3251
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
3221
3252
|
case "set-global-trace":
|
|
3222
3253
|
case "set-global-no-trace": {
|
|
3223
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3224
|
-
return l ? null === i ? o(0, -1, `${
|
|
3254
|
+
let r = "set-global-no-trace" === t, l = n.level, i = Ti(n.set);
|
|
3255
|
+
return l ? null === i ? o(0, -1, `${vi()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${vi()}: global trace level not found: ${l}`, null, null) : r ? (yi(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (yi(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${vi()}: what level?`, null, null);
|
|
3225
3256
|
}
|
|
3226
3257
|
case "get-gclass-trace":
|
|
3227
3258
|
case "get-gclass-no-trace":
|
|
3228
3259
|
case "set-gclass-trace":
|
|
3229
3260
|
case "set-gclass-no-trace": {
|
|
3230
3261
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
3231
|
-
if (!i) return o(0, -1, `${
|
|
3262
|
+
if (!i) return o(0, -1, `${vi()}: what gclass is '${l}'?`, null, null);
|
|
3232
3263
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3233
|
-
let s = n.level, a =
|
|
3234
|
-
return s ? null === a ? o(0, -1, `${
|
|
3264
|
+
let s = n.level, a = Ti(n.set);
|
|
3265
|
+
return s ? null === a ? o(0, -1, `${vi()}: bitmask set or re-set?`, null, null) : (r ? Te(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${vi()}: trace level of ${l} not found: ${s}`, null, null) : r ? (yi(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (yi(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${vi()}: what level?`, null, null);
|
|
3235
3266
|
}
|
|
3236
|
-
default: return o(0, -1, `${
|
|
3267
|
+
default: return o(0, -1, `${vi()}: command not available: ${t}`, null, null);
|
|
3237
3268
|
}
|
|
3238
3269
|
}
|
|
3239
3270
|
};
|
|
3240
|
-
function
|
|
3271
|
+
function Ni() {
|
|
3241
3272
|
return function(e) {
|
|
3242
|
-
if (
|
|
3273
|
+
if (Ei) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3243
3274
|
const t = [["ST_IDLE", [[
|
|
3244
3275
|
"EV_TIMEOUT_PERIODIC",
|
|
3245
|
-
|
|
3276
|
+
Oi,
|
|
3246
3277
|
null
|
|
3247
3278
|
]]]];
|
|
3248
|
-
return (
|
|
3279
|
+
return (Ei = Ae(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, Si, 0, mi, hi, 0, 0, 0, 0)) ? 0 : -1;
|
|
3249
3280
|
}("C_YUNO");
|
|
3250
3281
|
}
|
|
3251
|
-
var
|
|
3252
|
-
N(
|
|
3253
|
-
N(
|
|
3254
|
-
N(
|
|
3255
|
-
N(
|
|
3256
|
-
N(
|
|
3257
|
-
N(
|
|
3258
|
-
N(
|
|
3259
|
-
N(
|
|
3260
|
-
N(
|
|
3261
|
-
N(
|
|
3262
|
-
N(
|
|
3263
|
-
N(
|
|
3264
|
-
N(
|
|
3265
|
-
N(
|
|
3266
|
-
N(
|
|
3282
|
+
var wi = "ievent_gate_stack", ji = [
|
|
3283
|
+
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3284
|
+
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3285
|
+
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
3286
|
+
N(T.DTP_STRING, "remote_yuno_role", v.SDF_RD, "", "confirmed remote yuno role"),
|
|
3287
|
+
N(T.DTP_STRING, "remote_yuno_name", v.SDF_RD, "", "confirmed remote yuno name"),
|
|
3288
|
+
N(T.DTP_STRING, "remote_yuno_service", v.SDF_RD, "", "confirmed remote yuno service"),
|
|
3289
|
+
N(T.DTP_STRING, "url", v.SDF_RD, "", "Url to connect"),
|
|
3290
|
+
N(T.DTP_STRING, "jwt", v.SDF_PERSIST, "", "JWT"),
|
|
3291
|
+
N(T.DTP_STRING, "cert_pem", v.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
3292
|
+
N(T.DTP_JSON, "extra_info", v.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
3293
|
+
N(T.DTP_LIST, "required_services", v.SDF_RD, "[]", "Services this LINK requires (identity card). Empty = the yuno's `required_services`, as before. A yuno with several links to DIFFERENT backends must set it per link: the yuno-wide list is the union, so every backend is told the service names of all the others."),
|
|
3294
|
+
N(T.DTP_INTEGER, "timeout_retry", v.SDF_RD, "5000", "First reconnect delay (ms). It BACKS OFF from here, doubling up to timeout_retry_max, and resets when a session is reached"),
|
|
3295
|
+
N(T.DTP_INTEGER, "timeout_retry_max", v.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
|
|
3296
|
+
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3297
|
+
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3267
3298
|
S()
|
|
3268
|
-
],
|
|
3299
|
+
], Ri = [
|
|
3269
3300
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3270
3301
|
["ievents2", "Trace inter-events with full kw"],
|
|
3271
3302
|
["identity-card", "Trace identity_card messages"]
|
|
3272
3303
|
];
|
|
3273
|
-
function
|
|
3304
|
+
function $i(e) {
|
|
3274
3305
|
return !!(3 & Z(e));
|
|
3275
3306
|
}
|
|
3276
|
-
var
|
|
3307
|
+
var Di = {
|
|
3277
3308
|
url: null,
|
|
3278
3309
|
remote_yuno_name: null,
|
|
3279
3310
|
remote_yuno_role: null,
|
|
@@ -3283,8 +3314,8 @@ var vi = {
|
|
|
3283
3314
|
websocket: null,
|
|
3284
3315
|
inside_on_open: !1,
|
|
3285
3316
|
retry_ms: 0
|
|
3286
|
-
},
|
|
3287
|
-
function
|
|
3317
|
+
}, Ai = null;
|
|
3318
|
+
function Ii(e) {
|
|
3288
3319
|
e.priv.websocket && ir("Websocket ALREADY setup");
|
|
3289
3320
|
const t = tn(e, "url");
|
|
3290
3321
|
ur(`====> Starting WebSocket to '${t}' (${$t(e)})`);
|
|
@@ -3292,21 +3323,27 @@ function Si(e) {
|
|
|
3292
3323
|
let r;
|
|
3293
3324
|
try {
|
|
3294
3325
|
r = new WebSocket(t);
|
|
3295
|
-
} catch (
|
|
3296
|
-
return ir(`${$t(e)}: Cannot open WebSocket to '${t}', Error: ${
|
|
3326
|
+
} catch (r) {
|
|
3327
|
+
return ir(`${$t(e)}: Cannot open WebSocket to '${t}', Error: ${r.message}`), hn(e, "EV_ON_CLOSE", {
|
|
3328
|
+
url: t,
|
|
3329
|
+
ws_seq: n,
|
|
3330
|
+
code: 1006,
|
|
3331
|
+
reason: r.message,
|
|
3332
|
+
was_clean: !1
|
|
3333
|
+
}, e), null;
|
|
3297
3334
|
}
|
|
3298
3335
|
return r ? (r.onopen = () => {
|
|
3299
|
-
n !== e.priv.ws_seq || Ct(e) ||
|
|
3336
|
+
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
3300
3337
|
url: t,
|
|
3301
3338
|
ws_seq: n
|
|
3302
3339
|
}, e);
|
|
3303
3340
|
}, r.onmessage = (r) => {
|
|
3304
|
-
n !== e.priv.ws_seq || Ct(e) ||
|
|
3341
|
+
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_MESSAGE", {
|
|
3305
3342
|
url: t,
|
|
3306
3343
|
data: r.data
|
|
3307
3344
|
}, e);
|
|
3308
3345
|
}, r.onclose = (r) => {
|
|
3309
|
-
Ct(e) || n === e.priv.ws_seq && (Zt(Ot(), "browser_beforeunload") ? sr("Close websocket by unload page") :
|
|
3346
|
+
Ct(e) || n === e.priv.ws_seq && (Zt(Ot(), "browser_beforeunload") ? sr("Close websocket by unload page") : Tn(e, "EV_ON_CLOSE", {
|
|
3310
3347
|
url: t,
|
|
3311
3348
|
ws_seq: n,
|
|
3312
3349
|
code: r.code,
|
|
@@ -3315,7 +3352,7 @@ function Si(e) {
|
|
|
3315
3352
|
}, e));
|
|
3316
3353
|
}, r) : (ir(`${$t(e)}: Failed to initialize WebSocket.`), null);
|
|
3317
3354
|
}
|
|
3318
|
-
function
|
|
3355
|
+
function ki(e, t = 1e3, n = "") {
|
|
3319
3356
|
let r = e.priv, l = r.websocket;
|
|
3320
3357
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3321
3358
|
ur(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -3326,25 +3363,25 @@ function Ni(e, t = 1e3, n = "") {
|
|
|
3326
3363
|
}
|
|
3327
3364
|
} else sr("WebSocket is already closed or in the process of closing.");
|
|
3328
3365
|
}
|
|
3329
|
-
function
|
|
3330
|
-
let r =
|
|
3366
|
+
function Ci(e, t, n) {
|
|
3367
|
+
let r = $o();
|
|
3331
3368
|
try {
|
|
3332
3369
|
ur("\n" + r + " " + t + "\n"), wr(n);
|
|
3333
3370
|
} catch (e) {
|
|
3334
3371
|
ur("ERROR in trace_inter_event: " + e);
|
|
3335
3372
|
}
|
|
3336
3373
|
}
|
|
3337
|
-
var
|
|
3374
|
+
var Li = class {
|
|
3338
3375
|
constructor(e, t) {
|
|
3339
3376
|
this.event = e, this.kw = t || {};
|
|
3340
3377
|
}
|
|
3341
3378
|
};
|
|
3342
|
-
function
|
|
3379
|
+
function Pi(e, t, n, r) {
|
|
3343
3380
|
return function(e, t) {
|
|
3344
3381
|
let n = e.priv, r = JSON.stringify(t);
|
|
3345
|
-
if (
|
|
3346
|
-
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o =
|
|
3347
|
-
o ? o(l, t, 1, r.length) :
|
|
3382
|
+
if ($i(e)) {
|
|
3383
|
+
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = Qt(Ot(), "trace_ievent_callback");
|
|
3384
|
+
o ? o(l, t, 1, r.length) : Ci(0, l, t);
|
|
3348
3385
|
}
|
|
3349
3386
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return sr(`${$t(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3350
3387
|
try {
|
|
@@ -3354,10 +3391,10 @@ function Ri(e, t, n, r) {
|
|
|
3354
3391
|
}
|
|
3355
3392
|
return 0;
|
|
3356
3393
|
}(e, function(e, t) {
|
|
3357
|
-
return tl(e) ? (ir("iev_create() event NULL"), null) : new
|
|
3394
|
+
return tl(e) ? (ir("iev_create() event NULL"), null) : new Li(e, t);
|
|
3358
3395
|
}(t, n));
|
|
3359
3396
|
}
|
|
3360
|
-
function
|
|
3397
|
+
function Ui(e, t, n) {
|
|
3361
3398
|
return tl(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3362
3399
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3363
3400
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
@@ -3365,12 +3402,12 @@ function $i(e, t, n) {
|
|
|
3365
3402
|
src_yuno: St(),
|
|
3366
3403
|
src_role: Nt(),
|
|
3367
3404
|
src_service: t,
|
|
3368
|
-
host:
|
|
3405
|
+
host: Io()
|
|
3369
3406
|
};
|
|
3370
3407
|
}
|
|
3371
|
-
function
|
|
3372
|
-
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i =
|
|
3373
|
-
i && i.length || (i =
|
|
3408
|
+
function Fi(e) {
|
|
3409
|
+
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i = Qt(e, "required_services");
|
|
3410
|
+
i && i.length || (i = Qt(Ot(), "required_services"));
|
|
3374
3411
|
let s = {
|
|
3375
3412
|
yuno_role: Nt(),
|
|
3376
3413
|
yuno_id: wt(),
|
|
@@ -3386,34 +3423,34 @@ function Di(e) {
|
|
|
3386
3423
|
username: tn(Ot(), "__username__"),
|
|
3387
3424
|
launch_id: 0,
|
|
3388
3425
|
yuno_startdate: tn(Ot(), "start_date"),
|
|
3389
|
-
id:
|
|
3426
|
+
id: Io(),
|
|
3390
3427
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3391
3428
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3392
3429
|
required_services: i
|
|
3393
3430
|
};
|
|
3394
|
-
return Hl(e, s,
|
|
3431
|
+
return Hl(e, s, wi, Ui(e, jt(At(e)), null)), Ql(e, s, "__identity__"), di(t.gobj_timer, en(e, "timeout_idack")), Pi(e, "EV_IDENTITY_CARD", s);
|
|
3395
3432
|
}
|
|
3396
|
-
function
|
|
3433
|
+
function Vi(e, t) {
|
|
3397
3434
|
if (tl(t.event)) return -1;
|
|
3398
3435
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3399
3436
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3400
|
-
return Hl(e, n,
|
|
3437
|
+
return Hl(e, n, wi, Ui(e, jt(s), i)), Ql(e, n, "__subscribing__"), Pi(e, t.event, n);
|
|
3401
3438
|
}
|
|
3402
|
-
function
|
|
3439
|
+
function Gi(e, t, n, r) {
|
|
3403
3440
|
let l = e.priv;
|
|
3404
|
-
return Et(e) && (l.websocket =
|
|
3441
|
+
return Et(e) && (l.websocket = Ii(e)), 0;
|
|
3405
3442
|
}
|
|
3406
|
-
function
|
|
3407
|
-
return ur("Websocket opened: " + e.priv.url),
|
|
3443
|
+
function Mi(e, t, n, r) {
|
|
3444
|
+
return ur("Websocket opened: " + e.priv.url), Fi(e), 0;
|
|
3408
3445
|
}
|
|
3409
|
-
function
|
|
3446
|
+
function Wi(e, t, n, r) {
|
|
3410
3447
|
let l = e.priv, o = n.url;
|
|
3411
|
-
return rr(), sr(`${$t(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, Pn(e, "EV_ON_CLOSE", {
|
|
3448
|
+
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(), sr(`${$t(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, Pn(e, "EV_ON_CLOSE", {
|
|
3412
3449
|
url: o,
|
|
3413
3450
|
remote_yuno_name: l.remote_yuno_name,
|
|
3414
3451
|
remote_yuno_role: l.remote_yuno_role,
|
|
3415
3452
|
remote_yuno_service: l.remote_yuno_service
|
|
3416
|
-
})) : (sr(`${$t(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), Pn(e, "EV_ON_OPEN_ERROR", {
|
|
3453
|
+
})) : Et(e) && (sr(`${$t(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), Pn(e, "EV_ON_OPEN_ERROR", {
|
|
3417
3454
|
url: o,
|
|
3418
3455
|
remote_yuno_name: l.remote_yuno_name,
|
|
3419
3456
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3421,25 +3458,25 @@ function Ci(e, t, n, r) {
|
|
|
3421
3458
|
code: n.code,
|
|
3422
3459
|
reason: n.reason,
|
|
3423
3460
|
was_clean: n.was_clean
|
|
3424
|
-
})), Et(e) &&
|
|
3461
|
+
})), Et(e) && di(l.gobj_timer, function(e) {
|
|
3425
3462
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3426
3463
|
r < n && (r = n);
|
|
3427
3464
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3428
3465
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3429
3466
|
return Math.max(1, Math.round(o));
|
|
3430
|
-
}(e)), 0;
|
|
3467
|
+
}(e))), 0;
|
|
3431
3468
|
}
|
|
3432
|
-
function
|
|
3433
|
-
return
|
|
3469
|
+
function xi(e, t, n, r) {
|
|
3470
|
+
return Fi(e), 0;
|
|
3434
3471
|
}
|
|
3435
|
-
function
|
|
3472
|
+
function Ki(e, t, n, r) {
|
|
3436
3473
|
let l = e.priv;
|
|
3437
|
-
|
|
3438
|
-
let o =
|
|
3474
|
+
pi(l.gobj_timer);
|
|
3475
|
+
let o = zl(e, n, wi, !0), i = El(e, o, "src_yuno", ""), s = El(e, o, "src_role", ""), a = El(e, o, "src_service", "");
|
|
3439
3476
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3440
3477
|
let u = ml(e, n, "result", -1, 0), _ = El(e, n, "comment", "", 0), c = El(e, n, "username", "", 0), f = vl(e, n, "services_roles", {});
|
|
3441
3478
|
if (u < 0) {
|
|
3442
|
-
|
|
3479
|
+
ki(e);
|
|
3443
3480
|
let t = {
|
|
3444
3481
|
url: tn(e, "url"),
|
|
3445
3482
|
result: u,
|
|
@@ -3449,7 +3486,7 @@ function Pi(e, t, n, r) {
|
|
|
3449
3486
|
remote_yuno_role: s,
|
|
3450
3487
|
remote_yuno_service: a
|
|
3451
3488
|
};
|
|
3452
|
-
kt(e) ?
|
|
3489
|
+
kt(e) ? Tn(At(e), "EV_ON_ID_NAK", t, e) : Pn(e, "EV_ON_ID_NAK", t);
|
|
3453
3490
|
} else {
|
|
3454
3491
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3455
3492
|
l.inform_on_close = !0;
|
|
@@ -3460,16 +3497,16 @@ function Pi(e, t, n, r) {
|
|
|
3460
3497
|
remote_yuno_service: a,
|
|
3461
3498
|
services_roles: f
|
|
3462
3499
|
};
|
|
3463
|
-
kt(e) ?
|
|
3500
|
+
kt(e) ? Tn(At(e), "EV_ON_OPEN", t, e) : Pn(e, "EV_ON_OPEN", t);
|
|
3464
3501
|
}
|
|
3465
3502
|
l.inside_on_open = !1, function(e) {
|
|
3466
3503
|
let t = kn(e, null, null, null);
|
|
3467
|
-
for (let n = 0; n < t.length; n++)
|
|
3504
|
+
for (let n = 0; n < t.length; n++) Vi(e, t[n]);
|
|
3468
3505
|
}(e);
|
|
3469
3506
|
}
|
|
3470
3507
|
return 0;
|
|
3471
3508
|
}
|
|
3472
|
-
function
|
|
3509
|
+
function Yi(e, t, n, r) {
|
|
3473
3510
|
let l = e.priv.url, o = function(e, t) {
|
|
3474
3511
|
let n;
|
|
3475
3512
|
try {
|
|
@@ -3488,37 +3525,37 @@ function Ui(e, t, n, r) {
|
|
|
3488
3525
|
} : (sr(`${$t(e)}: parsing inter_event: kw not a json object`), null) : (sr(`${$t(e)}: parsing inter_kw: no kw`), null);
|
|
3489
3526
|
}(e, n.data);
|
|
3490
3527
|
if (!o) return sr(`${$t(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3491
|
-
if (
|
|
3492
|
-
let e = jt(Ot()) + " <== " + l, t = n.data.length, r =
|
|
3493
|
-
r ? r(e, o, 2, t) :
|
|
3528
|
+
if ($i(e)) {
|
|
3529
|
+
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = Qt(Ot(), "trace_ievent_callback");
|
|
3530
|
+
r ? r(e, o, 2, t) : Ci(0, e, o);
|
|
3494
3531
|
}
|
|
3495
3532
|
let i = o.event, s = o.kw;
|
|
3496
3533
|
if ("ST_SESSION" !== cn(e)) {
|
|
3497
3534
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3498
|
-
if (!(
|
|
3535
|
+
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3499
3536
|
} else ir(`${$t(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3500
|
-
return
|
|
3537
|
+
return ki(e), -1;
|
|
3501
3538
|
}
|
|
3502
3539
|
o = null;
|
|
3503
|
-
let a = Xl(e, s), u =
|
|
3540
|
+
let a = Xl(e, s), u = zl(e, s, wi), _ = El(e, u, "dst_role", "");
|
|
3504
3541
|
if (_.toLowerCase() !== Nt().toLowerCase()) return ir(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3505
3542
|
let c = El(e, u, "dst_service", "");
|
|
3506
3543
|
if ("__subscribing__" === a) return sr(`${$t(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3507
3544
|
if ("__unsubscribing__" === a) return sr(`${$t(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3508
|
-
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return
|
|
3545
|
+
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return Tn(e, i, s, e), 0;
|
|
3509
3546
|
if (!tl(c)) {
|
|
3510
3547
|
let t = Ke(c, !1);
|
|
3511
|
-
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (
|
|
3548
|
+
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (Tn(t, i, s, e), 0) : (ir(`${$t(e)}: Service found but no event or not public, service '${$t(t)}', ev '${i}'`), -1) : (sr(`${$t(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3512
3549
|
}
|
|
3513
|
-
return kt(e) ?
|
|
3550
|
+
return kt(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3514
3551
|
}
|
|
3515
|
-
function
|
|
3552
|
+
function Bi(e, t, n, r) {
|
|
3516
3553
|
return 0;
|
|
3517
3554
|
}
|
|
3518
|
-
function
|
|
3555
|
+
function Ji(e, t, n, r) {
|
|
3519
3556
|
return 0;
|
|
3520
3557
|
}
|
|
3521
|
-
var
|
|
3558
|
+
var qi = {
|
|
3522
3559
|
mt_create: function(e) {
|
|
3523
3560
|
let t = e.priv;
|
|
3524
3561
|
t.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -3542,49 +3579,49 @@ var Gi = {
|
|
|
3542
3579
|
},
|
|
3543
3580
|
mt_start: function(e) {
|
|
3544
3581
|
let t = e.priv;
|
|
3545
|
-
return t.retry_ms = 0, "ST_DISCONNECTED" !== cn(e) && (
|
|
3582
|
+
return t.retry_ms = 0, "ST_DISCONNECTED" !== cn(e) && (Tn(e, "EV_ON_CLOSE", {
|
|
3546
3583
|
url: t.url,
|
|
3547
3584
|
ws_seq: t.ws_seq,
|
|
3548
3585
|
code: 1e3,
|
|
3549
3586
|
reason: "restarted",
|
|
3550
3587
|
was_clean: !0
|
|
3551
|
-
}, e),
|
|
3588
|
+
}, e), pi(t.gobj_timer)), t.websocket = Ii(e), 0;
|
|
3552
3589
|
},
|
|
3553
3590
|
mt_stop: function(e) {
|
|
3554
3591
|
let t = e.priv;
|
|
3555
|
-
return
|
|
3592
|
+
return pi(t.gobj_timer), t.websocket && ki(e), 0;
|
|
3556
3593
|
},
|
|
3557
3594
|
mt_destroy: function(e) {},
|
|
3558
3595
|
mt_stats: function(e, t, n, r) {
|
|
3559
3596
|
if ("ST_SESSION" !== cn(e)) return ir("Not in session"), null;
|
|
3560
3597
|
n || (n = {});
|
|
3561
|
-
let l =
|
|
3598
|
+
let l = Ui(e, jt(r), El(e, n, "service", null, 0)), o = vl(e, n, "__md_stats__", null, Vn.KW_EXTRACT);
|
|
3562
3599
|
return o || (o = {}), Hl(e, n, "stats_stack", {
|
|
3563
3600
|
stats: t,
|
|
3564
3601
|
kw: o
|
|
3565
|
-
}), Hl(e, n,
|
|
3602
|
+
}), Hl(e, n, wi, l), n.__stats__ = t, Ql(e, n, "__stats__"), Pi(e, "EV_MT_STATS", n, r), null;
|
|
3566
3603
|
},
|
|
3567
3604
|
mt_command_parser: function(e, t, n, r) {
|
|
3568
3605
|
if ("ST_SESSION" !== cn(e)) return ir("Not in session"), null;
|
|
3569
3606
|
n || (n = {});
|
|
3570
|
-
let l =
|
|
3607
|
+
let l = Ui(e, jt(r), El(e, n, "service", "", 0)), o = vl(e, n, "__md_command__", null, Vn.KW_EXTRACT);
|
|
3571
3608
|
return o || (o = {}), Hl(e, n, "command_stack", {
|
|
3572
3609
|
command: t,
|
|
3573
3610
|
kw: o
|
|
3574
|
-
}), Hl(e, n,
|
|
3611
|
+
}), Hl(e, n, wi, l), n.__command__ = t, Ql(e, n, "__command__"), Pi(e, "EV_MT_COMMAND", n, r), null;
|
|
3575
3612
|
},
|
|
3576
3613
|
mt_inject_event: function(e, t, n, r) {
|
|
3577
3614
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3578
|
-
if (n =
|
|
3615
|
+
if (n = Dr({}, Yr(n) ? n : {}), Yr(n.__md_iev__) && (n.__md_iev__ = jr(n.__md_iev__)), zl(e, n, wi));
|
|
3579
3616
|
else {
|
|
3580
|
-
let l =
|
|
3581
|
-
Cr(n, "__service__"), Hl(e, n, "__message__", t), Hl(e, n,
|
|
3617
|
+
let l = Ui(e, jt(r), El(e, n, "__service__", 0, 0));
|
|
3618
|
+
Cr(n, "__service__"), Hl(e, n, "__message__", t), Hl(e, n, wi, l);
|
|
3582
3619
|
}
|
|
3583
|
-
return
|
|
3620
|
+
return Ql(e, n, "__message__"), Pi(e, t, n, r);
|
|
3584
3621
|
},
|
|
3585
3622
|
mt_subscription_added: function(e, t) {
|
|
3586
3623
|
let n = e.priv;
|
|
3587
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3624
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : Vi(e, t) : 0;
|
|
3588
3625
|
},
|
|
3589
3626
|
mt_subscription_deleted: function(e, t) {
|
|
3590
3627
|
let n = e.priv;
|
|
@@ -3593,27 +3630,27 @@ var Gi = {
|
|
|
3593
3630
|
if (tl(t.event)) return 0;
|
|
3594
3631
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3595
3632
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3596
|
-
return Hl(e, r,
|
|
3633
|
+
return Hl(e, r, wi, Ui(e, jt(a), s)), Ql(e, r, "__unsubscribing__"), Pi(e, t.event, r, e);
|
|
3597
3634
|
}
|
|
3598
3635
|
};
|
|
3599
|
-
function
|
|
3636
|
+
function Hi() {
|
|
3600
3637
|
return function(e) {
|
|
3601
|
-
if (
|
|
3638
|
+
if (Ai) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3602
3639
|
const t = [
|
|
3603
3640
|
["ST_DISCONNECTED", [
|
|
3604
3641
|
[
|
|
3605
3642
|
"EV_ON_OPEN",
|
|
3606
|
-
|
|
3643
|
+
Mi,
|
|
3607
3644
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3608
3645
|
],
|
|
3609
3646
|
[
|
|
3610
3647
|
"EV_ON_CLOSE",
|
|
3611
|
-
|
|
3648
|
+
Wi,
|
|
3612
3649
|
null
|
|
3613
3650
|
],
|
|
3614
3651
|
[
|
|
3615
3652
|
"EV_TIMEOUT",
|
|
3616
|
-
|
|
3653
|
+
Gi,
|
|
3617
3654
|
null
|
|
3618
3655
|
],
|
|
3619
3656
|
[
|
|
@@ -3625,22 +3662,22 @@ function Mi() {
|
|
|
3625
3662
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3626
3663
|
[
|
|
3627
3664
|
"EV_ON_MESSAGE",
|
|
3628
|
-
|
|
3665
|
+
Yi,
|
|
3629
3666
|
null
|
|
3630
3667
|
],
|
|
3631
3668
|
[
|
|
3632
3669
|
"EV_IDENTITY_CARD_ACK",
|
|
3633
|
-
|
|
3670
|
+
Ki,
|
|
3634
3671
|
null
|
|
3635
3672
|
],
|
|
3636
3673
|
[
|
|
3637
3674
|
"EV_ON_CLOSE",
|
|
3638
|
-
|
|
3675
|
+
Wi,
|
|
3639
3676
|
"ST_DISCONNECTED"
|
|
3640
3677
|
],
|
|
3641
3678
|
[
|
|
3642
3679
|
"EV_TIMEOUT",
|
|
3643
|
-
|
|
3680
|
+
xi,
|
|
3644
3681
|
null
|
|
3645
3682
|
],
|
|
3646
3683
|
[
|
|
@@ -3652,22 +3689,22 @@ function Mi() {
|
|
|
3652
3689
|
["ST_SESSION", [
|
|
3653
3690
|
[
|
|
3654
3691
|
"EV_ON_MESSAGE",
|
|
3655
|
-
|
|
3692
|
+
Yi,
|
|
3656
3693
|
null
|
|
3657
3694
|
],
|
|
3658
3695
|
[
|
|
3659
3696
|
"EV_MT_STATS",
|
|
3660
|
-
|
|
3697
|
+
Bi,
|
|
3661
3698
|
null
|
|
3662
3699
|
],
|
|
3663
3700
|
[
|
|
3664
3701
|
"EV_MT_COMMAND",
|
|
3665
|
-
|
|
3702
|
+
Ji,
|
|
3666
3703
|
null
|
|
3667
3704
|
],
|
|
3668
3705
|
[
|
|
3669
3706
|
"EV_ON_CLOSE",
|
|
3670
|
-
|
|
3707
|
+
Wi,
|
|
3671
3708
|
"ST_DISCONNECTED"
|
|
3672
3709
|
],
|
|
3673
3710
|
[
|
|
@@ -3678,7 +3715,7 @@ function Mi() {
|
|
|
3678
3715
|
]],
|
|
3679
3716
|
[null, null]
|
|
3680
3717
|
];
|
|
3681
|
-
return (
|
|
3718
|
+
return (Ai = Ae(e, [
|
|
3682
3719
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3683
3720
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3684
3721
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3689,9 +3726,9 @@ function Mi() {
|
|
|
3689
3726
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3690
3727
|
["EV_TIMEOUT", 0],
|
|
3691
3728
|
[null, 0]
|
|
3692
|
-
], t,
|
|
3729
|
+
], t, qi, 0, ji, Di, 0, 0, Ri, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3693
3730
|
}("C_IEVENT_CLI");
|
|
3694
3731
|
}
|
|
3695
|
-
export { k as GObj, N as SDATA, $ as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, R as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response,
|
|
3732
|
+
export { k as GObj, N as SDATA, $ as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, R as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, Po as build_path, s as build_stats_response, ko as clean_name, pi as clear_timeout, il as cmp_two_simple_json, l as command_parser, So as createElement2, Oo as createOneHtml, uo as create_json_record, si as create_template_record, $o as current_timestamp, T as data_type_t, Qo as db_list_persistent_attrs, qo as db_load_persistent_attrs, zo as db_remove_persistent_attrs, Ho as db_save_persistent_attrs, Lo as debounce, Bl as delete_from_list, Rr as duplicate_objects, Kr as empty_json, tl as empty_string, fo as escapeHtml, U as event_flag_t, xo as flat2json, Bo as flat_apply, Yo as flat_diff, Go as flat_key_join, Mo as flat_key_split, Pe as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ge as gclass_check_fsm, Ae as gclass_create, Ve as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, No as getPositionRelativeToBody, Co as get_function_name, Do as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Un as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, xe as gobj_default_service, yn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, Kt as gobj_find_gobj, Ke as gobj_find_service, Ln as gobj_find_subscribings, kn as gobj_find_subscriptions, L as gobj_flag_t, Dt as gobj_full_name, Rt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, zt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, Re as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, Et as gobj_is_running, Tt as gobj_is_service, It as gobj_is_volatil, Qe as gobj_list_persistent_attrs, Cn as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, jt as gobj_name, At as gobj_parent, ht as gobj_pause, mt as gobj_play, hn as gobj_post_event, En as gobj_posted_events_size, Pn as gobj_publish_event, Qt as gobj_read_attr, Xt as gobj_read_attrs, Zt as gobj_read_bool_attr, en as gobj_read_integer_attr, nn as gobj_read_pointer_attr, tn as gobj_read_str_attr, ze as gobj_remove_persistent_attrs, Oe as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, Tn as gobj_send_event, We as gobj_services, Pt as gobj_set_bottom_gobj, he as gobj_set_deep_trace, Te as gobj_set_gclass_no_trace, Ee as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, ye as gobj_set_gobj_trace, x as gobj_set_trace_machine_format, $t as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Se as gobj_start_up, Fn as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, Dn as gobj_subscribe_event, Z as gobj_trace_level, K as gobj_trace_machine_format, ee as gobj_trace_no_level, An as gobj_unsubscribe_event, In as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Vt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, Ot as gobj_yuno, wt as gobj_yuno_id, St as gobj_yuno_name, Nt as gobj_yuno_role, po as html_markup, xl as id_index_in_obj_list, Ao as index_in_list, Br as is_array, Hr as is_boolean, Xr as is_date, Zr as is_function, el as is_gobj, mo as is_html_markup, al as is_metadata_key, zr as is_null, qr as is_number, Yr as is_object, ul as is_private_key, Qr as is_pure_number, br as is_secret_name, Jr as is_string, lo as jdb_delete, io as jdb_get, so as jdb_get_by_idx, oo as jdb_get_topic, no as jdb_init, ro as jdb_update, Wo as json2flat, Ur as json_array_append, Fr as json_array_append_new, Gr as json_array_extend, Vr as json_array_remove, Wr as json_array_size, jr as json_deep_copy, $r as json_is_identical, Nr as json_mask_secrets, Cr as json_object_del, kr as json_object_get, Lr as json_object_set, Pr as json_object_set_new, Mr as json_object_size, Dr as json_object_update, Ar as json_object_update_existing, Ir as json_object_update_missing, xr as json_size, co as jwt2json, _o as jwtDecode, Al as kw_clone_by_keys, Il as kw_clone_by_not_keys, Dl as kw_collect, bl as kw_delete, Rl as kw_find_json_in_list, dl as kw_find_path, Vn as kw_flag_t, pl as kw_get_bool, Tl as kw_get_dict, vl as kw_get_dict_value, ml as kw_get_int, Ol as kw_get_list, kl as kw_get_local_storage_value, yl as kw_get_pointer, hl as kw_get_real, El as kw_get_str, cl as kw_has_key, jl as kw_match_simple, _l as kw_pop, Ll as kw_remove_local_storage_value, $l as kw_select, Sl as kw_set_dict_value, Cl as kw_set_local_storage_value, Nl as kw_set_subdict_value, Ul as kwid_collect, Gl as kwid_find_one_record, Ml as kwid_get_ids, Pl as kwid_match_id, Fl as kwid_new_dict, Vl as kwid_new_list, Wl as list2options, Zl as load_json_file, ur as log_debug, ir as log_error, ar as log_info, sr as log_warning, yr as mask_secrets_inline, Xl as msg_iev_get_msg_type, zl as msg_iev_get_stack, Hl as msg_iev_push_stack, Jl as msg_iev_read_key, Ql as msg_iev_set_msg_type, ql as msg_iev_write_key, Io as node_uuid, nl as parseBoolean, wo as parseSVG, jo as refresh_language, Hi as register_c_ievent_cli, gi as register_c_timer, Ni as register_c_yuno, go as safeSrc, v as sdata_flag_t, eo as send_http_json_post, zn as set_console_log_enabled, Xn as set_console_log_filter, qn as set_log_callback, rr as set_remote_log_functions, To as set_strings_are_text, di as set_timeout, bi as set_timeout_periodic, t as sprintf, i as stats_parser, Kl as str_in_list, ol as strcasecmp, ll as strcmp, vo as strings_are_text, rl as strncmp, Yl as strs_in_list, sl as strstr, ii as template_get_field_desc, Ro as timeTracker, cr as trace_json, wr as trace_json_masked, B as trace_level_t, _r as trace_msg, Zo as treedb_decoder_fkey, ti as treedb_decoder_hook, ei as treedb_encoder_fkey, oi as treedb_get_field_desc, Xo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3696
3733
|
|
|
3697
3734
|
//# sourceMappingURL=gobj-js.es.min.js.map
|