ezh 0.1.6 → 0.2.0
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/lib/RbTree.js +19 -19
- package/lib/bundle.min.js +1 -1
- package/lib/debugCheck.js +37 -37
- package/lib/elements.js +450 -450
- package/lib/index.d.ts +1 -1
- package/lib/router.js +20 -20
- package/lib/state.js +188 -202
- package/package.json +2 -3
package/lib/elements.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { Z, Q, O, R } from './RbTree';
|
|
2
|
+
const S = {
|
|
3
3
|
'ariaAtomic': 'aria-atomic',
|
|
4
4
|
'ariaAutoComplete': 'aria-autocomplete',
|
|
5
5
|
'ariaBrailleLabel': 'aria-braillelabel',
|
|
@@ -92,132 +92,132 @@ const V = {
|
|
|
92
92
|
'wordSpacing': 'word-spacing',
|
|
93
93
|
'writingMode': 'writing-mode',
|
|
94
94
|
};
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
Object.freeze(
|
|
98
|
-
Object.freeze(
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
95
|
+
const a2 = {};
|
|
96
|
+
const U = [];
|
|
97
|
+
Object.freeze(a2);
|
|
98
|
+
Object.freeze(U);
|
|
99
|
+
const A = () => false;
|
|
100
|
+
const v = [];
|
|
101
|
+
const x = new Set();
|
|
102
|
+
const a3 = new R();
|
|
103
|
+
const af = new R();
|
|
104
|
+
const aq = [];
|
|
104
105
|
const ar = [];
|
|
105
|
-
const at =
|
|
106
|
-
const au = {
|
|
106
|
+
const at = {
|
|
107
107
|
id: '',
|
|
108
108
|
index: 0,
|
|
109
109
|
firstElement: null,
|
|
110
|
-
attachTo:
|
|
111
|
-
move:
|
|
112
|
-
detachFrom:
|
|
113
|
-
update:
|
|
114
|
-
refresh:
|
|
115
|
-
release:
|
|
110
|
+
attachTo: A,
|
|
111
|
+
move: A,
|
|
112
|
+
detachFrom: A,
|
|
113
|
+
update: A,
|
|
114
|
+
refresh: A,
|
|
115
|
+
release: A,
|
|
116
116
|
version: 1,
|
|
117
|
-
markChanged:
|
|
118
|
-
watchMountChange:
|
|
117
|
+
markChanged: A,
|
|
118
|
+
watchMountChange: A,
|
|
119
119
|
};
|
|
120
|
-
let
|
|
121
|
-
let
|
|
122
|
-
let
|
|
123
|
-
let
|
|
124
|
-
let
|
|
125
|
-
const
|
|
126
|
-
export const
|
|
127
|
-
export let
|
|
128
|
-
export let
|
|
129
|
-
const
|
|
130
|
-
return document.createElement(
|
|
120
|
+
let B = '';
|
|
121
|
+
let ah = 20000;
|
|
122
|
+
let H = 0;
|
|
123
|
+
let au = 0;
|
|
124
|
+
let I = undefined;
|
|
125
|
+
const E = new R();
|
|
126
|
+
export const m = new Map();
|
|
127
|
+
export let o = at;
|
|
128
|
+
export let J = 1;
|
|
129
|
+
const aE = (w, aU) => {
|
|
130
|
+
return document.createElement(w);
|
|
131
131
|
};
|
|
132
|
-
let
|
|
133
|
-
const
|
|
134
|
-
'svg': (
|
|
135
|
-
|
|
136
|
-
return document.createElementNS('http://www.w3.org/2000/svg',
|
|
132
|
+
let a5 = aE;
|
|
133
|
+
const av = {
|
|
134
|
+
'svg': (w, K) => {
|
|
135
|
+
K.a4();
|
|
136
|
+
return document.createElementNS('http://www.w3.org/2000/svg', w);
|
|
137
137
|
},
|
|
138
|
-
'math': (
|
|
139
|
-
|
|
140
|
-
return document.createElementNS('http://www.w3.org/1998/Math/MathML',
|
|
138
|
+
'math': (w, K) => {
|
|
139
|
+
K.a4();
|
|
140
|
+
return document.createElementNS('http://www.w3.org/1998/Math/MathML', w);
|
|
141
141
|
},
|
|
142
|
-
'foreignObject': (
|
|
143
|
-
if (
|
|
144
|
-
return document.createElement(
|
|
142
|
+
'foreignObject': (w, K) => {
|
|
143
|
+
if (w !== 'foreignObject') {
|
|
144
|
+
return document.createElement(w);
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
return document.createElementNS('http://www.w3.org/2000/svg',
|
|
146
|
+
K.a4();
|
|
147
|
+
return document.createElementNS('http://www.w3.org/2000/svg', w);
|
|
148
148
|
},
|
|
149
149
|
};
|
|
150
|
-
const
|
|
151
|
-
if (++
|
|
152
|
-
for (const element of
|
|
153
|
-
|
|
150
|
+
const ai = () => {
|
|
151
|
+
if (++au >= H) {
|
|
152
|
+
for (const element of x) {
|
|
153
|
+
x.delete(element);
|
|
154
154
|
if (element.id) {
|
|
155
155
|
element.release();
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
|
-
if (--
|
|
159
|
-
|
|
158
|
+
if (--au < H) {
|
|
159
|
+
x.add(element);
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
|
-
|
|
166
|
+
x.add(Object.create(at));
|
|
167
167
|
}
|
|
168
|
-
if (
|
|
169
|
-
|
|
168
|
+
if (I) {
|
|
169
|
+
I = setTimeout(ai, ah);
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
while (parent.constructor !==
|
|
175
|
-
|
|
172
|
+
const aw = (parent, l) => {
|
|
173
|
+
const ax = ['', l];
|
|
174
|
+
while (parent.constructor !== ag) {
|
|
175
|
+
ax.push(parent.id);
|
|
176
176
|
parent = parent.parent;
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return ax.reverse().join(',');
|
|
179
179
|
};
|
|
180
|
-
const
|
|
180
|
+
const aF = () => {
|
|
181
181
|
let element;
|
|
182
|
-
while (element =
|
|
182
|
+
while (element = E.ap(true)) {
|
|
183
183
|
const { id, newChildren, parent } = element;
|
|
184
184
|
if (newChildren) {
|
|
185
|
-
if (parent &&
|
|
185
|
+
if (parent && aj(parent)) {
|
|
186
186
|
element.refresh(newChildren);
|
|
187
187
|
parent.currentBefore = undefined;
|
|
188
188
|
}
|
|
189
189
|
else if (element.version) {
|
|
190
|
-
|
|
190
|
+
a3._(id, element);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
for (const { parent, element } of
|
|
194
|
+
J++;
|
|
195
|
+
for (const { parent, element } of v) {
|
|
196
196
|
if (element.parent !== parent) {
|
|
197
|
-
if (!
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
if (key.startsWith(
|
|
202
|
-
value.
|
|
203
|
-
return
|
|
197
|
+
if (!af.ad() && aj(parent)) {
|
|
198
|
+
const a1 = !element.parent;
|
|
199
|
+
const a6 = aw(parent, element.id);
|
|
200
|
+
af.ae((key, value) => {
|
|
201
|
+
if (key.startsWith(a6)) {
|
|
202
|
+
value.z(value.a0, a1);
|
|
203
|
+
return Q;
|
|
204
204
|
}
|
|
205
|
-
return
|
|
206
|
-
},
|
|
205
|
+
return O;
|
|
206
|
+
}, a6);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
if (!element.parent) {
|
|
210
|
-
if (
|
|
211
|
-
|
|
210
|
+
if (H) {
|
|
211
|
+
x.add(element);
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
214
|
element.release();
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
v.length = 0;
|
|
219
219
|
};
|
|
220
|
-
const
|
|
220
|
+
const L = (children, f = [], from = 0) => {
|
|
221
221
|
let a = children[from];
|
|
222
222
|
for (;;) {
|
|
223
223
|
if (a && a.id !== undefined) {
|
|
@@ -226,7 +226,7 @@ const N = (children, f = [], from = 0) => {
|
|
|
226
226
|
else if (a !== null && a !== undefined) {
|
|
227
227
|
switch (typeof a) {
|
|
228
228
|
case 'object':
|
|
229
|
-
|
|
229
|
+
L(a, f);
|
|
230
230
|
break;
|
|
231
231
|
case 'function':
|
|
232
232
|
a = a();
|
|
@@ -236,7 +236,7 @@ const N = (children, f = [], from = 0) => {
|
|
|
236
236
|
case 'bigint':
|
|
237
237
|
a = '' + a;
|
|
238
238
|
default:
|
|
239
|
-
f.push(new
|
|
239
|
+
f.push(new ak('', a));
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
if (++from < children.length) {
|
|
@@ -248,37 +248,37 @@ const N = (children, f = [], from = 0) => {
|
|
|
248
248
|
}
|
|
249
249
|
return f;
|
|
250
250
|
};
|
|
251
|
-
const
|
|
251
|
+
const a7 = (y, children, parent) => {
|
|
252
252
|
let f;
|
|
253
|
-
const length =
|
|
253
|
+
const length = y.length;
|
|
254
254
|
let newChildren = children;
|
|
255
255
|
let b = 0;
|
|
256
256
|
while (b < length) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
257
|
+
const ay = y[b];
|
|
258
|
+
if (ay !== newChildren[b]) {
|
|
259
259
|
if (b === newChildren.length) {
|
|
260
260
|
return newChildren;
|
|
261
261
|
}
|
|
262
262
|
const a = newChildren[b];
|
|
263
263
|
if (!a || a.id === undefined) {
|
|
264
|
-
newChildren =
|
|
264
|
+
newChildren = L(newChildren, newChildren.slice(0, b), b);
|
|
265
265
|
continue;
|
|
266
266
|
}
|
|
267
267
|
else if (f !== newChildren) {
|
|
268
268
|
break;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
if (!f &&
|
|
272
|
-
f =
|
|
271
|
+
if (!f && ay.parent !== parent) {
|
|
272
|
+
f = y;
|
|
273
273
|
}
|
|
274
274
|
b++;
|
|
275
275
|
}
|
|
276
276
|
if (b === newChildren.length) {
|
|
277
277
|
return f;
|
|
278
278
|
}
|
|
279
|
-
return newChildren === children ?
|
|
279
|
+
return newChildren === children ? L(newChildren, y.slice(0, b), b) : newChildren;
|
|
280
280
|
};
|
|
281
|
-
const
|
|
281
|
+
const aj = (element) => {
|
|
282
282
|
let parent = element;
|
|
283
283
|
do {
|
|
284
284
|
if (parent.parent === parent) {
|
|
@@ -288,97 +288,97 @@ const ak = (element) => {
|
|
|
288
288
|
} while (parent);
|
|
289
289
|
return false;
|
|
290
290
|
};
|
|
291
|
-
const
|
|
292
|
-
let b,
|
|
291
|
+
const a8 = (y, newChildren, parent, aG) => {
|
|
292
|
+
let b, h;
|
|
293
293
|
let a;
|
|
294
|
-
if (newChildren !==
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
|
|
294
|
+
if (newChildren !== y && y.length) {
|
|
295
|
+
const al = [];
|
|
296
|
+
let r;
|
|
297
|
+
h = newChildren.length;
|
|
298
298
|
b = 10000000;
|
|
299
|
-
while (--
|
|
300
|
-
a = newChildren[
|
|
299
|
+
while (--h >= 0) {
|
|
300
|
+
a = newChildren[h];
|
|
301
301
|
if (a.parent === parent) {
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
|
|
305
|
-
a.index =
|
|
302
|
+
const az = h - a.index;
|
|
303
|
+
if (az === b) {
|
|
304
|
+
r.C++;
|
|
305
|
+
a.index = h;
|
|
306
306
|
}
|
|
307
307
|
else {
|
|
308
|
-
|
|
308
|
+
r = {
|
|
309
309
|
from: a.index,
|
|
310
|
-
to:
|
|
311
|
-
|
|
310
|
+
to: h,
|
|
311
|
+
C: 1,
|
|
312
312
|
};
|
|
313
|
-
b =
|
|
314
|
-
a.index = -
|
|
313
|
+
b = az;
|
|
314
|
+
a.index = -al.push(r);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
else if (b !== 10000000) {
|
|
318
318
|
b = 10000000;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
while (
|
|
324
|
-
a =
|
|
321
|
+
const am = [];
|
|
322
|
+
h = y.length - 1;
|
|
323
|
+
while (h >= 0) {
|
|
324
|
+
a = y[h];
|
|
325
325
|
if (a.index < 0) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
326
|
+
r = al[-a.index - 1];
|
|
327
|
+
am.push(r);
|
|
328
|
+
h -= r.C;
|
|
329
329
|
}
|
|
330
330
|
else {
|
|
331
331
|
a.detachFrom(parent);
|
|
332
|
-
|
|
332
|
+
h--;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
let
|
|
336
|
-
let
|
|
337
|
-
let
|
|
338
|
-
|
|
339
|
-
while (
|
|
340
|
-
a = newChildren[
|
|
335
|
+
let M;
|
|
336
|
+
let a9;
|
|
337
|
+
let aa = 0;
|
|
338
|
+
h = newChildren.length - 1;
|
|
339
|
+
while (h >= 0) {
|
|
340
|
+
a = newChildren[h];
|
|
341
341
|
if (a.parent !== parent) {
|
|
342
|
-
a.index =
|
|
342
|
+
a.index = h--;
|
|
343
343
|
a.attachTo(parent);
|
|
344
344
|
}
|
|
345
345
|
else {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
a.index =
|
|
350
|
-
if (!
|
|
351
|
-
if (
|
|
352
|
-
|
|
353
|
-
|
|
346
|
+
r = al[-a.index - 1];
|
|
347
|
+
a9 = r.C;
|
|
348
|
+
M = am[aa];
|
|
349
|
+
a.index = h;
|
|
350
|
+
if (!aG) {
|
|
351
|
+
if (M === r) {
|
|
352
|
+
aa++;
|
|
353
|
+
h -= r.C;
|
|
354
354
|
parent.currentBefore = undefined;
|
|
355
355
|
continue;
|
|
356
356
|
}
|
|
357
|
-
if (
|
|
358
|
-
b =
|
|
357
|
+
if (M.from > r.from) {
|
|
358
|
+
b = aa;
|
|
359
359
|
do {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
} while (
|
|
363
|
-
if (
|
|
364
|
-
|
|
360
|
+
a9 -= M.C;
|
|
361
|
+
M = am[++b];
|
|
362
|
+
} while (M.from > r.from && a9 > 0);
|
|
363
|
+
if (a9 > 0) {
|
|
364
|
+
h -= r.C;
|
|
365
365
|
parent.currentBefore = undefined;
|
|
366
|
-
|
|
366
|
+
aa = b;
|
|
367
367
|
continue;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
b =
|
|
371
|
+
b = h - r.C;
|
|
372
372
|
do {
|
|
373
373
|
a.move();
|
|
374
|
-
} while (--
|
|
374
|
+
} while (--h > b && (a = newChildren[h]));
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
else {
|
|
379
|
-
for (
|
|
380
|
-
a = newChildren[
|
|
381
|
-
a.index =
|
|
379
|
+
for (h = newChildren.length - 1; h >= 0; h--) {
|
|
380
|
+
a = newChildren[h];
|
|
381
|
+
a.index = h;
|
|
382
382
|
if (parent !== a.parent) {
|
|
383
383
|
a.attachTo(parent);
|
|
384
384
|
}
|
|
@@ -386,11 +386,11 @@ const a9 = (z, newChildren, parent, aH) => {
|
|
|
386
386
|
}
|
|
387
387
|
parent.currentBefore = undefined;
|
|
388
388
|
};
|
|
389
|
-
class
|
|
389
|
+
class ak {
|
|
390
390
|
constructor(id, text) {
|
|
391
391
|
this.id = id;
|
|
392
392
|
this.index = 0;
|
|
393
|
-
this.
|
|
393
|
+
this.ab = text;
|
|
394
394
|
}
|
|
395
395
|
id;
|
|
396
396
|
parent;
|
|
@@ -398,33 +398,33 @@ class al {
|
|
|
398
398
|
firstElement;
|
|
399
399
|
attachTo(target) {
|
|
400
400
|
if (!this.firstElement) {
|
|
401
|
-
this.firstElement = document.createTextNode(this.
|
|
401
|
+
this.firstElement = document.createTextNode(this.ab);
|
|
402
402
|
}
|
|
403
403
|
const { parent, firstElement, index } = this;
|
|
404
404
|
if (this.id) {
|
|
405
405
|
if (!parent) {
|
|
406
|
-
|
|
406
|
+
x.delete(this);
|
|
407
407
|
}
|
|
408
408
|
else {
|
|
409
|
-
|
|
409
|
+
v.push({ parent, element: this });
|
|
410
410
|
firstElement.remove();
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
this.parent = target;
|
|
414
|
-
let
|
|
415
|
-
if (
|
|
416
|
-
|
|
414
|
+
let p = target.currentBefore;
|
|
415
|
+
if (p === undefined) {
|
|
416
|
+
p = target.findNextSiblingElement(index);
|
|
417
417
|
}
|
|
418
|
-
target.element.insertBefore(firstElement,
|
|
418
|
+
target.element.insertBefore(firstElement, p);
|
|
419
419
|
target.currentBefore = firstElement;
|
|
420
420
|
}
|
|
421
421
|
move() {
|
|
422
422
|
const { parent, index, firstElement } = this;
|
|
423
|
-
let
|
|
424
|
-
if (
|
|
425
|
-
|
|
423
|
+
let p = parent.currentBefore;
|
|
424
|
+
if (p === undefined) {
|
|
425
|
+
p = parent.findNextSiblingElement(index);
|
|
426
426
|
}
|
|
427
|
-
parent.element.insertBefore(firstElement,
|
|
427
|
+
parent.element.insertBefore(firstElement, p);
|
|
428
428
|
parent.currentBefore = firstElement;
|
|
429
429
|
}
|
|
430
430
|
detachFrom(target) {
|
|
@@ -432,13 +432,13 @@ class al {
|
|
|
432
432
|
this.firstElement.remove();
|
|
433
433
|
this.parent = undefined;
|
|
434
434
|
if (this.id) {
|
|
435
|
-
|
|
435
|
+
v.push({ parent: target, element: this });
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
update(text) {
|
|
440
|
-
if (this.
|
|
441
|
-
this.
|
|
440
|
+
if (this.ab !== text) {
|
|
441
|
+
this.ab = text;
|
|
442
442
|
if (this.firstElement) {
|
|
443
443
|
this.firstElement.nodeValue = text;
|
|
444
444
|
}
|
|
@@ -451,16 +451,16 @@ class al {
|
|
|
451
451
|
if (target) {
|
|
452
452
|
this.firstElement.remove();
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
m.delete(this.id);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
ab;
|
|
458
458
|
}
|
|
459
|
-
export class
|
|
460
|
-
constructor(id, children,
|
|
459
|
+
export class aH {
|
|
460
|
+
constructor(id, children, aI) {
|
|
461
461
|
this.id = id;
|
|
462
462
|
this.index = 0;
|
|
463
|
-
this.newChildren = this.d =
|
|
463
|
+
this.newChildren = this.d = aI ? L(children) : (children || U);
|
|
464
464
|
}
|
|
465
465
|
id;
|
|
466
466
|
parent;
|
|
@@ -473,9 +473,9 @@ export class aI {
|
|
|
473
473
|
get firstElement() {
|
|
474
474
|
const { d } = this;
|
|
475
475
|
for (let b = 0; b < d.length; b++) {
|
|
476
|
-
const
|
|
477
|
-
if (
|
|
478
|
-
return
|
|
476
|
+
const e = d[b].firstElement;
|
|
477
|
+
if (e) {
|
|
478
|
+
return e;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
return null;
|
|
@@ -483,10 +483,10 @@ export class aI {
|
|
|
483
483
|
attachTo(target) {
|
|
484
484
|
const { parent, d, newChildren } = this;
|
|
485
485
|
if (!parent) {
|
|
486
|
-
|
|
486
|
+
x.delete(this);
|
|
487
487
|
}
|
|
488
488
|
else {
|
|
489
|
-
|
|
489
|
+
v.push({ parent, element: this });
|
|
490
490
|
for (let b = d.length - 1; b >= 0; b--) {
|
|
491
491
|
d[b].detachFrom(this);
|
|
492
492
|
}
|
|
@@ -506,7 +506,7 @@ export class aI {
|
|
|
506
506
|
move() {
|
|
507
507
|
const { d, newChildren } = this;
|
|
508
508
|
if (newChildren) {
|
|
509
|
-
|
|
509
|
+
a8(d, newChildren, this, true);
|
|
510
510
|
this.d = newChildren;
|
|
511
511
|
this.newChildren = undefined;
|
|
512
512
|
}
|
|
@@ -524,12 +524,12 @@ export class aI {
|
|
|
524
524
|
a.detachFrom(this);
|
|
525
525
|
}
|
|
526
526
|
this.parent = undefined;
|
|
527
|
-
|
|
527
|
+
v.push({ parent: target, element: this });
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
update(
|
|
530
|
+
update(n, children) {
|
|
531
531
|
if (children) {
|
|
532
|
-
const newChildren =
|
|
532
|
+
const newChildren = a7(this.d, children, this);
|
|
533
533
|
if (newChildren) {
|
|
534
534
|
this.newChildren = newChildren;
|
|
535
535
|
return true;
|
|
@@ -538,7 +538,7 @@ export class aI {
|
|
|
538
538
|
return false;
|
|
539
539
|
}
|
|
540
540
|
refresh(newChildren) {
|
|
541
|
-
|
|
541
|
+
a8(this.d, newChildren, this);
|
|
542
542
|
this.d = newChildren;
|
|
543
543
|
this.newChildren = undefined;
|
|
544
544
|
}
|
|
@@ -550,67 +550,67 @@ export class aI {
|
|
|
550
550
|
a.detachFrom(this);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
|
|
553
|
+
m.delete(this.id);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
findNextSiblingElement(index) {
|
|
557
557
|
const children = this.newChildren || this.d;
|
|
558
|
-
let
|
|
558
|
+
let e;
|
|
559
559
|
let b = index + 1;
|
|
560
560
|
let a = children[b];
|
|
561
561
|
while (a) {
|
|
562
|
-
|
|
563
|
-
if (
|
|
564
|
-
return
|
|
562
|
+
e = a.firstElement;
|
|
563
|
+
if (e) {
|
|
564
|
+
return e;
|
|
565
565
|
}
|
|
566
566
|
a = children[++b];
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
return
|
|
568
|
+
e = this.parent.currentBefore;
|
|
569
|
+
return e !== undefined ? e : this.parent.findNextSiblingElement(this.index);
|
|
570
570
|
}
|
|
571
571
|
d;
|
|
572
572
|
}
|
|
573
|
-
export class
|
|
573
|
+
export class aJ {
|
|
574
574
|
constructor(id, tag, props, children, check, mutableChild) {
|
|
575
575
|
this.id = id;
|
|
576
576
|
this.index = 0;
|
|
577
|
-
this.firstElement = this.element =
|
|
578
|
-
this.newChildren = this.d = mutableChild ?
|
|
577
|
+
this.firstElement = this.element = a5(tag, this);
|
|
578
|
+
this.newChildren = this.d = mutableChild ? L(children) : (children || U);
|
|
579
579
|
if (props) {
|
|
580
|
-
this.
|
|
581
|
-
this.
|
|
580
|
+
this.n = a2;
|
|
581
|
+
this.s = -1;
|
|
582
582
|
if (tag === 'select') {
|
|
583
|
-
const
|
|
584
|
-
const
|
|
585
|
-
const c =
|
|
583
|
+
const an = this.element;
|
|
584
|
+
const ao = props;
|
|
585
|
+
const c = ao.value;
|
|
586
586
|
if (c) {
|
|
587
|
-
|
|
588
|
-
const
|
|
587
|
+
ao.value = undefined;
|
|
588
|
+
const aK = this.refresh;
|
|
589
589
|
this.refresh = (newChildren) => {
|
|
590
|
-
|
|
590
|
+
a8(this.d, newChildren, this);
|
|
591
591
|
this.d = newChildren;
|
|
592
592
|
this.newChildren = undefined;
|
|
593
593
|
if (Array.isArray(c)) {
|
|
594
|
-
const
|
|
595
|
-
const [
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
|
|
594
|
+
const a$ = c;
|
|
595
|
+
const [state, V, N] = a$;
|
|
596
|
+
an.value = N;
|
|
597
|
+
const z = a$[3] = (u) => state[V] = u.target.value;
|
|
598
|
+
an.addEventListener('change', z);
|
|
599
599
|
}
|
|
600
600
|
else {
|
|
601
|
-
|
|
601
|
+
an.value = c;
|
|
602
602
|
}
|
|
603
|
-
|
|
604
|
-
this.refresh =
|
|
603
|
+
ao.value = c;
|
|
604
|
+
this.refresh = aK;
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
this.update(props);
|
|
609
|
-
this.
|
|
609
|
+
this.s = check ?? 0;
|
|
610
610
|
}
|
|
611
611
|
else {
|
|
612
|
-
this.
|
|
613
|
-
this.
|
|
612
|
+
this.n = props;
|
|
613
|
+
this.s = 0;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
id;
|
|
@@ -623,21 +623,21 @@ export class aK {
|
|
|
623
623
|
attachTo(target) {
|
|
624
624
|
const { parent, element, newChildren, index } = this;
|
|
625
625
|
if (!parent) {
|
|
626
|
-
|
|
626
|
+
x.delete(this);
|
|
627
627
|
}
|
|
628
628
|
else {
|
|
629
|
-
|
|
629
|
+
v.push({ parent, element: this });
|
|
630
630
|
element.remove();
|
|
631
631
|
}
|
|
632
632
|
this.parent = target;
|
|
633
633
|
if (newChildren) {
|
|
634
634
|
this.refresh(newChildren);
|
|
635
635
|
}
|
|
636
|
-
let
|
|
637
|
-
if (
|
|
638
|
-
|
|
636
|
+
let p = target.currentBefore;
|
|
637
|
+
if (p === undefined) {
|
|
638
|
+
p = target.findNextSiblingElement(index);
|
|
639
639
|
}
|
|
640
|
-
target.element.insertBefore(element,
|
|
640
|
+
target.element.insertBefore(element, p);
|
|
641
641
|
target.currentBefore = element;
|
|
642
642
|
}
|
|
643
643
|
move() {
|
|
@@ -645,38 +645,38 @@ export class aK {
|
|
|
645
645
|
if (newChildren) {
|
|
646
646
|
this.refresh(newChildren);
|
|
647
647
|
}
|
|
648
|
-
let
|
|
649
|
-
if (
|
|
650
|
-
|
|
648
|
+
let p = parent.currentBefore;
|
|
649
|
+
if (p === undefined) {
|
|
650
|
+
p = parent.findNextSiblingElement(index);
|
|
651
651
|
}
|
|
652
|
-
parent.element.insertBefore(element,
|
|
652
|
+
parent.element.insertBefore(element, p);
|
|
653
653
|
parent.currentBefore = element;
|
|
654
654
|
}
|
|
655
655
|
detachFrom(target) {
|
|
656
656
|
if (this.parent === target) {
|
|
657
657
|
this.element.remove();
|
|
658
658
|
this.parent = undefined;
|
|
659
|
-
|
|
659
|
+
v.push({ parent: target, element: this });
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
update(props, children) {
|
|
663
|
-
const { element,
|
|
664
|
-
if (
|
|
665
|
-
this.
|
|
666
|
-
let
|
|
663
|
+
const { element, n, s } = this;
|
|
664
|
+
if (n && s) {
|
|
665
|
+
this.n = props;
|
|
666
|
+
let j = s;
|
|
667
667
|
for (const key in props) {
|
|
668
668
|
const c = props[key];
|
|
669
|
-
const g =
|
|
669
|
+
const g = n[key];
|
|
670
670
|
if (c !== g) {
|
|
671
671
|
if (c !== null && c !== undefined) {
|
|
672
672
|
switch (typeof c) {
|
|
673
673
|
case 'string': {
|
|
674
|
-
const
|
|
675
|
-
if (!
|
|
674
|
+
const W = S[key];
|
|
675
|
+
if (!W) {
|
|
676
676
|
element[key] = c;
|
|
677
677
|
}
|
|
678
678
|
else {
|
|
679
|
-
element.setAttribute(
|
|
679
|
+
element.setAttribute(W, c);
|
|
680
680
|
}
|
|
681
681
|
break;
|
|
682
682
|
}
|
|
@@ -688,65 +688,65 @@ export class aK {
|
|
|
688
688
|
}
|
|
689
689
|
default: {
|
|
690
690
|
if (Array.isArray(c)) {
|
|
691
|
-
const [
|
|
691
|
+
const [state, V, N] = c;
|
|
692
692
|
if (g) {
|
|
693
|
-
const [aM, aN,
|
|
694
|
-
if (
|
|
695
|
-
element[key] =
|
|
693
|
+
const [aL, aM, aN, a_] = g;
|
|
694
|
+
if (aN !== N && element[key] !== N) {
|
|
695
|
+
element[key] = N;
|
|
696
696
|
}
|
|
697
|
-
if (
|
|
698
|
-
c[3] =
|
|
697
|
+
if (aL === state && aM === V) {
|
|
698
|
+
c[3] = a_;
|
|
699
699
|
}
|
|
700
700
|
else {
|
|
701
|
-
const
|
|
702
|
-
element.removeEventListener('change',
|
|
703
|
-
element.addEventListener('change',
|
|
701
|
+
const z = c[3] = (u) => state[V] = u.target[key];
|
|
702
|
+
element.removeEventListener('change', a_);
|
|
703
|
+
element.addEventListener('change', z);
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
else {
|
|
707
|
-
element[key] =
|
|
708
|
-
const
|
|
709
|
-
element.addEventListener('change',
|
|
707
|
+
element[key] = N;
|
|
708
|
+
const z = c[3] = (u) => state[V] = u.target[key];
|
|
709
|
+
element.addEventListener('change', z);
|
|
710
710
|
}
|
|
711
711
|
break;
|
|
712
712
|
}
|
|
713
713
|
if (key === 'style') {
|
|
714
714
|
if (!g) {
|
|
715
715
|
const style = element.style;
|
|
716
|
-
const
|
|
717
|
-
let
|
|
718
|
-
for (const
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
style[
|
|
716
|
+
const q = {};
|
|
717
|
+
let j = 0;
|
|
718
|
+
for (const k in c) {
|
|
719
|
+
const X = c[k];
|
|
720
|
+
q[k] = X;
|
|
721
|
+
j++;
|
|
722
|
+
style[k] = X;
|
|
723
723
|
}
|
|
724
|
-
props[key] =
|
|
725
|
-
|
|
724
|
+
props[key] = q;
|
|
725
|
+
q.j = j;
|
|
726
726
|
break;
|
|
727
727
|
}
|
|
728
728
|
const style = element.style;
|
|
729
|
-
const
|
|
730
|
-
let
|
|
731
|
-
let
|
|
732
|
-
for (const
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
if (
|
|
736
|
-
|
|
729
|
+
const q = {};
|
|
730
|
+
let j = 0;
|
|
731
|
+
let F = g.j;
|
|
732
|
+
for (const k in c) {
|
|
733
|
+
const G = c[k];
|
|
734
|
+
q[k] = G;
|
|
735
|
+
if (k in g) {
|
|
736
|
+
F--;
|
|
737
737
|
}
|
|
738
|
-
|
|
739
|
-
if (
|
|
740
|
-
style[
|
|
738
|
+
j++;
|
|
739
|
+
if (G !== g[key]) {
|
|
740
|
+
style[k] = G;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
props[key] =
|
|
744
|
-
|
|
745
|
-
if (
|
|
746
|
-
for (const
|
|
747
|
-
if (!(
|
|
748
|
-
style[
|
|
749
|
-
if (!--
|
|
743
|
+
props[key] = q;
|
|
744
|
+
q.j = j;
|
|
745
|
+
if (F) {
|
|
746
|
+
for (const k in g) {
|
|
747
|
+
if (!(k in c)) {
|
|
748
|
+
style[k] = null;
|
|
749
|
+
if (!--F) {
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
752
|
}
|
|
@@ -761,12 +761,12 @@ export class aK {
|
|
|
761
761
|
else {
|
|
762
762
|
switch (typeof g) {
|
|
763
763
|
case 'string': {
|
|
764
|
-
const
|
|
765
|
-
if (!
|
|
764
|
+
const W = S[key];
|
|
765
|
+
if (!W) {
|
|
766
766
|
this.element[key] = c;
|
|
767
767
|
}
|
|
768
768
|
else {
|
|
769
|
-
this.element.removeAttribute(
|
|
769
|
+
this.element.removeAttribute(W);
|
|
770
770
|
}
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
@@ -775,7 +775,7 @@ export class aK {
|
|
|
775
775
|
if (Array.isArray(g)) {
|
|
776
776
|
element.removeEventListener('change', g[3]);
|
|
777
777
|
}
|
|
778
|
-
else if (g ===
|
|
778
|
+
else if (g === a2) {
|
|
779
779
|
element[key] = c;
|
|
780
780
|
}
|
|
781
781
|
}
|
|
@@ -790,13 +790,13 @@ export class aK {
|
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
if (!--
|
|
793
|
+
if (!--j) {
|
|
794
794
|
break;
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
if (children) {
|
|
799
|
-
const newChildren =
|
|
799
|
+
const newChildren = a7(this.d, children, this);
|
|
800
800
|
if (newChildren) {
|
|
801
801
|
this.newChildren = newChildren;
|
|
802
802
|
return true;
|
|
@@ -805,7 +805,7 @@ export class aK {
|
|
|
805
805
|
return false;
|
|
806
806
|
}
|
|
807
807
|
refresh(newChildren) {
|
|
808
|
-
|
|
808
|
+
a8(this.d, newChildren, this);
|
|
809
809
|
this.d = newChildren;
|
|
810
810
|
this.newChildren = undefined;
|
|
811
811
|
}
|
|
@@ -818,44 +818,44 @@ export class aK {
|
|
|
818
818
|
for (const a of d) {
|
|
819
819
|
a.release(this);
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
m.delete(this.id);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
findNextSiblingElement(index) {
|
|
825
825
|
const children = this.newChildren || this.d;
|
|
826
|
-
let
|
|
826
|
+
let e;
|
|
827
827
|
let b = index + 1;
|
|
828
828
|
let a = children[b];
|
|
829
829
|
while (a) {
|
|
830
|
-
|
|
831
|
-
if (
|
|
832
|
-
return
|
|
830
|
+
e = a.firstElement;
|
|
831
|
+
if (e) {
|
|
832
|
+
return e;
|
|
833
833
|
}
|
|
834
834
|
a = children[++b];
|
|
835
835
|
}
|
|
836
836
|
return null;
|
|
837
837
|
}
|
|
838
|
-
|
|
839
|
-
this.update = this.
|
|
838
|
+
a4() {
|
|
839
|
+
this.update = this.aO;
|
|
840
840
|
}
|
|
841
|
-
|
|
842
|
-
const { element,
|
|
843
|
-
if (
|
|
844
|
-
this.
|
|
845
|
-
let
|
|
841
|
+
aO(props, children) {
|
|
842
|
+
const { element, n, s } = this;
|
|
843
|
+
if (n && s) {
|
|
844
|
+
this.n = props;
|
|
845
|
+
let j = s;
|
|
846
846
|
for (const key in props) {
|
|
847
847
|
const c = props[key];
|
|
848
|
-
const g =
|
|
848
|
+
const g = n[key];
|
|
849
849
|
if (c !== g) {
|
|
850
850
|
if (c !== null && c !== undefined) {
|
|
851
851
|
switch (typeof c) {
|
|
852
852
|
case 'string': {
|
|
853
|
-
element.setAttribute(
|
|
853
|
+
element.setAttribute(S[key] ?? key, c);
|
|
854
854
|
break;
|
|
855
855
|
}
|
|
856
856
|
case 'number':
|
|
857
857
|
case 'boolean': {
|
|
858
|
-
element.setAttribute(
|
|
858
|
+
element.setAttribute(S[key] ?? key, '' + c);
|
|
859
859
|
break;
|
|
860
860
|
}
|
|
861
861
|
case 'function': {
|
|
@@ -866,40 +866,40 @@ export class aK {
|
|
|
866
866
|
if (key === 'style') {
|
|
867
867
|
if (!g) {
|
|
868
868
|
const style = element.style;
|
|
869
|
-
const
|
|
870
|
-
let
|
|
871
|
-
for (const
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
style[
|
|
869
|
+
const q = {};
|
|
870
|
+
let j = 0;
|
|
871
|
+
for (const k in c) {
|
|
872
|
+
const X = c[k];
|
|
873
|
+
q[k] = X;
|
|
874
|
+
j++;
|
|
875
|
+
style[k] = X;
|
|
876
876
|
}
|
|
877
|
-
props[key] =
|
|
878
|
-
|
|
877
|
+
props[key] = q;
|
|
878
|
+
q.j = j;
|
|
879
879
|
break;
|
|
880
880
|
}
|
|
881
881
|
const style = element.style;
|
|
882
|
-
const
|
|
883
|
-
let
|
|
884
|
-
let
|
|
885
|
-
for (const
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
if (
|
|
889
|
-
|
|
882
|
+
const q = {};
|
|
883
|
+
let j = 0;
|
|
884
|
+
let F = g.j;
|
|
885
|
+
for (const k in c) {
|
|
886
|
+
const G = c[k];
|
|
887
|
+
q[k] = G;
|
|
888
|
+
if (k in g) {
|
|
889
|
+
F--;
|
|
890
890
|
}
|
|
891
|
-
|
|
892
|
-
if (
|
|
893
|
-
style[
|
|
891
|
+
j++;
|
|
892
|
+
if (G !== g[key]) {
|
|
893
|
+
style[k] = G;
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
props[key] =
|
|
897
|
-
|
|
898
|
-
if (
|
|
899
|
-
for (const
|
|
900
|
-
if (!(
|
|
901
|
-
style[
|
|
902
|
-
if (!--
|
|
896
|
+
props[key] = q;
|
|
897
|
+
q.j = j;
|
|
898
|
+
if (F) {
|
|
899
|
+
for (const k in g) {
|
|
900
|
+
if (!(k in c)) {
|
|
901
|
+
style[k] = null;
|
|
902
|
+
if (!--F) {
|
|
903
903
|
break;
|
|
904
904
|
}
|
|
905
905
|
}
|
|
@@ -912,12 +912,12 @@ export class aK {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
else {
|
|
915
|
-
const
|
|
916
|
-
switch (
|
|
915
|
+
const aP = typeof g;
|
|
916
|
+
switch (aP) {
|
|
917
917
|
case 'string':
|
|
918
918
|
case 'number':
|
|
919
919
|
case 'boolean': {
|
|
920
|
-
element.removeAttribute(
|
|
920
|
+
element.removeAttribute(S[key] ?? key);
|
|
921
921
|
break;
|
|
922
922
|
}
|
|
923
923
|
default: {
|
|
@@ -926,13 +926,13 @@ export class aK {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
if (!--
|
|
929
|
+
if (!--j) {
|
|
930
930
|
break;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
if (children) {
|
|
935
|
-
const newChildren =
|
|
935
|
+
const newChildren = a7(this.d, children, this);
|
|
936
936
|
if (newChildren) {
|
|
937
937
|
this.newChildren = newChildren;
|
|
938
938
|
return true;
|
|
@@ -940,19 +940,19 @@ export class aK {
|
|
|
940
940
|
}
|
|
941
941
|
return false;
|
|
942
942
|
}
|
|
943
|
-
|
|
943
|
+
n;
|
|
944
944
|
d;
|
|
945
|
-
|
|
945
|
+
s;
|
|
946
946
|
}
|
|
947
|
-
export class
|
|
947
|
+
export class aA {
|
|
948
948
|
constructor(id, entry, props, children, check, mutableChild) {
|
|
949
949
|
this.id = id;
|
|
950
950
|
this.index = 0;
|
|
951
951
|
this.version = 1;
|
|
952
|
-
this.
|
|
953
|
-
this.
|
|
954
|
-
this.newChildren = this.d = mutableChild ?
|
|
955
|
-
this.
|
|
952
|
+
this.aB = entry;
|
|
953
|
+
this.n = props;
|
|
954
|
+
this.newChildren = this.d = mutableChild ? L(children) : (children || U);
|
|
955
|
+
this.s = check ?? 0;
|
|
956
956
|
}
|
|
957
957
|
id;
|
|
958
958
|
parent;
|
|
@@ -960,60 +960,60 @@ export class aB {
|
|
|
960
960
|
index;
|
|
961
961
|
version;
|
|
962
962
|
get firstElement() {
|
|
963
|
-
return this.
|
|
963
|
+
return this.i?.firstElement || null;
|
|
964
964
|
}
|
|
965
965
|
attachTo(target) {
|
|
966
|
-
const { parent, newChildren,
|
|
966
|
+
const { parent, newChildren, i } = this;
|
|
967
967
|
this.parent = target;
|
|
968
968
|
if (newChildren) {
|
|
969
969
|
this.refresh(newChildren);
|
|
970
970
|
}
|
|
971
|
-
else if (
|
|
972
|
-
|
|
973
|
-
|
|
971
|
+
else if (i) {
|
|
972
|
+
i.index = this.index;
|
|
973
|
+
i.attachTo(target);
|
|
974
974
|
}
|
|
975
975
|
if (!parent) {
|
|
976
|
-
|
|
976
|
+
x.delete(this);
|
|
977
977
|
}
|
|
978
978
|
else {
|
|
979
|
-
|
|
979
|
+
v.push({ parent, element: this });
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
move() {
|
|
983
|
-
const { newChildren,
|
|
983
|
+
const { newChildren, i } = this;
|
|
984
984
|
if (newChildren) {
|
|
985
985
|
this.refresh(newChildren);
|
|
986
986
|
}
|
|
987
|
-
else if (
|
|
988
|
-
|
|
989
|
-
|
|
987
|
+
else if (i) {
|
|
988
|
+
i.index = this.index;
|
|
989
|
+
i.move();
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
detachFrom(target) {
|
|
993
993
|
if (this.parent === target) {
|
|
994
|
-
this.
|
|
994
|
+
this.i?.detachFrom(target);
|
|
995
995
|
this.parent = undefined;
|
|
996
|
-
|
|
996
|
+
v.push({ parent: target, element: this });
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
update(props, children) {
|
|
1000
|
-
const {
|
|
1001
|
-
this.
|
|
1000
|
+
const { n, d, s } = this;
|
|
1001
|
+
this.n = props;
|
|
1002
1002
|
if (children) {
|
|
1003
|
-
const newChildren =
|
|
1003
|
+
const newChildren = a7(d, children, this.parent);
|
|
1004
1004
|
if (newChildren) {
|
|
1005
1005
|
this.newChildren = newChildren;
|
|
1006
1006
|
return true;
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
if (!this.newChildren &&
|
|
1010
|
-
let
|
|
1011
|
-
for (const key in
|
|
1012
|
-
if (
|
|
1009
|
+
if (!this.newChildren && s) {
|
|
1010
|
+
let j = s;
|
|
1011
|
+
for (const key in n) {
|
|
1012
|
+
if (n[key] !== props[key]) {
|
|
1013
1013
|
this.newChildren = d;
|
|
1014
1014
|
return true;
|
|
1015
1015
|
}
|
|
1016
|
-
if (!--
|
|
1016
|
+
if (!--j) {
|
|
1017
1017
|
break;
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
@@ -1021,70 +1021,70 @@ export class aB {
|
|
|
1021
1021
|
return false;
|
|
1022
1022
|
}
|
|
1023
1023
|
refresh(newChildren) {
|
|
1024
|
-
const { id, parent,
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
let
|
|
1028
|
-
if (
|
|
1029
|
-
switch (typeof
|
|
1024
|
+
const { id, parent, i, index } = this;
|
|
1025
|
+
const aQ = o;
|
|
1026
|
+
o = this;
|
|
1027
|
+
let t = this.aB(this.n || a2, newChildren);
|
|
1028
|
+
if (t !== i) {
|
|
1029
|
+
switch (typeof t) {
|
|
1030
1030
|
case 'boolean':
|
|
1031
1031
|
case 'number':
|
|
1032
1032
|
case 'bigint':
|
|
1033
|
-
|
|
1033
|
+
t = '' + t;
|
|
1034
1034
|
case 'string':
|
|
1035
|
-
|
|
1036
|
-
this.
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1035
|
+
t = new ak('', t);
|
|
1036
|
+
this.i = t;
|
|
1037
|
+
t.index = index;
|
|
1038
|
+
t.attachTo(parent);
|
|
1039
|
+
i?.detachFrom(parent);
|
|
1040
1040
|
break;
|
|
1041
1041
|
default:
|
|
1042
|
-
if (
|
|
1043
|
-
this.
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
if (!
|
|
1048
|
-
|
|
1049
|
-
if (!
|
|
1050
|
-
return
|
|
1042
|
+
if (t) {
|
|
1043
|
+
this.i = t;
|
|
1044
|
+
t.index = index;
|
|
1045
|
+
t.attachTo(parent);
|
|
1046
|
+
i?.detachFrom(parent);
|
|
1047
|
+
if (!a3.ad()) {
|
|
1048
|
+
a3.ae((Y, com) => {
|
|
1049
|
+
if (!Y.startsWith(id)) {
|
|
1050
|
+
return O;
|
|
1051
1051
|
}
|
|
1052
|
-
if (com.parent &&
|
|
1053
|
-
|
|
1054
|
-
return
|
|
1052
|
+
if (com.parent && aj(com.parent)) {
|
|
1053
|
+
E._(Y, com);
|
|
1054
|
+
return Q;
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return Z;
|
|
1057
1057
|
}, id);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
else {
|
|
1061
|
-
this.
|
|
1062
|
-
|
|
1061
|
+
this.i = undefined;
|
|
1062
|
+
i?.detachFrom(parent);
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
else if (
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
1069
|
-
|
|
1066
|
+
else if (i) {
|
|
1067
|
+
if (i.parent !== parent) {
|
|
1068
|
+
i.index = index;
|
|
1069
|
+
i.attachTo(parent);
|
|
1070
1070
|
}
|
|
1071
|
-
else if (
|
|
1072
|
-
|
|
1073
|
-
|
|
1071
|
+
else if (i.index !== index) {
|
|
1072
|
+
i.index = index;
|
|
1073
|
+
i.move();
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
this.d = newChildren;
|
|
1077
1077
|
this.newChildren = undefined;
|
|
1078
|
-
|
|
1078
|
+
o = aQ;
|
|
1079
1079
|
}
|
|
1080
1080
|
release(target) {
|
|
1081
1081
|
if (this.parent === target) {
|
|
1082
|
-
this.
|
|
1082
|
+
this.i?.release(target);
|
|
1083
1083
|
this.parent = undefined;
|
|
1084
1084
|
if (this.newChildren) {
|
|
1085
|
-
|
|
1085
|
+
a3.delete(this.id);
|
|
1086
1086
|
}
|
|
1087
|
-
|
|
1087
|
+
m.delete(this.id);
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
markChanged() {
|
|
@@ -1094,17 +1094,17 @@ export class aB {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return false;
|
|
1096
1096
|
}
|
|
1097
|
-
watchMountChange(
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1097
|
+
watchMountChange(aR, z, a0) {
|
|
1098
|
+
const a6 = aw(this.parent, this.id);
|
|
1099
|
+
af._(a6 + aR, { z, a0 }, true);
|
|
1100
1100
|
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1101
|
+
aB;
|
|
1102
|
+
n;
|
|
1103
1103
|
d;
|
|
1104
|
-
|
|
1105
|
-
|
|
1104
|
+
s;
|
|
1105
|
+
i;
|
|
1106
1106
|
}
|
|
1107
|
-
class
|
|
1107
|
+
class ag {
|
|
1108
1108
|
constructor(id, rootElement) {
|
|
1109
1109
|
this.id = id;
|
|
1110
1110
|
this.element = rootElement;
|
|
@@ -1114,125 +1114,125 @@ class ah {
|
|
|
1114
1114
|
element;
|
|
1115
1115
|
parent;
|
|
1116
1116
|
currentBefore;
|
|
1117
|
-
findNextSiblingElement(
|
|
1117
|
+
findNextSiblingElement(aX) {
|
|
1118
1118
|
return null;
|
|
1119
1119
|
}
|
|
1120
1120
|
render(entry) {
|
|
1121
|
-
if (!this.
|
|
1122
|
-
this.
|
|
1123
|
-
|
|
1124
|
-
this.
|
|
1125
|
-
|
|
1121
|
+
if (!this.ac) {
|
|
1122
|
+
this.ac = new aA(this.id, entry, null, U);
|
|
1123
|
+
m.set(this.id, this.ac);
|
|
1124
|
+
this.ac.attachTo(this);
|
|
1125
|
+
J++;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
|
|
1128
|
+
ac;
|
|
1129
1129
|
}
|
|
1130
1130
|
export const addComReader = (readerRecord, key) => {
|
|
1131
|
-
if (
|
|
1132
|
-
let
|
|
1133
|
-
if (!
|
|
1134
|
-
|
|
1135
|
-
readerRecord[key] =
|
|
1131
|
+
if (o.id) {
|
|
1132
|
+
let D = readerRecord[key];
|
|
1133
|
+
if (!D) {
|
|
1134
|
+
D = new Map();
|
|
1135
|
+
readerRecord[key] = D;
|
|
1136
1136
|
}
|
|
1137
|
-
|
|
1137
|
+
D.set(o.id, o.version);
|
|
1138
1138
|
}
|
|
1139
1139
|
};
|
|
1140
1140
|
export let refreshComReaders = (readerRecord, key) => {
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1143
|
-
for (const [
|
|
1144
|
-
const com =
|
|
1141
|
+
const D = readerRecord[key];
|
|
1142
|
+
if (D) {
|
|
1143
|
+
for (const [Y, version] of D) {
|
|
1144
|
+
const com = m.get(Y);
|
|
1145
1145
|
if (com?.version === version && com.markChanged()) {
|
|
1146
|
-
if (
|
|
1147
|
-
queueMicrotask(
|
|
1146
|
+
if (E.ad()) {
|
|
1147
|
+
queueMicrotask(aF);
|
|
1148
1148
|
}
|
|
1149
|
-
|
|
1149
|
+
E._(Y, com);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
|
|
1152
|
+
D.clear();
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
|
-
export const
|
|
1155
|
+
export const aC = (replace) => refreshComReaders = replace;
|
|
1156
1156
|
export const configGC = (waitIntervals, interval = 20000) => {
|
|
1157
1157
|
if (waitIntervals >= 0 && interval >= 1000) {
|
|
1158
|
-
|
|
1159
|
-
if (
|
|
1160
|
-
clearTimeout(
|
|
1158
|
+
ah = interval;
|
|
1159
|
+
if (H) {
|
|
1160
|
+
clearTimeout(I);
|
|
1161
1161
|
}
|
|
1162
1162
|
if (waitIntervals) {
|
|
1163
|
-
|
|
1163
|
+
I = setTimeout(ai, ah);
|
|
1164
1164
|
}
|
|
1165
|
-
else if (
|
|
1166
|
-
|
|
1167
|
-
for (let b = 0; b <
|
|
1168
|
-
|
|
1165
|
+
else if (I) {
|
|
1166
|
+
I = undefined;
|
|
1167
|
+
for (let b = 0; b < H; b++) {
|
|
1168
|
+
ai();
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
H = waitIntervals;
|
|
1172
1172
|
return true;
|
|
1173
1173
|
}
|
|
1174
1174
|
return false;
|
|
1175
1175
|
};
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1176
|
+
const aS = () => {
|
|
1177
|
+
B = ar.pop();
|
|
1178
1178
|
};
|
|
1179
1179
|
export var $ezh;
|
|
1180
1180
|
(function ($ezh) {
|
|
1181
1181
|
$ezh.render = (rootElement, entry) => {
|
|
1182
|
-
const id = (
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
|
|
1182
|
+
const id = (aq.length || '') + '|';
|
|
1183
|
+
const aD = new ag(id, rootElement);
|
|
1184
|
+
aq.push(aD);
|
|
1185
|
+
aD.render(entry);
|
|
1186
1186
|
};
|
|
1187
1187
|
$ezh.$ = (id, tag, props, children, check, mutableChild) => {
|
|
1188
|
-
const
|
|
1189
|
-
let element =
|
|
1188
|
+
const l = `${o.id}${id}${B}`;
|
|
1189
|
+
let element = m.get(l);
|
|
1190
1190
|
if (element) {
|
|
1191
1191
|
if ((props || children) && element.update(props, children)) {
|
|
1192
|
-
|
|
1192
|
+
E._(l, element);
|
|
1193
1193
|
}
|
|
1194
1194
|
return element;
|
|
1195
1195
|
}
|
|
1196
|
-
element = new
|
|
1197
|
-
|
|
1196
|
+
element = new aJ(l, tag, props, children, check, mutableChild);
|
|
1197
|
+
m.set(l, element);
|
|
1198
1198
|
return element;
|
|
1199
1199
|
};
|
|
1200
1200
|
$ezh.$c = (id, entry, props, children, check, mutableChild) => {
|
|
1201
|
-
const
|
|
1202
|
-
let element =
|
|
1201
|
+
const l = `${o.id}${id}${B}`;
|
|
1202
|
+
let element = m.get(l);
|
|
1203
1203
|
if (element) {
|
|
1204
1204
|
if ((props || children) && element.update(props, children)) {
|
|
1205
|
-
|
|
1205
|
+
E._(l, element);
|
|
1206
1206
|
}
|
|
1207
1207
|
return element;
|
|
1208
1208
|
}
|
|
1209
|
-
element = new
|
|
1210
|
-
|
|
1209
|
+
element = new aA(l, entry, props, children, check, mutableChild);
|
|
1210
|
+
m.set(l, element);
|
|
1211
1211
|
return element;
|
|
1212
1212
|
};
|
|
1213
1213
|
$ezh.$f = (id, children, mutableChild) => {
|
|
1214
|
-
const
|
|
1215
|
-
let element =
|
|
1214
|
+
const l = `${o.id}${id}${B}`;
|
|
1215
|
+
let element = m.get(l);
|
|
1216
1216
|
if (element) {
|
|
1217
1217
|
if (children && element.update(null, children)) {
|
|
1218
|
-
|
|
1218
|
+
E._(l, element);
|
|
1219
1219
|
}
|
|
1220
1220
|
return element;
|
|
1221
1221
|
}
|
|
1222
|
-
element = new
|
|
1223
|
-
|
|
1222
|
+
element = new aH(l, children, mutableChild);
|
|
1223
|
+
m.set(l, element);
|
|
1224
1224
|
return element;
|
|
1225
1225
|
};
|
|
1226
1226
|
$ezh.$k = (key) => {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
return
|
|
1227
|
+
ar.push(B);
|
|
1228
|
+
B = `${B || '{'}${key}}`;
|
|
1229
|
+
return aS;
|
|
1230
1230
|
};
|
|
1231
1231
|
$ezh.$n = (ns) => {
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1232
|
+
const aT = a5;
|
|
1233
|
+
a5 = av[ns];
|
|
1234
1234
|
return () => {
|
|
1235
|
-
|
|
1235
|
+
a5 = aT;
|
|
1236
1236
|
};
|
|
1237
1237
|
};
|
|
1238
1238
|
$ezh.$s = (cb, element) => {
|
|
@@ -1240,16 +1240,16 @@ export var $ezh;
|
|
|
1240
1240
|
return element;
|
|
1241
1241
|
};
|
|
1242
1242
|
$ezh.$t = (id, text, mayChange) => {
|
|
1243
|
-
const
|
|
1244
|
-
let element =
|
|
1243
|
+
const l = `${o.id}${id}${B}`;
|
|
1244
|
+
let element = m.get(l);
|
|
1245
1245
|
if (element) {
|
|
1246
1246
|
if (mayChange) {
|
|
1247
1247
|
element.update(text);
|
|
1248
1248
|
}
|
|
1249
1249
|
return element;
|
|
1250
1250
|
}
|
|
1251
|
-
element = new
|
|
1252
|
-
|
|
1251
|
+
element = new ak(l, text);
|
|
1252
|
+
m.set(element.id, element);
|
|
1253
1253
|
return element;
|
|
1254
1254
|
};
|
|
1255
1255
|
})($ezh || ($ezh = {}));
|