mol_plot_all 1.2.525 → 1.2.527
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/node.d.ts +311 -311
- package/node.deps.json +1 -1
- package/node.js +1767 -1767
- package/node.js.map +1 -1
- package/node.mjs +1767 -1767
- package/node.mjs.map +1 -1
- package/node.test.js +1728 -1728
- package/node.test.js.map +1 -1
- package/package.json +26 -26
- package/web.d.ts +177 -177
- package/web.deps.json +1 -1
- package/web.js +357 -357
- package/web.js.map +1 -1
- package/web.mjs +357 -357
- package/web.mjs.map +1 -1
- package/web.test.js +499 -499
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
Error.stackTraceLimit = 50;
|
|
4
|
+
var $;
|
|
5
|
+
(function ($) {
|
|
6
|
+
})($ || ($ = {}));
|
|
7
|
+
module.exports = $;
|
|
8
|
+
//mam.ts
|
|
9
|
+
;
|
|
2
10
|
"use strict"
|
|
3
11
|
|
|
4
12
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -11,14 +19,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
11
19
|
var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
|
|
12
20
|
$.$$ = $
|
|
13
21
|
|
|
14
|
-
;
|
|
15
|
-
"use strict";
|
|
16
|
-
Error.stackTraceLimit = 50;
|
|
17
|
-
var $;
|
|
18
|
-
(function ($) {
|
|
19
|
-
})($ || ($ = {}));
|
|
20
|
-
module.exports = $;
|
|
21
|
-
//mam.ts
|
|
22
22
|
;
|
|
23
23
|
"use strict";
|
|
24
24
|
var $;
|
|
@@ -192,882 +192,152 @@ var $;
|
|
|
192
192
|
;
|
|
193
193
|
"use strict";
|
|
194
194
|
var $;
|
|
195
|
-
(function ($) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
task();
|
|
195
|
+
(function ($_1) {
|
|
196
|
+
let $$;
|
|
197
|
+
(function ($$) {
|
|
198
|
+
let $;
|
|
199
|
+
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
200
|
+
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
201
|
+
class $mol_object extends $mol_object2 {
|
|
202
|
+
static make(config) {
|
|
203
|
+
return super.create(obj => {
|
|
204
|
+
for (let key in config)
|
|
205
|
+
obj[key] = config[key];
|
|
207
206
|
});
|
|
208
207
|
}
|
|
209
|
-
destructor() {
|
|
210
|
-
this.cancelled = true;
|
|
211
|
-
}
|
|
212
208
|
}
|
|
213
|
-
|
|
209
|
+
$_1.$mol_object = $mol_object;
|
|
214
210
|
})($ || ($ = {}));
|
|
215
|
-
//mol/
|
|
211
|
+
//mol/object/object.ts
|
|
216
212
|
;
|
|
217
213
|
"use strict";
|
|
218
214
|
var $;
|
|
219
215
|
(function ($) {
|
|
216
|
+
class $mol_window extends $mol_object {
|
|
217
|
+
static size() {
|
|
218
|
+
return {
|
|
219
|
+
width: 1024,
|
|
220
|
+
height: 768,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
$.$mol_window = $mol_window;
|
|
220
225
|
})($ || ($ = {}));
|
|
221
|
-
//mol/
|
|
226
|
+
//mol/window/window.node.ts
|
|
222
227
|
;
|
|
223
228
|
"use strict";
|
|
224
|
-
|
|
229
|
+
var $;
|
|
230
|
+
(function ($) {
|
|
231
|
+
let $mol_wire_cursor;
|
|
232
|
+
(function ($mol_wire_cursor) {
|
|
233
|
+
$mol_wire_cursor[$mol_wire_cursor["stale"] = -1] = "stale";
|
|
234
|
+
$mol_wire_cursor[$mol_wire_cursor["doubt"] = -2] = "doubt";
|
|
235
|
+
$mol_wire_cursor[$mol_wire_cursor["fresh"] = -3] = "fresh";
|
|
236
|
+
$mol_wire_cursor[$mol_wire_cursor["final"] = -4] = "final";
|
|
237
|
+
})($mol_wire_cursor = $.$mol_wire_cursor || ($.$mol_wire_cursor = {}));
|
|
238
|
+
})($ || ($ = {}));
|
|
239
|
+
//mol/wire/cursor/cursor.ts
|
|
225
240
|
;
|
|
226
241
|
"use strict";
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const suffix = `./node_modules/${name}`;
|
|
240
|
-
const $$ = $;
|
|
241
|
-
while (!fs.existsSync(path.join(dir, suffix))) {
|
|
242
|
-
const parent = path.resolve(dir, '..');
|
|
243
|
-
if (parent === dir) {
|
|
244
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
245
|
-
try {
|
|
246
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
247
|
-
}
|
|
248
|
-
catch { }
|
|
249
|
-
break;
|
|
242
|
+
var $;
|
|
243
|
+
(function ($) {
|
|
244
|
+
class $mol_wire_pub extends Object {
|
|
245
|
+
data = [];
|
|
246
|
+
static get [Symbol.species]() {
|
|
247
|
+
return Array;
|
|
248
|
+
}
|
|
249
|
+
sub_from = 0;
|
|
250
|
+
get sub_list() {
|
|
251
|
+
const res = [];
|
|
252
|
+
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
253
|
+
res.push(this.data[i]);
|
|
250
254
|
}
|
|
251
|
-
|
|
252
|
-
|
|
255
|
+
return res;
|
|
256
|
+
}
|
|
257
|
+
get sub_empty() {
|
|
258
|
+
return this.sub_from === this.data.length;
|
|
259
|
+
}
|
|
260
|
+
sub_on(sub, pub_pos) {
|
|
261
|
+
const pos = this.data.length;
|
|
262
|
+
this.data.push(sub, pub_pos);
|
|
263
|
+
return pos;
|
|
264
|
+
}
|
|
265
|
+
sub_off(sub_pos) {
|
|
266
|
+
if (!(sub_pos < this.data.length)) {
|
|
267
|
+
$mol_fail(new Error(`Wrong pos ${sub_pos}`));
|
|
268
|
+
}
|
|
269
|
+
const end = this.data.length - 2;
|
|
270
|
+
if (sub_pos !== end) {
|
|
271
|
+
this.peer_move(end, sub_pos);
|
|
253
272
|
}
|
|
273
|
+
this.data.pop();
|
|
274
|
+
this.data.pop();
|
|
275
|
+
if (this.data.length === this.sub_from)
|
|
276
|
+
this.reap();
|
|
254
277
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
278
|
+
reap() { }
|
|
279
|
+
promote() {
|
|
280
|
+
$mol_wire_auto()?.track_next(this);
|
|
281
|
+
}
|
|
282
|
+
fresh() { }
|
|
283
|
+
complete() { }
|
|
284
|
+
emit(quant = $mol_wire_cursor.stale) {
|
|
285
|
+
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
286
|
+
;
|
|
287
|
+
this.data[i].absorb(quant);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
peer_move(from_pos, to_pos) {
|
|
291
|
+
const peer = this.data[from_pos];
|
|
292
|
+
const self_pos = this.data[from_pos + 1];
|
|
293
|
+
this.data[to_pos] = peer;
|
|
294
|
+
this.data[to_pos + 1] = self_pos;
|
|
295
|
+
peer.peer_repos(self_pos, to_pos);
|
|
296
|
+
}
|
|
297
|
+
peer_repos(peer_pos, self_pos) {
|
|
298
|
+
this.data[peer_pos + 1] = self_pos;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
$.$mol_wire_pub = $mol_wire_pub;
|
|
302
|
+
})($ || ($ = {}));
|
|
303
|
+
//mol/wire/pub/pub.ts
|
|
304
|
+
;
|
|
305
|
+
"use strict";
|
|
306
|
+
//mol/wire/sub/sub.ts
|
|
266
307
|
;
|
|
267
308
|
"use strict";
|
|
268
309
|
var $;
|
|
269
310
|
(function ($) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
const deep = stack.length;
|
|
274
|
-
let logged = false;
|
|
275
|
-
stack.push(() => {
|
|
276
|
-
logged = true;
|
|
277
|
-
self.$mol_log3_area.call(self, event);
|
|
278
|
-
});
|
|
279
|
-
return () => {
|
|
280
|
-
if (logged)
|
|
281
|
-
self.console.groupEnd();
|
|
282
|
-
if (stack.length > deep)
|
|
283
|
-
stack.length = deep;
|
|
284
|
-
};
|
|
311
|
+
let auto = null;
|
|
312
|
+
function $mol_wire_auto(next = auto) {
|
|
313
|
+
return auto = next;
|
|
285
314
|
}
|
|
286
|
-
$.$
|
|
287
|
-
$.$
|
|
315
|
+
$.$mol_wire_auto = $mol_wire_auto;
|
|
316
|
+
$.$mol_wire_affected = [];
|
|
288
317
|
})($ || ($ = {}));
|
|
289
|
-
//mol/
|
|
318
|
+
//mol/wire/wire.ts
|
|
290
319
|
;
|
|
291
320
|
"use strict";
|
|
292
321
|
var $;
|
|
293
322
|
(function ($) {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
this.sub = [...sub, ...(config.sub || [])];
|
|
310
|
-
this.data = config.data || '';
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
this.data = sub[0].data;
|
|
314
|
-
this.sub = config.sub || [];
|
|
315
|
-
}
|
|
323
|
+
$['devtoolsFormatters'] = $['devtoolsFormatters'] || [];
|
|
324
|
+
function $mol_dev_format_register(config) {
|
|
325
|
+
$['devtoolsFormatters'].push(config);
|
|
326
|
+
}
|
|
327
|
+
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
328
|
+
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
329
|
+
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
330
|
+
$mol_dev_format_register({
|
|
331
|
+
header: (val, config = false) => {
|
|
332
|
+
if (config)
|
|
333
|
+
return null;
|
|
334
|
+
if (!val)
|
|
335
|
+
return null;
|
|
336
|
+
if ($.$mol_dev_format_head in val) {
|
|
337
|
+
return val[$.$mol_dev_format_head]();
|
|
316
338
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
this.sub = config.sub || [];
|
|
320
|
-
}
|
|
321
|
-
this.baseUri = config.baseUri || '';
|
|
322
|
-
this.row = config.row || 0;
|
|
323
|
-
this.col = config.col || 0;
|
|
324
|
-
this.length = config.length || 0;
|
|
325
|
-
}
|
|
326
|
-
static values(str, baseUri) {
|
|
327
|
-
return str.split('\n').map((data, index) => new $mol_tree({
|
|
328
|
-
data: data,
|
|
329
|
-
baseUri: baseUri,
|
|
330
|
-
row: index + 1,
|
|
331
|
-
length: data.length,
|
|
332
|
-
}));
|
|
333
|
-
}
|
|
334
|
-
clone(config = {}) {
|
|
335
|
-
return new $mol_tree({
|
|
336
|
-
type: ('type' in config) ? config.type : this.type,
|
|
337
|
-
data: ('data' in config) ? config.data : this.data,
|
|
338
|
-
sub: ('sub' in config) ? config.sub : this.sub,
|
|
339
|
-
baseUri: ('baseUri' in config) ? config.baseUri : this.baseUri,
|
|
340
|
-
row: ('row' in config) ? config.row : this.row,
|
|
341
|
-
col: ('col' in config) ? config.col : this.col,
|
|
342
|
-
length: ('length' in config) ? config.length : this.length,
|
|
343
|
-
value: config.value
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
make(config) {
|
|
347
|
-
return new $mol_tree({
|
|
348
|
-
baseUri: this.baseUri,
|
|
349
|
-
row: this.row,
|
|
350
|
-
col: this.col,
|
|
351
|
-
length: this.length,
|
|
352
|
-
...config,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
make_data(value, sub) {
|
|
356
|
-
return this.make({ value, sub });
|
|
357
|
-
}
|
|
358
|
-
make_struct(type, sub) {
|
|
359
|
-
return this.make({ type, sub });
|
|
360
|
-
}
|
|
361
|
-
static fromString(str, baseUri) {
|
|
362
|
-
var root = new $mol_tree({ baseUri: baseUri });
|
|
363
|
-
var stack = [root];
|
|
364
|
-
var row = 0;
|
|
365
|
-
var prefix = str.replace(/^\n?(\t*)[\s\S]*/, '$1');
|
|
366
|
-
var lines = str.replace(new RegExp('^\\t{0,' + prefix.length + '}', 'mg'), '').split('\n');
|
|
367
|
-
lines.forEach(line => {
|
|
368
|
-
++row;
|
|
369
|
-
var chunks = /^(\t*)((?:[^\n\t\\ ]+ *)*)(\\[^\n]*)?(.*?)(?:$|\n)/m.exec(line);
|
|
370
|
-
if (!chunks || chunks[4])
|
|
371
|
-
return this.$.$mol_fail(new Error(`Syntax error at ${baseUri}:${row}\n${line}`));
|
|
372
|
-
var indent = chunks[1];
|
|
373
|
-
var path = chunks[2];
|
|
374
|
-
var data = chunks[3];
|
|
375
|
-
var deep = indent.length;
|
|
376
|
-
var types = path ? path.replace(/ $/, '').split(/ +/) : [];
|
|
377
|
-
if (stack.length <= deep)
|
|
378
|
-
return this.$.$mol_fail(new Error(`Too many tabs at ${baseUri}:${row}\n${line}`));
|
|
379
|
-
stack.length = deep + 1;
|
|
380
|
-
var parent = stack[deep];
|
|
381
|
-
let col = deep;
|
|
382
|
-
types.forEach(type => {
|
|
383
|
-
if (!type)
|
|
384
|
-
return this.$.$mol_fail(new Error(`Unexpected space symbol ${baseUri}:${row}\n${line}`));
|
|
385
|
-
var next = new $mol_tree({ type, baseUri, row, col, length: type.length });
|
|
386
|
-
const parent_sub = parent.sub;
|
|
387
|
-
parent_sub.push(next);
|
|
388
|
-
parent = next;
|
|
389
|
-
col += type.length + 1;
|
|
390
|
-
});
|
|
391
|
-
if (data) {
|
|
392
|
-
var next = new $mol_tree({ data: data.substring(1), baseUri, row, col, length: data.length });
|
|
393
|
-
const parent_sub = parent.sub;
|
|
394
|
-
parent_sub.push(next);
|
|
395
|
-
parent = next;
|
|
396
|
-
}
|
|
397
|
-
stack.push(parent);
|
|
398
|
-
});
|
|
399
|
-
return root;
|
|
400
|
-
}
|
|
401
|
-
static fromJSON(json, baseUri = '') {
|
|
402
|
-
switch (true) {
|
|
403
|
-
case typeof json === 'boolean':
|
|
404
|
-
case typeof json === 'number':
|
|
405
|
-
case json === null:
|
|
406
|
-
return new $mol_tree({
|
|
407
|
-
type: String(json),
|
|
408
|
-
baseUri: baseUri
|
|
409
|
-
});
|
|
410
|
-
case typeof json === 'string':
|
|
411
|
-
return new $mol_tree({
|
|
412
|
-
value: json,
|
|
413
|
-
baseUri: baseUri
|
|
414
|
-
});
|
|
415
|
-
case Array.isArray(json):
|
|
416
|
-
return new $mol_tree({
|
|
417
|
-
type: "/",
|
|
418
|
-
sub: json.map(json => $mol_tree.fromJSON(json, baseUri))
|
|
419
|
-
});
|
|
420
|
-
case json instanceof Date:
|
|
421
|
-
return new $mol_tree({
|
|
422
|
-
value: json.toISOString(),
|
|
423
|
-
baseUri: baseUri
|
|
424
|
-
});
|
|
425
|
-
default:
|
|
426
|
-
if (typeof json[$.$mol_tree_convert] === 'function') {
|
|
427
|
-
return json[$.$mol_tree_convert]();
|
|
428
|
-
}
|
|
429
|
-
if (typeof json.toJSON === 'function') {
|
|
430
|
-
return $mol_tree.fromJSON(json.toJSON());
|
|
431
|
-
}
|
|
432
|
-
if (json instanceof Error) {
|
|
433
|
-
const { name, message, stack } = json;
|
|
434
|
-
json = { ...json, name, message, stack };
|
|
435
|
-
}
|
|
436
|
-
var sub = [];
|
|
437
|
-
for (var key in json) {
|
|
438
|
-
if (json[key] === undefined)
|
|
439
|
-
continue;
|
|
440
|
-
const subsub = $mol_tree.fromJSON(json[key], baseUri);
|
|
441
|
-
if (/^[^\n\t\\ ]+$/.test(key)) {
|
|
442
|
-
var child = new $mol_tree({
|
|
443
|
-
type: key,
|
|
444
|
-
baseUri: baseUri,
|
|
445
|
-
sub: [subsub],
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
var child = new $mol_tree({
|
|
450
|
-
value: key,
|
|
451
|
-
baseUri: baseUri,
|
|
452
|
-
sub: [subsub],
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
sub.push(child);
|
|
456
|
-
}
|
|
457
|
-
return new $mol_tree({
|
|
458
|
-
type: "*",
|
|
459
|
-
sub: sub,
|
|
460
|
-
baseUri: baseUri
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
get uri() {
|
|
465
|
-
return this.baseUri + '#' + this.row + ':' + this.col;
|
|
466
|
-
}
|
|
467
|
-
toString(prefix = '') {
|
|
468
|
-
var output = '';
|
|
469
|
-
if (this.type.length) {
|
|
470
|
-
if (!prefix.length) {
|
|
471
|
-
prefix = "\t";
|
|
472
|
-
}
|
|
473
|
-
output += this.type;
|
|
474
|
-
if (this.sub.length == 1) {
|
|
475
|
-
return output + ' ' + this.sub[0].toString(prefix);
|
|
476
|
-
}
|
|
477
|
-
output += "\n";
|
|
478
|
-
}
|
|
479
|
-
else if (this.data.length || prefix.length) {
|
|
480
|
-
output += "\\" + this.data + "\n";
|
|
481
|
-
}
|
|
482
|
-
for (var child of this.sub) {
|
|
483
|
-
output += prefix;
|
|
484
|
-
output += child.toString(prefix + "\t");
|
|
485
|
-
}
|
|
486
|
-
return output;
|
|
487
|
-
}
|
|
488
|
-
toJSON() {
|
|
489
|
-
if (!this.type)
|
|
490
|
-
return this.value;
|
|
491
|
-
if (this.type === 'true')
|
|
492
|
-
return true;
|
|
493
|
-
if (this.type === 'false')
|
|
494
|
-
return false;
|
|
495
|
-
if (this.type === 'null')
|
|
496
|
-
return null;
|
|
497
|
-
if (this.type === '*') {
|
|
498
|
-
var obj = {};
|
|
499
|
-
for (var child of this.sub) {
|
|
500
|
-
if (child.type === '-')
|
|
501
|
-
continue;
|
|
502
|
-
var key = child.type || child.clone({ sub: child.sub.slice(0, child.sub.length - 1) }).value;
|
|
503
|
-
var val = child.sub[child.sub.length - 1].toJSON();
|
|
504
|
-
if (val !== undefined)
|
|
505
|
-
obj[key] = val;
|
|
506
|
-
}
|
|
507
|
-
return obj;
|
|
508
|
-
}
|
|
509
|
-
if (this.type === '/') {
|
|
510
|
-
var res = [];
|
|
511
|
-
this.sub.forEach(child => {
|
|
512
|
-
if (child.type === '-')
|
|
513
|
-
return;
|
|
514
|
-
var val = child.toJSON();
|
|
515
|
-
if (val !== undefined)
|
|
516
|
-
res.push(val);
|
|
517
|
-
});
|
|
518
|
-
return res;
|
|
519
|
-
}
|
|
520
|
-
if (this.type === 'time') {
|
|
521
|
-
return new Date(this.value);
|
|
522
|
-
}
|
|
523
|
-
const numb = Number(this.type);
|
|
524
|
-
if (!Number.isNaN(numb) || this.type === 'NaN')
|
|
525
|
-
return numb;
|
|
526
|
-
throw new Error(`Unknown type (${this.type}) at ${this.uri}`);
|
|
527
|
-
}
|
|
528
|
-
get value() {
|
|
529
|
-
var values = [];
|
|
530
|
-
for (var child of this.sub) {
|
|
531
|
-
if (child.type)
|
|
532
|
-
continue;
|
|
533
|
-
values.push(child.value);
|
|
534
|
-
}
|
|
535
|
-
return this.data + values.join("\n");
|
|
536
|
-
}
|
|
537
|
-
insert(value, ...path) {
|
|
538
|
-
if (path.length === 0)
|
|
539
|
-
return value;
|
|
540
|
-
const type = path[0];
|
|
541
|
-
if (typeof type === 'string') {
|
|
542
|
-
let replaced = false;
|
|
543
|
-
const sub = this.sub.map((item, index) => {
|
|
544
|
-
if (item.type !== type)
|
|
545
|
-
return item;
|
|
546
|
-
replaced = true;
|
|
547
|
-
return item.insert(value, ...path.slice(1));
|
|
548
|
-
});
|
|
549
|
-
if (!replaced)
|
|
550
|
-
sub.push(new $mol_tree({ type }).insert(value, ...path.slice(1)));
|
|
551
|
-
return this.clone({ sub });
|
|
552
|
-
}
|
|
553
|
-
else if (typeof type === 'number') {
|
|
554
|
-
const sub = this.sub.slice();
|
|
555
|
-
sub[type] = (sub[type] || new $mol_tree).insert(value, ...path.slice(1));
|
|
556
|
-
return this.clone({ sub });
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
return this.clone({ sub: ((this.sub.length === 0) ? [new $mol_tree()] : this.sub).map(item => item.insert(value, ...path.slice(1))) });
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
select(...path) {
|
|
563
|
-
var next = [this];
|
|
564
|
-
for (var type of path) {
|
|
565
|
-
if (!next.length)
|
|
566
|
-
break;
|
|
567
|
-
var prev = next;
|
|
568
|
-
next = [];
|
|
569
|
-
for (var item of prev) {
|
|
570
|
-
switch (typeof (type)) {
|
|
571
|
-
case 'string':
|
|
572
|
-
for (var child of item.sub) {
|
|
573
|
-
if (!type || (child.type == type)) {
|
|
574
|
-
next.push(child);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
break;
|
|
578
|
-
case 'number':
|
|
579
|
-
if (type < item.sub.length)
|
|
580
|
-
next.push(item.sub[type]);
|
|
581
|
-
break;
|
|
582
|
-
default: next.push(...item.sub);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
return new $mol_tree({ sub: next });
|
|
587
|
-
}
|
|
588
|
-
filter(path, value) {
|
|
589
|
-
var sub = this.sub.filter(function (item) {
|
|
590
|
-
var found = item.select(...path);
|
|
591
|
-
if (value == null) {
|
|
592
|
-
return Boolean(found.sub.length);
|
|
593
|
-
}
|
|
594
|
-
else {
|
|
595
|
-
return found.sub.some(child => child.value == value);
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
return new $mol_tree({ sub: sub });
|
|
599
|
-
}
|
|
600
|
-
transform(visit, stack = []) {
|
|
601
|
-
const sub_stack = [this, ...stack];
|
|
602
|
-
return visit(sub_stack, () => this.sub.map(node => node.transform(visit, sub_stack)).filter(n => n));
|
|
603
|
-
}
|
|
604
|
-
hack(context) {
|
|
605
|
-
const sub = [].concat(...this.sub.map(child => {
|
|
606
|
-
const handle = context[child.type] || context[''];
|
|
607
|
-
if (!handle)
|
|
608
|
-
$mol_fail(child.error('Handler not defined'));
|
|
609
|
-
return handle(child, context);
|
|
610
|
-
}));
|
|
611
|
-
return this.clone({ sub });
|
|
612
|
-
}
|
|
613
|
-
error(message) {
|
|
614
|
-
return new Error(`${message}:\n${this} ${this.baseUri}:${this.row}:${this.col}`);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
$.$mol_tree = $mol_tree;
|
|
618
|
-
})($ || ($ = {}));
|
|
619
|
-
//mol/tree/tree.ts
|
|
620
|
-
;
|
|
621
|
-
"use strict";
|
|
622
|
-
var $;
|
|
623
|
-
(function ($) {
|
|
624
|
-
class $mol_term_color {
|
|
625
|
-
static reset = this.ansi(0, 0);
|
|
626
|
-
static bold = this.ansi(1, 22);
|
|
627
|
-
static italic = this.ansi(3, 23);
|
|
628
|
-
static underline = this.ansi(4, 24);
|
|
629
|
-
static inverse = this.ansi(7, 27);
|
|
630
|
-
static hidden = this.ansi(8, 28);
|
|
631
|
-
static strike = this.ansi(9, 29);
|
|
632
|
-
static gray = this.ansi(90, 39);
|
|
633
|
-
static red = this.ansi(91, 39);
|
|
634
|
-
static green = this.ansi(92, 39);
|
|
635
|
-
static yellow = this.ansi(93, 39);
|
|
636
|
-
static blue = this.ansi(94, 39);
|
|
637
|
-
static magenta = this.ansi(95, 39);
|
|
638
|
-
static cyan = this.ansi(96, 39);
|
|
639
|
-
static Gray = (str) => this.inverse(this.gray(str));
|
|
640
|
-
static Red = (str) => this.inverse(this.red(str));
|
|
641
|
-
static Green = (str) => this.inverse(this.green(str));
|
|
642
|
-
static Yellow = (str) => this.inverse(this.yellow(str));
|
|
643
|
-
static Blue = (str) => this.inverse(this.blue(str));
|
|
644
|
-
static Magenta = (str) => this.inverse(this.magenta(str));
|
|
645
|
-
static Cyan = (str) => this.inverse(this.cyan(str));
|
|
646
|
-
static ansi(open, close) {
|
|
647
|
-
if (typeof process === 'undefined')
|
|
648
|
-
return String;
|
|
649
|
-
if (!process.stdout.isTTY)
|
|
650
|
-
return String;
|
|
651
|
-
const prefix = `\x1b[${open}m`;
|
|
652
|
-
const postfix = `\x1b[${close}m`;
|
|
653
|
-
const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
|
|
654
|
-
return function colorer(str) {
|
|
655
|
-
str = String(str);
|
|
656
|
-
if (str === '')
|
|
657
|
-
return str;
|
|
658
|
-
const suffix = str.replace(suffix_regexp, prefix);
|
|
659
|
-
return prefix + suffix + postfix;
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
$.$mol_term_color = $mol_term_color;
|
|
664
|
-
})($ || ($ = {}));
|
|
665
|
-
//mol/term/color/color.ts
|
|
666
|
-
;
|
|
667
|
-
"use strict";
|
|
668
|
-
var $;
|
|
669
|
-
(function ($) {
|
|
670
|
-
function $mol_log3_node_make(level, output, type, color) {
|
|
671
|
-
return function $mol_log3_logger(event) {
|
|
672
|
-
if (!event.time)
|
|
673
|
-
event = { time: new Date().toISOString(), ...event };
|
|
674
|
-
const tree = this.$mol_tree.fromJSON(event).clone({ type });
|
|
675
|
-
let str = color(tree.toString());
|
|
676
|
-
this.console[level](str);
|
|
677
|
-
const self = this;
|
|
678
|
-
return () => self.console.groupEnd();
|
|
679
|
-
};
|
|
680
|
-
}
|
|
681
|
-
$.$mol_log3_node_make = $mol_log3_node_make;
|
|
682
|
-
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
|
|
683
|
-
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
|
|
684
|
-
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
|
|
685
|
-
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
|
|
686
|
-
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
|
|
687
|
-
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
|
|
688
|
-
})($ || ($ = {}));
|
|
689
|
-
//mol/log3/log3.node.ts
|
|
690
|
-
;
|
|
691
|
-
"use strict";
|
|
692
|
-
var $;
|
|
693
|
-
(function ($) {
|
|
694
|
-
function $mol_env() {
|
|
695
|
-
return {};
|
|
696
|
-
}
|
|
697
|
-
$.$mol_env = $mol_env;
|
|
698
|
-
})($ || ($ = {}));
|
|
699
|
-
//mol/env/env.ts
|
|
700
|
-
;
|
|
701
|
-
"use strict";
|
|
702
|
-
var $;
|
|
703
|
-
(function ($) {
|
|
704
|
-
$.$mol_env = function $mol_env() {
|
|
705
|
-
return this.process.env;
|
|
706
|
-
};
|
|
707
|
-
})($ || ($ = {}));
|
|
708
|
-
//mol/env/env.node.ts
|
|
709
|
-
;
|
|
710
|
-
"use strict";
|
|
711
|
-
var $;
|
|
712
|
-
(function ($) {
|
|
713
|
-
function $mol_exec(dir, command, ...args) {
|
|
714
|
-
let [app, ...args0] = command.split(' ');
|
|
715
|
-
args = [...args0, ...args];
|
|
716
|
-
this.$mol_log3_come({
|
|
717
|
-
place: '$mol_exec',
|
|
718
|
-
dir: $node.path.relative('', dir),
|
|
719
|
-
message: 'Run',
|
|
720
|
-
command: `${app} ${args.join(' ')}`,
|
|
721
|
-
});
|
|
722
|
-
var res = $node['child_process'].spawnSync(app, args, {
|
|
723
|
-
cwd: $node.path.resolve(dir),
|
|
724
|
-
shell: true,
|
|
725
|
-
env: this.$mol_env(),
|
|
726
|
-
});
|
|
727
|
-
if (res.status || res.error)
|
|
728
|
-
return $mol_fail(res.error || new Error(res.stderr.toString()));
|
|
729
|
-
if (!res.stdout)
|
|
730
|
-
res.stdout = Buffer.from([]);
|
|
731
|
-
return res;
|
|
732
|
-
}
|
|
733
|
-
$.$mol_exec = $mol_exec;
|
|
734
|
-
})($ || ($ = {}));
|
|
735
|
-
//mol/exec/exec.node.ts
|
|
736
|
-
;
|
|
737
|
-
"use strict";
|
|
738
|
-
var $;
|
|
739
|
-
(function ($) {
|
|
740
|
-
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
741
|
-
})($ || ($ = {}));
|
|
742
|
-
//mol/dom/context/context.node.ts
|
|
743
|
-
;
|
|
744
|
-
"use strict";
|
|
745
|
-
var $;
|
|
746
|
-
(function ($) {
|
|
747
|
-
let all = [];
|
|
748
|
-
let el = null;
|
|
749
|
-
let timer = null;
|
|
750
|
-
function $mol_style_attach(id, text) {
|
|
751
|
-
all.push(`/* ${id} */\n\n${text}`);
|
|
752
|
-
if (timer)
|
|
753
|
-
return el;
|
|
754
|
-
const doc = $mol_dom_context.document;
|
|
755
|
-
if (!doc)
|
|
756
|
-
return null;
|
|
757
|
-
el = doc.createElement('style');
|
|
758
|
-
el.id = `$mol_style_attach`;
|
|
759
|
-
doc.head.appendChild(el);
|
|
760
|
-
timer = new $mol_after_tick(() => {
|
|
761
|
-
el.innerHTML = '\n' + all.join('\n\n');
|
|
762
|
-
all = [];
|
|
763
|
-
el = null;
|
|
764
|
-
timer = null;
|
|
765
|
-
});
|
|
766
|
-
return el;
|
|
767
|
-
}
|
|
768
|
-
$.$mol_style_attach = $mol_style_attach;
|
|
769
|
-
})($ || ($ = {}));
|
|
770
|
-
//mol/style/attach/attach.ts
|
|
771
|
-
;
|
|
772
|
-
"use strict";
|
|
773
|
-
var $;
|
|
774
|
-
(function ($) {
|
|
775
|
-
class $mol_decor {
|
|
776
|
-
value;
|
|
777
|
-
constructor(value) {
|
|
778
|
-
this.value = value;
|
|
779
|
-
}
|
|
780
|
-
prefix() { return ''; }
|
|
781
|
-
valueOf() { return this.value; }
|
|
782
|
-
postfix() { return ''; }
|
|
783
|
-
toString() {
|
|
784
|
-
return `${this.prefix()}${this.valueOf()}${this.postfix()}`;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
$.$mol_decor = $mol_decor;
|
|
788
|
-
})($ || ($ = {}));
|
|
789
|
-
//mol/decor/decor.ts
|
|
790
|
-
;
|
|
791
|
-
"use strict";
|
|
792
|
-
var $;
|
|
793
|
-
(function ($) {
|
|
794
|
-
class $mol_style_unit extends $mol_decor {
|
|
795
|
-
literal;
|
|
796
|
-
constructor(value, literal) {
|
|
797
|
-
super(value);
|
|
798
|
-
this.literal = literal;
|
|
799
|
-
}
|
|
800
|
-
postfix() {
|
|
801
|
-
return this.literal;
|
|
802
|
-
}
|
|
803
|
-
static per(value) { return new $mol_style_unit(value, '%'); }
|
|
804
|
-
static px(value) { return new $mol_style_unit(value, 'px'); }
|
|
805
|
-
static mm(value) { return new $mol_style_unit(value, 'mm'); }
|
|
806
|
-
static cm(value) { return new $mol_style_unit(value, 'cm'); }
|
|
807
|
-
static Q(value) { return new $mol_style_unit(value, 'Q'); }
|
|
808
|
-
static in(value) { return new $mol_style_unit(value, 'in'); }
|
|
809
|
-
static pc(value) { return new $mol_style_unit(value, 'pc'); }
|
|
810
|
-
static pt(value) { return new $mol_style_unit(value, 'pt'); }
|
|
811
|
-
static cap(value) { return new $mol_style_unit(value, 'cap'); }
|
|
812
|
-
static ch(value) { return new $mol_style_unit(value, 'ch'); }
|
|
813
|
-
static em(value) { return new $mol_style_unit(value, 'em'); }
|
|
814
|
-
static rem(value) { return new $mol_style_unit(value, 'rem'); }
|
|
815
|
-
static ex(value) { return new $mol_style_unit(value, 'ex'); }
|
|
816
|
-
static ic(value) { return new $mol_style_unit(value, 'ic'); }
|
|
817
|
-
static lh(value) { return new $mol_style_unit(value, 'lh'); }
|
|
818
|
-
static rlh(value) { return new $mol_style_unit(value, 'rlh'); }
|
|
819
|
-
static vh(value) { return new $mol_style_unit(value, 'vh'); }
|
|
820
|
-
static vw(value) { return new $mol_style_unit(value, 'vw'); }
|
|
821
|
-
static vi(value) { return new $mol_style_unit(value, 'vi'); }
|
|
822
|
-
static vb(value) { return new $mol_style_unit(value, 'vb'); }
|
|
823
|
-
static vmin(value) { return new $mol_style_unit(value, 'vmin'); }
|
|
824
|
-
static vmax(value) { return new $mol_style_unit(value, 'vmax'); }
|
|
825
|
-
static deg(value) { return new $mol_style_unit(value, 'deg'); }
|
|
826
|
-
static rad(value) { return new $mol_style_unit(value, 'rad'); }
|
|
827
|
-
static grad(value) { return new $mol_style_unit(value, 'grad'); }
|
|
828
|
-
static turn(value) { return new $mol_style_unit(value, 'turn'); }
|
|
829
|
-
static s(value) { return new $mol_style_unit(value, 's'); }
|
|
830
|
-
static ms(value) { return new $mol_style_unit(value, 'ms'); }
|
|
831
|
-
}
|
|
832
|
-
$.$mol_style_unit = $mol_style_unit;
|
|
833
|
-
})($ || ($ = {}));
|
|
834
|
-
//mol/style/unit/unit.ts
|
|
835
|
-
;
|
|
836
|
-
"use strict";
|
|
837
|
-
var $;
|
|
838
|
-
(function ($) {
|
|
839
|
-
const { per } = $mol_style_unit;
|
|
840
|
-
class $mol_style_func extends $mol_decor {
|
|
841
|
-
name;
|
|
842
|
-
constructor(name, value) {
|
|
843
|
-
super(value);
|
|
844
|
-
this.name = name;
|
|
845
|
-
}
|
|
846
|
-
prefix() { return this.name + '('; }
|
|
847
|
-
postfix() { return ')'; }
|
|
848
|
-
static calc(value) {
|
|
849
|
-
return new $mol_style_func('calc', value);
|
|
850
|
-
}
|
|
851
|
-
static vary(name) {
|
|
852
|
-
return new $mol_style_func('var', name);
|
|
853
|
-
}
|
|
854
|
-
static url(href) {
|
|
855
|
-
return new $mol_style_func('url', JSON.stringify(href));
|
|
856
|
-
}
|
|
857
|
-
static hsla(hue, saturation, lightness, alpha) {
|
|
858
|
-
return new $mol_style_func('hsla', [hue, per(saturation), per(lightness), alpha]);
|
|
859
|
-
}
|
|
860
|
-
static clamp(min, mid, max) {
|
|
861
|
-
return new $mol_style_func('clamp', [min, mid, max]);
|
|
862
|
-
}
|
|
863
|
-
static rgba(red, green, blue, alpha) {
|
|
864
|
-
return new $mol_style_func('rgba', [red, green, blue, alpha]);
|
|
865
|
-
}
|
|
866
|
-
static scale(zoom) {
|
|
867
|
-
return new $mol_style_func('scale', [zoom]);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
$.$mol_style_func = $mol_style_func;
|
|
871
|
-
})($ || ($ = {}));
|
|
872
|
-
//mol/style/func/func.ts
|
|
873
|
-
;
|
|
874
|
-
"use strict";
|
|
875
|
-
var $;
|
|
876
|
-
(function ($) {
|
|
877
|
-
$mol_style_attach("mol/theme/theme.css", ":root {\n\t--mol_theme_hue: 210deg;\n\t--mol_theme_luma: -1;\n\t--mol_theme_satur: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme] {\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n}\n:where([mol_theme]) {\n\tbackground-color: var(--mol_theme_back);\n}\n\t\n:root, [mol_theme] {\n\t--mol_theme_back: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 20% ), calc( 55% + 45% * var(--mol_theme_luma) ) );\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0%, calc( 40% - 40% * var(--mol_theme_luma) ) );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 50% ), calc( 54% + 46% * var(--mol_theme_luma) ), .25 );\n\t\n\t--mol_theme_card: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 50% ), calc( 55% + 35% * var(--mol_theme_luma) ), .25 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .2 );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 50%, 1 );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, calc( 55% - 10% * var(--mol_theme_luma) ) );\n\t\n}\n\n[mol_theme=\"$mol_theme_light\"] {\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme=\"$mol_theme_dark\"] {\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: invert(1) hue-rotate( 180deg );\n}\n\n[mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50%, 40% );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 60%, 30% );\n\t--mol_theme_current: hsl( var(--mol_theme_hue), 100%, 20% );\n}\n\n[mol_theme=\"$mol_theme_current\"] {\n\tbackground-color: var(--mol_theme_back);\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% + 30% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_card: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 55% + 35% * var(--mol_theme_luma) ), .25 );\n}\n\n[mol_theme=\"$mol_theme_accent\"] {\n\tbackground-color: var(--mol_theme_back);\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 180deg ), 90%, 50% );\n\t--mol_theme_hover: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 35% );\n}\n\n[mol_theme=\"$mol_theme_accent\"] [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: black;\n}\n");
|
|
878
|
-
})($ || ($ = {}));
|
|
879
|
-
//mol/theme/-css/theme.css.ts
|
|
880
|
-
;
|
|
881
|
-
"use strict";
|
|
882
|
-
var $;
|
|
883
|
-
(function ($) {
|
|
884
|
-
const { vary } = $mol_style_func;
|
|
885
|
-
$.$mol_theme = {
|
|
886
|
-
back: vary('--mol_theme_back'),
|
|
887
|
-
hover: vary('--mol_theme_hover'),
|
|
888
|
-
card: vary('--mol_theme_card'),
|
|
889
|
-
current: vary('--mol_theme_current'),
|
|
890
|
-
special: vary('--mol_theme_special'),
|
|
891
|
-
text: vary('--mol_theme_text'),
|
|
892
|
-
control: vary('--mol_theme_control'),
|
|
893
|
-
shade: vary('--mol_theme_shade'),
|
|
894
|
-
line: vary('--mol_theme_line'),
|
|
895
|
-
focus: vary('--mol_theme_focus'),
|
|
896
|
-
field: vary('--mol_theme_field'),
|
|
897
|
-
image: vary('--mol_theme_image'),
|
|
898
|
-
};
|
|
899
|
-
})($ || ($ = {}));
|
|
900
|
-
//mol/theme/theme.ts
|
|
901
|
-
;
|
|
902
|
-
"use strict";
|
|
903
|
-
var $;
|
|
904
|
-
(function ($) {
|
|
905
|
-
$mol_style_attach("mol/gap/gap.css", ":root {\n\t--mol_gap_block: .75rem;\n\t--mol_gap_text: .5rem .75rem;\n\t--mol_gap_round: .25rem;\n\t--mol_gap_space: .25rem;\n\t--mol_gap_blur: .5rem;\n}\n");
|
|
906
|
-
})($ || ($ = {}));
|
|
907
|
-
//mol/gap/-css/gap.css.ts
|
|
908
|
-
;
|
|
909
|
-
"use strict";
|
|
910
|
-
var $;
|
|
911
|
-
(function ($) {
|
|
912
|
-
const { vary } = $mol_style_func;
|
|
913
|
-
$.$mol_gap = {
|
|
914
|
-
block: vary('--mol_gap_block'),
|
|
915
|
-
text: vary('--mol_gap_text'),
|
|
916
|
-
round: vary('--mol_gap_round'),
|
|
917
|
-
space: vary('--mol_gap_space'),
|
|
918
|
-
blur: vary('--mol_gap_blur'),
|
|
919
|
-
};
|
|
920
|
-
})($ || ($ = {}));
|
|
921
|
-
//mol/gap/gap.ts
|
|
922
|
-
;
|
|
923
|
-
"use strict";
|
|
924
|
-
var $;
|
|
925
|
-
(function ($_1) {
|
|
926
|
-
let $$;
|
|
927
|
-
(function ($$) {
|
|
928
|
-
let $;
|
|
929
|
-
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
930
|
-
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
931
|
-
class $mol_object extends $mol_object2 {
|
|
932
|
-
static make(config) {
|
|
933
|
-
return super.create(obj => {
|
|
934
|
-
for (let key in config)
|
|
935
|
-
obj[key] = config[key];
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
$_1.$mol_object = $mol_object;
|
|
940
|
-
})($ || ($ = {}));
|
|
941
|
-
//mol/object/object.ts
|
|
942
|
-
;
|
|
943
|
-
"use strict";
|
|
944
|
-
var $;
|
|
945
|
-
(function ($) {
|
|
946
|
-
class $mol_window extends $mol_object {
|
|
947
|
-
static size() {
|
|
948
|
-
return {
|
|
949
|
-
width: 1024,
|
|
950
|
-
height: 768,
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
$.$mol_window = $mol_window;
|
|
955
|
-
})($ || ($ = {}));
|
|
956
|
-
//mol/window/window.node.ts
|
|
957
|
-
;
|
|
958
|
-
"use strict";
|
|
959
|
-
var $;
|
|
960
|
-
(function ($) {
|
|
961
|
-
let $mol_wire_cursor;
|
|
962
|
-
(function ($mol_wire_cursor) {
|
|
963
|
-
$mol_wire_cursor[$mol_wire_cursor["stale"] = -1] = "stale";
|
|
964
|
-
$mol_wire_cursor[$mol_wire_cursor["doubt"] = -2] = "doubt";
|
|
965
|
-
$mol_wire_cursor[$mol_wire_cursor["fresh"] = -3] = "fresh";
|
|
966
|
-
$mol_wire_cursor[$mol_wire_cursor["final"] = -4] = "final";
|
|
967
|
-
})($mol_wire_cursor = $.$mol_wire_cursor || ($.$mol_wire_cursor = {}));
|
|
968
|
-
})($ || ($ = {}));
|
|
969
|
-
//mol/wire/cursor/cursor.ts
|
|
970
|
-
;
|
|
971
|
-
"use strict";
|
|
972
|
-
var $;
|
|
973
|
-
(function ($) {
|
|
974
|
-
class $mol_wire_pub extends Object {
|
|
975
|
-
data = [];
|
|
976
|
-
static get [Symbol.species]() {
|
|
977
|
-
return Array;
|
|
978
|
-
}
|
|
979
|
-
sub_from = 0;
|
|
980
|
-
get sub_list() {
|
|
981
|
-
const res = [];
|
|
982
|
-
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
983
|
-
res.push(this.data[i]);
|
|
984
|
-
}
|
|
985
|
-
return res;
|
|
986
|
-
}
|
|
987
|
-
get sub_empty() {
|
|
988
|
-
return this.sub_from === this.data.length;
|
|
989
|
-
}
|
|
990
|
-
sub_on(sub, pub_pos) {
|
|
991
|
-
const pos = this.data.length;
|
|
992
|
-
this.data.push(sub, pub_pos);
|
|
993
|
-
return pos;
|
|
994
|
-
}
|
|
995
|
-
sub_off(sub_pos) {
|
|
996
|
-
if (!(sub_pos < this.data.length)) {
|
|
997
|
-
$mol_fail(new Error(`Wrong pos ${sub_pos}`));
|
|
998
|
-
}
|
|
999
|
-
const end = this.data.length - 2;
|
|
1000
|
-
if (sub_pos !== end) {
|
|
1001
|
-
this.peer_move(end, sub_pos);
|
|
1002
|
-
}
|
|
1003
|
-
this.data.pop();
|
|
1004
|
-
this.data.pop();
|
|
1005
|
-
if (this.data.length === this.sub_from)
|
|
1006
|
-
this.reap();
|
|
1007
|
-
}
|
|
1008
|
-
reap() { }
|
|
1009
|
-
promote() {
|
|
1010
|
-
$mol_wire_auto()?.track_next(this);
|
|
1011
|
-
}
|
|
1012
|
-
fresh() { }
|
|
1013
|
-
complete() { }
|
|
1014
|
-
emit(quant = $mol_wire_cursor.stale) {
|
|
1015
|
-
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
1016
|
-
;
|
|
1017
|
-
this.data[i].absorb(quant);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
peer_move(from_pos, to_pos) {
|
|
1021
|
-
const peer = this.data[from_pos];
|
|
1022
|
-
const self_pos = this.data[from_pos + 1];
|
|
1023
|
-
this.data[to_pos] = peer;
|
|
1024
|
-
this.data[to_pos + 1] = self_pos;
|
|
1025
|
-
peer.peer_repos(self_pos, to_pos);
|
|
1026
|
-
}
|
|
1027
|
-
peer_repos(peer_pos, self_pos) {
|
|
1028
|
-
this.data[peer_pos + 1] = self_pos;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
$.$mol_wire_pub = $mol_wire_pub;
|
|
1032
|
-
})($ || ($ = {}));
|
|
1033
|
-
//mol/wire/pub/pub.ts
|
|
1034
|
-
;
|
|
1035
|
-
"use strict";
|
|
1036
|
-
//mol/wire/sub/sub.ts
|
|
1037
|
-
;
|
|
1038
|
-
"use strict";
|
|
1039
|
-
var $;
|
|
1040
|
-
(function ($) {
|
|
1041
|
-
let auto = null;
|
|
1042
|
-
function $mol_wire_auto(next = auto) {
|
|
1043
|
-
return auto = next;
|
|
1044
|
-
}
|
|
1045
|
-
$.$mol_wire_auto = $mol_wire_auto;
|
|
1046
|
-
$.$mol_wire_affected = [];
|
|
1047
|
-
})($ || ($ = {}));
|
|
1048
|
-
//mol/wire/wire.ts
|
|
1049
|
-
;
|
|
1050
|
-
"use strict";
|
|
1051
|
-
var $;
|
|
1052
|
-
(function ($) {
|
|
1053
|
-
$['devtoolsFormatters'] = $['devtoolsFormatters'] || [];
|
|
1054
|
-
function $mol_dev_format_register(config) {
|
|
1055
|
-
$['devtoolsFormatters'].push(config);
|
|
1056
|
-
}
|
|
1057
|
-
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
1058
|
-
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
1059
|
-
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
1060
|
-
$mol_dev_format_register({
|
|
1061
|
-
header: (val, config = false) => {
|
|
1062
|
-
if (config)
|
|
1063
|
-
return null;
|
|
1064
|
-
if (!val)
|
|
1065
|
-
return null;
|
|
1066
|
-
if ($.$mol_dev_format_head in val) {
|
|
1067
|
-
return val[$.$mol_dev_format_head]();
|
|
1068
|
-
}
|
|
1069
|
-
if (typeof val === 'function') {
|
|
1070
|
-
return $mol_dev_format_native(val);
|
|
339
|
+
if (typeof val === 'function') {
|
|
340
|
+
return $mol_dev_format_native(val);
|
|
1071
341
|
}
|
|
1072
342
|
return null;
|
|
1073
343
|
},
|
|
@@ -1756,29 +1026,223 @@ var $;
|
|
|
1756
1026
|
}
|
|
1757
1027
|
put(next) {
|
|
1758
1028
|
const prev = this.cache;
|
|
1759
|
-
this.cache = next;
|
|
1760
|
-
if (next instanceof Promise) {
|
|
1761
|
-
this.cursor = $mol_wire_cursor.fresh;
|
|
1762
|
-
if (next !== prev)
|
|
1029
|
+
this.cache = next;
|
|
1030
|
+
if (next instanceof Promise) {
|
|
1031
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
1032
|
+
if (next !== prev)
|
|
1033
|
+
this.emit();
|
|
1034
|
+
return next;
|
|
1035
|
+
}
|
|
1036
|
+
this.cursor = $mol_wire_cursor.final;
|
|
1037
|
+
if (this.sub_empty)
|
|
1038
|
+
this.destructor();
|
|
1039
|
+
else if (next !== prev)
|
|
1040
|
+
this.emit();
|
|
1041
|
+
return next;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
$.$mol_wire_task = $mol_wire_task;
|
|
1045
|
+
})($ || ($ = {}));
|
|
1046
|
+
//mol/wire/task/task.ts
|
|
1047
|
+
;
|
|
1048
|
+
"use strict";
|
|
1049
|
+
var $;
|
|
1050
|
+
(function ($) {
|
|
1051
|
+
function $mol_wire_method(host, field, descr) {
|
|
1052
|
+
if (!descr)
|
|
1053
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1054
|
+
const orig = descr?.value ?? host[field];
|
|
1055
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
1056
|
+
if (typeof sup[field] === 'function') {
|
|
1057
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1058
|
+
}
|
|
1059
|
+
const temp = $mol_wire_task.getter(orig);
|
|
1060
|
+
const value = function (...args) {
|
|
1061
|
+
const fiber = temp(this ?? null, args);
|
|
1062
|
+
return fiber.sync();
|
|
1063
|
+
};
|
|
1064
|
+
Object.defineProperty(value, 'name', { value: orig.name + ' ' });
|
|
1065
|
+
Object.assign(value, { orig });
|
|
1066
|
+
const descr2 = { ...descr, value };
|
|
1067
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1068
|
+
return descr2;
|
|
1069
|
+
}
|
|
1070
|
+
$.$mol_wire_method = $mol_wire_method;
|
|
1071
|
+
})($ || ($ = {}));
|
|
1072
|
+
//mol/wire/method/method.ts
|
|
1073
|
+
;
|
|
1074
|
+
"use strict";
|
|
1075
|
+
//mol/type/tail/tail.ts
|
|
1076
|
+
;
|
|
1077
|
+
"use strict";
|
|
1078
|
+
//mol/type/foot/foot.ts
|
|
1079
|
+
;
|
|
1080
|
+
"use strict";
|
|
1081
|
+
var $;
|
|
1082
|
+
(function ($) {
|
|
1083
|
+
const catched = new WeakMap();
|
|
1084
|
+
function $mol_fail_catch(error) {
|
|
1085
|
+
if (typeof error !== 'object')
|
|
1086
|
+
return false;
|
|
1087
|
+
if (error instanceof Promise)
|
|
1088
|
+
$mol_fail_hidden(error);
|
|
1089
|
+
if (catched.get(error))
|
|
1090
|
+
return false;
|
|
1091
|
+
catched.set(error, true);
|
|
1092
|
+
return true;
|
|
1093
|
+
}
|
|
1094
|
+
$.$mol_fail_catch = $mol_fail_catch;
|
|
1095
|
+
})($ || ($ = {}));
|
|
1096
|
+
//mol/fail/catch/catch.ts
|
|
1097
|
+
;
|
|
1098
|
+
"use strict";
|
|
1099
|
+
var $;
|
|
1100
|
+
(function ($) {
|
|
1101
|
+
function $mol_fail_log(error) {
|
|
1102
|
+
if (error instanceof Promise)
|
|
1103
|
+
return false;
|
|
1104
|
+
if (!$mol_fail_catch(error))
|
|
1105
|
+
return false;
|
|
1106
|
+
console.error(error);
|
|
1107
|
+
return true;
|
|
1108
|
+
}
|
|
1109
|
+
$.$mol_fail_log = $mol_fail_log;
|
|
1110
|
+
})($ || ($ = {}));
|
|
1111
|
+
//mol/fail/log/log.ts
|
|
1112
|
+
;
|
|
1113
|
+
"use strict";
|
|
1114
|
+
var $;
|
|
1115
|
+
(function ($) {
|
|
1116
|
+
class $mol_wire_atom extends $mol_wire_fiber {
|
|
1117
|
+
static solo(host, task) {
|
|
1118
|
+
const field = task.name + '()';
|
|
1119
|
+
const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1120
|
+
if (existen)
|
|
1121
|
+
return existen;
|
|
1122
|
+
const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
|
|
1123
|
+
const key = `${prefix}.${field}`;
|
|
1124
|
+
const fiber = new $mol_wire_atom(key, task, host, []);
|
|
1125
|
+
(host ?? task)[field] = fiber;
|
|
1126
|
+
return fiber;
|
|
1127
|
+
}
|
|
1128
|
+
static plex(host, task, key) {
|
|
1129
|
+
const field = task.name + '()';
|
|
1130
|
+
let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1131
|
+
const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
|
|
1132
|
+
const id = `${prefix}.${task.name}(${$mol_key(key)})`;
|
|
1133
|
+
if (dict) {
|
|
1134
|
+
const existen = dict.get(id);
|
|
1135
|
+
if (existen)
|
|
1136
|
+
return existen;
|
|
1137
|
+
}
|
|
1138
|
+
else {
|
|
1139
|
+
dict = (host ?? task)[field] = new Map();
|
|
1140
|
+
}
|
|
1141
|
+
const fiber = new $mol_wire_atom(id, task, host, [key]);
|
|
1142
|
+
dict.set(id, fiber);
|
|
1143
|
+
return fiber;
|
|
1144
|
+
}
|
|
1145
|
+
static watching = new Set();
|
|
1146
|
+
static watcher = null;
|
|
1147
|
+
static watch() {
|
|
1148
|
+
$mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
|
|
1149
|
+
for (const atom of $mol_wire_atom.watching) {
|
|
1150
|
+
if (atom.cursor === $mol_wire_cursor.final) {
|
|
1151
|
+
$mol_wire_atom.watching.delete(atom);
|
|
1152
|
+
}
|
|
1153
|
+
else {
|
|
1154
|
+
atom.cursor = $mol_wire_cursor.stale;
|
|
1155
|
+
atom.fresh();
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
watch() {
|
|
1160
|
+
if (!$mol_wire_atom.watcher) {
|
|
1161
|
+
$mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
|
|
1162
|
+
}
|
|
1163
|
+
$mol_wire_atom.watching.add(this);
|
|
1164
|
+
}
|
|
1165
|
+
resync(args) {
|
|
1166
|
+
return this.put(this.task.call(this.host, ...args));
|
|
1167
|
+
}
|
|
1168
|
+
once() {
|
|
1169
|
+
return this.sync();
|
|
1170
|
+
}
|
|
1171
|
+
channel() {
|
|
1172
|
+
return Object.assign((next) => {
|
|
1173
|
+
if (next !== undefined)
|
|
1174
|
+
return this.resync([...this.args, next]);
|
|
1175
|
+
if (!$mol_wire_fiber.warm)
|
|
1176
|
+
return this.result();
|
|
1177
|
+
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1178
|
+
return this.once();
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
return this.sync();
|
|
1182
|
+
}
|
|
1183
|
+
}, { atom: this });
|
|
1184
|
+
}
|
|
1185
|
+
destructor() {
|
|
1186
|
+
super.destructor();
|
|
1187
|
+
const prev = this.cache;
|
|
1188
|
+
if ($mol_owning_check(this, prev)) {
|
|
1189
|
+
prev.destructor();
|
|
1190
|
+
}
|
|
1191
|
+
if (this.pub_from === 0) {
|
|
1192
|
+
;
|
|
1193
|
+
(this.host ?? this.task)[this.field()] = null;
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
;
|
|
1197
|
+
(this.host ?? this.task)[this.field()].delete(this[Symbol.toStringTag]);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
put(next) {
|
|
1201
|
+
const prev = this.cache;
|
|
1202
|
+
update: if (next !== prev) {
|
|
1203
|
+
try {
|
|
1204
|
+
if ($mol_compare_deep(prev, next))
|
|
1205
|
+
break update;
|
|
1206
|
+
}
|
|
1207
|
+
catch (error) {
|
|
1208
|
+
$mol_fail_log(error);
|
|
1209
|
+
}
|
|
1210
|
+
if ($mol_owning_check(this, prev)) {
|
|
1211
|
+
prev.destructor();
|
|
1212
|
+
}
|
|
1213
|
+
if ($mol_owning_catch(this, next)) {
|
|
1214
|
+
try {
|
|
1215
|
+
next[Symbol.toStringTag] = this[Symbol.toStringTag];
|
|
1216
|
+
}
|
|
1217
|
+
catch {
|
|
1218
|
+
Object.defineProperty(next, Symbol.toStringTag, { value: this[Symbol.toStringTag] });
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
if (!this.sub_empty)
|
|
1763
1222
|
this.emit();
|
|
1764
|
-
return next;
|
|
1765
1223
|
}
|
|
1766
|
-
this.
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1224
|
+
this.cache = next;
|
|
1225
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
1226
|
+
if (next instanceof Promise)
|
|
1227
|
+
return next;
|
|
1228
|
+
this.complete_pubs();
|
|
1771
1229
|
return next;
|
|
1772
1230
|
}
|
|
1773
1231
|
}
|
|
1774
|
-
|
|
1232
|
+
__decorate([
|
|
1233
|
+
$mol_wire_method
|
|
1234
|
+
], $mol_wire_atom.prototype, "resync", null);
|
|
1235
|
+
__decorate([
|
|
1236
|
+
$mol_wire_method
|
|
1237
|
+
], $mol_wire_atom.prototype, "once", null);
|
|
1238
|
+
$.$mol_wire_atom = $mol_wire_atom;
|
|
1775
1239
|
})($ || ($ = {}));
|
|
1776
|
-
//mol/wire/
|
|
1240
|
+
//mol/wire/atom/atom.ts
|
|
1777
1241
|
;
|
|
1778
1242
|
"use strict";
|
|
1779
1243
|
var $;
|
|
1780
1244
|
(function ($) {
|
|
1781
|
-
function $
|
|
1245
|
+
function $mol_wire_solo(host, field, descr) {
|
|
1782
1246
|
if (!descr)
|
|
1783
1247
|
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1784
1248
|
const orig = descr?.value ?? host[field];
|
|
@@ -1786,270 +1250,627 @@ var $;
|
|
|
1786
1250
|
if (typeof sup[field] === 'function') {
|
|
1787
1251
|
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1788
1252
|
}
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1253
|
+
const descr2 = {
|
|
1254
|
+
...descr,
|
|
1255
|
+
value: function (...args) {
|
|
1256
|
+
let atom = $mol_wire_atom.solo(this, orig);
|
|
1257
|
+
if ((args.length === 0) || (args[0] === undefined)) {
|
|
1258
|
+
if (!$mol_wire_fiber.warm)
|
|
1259
|
+
return atom.result();
|
|
1260
|
+
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1261
|
+
return atom.once();
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
return atom.sync();
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
return atom.resync(args);
|
|
1268
|
+
}
|
|
1793
1269
|
};
|
|
1794
|
-
|
|
1795
|
-
Object.assign(value, { orig });
|
|
1796
|
-
const descr2 = { ...descr, value };
|
|
1270
|
+
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
1271
|
+
Object.assign(descr2.value, { orig });
|
|
1797
1272
|
Reflect.defineProperty(host, field, descr2);
|
|
1798
1273
|
return descr2;
|
|
1799
1274
|
}
|
|
1800
|
-
$.$
|
|
1275
|
+
$.$mol_wire_solo = $mol_wire_solo;
|
|
1801
1276
|
})($ || ($ = {}));
|
|
1802
|
-
//mol/wire/
|
|
1803
|
-
;
|
|
1804
|
-
"use strict";
|
|
1805
|
-
//mol/type/tail/tail.ts
|
|
1806
|
-
;
|
|
1807
|
-
"use strict";
|
|
1808
|
-
//mol/type/foot/foot.ts
|
|
1277
|
+
//mol/wire/solo/solo.ts
|
|
1809
1278
|
;
|
|
1810
1279
|
"use strict";
|
|
1811
1280
|
var $;
|
|
1812
1281
|
(function ($) {
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1282
|
+
function $mol_wire_plex(host, field, descr) {
|
|
1283
|
+
if (!descr)
|
|
1284
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1285
|
+
const orig = descr?.value ?? host[field];
|
|
1286
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
1287
|
+
if (typeof sup[field] === 'function') {
|
|
1288
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1289
|
+
}
|
|
1290
|
+
const descr2 = {
|
|
1291
|
+
...descr,
|
|
1292
|
+
value: function (...args) {
|
|
1293
|
+
let atom = $mol_wire_atom.plex(this, orig, args[0]);
|
|
1294
|
+
if ((args.length === 1) || (args[1] === undefined)) {
|
|
1295
|
+
if (!$mol_wire_fiber.warm)
|
|
1296
|
+
return atom.result();
|
|
1297
|
+
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1298
|
+
return atom.once();
|
|
1299
|
+
}
|
|
1300
|
+
else {
|
|
1301
|
+
return atom.sync();
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
return atom.resync(args);
|
|
1305
|
+
}
|
|
1306
|
+
};
|
|
1307
|
+
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
1308
|
+
Object.assign(descr2.value, { orig });
|
|
1309
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1310
|
+
return descr2;
|
|
1823
1311
|
}
|
|
1824
|
-
$.$
|
|
1312
|
+
$.$mol_wire_plex = $mol_wire_plex;
|
|
1825
1313
|
})($ || ($ = {}));
|
|
1826
|
-
//mol/
|
|
1314
|
+
//mol/wire/plex/plex.ts
|
|
1827
1315
|
;
|
|
1828
1316
|
"use strict";
|
|
1829
1317
|
var $;
|
|
1830
1318
|
(function ($) {
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
return false;
|
|
1834
|
-
if (!$mol_fail_catch(error))
|
|
1835
|
-
return false;
|
|
1836
|
-
console.error(error);
|
|
1837
|
-
return true;
|
|
1838
|
-
}
|
|
1839
|
-
$.$mol_fail_log = $mol_fail_log;
|
|
1319
|
+
$.$mol_mem = $mol_wire_solo;
|
|
1320
|
+
$.$mol_mem_key = $mol_wire_plex;
|
|
1840
1321
|
})($ || ($ = {}));
|
|
1841
|
-
//mol/
|
|
1322
|
+
//mol/mem/mem.ts
|
|
1842
1323
|
;
|
|
1843
1324
|
"use strict";
|
|
1844
1325
|
var $;
|
|
1845
1326
|
(function ($) {
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
return
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1327
|
+
})($ || ($ = {}));
|
|
1328
|
+
//mol/dom/context/context.ts
|
|
1329
|
+
;
|
|
1330
|
+
"use strict";
|
|
1331
|
+
//node/node.ts
|
|
1332
|
+
;
|
|
1333
|
+
"use strict";
|
|
1334
|
+
var $node = new Proxy({ require }, {
|
|
1335
|
+
get(target, name, wrapper) {
|
|
1336
|
+
if (target[name])
|
|
1337
|
+
return target[name];
|
|
1338
|
+
const mod = target.require('module');
|
|
1339
|
+
if (mod.builtinModules.indexOf(name) >= 0)
|
|
1340
|
+
return target.require(name);
|
|
1341
|
+
if (name[0] === '.')
|
|
1342
|
+
return target.require(name);
|
|
1343
|
+
const path = target.require('path');
|
|
1344
|
+
const fs = target.require('fs');
|
|
1345
|
+
let dir = path.resolve('.');
|
|
1346
|
+
const suffix = `./node_modules/${name}`;
|
|
1347
|
+
const $$ = $;
|
|
1348
|
+
while (!fs.existsSync(path.join(dir, suffix))) {
|
|
1349
|
+
const parent = path.resolve(dir, '..');
|
|
1350
|
+
if (parent === dir) {
|
|
1351
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
1352
|
+
try {
|
|
1353
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
1354
|
+
}
|
|
1355
|
+
catch { }
|
|
1356
|
+
break;
|
|
1867
1357
|
}
|
|
1868
1358
|
else {
|
|
1869
|
-
|
|
1359
|
+
dir = parent;
|
|
1870
1360
|
}
|
|
1871
|
-
const fiber = new $mol_wire_atom(id, task, host, [key]);
|
|
1872
|
-
dict.set(id, fiber);
|
|
1873
|
-
return fiber;
|
|
1874
1361
|
}
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1362
|
+
return target.require(name);
|
|
1363
|
+
},
|
|
1364
|
+
set(target, name, value) {
|
|
1365
|
+
target[name] = value;
|
|
1366
|
+
return true;
|
|
1367
|
+
},
|
|
1368
|
+
});
|
|
1369
|
+
require = (req => Object.assign(function require(name) {
|
|
1370
|
+
return $node[name];
|
|
1371
|
+
}, req))(require);
|
|
1372
|
+
//node/node.node.ts
|
|
1373
|
+
;
|
|
1374
|
+
"use strict";
|
|
1375
|
+
var $;
|
|
1376
|
+
(function ($) {
|
|
1377
|
+
function $mol_log3_area_lazy(event) {
|
|
1378
|
+
const self = this;
|
|
1379
|
+
const stack = self.$mol_log3_stack;
|
|
1380
|
+
const deep = stack.length;
|
|
1381
|
+
let logged = false;
|
|
1382
|
+
stack.push(() => {
|
|
1383
|
+
logged = true;
|
|
1384
|
+
self.$mol_log3_area.call(self, event);
|
|
1385
|
+
});
|
|
1386
|
+
return () => {
|
|
1387
|
+
if (logged)
|
|
1388
|
+
self.console.groupEnd();
|
|
1389
|
+
if (stack.length > deep)
|
|
1390
|
+
stack.length = deep;
|
|
1391
|
+
};
|
|
1392
|
+
}
|
|
1393
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
1394
|
+
$.$mol_log3_stack = [];
|
|
1395
|
+
})($ || ($ = {}));
|
|
1396
|
+
//mol/log3/log3.ts
|
|
1397
|
+
;
|
|
1398
|
+
"use strict";
|
|
1399
|
+
var $;
|
|
1400
|
+
(function ($) {
|
|
1401
|
+
$.$mol_tree_convert = Symbol('$mol_tree_convert');
|
|
1402
|
+
class $mol_tree extends $mol_object2 {
|
|
1403
|
+
type;
|
|
1404
|
+
data;
|
|
1405
|
+
sub;
|
|
1406
|
+
baseUri;
|
|
1407
|
+
row;
|
|
1408
|
+
col;
|
|
1409
|
+
length;
|
|
1410
|
+
constructor(config = {}) {
|
|
1411
|
+
super();
|
|
1412
|
+
this.type = config.type || '';
|
|
1413
|
+
if (config.value !== undefined) {
|
|
1414
|
+
var sub = $mol_tree.values(config.value);
|
|
1415
|
+
if (config.type || sub.length > 1) {
|
|
1416
|
+
this.sub = [...sub, ...(config.sub || [])];
|
|
1417
|
+
this.data = config.data || '';
|
|
1882
1418
|
}
|
|
1883
1419
|
else {
|
|
1884
|
-
|
|
1885
|
-
|
|
1420
|
+
this.data = sub[0].data;
|
|
1421
|
+
this.sub = config.sub || [];
|
|
1886
1422
|
}
|
|
1887
1423
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
$mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
|
|
1424
|
+
else {
|
|
1425
|
+
this.data = config.data || '';
|
|
1426
|
+
this.sub = config.sub || [];
|
|
1892
1427
|
}
|
|
1893
|
-
|
|
1428
|
+
this.baseUri = config.baseUri || '';
|
|
1429
|
+
this.row = config.row || 0;
|
|
1430
|
+
this.col = config.col || 0;
|
|
1431
|
+
this.length = config.length || 0;
|
|
1894
1432
|
}
|
|
1895
|
-
|
|
1896
|
-
return
|
|
1433
|
+
static values(str, baseUri) {
|
|
1434
|
+
return str.split('\n').map((data, index) => new $mol_tree({
|
|
1435
|
+
data: data,
|
|
1436
|
+
baseUri: baseUri,
|
|
1437
|
+
row: index + 1,
|
|
1438
|
+
length: data.length,
|
|
1439
|
+
}));
|
|
1897
1440
|
}
|
|
1898
|
-
|
|
1899
|
-
return
|
|
1441
|
+
clone(config = {}) {
|
|
1442
|
+
return new $mol_tree({
|
|
1443
|
+
type: ('type' in config) ? config.type : this.type,
|
|
1444
|
+
data: ('data' in config) ? config.data : this.data,
|
|
1445
|
+
sub: ('sub' in config) ? config.sub : this.sub,
|
|
1446
|
+
baseUri: ('baseUri' in config) ? config.baseUri : this.baseUri,
|
|
1447
|
+
row: ('row' in config) ? config.row : this.row,
|
|
1448
|
+
col: ('col' in config) ? config.col : this.col,
|
|
1449
|
+
length: ('length' in config) ? config.length : this.length,
|
|
1450
|
+
value: config.value
|
|
1451
|
+
});
|
|
1900
1452
|
}
|
|
1901
|
-
|
|
1902
|
-
return
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1453
|
+
make(config) {
|
|
1454
|
+
return new $mol_tree({
|
|
1455
|
+
baseUri: this.baseUri,
|
|
1456
|
+
row: this.row,
|
|
1457
|
+
col: this.col,
|
|
1458
|
+
length: this.length,
|
|
1459
|
+
...config,
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1462
|
+
make_data(value, sub) {
|
|
1463
|
+
return this.make({ value, sub });
|
|
1464
|
+
}
|
|
1465
|
+
make_struct(type, sub) {
|
|
1466
|
+
return this.make({ type, sub });
|
|
1467
|
+
}
|
|
1468
|
+
static fromString(str, baseUri) {
|
|
1469
|
+
var root = new $mol_tree({ baseUri: baseUri });
|
|
1470
|
+
var stack = [root];
|
|
1471
|
+
var row = 0;
|
|
1472
|
+
var prefix = str.replace(/^\n?(\t*)[\s\S]*/, '$1');
|
|
1473
|
+
var lines = str.replace(new RegExp('^\\t{0,' + prefix.length + '}', 'mg'), '').split('\n');
|
|
1474
|
+
lines.forEach(line => {
|
|
1475
|
+
++row;
|
|
1476
|
+
var chunks = /^(\t*)((?:[^\n\t\\ ]+ *)*)(\\[^\n]*)?(.*?)(?:$|\n)/m.exec(line);
|
|
1477
|
+
if (!chunks || chunks[4])
|
|
1478
|
+
return this.$.$mol_fail(new Error(`Syntax error at ${baseUri}:${row}\n${line}`));
|
|
1479
|
+
var indent = chunks[1];
|
|
1480
|
+
var path = chunks[2];
|
|
1481
|
+
var data = chunks[3];
|
|
1482
|
+
var deep = indent.length;
|
|
1483
|
+
var types = path ? path.replace(/ $/, '').split(/ +/) : [];
|
|
1484
|
+
if (stack.length <= deep)
|
|
1485
|
+
return this.$.$mol_fail(new Error(`Too many tabs at ${baseUri}:${row}\n${line}`));
|
|
1486
|
+
stack.length = deep + 1;
|
|
1487
|
+
var parent = stack[deep];
|
|
1488
|
+
let col = deep;
|
|
1489
|
+
types.forEach(type => {
|
|
1490
|
+
if (!type)
|
|
1491
|
+
return this.$.$mol_fail(new Error(`Unexpected space symbol ${baseUri}:${row}\n${line}`));
|
|
1492
|
+
var next = new $mol_tree({ type, baseUri, row, col, length: type.length });
|
|
1493
|
+
const parent_sub = parent.sub;
|
|
1494
|
+
parent_sub.push(next);
|
|
1495
|
+
parent = next;
|
|
1496
|
+
col += type.length + 1;
|
|
1497
|
+
});
|
|
1498
|
+
if (data) {
|
|
1499
|
+
var next = new $mol_tree({ data: data.substring(1), baseUri, row, col, length: data.length });
|
|
1500
|
+
const parent_sub = parent.sub;
|
|
1501
|
+
parent_sub.push(next);
|
|
1502
|
+
parent = next;
|
|
1909
1503
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1504
|
+
stack.push(parent);
|
|
1505
|
+
});
|
|
1506
|
+
return root;
|
|
1507
|
+
}
|
|
1508
|
+
static fromJSON(json, baseUri = '') {
|
|
1509
|
+
switch (true) {
|
|
1510
|
+
case typeof json === 'boolean':
|
|
1511
|
+
case typeof json === 'number':
|
|
1512
|
+
case json === null:
|
|
1513
|
+
return new $mol_tree({
|
|
1514
|
+
type: String(json),
|
|
1515
|
+
baseUri: baseUri
|
|
1516
|
+
});
|
|
1517
|
+
case typeof json === 'string':
|
|
1518
|
+
return new $mol_tree({
|
|
1519
|
+
value: json,
|
|
1520
|
+
baseUri: baseUri
|
|
1521
|
+
});
|
|
1522
|
+
case Array.isArray(json):
|
|
1523
|
+
return new $mol_tree({
|
|
1524
|
+
type: "/",
|
|
1525
|
+
sub: json.map(json => $mol_tree.fromJSON(json, baseUri))
|
|
1526
|
+
});
|
|
1527
|
+
case json instanceof Date:
|
|
1528
|
+
return new $mol_tree({
|
|
1529
|
+
value: json.toISOString(),
|
|
1530
|
+
baseUri: baseUri
|
|
1531
|
+
});
|
|
1532
|
+
default:
|
|
1533
|
+
if (typeof json[$.$mol_tree_convert] === 'function') {
|
|
1534
|
+
return json[$.$mol_tree_convert]();
|
|
1535
|
+
}
|
|
1536
|
+
if (typeof json.toJSON === 'function') {
|
|
1537
|
+
return $mol_tree.fromJSON(json.toJSON());
|
|
1538
|
+
}
|
|
1539
|
+
if (json instanceof Error) {
|
|
1540
|
+
const { name, message, stack } = json;
|
|
1541
|
+
json = { ...json, name, message, stack };
|
|
1542
|
+
}
|
|
1543
|
+
var sub = [];
|
|
1544
|
+
for (var key in json) {
|
|
1545
|
+
if (json[key] === undefined)
|
|
1546
|
+
continue;
|
|
1547
|
+
const subsub = $mol_tree.fromJSON(json[key], baseUri);
|
|
1548
|
+
if (/^[^\n\t\\ ]+$/.test(key)) {
|
|
1549
|
+
var child = new $mol_tree({
|
|
1550
|
+
type: key,
|
|
1551
|
+
baseUri: baseUri,
|
|
1552
|
+
sub: [subsub],
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
else {
|
|
1556
|
+
var child = new $mol_tree({
|
|
1557
|
+
value: key,
|
|
1558
|
+
baseUri: baseUri,
|
|
1559
|
+
sub: [subsub],
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
sub.push(child);
|
|
1563
|
+
}
|
|
1564
|
+
return new $mol_tree({
|
|
1565
|
+
type: "*",
|
|
1566
|
+
sub: sub,
|
|
1567
|
+
baseUri: baseUri
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
get uri() {
|
|
1572
|
+
return this.baseUri + '#' + this.row + ':' + this.col;
|
|
1573
|
+
}
|
|
1574
|
+
toString(prefix = '') {
|
|
1575
|
+
var output = '';
|
|
1576
|
+
if (this.type.length) {
|
|
1577
|
+
if (!prefix.length) {
|
|
1578
|
+
prefix = "\t";
|
|
1912
1579
|
}
|
|
1913
|
-
|
|
1580
|
+
output += this.type;
|
|
1581
|
+
if (this.sub.length == 1) {
|
|
1582
|
+
return output + ' ' + this.sub[0].toString(prefix);
|
|
1583
|
+
}
|
|
1584
|
+
output += "\n";
|
|
1585
|
+
}
|
|
1586
|
+
else if (this.data.length || prefix.length) {
|
|
1587
|
+
output += "\\" + this.data + "\n";
|
|
1588
|
+
}
|
|
1589
|
+
for (var child of this.sub) {
|
|
1590
|
+
output += prefix;
|
|
1591
|
+
output += child.toString(prefix + "\t");
|
|
1592
|
+
}
|
|
1593
|
+
return output;
|
|
1914
1594
|
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
if (
|
|
1919
|
-
|
|
1595
|
+
toJSON() {
|
|
1596
|
+
if (!this.type)
|
|
1597
|
+
return this.value;
|
|
1598
|
+
if (this.type === 'true')
|
|
1599
|
+
return true;
|
|
1600
|
+
if (this.type === 'false')
|
|
1601
|
+
return false;
|
|
1602
|
+
if (this.type === 'null')
|
|
1603
|
+
return null;
|
|
1604
|
+
if (this.type === '*') {
|
|
1605
|
+
var obj = {};
|
|
1606
|
+
for (var child of this.sub) {
|
|
1607
|
+
if (child.type === '-')
|
|
1608
|
+
continue;
|
|
1609
|
+
var key = child.type || child.clone({ sub: child.sub.slice(0, child.sub.length - 1) }).value;
|
|
1610
|
+
var val = child.sub[child.sub.length - 1].toJSON();
|
|
1611
|
+
if (val !== undefined)
|
|
1612
|
+
obj[key] = val;
|
|
1613
|
+
}
|
|
1614
|
+
return obj;
|
|
1615
|
+
}
|
|
1616
|
+
if (this.type === '/') {
|
|
1617
|
+
var res = [];
|
|
1618
|
+
this.sub.forEach(child => {
|
|
1619
|
+
if (child.type === '-')
|
|
1620
|
+
return;
|
|
1621
|
+
var val = child.toJSON();
|
|
1622
|
+
if (val !== undefined)
|
|
1623
|
+
res.push(val);
|
|
1624
|
+
});
|
|
1625
|
+
return res;
|
|
1626
|
+
}
|
|
1627
|
+
if (this.type === 'time') {
|
|
1628
|
+
return new Date(this.value);
|
|
1629
|
+
}
|
|
1630
|
+
const numb = Number(this.type);
|
|
1631
|
+
if (!Number.isNaN(numb) || this.type === 'NaN')
|
|
1632
|
+
return numb;
|
|
1633
|
+
throw new Error(`Unknown type (${this.type}) at ${this.uri}`);
|
|
1634
|
+
}
|
|
1635
|
+
get value() {
|
|
1636
|
+
var values = [];
|
|
1637
|
+
for (var child of this.sub) {
|
|
1638
|
+
if (child.type)
|
|
1639
|
+
continue;
|
|
1640
|
+
values.push(child.value);
|
|
1641
|
+
}
|
|
1642
|
+
return this.data + values.join("\n");
|
|
1643
|
+
}
|
|
1644
|
+
insert(value, ...path) {
|
|
1645
|
+
if (path.length === 0)
|
|
1646
|
+
return value;
|
|
1647
|
+
const type = path[0];
|
|
1648
|
+
if (typeof type === 'string') {
|
|
1649
|
+
let replaced = false;
|
|
1650
|
+
const sub = this.sub.map((item, index) => {
|
|
1651
|
+
if (item.type !== type)
|
|
1652
|
+
return item;
|
|
1653
|
+
replaced = true;
|
|
1654
|
+
return item.insert(value, ...path.slice(1));
|
|
1655
|
+
});
|
|
1656
|
+
if (!replaced)
|
|
1657
|
+
sub.push(new $mol_tree({ type }).insert(value, ...path.slice(1)));
|
|
1658
|
+
return this.clone({ sub });
|
|
1920
1659
|
}
|
|
1921
|
-
if (
|
|
1922
|
-
;
|
|
1923
|
-
(
|
|
1660
|
+
else if (typeof type === 'number') {
|
|
1661
|
+
const sub = this.sub.slice();
|
|
1662
|
+
sub[type] = (sub[type] || new $mol_tree).insert(value, ...path.slice(1));
|
|
1663
|
+
return this.clone({ sub });
|
|
1924
1664
|
}
|
|
1925
1665
|
else {
|
|
1926
|
-
;
|
|
1927
|
-
(this.host ?? this.task)[this.field()].delete(this[Symbol.toStringTag]);
|
|
1666
|
+
return this.clone({ sub: ((this.sub.length === 0) ? [new $mol_tree()] : this.sub).map(item => item.insert(value, ...path.slice(1))) });
|
|
1928
1667
|
}
|
|
1929
1668
|
}
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1669
|
+
select(...path) {
|
|
1670
|
+
var next = [this];
|
|
1671
|
+
for (var type of path) {
|
|
1672
|
+
if (!next.length)
|
|
1673
|
+
break;
|
|
1674
|
+
var prev = next;
|
|
1675
|
+
next = [];
|
|
1676
|
+
for (var item of prev) {
|
|
1677
|
+
switch (typeof (type)) {
|
|
1678
|
+
case 'string':
|
|
1679
|
+
for (var child of item.sub) {
|
|
1680
|
+
if (!type || (child.type == type)) {
|
|
1681
|
+
next.push(child);
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
break;
|
|
1685
|
+
case 'number':
|
|
1686
|
+
if (type < item.sub.length)
|
|
1687
|
+
next.push(item.sub[type]);
|
|
1688
|
+
break;
|
|
1689
|
+
default: next.push(...item.sub);
|
|
1949
1690
|
}
|
|
1950
1691
|
}
|
|
1951
|
-
if (!this.sub_empty)
|
|
1952
|
-
this.emit();
|
|
1953
1692
|
}
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1693
|
+
return new $mol_tree({ sub: next });
|
|
1694
|
+
}
|
|
1695
|
+
filter(path, value) {
|
|
1696
|
+
var sub = this.sub.filter(function (item) {
|
|
1697
|
+
var found = item.select(...path);
|
|
1698
|
+
if (value == null) {
|
|
1699
|
+
return Boolean(found.sub.length);
|
|
1700
|
+
}
|
|
1701
|
+
else {
|
|
1702
|
+
return found.sub.some(child => child.value == value);
|
|
1703
|
+
}
|
|
1704
|
+
});
|
|
1705
|
+
return new $mol_tree({ sub: sub });
|
|
1706
|
+
}
|
|
1707
|
+
transform(visit, stack = []) {
|
|
1708
|
+
const sub_stack = [this, ...stack];
|
|
1709
|
+
return visit(sub_stack, () => this.sub.map(node => node.transform(visit, sub_stack)).filter(n => n));
|
|
1710
|
+
}
|
|
1711
|
+
hack(context) {
|
|
1712
|
+
const sub = [].concat(...this.sub.map(child => {
|
|
1713
|
+
const handle = context[child.type] || context[''];
|
|
1714
|
+
if (!handle)
|
|
1715
|
+
$mol_fail(child.error('Handler not defined'));
|
|
1716
|
+
return handle(child, context);
|
|
1717
|
+
}));
|
|
1718
|
+
return this.clone({ sub });
|
|
1719
|
+
}
|
|
1720
|
+
error(message) {
|
|
1721
|
+
return new Error(`${message}:\n${this} ${this.baseUri}:${this.row}:${this.col}`);
|
|
1960
1722
|
}
|
|
1961
1723
|
}
|
|
1962
|
-
|
|
1963
|
-
$mol_wire_method
|
|
1964
|
-
], $mol_wire_atom.prototype, "resync", null);
|
|
1965
|
-
__decorate([
|
|
1966
|
-
$mol_wire_method
|
|
1967
|
-
], $mol_wire_atom.prototype, "once", null);
|
|
1968
|
-
$.$mol_wire_atom = $mol_wire_atom;
|
|
1724
|
+
$.$mol_tree = $mol_tree;
|
|
1969
1725
|
})($ || ($ = {}));
|
|
1970
|
-
//mol/
|
|
1726
|
+
//mol/tree/tree.ts
|
|
1971
1727
|
;
|
|
1972
1728
|
"use strict";
|
|
1973
1729
|
var $;
|
|
1974
1730
|
(function ($) {
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1731
|
+
class $mol_term_color {
|
|
1732
|
+
static reset = this.ansi(0, 0);
|
|
1733
|
+
static bold = this.ansi(1, 22);
|
|
1734
|
+
static italic = this.ansi(3, 23);
|
|
1735
|
+
static underline = this.ansi(4, 24);
|
|
1736
|
+
static inverse = this.ansi(7, 27);
|
|
1737
|
+
static hidden = this.ansi(8, 28);
|
|
1738
|
+
static strike = this.ansi(9, 29);
|
|
1739
|
+
static gray = this.ansi(90, 39);
|
|
1740
|
+
static red = this.ansi(91, 39);
|
|
1741
|
+
static green = this.ansi(92, 39);
|
|
1742
|
+
static yellow = this.ansi(93, 39);
|
|
1743
|
+
static blue = this.ansi(94, 39);
|
|
1744
|
+
static magenta = this.ansi(95, 39);
|
|
1745
|
+
static cyan = this.ansi(96, 39);
|
|
1746
|
+
static Gray = (str) => this.inverse(this.gray(str));
|
|
1747
|
+
static Red = (str) => this.inverse(this.red(str));
|
|
1748
|
+
static Green = (str) => this.inverse(this.green(str));
|
|
1749
|
+
static Yellow = (str) => this.inverse(this.yellow(str));
|
|
1750
|
+
static Blue = (str) => this.inverse(this.blue(str));
|
|
1751
|
+
static Magenta = (str) => this.inverse(this.magenta(str));
|
|
1752
|
+
static Cyan = (str) => this.inverse(this.cyan(str));
|
|
1753
|
+
static ansi(open, close) {
|
|
1754
|
+
if (typeof process === 'undefined')
|
|
1755
|
+
return String;
|
|
1756
|
+
if (!process.stdout.isTTY)
|
|
1757
|
+
return String;
|
|
1758
|
+
const prefix = `\x1b[${open}m`;
|
|
1759
|
+
const postfix = `\x1b[${close}m`;
|
|
1760
|
+
const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
|
|
1761
|
+
return function colorer(str) {
|
|
1762
|
+
str = String(str);
|
|
1763
|
+
if (str === '')
|
|
1764
|
+
return str;
|
|
1765
|
+
const suffix = str.replace(suffix_regexp, prefix);
|
|
1766
|
+
return prefix + suffix + postfix;
|
|
1767
|
+
};
|
|
1982
1768
|
}
|
|
1983
|
-
const descr2 = {
|
|
1984
|
-
...descr,
|
|
1985
|
-
value: function (...args) {
|
|
1986
|
-
let atom = $mol_wire_atom.solo(this, orig);
|
|
1987
|
-
if ((args.length === 0) || (args[0] === undefined)) {
|
|
1988
|
-
if (!$mol_wire_fiber.warm)
|
|
1989
|
-
return atom.result();
|
|
1990
|
-
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1991
|
-
return atom.once();
|
|
1992
|
-
}
|
|
1993
|
-
else {
|
|
1994
|
-
return atom.sync();
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
return atom.resync(args);
|
|
1998
|
-
}
|
|
1999
|
-
};
|
|
2000
|
-
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
2001
|
-
Object.assign(descr2.value, { orig });
|
|
2002
|
-
Reflect.defineProperty(host, field, descr2);
|
|
2003
|
-
return descr2;
|
|
2004
1769
|
}
|
|
2005
|
-
$.$
|
|
1770
|
+
$.$mol_term_color = $mol_term_color;
|
|
2006
1771
|
})($ || ($ = {}));
|
|
2007
|
-
//mol/
|
|
1772
|
+
//mol/term/color/color.ts
|
|
2008
1773
|
;
|
|
2009
1774
|
"use strict";
|
|
2010
1775
|
var $;
|
|
2011
1776
|
(function ($) {
|
|
2012
|
-
function $
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
...descr,
|
|
2022
|
-
value: function (...args) {
|
|
2023
|
-
let atom = $mol_wire_atom.plex(this, orig, args[0]);
|
|
2024
|
-
if ((args.length === 1) || (args[1] === undefined)) {
|
|
2025
|
-
if (!$mol_wire_fiber.warm)
|
|
2026
|
-
return atom.result();
|
|
2027
|
-
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
2028
|
-
return atom.once();
|
|
2029
|
-
}
|
|
2030
|
-
else {
|
|
2031
|
-
return atom.sync();
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
return atom.resync(args);
|
|
2035
|
-
}
|
|
1777
|
+
function $mol_log3_node_make(level, output, type, color) {
|
|
1778
|
+
return function $mol_log3_logger(event) {
|
|
1779
|
+
if (!event.time)
|
|
1780
|
+
event = { time: new Date().toISOString(), ...event };
|
|
1781
|
+
const tree = this.$mol_tree.fromJSON(event).clone({ type });
|
|
1782
|
+
let str = color(tree.toString());
|
|
1783
|
+
this.console[level](str);
|
|
1784
|
+
const self = this;
|
|
1785
|
+
return () => self.console.groupEnd();
|
|
2036
1786
|
};
|
|
2037
|
-
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
2038
|
-
Object.assign(descr2.value, { orig });
|
|
2039
|
-
Reflect.defineProperty(host, field, descr2);
|
|
2040
|
-
return descr2;
|
|
2041
1787
|
}
|
|
2042
|
-
$.$
|
|
1788
|
+
$.$mol_log3_node_make = $mol_log3_node_make;
|
|
1789
|
+
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
|
|
1790
|
+
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
|
|
1791
|
+
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
|
|
1792
|
+
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
|
|
1793
|
+
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
|
|
1794
|
+
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
|
|
1795
|
+
})($ || ($ = {}));
|
|
1796
|
+
//mol/log3/log3.node.ts
|
|
1797
|
+
;
|
|
1798
|
+
"use strict";
|
|
1799
|
+
var $;
|
|
1800
|
+
(function ($) {
|
|
1801
|
+
function $mol_env() {
|
|
1802
|
+
return {};
|
|
1803
|
+
}
|
|
1804
|
+
$.$mol_env = $mol_env;
|
|
1805
|
+
})($ || ($ = {}));
|
|
1806
|
+
//mol/env/env.ts
|
|
1807
|
+
;
|
|
1808
|
+
"use strict";
|
|
1809
|
+
var $;
|
|
1810
|
+
(function ($) {
|
|
1811
|
+
$.$mol_env = function $mol_env() {
|
|
1812
|
+
return this.process.env;
|
|
1813
|
+
};
|
|
1814
|
+
})($ || ($ = {}));
|
|
1815
|
+
//mol/env/env.node.ts
|
|
1816
|
+
;
|
|
1817
|
+
"use strict";
|
|
1818
|
+
var $;
|
|
1819
|
+
(function ($) {
|
|
1820
|
+
function $mol_exec(dir, command, ...args) {
|
|
1821
|
+
let [app, ...args0] = command.split(' ');
|
|
1822
|
+
args = [...args0, ...args];
|
|
1823
|
+
this.$mol_log3_come({
|
|
1824
|
+
place: '$mol_exec',
|
|
1825
|
+
dir: $node.path.relative('', dir),
|
|
1826
|
+
message: 'Run',
|
|
1827
|
+
command: `${app} ${args.join(' ')}`,
|
|
1828
|
+
});
|
|
1829
|
+
var res = $node['child_process'].spawnSync(app, args, {
|
|
1830
|
+
cwd: $node.path.resolve(dir),
|
|
1831
|
+
shell: true,
|
|
1832
|
+
env: this.$mol_env(),
|
|
1833
|
+
});
|
|
1834
|
+
if (res.status || res.error)
|
|
1835
|
+
return $mol_fail(res.error || new Error(res.stderr.toString()));
|
|
1836
|
+
if (!res.stdout)
|
|
1837
|
+
res.stdout = Buffer.from([]);
|
|
1838
|
+
return res;
|
|
1839
|
+
}
|
|
1840
|
+
$.$mol_exec = $mol_exec;
|
|
2043
1841
|
})($ || ($ = {}));
|
|
2044
|
-
//mol/
|
|
1842
|
+
//mol/exec/exec.node.ts
|
|
2045
1843
|
;
|
|
2046
1844
|
"use strict";
|
|
2047
1845
|
var $;
|
|
2048
1846
|
(function ($) {
|
|
2049
|
-
$.$
|
|
2050
|
-
$.$mol_mem_key = $mol_wire_plex;
|
|
1847
|
+
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
2051
1848
|
})($ || ($ = {}));
|
|
2052
|
-
//mol/
|
|
1849
|
+
//mol/dom/context/context.node.ts
|
|
1850
|
+
;
|
|
1851
|
+
"use strict";
|
|
1852
|
+
var $;
|
|
1853
|
+
(function ($) {
|
|
1854
|
+
class $mol_after_tick extends $mol_object2 {
|
|
1855
|
+
task;
|
|
1856
|
+
promise;
|
|
1857
|
+
cancelled = false;
|
|
1858
|
+
constructor(task) {
|
|
1859
|
+
super();
|
|
1860
|
+
this.task = task;
|
|
1861
|
+
this.promise = Promise.resolve().then(() => {
|
|
1862
|
+
if (this.cancelled)
|
|
1863
|
+
return;
|
|
1864
|
+
task();
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
destructor() {
|
|
1868
|
+
this.cancelled = true;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
$.$mol_after_tick = $mol_after_tick;
|
|
1872
|
+
})($ || ($ = {}));
|
|
1873
|
+
//mol/after/tick/tick.ts
|
|
2053
1874
|
;
|
|
2054
1875
|
"use strict";
|
|
2055
1876
|
var $;
|
|
@@ -2271,111 +2092,283 @@ var $;
|
|
|
2271
2092
|
el.addEventListener(name, events[name], { passive });
|
|
2272
2093
|
}
|
|
2273
2094
|
}
|
|
2274
|
-
$.$mol_dom_render_events = $mol_dom_render_events;
|
|
2095
|
+
$.$mol_dom_render_events = $mol_dom_render_events;
|
|
2096
|
+
})($ || ($ = {}));
|
|
2097
|
+
//mol/dom/render/events/events.ts
|
|
2098
|
+
;
|
|
2099
|
+
"use strict";
|
|
2100
|
+
var $;
|
|
2101
|
+
(function ($) {
|
|
2102
|
+
function $mol_dom_render_styles(el, styles) {
|
|
2103
|
+
for (let name in styles) {
|
|
2104
|
+
let val = styles[name];
|
|
2105
|
+
const style = el.style;
|
|
2106
|
+
if (typeof val === 'number') {
|
|
2107
|
+
style[name] = `${val}px`;
|
|
2108
|
+
}
|
|
2109
|
+
else {
|
|
2110
|
+
style[name] = val;
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
$.$mol_dom_render_styles = $mol_dom_render_styles;
|
|
2115
|
+
})($ || ($ = {}));
|
|
2116
|
+
//mol/dom/render/styles/styles.ts
|
|
2117
|
+
;
|
|
2118
|
+
"use strict";
|
|
2119
|
+
var $;
|
|
2120
|
+
(function ($) {
|
|
2121
|
+
function $mol_dom_render_children(el, childNodes) {
|
|
2122
|
+
const node_set = new Set(childNodes);
|
|
2123
|
+
let nextNode = el.firstChild;
|
|
2124
|
+
for (let view of childNodes) {
|
|
2125
|
+
if (view == null)
|
|
2126
|
+
continue;
|
|
2127
|
+
if (view instanceof $mol_dom_context.Node) {
|
|
2128
|
+
while (true) {
|
|
2129
|
+
if (!nextNode) {
|
|
2130
|
+
el.appendChild(view);
|
|
2131
|
+
break;
|
|
2132
|
+
}
|
|
2133
|
+
if (nextNode == view) {
|
|
2134
|
+
nextNode = nextNode.nextSibling;
|
|
2135
|
+
break;
|
|
2136
|
+
}
|
|
2137
|
+
else {
|
|
2138
|
+
if (node_set.has(nextNode)) {
|
|
2139
|
+
el.insertBefore(view, nextNode);
|
|
2140
|
+
break;
|
|
2141
|
+
}
|
|
2142
|
+
else {
|
|
2143
|
+
const nn = nextNode.nextSibling;
|
|
2144
|
+
el.removeChild(nextNode);
|
|
2145
|
+
nextNode = nn;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
else {
|
|
2151
|
+
if (nextNode && nextNode.nodeName === '#text') {
|
|
2152
|
+
const str = String(view);
|
|
2153
|
+
if (nextNode.nodeValue !== str)
|
|
2154
|
+
nextNode.nodeValue = str;
|
|
2155
|
+
nextNode = nextNode.nextSibling;
|
|
2156
|
+
}
|
|
2157
|
+
else {
|
|
2158
|
+
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
2159
|
+
el.insertBefore(textNode, nextNode);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
while (nextNode) {
|
|
2164
|
+
const currNode = nextNode;
|
|
2165
|
+
nextNode = currNode.nextSibling;
|
|
2166
|
+
el.removeChild(currNode);
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
2170
|
+
})($ || ($ = {}));
|
|
2171
|
+
//mol/dom/render/children/children.ts
|
|
2172
|
+
;
|
|
2173
|
+
"use strict";
|
|
2174
|
+
var $;
|
|
2175
|
+
(function ($) {
|
|
2176
|
+
function $mol_dom_render_fields(el, fields) {
|
|
2177
|
+
for (let key in fields) {
|
|
2178
|
+
const val = fields[key];
|
|
2179
|
+
if (val === undefined)
|
|
2180
|
+
continue;
|
|
2181
|
+
el[key] = val;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
$.$mol_dom_render_fields = $mol_dom_render_fields;
|
|
2185
|
+
})($ || ($ = {}));
|
|
2186
|
+
//mol/dom/render/fields/fields.ts
|
|
2187
|
+
;
|
|
2188
|
+
"use strict";
|
|
2189
|
+
//mol/type/keys/extract/extract.ts
|
|
2190
|
+
;
|
|
2191
|
+
"use strict";
|
|
2192
|
+
//mol/type/pick/pick.ts
|
|
2193
|
+
;
|
|
2194
|
+
"use strict";
|
|
2195
|
+
var $;
|
|
2196
|
+
(function ($) {
|
|
2197
|
+
let all = [];
|
|
2198
|
+
let el = null;
|
|
2199
|
+
let timer = null;
|
|
2200
|
+
function $mol_style_attach(id, text) {
|
|
2201
|
+
all.push(`/* ${id} */\n\n${text}`);
|
|
2202
|
+
if (timer)
|
|
2203
|
+
return el;
|
|
2204
|
+
const doc = $mol_dom_context.document;
|
|
2205
|
+
if (!doc)
|
|
2206
|
+
return null;
|
|
2207
|
+
el = doc.createElement('style');
|
|
2208
|
+
el.id = `$mol_style_attach`;
|
|
2209
|
+
doc.head.appendChild(el);
|
|
2210
|
+
timer = new $mol_after_tick(() => {
|
|
2211
|
+
el.innerHTML = '\n' + all.join('\n\n');
|
|
2212
|
+
all = [];
|
|
2213
|
+
el = null;
|
|
2214
|
+
timer = null;
|
|
2215
|
+
});
|
|
2216
|
+
return el;
|
|
2217
|
+
}
|
|
2218
|
+
$.$mol_style_attach = $mol_style_attach;
|
|
2219
|
+
})($ || ($ = {}));
|
|
2220
|
+
//mol/style/attach/attach.ts
|
|
2221
|
+
;
|
|
2222
|
+
"use strict";
|
|
2223
|
+
var $;
|
|
2224
|
+
(function ($) {
|
|
2225
|
+
class $mol_decor {
|
|
2226
|
+
value;
|
|
2227
|
+
constructor(value) {
|
|
2228
|
+
this.value = value;
|
|
2229
|
+
}
|
|
2230
|
+
prefix() { return ''; }
|
|
2231
|
+
valueOf() { return this.value; }
|
|
2232
|
+
postfix() { return ''; }
|
|
2233
|
+
toString() {
|
|
2234
|
+
return `${this.prefix()}${this.valueOf()}${this.postfix()}`;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
$.$mol_decor = $mol_decor;
|
|
2238
|
+
})($ || ($ = {}));
|
|
2239
|
+
//mol/decor/decor.ts
|
|
2240
|
+
;
|
|
2241
|
+
"use strict";
|
|
2242
|
+
var $;
|
|
2243
|
+
(function ($) {
|
|
2244
|
+
class $mol_style_unit extends $mol_decor {
|
|
2245
|
+
literal;
|
|
2246
|
+
constructor(value, literal) {
|
|
2247
|
+
super(value);
|
|
2248
|
+
this.literal = literal;
|
|
2249
|
+
}
|
|
2250
|
+
postfix() {
|
|
2251
|
+
return this.literal;
|
|
2252
|
+
}
|
|
2253
|
+
static per(value) { return new $mol_style_unit(value, '%'); }
|
|
2254
|
+
static px(value) { return new $mol_style_unit(value, 'px'); }
|
|
2255
|
+
static mm(value) { return new $mol_style_unit(value, 'mm'); }
|
|
2256
|
+
static cm(value) { return new $mol_style_unit(value, 'cm'); }
|
|
2257
|
+
static Q(value) { return new $mol_style_unit(value, 'Q'); }
|
|
2258
|
+
static in(value) { return new $mol_style_unit(value, 'in'); }
|
|
2259
|
+
static pc(value) { return new $mol_style_unit(value, 'pc'); }
|
|
2260
|
+
static pt(value) { return new $mol_style_unit(value, 'pt'); }
|
|
2261
|
+
static cap(value) { return new $mol_style_unit(value, 'cap'); }
|
|
2262
|
+
static ch(value) { return new $mol_style_unit(value, 'ch'); }
|
|
2263
|
+
static em(value) { return new $mol_style_unit(value, 'em'); }
|
|
2264
|
+
static rem(value) { return new $mol_style_unit(value, 'rem'); }
|
|
2265
|
+
static ex(value) { return new $mol_style_unit(value, 'ex'); }
|
|
2266
|
+
static ic(value) { return new $mol_style_unit(value, 'ic'); }
|
|
2267
|
+
static lh(value) { return new $mol_style_unit(value, 'lh'); }
|
|
2268
|
+
static rlh(value) { return new $mol_style_unit(value, 'rlh'); }
|
|
2269
|
+
static vh(value) { return new $mol_style_unit(value, 'vh'); }
|
|
2270
|
+
static vw(value) { return new $mol_style_unit(value, 'vw'); }
|
|
2271
|
+
static vi(value) { return new $mol_style_unit(value, 'vi'); }
|
|
2272
|
+
static vb(value) { return new $mol_style_unit(value, 'vb'); }
|
|
2273
|
+
static vmin(value) { return new $mol_style_unit(value, 'vmin'); }
|
|
2274
|
+
static vmax(value) { return new $mol_style_unit(value, 'vmax'); }
|
|
2275
|
+
static deg(value) { return new $mol_style_unit(value, 'deg'); }
|
|
2276
|
+
static rad(value) { return new $mol_style_unit(value, 'rad'); }
|
|
2277
|
+
static grad(value) { return new $mol_style_unit(value, 'grad'); }
|
|
2278
|
+
static turn(value) { return new $mol_style_unit(value, 'turn'); }
|
|
2279
|
+
static s(value) { return new $mol_style_unit(value, 's'); }
|
|
2280
|
+
static ms(value) { return new $mol_style_unit(value, 'ms'); }
|
|
2281
|
+
}
|
|
2282
|
+
$.$mol_style_unit = $mol_style_unit;
|
|
2283
|
+
})($ || ($ = {}));
|
|
2284
|
+
//mol/style/unit/unit.ts
|
|
2285
|
+
;
|
|
2286
|
+
"use strict";
|
|
2287
|
+
var $;
|
|
2288
|
+
(function ($) {
|
|
2289
|
+
const { per } = $mol_style_unit;
|
|
2290
|
+
class $mol_style_func extends $mol_decor {
|
|
2291
|
+
name;
|
|
2292
|
+
constructor(name, value) {
|
|
2293
|
+
super(value);
|
|
2294
|
+
this.name = name;
|
|
2295
|
+
}
|
|
2296
|
+
prefix() { return this.name + '('; }
|
|
2297
|
+
postfix() { return ')'; }
|
|
2298
|
+
static calc(value) {
|
|
2299
|
+
return new $mol_style_func('calc', value);
|
|
2300
|
+
}
|
|
2301
|
+
static vary(name) {
|
|
2302
|
+
return new $mol_style_func('var', name);
|
|
2303
|
+
}
|
|
2304
|
+
static url(href) {
|
|
2305
|
+
return new $mol_style_func('url', JSON.stringify(href));
|
|
2306
|
+
}
|
|
2307
|
+
static hsla(hue, saturation, lightness, alpha) {
|
|
2308
|
+
return new $mol_style_func('hsla', [hue, per(saturation), per(lightness), alpha]);
|
|
2309
|
+
}
|
|
2310
|
+
static clamp(min, mid, max) {
|
|
2311
|
+
return new $mol_style_func('clamp', [min, mid, max]);
|
|
2312
|
+
}
|
|
2313
|
+
static rgba(red, green, blue, alpha) {
|
|
2314
|
+
return new $mol_style_func('rgba', [red, green, blue, alpha]);
|
|
2315
|
+
}
|
|
2316
|
+
static scale(zoom) {
|
|
2317
|
+
return new $mol_style_func('scale', [zoom]);
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
$.$mol_style_func = $mol_style_func;
|
|
2275
2321
|
})($ || ($ = {}));
|
|
2276
|
-
//mol/
|
|
2322
|
+
//mol/style/func/func.ts
|
|
2277
2323
|
;
|
|
2278
2324
|
"use strict";
|
|
2279
2325
|
var $;
|
|
2280
2326
|
(function ($) {
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2327
|
+
const { vary } = $mol_style_func;
|
|
2328
|
+
$.$mol_theme = {
|
|
2329
|
+
back: vary('--mol_theme_back'),
|
|
2330
|
+
hover: vary('--mol_theme_hover'),
|
|
2331
|
+
card: vary('--mol_theme_card'),
|
|
2332
|
+
current: vary('--mol_theme_current'),
|
|
2333
|
+
special: vary('--mol_theme_special'),
|
|
2334
|
+
text: vary('--mol_theme_text'),
|
|
2335
|
+
control: vary('--mol_theme_control'),
|
|
2336
|
+
shade: vary('--mol_theme_shade'),
|
|
2337
|
+
line: vary('--mol_theme_line'),
|
|
2338
|
+
focus: vary('--mol_theme_focus'),
|
|
2339
|
+
field: vary('--mol_theme_field'),
|
|
2340
|
+
image: vary('--mol_theme_image'),
|
|
2341
|
+
};
|
|
2294
2342
|
})($ || ($ = {}));
|
|
2295
|
-
//mol/
|
|
2343
|
+
//mol/theme/theme.ts
|
|
2296
2344
|
;
|
|
2297
2345
|
"use strict";
|
|
2298
2346
|
var $;
|
|
2299
2347
|
(function ($) {
|
|
2300
|
-
|
|
2301
|
-
const node_set = new Set(childNodes);
|
|
2302
|
-
let nextNode = el.firstChild;
|
|
2303
|
-
for (let view of childNodes) {
|
|
2304
|
-
if (view == null)
|
|
2305
|
-
continue;
|
|
2306
|
-
if (view instanceof $mol_dom_context.Node) {
|
|
2307
|
-
while (true) {
|
|
2308
|
-
if (!nextNode) {
|
|
2309
|
-
el.appendChild(view);
|
|
2310
|
-
break;
|
|
2311
|
-
}
|
|
2312
|
-
if (nextNode == view) {
|
|
2313
|
-
nextNode = nextNode.nextSibling;
|
|
2314
|
-
break;
|
|
2315
|
-
}
|
|
2316
|
-
else {
|
|
2317
|
-
if (node_set.has(nextNode)) {
|
|
2318
|
-
el.insertBefore(view, nextNode);
|
|
2319
|
-
break;
|
|
2320
|
-
}
|
|
2321
|
-
else {
|
|
2322
|
-
const nn = nextNode.nextSibling;
|
|
2323
|
-
el.removeChild(nextNode);
|
|
2324
|
-
nextNode = nn;
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
else {
|
|
2330
|
-
if (nextNode && nextNode.nodeName === '#text') {
|
|
2331
|
-
const str = String(view);
|
|
2332
|
-
if (nextNode.nodeValue !== str)
|
|
2333
|
-
nextNode.nodeValue = str;
|
|
2334
|
-
nextNode = nextNode.nextSibling;
|
|
2335
|
-
}
|
|
2336
|
-
else {
|
|
2337
|
-
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
2338
|
-
el.insertBefore(textNode, nextNode);
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
while (nextNode) {
|
|
2343
|
-
const currNode = nextNode;
|
|
2344
|
-
nextNode = currNode.nextSibling;
|
|
2345
|
-
el.removeChild(currNode);
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
2348
|
+
$mol_style_attach("mol/theme/theme.css", ":root {\n\t--mol_theme_hue: 210deg;\n\t--mol_theme_luma: -1;\n\t--mol_theme_satur: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme] {\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n}\n:where([mol_theme]) {\n\tbackground-color: var(--mol_theme_back);\n}\n\t\n:root, [mol_theme] {\n\t--mol_theme_back: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 20% ), calc( 55% + 45% * var(--mol_theme_luma) ) );\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0%, calc( 40% - 40% * var(--mol_theme_luma) ) );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 50% ), calc( 54% + 46% * var(--mol_theme_luma) ), .25 );\n\t\n\t--mol_theme_card: hsl( var(--mol_theme_hue), calc( var(--mol_theme_satur) * 50% ), calc( 55% + 35% * var(--mol_theme_luma) ), .25 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .2 );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 50%, 1 );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, calc( 55% - 10% * var(--mol_theme_luma) ) );\n\t\n}\n\n[mol_theme=\"$mol_theme_light\"] {\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme=\"$mol_theme_dark\"] {\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: invert(1) hue-rotate( 180deg );\n}\n\n[mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50%, 40% );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 60%, 30% );\n\t--mol_theme_current: hsl( var(--mol_theme_hue), 100%, 20% );\n}\n\n[mol_theme=\"$mol_theme_current\"] {\n\tbackground-color: var(--mol_theme_back);\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% + 30% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_card: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 55% + 35% * var(--mol_theme_luma) ), .25 );\n}\n\n[mol_theme=\"$mol_theme_accent\"] {\n\tbackground-color: var(--mol_theme_back);\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 180deg ), 90%, 50% );\n\t--mol_theme_hover: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 35% );\n}\n\n[mol_theme=\"$mol_theme_accent\"] [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: black;\n}\n");
|
|
2349
2349
|
})($ || ($ = {}));
|
|
2350
|
-
//mol/
|
|
2350
|
+
//mol/theme/-css/theme.css.ts
|
|
2351
2351
|
;
|
|
2352
2352
|
"use strict";
|
|
2353
2353
|
var $;
|
|
2354
2354
|
(function ($) {
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
}
|
|
2363
|
-
$.$mol_dom_render_fields = $mol_dom_render_fields;
|
|
2355
|
+
const { vary } = $mol_style_func;
|
|
2356
|
+
$.$mol_gap = {
|
|
2357
|
+
block: vary('--mol_gap_block'),
|
|
2358
|
+
text: vary('--mol_gap_text'),
|
|
2359
|
+
round: vary('--mol_gap_round'),
|
|
2360
|
+
space: vary('--mol_gap_space'),
|
|
2361
|
+
blur: vary('--mol_gap_blur'),
|
|
2362
|
+
};
|
|
2364
2363
|
})($ || ($ = {}));
|
|
2365
|
-
//mol/
|
|
2366
|
-
;
|
|
2367
|
-
"use strict";
|
|
2368
|
-
//mol/type/keys/extract/extract.ts
|
|
2369
|
-
;
|
|
2370
|
-
"use strict";
|
|
2371
|
-
//mol/type/pick/pick.ts
|
|
2364
|
+
//mol/gap/gap.ts
|
|
2372
2365
|
;
|
|
2373
2366
|
"use strict";
|
|
2374
2367
|
var $;
|
|
2375
2368
|
(function ($) {
|
|
2376
|
-
$mol_style_attach("mol/
|
|
2369
|
+
$mol_style_attach("mol/gap/gap.css", ":root {\n\t--mol_gap_block: .75rem;\n\t--mol_gap_text: .5rem .75rem;\n\t--mol_gap_round: .25rem;\n\t--mol_gap_space: .25rem;\n\t--mol_gap_blur: .5rem;\n}\n");
|
|
2377
2370
|
})($ || ($ = {}));
|
|
2378
|
-
//mol/
|
|
2371
|
+
//mol/gap/-css/gap.css.ts
|
|
2379
2372
|
;
|
|
2380
2373
|
"use strict";
|
|
2381
2374
|
var $;
|
|
@@ -2774,6 +2767,43 @@ var $;
|
|
|
2774
2767
|
;
|
|
2775
2768
|
"use strict";
|
|
2776
2769
|
var $;
|
|
2770
|
+
(function ($) {
|
|
2771
|
+
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\tbackground: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n}\n\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n justify-content: center;\n}\n\n@keyframes mol_view_wait_move {\n\tfrom {\n\t\tbackground-position: 0 0;\n\t}\n\tto {\n\t\tbackground-position: 200vmax 0;\n\t}\n}\n\n@keyframes mol_view_wait_show {\n\tto {\n\t\tbackground-image: repeating-linear-gradient(\n\t\t\t45deg,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 0% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 5% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 45% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 50% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 55% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 95% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 100%\n\t\t);\n\t\tbackground-size: 200vmax 200vmax;\n\t}\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait_show .5s .5s linear forwards , mol_view_wait_move 1s linear infinite;\n\topacity: .75;\n}\n");
|
|
2772
|
+
})($ || ($ = {}));
|
|
2773
|
+
//mol/view/view/-css/view.css.ts
|
|
2774
|
+
;
|
|
2775
|
+
"use strict";
|
|
2776
|
+
var $;
|
|
2777
|
+
(function ($) {
|
|
2778
|
+
class $mol_plugin extends $mol_view {
|
|
2779
|
+
dom_node(next) {
|
|
2780
|
+
const node = next || $mol_owning_get(this).host.dom_node();
|
|
2781
|
+
$mol_dom_render_attributes(node, this.attr_static());
|
|
2782
|
+
const events = $mol_wire_async(this.event());
|
|
2783
|
+
for (let event_name in events) {
|
|
2784
|
+
node.addEventListener(event_name, events[event_name], { passive: false });
|
|
2785
|
+
}
|
|
2786
|
+
return node;
|
|
2787
|
+
}
|
|
2788
|
+
attr_static() {
|
|
2789
|
+
return {};
|
|
2790
|
+
}
|
|
2791
|
+
event() {
|
|
2792
|
+
return {};
|
|
2793
|
+
}
|
|
2794
|
+
render() {
|
|
2795
|
+
this.dom_node_actual();
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
__decorate([
|
|
2799
|
+
$mol_mem
|
|
2800
|
+
], $mol_plugin.prototype, "dom_node", null);
|
|
2801
|
+
$.$mol_plugin = $mol_plugin;
|
|
2802
|
+
})($ || ($ = {}));
|
|
2803
|
+
//mol/plugin/plugin.ts
|
|
2804
|
+
;
|
|
2805
|
+
"use strict";
|
|
2806
|
+
var $;
|
|
2777
2807
|
(function ($) {
|
|
2778
2808
|
class $mol_svg extends $mol_view {
|
|
2779
2809
|
dom_name() {
|
|
@@ -2825,36 +2855,6 @@ var $;
|
|
|
2825
2855
|
;
|
|
2826
2856
|
"use strict";
|
|
2827
2857
|
var $;
|
|
2828
|
-
(function ($) {
|
|
2829
|
-
class $mol_plugin extends $mol_view {
|
|
2830
|
-
dom_node(next) {
|
|
2831
|
-
const node = next || $mol_owning_get(this).host.dom_node();
|
|
2832
|
-
$mol_dom_render_attributes(node, this.attr_static());
|
|
2833
|
-
const events = $mol_wire_async(this.event());
|
|
2834
|
-
for (let event_name in events) {
|
|
2835
|
-
node.addEventListener(event_name, events[event_name], { passive: false });
|
|
2836
|
-
}
|
|
2837
|
-
return node;
|
|
2838
|
-
}
|
|
2839
|
-
attr_static() {
|
|
2840
|
-
return {};
|
|
2841
|
-
}
|
|
2842
|
-
event() {
|
|
2843
|
-
return {};
|
|
2844
|
-
}
|
|
2845
|
-
render() {
|
|
2846
|
-
this.dom_node_actual();
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
__decorate([
|
|
2850
|
-
$mol_mem
|
|
2851
|
-
], $mol_plugin.prototype, "dom_node", null);
|
|
2852
|
-
$.$mol_plugin = $mol_plugin;
|
|
2853
|
-
})($ || ($ = {}));
|
|
2854
|
-
//mol/plugin/plugin.ts
|
|
2855
|
-
;
|
|
2856
|
-
"use strict";
|
|
2857
|
-
var $;
|
|
2858
2858
|
(function ($) {
|
|
2859
2859
|
var $$;
|
|
2860
2860
|
(function ($$) {
|
|
@@ -3268,13 +3268,6 @@ var $;
|
|
|
3268
3268
|
;
|
|
3269
3269
|
"use strict";
|
|
3270
3270
|
var $;
|
|
3271
|
-
(function ($) {
|
|
3272
|
-
$mol_style_attach("mol/plot/graph/graph.view.css", "[mol_plot_graph] {\n\tstroke: currentColor;\n}\n\n[mol_plot_graph_sample] {\n\tborder-width: 0;\n\tborder-style: solid;\n}\n\n[mol_plot_graph_type=\"dashed\"] {\n\tstroke-dasharray: 4 4;\n\tborder-style: dashed;\n}\n");
|
|
3273
|
-
})($ || ($ = {}));
|
|
3274
|
-
//mol/plot/graph/-css/graph.view.css.ts
|
|
3275
|
-
;
|
|
3276
|
-
"use strict";
|
|
3277
|
-
var $;
|
|
3278
3271
|
(function ($) {
|
|
3279
3272
|
var $$;
|
|
3280
3273
|
(function ($$) {
|
|
@@ -3348,6 +3341,13 @@ var $;
|
|
|
3348
3341
|
;
|
|
3349
3342
|
"use strict";
|
|
3350
3343
|
var $;
|
|
3344
|
+
(function ($) {
|
|
3345
|
+
$mol_style_attach("mol/plot/graph/graph.view.css", "[mol_plot_graph] {\n\tstroke: currentColor;\n}\n\n[mol_plot_graph_sample] {\n\tborder-width: 0;\n\tborder-style: solid;\n}\n\n[mol_plot_graph_type=\"dashed\"] {\n\tstroke-dasharray: 4 4;\n\tborder-style: dashed;\n}\n");
|
|
3346
|
+
})($ || ($ = {}));
|
|
3347
|
+
//mol/plot/graph/-css/graph.view.css.ts
|
|
3348
|
+
;
|
|
3349
|
+
"use strict";
|
|
3350
|
+
var $;
|
|
3351
3351
|
(function ($) {
|
|
3352
3352
|
class $mol_touch extends $mol_plugin {
|
|
3353
3353
|
start_zoom(val) {
|
|
@@ -4177,13 +4177,6 @@ var $;
|
|
|
4177
4177
|
;
|
|
4178
4178
|
"use strict";
|
|
4179
4179
|
var $;
|
|
4180
|
-
(function ($) {
|
|
4181
|
-
$mol_style_attach("mol/plot/pane/pane.view.css", "[mol_plot_pane] {\n\tcolor: var(--mol_theme_control);\n\tflex: 1 1 auto;\n\talign-self: stretch;\n\tstroke-width: 2px;\n\tuser-select: none;\n}\n");
|
|
4182
|
-
})($ || ($ = {}));
|
|
4183
|
-
//mol/plot/pane/-css/pane.view.css.ts
|
|
4184
|
-
;
|
|
4185
|
-
"use strict";
|
|
4186
|
-
var $;
|
|
4187
4180
|
(function ($) {
|
|
4188
4181
|
var $$;
|
|
4189
4182
|
(function ($$) {
|
|
@@ -4386,6 +4379,13 @@ var $;
|
|
|
4386
4379
|
;
|
|
4387
4380
|
"use strict";
|
|
4388
4381
|
var $;
|
|
4382
|
+
(function ($) {
|
|
4383
|
+
$mol_style_attach("mol/plot/pane/pane.view.css", "[mol_plot_pane] {\n\tcolor: var(--mol_theme_control);\n\tflex: 1 1 auto;\n\talign-self: stretch;\n\tstroke-width: 2px;\n\tuser-select: none;\n}\n");
|
|
4384
|
+
})($ || ($ = {}));
|
|
4385
|
+
//mol/plot/pane/-css/pane.view.css.ts
|
|
4386
|
+
;
|
|
4387
|
+
"use strict";
|
|
4388
|
+
var $;
|
|
4389
4389
|
(function ($) {
|
|
4390
4390
|
class $mol_plot_line extends $mol_plot_graph {
|
|
4391
4391
|
threshold() {
|
|
@@ -4430,13 +4430,6 @@ var $;
|
|
|
4430
4430
|
;
|
|
4431
4431
|
"use strict";
|
|
4432
4432
|
var $;
|
|
4433
|
-
(function ($) {
|
|
4434
|
-
$mol_style_attach("mol/plot/line/line.view.css", "[mol_plot_line] {\n\tfill: none;\n\tstroke-linejoin: round;\n}\n\n[mol_plot_line_sample] {\n\theight: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tborder-width: 2px 0 0;\n\tposition: absolute;\n\ttop: .75em;\n\ttransform: translateY(-50%);\n}\n");
|
|
4435
|
-
})($ || ($ = {}));
|
|
4436
|
-
//mol/plot/line/-css/line.view.css.ts
|
|
4437
|
-
;
|
|
4438
|
-
"use strict";
|
|
4439
|
-
var $;
|
|
4440
4433
|
(function ($) {
|
|
4441
4434
|
var $$;
|
|
4442
4435
|
(function ($$) {
|
|
@@ -4496,6 +4489,13 @@ var $;
|
|
|
4496
4489
|
;
|
|
4497
4490
|
"use strict";
|
|
4498
4491
|
var $;
|
|
4492
|
+
(function ($) {
|
|
4493
|
+
$mol_style_attach("mol/plot/line/line.view.css", "[mol_plot_line] {\n\tfill: none;\n\tstroke-linejoin: round;\n}\n\n[mol_plot_line_sample] {\n\theight: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tborder-width: 2px 0 0;\n\tposition: absolute;\n\ttop: .75em;\n\ttransform: translateY(-50%);\n}\n");
|
|
4494
|
+
})($ || ($ = {}));
|
|
4495
|
+
//mol/plot/line/-css/line.view.css.ts
|
|
4496
|
+
;
|
|
4497
|
+
"use strict";
|
|
4498
|
+
var $;
|
|
4499
4499
|
(function ($) {
|
|
4500
4500
|
class $mol_plot_group extends $mol_plot_graph {
|
|
4501
4501
|
sub() {
|
|
@@ -4679,13 +4679,6 @@ var $;
|
|
|
4679
4679
|
;
|
|
4680
4680
|
"use strict";
|
|
4681
4681
|
var $;
|
|
4682
|
-
(function ($) {
|
|
4683
|
-
$mol_style_attach("mol/plot/dot/dot.view.css", "[mol_plot_dot] {\n\tstroke-linecap: round;\n\tfill: none;\n}\n\n[mol_plot_dot_sample] {\n\twidth: .5rem;\n\theight: .5rem;\n\tborder-radius: 1rem;\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop: .75em;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n");
|
|
4684
|
-
})($ || ($ = {}));
|
|
4685
|
-
//mol/plot/dot/-css/dot.view.css.ts
|
|
4686
|
-
;
|
|
4687
|
-
"use strict";
|
|
4688
|
-
var $;
|
|
4689
4682
|
(function ($) {
|
|
4690
4683
|
var $$;
|
|
4691
4684
|
(function ($$) {
|
|
@@ -4771,6 +4764,13 @@ var $;
|
|
|
4771
4764
|
;
|
|
4772
4765
|
"use strict";
|
|
4773
4766
|
var $;
|
|
4767
|
+
(function ($) {
|
|
4768
|
+
$mol_style_attach("mol/plot/dot/dot.view.css", "[mol_plot_dot] {\n\tstroke-linecap: round;\n\tfill: none;\n}\n\n[mol_plot_dot_sample] {\n\twidth: .5rem;\n\theight: .5rem;\n\tborder-radius: 1rem;\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop: .75em;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n");
|
|
4769
|
+
})($ || ($ = {}));
|
|
4770
|
+
//mol/plot/dot/-css/dot.view.css.ts
|
|
4771
|
+
;
|
|
4772
|
+
"use strict";
|
|
4773
|
+
var $;
|
|
4774
4774
|
(function ($) {
|
|
4775
4775
|
class $mol_plot_map_heat extends $mol_plot_group {
|
|
4776
4776
|
series_z() {
|
|
@@ -4836,13 +4836,6 @@ var $;
|
|
|
4836
4836
|
;
|
|
4837
4837
|
"use strict";
|
|
4838
4838
|
var $;
|
|
4839
|
-
(function ($) {
|
|
4840
|
-
$mol_style_attach("mol/plot/map/heat/heat.view.css", "[mol_plot_map_heat_level_curve] {\n\tstroke-linecap: square;\n\tfill: none;\n}\n");
|
|
4841
|
-
})($ || ($ = {}));
|
|
4842
|
-
//mol/plot/map/heat/-css/heat.view.css.ts
|
|
4843
|
-
;
|
|
4844
|
-
"use strict";
|
|
4845
|
-
var $;
|
|
4846
4839
|
(function ($) {
|
|
4847
4840
|
var $$;
|
|
4848
4841
|
(function ($$) {
|
|
@@ -4902,7 +4895,14 @@ var $;
|
|
|
4902
4895
|
$$.$mol_plot_map_heat = $mol_plot_map_heat;
|
|
4903
4896
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4904
4897
|
})($ || ($ = {}));
|
|
4905
|
-
//mol/plot/map/heat/heat.view.ts
|
|
4898
|
+
//mol/plot/map/heat/heat.view.ts
|
|
4899
|
+
;
|
|
4900
|
+
"use strict";
|
|
4901
|
+
var $;
|
|
4902
|
+
(function ($) {
|
|
4903
|
+
$mol_style_attach("mol/plot/map/heat/heat.view.css", "[mol_plot_map_heat_level_curve] {\n\tstroke-linecap: square;\n\tfill: none;\n}\n");
|
|
4904
|
+
})($ || ($ = {}));
|
|
4905
|
+
//mol/plot/map/heat/-css/heat.view.css.ts
|
|
4906
4906
|
;
|
|
4907
4907
|
"use strict";
|
|
4908
4908
|
var $;
|
|
@@ -4949,13 +4949,6 @@ var $;
|
|
|
4949
4949
|
;
|
|
4950
4950
|
"use strict";
|
|
4951
4951
|
var $;
|
|
4952
|
-
(function ($) {
|
|
4953
|
-
$mol_style_attach("mol/plot/bar/bar.view.css", "[mol_plot_bar] {\n\tstroke-linecap: butt;\n\tstroke-width: 1rem;\n}\n\n[mol_plot_bar_sample] {\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop:0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
4954
|
-
})($ || ($ = {}));
|
|
4955
|
-
//mol/plot/bar/-css/bar.view.css.ts
|
|
4956
|
-
;
|
|
4957
|
-
"use strict";
|
|
4958
|
-
var $;
|
|
4959
4952
|
(function ($) {
|
|
4960
4953
|
var $$;
|
|
4961
4954
|
(function ($$) {
|
|
@@ -5038,6 +5031,13 @@ var $;
|
|
|
5038
5031
|
;
|
|
5039
5032
|
"use strict";
|
|
5040
5033
|
var $;
|
|
5034
|
+
(function ($) {
|
|
5035
|
+
$mol_style_attach("mol/plot/bar/bar.view.css", "[mol_plot_bar] {\n\tstroke-linecap: butt;\n\tstroke-width: 1rem;\n}\n\n[mol_plot_bar_sample] {\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop:0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
5036
|
+
})($ || ($ = {}));
|
|
5037
|
+
//mol/plot/bar/-css/bar.view.css.ts
|
|
5038
|
+
;
|
|
5039
|
+
"use strict";
|
|
5040
|
+
var $;
|
|
5041
5041
|
(function ($) {
|
|
5042
5042
|
class $mol_plot_fill extends $mol_plot_line {
|
|
5043
5043
|
threshold() {
|
|
@@ -5050,13 +5050,6 @@ var $;
|
|
|
5050
5050
|
;
|
|
5051
5051
|
"use strict";
|
|
5052
5052
|
var $;
|
|
5053
|
-
(function ($) {
|
|
5054
|
-
$mol_style_attach("mol/plot/fill/fill.view.css", "[mol_plot_fill] {\n\tstroke: none;\n\tstroke-width: 0;\n\topacity: .1;\n\tfill: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_fill_sample] {\n\topacity: .1;\n\tbackground: currentColor;\n\tposition: absolute;\n\tbottom: 0;\n\ttop: .75em;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
5055
|
-
})($ || ($ = {}));
|
|
5056
|
-
//mol/plot/fill/-css/fill.view.css.ts
|
|
5057
|
-
;
|
|
5058
|
-
"use strict";
|
|
5059
|
-
var $;
|
|
5060
5053
|
(function ($) {
|
|
5061
5054
|
var $$;
|
|
5062
5055
|
(function ($$) {
|
|
@@ -5083,6 +5076,13 @@ var $;
|
|
|
5083
5076
|
;
|
|
5084
5077
|
"use strict";
|
|
5085
5078
|
var $;
|
|
5079
|
+
(function ($) {
|
|
5080
|
+
$mol_style_attach("mol/plot/fill/fill.view.css", "[mol_plot_fill] {\n\tstroke: none;\n\tstroke-width: 0;\n\topacity: .1;\n\tfill: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_fill_sample] {\n\topacity: .1;\n\tbackground: currentColor;\n\tposition: absolute;\n\tbottom: 0;\n\ttop: .75em;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
5081
|
+
})($ || ($ = {}));
|
|
5082
|
+
//mol/plot/fill/-css/fill.view.css.ts
|
|
5083
|
+
;
|
|
5084
|
+
"use strict";
|
|
5085
|
+
var $;
|
|
5086
5086
|
(function ($) {
|
|
5087
5087
|
class $mol_svg_text extends $mol_svg {
|
|
5088
5088
|
dom_name() {
|
|
@@ -5123,13 +5123,6 @@ var $;
|
|
|
5123
5123
|
;
|
|
5124
5124
|
"use strict";
|
|
5125
5125
|
var $;
|
|
5126
|
-
(function ($) {
|
|
5127
|
-
$mol_style_attach("mol/svg/text/text.view.css", "[mol_svg_text] {\n\tfill: currentColor;\n\tstroke: none;\n}\n");
|
|
5128
|
-
})($ || ($ = {}));
|
|
5129
|
-
//mol/svg/text/-css/text.view.css.ts
|
|
5130
|
-
;
|
|
5131
|
-
"use strict";
|
|
5132
|
-
var $;
|
|
5133
5126
|
(function ($) {
|
|
5134
5127
|
var $$;
|
|
5135
5128
|
(function ($$) {
|
|
@@ -5148,6 +5141,13 @@ var $;
|
|
|
5148
5141
|
;
|
|
5149
5142
|
"use strict";
|
|
5150
5143
|
var $;
|
|
5144
|
+
(function ($) {
|
|
5145
|
+
$mol_style_attach("mol/svg/text/text.view.css", "[mol_svg_text] {\n\tfill: currentColor;\n\tstroke: none;\n}\n");
|
|
5146
|
+
})($ || ($ = {}));
|
|
5147
|
+
//mol/svg/text/-css/text.view.css.ts
|
|
5148
|
+
;
|
|
5149
|
+
"use strict";
|
|
5150
|
+
var $;
|
|
5151
5151
|
(function ($) {
|
|
5152
5152
|
class $mol_svg_rect extends $mol_svg {
|
|
5153
5153
|
dom_name() {
|
|
@@ -5300,13 +5300,6 @@ var $;
|
|
|
5300
5300
|
;
|
|
5301
5301
|
"use strict";
|
|
5302
5302
|
var $;
|
|
5303
|
-
(function ($) {
|
|
5304
|
-
$mol_style_attach("mol/svg/text/box/box.view.css", "[mol_svg_text_box_back] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n}\n");
|
|
5305
|
-
})($ || ($ = {}));
|
|
5306
|
-
//mol/svg/text/box/-css/box.view.css.ts
|
|
5307
|
-
;
|
|
5308
|
-
"use strict";
|
|
5309
|
-
var $;
|
|
5310
5303
|
(function ($) {
|
|
5311
5304
|
var $$;
|
|
5312
5305
|
(function ($$) {
|
|
@@ -5339,6 +5332,13 @@ var $;
|
|
|
5339
5332
|
;
|
|
5340
5333
|
"use strict";
|
|
5341
5334
|
var $;
|
|
5335
|
+
(function ($) {
|
|
5336
|
+
$mol_style_attach("mol/svg/text/box/box.view.css", "[mol_svg_text_box_back] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n}\n");
|
|
5337
|
+
})($ || ($ = {}));
|
|
5338
|
+
//mol/svg/text/box/-css/box.view.css.ts
|
|
5339
|
+
;
|
|
5340
|
+
"use strict";
|
|
5341
|
+
var $;
|
|
5342
5342
|
(function ($) {
|
|
5343
5343
|
class $mol_plot_ruler extends $mol_plot_graph {
|
|
5344
5344
|
step() {
|
|
@@ -5498,13 +5498,6 @@ var $;
|
|
|
5498
5498
|
;
|
|
5499
5499
|
"use strict";
|
|
5500
5500
|
var $;
|
|
5501
|
-
(function ($) {
|
|
5502
|
-
$mol_style_attach("mol/plot/ruler/ruler.view.css", "[mol_plot_ruler_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n}\n\n[mol_plot_ruler_label] {\n\tcolor: var(--mol_theme_text);\n}\n\n[mol_plot_ruler_title] {\n\tcolor: var(--mol_theme_shade);\n\tbackground-color: var(--mol_theme_back);\n}\n\n[mol_plot_ruler_background] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\topacity: 0.8;\n}\n");
|
|
5503
|
-
})($ || ($ = {}));
|
|
5504
|
-
//mol/plot/ruler/-css/ruler.view.css.ts
|
|
5505
|
-
;
|
|
5506
|
-
"use strict";
|
|
5507
|
-
var $;
|
|
5508
5501
|
(function ($) {
|
|
5509
5502
|
var $$;
|
|
5510
5503
|
(function ($$) {
|
|
@@ -5589,6 +5582,13 @@ var $;
|
|
|
5589
5582
|
;
|
|
5590
5583
|
"use strict";
|
|
5591
5584
|
var $;
|
|
5585
|
+
(function ($) {
|
|
5586
|
+
$mol_style_attach("mol/plot/ruler/ruler.view.css", "[mol_plot_ruler_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n}\n\n[mol_plot_ruler_label] {\n\tcolor: var(--mol_theme_text);\n}\n\n[mol_plot_ruler_title] {\n\tcolor: var(--mol_theme_shade);\n\tbackground-color: var(--mol_theme_back);\n}\n\n[mol_plot_ruler_background] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\topacity: 0.8;\n}\n");
|
|
5587
|
+
})($ || ($ = {}));
|
|
5588
|
+
//mol/plot/ruler/-css/ruler.view.css.ts
|
|
5589
|
+
;
|
|
5590
|
+
"use strict";
|
|
5591
|
+
var $;
|
|
5592
5592
|
(function ($) {
|
|
5593
5593
|
class $mol_plot_ruler_vert extends $mol_plot_ruler {
|
|
5594
5594
|
title_align() {
|
|
@@ -5616,13 +5616,6 @@ var $;
|
|
|
5616
5616
|
;
|
|
5617
5617
|
"use strict";
|
|
5618
5618
|
var $;
|
|
5619
|
-
(function ($) {
|
|
5620
|
-
$mol_style_attach("mol/plot/ruler/vert/vert.view.css", "[mol_plot_ruler_vert_label] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5621
|
-
})($ || ($ = {}));
|
|
5622
|
-
//mol/plot/ruler/vert/-css/vert.view.css.ts
|
|
5623
|
-
;
|
|
5624
|
-
"use strict";
|
|
5625
|
-
var $;
|
|
5626
5619
|
(function ($) {
|
|
5627
5620
|
var $$;
|
|
5628
5621
|
(function ($$) {
|
|
@@ -5665,6 +5658,13 @@ var $;
|
|
|
5665
5658
|
;
|
|
5666
5659
|
"use strict";
|
|
5667
5660
|
var $;
|
|
5661
|
+
(function ($) {
|
|
5662
|
+
$mol_style_attach("mol/plot/ruler/vert/vert.view.css", "[mol_plot_ruler_vert_label] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5663
|
+
})($ || ($ = {}));
|
|
5664
|
+
//mol/plot/ruler/vert/-css/vert.view.css.ts
|
|
5665
|
+
;
|
|
5666
|
+
"use strict";
|
|
5667
|
+
var $;
|
|
5668
5668
|
(function ($) {
|
|
5669
5669
|
class $mol_plot_ruler_hor extends $mol_plot_ruler {
|
|
5670
5670
|
title_align() {
|
|
@@ -5692,13 +5692,6 @@ var $;
|
|
|
5692
5692
|
;
|
|
5693
5693
|
"use strict";
|
|
5694
5694
|
var $;
|
|
5695
|
-
(function ($) {
|
|
5696
|
-
$mol_style_attach("mol/plot/ruler/hor/hor.view.css", "[mol_plot_ruler_hor_label] {\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_ruler_hor_title] {\n\ttransform: translateY( -4px );\n}\n");
|
|
5697
|
-
})($ || ($ = {}));
|
|
5698
|
-
//mol/plot/ruler/hor/-css/hor.view.css.ts
|
|
5699
|
-
;
|
|
5700
|
-
"use strict";
|
|
5701
|
-
var $;
|
|
5702
5695
|
(function ($) {
|
|
5703
5696
|
var $$;
|
|
5704
5697
|
(function ($$) {
|
|
@@ -5747,6 +5740,13 @@ var $;
|
|
|
5747
5740
|
;
|
|
5748
5741
|
"use strict";
|
|
5749
5742
|
var $;
|
|
5743
|
+
(function ($) {
|
|
5744
|
+
$mol_style_attach("mol/plot/ruler/hor/hor.view.css", "[mol_plot_ruler_hor_label] {\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_ruler_hor_title] {\n\ttransform: translateY( -4px );\n}\n");
|
|
5745
|
+
})($ || ($ = {}));
|
|
5746
|
+
//mol/plot/ruler/hor/-css/hor.view.css.ts
|
|
5747
|
+
;
|
|
5748
|
+
"use strict";
|
|
5749
|
+
var $;
|
|
5750
5750
|
(function ($) {
|
|
5751
5751
|
class $mol_plot_mark_cross extends $mol_plot_graph {
|
|
5752
5752
|
labels() {
|
|
@@ -5845,13 +5845,6 @@ var $;
|
|
|
5845
5845
|
;
|
|
5846
5846
|
"use strict";
|
|
5847
5847
|
var $;
|
|
5848
|
-
(function ($) {
|
|
5849
|
-
$mol_style_attach("mol/plot/mark/cross/cross.view.css", "[mol_plot_mark_cross_curve] {\n\tcolor: var(--mol_theme_focus);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_x], [mol_plot_mark_cross_label_y] {\n\tcolor: var(--mol_theme_focus);\n\tfont-weight: bold;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_y] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5850
|
-
})($ || ($ = {}));
|
|
5851
|
-
//mol/plot/mark/cross/-css/cross.view.css.ts
|
|
5852
|
-
;
|
|
5853
|
-
"use strict";
|
|
5854
|
-
var $;
|
|
5855
5848
|
(function ($) {
|
|
5856
5849
|
var $$;
|
|
5857
5850
|
(function ($$) {
|
|
@@ -5939,6 +5932,13 @@ var $;
|
|
|
5939
5932
|
;
|
|
5940
5933
|
"use strict";
|
|
5941
5934
|
var $;
|
|
5935
|
+
(function ($) {
|
|
5936
|
+
$mol_style_attach("mol/plot/mark/cross/cross.view.css", "[mol_plot_mark_cross_curve] {\n\tcolor: var(--mol_theme_focus);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_x], [mol_plot_mark_cross_label_y] {\n\tcolor: var(--mol_theme_focus);\n\tfont-weight: bold;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_y] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5937
|
+
})($ || ($ = {}));
|
|
5938
|
+
//mol/plot/mark/cross/-css/cross.view.css.ts
|
|
5939
|
+
;
|
|
5940
|
+
"use strict";
|
|
5941
|
+
var $;
|
|
5942
5942
|
(function ($) {
|
|
5943
5943
|
class $mol_plot_mark_hor extends $mol_plot_ruler_hor {
|
|
5944
5944
|
labels() {
|
|
@@ -5951,13 +5951,6 @@ var $;
|
|
|
5951
5951
|
;
|
|
5952
5952
|
"use strict";
|
|
5953
5953
|
var $;
|
|
5954
|
-
(function ($) {
|
|
5955
|
-
$mol_style_attach("mol/plot/mark/hor/hor.view.css", "[mol_plot_mark_hor_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: .1%;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_hor_label] {\n\tcolor: var(--mol_theme_text);\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_mark_hor_title] {\n\tcolor: var(--mol_theme_shade);\n\ttransform: translateY( -4px );\n}\n");
|
|
5956
|
-
})($ || ($ = {}));
|
|
5957
|
-
//mol/plot/mark/hor/-css/hor.view.css.ts
|
|
5958
|
-
;
|
|
5959
|
-
"use strict";
|
|
5960
|
-
var $;
|
|
5961
5954
|
(function ($) {
|
|
5962
5955
|
var $$;
|
|
5963
5956
|
(function ($$) {
|
|
@@ -6051,12 +6044,9 @@ var $;
|
|
|
6051
6044
|
"use strict";
|
|
6052
6045
|
var $;
|
|
6053
6046
|
(function ($) {
|
|
6054
|
-
|
|
6055
|
-
process.exit(0);
|
|
6056
|
-
}
|
|
6057
|
-
$.$mol_test_complete = $mol_test_complete;
|
|
6047
|
+
$mol_style_attach("mol/plot/mark/hor/hor.view.css", "[mol_plot_mark_hor_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: .1%;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_hor_label] {\n\tcolor: var(--mol_theme_text);\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_mark_hor_title] {\n\tcolor: var(--mol_theme_shade);\n\ttransform: translateY( -4px );\n}\n");
|
|
6058
6048
|
})($ || ($ = {}));
|
|
6059
|
-
//mol/
|
|
6049
|
+
//mol/plot/mark/hor/-css/hor.view.css.ts
|
|
6060
6050
|
;
|
|
6061
6051
|
"use strict";
|
|
6062
6052
|
var $;
|
|
@@ -6147,6 +6137,16 @@ var $;
|
|
|
6147
6137
|
;
|
|
6148
6138
|
"use strict";
|
|
6149
6139
|
var $;
|
|
6140
|
+
(function ($) {
|
|
6141
|
+
function $mol_test_complete() {
|
|
6142
|
+
process.exit(0);
|
|
6143
|
+
}
|
|
6144
|
+
$.$mol_test_complete = $mol_test_complete;
|
|
6145
|
+
})($ || ($ = {}));
|
|
6146
|
+
//mol/test/test.node.test.ts
|
|
6147
|
+
;
|
|
6148
|
+
"use strict";
|
|
6149
|
+
var $;
|
|
6150
6150
|
(function ($_1) {
|
|
6151
6151
|
$mol_test_mocks.push($ => {
|
|
6152
6152
|
$.$mol_log3_come = () => { };
|
|
@@ -6163,112 +6163,22 @@ var $;
|
|
|
6163
6163
|
//mol/type/error/error.ts
|
|
6164
6164
|
;
|
|
6165
6165
|
"use strict";
|
|
6166
|
-
//mol/type/assert/assert.test.ts
|
|
6167
|
-
;
|
|
6168
|
-
"use strict";
|
|
6169
6166
|
//mol/type/assert/assert.ts
|
|
6170
6167
|
;
|
|
6171
6168
|
"use strict";
|
|
6172
|
-
//mol/type/
|
|
6169
|
+
//mol/type/assert/assert.test.ts
|
|
6173
6170
|
;
|
|
6174
6171
|
"use strict";
|
|
6175
6172
|
//mol/type/equals/equals.ts
|
|
6176
6173
|
;
|
|
6177
6174
|
"use strict";
|
|
6178
|
-
//mol/type/
|
|
6175
|
+
//mol/type/equals/equals.test.ts
|
|
6179
6176
|
;
|
|
6180
6177
|
"use strict";
|
|
6181
6178
|
//mol/type/partial/deep/deep.ts
|
|
6182
6179
|
;
|
|
6183
6180
|
"use strict";
|
|
6184
|
-
|
|
6185
|
-
(function ($) {
|
|
6186
|
-
$mol_test({
|
|
6187
|
-
'Make empty div'() {
|
|
6188
|
-
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
6189
|
-
},
|
|
6190
|
-
'Define native field'() {
|
|
6191
|
-
const dom = $mol_jsx("input", { value: '123' });
|
|
6192
|
-
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
6193
|
-
$mol_assert_equal(dom.value, '123');
|
|
6194
|
-
},
|
|
6195
|
-
'Define classes'() {
|
|
6196
|
-
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
6197
|
-
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
6198
|
-
},
|
|
6199
|
-
'Define styles'() {
|
|
6200
|
-
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
6201
|
-
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
6202
|
-
},
|
|
6203
|
-
'Define dataset'() {
|
|
6204
|
-
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
6205
|
-
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
6206
|
-
},
|
|
6207
|
-
'Define attributes'() {
|
|
6208
|
-
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
6209
|
-
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
6210
|
-
},
|
|
6211
|
-
'Define child nodes'() {
|
|
6212
|
-
const dom = $mol_jsx("div", null,
|
|
6213
|
-
"hello",
|
|
6214
|
-
$mol_jsx("strong", null, "world"),
|
|
6215
|
-
"!");
|
|
6216
|
-
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
6217
|
-
},
|
|
6218
|
-
'Function as component'() {
|
|
6219
|
-
const Button = (props, target) => {
|
|
6220
|
-
return $mol_jsx("button", { title: props.hint }, target());
|
|
6221
|
-
};
|
|
6222
|
-
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
6223
|
-
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
6224
|
-
},
|
|
6225
|
-
'Nested guid generation'() {
|
|
6226
|
-
const Foo = () => {
|
|
6227
|
-
return $mol_jsx("div", null,
|
|
6228
|
-
$mol_jsx(Bar, { id: "bar" },
|
|
6229
|
-
$mol_jsx("img", { id: "icon" })));
|
|
6230
|
-
};
|
|
6231
|
-
const Bar = (props, icon) => {
|
|
6232
|
-
return $mol_jsx("span", null,
|
|
6233
|
-
icon,
|
|
6234
|
-
$mol_jsx("i", { id: "label" }));
|
|
6235
|
-
};
|
|
6236
|
-
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
6237
|
-
$mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
|
|
6238
|
-
},
|
|
6239
|
-
'Fail on non unique ids'() {
|
|
6240
|
-
const App = () => {
|
|
6241
|
-
return $mol_jsx("div", null,
|
|
6242
|
-
$mol_jsx("span", { id: "bar" }),
|
|
6243
|
-
$mol_jsx("span", { id: "bar" }));
|
|
6244
|
-
};
|
|
6245
|
-
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
6246
|
-
},
|
|
6247
|
-
'Owner based guid generationn'() {
|
|
6248
|
-
const Foo = () => {
|
|
6249
|
-
return $mol_jsx("div", null,
|
|
6250
|
-
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
6251
|
-
};
|
|
6252
|
-
const Bar = (props) => {
|
|
6253
|
-
return $mol_jsx("span", null, props.icon());
|
|
6254
|
-
};
|
|
6255
|
-
const dom = $mol_jsx(Foo, { id: "app" });
|
|
6256
|
-
$mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
|
|
6257
|
-
},
|
|
6258
|
-
'Fail on same ids from different caller'() {
|
|
6259
|
-
const Foo = () => {
|
|
6260
|
-
return $mol_jsx("div", null,
|
|
6261
|
-
$mol_jsx("img", { id: "icon" }),
|
|
6262
|
-
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
6263
|
-
};
|
|
6264
|
-
const Bar = (props) => {
|
|
6265
|
-
return $mol_jsx("span", null, props.icon());
|
|
6266
|
-
};
|
|
6267
|
-
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
6268
|
-
},
|
|
6269
|
-
});
|
|
6270
|
-
})($ || ($ = {}));
|
|
6271
|
-
//mol/jsx/jsx.test.tsx
|
|
6181
|
+
//mol/type/partial/deep/deep.test.ts
|
|
6272
6182
|
;
|
|
6273
6183
|
"use strict";
|
|
6274
6184
|
var $;
|
|
@@ -6389,7 +6299,97 @@ var $;
|
|
|
6389
6299
|
}
|
|
6390
6300
|
$.$mol_jsx = $mol_jsx;
|
|
6391
6301
|
})($ || ($ = {}));
|
|
6392
|
-
//mol/jsx/jsx.ts
|
|
6302
|
+
//mol/jsx/jsx.ts
|
|
6303
|
+
;
|
|
6304
|
+
"use strict";
|
|
6305
|
+
var $;
|
|
6306
|
+
(function ($) {
|
|
6307
|
+
$mol_test({
|
|
6308
|
+
'Make empty div'() {
|
|
6309
|
+
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
6310
|
+
},
|
|
6311
|
+
'Define native field'() {
|
|
6312
|
+
const dom = $mol_jsx("input", { value: '123' });
|
|
6313
|
+
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
6314
|
+
$mol_assert_equal(dom.value, '123');
|
|
6315
|
+
},
|
|
6316
|
+
'Define classes'() {
|
|
6317
|
+
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
6318
|
+
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
6319
|
+
},
|
|
6320
|
+
'Define styles'() {
|
|
6321
|
+
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
6322
|
+
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
6323
|
+
},
|
|
6324
|
+
'Define dataset'() {
|
|
6325
|
+
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
6326
|
+
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
6327
|
+
},
|
|
6328
|
+
'Define attributes'() {
|
|
6329
|
+
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
6330
|
+
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
6331
|
+
},
|
|
6332
|
+
'Define child nodes'() {
|
|
6333
|
+
const dom = $mol_jsx("div", null,
|
|
6334
|
+
"hello",
|
|
6335
|
+
$mol_jsx("strong", null, "world"),
|
|
6336
|
+
"!");
|
|
6337
|
+
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
6338
|
+
},
|
|
6339
|
+
'Function as component'() {
|
|
6340
|
+
const Button = (props, target) => {
|
|
6341
|
+
return $mol_jsx("button", { title: props.hint }, target());
|
|
6342
|
+
};
|
|
6343
|
+
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
6344
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
6345
|
+
},
|
|
6346
|
+
'Nested guid generation'() {
|
|
6347
|
+
const Foo = () => {
|
|
6348
|
+
return $mol_jsx("div", null,
|
|
6349
|
+
$mol_jsx(Bar, { id: "bar" },
|
|
6350
|
+
$mol_jsx("img", { id: "icon" })));
|
|
6351
|
+
};
|
|
6352
|
+
const Bar = (props, icon) => {
|
|
6353
|
+
return $mol_jsx("span", null,
|
|
6354
|
+
icon,
|
|
6355
|
+
$mol_jsx("i", { id: "label" }));
|
|
6356
|
+
};
|
|
6357
|
+
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
6358
|
+
$mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
|
|
6359
|
+
},
|
|
6360
|
+
'Fail on non unique ids'() {
|
|
6361
|
+
const App = () => {
|
|
6362
|
+
return $mol_jsx("div", null,
|
|
6363
|
+
$mol_jsx("span", { id: "bar" }),
|
|
6364
|
+
$mol_jsx("span", { id: "bar" }));
|
|
6365
|
+
};
|
|
6366
|
+
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
6367
|
+
},
|
|
6368
|
+
'Owner based guid generationn'() {
|
|
6369
|
+
const Foo = () => {
|
|
6370
|
+
return $mol_jsx("div", null,
|
|
6371
|
+
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
6372
|
+
};
|
|
6373
|
+
const Bar = (props) => {
|
|
6374
|
+
return $mol_jsx("span", null, props.icon());
|
|
6375
|
+
};
|
|
6376
|
+
const dom = $mol_jsx(Foo, { id: "app" });
|
|
6377
|
+
$mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
|
|
6378
|
+
},
|
|
6379
|
+
'Fail on same ids from different caller'() {
|
|
6380
|
+
const Foo = () => {
|
|
6381
|
+
return $mol_jsx("div", null,
|
|
6382
|
+
$mol_jsx("img", { id: "icon" }),
|
|
6383
|
+
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
6384
|
+
};
|
|
6385
|
+
const Bar = (props) => {
|
|
6386
|
+
return $mol_jsx("span", null, props.icon());
|
|
6387
|
+
};
|
|
6388
|
+
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
6389
|
+
},
|
|
6390
|
+
});
|
|
6391
|
+
})($ || ($ = {}));
|
|
6392
|
+
//mol/jsx/jsx.test.tsx
|
|
6393
6393
|
;
|
|
6394
6394
|
"use strict";
|
|
6395
6395
|
var $;
|
|
@@ -6500,38 +6500,6 @@ var $;
|
|
|
6500
6500
|
;
|
|
6501
6501
|
"use strict";
|
|
6502
6502
|
var $;
|
|
6503
|
-
(function ($) {
|
|
6504
|
-
$mol_test({
|
|
6505
|
-
'must be false'() {
|
|
6506
|
-
$mol_assert_not(0);
|
|
6507
|
-
},
|
|
6508
|
-
'must be true'() {
|
|
6509
|
-
$mol_assert_ok(1);
|
|
6510
|
-
},
|
|
6511
|
-
'two must be equal'() {
|
|
6512
|
-
$mol_assert_equal(2, 2);
|
|
6513
|
-
},
|
|
6514
|
-
'three must be equal'() {
|
|
6515
|
-
$mol_assert_equal(2, 2, 2);
|
|
6516
|
-
},
|
|
6517
|
-
'two must be unique'() {
|
|
6518
|
-
$mol_assert_unique([3], [3]);
|
|
6519
|
-
},
|
|
6520
|
-
'three must be unique'() {
|
|
6521
|
-
$mol_assert_unique([3], [3], [3]);
|
|
6522
|
-
},
|
|
6523
|
-
'two must be alike'() {
|
|
6524
|
-
$mol_assert_like([3], [3]);
|
|
6525
|
-
},
|
|
6526
|
-
'three must be alike'() {
|
|
6527
|
-
$mol_assert_like([3], [3], [3]);
|
|
6528
|
-
},
|
|
6529
|
-
});
|
|
6530
|
-
})($ || ($ = {}));
|
|
6531
|
-
//mol/assert/assert.test.ts
|
|
6532
|
-
;
|
|
6533
|
-
"use strict";
|
|
6534
|
-
var $;
|
|
6535
6503
|
(function ($) {
|
|
6536
6504
|
function $mol_assert_ok(value) {
|
|
6537
6505
|
if (value)
|
|
@@ -6626,6 +6594,38 @@ var $;
|
|
|
6626
6594
|
;
|
|
6627
6595
|
"use strict";
|
|
6628
6596
|
var $;
|
|
6597
|
+
(function ($) {
|
|
6598
|
+
$mol_test({
|
|
6599
|
+
'must be false'() {
|
|
6600
|
+
$mol_assert_not(0);
|
|
6601
|
+
},
|
|
6602
|
+
'must be true'() {
|
|
6603
|
+
$mol_assert_ok(1);
|
|
6604
|
+
},
|
|
6605
|
+
'two must be equal'() {
|
|
6606
|
+
$mol_assert_equal(2, 2);
|
|
6607
|
+
},
|
|
6608
|
+
'three must be equal'() {
|
|
6609
|
+
$mol_assert_equal(2, 2, 2);
|
|
6610
|
+
},
|
|
6611
|
+
'two must be unique'() {
|
|
6612
|
+
$mol_assert_unique([3], [3]);
|
|
6613
|
+
},
|
|
6614
|
+
'three must be unique'() {
|
|
6615
|
+
$mol_assert_unique([3], [3], [3]);
|
|
6616
|
+
},
|
|
6617
|
+
'two must be alike'() {
|
|
6618
|
+
$mol_assert_like([3], [3]);
|
|
6619
|
+
},
|
|
6620
|
+
'three must be alike'() {
|
|
6621
|
+
$mol_assert_like([3], [3], [3]);
|
|
6622
|
+
},
|
|
6623
|
+
});
|
|
6624
|
+
})($ || ($ = {}));
|
|
6625
|
+
//mol/assert/assert.test.ts
|
|
6626
|
+
;
|
|
6627
|
+
"use strict";
|
|
6628
|
+
var $;
|
|
6629
6629
|
(function ($_1) {
|
|
6630
6630
|
$mol_test({
|
|
6631
6631
|
'FQN of anon function'($) {
|
|
@@ -6707,109 +6707,21 @@ var $;
|
|
|
6707
6707
|
"use strict";
|
|
6708
6708
|
var $;
|
|
6709
6709
|
(function ($) {
|
|
6710
|
-
$.$mol_after_mock_queue = [];
|
|
6711
|
-
function $mol_after_mock_warp() {
|
|
6712
|
-
const queue = $.$mol_after_mock_queue.splice(0);
|
|
6713
|
-
for (const task of queue)
|
|
6714
|
-
task();
|
|
6715
|
-
}
|
|
6716
|
-
$.$mol_after_mock_warp = $mol_after_mock_warp;
|
|
6717
|
-
class $mol_after_mock_commmon extends $mol_object2 {
|
|
6718
|
-
task;
|
|
6719
|
-
promise = Promise.resolve();
|
|
6720
|
-
cancelled = false;
|
|
6721
|
-
id;
|
|
6722
|
-
constructor(task) {
|
|
6723
|
-
super();
|
|
6724
|
-
this.task = task;
|
|
6725
|
-
$.$mol_after_mock_queue.push(task);
|
|
6726
|
-
}
|
|
6727
|
-
destructor() {
|
|
6728
|
-
const index = $.$mol_after_mock_queue.indexOf(this.task);
|
|
6729
|
-
if (index >= 0)
|
|
6730
|
-
$.$mol_after_mock_queue.splice(index, 1);
|
|
6731
|
-
}
|
|
6732
|
-
}
|
|
6733
|
-
$.$mol_after_mock_commmon = $mol_after_mock_commmon;
|
|
6734
|
-
class $mol_after_mock_timeout extends $mol_after_mock_commmon {
|
|
6735
|
-
delay;
|
|
6736
|
-
constructor(delay, task) {
|
|
6737
|
-
super(task);
|
|
6738
|
-
this.delay = delay;
|
|
6739
|
-
}
|
|
6740
|
-
}
|
|
6741
|
-
$.$mol_after_mock_timeout = $mol_after_mock_timeout;
|
|
6742
|
-
})($ || ($ = {}));
|
|
6743
|
-
//mol/after/mock/mock.test.ts
|
|
6744
|
-
;
|
|
6745
|
-
"use strict";
|
|
6746
|
-
var $;
|
|
6747
|
-
(function ($_1) {
|
|
6748
6710
|
$mol_test({
|
|
6749
|
-
'
|
|
6750
|
-
$
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
$mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
|
|
6755
|
-
$mol_assert_equal($mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
|
|
6756
|
-
$mol_assert_equal($mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
|
|
6757
|
-
$mol_assert_equal($mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
|
|
6758
|
-
},
|
|
6759
|
-
'inserting'() {
|
|
6760
|
-
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
|
|
6761
|
-
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
|
|
6762
|
-
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 0, 0, 0).toString(), 'a b \\\n');
|
|
6763
|
-
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
|
|
6764
|
-
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, null, null, null).toString(), 'a b \\\n');
|
|
6765
|
-
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
|
|
6766
|
-
},
|
|
6767
|
-
'fromJSON'() {
|
|
6768
|
-
$mol_assert_equal($mol_tree.fromJSON([]).toString(), '/\n');
|
|
6769
|
-
$mol_assert_equal($mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
|
|
6770
|
-
$mol_assert_equal($mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
|
|
6771
|
-
$mol_assert_equal($mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
|
|
6772
|
-
$mol_assert_equal($mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
|
|
6773
|
-
},
|
|
6774
|
-
'toJSON'() {
|
|
6775
|
-
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n').sub[0]), '[]');
|
|
6776
|
-
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
|
|
6777
|
-
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
|
|
6778
|
-
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
|
|
6779
|
-
$mol_assert_equal(JSON.stringify($mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
|
|
6780
|
-
},
|
|
6781
|
-
'hack'() {
|
|
6782
|
-
const res = $mol_tree.fromString(`foo bar xxx`).hack({
|
|
6783
|
-
'': (tree, context) => [tree.hack(context)],
|
|
6784
|
-
'bar': (tree, context) => [tree.hack(context).clone({ type: '777' })],
|
|
6785
|
-
});
|
|
6786
|
-
$mol_assert_equal(res.toString(), new $mol_tree({ type: 'foo 777 xxx' }).toString());
|
|
6787
|
-
},
|
|
6788
|
-
'errors handling'($) {
|
|
6789
|
-
const errors = [];
|
|
6790
|
-
class Tree extends $mol_tree {
|
|
6791
|
-
static $ = $.$mol_ambient({
|
|
6792
|
-
$mol_fail: error => errors.push(error.message)
|
|
6793
|
-
});
|
|
6711
|
+
'init with overload'() {
|
|
6712
|
+
class X extends $mol_object {
|
|
6713
|
+
foo() {
|
|
6714
|
+
return 1;
|
|
6715
|
+
}
|
|
6794
6716
|
}
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
$mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
|
|
6717
|
+
var x = X.make({
|
|
6718
|
+
foo: () => 2,
|
|
6719
|
+
});
|
|
6720
|
+
$mol_assert_equal(x.foo(), 2);
|
|
6800
6721
|
},
|
|
6801
6722
|
});
|
|
6802
6723
|
})($ || ($ = {}));
|
|
6803
|
-
//mol/
|
|
6804
|
-
;
|
|
6805
|
-
"use strict";
|
|
6806
|
-
var $;
|
|
6807
|
-
(function ($_1) {
|
|
6808
|
-
$mol_test_mocks.push($ => {
|
|
6809
|
-
$.$mol_after_tick = $mol_after_mock_commmon;
|
|
6810
|
-
});
|
|
6811
|
-
})($ || ($ = {}));
|
|
6812
|
-
//mol/after/tick/tick.test.ts
|
|
6724
|
+
//mol/object/object.test.ts
|
|
6813
6725
|
;
|
|
6814
6726
|
"use strict";
|
|
6815
6727
|
var $;
|
|
@@ -6867,7 +6779,45 @@ var $;
|
|
|
6867
6779
|
},
|
|
6868
6780
|
});
|
|
6869
6781
|
})($ || ($ = {}));
|
|
6870
|
-
//mol/wire/pub/sub/sub.test.ts
|
|
6782
|
+
//mol/wire/pub/sub/sub.test.ts
|
|
6783
|
+
;
|
|
6784
|
+
"use strict";
|
|
6785
|
+
var $;
|
|
6786
|
+
(function ($) {
|
|
6787
|
+
$.$mol_after_mock_queue = [];
|
|
6788
|
+
function $mol_after_mock_warp() {
|
|
6789
|
+
const queue = $.$mol_after_mock_queue.splice(0);
|
|
6790
|
+
for (const task of queue)
|
|
6791
|
+
task();
|
|
6792
|
+
}
|
|
6793
|
+
$.$mol_after_mock_warp = $mol_after_mock_warp;
|
|
6794
|
+
class $mol_after_mock_commmon extends $mol_object2 {
|
|
6795
|
+
task;
|
|
6796
|
+
promise = Promise.resolve();
|
|
6797
|
+
cancelled = false;
|
|
6798
|
+
id;
|
|
6799
|
+
constructor(task) {
|
|
6800
|
+
super();
|
|
6801
|
+
this.task = task;
|
|
6802
|
+
$.$mol_after_mock_queue.push(task);
|
|
6803
|
+
}
|
|
6804
|
+
destructor() {
|
|
6805
|
+
const index = $.$mol_after_mock_queue.indexOf(this.task);
|
|
6806
|
+
if (index >= 0)
|
|
6807
|
+
$.$mol_after_mock_queue.splice(index, 1);
|
|
6808
|
+
}
|
|
6809
|
+
}
|
|
6810
|
+
$.$mol_after_mock_commmon = $mol_after_mock_commmon;
|
|
6811
|
+
class $mol_after_mock_timeout extends $mol_after_mock_commmon {
|
|
6812
|
+
delay;
|
|
6813
|
+
constructor(delay, task) {
|
|
6814
|
+
super(task);
|
|
6815
|
+
this.delay = delay;
|
|
6816
|
+
}
|
|
6817
|
+
}
|
|
6818
|
+
$.$mol_after_mock_timeout = $mol_after_mock_timeout;
|
|
6819
|
+
})($ || ($ = {}));
|
|
6820
|
+
//mol/after/mock/mock.test.ts
|
|
6871
6821
|
;
|
|
6872
6822
|
"use strict";
|
|
6873
6823
|
var $;
|
|
@@ -6970,6 +6920,9 @@ var $;
|
|
|
6970
6920
|
//mol/wire/fiber/fiber.test.ts
|
|
6971
6921
|
;
|
|
6972
6922
|
"use strict";
|
|
6923
|
+
//mol/type/tail/tail.test.ts
|
|
6924
|
+
;
|
|
6925
|
+
"use strict";
|
|
6973
6926
|
var $;
|
|
6974
6927
|
(function ($) {
|
|
6975
6928
|
function $mol_promise() {
|
|
@@ -7076,9 +7029,6 @@ var $;
|
|
|
7076
7029
|
//mol/wire/async/async.test.ts
|
|
7077
7030
|
;
|
|
7078
7031
|
"use strict";
|
|
7079
|
-
//mol/type/tail/tail.test.ts
|
|
7080
|
-
;
|
|
7081
|
-
"use strict";
|
|
7082
7032
|
var $;
|
|
7083
7033
|
(function ($_1) {
|
|
7084
7034
|
$mol_test({
|
|
@@ -7669,22 +7619,12 @@ var $;
|
|
|
7669
7619
|
;
|
|
7670
7620
|
"use strict";
|
|
7671
7621
|
var $;
|
|
7672
|
-
(function ($) {
|
|
7673
|
-
$
|
|
7674
|
-
|
|
7675
|
-
class X extends $mol_object {
|
|
7676
|
-
foo() {
|
|
7677
|
-
return 1;
|
|
7678
|
-
}
|
|
7679
|
-
}
|
|
7680
|
-
var x = X.make({
|
|
7681
|
-
foo: () => 2,
|
|
7682
|
-
});
|
|
7683
|
-
$mol_assert_equal(x.foo(), 2);
|
|
7684
|
-
},
|
|
7622
|
+
(function ($_1) {
|
|
7623
|
+
$mol_test_mocks.push($ => {
|
|
7624
|
+
$.$mol_after_tick = $mol_after_mock_commmon;
|
|
7685
7625
|
});
|
|
7686
7626
|
})($ || ($ = {}));
|
|
7687
|
-
//mol/
|
|
7627
|
+
//mol/after/tick/tick.test.ts
|
|
7688
7628
|
;
|
|
7689
7629
|
"use strict";
|
|
7690
7630
|
var $;
|
|
@@ -7831,6 +7771,64 @@ var $;
|
|
|
7831
7771
|
;
|
|
7832
7772
|
"use strict";
|
|
7833
7773
|
var $;
|
|
7774
|
+
(function ($) {
|
|
7775
|
+
$mol_test({
|
|
7776
|
+
'Primitives'() {
|
|
7777
|
+
$mol_assert_equal($mol_key(null), 'null');
|
|
7778
|
+
$mol_assert_equal($mol_key(false), 'false');
|
|
7779
|
+
$mol_assert_equal($mol_key(true), 'true');
|
|
7780
|
+
$mol_assert_equal($mol_key(0), '0');
|
|
7781
|
+
$mol_assert_equal($mol_key(''), '""');
|
|
7782
|
+
},
|
|
7783
|
+
'Array & POJO'() {
|
|
7784
|
+
$mol_assert_equal($mol_key([null]), '[null]');
|
|
7785
|
+
$mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
|
|
7786
|
+
$mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
|
|
7787
|
+
},
|
|
7788
|
+
'Function'() {
|
|
7789
|
+
const func = () => { };
|
|
7790
|
+
$mol_assert_equal($mol_key(func), $mol_key(func));
|
|
7791
|
+
$mol_assert_unique($mol_key(func), $mol_key(() => { }));
|
|
7792
|
+
},
|
|
7793
|
+
'Objects'() {
|
|
7794
|
+
class User {
|
|
7795
|
+
}
|
|
7796
|
+
const jin = new User();
|
|
7797
|
+
$mol_assert_equal($mol_key(jin), $mol_key(jin));
|
|
7798
|
+
$mol_assert_unique($mol_key(jin), $mol_key(new User()));
|
|
7799
|
+
},
|
|
7800
|
+
'Elements'() {
|
|
7801
|
+
const foo = $mol_jsx("div", null, "bar");
|
|
7802
|
+
$mol_assert_equal($mol_key(foo), $mol_key(foo));
|
|
7803
|
+
$mol_assert_unique($mol_key(foo), $mol_key($mol_jsx("div", null, "bar")));
|
|
7804
|
+
},
|
|
7805
|
+
'Custom JSON representation'() {
|
|
7806
|
+
class User {
|
|
7807
|
+
name;
|
|
7808
|
+
age;
|
|
7809
|
+
constructor(name, age) {
|
|
7810
|
+
this.name = name;
|
|
7811
|
+
this.age = age;
|
|
7812
|
+
}
|
|
7813
|
+
toJSON() { return { name: this.name }; }
|
|
7814
|
+
}
|
|
7815
|
+
$mol_assert_equal($mol_key(new User('jin', 18)), '{"name":"jin"}');
|
|
7816
|
+
},
|
|
7817
|
+
'Special native classes'() {
|
|
7818
|
+
$mol_assert_equal($mol_key(new Date('xyz')), 'null');
|
|
7819
|
+
$mol_assert_equal($mol_key(new Date('2001-01-02T03:04:05.678Z')), '"2001-01-02T03:04:05.678Z"');
|
|
7820
|
+
$mol_assert_equal($mol_key(/./), '"/./"');
|
|
7821
|
+
$mol_assert_equal($mol_key(/\./gimsu), '"/\\\\./gimsu"');
|
|
7822
|
+
},
|
|
7823
|
+
});
|
|
7824
|
+
})($ || ($ = {}));
|
|
7825
|
+
//mol/key/key.test.tsx
|
|
7826
|
+
;
|
|
7827
|
+
"use strict";
|
|
7828
|
+
//mol/type/foot/foot.test.ts
|
|
7829
|
+
;
|
|
7830
|
+
"use strict";
|
|
7831
|
+
var $;
|
|
7834
7832
|
(function ($) {
|
|
7835
7833
|
class $mol_wire_log extends $mol_object2 {
|
|
7836
7834
|
static watch(task) {
|
|
@@ -7897,64 +7895,6 @@ var $;
|
|
|
7897
7895
|
;
|
|
7898
7896
|
"use strict";
|
|
7899
7897
|
var $;
|
|
7900
|
-
(function ($) {
|
|
7901
|
-
$mol_test({
|
|
7902
|
-
'Primitives'() {
|
|
7903
|
-
$mol_assert_equal($mol_key(null), 'null');
|
|
7904
|
-
$mol_assert_equal($mol_key(false), 'false');
|
|
7905
|
-
$mol_assert_equal($mol_key(true), 'true');
|
|
7906
|
-
$mol_assert_equal($mol_key(0), '0');
|
|
7907
|
-
$mol_assert_equal($mol_key(''), '""');
|
|
7908
|
-
},
|
|
7909
|
-
'Array & POJO'() {
|
|
7910
|
-
$mol_assert_equal($mol_key([null]), '[null]');
|
|
7911
|
-
$mol_assert_equal($mol_key({ foo: 0 }), '{"foo":0}');
|
|
7912
|
-
$mol_assert_equal($mol_key({ foo: [false] }), '{"foo":[false]}');
|
|
7913
|
-
},
|
|
7914
|
-
'Function'() {
|
|
7915
|
-
const func = () => { };
|
|
7916
|
-
$mol_assert_equal($mol_key(func), $mol_key(func));
|
|
7917
|
-
$mol_assert_unique($mol_key(func), $mol_key(() => { }));
|
|
7918
|
-
},
|
|
7919
|
-
'Objects'() {
|
|
7920
|
-
class User {
|
|
7921
|
-
}
|
|
7922
|
-
const jin = new User();
|
|
7923
|
-
$mol_assert_equal($mol_key(jin), $mol_key(jin));
|
|
7924
|
-
$mol_assert_unique($mol_key(jin), $mol_key(new User()));
|
|
7925
|
-
},
|
|
7926
|
-
'Elements'() {
|
|
7927
|
-
const foo = $mol_jsx("div", null, "bar");
|
|
7928
|
-
$mol_assert_equal($mol_key(foo), $mol_key(foo));
|
|
7929
|
-
$mol_assert_unique($mol_key(foo), $mol_key($mol_jsx("div", null, "bar")));
|
|
7930
|
-
},
|
|
7931
|
-
'Custom JSON representation'() {
|
|
7932
|
-
class User {
|
|
7933
|
-
name;
|
|
7934
|
-
age;
|
|
7935
|
-
constructor(name, age) {
|
|
7936
|
-
this.name = name;
|
|
7937
|
-
this.age = age;
|
|
7938
|
-
}
|
|
7939
|
-
toJSON() { return { name: this.name }; }
|
|
7940
|
-
}
|
|
7941
|
-
$mol_assert_equal($mol_key(new User('jin', 18)), '{"name":"jin"}');
|
|
7942
|
-
},
|
|
7943
|
-
'Special native classes'() {
|
|
7944
|
-
$mol_assert_equal($mol_key(new Date('xyz')), 'null');
|
|
7945
|
-
$mol_assert_equal($mol_key(new Date('2001-01-02T03:04:05.678Z')), '"2001-01-02T03:04:05.678Z"');
|
|
7946
|
-
$mol_assert_equal($mol_key(/./), '"/./"');
|
|
7947
|
-
$mol_assert_equal($mol_key(/\./gimsu), '"/\\\\./gimsu"');
|
|
7948
|
-
},
|
|
7949
|
-
});
|
|
7950
|
-
})($ || ($ = {}));
|
|
7951
|
-
//mol/key/key.test.tsx
|
|
7952
|
-
;
|
|
7953
|
-
"use strict";
|
|
7954
|
-
//mol/type/foot/foot.test.ts
|
|
7955
|
-
;
|
|
7956
|
-
"use strict";
|
|
7957
|
-
var $;
|
|
7958
7898
|
(function ($) {
|
|
7959
7899
|
$mol_wire_log.active();
|
|
7960
7900
|
})($ || ($ = {}));
|
|
@@ -8087,26 +8027,26 @@ var $;
|
|
|
8087
8027
|
"use strict";
|
|
8088
8028
|
var $;
|
|
8089
8029
|
(function ($) {
|
|
8090
|
-
class $
|
|
8030
|
+
class $mol_view_tree_test_simple extends $mol_view {
|
|
8091
8031
|
some() {
|
|
8092
|
-
return
|
|
8093
|
-
a: 0,
|
|
8094
|
-
b: 2
|
|
8095
|
-
};
|
|
8032
|
+
return 1;
|
|
8096
8033
|
}
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
return
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8034
|
+
bool() {
|
|
8035
|
+
return true;
|
|
8036
|
+
}
|
|
8037
|
+
str() {
|
|
8038
|
+
return "test";
|
|
8039
|
+
}
|
|
8040
|
+
arr() {
|
|
8041
|
+
return [];
|
|
8042
|
+
}
|
|
8043
|
+
arr_string() {
|
|
8044
|
+
return [];
|
|
8105
8045
|
}
|
|
8106
8046
|
}
|
|
8107
|
-
$.$
|
|
8047
|
+
$.$mol_view_tree_test_simple = $mol_view_tree_test_simple;
|
|
8108
8048
|
})($ || ($ = {}));
|
|
8109
|
-
//mol/view/tree/test/-view.tree/
|
|
8049
|
+
//mol/view/tree/test/-view.tree/simple.test.view.tree.ts
|
|
8110
8050
|
;
|
|
8111
8051
|
"use strict";
|
|
8112
8052
|
var $;
|
|
@@ -8137,56 +8077,26 @@ var $;
|
|
|
8137
8077
|
"use strict";
|
|
8138
8078
|
var $;
|
|
8139
8079
|
(function ($) {
|
|
8140
|
-
class $
|
|
8141
|
-
|
|
8142
|
-
return
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
return obj;
|
|
8147
|
-
}
|
|
8148
|
-
}
|
|
8149
|
-
__decorate([
|
|
8150
|
-
$mol_mem
|
|
8151
|
-
], $mol_view_tree_test_binding_right.prototype, "Test", null);
|
|
8152
|
-
$.$mol_view_tree_test_binding_right = $mol_view_tree_test_binding_right;
|
|
8153
|
-
class $mol_view_tree_test_binding_right_test extends $mol_view {
|
|
8154
|
-
width(val) {
|
|
8155
|
-
if (val !== undefined)
|
|
8156
|
-
return val;
|
|
8157
|
-
return 0;
|
|
8080
|
+
class $mol_view_tree_test_attributes_super extends $mol_view {
|
|
8081
|
+
some() {
|
|
8082
|
+
return {
|
|
8083
|
+
a: 0,
|
|
8084
|
+
b: 2
|
|
8085
|
+
};
|
|
8158
8086
|
}
|
|
8159
8087
|
}
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
], $mol_view_tree_test_binding_right_test.prototype, "width", null);
|
|
8163
|
-
$.$mol_view_tree_test_binding_right_test = $mol_view_tree_test_binding_right_test;
|
|
8164
|
-
})($ || ($ = {}));
|
|
8165
|
-
//mol/view/tree/test/-view.tree/binding_right.test.view.tree.ts
|
|
8166
|
-
;
|
|
8167
|
-
"use strict";
|
|
8168
|
-
var $;
|
|
8169
|
-
(function ($) {
|
|
8170
|
-
class $mol_view_tree_test_simple extends $mol_view {
|
|
8088
|
+
$.$mol_view_tree_test_attributes_super = $mol_view_tree_test_attributes_super;
|
|
8089
|
+
class $mol_view_tree_test_attributes extends $mol_view_tree_test_attributes_super {
|
|
8171
8090
|
some() {
|
|
8172
|
-
return
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
}
|
|
8177
|
-
str() {
|
|
8178
|
-
return "test";
|
|
8179
|
-
}
|
|
8180
|
-
arr() {
|
|
8181
|
-
return [];
|
|
8182
|
-
}
|
|
8183
|
-
arr_string() {
|
|
8184
|
-
return [];
|
|
8091
|
+
return {
|
|
8092
|
+
...super.some(),
|
|
8093
|
+
a: 1
|
|
8094
|
+
};
|
|
8185
8095
|
}
|
|
8186
8096
|
}
|
|
8187
|
-
$.$
|
|
8097
|
+
$.$mol_view_tree_test_attributes = $mol_view_tree_test_attributes;
|
|
8188
8098
|
})($ || ($ = {}));
|
|
8189
|
-
//mol/view/tree/test/-view.tree/
|
|
8099
|
+
//mol/view/tree/test/-view.tree/attributes.test.view.tree.ts
|
|
8190
8100
|
;
|
|
8191
8101
|
"use strict";
|
|
8192
8102
|
var $;
|
|
@@ -8216,6 +8126,36 @@ var $;
|
|
|
8216
8126
|
;
|
|
8217
8127
|
"use strict";
|
|
8218
8128
|
var $;
|
|
8129
|
+
(function ($) {
|
|
8130
|
+
class $mol_view_tree_test_binding_right extends $mol_view {
|
|
8131
|
+
outer_width(v) {
|
|
8132
|
+
return this.Test().width(v);
|
|
8133
|
+
}
|
|
8134
|
+
Test() {
|
|
8135
|
+
const obj = new this.$.$mol_view_tree_test_binding_right_test();
|
|
8136
|
+
return obj;
|
|
8137
|
+
}
|
|
8138
|
+
}
|
|
8139
|
+
__decorate([
|
|
8140
|
+
$mol_mem
|
|
8141
|
+
], $mol_view_tree_test_binding_right.prototype, "Test", null);
|
|
8142
|
+
$.$mol_view_tree_test_binding_right = $mol_view_tree_test_binding_right;
|
|
8143
|
+
class $mol_view_tree_test_binding_right_test extends $mol_view {
|
|
8144
|
+
width(val) {
|
|
8145
|
+
if (val !== undefined)
|
|
8146
|
+
return val;
|
|
8147
|
+
return 0;
|
|
8148
|
+
}
|
|
8149
|
+
}
|
|
8150
|
+
__decorate([
|
|
8151
|
+
$mol_mem
|
|
8152
|
+
], $mol_view_tree_test_binding_right_test.prototype, "width", null);
|
|
8153
|
+
$.$mol_view_tree_test_binding_right_test = $mol_view_tree_test_binding_right_test;
|
|
8154
|
+
})($ || ($ = {}));
|
|
8155
|
+
//mol/view/tree/test/-view.tree/binding_right.test.view.tree.ts
|
|
8156
|
+
;
|
|
8157
|
+
"use strict";
|
|
8158
|
+
var $;
|
|
8219
8159
|
(function ($_1) {
|
|
8220
8160
|
var $$;
|
|
8221
8161
|
(function ($$) {
|
|
@@ -8282,37 +8222,63 @@ var $;
|
|
|
8282
8222
|
;
|
|
8283
8223
|
"use strict";
|
|
8284
8224
|
var $;
|
|
8285
|
-
(function ($) {
|
|
8286
|
-
$mol_test_mocks.push(context => {
|
|
8287
|
-
class $mol_state_local_mock extends $mol_state_local {
|
|
8288
|
-
static state = {};
|
|
8289
|
-
static value(key, next = this.state[key]) {
|
|
8290
|
-
return this.state[key] = (next || null);
|
|
8291
|
-
}
|
|
8292
|
-
}
|
|
8293
|
-
__decorate([
|
|
8294
|
-
$mol_mem_key
|
|
8295
|
-
], $mol_state_local_mock, "value", null);
|
|
8296
|
-
context.$mol_state_local = $mol_state_local_mock;
|
|
8297
|
-
});
|
|
8298
|
-
})($ || ($ = {}));
|
|
8299
|
-
//mol/state/local/local.mock.test.ts
|
|
8300
|
-
;
|
|
8301
|
-
"use strict";
|
|
8302
|
-
var $;
|
|
8303
|
-
(function ($) {
|
|
8225
|
+
(function ($_1) {
|
|
8304
8226
|
$mol_test({
|
|
8305
|
-
'
|
|
8306
|
-
|
|
8307
|
-
$mol_assert_equal($
|
|
8308
|
-
$
|
|
8309
|
-
$mol_assert_equal($
|
|
8310
|
-
$
|
|
8311
|
-
$mol_assert_equal($
|
|
8227
|
+
'tree parsing'() {
|
|
8228
|
+
$mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub.length, 2);
|
|
8229
|
+
$mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub[1].type, "bar");
|
|
8230
|
+
$mol_assert_equal($mol_tree.fromString("foo\n\n\n").sub.length, 1);
|
|
8231
|
+
$mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub.length, 2);
|
|
8232
|
+
$mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
|
|
8233
|
+
$mol_assert_equal($mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
|
|
8234
|
+
$mol_assert_equal($mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
|
|
8235
|
+
$mol_assert_equal($mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
|
|
8236
|
+
},
|
|
8237
|
+
'inserting'() {
|
|
8238
|
+
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
|
|
8239
|
+
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
|
|
8240
|
+
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 0, 0, 0).toString(), 'a b \\\n');
|
|
8241
|
+
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
|
|
8242
|
+
$mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, null, null, null).toString(), 'a b \\\n');
|
|
8243
|
+
$mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
|
|
8244
|
+
},
|
|
8245
|
+
'fromJSON'() {
|
|
8246
|
+
$mol_assert_equal($mol_tree.fromJSON([]).toString(), '/\n');
|
|
8247
|
+
$mol_assert_equal($mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
|
|
8248
|
+
$mol_assert_equal($mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
|
|
8249
|
+
$mol_assert_equal($mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
|
|
8250
|
+
$mol_assert_equal($mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
|
|
8251
|
+
},
|
|
8252
|
+
'toJSON'() {
|
|
8253
|
+
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n').sub[0]), '[]');
|
|
8254
|
+
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
|
|
8255
|
+
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
|
|
8256
|
+
$mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
|
|
8257
|
+
$mol_assert_equal(JSON.stringify($mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
|
|
8258
|
+
},
|
|
8259
|
+
'hack'() {
|
|
8260
|
+
const res = $mol_tree.fromString(`foo bar xxx`).hack({
|
|
8261
|
+
'': (tree, context) => [tree.hack(context)],
|
|
8262
|
+
'bar': (tree, context) => [tree.hack(context).clone({ type: '777' })],
|
|
8263
|
+
});
|
|
8264
|
+
$mol_assert_equal(res.toString(), new $mol_tree({ type: 'foo 777 xxx' }).toString());
|
|
8265
|
+
},
|
|
8266
|
+
'errors handling'($) {
|
|
8267
|
+
const errors = [];
|
|
8268
|
+
class Tree extends $mol_tree {
|
|
8269
|
+
static $ = $.$mol_ambient({
|
|
8270
|
+
$mol_fail: error => errors.push(error.message)
|
|
8271
|
+
});
|
|
8272
|
+
}
|
|
8273
|
+
Tree.fromString(`
|
|
8274
|
+
\t \tfoo
|
|
8275
|
+
bar \\data
|
|
8276
|
+
`, 'test');
|
|
8277
|
+
$mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
|
|
8312
8278
|
},
|
|
8313
8279
|
});
|
|
8314
8280
|
})($ || ($ = {}));
|
|
8315
|
-
//mol/
|
|
8281
|
+
//mol/tree/tree.test.ts
|
|
8316
8282
|
;
|
|
8317
8283
|
"use strict";
|
|
8318
8284
|
var $;
|
|
@@ -8372,25 +8338,41 @@ var $;
|
|
|
8372
8338
|
//mol/state/local/local.ts
|
|
8373
8339
|
;
|
|
8374
8340
|
"use strict";
|
|
8375
|
-
//mol/charset/encoding/encoding.ts
|
|
8376
|
-
;
|
|
8377
|
-
"use strict";
|
|
8378
8341
|
var $;
|
|
8379
8342
|
(function ($) {
|
|
8380
8343
|
$mol_test({
|
|
8381
|
-
'
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
$
|
|
8385
|
-
$mol_assert_equal($
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
const encoded = new Uint8Array([]);
|
|
8389
|
-
$mol_assert_equal($mol_charset_decode(encoded), '');
|
|
8344
|
+
'local get set delete'() {
|
|
8345
|
+
var key = '$mol_state_local_test:' + Math.random();
|
|
8346
|
+
$mol_assert_equal($mol_state_local.value(key), null);
|
|
8347
|
+
$mol_state_local.value(key, 123);
|
|
8348
|
+
$mol_assert_equal($mol_state_local.value(key), 123);
|
|
8349
|
+
$mol_state_local.value(key, null);
|
|
8350
|
+
$mol_assert_equal($mol_state_local.value(key), null);
|
|
8390
8351
|
},
|
|
8391
8352
|
});
|
|
8392
8353
|
})($ || ($ = {}));
|
|
8393
|
-
//mol/
|
|
8354
|
+
//mol/state/local/local.test.ts
|
|
8355
|
+
;
|
|
8356
|
+
"use strict";
|
|
8357
|
+
var $;
|
|
8358
|
+
(function ($) {
|
|
8359
|
+
$mol_test_mocks.push(context => {
|
|
8360
|
+
class $mol_state_local_mock extends $mol_state_local {
|
|
8361
|
+
static state = {};
|
|
8362
|
+
static value(key, next = this.state[key]) {
|
|
8363
|
+
return this.state[key] = (next || null);
|
|
8364
|
+
}
|
|
8365
|
+
}
|
|
8366
|
+
__decorate([
|
|
8367
|
+
$mol_mem_key
|
|
8368
|
+
], $mol_state_local_mock, "value", null);
|
|
8369
|
+
context.$mol_state_local = $mol_state_local_mock;
|
|
8370
|
+
});
|
|
8371
|
+
})($ || ($ = {}));
|
|
8372
|
+
//mol/state/local/local.mock.test.ts
|
|
8373
|
+
;
|
|
8374
|
+
"use strict";
|
|
8375
|
+
//mol/charset/encoding/encoding.ts
|
|
8394
8376
|
;
|
|
8395
8377
|
"use strict";
|
|
8396
8378
|
var $;
|
|
@@ -8410,14 +8392,19 @@ var $;
|
|
|
8410
8392
|
var $;
|
|
8411
8393
|
(function ($) {
|
|
8412
8394
|
$mol_test({
|
|
8413
|
-
'
|
|
8395
|
+
'decode utf8 string'() {
|
|
8414
8396
|
const str = 'Hello, ΧΨΩЫ';
|
|
8415
8397
|
const encoded = new Uint8Array([72, 101, 108, 108, 111, 44, 32, 206, 167, 206, 168, 206, 169, 208, 171]);
|
|
8416
|
-
$
|
|
8398
|
+
$mol_assert_equal($mol_charset_decode(encoded), str);
|
|
8399
|
+
$mol_assert_equal($mol_charset_decode(encoded, 'utf8'), str);
|
|
8400
|
+
},
|
|
8401
|
+
'decode empty string'() {
|
|
8402
|
+
const encoded = new Uint8Array([]);
|
|
8403
|
+
$mol_assert_equal($mol_charset_decode(encoded), '');
|
|
8417
8404
|
},
|
|
8418
8405
|
});
|
|
8419
8406
|
})($ || ($ = {}));
|
|
8420
|
-
//mol/charset/
|
|
8407
|
+
//mol/charset/decode/decode.test.ts
|
|
8421
8408
|
;
|
|
8422
8409
|
"use strict";
|
|
8423
8410
|
var $;
|
|
@@ -8433,6 +8420,19 @@ var $;
|
|
|
8433
8420
|
;
|
|
8434
8421
|
"use strict";
|
|
8435
8422
|
var $;
|
|
8423
|
+
(function ($) {
|
|
8424
|
+
$mol_test({
|
|
8425
|
+
'encode utf8 string'() {
|
|
8426
|
+
const str = 'Hello, ΧΨΩЫ';
|
|
8427
|
+
const encoded = new Uint8Array([72, 101, 108, 108, 111, 44, 32, 206, 167, 206, 168, 206, 169, 208, 171]);
|
|
8428
|
+
$mol_assert_like($mol_charset_encode(str), encoded);
|
|
8429
|
+
},
|
|
8430
|
+
});
|
|
8431
|
+
})($ || ($ = {}));
|
|
8432
|
+
//mol/charset/encode/encode.test.ts
|
|
8433
|
+
;
|
|
8434
|
+
"use strict";
|
|
8435
|
+
var $;
|
|
8436
8436
|
(function ($) {
|
|
8437
8437
|
class $mol_file_not_found extends Error {
|
|
8438
8438
|
}
|
|
@@ -8552,24 +8552,6 @@ var $;
|
|
|
8552
8552
|
;
|
|
8553
8553
|
"use strict";
|
|
8554
8554
|
var $;
|
|
8555
|
-
(function ($) {
|
|
8556
|
-
class TestClass extends Uint8Array {
|
|
8557
|
-
}
|
|
8558
|
-
$mol_test({
|
|
8559
|
-
'Uint8Array vs itself'() {
|
|
8560
|
-
$mol_assert_ok($mol_compare_array(new Uint8Array, new Uint8Array));
|
|
8561
|
-
$mol_assert_ok($mol_compare_array(new Uint8Array([0]), new Uint8Array([0])));
|
|
8562
|
-
$mol_assert_not($mol_compare_array(new Uint8Array([0]), new Uint8Array([1])));
|
|
8563
|
-
},
|
|
8564
|
-
'Uint8Array vs subclassed array'() {
|
|
8565
|
-
$mol_assert_not($mol_compare_array(new Uint8Array, new TestClass));
|
|
8566
|
-
},
|
|
8567
|
-
});
|
|
8568
|
-
})($ || ($ = {}));
|
|
8569
|
-
//mol/compare/array/array.test.ts
|
|
8570
|
-
;
|
|
8571
|
-
"use strict";
|
|
8572
|
-
var $;
|
|
8573
8555
|
(function ($) {
|
|
8574
8556
|
function $mol_compare_array(a, b) {
|
|
8575
8557
|
if (a === b)
|
|
@@ -8589,6 +8571,24 @@ var $;
|
|
|
8589
8571
|
;
|
|
8590
8572
|
"use strict";
|
|
8591
8573
|
var $;
|
|
8574
|
+
(function ($) {
|
|
8575
|
+
class TestClass extends Uint8Array {
|
|
8576
|
+
}
|
|
8577
|
+
$mol_test({
|
|
8578
|
+
'Uint8Array vs itself'() {
|
|
8579
|
+
$mol_assert_ok($mol_compare_array(new Uint8Array, new Uint8Array));
|
|
8580
|
+
$mol_assert_ok($mol_compare_array(new Uint8Array([0]), new Uint8Array([0])));
|
|
8581
|
+
$mol_assert_not($mol_compare_array(new Uint8Array([0]), new Uint8Array([1])));
|
|
8582
|
+
},
|
|
8583
|
+
'Uint8Array vs subclassed array'() {
|
|
8584
|
+
$mol_assert_not($mol_compare_array(new Uint8Array, new TestClass));
|
|
8585
|
+
},
|
|
8586
|
+
});
|
|
8587
|
+
})($ || ($ = {}));
|
|
8588
|
+
//mol/compare/array/array.test.ts
|
|
8589
|
+
;
|
|
8590
|
+
"use strict";
|
|
8591
|
+
var $;
|
|
8592
8592
|
(function ($) {
|
|
8593
8593
|
function stat_convert(stat) {
|
|
8594
8594
|
if (!stat)
|
|
@@ -8775,27 +8775,6 @@ var $;
|
|
|
8775
8775
|
;
|
|
8776
8776
|
"use strict";
|
|
8777
8777
|
var $;
|
|
8778
|
-
(function ($_1) {
|
|
8779
|
-
$mol_test_mocks.push($ => {
|
|
8780
|
-
class $mol_locale_mock extends $mol_locale {
|
|
8781
|
-
lang(next = 'en') { return next; }
|
|
8782
|
-
static source(lang) {
|
|
8783
|
-
return {};
|
|
8784
|
-
}
|
|
8785
|
-
}
|
|
8786
|
-
__decorate([
|
|
8787
|
-
$mol_mem
|
|
8788
|
-
], $mol_locale_mock.prototype, "lang", null);
|
|
8789
|
-
__decorate([
|
|
8790
|
-
$mol_mem_key
|
|
8791
|
-
], $mol_locale_mock, "source", null);
|
|
8792
|
-
$.$mol_locale = $mol_locale_mock;
|
|
8793
|
-
});
|
|
8794
|
-
})($ || ($ = {}));
|
|
8795
|
-
//mol/locale/locale.test.ts
|
|
8796
|
-
;
|
|
8797
|
-
"use strict";
|
|
8798
|
-
var $;
|
|
8799
8778
|
(function ($) {
|
|
8800
8779
|
class $mol_locale extends $mol_object {
|
|
8801
8780
|
static lang_default() {
|
|
@@ -8860,6 +8839,27 @@ var $;
|
|
|
8860
8839
|
;
|
|
8861
8840
|
"use strict";
|
|
8862
8841
|
var $;
|
|
8842
|
+
(function ($_1) {
|
|
8843
|
+
$mol_test_mocks.push($ => {
|
|
8844
|
+
class $mol_locale_mock extends $mol_locale {
|
|
8845
|
+
lang(next = 'en') { return next; }
|
|
8846
|
+
static source(lang) {
|
|
8847
|
+
return {};
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8850
|
+
__decorate([
|
|
8851
|
+
$mol_mem
|
|
8852
|
+
], $mol_locale_mock.prototype, "lang", null);
|
|
8853
|
+
__decorate([
|
|
8854
|
+
$mol_mem_key
|
|
8855
|
+
], $mol_locale_mock, "source", null);
|
|
8856
|
+
$.$mol_locale = $mol_locale_mock;
|
|
8857
|
+
});
|
|
8858
|
+
})($ || ($ = {}));
|
|
8859
|
+
//mol/locale/locale.test.ts
|
|
8860
|
+
;
|
|
8861
|
+
"use strict";
|
|
8862
|
+
var $;
|
|
8863
8863
|
(function ($) {
|
|
8864
8864
|
function $mol_view_tree_trim_remarks(def) {
|
|
8865
8865
|
return def.transform(([node], sub) => (node.type === '-') ? null : node.clone({ sub: sub() }));
|