@yuneta/gobj-js 7.2.1 → 7.3.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 +28 -4
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +206 -190
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +28 -4
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +226 -210
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +28 -4
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +219 -203
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +28 -4
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +219 -203
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.iife.min.js
CHANGED
|
@@ -131,7 +131,7 @@ var gobjJs = function(e) {
|
|
|
131
131
|
data: i || []
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
var o = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0,
|
|
134
|
+
var o = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0, E = Object.freeze({
|
|
135
135
|
DTP_STRING: 1,
|
|
136
136
|
DTP_BOOLEAN: 2,
|
|
137
137
|
DTP_INTEGER: 3,
|
|
@@ -141,8 +141,8 @@ var gobjJs = function(e) {
|
|
|
141
141
|
DTP_JSON: 7,
|
|
142
142
|
DTP_POINTER: 8
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
var
|
|
144
|
+
E.DTP_POINTER;
|
|
145
|
+
var T = Object.freeze({
|
|
146
146
|
SDF_NOTACCESS: 1,
|
|
147
147
|
SDF_RD: 2,
|
|
148
148
|
SDF_WR: 4,
|
|
@@ -151,7 +151,7 @@ var gobjJs = function(e) {
|
|
|
151
151
|
SDF_VOLATIL: 32,
|
|
152
152
|
SDF_RESOURCE: 64,
|
|
153
153
|
SDF_PKEY: 128,
|
|
154
|
-
|
|
154
|
+
SDF_DEPRECATED: 256,
|
|
155
155
|
SDF_FUTURE2: 512,
|
|
156
156
|
SDF_WILD_CMD: 1024,
|
|
157
157
|
SDF_STATS: 2048,
|
|
@@ -165,7 +165,7 @@ var gobjJs = function(e) {
|
|
|
165
165
|
SDF_AUTHZ_S: 524288,
|
|
166
166
|
SDF_AUTHZ_RS: 1048576
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
T.SDF_RD, T.SDF_WR, T.SDF_STATS, T.SDF_PERSIST, T.SDF_VOLATIL, T.SDF_RSTATS, T.SDF_PSTATS, T.SDF_WR, T.SDF_PERSIST;
|
|
169
169
|
var y = class {
|
|
170
170
|
constructor(e, t, n = 0, r = null, i = "", l = null, o = null, s = 0, _ = null, a = null, u = null) {
|
|
171
171
|
this.type = e, this.name = t, this.alias = l, this.flag = n, this.default_value = r, this.header = o, this.fillspace = s, this.description = i, this.json_fn = _, this.schema = a, this.authpth = u;
|
|
@@ -211,11 +211,11 @@ var gobjJs = function(e) {
|
|
|
211
211
|
constructor(e, t, n) {
|
|
212
212
|
this.event_name = e, this.action = t, this.next_state = n;
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, A = class {
|
|
215
215
|
constructor(e) {
|
|
216
216
|
this.state_name = e, this.dl_actions = [];
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, I = class {
|
|
219
219
|
constructor(e, t) {
|
|
220
220
|
this.event_name = e, this.event_flag = Number(t) || 0;
|
|
221
221
|
}
|
|
@@ -235,19 +235,19 @@ var gobjJs = function(e) {
|
|
|
235
235
|
function U(e, t, n) {
|
|
236
236
|
let r, i = n.default_value;
|
|
237
237
|
switch (n.type) {
|
|
238
|
-
case
|
|
238
|
+
case E.DTP_STRING:
|
|
239
239
|
r = String(i);
|
|
240
240
|
break;
|
|
241
|
-
case
|
|
241
|
+
case E.DTP_BOOLEAN:
|
|
242
242
|
r = en(i);
|
|
243
243
|
break;
|
|
244
|
-
case
|
|
244
|
+
case E.DTP_INTEGER:
|
|
245
245
|
r = parseInt(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
246
246
|
break;
|
|
247
|
-
case
|
|
247
|
+
case E.DTP_REAL:
|
|
248
248
|
r = Number(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
249
249
|
break;
|
|
250
|
-
case
|
|
250
|
+
case E.DTP_LIST:
|
|
251
251
|
if (Jt(i)) try {
|
|
252
252
|
r = JSON.parse(i);
|
|
253
253
|
} catch (e) {
|
|
@@ -256,7 +256,7 @@ var gobjJs = function(e) {
|
|
|
256
256
|
else r = i;
|
|
257
257
|
Bt(r) || (r = []);
|
|
258
258
|
break;
|
|
259
|
-
case
|
|
259
|
+
case E.DTP_DICT:
|
|
260
260
|
if (Jt(i)) try {
|
|
261
261
|
r = JSON.parse(i);
|
|
262
262
|
} catch (e) {
|
|
@@ -265,7 +265,7 @@ var gobjJs = function(e) {
|
|
|
265
265
|
else r = i;
|
|
266
266
|
xt(r) || (r = {});
|
|
267
267
|
break;
|
|
268
|
-
case
|
|
268
|
+
case E.DTP_JSON:
|
|
269
269
|
if (Jt(i)) try {
|
|
270
270
|
r = JSON.parse(i);
|
|
271
271
|
} catch (e) {
|
|
@@ -273,30 +273,31 @@ var gobjJs = function(e) {
|
|
|
273
273
|
}
|
|
274
274
|
else r = i;
|
|
275
275
|
break;
|
|
276
|
-
case
|
|
276
|
+
case E.DTP_POINTER: r = i;
|
|
277
277
|
}
|
|
278
278
|
return void 0 === r && (Ot(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
279
279
|
}
|
|
280
280
|
function C(e, t, n, r) {
|
|
281
281
|
let i;
|
|
282
282
|
switch (n.type) {
|
|
283
|
-
case
|
|
284
|
-
if (
|
|
283
|
+
case E.DTP_STRING:
|
|
284
|
+
if (null == r) i = "";
|
|
285
|
+
else if (Jt(r)) i = String(r);
|
|
285
286
|
else {
|
|
286
287
|
let e = JSON.stringify(r);
|
|
287
288
|
e && (i = String(e));
|
|
288
289
|
}
|
|
289
290
|
break;
|
|
290
|
-
case
|
|
291
|
+
case E.DTP_BOOLEAN:
|
|
291
292
|
i = en(r);
|
|
292
293
|
break;
|
|
293
|
-
case
|
|
294
|
+
case E.DTP_INTEGER:
|
|
294
295
|
i = parseInt(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
295
296
|
break;
|
|
296
|
-
case
|
|
297
|
+
case E.DTP_REAL:
|
|
297
298
|
i = Number(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
298
299
|
break;
|
|
299
|
-
case
|
|
300
|
+
case E.DTP_LIST:
|
|
300
301
|
if (Jt(r)) try {
|
|
301
302
|
i = JSON.parse(r);
|
|
302
303
|
} catch (e) {
|
|
@@ -305,7 +306,7 @@ var gobjJs = function(e) {
|
|
|
305
306
|
else i = r;
|
|
306
307
|
if (!Bt(i)) return Ot(`attr must be an array: ${n.name}`), -1;
|
|
307
308
|
break;
|
|
308
|
-
case
|
|
309
|
+
case E.DTP_DICT:
|
|
309
310
|
if (Jt(r)) try {
|
|
310
311
|
i = JSON.parse(r);
|
|
311
312
|
} catch (e) {
|
|
@@ -314,7 +315,7 @@ var gobjJs = function(e) {
|
|
|
314
315
|
else i = r;
|
|
315
316
|
if (!xt(i)) return Ot(`attr must be an object: ${n.name}`), -1;
|
|
316
317
|
break;
|
|
317
|
-
case
|
|
318
|
+
case E.DTP_JSON:
|
|
318
319
|
if (Jt(r)) try {
|
|
319
320
|
i = JSON.parse(r);
|
|
320
321
|
} catch (e) {
|
|
@@ -323,15 +324,15 @@ var gobjJs = function(e) {
|
|
|
323
324
|
else i = r;
|
|
324
325
|
if (!Bt(i) && !xt(i)) return Ot(`attr must be a json dict/list: ${n.name}`), -1;
|
|
325
326
|
break;
|
|
326
|
-
case
|
|
327
|
+
case E.DTP_POINTER: i = r;
|
|
327
328
|
}
|
|
328
329
|
return void 0 === i && Ot(`${Ne(e)}: attr undefined: ${n.name}`), t[n.name] = i, xt(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = i), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
+
function F(e) {
|
|
331
332
|
return e.jn_attrs;
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
-
return Ke(e, t) ?
|
|
334
|
+
function G(e, t, n) {
|
|
335
|
+
return Ke(e, t) ? F(e) : e && e.bottom_gobj ? G(e.bottom_gobj, t, n) : (n && Ot(`GClass Attribute NOT FOUND: ${Ne(e)}, attr ${t}`), null);
|
|
335
336
|
}
|
|
336
337
|
function V(e, t, n) {
|
|
337
338
|
if (!(e && e instanceof S)) return n && Ot("gclass NULL"), null;
|
|
@@ -345,7 +346,7 @@ var gobjJs = function(e) {
|
|
|
345
346
|
function W(e, t, n, r, i, l, o, s, _, a, u) {
|
|
346
347
|
if (Zt(e)) return Ot("gclass_name EMPTY"), null;
|
|
347
348
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return Ot(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
348
|
-
if (
|
|
349
|
+
if (H(e)) return Ot(`GClass ALREADY exists: ${e}`), null;
|
|
349
350
|
let c = new S(e, r, i, l, o, s, _, a, u);
|
|
350
351
|
(function(e, t) {
|
|
351
352
|
e && e instanceof S ? t ? d[t] ? Ot(`gclass ALREADY REGISTERED: ${t}`) : d[t] = e : Ot("gclass_name undefined") : Ot("gclass undefined");
|
|
@@ -369,7 +370,7 @@ var gobjJs = function(e) {
|
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
if (!c.fsm_checked) {
|
|
372
|
-
if (
|
|
373
|
+
if (q(c) < 0) return M(c), null;
|
|
373
374
|
c.fsm_checked = !0;
|
|
374
375
|
}
|
|
375
376
|
return c;
|
|
@@ -401,7 +402,7 @@ var gobjJs = function(e) {
|
|
|
401
402
|
return null;
|
|
402
403
|
}
|
|
403
404
|
function x(e, t) {
|
|
404
|
-
return e instanceof S ? K(e, t) ? (Ot(`state already exists: ${t}`), -1) : (e.dl_states.push(new
|
|
405
|
+
return e instanceof S ? K(e, t) ? (Ot(`state already exists: ${t}`), -1) : (e.dl_states.push(new A(t)), 0) : (Ot("Cannot add state, typeof not GClass"), -1);
|
|
405
406
|
}
|
|
406
407
|
function B(e, t, n, r, i) {
|
|
407
408
|
if (!(e instanceof S)) return Ot("Cannot add state, typeof not GClass"), -1;
|
|
@@ -410,7 +411,7 @@ var gobjJs = function(e) {
|
|
|
410
411
|
return l ? Y(l, n) ? (Ot(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (l.dl_actions.push(new $(n, r, i)), 0) : (Ot(`state not found: ${t}`), -1);
|
|
411
412
|
}
|
|
412
413
|
function J(e, t, n) {
|
|
413
|
-
Zt(t) || e.push(new
|
|
414
|
+
Zt(t) || e.push(new I(t, n));
|
|
414
415
|
}
|
|
415
416
|
function z(e, t, n) {
|
|
416
417
|
return e instanceof S ? J(e.dl_events, t, n) : (Ot("Cannot add state, typeof not GClass"), -1);
|
|
@@ -424,7 +425,7 @@ var gobjJs = function(e) {
|
|
|
424
425
|
}
|
|
425
426
|
return null;
|
|
426
427
|
}
|
|
427
|
-
function
|
|
428
|
+
function q(e) {
|
|
428
429
|
if (!(e instanceof S)) return Ot("Cannot add state, typeof not GClass"), -1;
|
|
429
430
|
let t = 0;
|
|
430
431
|
Kt(e.dl_states) || (Ot(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
@@ -448,7 +449,7 @@ var gobjJs = function(e) {
|
|
|
448
449
|
}
|
|
449
450
|
return t;
|
|
450
451
|
}
|
|
451
|
-
function
|
|
452
|
+
function H(e, t) {
|
|
452
453
|
let n = null;
|
|
453
454
|
try {
|
|
454
455
|
n = d[e];
|
|
@@ -484,10 +485,10 @@ var gobjJs = function(e) {
|
|
|
484
485
|
let l = 0;
|
|
485
486
|
for (const [o, s] of Object.entries(t)) {
|
|
486
487
|
const t = V(i.gclass, o, !1);
|
|
487
|
-
t ? (-1 === n || t.flag & n) && (l += C(i, e, t, s)) : r && (r(i, o), l--);
|
|
488
|
+
t ? (-1 === n || t.flag & n) && (t.flag & T.SDF_DEPRECATED && Nt(`${Ne(i)}: Deprecated attribute used in gobj creation: ${o}`), l += C(i, e, t, s)) : r && (r(i, o), l--);
|
|
488
489
|
}
|
|
489
490
|
return l;
|
|
490
|
-
})(
|
|
491
|
+
})(F(e), r, -1, e.gclass.gclass_flag & N.gcflag_ignore_unknown_attrs ? 0 : re, e) < 0 && (Ot(`${Ne(e)} json2data() FAILED`), Rt(r));
|
|
491
492
|
}
|
|
492
493
|
function le(e, t, r, i, l) {
|
|
493
494
|
if (l & w.gobj_flag_yuno) {
|
|
@@ -504,7 +505,7 @@ var gobjJs = function(e) {
|
|
|
504
505
|
l |= w.gobj_flag_service;
|
|
505
506
|
}
|
|
506
507
|
if (Zt(t)) return Ot("gclass_name must be a string"), null;
|
|
507
|
-
let o =
|
|
508
|
+
let o = H(t, !1);
|
|
508
509
|
if (!o) return Ot(`GClass not registered: ${t}^${e}`), null;
|
|
509
510
|
if (!Jt(e)) return Ot(`gobj_name must be a string: ${t}`), null;
|
|
510
511
|
if (!Zt(e)) {
|
|
@@ -529,7 +530,7 @@ var gobjJs = function(e) {
|
|
|
529
530
|
r && r.gclass.gmt.mt_child_removed && (t && L(n("👦👦🔴 child_removed(%s): %s", we(r), Ne(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & w.gobj_flag_service && function(e) {
|
|
530
531
|
let t = Se(e);
|
|
531
532
|
t = t.toLowerCase(), b[t] ? delete b[t] : Ot(`"service NOT found in register": ${t}`);
|
|
532
|
-
}(e), e.playing && (Ot(`Destroying a PLAYING gobj: ${we(e)}`), be(e)), e.running && (Ot(`Destroying a RUNNING gobj: ${we(e)}`), ce(e)), gt(e, e.dl_subscriptions, !0), gt(e, e.dl_subscribings, !0), r && (ne(r, e), Re(e) && (
|
|
533
|
+
}(e), e.playing && (Ot(`Destroying a PLAYING gobj: ${we(e)}`), be(e)), e.running && (Ot(`Destroying a RUNNING gobj: ${we(e)}`), ce(e)), gt(e, e.dl_subscriptions, !0), gt(e, e.dl_subscribings, !0), r && (ne(r, e), Re(e) && (Ae(r) !== e || $e(r) || Ie(r, null))), function(e) {
|
|
533
534
|
let t = e.dl_children.slice();
|
|
534
535
|
for (let e = 0; e < t.length; e++) {
|
|
535
536
|
let n = t[e];
|
|
@@ -588,22 +589,22 @@ var gobjJs = function(e) {
|
|
|
588
589
|
function he(e) {
|
|
589
590
|
return !!(e && e.gobj_flag & w.gobj_flag_service);
|
|
590
591
|
}
|
|
591
|
-
function
|
|
592
|
+
function Ee(e) {
|
|
592
593
|
return !$e(e) && e.playing;
|
|
593
594
|
}
|
|
594
|
-
function
|
|
595
|
+
function Te() {
|
|
595
596
|
return !p || p.obflag & D.obflag_destroyed ? null : p;
|
|
596
597
|
}
|
|
597
598
|
function ye() {
|
|
598
|
-
let e =
|
|
599
|
+
let e = Te();
|
|
599
600
|
return e ? Se(e) : "";
|
|
600
601
|
}
|
|
601
602
|
function ve() {
|
|
602
|
-
let e =
|
|
603
|
+
let e = Te();
|
|
603
604
|
return e ? ze(e, "yuno_role") : "";
|
|
604
605
|
}
|
|
605
606
|
function je() {
|
|
606
|
-
let e =
|
|
607
|
+
let e = Te();
|
|
607
608
|
return e ? ze(e, "yuno_id") : "";
|
|
608
609
|
}
|
|
609
610
|
function Se(e) {
|
|
@@ -633,10 +634,10 @@ var gobjJs = function(e) {
|
|
|
633
634
|
function $e(e) {
|
|
634
635
|
return !Xt(e) || !!(e.obflag & (D.obflag_destroyed | D.obflag_destroying));
|
|
635
636
|
}
|
|
636
|
-
function
|
|
637
|
+
function Ae(e) {
|
|
637
638
|
return Xt(e) ? e.bottom_gobj : (Ot("gobj NULL of bad type"), null);
|
|
638
639
|
}
|
|
639
|
-
function
|
|
640
|
+
function Ie(e, t) {
|
|
640
641
|
if (!Xt(e)) return Ot("gobj NULL of bad type"), null;
|
|
641
642
|
e.bottom_gobj && Nt(`${Ne(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
642
643
|
}
|
|
@@ -647,7 +648,7 @@ var gobjJs = function(e) {
|
|
|
647
648
|
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) : Ce(e.dl_children, t, n, r, i);
|
|
648
649
|
}
|
|
649
650
|
function Ue(e, t, n, r, i) {
|
|
650
|
-
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) :
|
|
651
|
+
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) : Ge(e.dl_children, t, n, r, i);
|
|
651
652
|
}
|
|
652
653
|
function Ce(e, t, n, r, i) {
|
|
653
654
|
let l, o = [...e];
|
|
@@ -663,24 +664,24 @@ var gobjJs = function(e) {
|
|
|
663
664
|
}
|
|
664
665
|
return 0;
|
|
665
666
|
}
|
|
666
|
-
function
|
|
667
|
+
function Fe(e, t, n, r, i) {
|
|
667
668
|
let l, o = Ce(e, t, n, r, i);
|
|
668
669
|
if (o < 0) return o;
|
|
669
670
|
if (t & k.WALK_LAST2FIRST) {
|
|
670
|
-
for (let s = e.length; s > 0; s--) if (l = e[s - 1], o =
|
|
671
|
-
} else for (let s = 0; s < e.length; s++) if (l = e[s], o =
|
|
671
|
+
for (let s = e.length; s > 0; s--) if (l = e[s - 1], o = Fe([...l.dl_children], t, n, r, i), o < 0) return o;
|
|
672
|
+
} else for (let s = 0; s < e.length; s++) if (l = e[s], o = Fe([...l.dl_children], t, n, r, i), o < 0) return o;
|
|
672
673
|
return o;
|
|
673
674
|
}
|
|
674
|
-
function
|
|
675
|
-
if (t & k.WALK_BYLEVEL) return
|
|
675
|
+
function Ge(e, t, n, r, i) {
|
|
676
|
+
if (t & k.WALK_BYLEVEL) return Fe(e, t, n, r, i);
|
|
676
677
|
let l, o;
|
|
677
678
|
if (t & k.WALK_BOTTOM2TOP) for (let s = e.length; s > 0; s--) {
|
|
678
|
-
if (o = e[s - 1], l =
|
|
679
|
+
if (o = e[s - 1], l = Ge([...o.dl_children], t, n, r, i), l < 0) return l;
|
|
679
680
|
if (l = n(o, r, i), l < 0) return l;
|
|
680
681
|
}
|
|
681
682
|
else for (let s = 0; s < e.length; s++) {
|
|
682
683
|
if (o = e[s], l = n(o, r, i), l < 0) return l;
|
|
683
|
-
if (0 === l && (l =
|
|
684
|
+
if (0 === l && (l = Ge([...o.dl_children], t, n, r, i), l < 0)) return l;
|
|
684
685
|
}
|
|
685
686
|
return 0;
|
|
686
687
|
}
|
|
@@ -754,44 +755,44 @@ var gobjJs = function(e) {
|
|
|
754
755
|
if (t) {
|
|
755
756
|
if (0 === nn(t, "__disabled__")) return me(e);
|
|
756
757
|
if (0 === nn(t, "__running__")) return pe(e);
|
|
757
|
-
if (0 === nn(t, "__playing__")) return
|
|
758
|
+
if (0 === nn(t, "__playing__")) return Ee(e);
|
|
758
759
|
if (0 === nn(t, "__service__")) return he(e);
|
|
759
760
|
}
|
|
760
|
-
let n =
|
|
761
|
+
let n = G(e, t, !1);
|
|
761
762
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
762
763
|
}
|
|
763
764
|
function Je(e, t) {
|
|
764
765
|
t && nn(t, "__trace_level__");
|
|
765
|
-
let n =
|
|
766
|
+
let n = G(e, t, !1);
|
|
766
767
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
767
768
|
}
|
|
768
769
|
function ze(e, t) {
|
|
769
770
|
if (t && 0 === nn(t, "__state__")) return tt(e);
|
|
770
|
-
let n =
|
|
771
|
+
let n = G(e, t, !1);
|
|
771
772
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
772
773
|
}
|
|
773
774
|
function Qe(e, t) {
|
|
774
|
-
let n =
|
|
775
|
+
let n = G(e, t, !1);
|
|
775
776
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
776
777
|
}
|
|
777
|
-
function
|
|
778
|
-
let i =
|
|
778
|
+
function qe(e, t, n, r) {
|
|
779
|
+
let i = F(e), l = 0;
|
|
779
780
|
for (const [r, o] of Object.entries(t)) {
|
|
780
781
|
let t = Le(e, r, !0);
|
|
781
782
|
t && (-1 === n || t.flag & n) && (l += C(e, i, t, o));
|
|
782
783
|
}
|
|
783
784
|
return l;
|
|
784
785
|
}
|
|
785
|
-
function
|
|
786
|
-
let r =
|
|
786
|
+
function He(e, t, n) {
|
|
787
|
+
let r = G(e, t, !1);
|
|
787
788
|
return r ? (r[t] = en(n), xt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
788
789
|
}
|
|
789
790
|
function Xe(e, t, n) {
|
|
790
|
-
let r =
|
|
791
|
+
let r = G(e, t, !1);
|
|
791
792
|
return r ? (r[t] = parseInt(n), xt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
792
793
|
}
|
|
793
794
|
function Ze(e, t, n) {
|
|
794
|
-
let r =
|
|
795
|
+
let r = G(e, t, !1);
|
|
795
796
|
return r ? (r[t] = String(n), xt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
796
797
|
}
|
|
797
798
|
function et(e, t) {
|
|
@@ -848,16 +849,16 @@ var gobjJs = function(e) {
|
|
|
848
849
|
__hard_subscription__: 1,
|
|
849
850
|
__own_event__: 2
|
|
850
851
|
}), st = [
|
|
851
|
-
j(
|
|
852
|
-
j(
|
|
853
|
-
j(
|
|
854
|
-
j(
|
|
855
|
-
j(
|
|
856
|
-
j(
|
|
857
|
-
j(
|
|
858
|
-
j(
|
|
859
|
-
j(
|
|
860
|
-
j(
|
|
852
|
+
j(E.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
853
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
854
|
+
j(E.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
855
|
+
j(E.DTP_STRING, "renamed_event", 0, "", "rename event name"),
|
|
856
|
+
j(E.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
|
|
857
|
+
j(E.DTP_JSON, "__config__", 0, null, "subscription config"),
|
|
858
|
+
j(E.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
|
|
859
|
+
j(E.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
860
|
+
j(E.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
861
|
+
j(E.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
861
862
|
v()
|
|
862
863
|
];
|
|
863
864
|
function _t(e, t, n, r, i) {
|
|
@@ -884,7 +885,7 @@ var gobjJs = function(e) {
|
|
|
884
885
|
let l = [];
|
|
885
886
|
for (let o = 0; o < e.length; o++) {
|
|
886
887
|
let s = e[o];
|
|
887
|
-
_t(s, t, n, r, i) &&
|
|
888
|
+
_t(s, t, n, r, i) && Gt(l, s);
|
|
888
889
|
}
|
|
889
890
|
return l;
|
|
890
891
|
}
|
|
@@ -917,13 +918,13 @@ var gobjJs = function(e) {
|
|
|
917
918
|
Kt(o) > 0 && (Ot(`${Ne(e)}: ${Kt(o)} subscription(s) REPEATED, will be deleted and override`), Rt(o, "subscription REPEATED"), gt(e, o, !1));
|
|
918
919
|
let s = function(e, t, n, r) {
|
|
919
920
|
let i = P(e, st);
|
|
920
|
-
|
|
921
|
+
Ft(i, "event", t), Ft(i, "subscriber", r), Ft(i, "publisher", e);
|
|
921
922
|
let l = 0;
|
|
922
923
|
if (n) {
|
|
923
924
|
let t = gn(e, n, "__config__", null), r = gn(e, n, "__global__", null), o = gn(e, n, "__local__", null), s = dn(e, n, "__filter__", null), _ = cn(e, n, "__service__", "");
|
|
924
|
-
if (Yt(r) > 0 &&
|
|
925
|
+
if (Yt(r) > 0 && Ft(i, "__global__", kt(r)), Yt(t) > 0) {
|
|
925
926
|
let n = kt(t);
|
|
926
|
-
if (
|
|
927
|
+
if (Ft(i, "__config__", n), on(n, "__hard_subscription__")) {
|
|
927
928
|
let t = an(e, n, "__hard_subscription__", !1);
|
|
928
929
|
Ut(n, "__hard_subscription__"), t && (l |= ot.__hard_subscription__);
|
|
929
930
|
}
|
|
@@ -932,11 +933,11 @@ var gobjJs = function(e) {
|
|
|
932
933
|
Ut(n, "__own_event__"), t && (l |= ot.__own_event__);
|
|
933
934
|
}
|
|
934
935
|
}
|
|
935
|
-
Yt(o) > 0 &&
|
|
936
|
+
Yt(o) > 0 && Ft(i, "__local__", kt(o)), Yt(s) > 0 && Ft(i, "__filter__", kt(s)), Zt(_) || Ft(i, "__service__", _);
|
|
936
937
|
}
|
|
937
|
-
return
|
|
938
|
+
return Ft(i, "subs_flag", l), i;
|
|
938
939
|
}(e, t, r, i);
|
|
939
|
-
return s ? (
|
|
940
|
+
return s ? (Gt(e.dl_subscriptions, s), Gt(i.dl_subscribings, s), p && Be(p, "trace_subscriptions") && (L(n("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", t || "", Ne(e), Ne(i))), r && Rt(r)), e.gclass.gmt.mt_subscription_added && e.gclass.gmt.mt_subscription_added(e, s) < 0 && (ct(e, s, !0, !0), s = 0), s) : (Ot(`${Ne(e)}: _create_subscription() FAILED`), 0);
|
|
940
941
|
}
|
|
941
942
|
function gt(e, t, n) {
|
|
942
943
|
let r = [...t];
|
|
@@ -977,7 +978,7 @@ var gobjJs = function(e) {
|
|
|
977
978
|
if (0 === d) continue;
|
|
978
979
|
let b = nt(u, t, !0);
|
|
979
980
|
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !rt(u, b.event_name, 0)) continue;
|
|
980
|
-
o && ln(g, o), i &&
|
|
981
|
+
o && ln(g, o), i && At(g, i), l && (L(n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", Ne(u), tt(u), t || "", e && !e.running ? "!!" : "", Ne(e))), Rt(g));
|
|
981
982
|
let p = lt(u, t, g, e);
|
|
982
983
|
if (p < 0 && c & ot.__own_event__) {
|
|
983
984
|
s = -1;
|
|
@@ -1006,9 +1007,9 @@ var gobjJs = function(e) {
|
|
|
1006
1007
|
JSON_TRUE: 6,
|
|
1007
1008
|
JSON_FALSE: 7,
|
|
1008
1009
|
JSON_NULL: 8
|
|
1009
|
-
}), "undefined" != typeof window ? window.console : console),
|
|
1010
|
+
}), "undefined" != typeof window ? window.console : console), Et = ht.error, Tt = ht.warn, yt = ht.info, vt = ht.debug;
|
|
1010
1011
|
function jt(e) {
|
|
1011
|
-
e ? (
|
|
1012
|
+
e ? (Et = e, Tt = e) : (Et = ht.error, Tt = ht.warn);
|
|
1012
1013
|
}
|
|
1013
1014
|
function St(e) {
|
|
1014
1015
|
const t = Array.prototype.slice.call(arguments);
|
|
@@ -1033,19 +1034,19 @@ var gobjJs = function(e) {
|
|
|
1033
1034
|
return n;
|
|
1034
1035
|
}
|
|
1035
1036
|
function Ot(e) {
|
|
1036
|
-
let t = St(e), n =
|
|
1037
|
-
|
|
1037
|
+
let t = St(e), n = Gn();
|
|
1038
|
+
Et && (Et === window.console.error ? Et("%c" + n + " ERROR: " + String(t), "color:red") : (window.console.error("%c" + n + " ERROR: " + String(t), "color:red"), Et(`${n} ERROR: ${String(t)}`)));
|
|
1038
1039
|
}
|
|
1039
1040
|
function Nt(e) {
|
|
1040
|
-
let t = St(e), n =
|
|
1041
|
-
|
|
1041
|
+
let t = St(e), n = Gn();
|
|
1042
|
+
Tt && (Tt === window.console.warn ? Tt("%c" + n + " WARNING: " + String(t), "color:yellow") : (window.console.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Tt(`${n} WARNING: ${String(t)}`)));
|
|
1042
1043
|
}
|
|
1043
1044
|
function wt(e) {
|
|
1044
|
-
let t = St(e), n =
|
|
1045
|
+
let t = St(e), n = Gn();
|
|
1045
1046
|
vt && vt("%c" + n + " DEBUG: " + String(t), "color:silver");
|
|
1046
1047
|
}
|
|
1047
1048
|
function Dt(e) {
|
|
1048
|
-
let t = St(e), n =
|
|
1049
|
+
let t = St(e), n = Gn();
|
|
1049
1050
|
vt && vt("%c" + n + " MSG: " + String(t), "color:cyan");
|
|
1050
1051
|
}
|
|
1051
1052
|
function Rt(e, t) {
|
|
@@ -1075,12 +1076,12 @@ var gobjJs = function(e) {
|
|
|
1075
1076
|
}
|
|
1076
1077
|
return e === t;
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
+
function At(e, t) {
|
|
1079
1080
|
if (!t) return e;
|
|
1080
1081
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1081
1082
|
return e;
|
|
1082
1083
|
}
|
|
1083
|
-
function
|
|
1084
|
+
function It(e, t) {
|
|
1084
1085
|
if (!t) return e;
|
|
1085
1086
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1086
1087
|
return e;
|
|
@@ -1099,10 +1100,10 @@ var gobjJs = function(e) {
|
|
|
1099
1100
|
function Ct(e, t, n) {
|
|
1100
1101
|
e[t] = n;
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function Ft(e, t, n) {
|
|
1103
1104
|
e[t] = n;
|
|
1104
1105
|
}
|
|
1105
|
-
function
|
|
1106
|
+
function Gt(e, t) {
|
|
1106
1107
|
e.push(t);
|
|
1107
1108
|
}
|
|
1108
1109
|
function Vt(e, t) {
|
|
@@ -1135,10 +1136,10 @@ var gobjJs = function(e) {
|
|
|
1135
1136
|
function Qt(e) {
|
|
1136
1137
|
return "boolean" == typeof e;
|
|
1137
1138
|
}
|
|
1138
|
-
function
|
|
1139
|
+
function qt(e) {
|
|
1139
1140
|
return null == e;
|
|
1140
1141
|
}
|
|
1141
|
-
function
|
|
1142
|
+
function Ht(e) {
|
|
1142
1143
|
return "function" == typeof e;
|
|
1143
1144
|
}
|
|
1144
1145
|
function Xt(e) {
|
|
@@ -1321,7 +1322,7 @@ var gobjJs = function(e) {
|
|
|
1321
1322
|
function hn(e, t) {
|
|
1322
1323
|
return 0 === Yt(t) || mn(e, t, "");
|
|
1323
1324
|
}
|
|
1324
|
-
function
|
|
1325
|
+
function En(e, t, n, r) {
|
|
1325
1326
|
e && !Xt(e) && Ot("GObj bad instanceof");
|
|
1326
1327
|
let i = {};
|
|
1327
1328
|
if (Jt(n) && !Zt(n)) {
|
|
@@ -1337,9 +1338,9 @@ var gobjJs = function(e) {
|
|
|
1337
1338
|
}
|
|
1338
1339
|
return i;
|
|
1339
1340
|
}
|
|
1340
|
-
function
|
|
1341
|
+
function Tn(e, t, n, r) {
|
|
1341
1342
|
let i = {};
|
|
1342
|
-
if (
|
|
1343
|
+
if (At(i, t), Jt(n) && !Zt(n)) {
|
|
1343
1344
|
let l = n;
|
|
1344
1345
|
dn(e, t, l, 0, 0) ? Ut(i, l) : r && Ot(`${Ne(e)}: key not found: ${l}`);
|
|
1345
1346
|
} else if (xt(n) && Mt(n) > 0) for (let l of Object.keys(n)) t.hasOwnProperty(l) ? Ut(i, l) : r && Ot(`${Ne(e)}: key not found: ${l}`);
|
|
@@ -1377,7 +1378,7 @@ var gobjJs = function(e) {
|
|
|
1377
1378
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
1378
1379
|
}
|
|
1379
1380
|
function Sn(e, t) {
|
|
1380
|
-
if (
|
|
1381
|
+
if (qt(e) || qt(t)) return !0;
|
|
1381
1382
|
if (Bt(e)) {
|
|
1382
1383
|
if (0 === e.length) return !0;
|
|
1383
1384
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
@@ -1455,10 +1456,10 @@ var gobjJs = function(e) {
|
|
|
1455
1456
|
let i = Dn(t, n);
|
|
1456
1457
|
return i ? 0 === i.length ? (r && Ot(`stack empty: ${n}`), null) : i[0] : (r && Ot(`stack NOT FOUND: ${n}`), null);
|
|
1457
1458
|
}
|
|
1458
|
-
function
|
|
1459
|
+
function An(e, t, n) {
|
|
1459
1460
|
return Zt(n) ? _n(e, t, "__md_iev__`__msg_type__") : pn(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
1460
1461
|
}
|
|
1461
|
-
function
|
|
1462
|
+
function In(e, t) {
|
|
1462
1463
|
return cn(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
1463
1464
|
}
|
|
1464
1465
|
function Ln(e, t, n) {
|
|
@@ -1524,11 +1525,11 @@ var gobjJs = function(e) {
|
|
|
1524
1525
|
function Cn(e) {
|
|
1525
1526
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1526
1527
|
}
|
|
1527
|
-
function
|
|
1528
|
+
function Fn(e) {
|
|
1528
1529
|
const t = document.createElement("template");
|
|
1529
1530
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
1530
1531
|
}
|
|
1531
|
-
function
|
|
1532
|
+
function Gn() {
|
|
1532
1533
|
const e = /* @__PURE__ */ new Date(), t = e.toISOString().slice(0, 19), n = String(e.getMilliseconds()).padStart(3, "0"), r = e.getTimezoneOffset();
|
|
1533
1534
|
return `${t}.${n}${r > 0 ? "-" : "+"}${String(Math.abs(r) / 60).padStart(2, "0")}${String(Math.abs(r) % 60).padStart(2, "0")}`;
|
|
1534
1535
|
}
|
|
@@ -1668,15 +1669,15 @@ var gobjJs = function(e) {
|
|
|
1668
1669
|
return t;
|
|
1669
1670
|
}
|
|
1670
1671
|
var Qn = [
|
|
1671
|
-
j(
|
|
1672
|
-
j(
|
|
1673
|
-
j(
|
|
1672
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
1673
|
+
j(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
1674
|
+
j(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
1674
1675
|
v()
|
|
1675
|
-
],
|
|
1676
|
+
], qn = {
|
|
1676
1677
|
periodic: !1,
|
|
1677
1678
|
msec: 0,
|
|
1678
1679
|
timer_id: -1
|
|
1679
|
-
},
|
|
1680
|
+
}, Hn = null;
|
|
1680
1681
|
function Xn(e, t, n, r) {
|
|
1681
1682
|
let i = e.priv, l = i.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
1682
1683
|
return ke(e) ? lt(De(e), l, {}, e) : pt(e, l, {}), i.periodic && (i.timer_id = setTimeout(function() {
|
|
@@ -1709,39 +1710,39 @@ var gobjJs = function(e) {
|
|
|
1709
1710
|
mt_destroy: function(e) {}
|
|
1710
1711
|
};
|
|
1711
1712
|
function er(e, t) {
|
|
1712
|
-
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (
|
|
1713
|
+
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (He(e, "periodic", !1), void Xe(e, "msec", t)) : (Ot("not GObj TYPE"), -1);
|
|
1713
1714
|
}
|
|
1714
1715
|
function tr(e, t) {
|
|
1715
|
-
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (
|
|
1716
|
+
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (He(e, "periodic", !0), void Xe(e, "msec", t)) : (Ot("not GObj TYPE"), -1);
|
|
1716
1717
|
}
|
|
1717
1718
|
function nr(e) {
|
|
1718
1719
|
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : void Xe(e, "msec", -1) : (Ot("not GObj TYPE"), -1);
|
|
1719
1720
|
}
|
|
1720
1721
|
var rr = [
|
|
1721
|
-
j(
|
|
1722
|
-
j(
|
|
1723
|
-
j(
|
|
1724
|
-
j(
|
|
1725
|
-
j(
|
|
1726
|
-
j(
|
|
1727
|
-
j(
|
|
1728
|
-
j(
|
|
1729
|
-
j(
|
|
1730
|
-
j(
|
|
1731
|
-
j(
|
|
1732
|
-
j(
|
|
1733
|
-
j(
|
|
1734
|
-
j(
|
|
1735
|
-
j(
|
|
1736
|
-
j(
|
|
1737
|
-
j(
|
|
1738
|
-
j(
|
|
1739
|
-
j(
|
|
1740
|
-
j(
|
|
1741
|
-
j(
|
|
1742
|
-
j(
|
|
1743
|
-
j(
|
|
1744
|
-
j(
|
|
1722
|
+
j(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
1723
|
+
j(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
1724
|
+
j(E.DTP_STRING, "__username__", 0, "", "Username"),
|
|
1725
|
+
j(E.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
|
|
1726
|
+
j(E.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
|
|
1727
|
+
j(E.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
|
|
1728
|
+
j(E.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
|
|
1729
|
+
j(E.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
|
|
1730
|
+
j(E.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
|
|
1731
|
+
j(E.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
|
|
1732
|
+
j(E.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
|
|
1733
|
+
j(E.DTP_STRING, "yuneta_version", 0, o, "Yuneta version"),
|
|
1734
|
+
j(E.DTP_LIST, "required_services", 0, "[]", "Required services"),
|
|
1735
|
+
j(E.DTP_INTEGER, "tracing", 0, 0, "Tracing level"),
|
|
1736
|
+
j(E.DTP_BOOLEAN, "trace_timer", 0, 0, "Trace timers"),
|
|
1737
|
+
j(E.DTP_BOOLEAN, "trace_inter_event", 0, 0, "Trace traffic"),
|
|
1738
|
+
j(E.DTP_POINTER, "trace_ievent_callback", 0, null, "Trace traffic callback"),
|
|
1739
|
+
j(E.DTP_BOOLEAN, "trace_creation", 0, 0, "Trace creation"),
|
|
1740
|
+
j(E.DTP_BOOLEAN, "trace_start_stop", 0, 0, "Trace start/stop"),
|
|
1741
|
+
j(E.DTP_BOOLEAN, "trace_subscriptions", 0, 0, "Trace subscription"),
|
|
1742
|
+
j(E.DTP_BOOLEAN, "trace_i18n", 0, 0, "Trace i18n"),
|
|
1743
|
+
j(E.DTP_BOOLEAN, "no_poll", 0, 0, "no poll"),
|
|
1744
|
+
j(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
1745
|
+
j(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
1745
1746
|
v()
|
|
1746
1747
|
], ir = { gobj_timer: null }, lr = null;
|
|
1747
1748
|
function or(e, t, n, r) {
|
|
@@ -1750,7 +1751,7 @@ var gobjJs = function(e) {
|
|
|
1750
1751
|
var sr = {
|
|
1751
1752
|
mt_create: function(e) {
|
|
1752
1753
|
let t = e.priv;
|
|
1753
|
-
Ze(e, "start_date",
|
|
1754
|
+
Ze(e, "start_date", Gn()), Ze(e, "node_uuid", Wn()), e.priv.gobj_timer = oe(Se(e), "C_TIMER", {}, e), t.periodic_timeout = Ye(e, "periodic_timeout");
|
|
1754
1755
|
},
|
|
1755
1756
|
mt_writing: function(e, t) {},
|
|
1756
1757
|
mt_start: function(e) {
|
|
@@ -1762,26 +1763,26 @@ var gobjJs = function(e) {
|
|
|
1762
1763
|
mt_destroy: function(e) {},
|
|
1763
1764
|
mt_play: function(e) {
|
|
1764
1765
|
let t = X();
|
|
1765
|
-
return pe(t) || _e(t),
|
|
1766
|
+
return pe(t) || _e(t), Ee(t) || de(t), 0;
|
|
1766
1767
|
},
|
|
1767
1768
|
mt_pause: function(e) {
|
|
1768
1769
|
return be(X()), 0;
|
|
1769
1770
|
}
|
|
1770
1771
|
};
|
|
1771
1772
|
var _r = "ievent_gate_stack", ar = [
|
|
1772
|
-
j(
|
|
1773
|
-
j(
|
|
1774
|
-
j(
|
|
1775
|
-
j(
|
|
1776
|
-
j(
|
|
1777
|
-
j(
|
|
1778
|
-
j(
|
|
1779
|
-
j(
|
|
1780
|
-
j(
|
|
1781
|
-
j(
|
|
1782
|
-
j(
|
|
1783
|
-
j(
|
|
1784
|
-
j(
|
|
1773
|
+
j(E.DTP_STRING, "wanted_yuno_role", T.SDF_RD, "", "wanted yuno role"),
|
|
1774
|
+
j(E.DTP_STRING, "wanted_yuno_name", T.SDF_RD, "", "wanted yuno name"),
|
|
1775
|
+
j(E.DTP_STRING, "wanted_yuno_service", T.SDF_RD, "", "wanted yuno service"),
|
|
1776
|
+
j(E.DTP_STRING, "remote_yuno_role", T.SDF_RD, "", "confirmed remote yuno role"),
|
|
1777
|
+
j(E.DTP_STRING, "remote_yuno_name", T.SDF_RD, "", "confirmed remote yuno name"),
|
|
1778
|
+
j(E.DTP_STRING, "remote_yuno_service", T.SDF_RD, "", "confirmed remote yuno service"),
|
|
1779
|
+
j(E.DTP_STRING, "url", T.SDF_RD, "", "Url to connect"),
|
|
1780
|
+
j(E.DTP_STRING, "jwt", T.SDF_PERSIST, "", "JWT"),
|
|
1781
|
+
j(E.DTP_STRING, "cert_pem", T.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
1782
|
+
j(E.DTP_JSON, "extra_info", T.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
1783
|
+
j(E.DTP_INTEGER, "timeout_retry", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1784
|
+
j(E.DTP_INTEGER, "timeout_idack", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1785
|
+
j(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
1785
1786
|
v()
|
|
1786
1787
|
], ur = {
|
|
1787
1788
|
url: null,
|
|
@@ -1811,7 +1812,7 @@ var gobjJs = function(e) {
|
|
|
1811
1812
|
data: n.data
|
|
1812
1813
|
}, e);
|
|
1813
1814
|
}, n.onclose = (n) => {
|
|
1814
|
-
Be(
|
|
1815
|
+
Be(Te(), "browser_beforeunload") ? Nt("Close websocket by unload page") : lt(e, "EV_ON_CLOSE", {
|
|
1815
1816
|
url: t,
|
|
1816
1817
|
e: n
|
|
1817
1818
|
}, e);
|
|
@@ -1829,7 +1830,7 @@ var gobjJs = function(e) {
|
|
|
1829
1830
|
} else Nt("WebSocket is already closed or in the process of closing.");
|
|
1830
1831
|
}
|
|
1831
1832
|
function dr(e, t, n) {
|
|
1832
|
-
let r =
|
|
1833
|
+
let r = Gn();
|
|
1833
1834
|
try {
|
|
1834
1835
|
wt("\n" + r + " " + t + "\n"), Rt(n);
|
|
1835
1836
|
} catch (e) {
|
|
@@ -1844,8 +1845,8 @@ var gobjJs = function(e) {
|
|
|
1844
1845
|
function pr(e, t, n, r) {
|
|
1845
1846
|
return function(e, t) {
|
|
1846
1847
|
let n = e.priv, r = JSON.stringify(t);
|
|
1847
|
-
if (Be(
|
|
1848
|
-
let n = ze(e, "url"), i = Se(
|
|
1848
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1849
|
+
let n = ze(e, "url"), i = Se(Te()) + " ==> " + n, l = Ye(Te(), "trace_ievent_callback");
|
|
1849
1850
|
l ? l(i, t, 1, r.length) : dr(0, i, t);
|
|
1850
1851
|
}
|
|
1851
1852
|
try {
|
|
@@ -1870,7 +1871,7 @@ var gobjJs = function(e) {
|
|
|
1870
1871
|
};
|
|
1871
1872
|
}
|
|
1872
1873
|
function hr(e) {
|
|
1873
|
-
let t = e.priv, n = Te(
|
|
1874
|
+
let t = e.priv, n = Ee(Te()), r = ze(Te(), "yuno_version"), i = ze(Te(), "yuno_release"), l = ze(Te(), "yuno_tag"), s = {
|
|
1874
1875
|
yuno_role: ve(),
|
|
1875
1876
|
yuno_id: je(),
|
|
1876
1877
|
yuno_name: ye(),
|
|
@@ -1882,22 +1883,22 @@ var gobjJs = function(e) {
|
|
|
1882
1883
|
pid: 0,
|
|
1883
1884
|
watcher_pid: 0,
|
|
1884
1885
|
jwt: ze(e, "jwt"),
|
|
1885
|
-
username: ze(
|
|
1886
|
+
username: ze(Te(), "__username__"),
|
|
1886
1887
|
launch_id: 0,
|
|
1887
|
-
yuno_startdate: ze(
|
|
1888
|
+
yuno_startdate: ze(Te(), "start_date"),
|
|
1888
1889
|
id: Wn(),
|
|
1889
1890
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
1890
1891
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
1891
|
-
required_services: Ye(
|
|
1892
|
+
required_services: Ye(Te(), "required_services")
|
|
1892
1893
|
};
|
|
1893
|
-
return kn(e, s, _r, mr(e, Se(De(e)), null)),
|
|
1894
|
+
return kn(e, s, _r, mr(e, Se(De(e)), null)), An(e, s, "__identity__"), er(t.gobj_timer, Je(e, "timeout_idack")), pr(e, "EV_IDENTITY_CARD", s);
|
|
1894
1895
|
}
|
|
1895
|
-
function
|
|
1896
|
+
function Er(e, t) {
|
|
1896
1897
|
if (Zt(t.event)) return -1;
|
|
1897
1898
|
let n = {}, r = t.__global__, i = t.__config__, l = t.__filter__, o = t.__service__, s = t.subscriber;
|
|
1898
|
-
return i && (n.__config__ = i), r && (n.__global__ = r), l && (n.__filter__ = l), kn(e, n, _r, mr(e, Se(s), o)),
|
|
1899
|
+
return i && (n.__config__ = i), r && (n.__global__ = r), l && (n.__filter__ = l), kn(e, n, _r, mr(e, Se(s), o)), An(e, n, "__subscribing__"), pr(e, t.event, n);
|
|
1899
1900
|
}
|
|
1900
|
-
function
|
|
1901
|
+
function Tr(e, t, n, r) {
|
|
1901
1902
|
let i = e.priv;
|
|
1902
1903
|
return pe(e) && (i.websocket = fr(e)), 0;
|
|
1903
1904
|
}
|
|
@@ -1906,11 +1907,19 @@ var gobjJs = function(e) {
|
|
|
1906
1907
|
}
|
|
1907
1908
|
function vr(e, t, n, r) {
|
|
1908
1909
|
let i = e.priv, l = n.e, o = n.url;
|
|
1909
|
-
return jt(), Nt(`${Ne(e)}: WebSocket closed ${o} (Code: ${l.code}, Reason: "${l.reason}", Clean: ${l.wasClean})`), i.websocket && (i.websocket.onopen = null, i.websocket.onmessage = null, i.websocket.onerror = null, i.websocket.onclose = null, i.websocket = null), i.inform_on_close
|
|
1910
|
+
return jt(), Nt(`${Ne(e)}: WebSocket closed ${o} (Code: ${l.code}, Reason: "${l.reason}", Clean: ${l.wasClean})`), i.websocket && (i.websocket.onopen = null, i.websocket.onmessage = null, i.websocket.onerror = null, i.websocket.onclose = null, i.websocket = null), i.inform_on_close ? (i.inform_on_close = !1, pt(e, "EV_ON_CLOSE", {
|
|
1910
1911
|
url: o,
|
|
1911
1912
|
remote_yuno_name: i.remote_yuno_name,
|
|
1912
1913
|
remote_yuno_role: i.remote_yuno_role,
|
|
1913
1914
|
remote_yuno_service: i.remote_yuno_service
|
|
1915
|
+
})) : (Nt(`${Ne(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${l.code}, Reason: "${l.reason}", Clean: ${l.wasClean})`), pt(e, "EV_ON_OPEN_ERROR", {
|
|
1916
|
+
url: o,
|
|
1917
|
+
remote_yuno_name: i.remote_yuno_name,
|
|
1918
|
+
remote_yuno_role: i.remote_yuno_role,
|
|
1919
|
+
remote_yuno_service: i.remote_yuno_service,
|
|
1920
|
+
code: l.code,
|
|
1921
|
+
reason: l.reason,
|
|
1922
|
+
was_clean: l.wasClean
|
|
1914
1923
|
})), pe(e) && er(i.gobj_timer, Je(e, "timeout_retry")), 0;
|
|
1915
1924
|
}
|
|
1916
1925
|
function jr(e, t, n, r) {
|
|
@@ -1948,7 +1957,7 @@ var gobjJs = function(e) {
|
|
|
1948
1957
|
}
|
|
1949
1958
|
i.inside_on_open = !1, function(e) {
|
|
1950
1959
|
let t = dt(e, null, null, null);
|
|
1951
|
-
for (let n = 0; n < t.length; n++)
|
|
1960
|
+
for (let n = 0; n < t.length; n++) Er(e, t[n]);
|
|
1952
1961
|
}(e);
|
|
1953
1962
|
}
|
|
1954
1963
|
return 0;
|
|
@@ -1971,8 +1980,8 @@ var gobjJs = function(e) {
|
|
|
1971
1980
|
kw: i || {}
|
|
1972
1981
|
} : (Ot("parsing inter_event: kw not a json object"), null) : (Ot("parsing inter_kw: no kw"), null);
|
|
1973
1982
|
}(0, n.data);
|
|
1974
|
-
if (Be(
|
|
1975
|
-
let e = Se(
|
|
1983
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1984
|
+
let e = Se(Te()) + " <== " + i, t = n.data.length, r = Ye(Te(), "trace_ievent_callback");
|
|
1976
1985
|
r ? r(e, l, 2, t) : dr(0, e, l);
|
|
1977
1986
|
}
|
|
1978
1987
|
let o = l.event, s = l.kw;
|
|
@@ -1983,7 +1992,7 @@ var gobjJs = function(e) {
|
|
|
1983
1992
|
return gr(e), -1;
|
|
1984
1993
|
}
|
|
1985
1994
|
l = null;
|
|
1986
|
-
let _ =
|
|
1995
|
+
let _ = In(e, s), a = $n(e, s, _r), u = cn(e, a, "dst_role", "");
|
|
1987
1996
|
if (u !== ve()) return Ot(`"It's not my role, dst_role: ${u}, my_role: ${ve()}`), 0;
|
|
1988
1997
|
let c = cn(e, a, "dst_service", "");
|
|
1989
1998
|
if ("__subscribing__" === _) return -1;
|
|
@@ -2040,7 +2049,7 @@ var gobjJs = function(e) {
|
|
|
2040
2049
|
return l || (l = {}), kn(e, n, "stats_stack", {
|
|
2041
2050
|
stats: t,
|
|
2042
2051
|
kw: l
|
|
2043
|
-
}), kn(e, n, _r, i), n.__stats__ = t,
|
|
2052
|
+
}), kn(e, n, _r, i), n.__stats__ = t, An(e, n, "__stats__"), pr(e, "EV_MT_STATS", n, r), null;
|
|
2044
2053
|
},
|
|
2045
2054
|
mt_command_parser: function(e, t, n, r) {
|
|
2046
2055
|
if ("ST_SESSION" !== tt(e)) return Ot("Not in session"), null;
|
|
@@ -2049,7 +2058,7 @@ var gobjJs = function(e) {
|
|
|
2049
2058
|
return l || (l = {}), kn(e, n, "command_stack", {
|
|
2050
2059
|
command: t,
|
|
2051
2060
|
kw: l
|
|
2052
|
-
}), kn(e, n, _r, i), n.__command__ = t,
|
|
2061
|
+
}), kn(e, n, _r, i), n.__command__ = t, An(e, n, "__command__"), pr(e, "EV_MT_COMMAND", n, r), null;
|
|
2053
2062
|
},
|
|
2054
2063
|
mt_inject_event: function(e, t, n, r) {
|
|
2055
2064
|
if ("ST_SESSION" !== tt(e)) return window.console.error("Not in session"), -1;
|
|
@@ -2058,11 +2067,11 @@ var gobjJs = function(e) {
|
|
|
2058
2067
|
let i = mr(e, Se(r), cn(e, n, "__service__", 0, 0));
|
|
2059
2068
|
Ut(n, "__service__"), kn(e, n, "__message__", t), kn(e, n, _r, i);
|
|
2060
2069
|
}
|
|
2061
|
-
return
|
|
2070
|
+
return An(e, n, "__message__"), pr(e, t, n, r);
|
|
2062
2071
|
},
|
|
2063
2072
|
mt_subscription_added: function(e, t) {
|
|
2064
2073
|
let n = e.priv;
|
|
2065
|
-
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 :
|
|
2074
|
+
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 : Er(e, t);
|
|
2066
2075
|
},
|
|
2067
2076
|
mt_subscription_deleted: function(e, t) {
|
|
2068
2077
|
let n = e.priv;
|
|
@@ -2070,7 +2079,7 @@ var gobjJs = function(e) {
|
|
|
2070
2079
|
if (n.inside_on_open) return 0;
|
|
2071
2080
|
if (Zt(t.event)) return 0;
|
|
2072
2081
|
let r = {}, i = t.__global__, l = t.__config__, o = t.__filter__, s = t.__service__, _ = t.subscriber;
|
|
2073
|
-
return l && (r.__config__ = l), i && (r.__global__ = i), o && (r.__filter__ = o), kn(e, r, _r, mr(e, Se(_), s)),
|
|
2082
|
+
return l && (r.__config__ = l), i && (r.__global__ = i), o && (r.__filter__ = o), kn(e, r, _r, mr(e, Se(_), s)), An(e, r, "__unsubscribing__"), pr(e, t.event, r, e);
|
|
2074
2083
|
}
|
|
2075
2084
|
};
|
|
2076
2085
|
return e.GObj = O, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, i, l) => new y(e, t, n, null, l, r, null, 0, null, i, null), e.SDATACM = (e, t, n, r, i, l) => new y(e, t, 0, null, l, n, null, 0, i, r, null), e.SDATACM2 = (e, t, n, r, i, l, o) => new y(e, t, n, null, o, r, null, 0, l, i, null), e.SDATADF = (e, t, n, r, i, l) => new y(e, t, n, null, l, null, r, i), e.SDATAPM = (e, t, n, r, i) => new y(e, t, n, r, i), e.SDATAPM0 = (e, t, n, r, i) => new y(e, t, n, null, i, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = y, e.YUNETA_VERSION = o, Object.defineProperty(e, "__yuno__", {
|
|
@@ -2092,8 +2101,8 @@ var gobjJs = function(e) {
|
|
|
2092
2101
|
let t = "";
|
|
2093
2102
|
for (const n of Object.keys(i[e])) t += `${n}: ${i[e][n]};`;
|
|
2094
2103
|
s.style.cssText = t;
|
|
2095
|
-
} else "style" === e ? s.style.cssText = i[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? (_ = i[e], s.setAttribute("data-i18n", _)) : s.setAttribute(e, i[e]);
|
|
2096
|
-
if (Jt(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) s.appendChild(
|
|
2104
|
+
} else "style" === e ? s.style.cssText = i[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== i[e] && void 0 !== i[e] && (_ = i[e], s.setAttribute("data-i18n", _)) : s.setAttribute(e, i[e]);
|
|
2105
|
+
if (Jt(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) s.appendChild(Fn(l));
|
|
2097
2106
|
else if (n && _) s.textContent = n(_) || l;
|
|
2098
2107
|
else s.textContent = l;
|
|
2099
2108
|
else if (Bt(l)) {
|
|
@@ -2102,28 +2111,28 @@ var gobjJs = function(e) {
|
|
|
2102
2111
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? s.appendChild(l) : null != l && (Ot("content ignored"), Rt(l));
|
|
2103
2112
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) s.addEventListener(e, o[e]);
|
|
2104
2113
|
return s;
|
|
2105
|
-
}, e.createOneHtml =
|
|
2114
|
+
}, e.createOneHtml = Fn, e.create_json_record = function(e, t) {
|
|
2106
2115
|
let n = kt(e);
|
|
2107
|
-
return
|
|
2116
|
+
return It(n, t), n;
|
|
2108
2117
|
}, e.create_template_record = function(e, t) {
|
|
2109
2118
|
let n = {};
|
|
2110
2119
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2111
2120
|
n[e] = dn(null, t, e, dn(r, "default"));
|
|
2112
2121
|
}), n;
|
|
2113
|
-
}, e.current_timestamp =
|
|
2122
|
+
}, e.current_timestamp = Gn, e.data_type_t = E, e.db_list_persistent_attrs = function(e, t) {
|
|
2114
2123
|
let n = yn(Kn(e), null, !1), r = {};
|
|
2115
|
-
return n && xt(n) && (r =
|
|
2124
|
+
return n && xt(n) && (r = En(e, n, t, !1)), r;
|
|
2116
2125
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2117
|
-
let n = xe(e,
|
|
2126
|
+
let n = xe(e, T.SDF_PERSIST), r = yn(Kn(e), null, !1);
|
|
2118
2127
|
if (r && xt(r)) {
|
|
2119
|
-
let i =
|
|
2120
|
-
i =
|
|
2128
|
+
let i = En(e, r, t, !1);
|
|
2129
|
+
i = En(e, i, n, !1), qe(e, i, T.SDF_PERSIST);
|
|
2121
2130
|
}
|
|
2122
2131
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2123
|
-
let n =
|
|
2132
|
+
let n = Tn(e, yn(Kn(e), null, !1), t, !1);
|
|
2124
2133
|
0 === Mt(n) ? jn(Kn(e)) : vn(Kn(e), n);
|
|
2125
2134
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2126
|
-
let n =
|
|
2135
|
+
let n = En(e, xe(e, T.SDF_PERSIST), t, !1), r = yn(Kn(e), null, !1);
|
|
2127
2136
|
r && xt(r) && Lt(n, r), vn(Kn(e), n);
|
|
2128
2137
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2129
2138
|
let r = null, i = null, l = null;
|
|
@@ -2149,7 +2158,7 @@ var gobjJs = function(e) {
|
|
|
2149
2158
|
Object.assign(t, e);
|
|
2150
2159
|
}
|
|
2151
2160
|
return t;
|
|
2152
|
-
}, e.empty_string = Zt, e.escapeHtml = Cn, e.event_flag_t = R, e.gclass_add_ev_action = B, e.gclass_add_event_type = z, e.gclass_add_state = x, e.gclass_check_fsm =
|
|
2161
|
+
}, e.empty_string = Zt, e.escapeHtml = Cn, e.event_flag_t = R, e.gclass_add_ev_action = B, e.gclass_add_event_type = z, e.gclass_add_state = x, e.gclass_check_fsm = q, e.gclass_create = W, e.gclass_event_type = Q, e.gclass_find_by_name = H, e.gclass_flag_t = N, e.gclass_unregister = M, e.getPositionRelativeToBody = function(e) {
|
|
2153
2162
|
if (!e) return {
|
|
2154
2163
|
top: 0,
|
|
2155
2164
|
left: 0,
|
|
@@ -2170,7 +2179,7 @@ var gobjJs = function(e) {
|
|
|
2170
2179
|
};
|
|
2171
2180
|
}, e.get_function_name = Mn, e.get_now = function() {
|
|
2172
2181
|
return Math.floor(Date.now() / 1e3);
|
|
2173
|
-
}, e.gobj_bottom_gobj =
|
|
2182
|
+
}, e.gobj_bottom_gobj = Ae, e.gobj_change_parent = function(e, t) {
|
|
2174
2183
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), null) : t instanceof O ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (ne(e.parent, e), e.parent = null), te(t, e), t.mt_child_added && (p && Be(p, "trace_creation") && wt(n("👦👦🔵 child_added(%s): %s", we(t), Ne(e))), t.mt_child_added(t, e)), 0) : (Ot(`${Ne(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
2175
2184
|
}, e.gobj_change_state = et, e.gobj_command = function(e, t, r, l) {
|
|
2176
2185
|
if ($e(e)) return Ot("gobj NULL or DESTROYED"), -1;
|
|
@@ -2190,18 +2199,18 @@ var gobjJs = function(e) {
|
|
|
2190
2199
|
if (Zt(t)) return null;
|
|
2191
2200
|
const n = t.toLowerCase();
|
|
2192
2201
|
return "__default_service__" === n ? m : "__yuno__" === n || "__root__" === n ? p : Me(p, t);
|
|
2193
|
-
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata =
|
|
2202
|
+
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata = F, e.gobj_is_destroying = $e, e.gobj_is_playing = Ee, e.gobj_is_pure_child = ke, e.gobj_is_running = pe, e.gobj_is_service = he, e.gobj_is_volatil = Re, e.gobj_list_persistent_attrs = function(e, t) {
|
|
2194
2203
|
return u ? u(e, t) : null;
|
|
2195
2204
|
}, e.gobj_list_subscriptions = function(e) {
|
|
2196
2205
|
let t = dt(e, null, null, null);
|
|
2197
2206
|
for (let n = 0; n < t.length; n++) {
|
|
2198
2207
|
let r = t[n], i = fn(e, r, "publisher", null, mt.KW_REQUIRED), l = fn(e, r, "subscriber", null, mt.KW_REQUIRED);
|
|
2199
|
-
|
|
2208
|
+
Ft(r, "s_event", cn(e, r, "event", "", mt.KW_REQUIRED)), Ft(r, "s_publisher", Ne(i)), Ft(r, "s_subscriber", Ne(l));
|
|
2200
2209
|
}
|
|
2201
2210
|
let n = bt(e, 0, null, 0);
|
|
2202
2211
|
for (let t = 0; t < n.length; t++) {
|
|
2203
2212
|
let r = n[t], i = fn(e, r, "publisher", null, mt.KW_REQUIRED), l = fn(e, r, "subscriber", null, mt.KW_REQUIRED);
|
|
2204
|
-
|
|
2213
|
+
Ft(r, "s_event", cn(e, r, "event", "", mt.KW_REQUIRED)), Ft(r, "s_publisher", Ne(i)), Ft(r, "s_subscriber", Ne(l));
|
|
2205
2214
|
}
|
|
2206
2215
|
return {
|
|
2207
2216
|
subscriptions: t,
|
|
@@ -2249,14 +2258,14 @@ var gobjJs = function(e) {
|
|
|
2249
2258
|
}
|
|
2250
2259
|
}
|
|
2251
2260
|
return 0;
|
|
2252
|
-
}(e,
|
|
2261
|
+
}(e, T.SDF_VOLATIL, 0);
|
|
2253
2262
|
}, e.gobj_save_persistent_attrs = function(e, t) {
|
|
2254
2263
|
return he(e) ? _ ? _(e, t) : -1 : (Ot(`${Ne(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2255
2264
|
}, e.gobj_search_path = Me, e.gobj_send_event = lt, e.gobj_services = function() {
|
|
2256
2265
|
let e = [];
|
|
2257
2266
|
for (const t of Object.keys(b)) Vt(e, t);
|
|
2258
2267
|
return e;
|
|
2259
|
-
}, e.gobj_set_bottom_gobj =
|
|
2268
|
+
}, e.gobj_set_bottom_gobj = Ie, e.gobj_short_name = Ne, e.gobj_start = _e, e.gobj_start_children = function(e) {
|
|
2260
2269
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), -1) : Pe(e, k.WALK_FIRST2LAST, ae, 0, 0);
|
|
2261
2270
|
}, e.gobj_start_tree = function(e) {
|
|
2262
2271
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), -1) : (p && Be(p, "trace_start_stop") && L(n("⏺ ⏺ ⏺ ⏺ start_tree: %s", we(e))), e.gclass.gclass_flag & N.gcflag_manual_start || e.disabled ? 0 : (e.running || _e(e), Ue(e, k.WALK_TOP2BOTTOM, ue, 0, 0)));
|
|
@@ -2312,14 +2321,14 @@ var gobjJs = function(e) {
|
|
|
2312
2321
|
break;
|
|
2313
2322
|
}
|
|
2314
2323
|
return Ot(n("gobj_write_attr(%s): attr not found '%s'", Ne(e), l)), -1;
|
|
2315
|
-
}, e.gobj_write_attrs =
|
|
2324
|
+
}, e.gobj_write_attrs = qe, e.gobj_write_bool_attr = He, e.gobj_write_integer_attr = Xe, e.gobj_write_str_attr = Ze, e.gobj_yuno = Te, e.gobj_yuno_id = je, e.gobj_yuno_name = ye, e.gobj_yuno_role = ve, e.id_index_in_obj_list = Nn, e.index_in_list = Vn, e.is_array = Bt, e.is_boolean = Qt, e.is_date = function(e) {
|
|
2316
2325
|
return e instanceof Date && !isNaN(e);
|
|
2317
|
-
}, e.is_function =
|
|
2326
|
+
}, e.is_function = Ht, e.is_gobj = Xt, e.is_metadata_key = function(e) {
|
|
2318
2327
|
if (!Jt(e)) return !1;
|
|
2319
2328
|
let t;
|
|
2320
2329
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2321
2330
|
return 2 === t;
|
|
2322
|
-
}, e.is_null =
|
|
2331
|
+
}, e.is_null = qt, e.is_number = zt, e.is_object = xt, e.is_private_key = function(e) {
|
|
2323
2332
|
if (!Jt(e)) return !1;
|
|
2324
2333
|
let t;
|
|
2325
2334
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -2374,9 +2383,9 @@ var gobjJs = function(e) {
|
|
|
2374
2383
|
n ? Object.assign(n, r) : t.push(r);
|
|
2375
2384
|
}
|
|
2376
2385
|
return i;
|
|
2377
|
-
}, e.json_array_append =
|
|
2386
|
+
}, e.json_array_append = Gt, e.json_array_append_new = Vt, e.json_array_extend = function(e, t) {
|
|
2378
2387
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
2379
|
-
}, e.json_array_remove = Wt, e.json_array_size = Kt, e.json_deep_copy = kt, e.json_is_identical = $t, e.json_object_del = Ut, e.json_object_get = Pt, e.json_object_set = Ct, e.json_object_set_new =
|
|
2388
|
+
}, e.json_array_remove = Wt, e.json_array_size = Kt, e.json_deep_copy = kt, e.json_is_identical = $t, e.json_object_del = Ut, e.json_object_get = Pt, e.json_object_set = Ct, e.json_object_set_new = Ft, e.json_object_size = Mt, e.json_object_update = At, e.json_object_update_existing = It, e.json_object_update_missing = Lt, e.json_size = Yt, e.jwt2json = function(e, t) {
|
|
2380
2389
|
try {
|
|
2381
2390
|
let n = Un(e);
|
|
2382
2391
|
switch (t) {
|
|
@@ -2387,7 +2396,7 @@ var gobjJs = function(e) {
|
|
|
2387
2396
|
} catch (e) {
|
|
2388
2397
|
return null;
|
|
2389
2398
|
}
|
|
2390
|
-
}, e.jwtDecode = Un, e.kw_clone_by_keys =
|
|
2399
|
+
}, e.jwtDecode = Un, e.kw_clone_by_keys = En, e.kw_clone_by_not_keys = Tn, e.kw_collect = function(e, t, n, r) {
|
|
2391
2400
|
if (e && !Xt(e) && Ot("GObj bad instanceof"), !t) return null;
|
|
2392
2401
|
r || (r = hn);
|
|
2393
2402
|
let i = [];
|
|
@@ -2516,17 +2525,23 @@ var gobjJs = function(e) {
|
|
|
2516
2525
|
var e;
|
|
2517
2526
|
}, r.send();
|
|
2518
2527
|
}, e.log_debug = wt, e.log_error = Ot, e.log_info = function(e) {
|
|
2519
|
-
let t = St(e), n =
|
|
2528
|
+
let t = St(e), n = Gn();
|
|
2520
2529
|
yt && yt("%c" + n + " INFO: " + String(t), "color:cyan");
|
|
2521
|
-
}, e.log_warning = Nt, e.msg_iev_get_msg_type =
|
|
2530
|
+
}, e.log_warning = Nt, e.msg_iev_get_msg_type = In, e.msg_iev_get_stack = $n, e.msg_iev_push_stack = kn, e.msg_iev_read_key = Dn, e.msg_iev_set_msg_type = An, e.msg_iev_write_key = Rn, e.node_uuid = Wn, e.parseBoolean = en, e.parseSVG = function(e) {
|
|
2522
2531
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2523
2532
|
}, e.refresh_language = function(e, t) {
|
|
2524
|
-
|
|
2533
|
+
Ht(t) ? (e || (e = document), e.querySelectorAll("[data-i18n]").forEach(function(e) {
|
|
2525
2534
|
let n = e.getAttribute("data-i18n");
|
|
2526
2535
|
for (let r of e.childNodes) if (r.nodeType === Node.TEXT_NODE) {
|
|
2527
2536
|
n || (n = r.nodeValue), r.nodeValue = t(n);
|
|
2528
2537
|
break;
|
|
2529
2538
|
}
|
|
2539
|
+
}), e.querySelectorAll("[data-i18n-title]").forEach(function(e) {
|
|
2540
|
+
let n = e.getAttribute("data-i18n-title");
|
|
2541
|
+
n && e.setAttribute("title", t(n));
|
|
2542
|
+
}), e.querySelectorAll("[data-i18n-aria-label]").forEach(function(e) {
|
|
2543
|
+
let n = e.getAttribute("data-i18n-aria-label");
|
|
2544
|
+
n && e.setAttribute("aria-label", t(n));
|
|
2530
2545
|
})) : Ot("You must supply a translation function");
|
|
2531
2546
|
}, e.register_c_ievent_cli = function() {
|
|
2532
2547
|
return function(e) {
|
|
@@ -2545,7 +2560,7 @@ var gobjJs = function(e) {
|
|
|
2545
2560
|
],
|
|
2546
2561
|
[
|
|
2547
2562
|
"EV_TIMEOUT",
|
|
2548
|
-
|
|
2563
|
+
Tr,
|
|
2549
2564
|
null
|
|
2550
2565
|
],
|
|
2551
2566
|
[
|
|
@@ -2618,23 +2633,24 @@ var gobjJs = function(e) {
|
|
|
2618
2633
|
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
2619
2634
|
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2620
2635
|
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2636
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2621
2637
|
["EV_TIMEOUT", 0],
|
|
2622
2638
|
[null, 0]
|
|
2623
2639
|
], t, Dr, 0, ar, ur, 0, 0, 0, N.gcflag_no_check_output_events)) ? 0 : -1;
|
|
2624
2640
|
}("C_IEVENT_CLI");
|
|
2625
2641
|
}, e.register_c_timer = function() {
|
|
2626
2642
|
return function(e) {
|
|
2627
|
-
if (
|
|
2643
|
+
if (Hn) return Ot(`GClass ALREADY created: ${e}`), -1;
|
|
2628
2644
|
const t = [["ST_IDLE", [[
|
|
2629
2645
|
"EV_TIMEOUT",
|
|
2630
2646
|
Xn,
|
|
2631
2647
|
null
|
|
2632
2648
|
]]]];
|
|
2633
|
-
return (
|
|
2649
|
+
return (Hn = W(e, [
|
|
2634
2650
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
2635
2651
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
2636
2652
|
[0, 0]
|
|
2637
|
-
], t, Zn, 0, Qn,
|
|
2653
|
+
], t, Zn, 0, Qn, qn, 0, 0, 0, N.gcflag_manual_start)) ? 0 : -1;
|
|
2638
2654
|
}("C_TIMER");
|
|
2639
2655
|
}, e.register_c_yuno = function() {
|
|
2640
2656
|
return function(e) {
|
|
@@ -2650,7 +2666,7 @@ var gobjJs = function(e) {
|
|
|
2650
2666
|
if (!e) return "";
|
|
2651
2667
|
const t = String(e).trim();
|
|
2652
2668
|
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Cn(t);
|
|
2653
|
-
}, e.sdata_flag_t =
|
|
2669
|
+
}, e.sdata_flag_t = T, e.send_http_json_post = function(e, t, n) {
|
|
2654
2670
|
let r = new XMLHttpRequest();
|
|
2655
2671
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2656
2672
|
4 === r.readyState && n(r.status, r.responseText);
|