jaxs 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jaxs.d.ts +60 -48
- package/dist/jaxs.js +373 -341
- package/dist/jaxs.umd.cjs +303 -275
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
const O = (e, t) =>
|
|
2
|
-
|
|
1
|
+
const O = (e, t) => {
|
|
2
|
+
for (let s = e.length - 1; s >= 0; s--) e[s] === t && e.splice(s, 1)
|
|
3
|
+
return e
|
|
4
|
+
},
|
|
5
|
+
M = (e, t) => {
|
|
6
|
+
for (let s = e.length - 1; s >= 0; s--) t(e[s]) && e.splice(s, 1)
|
|
7
|
+
return e
|
|
8
|
+
},
|
|
3
9
|
k = (e, t, s) => (e.splice(t, 0, s), e),
|
|
4
|
-
|
|
10
|
+
$ = (e, t) => (e.includes(t) || e.push(t), e),
|
|
11
|
+
Ve = {
|
|
5
12
|
remove: O,
|
|
6
13
|
removeBy: M,
|
|
7
14
|
insertAt: k,
|
|
15
|
+
appendIfUnique: $,
|
|
16
|
+
push: (e, t) => e.push(t),
|
|
17
|
+
// mutates
|
|
18
|
+
pop: (e) => e.pop(),
|
|
19
|
+
// mutates
|
|
20
|
+
unshift: (e, t) => e.unshift(t),
|
|
21
|
+
// mutates
|
|
22
|
+
shift: (e) => e.shift(),
|
|
23
|
+
// mutates
|
|
24
|
+
sortBy: (e, t) => e.sort(t),
|
|
25
|
+
// mutates
|
|
26
|
+
includes: (e, t) => e.includes(t),
|
|
27
|
+
// reader
|
|
8
28
|
}
|
|
9
29
|
class ct {
|
|
10
30
|
constructor(t) {
|
|
@@ -29,13 +49,21 @@ class ct {
|
|
|
29
49
|
setFalse() {
|
|
30
50
|
this.update(!1)
|
|
31
51
|
}
|
|
52
|
+
isTrue() {
|
|
53
|
+
return this.value === !0
|
|
54
|
+
}
|
|
55
|
+
isFalse() {
|
|
56
|
+
return this.value === !1
|
|
57
|
+
}
|
|
32
58
|
}
|
|
33
59
|
const f = (e) => new ct(e),
|
|
34
|
-
|
|
60
|
+
Le = {
|
|
35
61
|
toggle: (e) => f(e).toggle(),
|
|
36
62
|
setTrue: (e) => f(e).setTrue(),
|
|
37
63
|
setFalse: (e) => f(e).setFalse(),
|
|
38
64
|
reset: (e) => f(e).reset(),
|
|
65
|
+
isTrue: (e) => f(e).isTrue(),
|
|
66
|
+
isFalse: (e) => f(e).isFalse(),
|
|
39
67
|
}
|
|
40
68
|
class ht {
|
|
41
69
|
constructor(t) {
|
|
@@ -84,9 +112,16 @@ class ht {
|
|
|
84
112
|
const s = M(this.value, t)
|
|
85
113
|
this.update(s)
|
|
86
114
|
}
|
|
115
|
+
includes(t) {
|
|
116
|
+
return this.value.includes(t)
|
|
117
|
+
}
|
|
118
|
+
appendIfUnique(t) {
|
|
119
|
+
const s = this.value
|
|
120
|
+
$(s, t), this.update(s)
|
|
121
|
+
}
|
|
87
122
|
}
|
|
88
123
|
const m = (e) => new ht(e),
|
|
89
|
-
|
|
124
|
+
ze = {
|
|
90
125
|
push: (e, t) => m(e).push(t),
|
|
91
126
|
pop: (e) => m(e).pop(),
|
|
92
127
|
unshift: (e, t) => m(e).unshift(t),
|
|
@@ -96,8 +131,10 @@ const m = (e) => new ht(e),
|
|
|
96
131
|
remove: (e, t) => m(e).remove(t),
|
|
97
132
|
removeBy: (e, t) => m(e).removeBy(t),
|
|
98
133
|
reset: (e) => m(e).reset(),
|
|
134
|
+
includes: (e, t) => m(e).includes(t),
|
|
135
|
+
appendIfUnique: (e, t) => m(e).appendIfUnique(t),
|
|
99
136
|
}
|
|
100
|
-
class
|
|
137
|
+
class lt {
|
|
101
138
|
constructor(t) {
|
|
102
139
|
this.store = t
|
|
103
140
|
}
|
|
@@ -132,28 +169,32 @@ class pt {
|
|
|
132
169
|
const s = { ...this.value, ...t }
|
|
133
170
|
this.update(s)
|
|
134
171
|
}
|
|
172
|
+
attributeTruthy(t) {
|
|
173
|
+
return !!this.value[t]
|
|
174
|
+
}
|
|
135
175
|
}
|
|
136
|
-
const b = (e) => new
|
|
137
|
-
|
|
176
|
+
const b = (e) => new lt(e),
|
|
177
|
+
Ke = {
|
|
138
178
|
reset: (e) => b(e).reset(),
|
|
139
179
|
resetAttribute: (e, t) => b(e).resetAttribute(t),
|
|
140
180
|
updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
|
|
141
181
|
updateAttributes: (e, t) => b(e).updateAttributes(t),
|
|
182
|
+
attributeTruthy: (e, t) => b(e).attributeTruthy(t),
|
|
142
183
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
184
|
+
dt = (e) => typeof e == 'boolean',
|
|
185
|
+
pt = (e) => typeof e == 'number',
|
|
186
|
+
D = (e) => typeof e == 'string',
|
|
146
187
|
v = (e) => Array.isArray(e),
|
|
147
|
-
|
|
188
|
+
g = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
148
189
|
Re = {
|
|
149
|
-
boolean:
|
|
150
|
-
number:
|
|
151
|
-
string:
|
|
190
|
+
boolean: dt,
|
|
191
|
+
number: pt,
|
|
192
|
+
string: D,
|
|
152
193
|
array: v,
|
|
153
|
-
object:
|
|
194
|
+
object: g,
|
|
154
195
|
},
|
|
155
|
-
|
|
156
|
-
|
|
196
|
+
mt = (e, t) => t.createElement(e),
|
|
197
|
+
ft = (e, t) => {
|
|
157
198
|
for (const s in t) {
|
|
158
199
|
if (s === '__self') continue
|
|
159
200
|
const r = t[s].toString()
|
|
@@ -161,29 +202,29 @@ const b = (e) => new pt(e),
|
|
|
161
202
|
const n = e
|
|
162
203
|
n.value !== r && (n.value = r)
|
|
163
204
|
} else
|
|
164
|
-
|
|
205
|
+
D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
165
206
|
}
|
|
166
207
|
},
|
|
167
|
-
|
|
208
|
+
bt = (e, t, s) => {
|
|
168
209
|
const r = {}
|
|
169
210
|
for (const n in t) {
|
|
170
|
-
const
|
|
171
|
-
a = (c) => s(
|
|
211
|
+
const i = t[n],
|
|
212
|
+
a = (c) => s(i, c)
|
|
172
213
|
e.addEventListener(n, a),
|
|
173
214
|
(r[n] = {
|
|
174
215
|
domEvent: n,
|
|
175
|
-
busEvent:
|
|
216
|
+
busEvent: i,
|
|
176
217
|
listener: a,
|
|
177
218
|
})
|
|
178
219
|
}
|
|
179
220
|
e.eventMaps = r
|
|
180
221
|
},
|
|
181
|
-
|
|
182
|
-
const n =
|
|
183
|
-
return
|
|
222
|
+
vt = (e, t, s, r) => {
|
|
223
|
+
const n = mt(e, r.document)
|
|
224
|
+
return ft(n, t), bt(n, s, r.publish), n
|
|
184
225
|
},
|
|
185
226
|
w = 'http://www.w3.org/2000/svg',
|
|
186
|
-
|
|
227
|
+
yt = {
|
|
187
228
|
animate: !0,
|
|
188
229
|
animateMotion: !0,
|
|
189
230
|
animateTransform: !0,
|
|
@@ -247,8 +288,8 @@ const b = (e) => new pt(e),
|
|
|
247
288
|
use: !0,
|
|
248
289
|
view: !0,
|
|
249
290
|
},
|
|
250
|
-
|
|
251
|
-
|
|
291
|
+
gt = (e, t) => !!(yt[e] || (e === 'a' && t === w)),
|
|
292
|
+
Et = (e, t, s) => {
|
|
252
293
|
const r = s.createElementNS(w, e)
|
|
253
294
|
for (const n in t)
|
|
254
295
|
n === '__self' ||
|
|
@@ -256,34 +297,34 @@ const b = (e) => new pt(e),
|
|
|
256
297
|
r.setAttributeNS(null, n, t[n].toString())
|
|
257
298
|
return r
|
|
258
299
|
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
class
|
|
300
|
+
At = (e) => e.namespaceURI === w,
|
|
301
|
+
xt = (e, t) => t.createTextNode(e)
|
|
302
|
+
class wt {
|
|
262
303
|
constructor(t) {
|
|
263
304
|
this.value = t.toString()
|
|
264
305
|
}
|
|
265
306
|
render(t) {
|
|
266
|
-
const s =
|
|
307
|
+
const s = xt(this.value, t.document)
|
|
267
308
|
return (s.__jsx = 'TextNode'), [s]
|
|
268
309
|
}
|
|
269
310
|
}
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
311
|
+
const Nt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
312
|
+
_t = (e) => new wt(e),
|
|
313
|
+
St = (e) => (Nt(e) ? _t(e) : e),
|
|
314
|
+
P = (e) => Tt(e).map(St).flat(),
|
|
315
|
+
Tt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
316
|
+
B = (e, t = {}) => P(e || t.children || []),
|
|
317
|
+
jt = (e, t = '') => {
|
|
277
318
|
const s = {},
|
|
278
319
|
r = {}
|
|
279
320
|
for (const n in e) {
|
|
280
|
-
const
|
|
321
|
+
const i = e[n]
|
|
281
322
|
if (n.match(/^on.+/i)) {
|
|
282
323
|
const a = n.slice(2).toLowerCase()
|
|
283
|
-
r[a] =
|
|
324
|
+
r[a] = i ? i.toString() : ''
|
|
284
325
|
} else {
|
|
285
|
-
if (
|
|
286
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
326
|
+
if (i === !1) continue
|
|
327
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Ot(n, i, t))
|
|
287
328
|
}
|
|
288
329
|
}
|
|
289
330
|
return {
|
|
@@ -291,22 +332,22 @@ const Tt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
291
332
|
events: r,
|
|
292
333
|
}
|
|
293
334
|
},
|
|
294
|
-
|
|
295
|
-
|
|
335
|
+
Ot = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
336
|
+
Mt = (e, t) => {
|
|
296
337
|
const s = e || {},
|
|
297
|
-
r =
|
|
338
|
+
r = B(t, s)
|
|
298
339
|
return (s.children = s.children || r), s
|
|
299
340
|
},
|
|
300
|
-
|
|
301
|
-
|
|
341
|
+
F = (e, t, s, r = []) => e.reduce(kt(t, s), r).flat(),
|
|
342
|
+
kt = (e, t) => (s, r) =>
|
|
302
343
|
r
|
|
303
344
|
? Array.isArray(r)
|
|
304
|
-
?
|
|
345
|
+
? F(r, e, t, s)
|
|
305
346
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
306
347
|
: s
|
|
307
348
|
class V {
|
|
308
349
|
constructor(t) {
|
|
309
|
-
this.collection =
|
|
350
|
+
this.collection = P(t)
|
|
310
351
|
}
|
|
311
352
|
render(t, s) {
|
|
312
353
|
this.parentElement = s
|
|
@@ -314,7 +355,7 @@ class V {
|
|
|
314
355
|
return this.attachToParent(r), r
|
|
315
356
|
}
|
|
316
357
|
generateDom(t) {
|
|
317
|
-
return
|
|
358
|
+
return F(this.collection, t, this.parentElement)
|
|
318
359
|
}
|
|
319
360
|
attachToParent(t) {
|
|
320
361
|
if (this.parentElement === void 0) return
|
|
@@ -322,7 +363,7 @@ class V {
|
|
|
322
363
|
t.forEach((r) => s.appendChild(r))
|
|
323
364
|
}
|
|
324
365
|
}
|
|
325
|
-
class
|
|
366
|
+
class $t {
|
|
326
367
|
constructor(t, s) {
|
|
327
368
|
;(this.type = t), (this.attributes = s)
|
|
328
369
|
}
|
|
@@ -348,13 +389,13 @@ class Bt {
|
|
|
348
389
|
return `${this.type}${t}${s}${r}`
|
|
349
390
|
}
|
|
350
391
|
}
|
|
351
|
-
class
|
|
392
|
+
class Dt {
|
|
352
393
|
constructor(t, s, r = []) {
|
|
353
394
|
this.type = t
|
|
354
|
-
const { events: n, attributes:
|
|
395
|
+
const { events: n, attributes: i } = jt(s)
|
|
355
396
|
;(this.events = n),
|
|
356
|
-
(this.attributes =
|
|
357
|
-
(this.isSvg =
|
|
397
|
+
(this.attributes = i),
|
|
398
|
+
(this.isSvg = gt(this.type, this.attributes.xmlns)),
|
|
358
399
|
(this.children = new V(r))
|
|
359
400
|
}
|
|
360
401
|
render(t) {
|
|
@@ -365,24 +406,24 @@ class Vt {
|
|
|
365
406
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
366
407
|
}
|
|
367
408
|
generateHtmlDom(t) {
|
|
368
|
-
const s =
|
|
409
|
+
const s = vt(this.type, this.attributes, this.events, t)
|
|
369
410
|
return (s.__jsx = this.jsxKey()), s
|
|
370
411
|
}
|
|
371
412
|
generateSvgDom(t) {
|
|
372
|
-
const s =
|
|
413
|
+
const s = Et(this.type, this.attributes, t.document)
|
|
373
414
|
return (s.__jsx = this.jsxKey()), s
|
|
374
415
|
}
|
|
375
416
|
jsxKey() {
|
|
376
|
-
return new
|
|
417
|
+
return new $t(this.type, this.attributes).generate()
|
|
377
418
|
}
|
|
378
419
|
}
|
|
379
|
-
const
|
|
380
|
-
typeof e == 'string' ? new
|
|
381
|
-
|
|
382
|
-
const s =
|
|
420
|
+
const Pt = (e, t, ...s) =>
|
|
421
|
+
typeof e == 'string' ? new Dt(e, t, s) : e(Mt(t, s))
|
|
422
|
+
Pt.fragment = (e, t) => {
|
|
423
|
+
const s = B(t, e)
|
|
383
424
|
return new V(s)
|
|
384
425
|
}
|
|
385
|
-
class
|
|
426
|
+
class Bt {
|
|
386
427
|
constructor(t, s, r) {
|
|
387
428
|
;(this.template = t),
|
|
388
429
|
(this.selector = s),
|
|
@@ -407,49 +448,49 @@ class Lt {
|
|
|
407
448
|
return this.renderKit.document.querySelector(this.selector)
|
|
408
449
|
}
|
|
409
450
|
}
|
|
410
|
-
const
|
|
411
|
-
const r = new
|
|
451
|
+
const Ft = (e, t, s) => {
|
|
452
|
+
const r = new Bt(e, t, s)
|
|
412
453
|
return r.renderAndAttach(s), r
|
|
413
454
|
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
455
|
+
L = 'go-to-href',
|
|
456
|
+
z = 'go-to',
|
|
457
|
+
y = 'navigation:location-change',
|
|
458
|
+
K = 'navigation:route-change',
|
|
459
|
+
Vt = /* @__PURE__ */ Object.freeze(
|
|
419
460
|
/* @__PURE__ */ Object.defineProperty(
|
|
420
461
|
{
|
|
421
462
|
__proto__: null,
|
|
422
|
-
linkNavigationEvent:
|
|
423
|
-
locationChangeEvent:
|
|
424
|
-
navigationEvent:
|
|
425
|
-
routeChangeEvent:
|
|
463
|
+
linkNavigationEvent: L,
|
|
464
|
+
locationChangeEvent: y,
|
|
465
|
+
navigationEvent: z,
|
|
466
|
+
routeChangeEvent: K,
|
|
426
467
|
},
|
|
427
468
|
Symbol.toStringTag,
|
|
428
469
|
{ value: 'Module' },
|
|
429
470
|
),
|
|
430
471
|
),
|
|
431
|
-
|
|
472
|
+
R = (e) => {
|
|
432
473
|
e.create('route', {
|
|
433
474
|
host: '',
|
|
434
475
|
path: '',
|
|
435
476
|
query: {},
|
|
436
477
|
})
|
|
437
478
|
},
|
|
438
|
-
|
|
479
|
+
U = (e) => {
|
|
439
480
|
const t = e.closest('[href]')
|
|
440
481
|
return (t && t.getAttribute('href')) || ''
|
|
441
482
|
},
|
|
442
483
|
N = ({ payload: e, publish: t, window: s }) => {
|
|
443
|
-
s.history.pushState(null, '', e), t(
|
|
484
|
+
s.history.pushState(null, '', e), t(y, null)
|
|
444
485
|
},
|
|
445
|
-
|
|
486
|
+
q = (e) => {
|
|
446
487
|
const t = e.payload
|
|
447
488
|
if (!t || !t.target) return
|
|
448
489
|
t.preventDefault()
|
|
449
|
-
const s =
|
|
490
|
+
const s = U(t.target)
|
|
450
491
|
N({ ...e, payload: s })
|
|
451
492
|
},
|
|
452
|
-
|
|
493
|
+
I = (e) =>
|
|
453
494
|
e
|
|
454
495
|
.replace(/^\?/, '')
|
|
455
496
|
.split('&')
|
|
@@ -458,55 +499,55 @@ const zt = (e, t, s) => {
|
|
|
458
499
|
const r = s.split('=')
|
|
459
500
|
return (t[r[0]] = r[1]), t
|
|
460
501
|
}, {}),
|
|
461
|
-
|
|
502
|
+
J = (e) => {
|
|
462
503
|
const { state: t, publish: s, window: r } = e,
|
|
463
|
-
{ host: n, pathname:
|
|
464
|
-
c =
|
|
465
|
-
u =
|
|
466
|
-
|
|
504
|
+
{ host: n, pathname: i, search: a } = r.location,
|
|
505
|
+
c = i,
|
|
506
|
+
u = I(a),
|
|
507
|
+
l = {
|
|
467
508
|
host: n,
|
|
468
509
|
path: c,
|
|
469
510
|
query: u,
|
|
470
511
|
}
|
|
471
|
-
t.store('route').update(
|
|
512
|
+
t.store('route').update(l), s(K, l)
|
|
472
513
|
},
|
|
473
|
-
|
|
514
|
+
G = (e) => {
|
|
474
515
|
const { subscribe: t } = e
|
|
475
|
-
t(
|
|
476
|
-
t(
|
|
516
|
+
t(L, q),
|
|
517
|
+
t(z, (s) => {
|
|
477
518
|
N(s)
|
|
478
519
|
})
|
|
479
520
|
},
|
|
480
|
-
|
|
521
|
+
H = (e) => {
|
|
481
522
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
482
|
-
|
|
523
|
+
R(r), n.addEventListener('popstate', () => t(y, null)), s(y, J)
|
|
483
524
|
},
|
|
484
|
-
|
|
485
|
-
setTimeout(() => e.publish(
|
|
525
|
+
C = (e) => {
|
|
526
|
+
setTimeout(() => e.publish(y, null), 0)
|
|
486
527
|
},
|
|
487
|
-
|
|
488
|
-
|
|
528
|
+
Q = (e) => {
|
|
529
|
+
H(e), G(e), C(e)
|
|
489
530
|
},
|
|
490
|
-
|
|
531
|
+
Lt = /* @__PURE__ */ Object.freeze(
|
|
491
532
|
/* @__PURE__ */ Object.defineProperty(
|
|
492
533
|
{
|
|
493
534
|
__proto__: null,
|
|
494
|
-
publishLocation:
|
|
495
|
-
startNavigation:
|
|
496
|
-
subscribeToHistoryChange:
|
|
497
|
-
subscribeToNavigation:
|
|
535
|
+
publishLocation: C,
|
|
536
|
+
startNavigation: Q,
|
|
537
|
+
subscribeToHistoryChange: H,
|
|
538
|
+
subscribeToNavigation: G,
|
|
498
539
|
},
|
|
499
540
|
Symbol.toStringTag,
|
|
500
541
|
{ value: 'Module' },
|
|
501
542
|
),
|
|
502
543
|
)
|
|
503
|
-
class
|
|
544
|
+
class W {
|
|
504
545
|
constructor({
|
|
505
546
|
window: t,
|
|
506
547
|
document: s,
|
|
507
548
|
publish: r,
|
|
508
549
|
subscribe: n,
|
|
509
|
-
bus:
|
|
550
|
+
bus: i,
|
|
510
551
|
state: a,
|
|
511
552
|
renderKit: c,
|
|
512
553
|
}) {
|
|
@@ -514,30 +555,30 @@ class Q {
|
|
|
514
555
|
(this.document = s),
|
|
515
556
|
(this.publish = r),
|
|
516
557
|
(this.subscribe = n),
|
|
517
|
-
(this.bus =
|
|
558
|
+
(this.bus = i),
|
|
518
559
|
(this.state = a),
|
|
519
560
|
(this.renderKit = c),
|
|
520
561
|
(this.roots = [])
|
|
521
562
|
}
|
|
522
563
|
render(t, s) {
|
|
523
|
-
const r =
|
|
564
|
+
const r = Ft(t, s, this.renderKit)
|
|
524
565
|
return this.roots.push(r), r
|
|
525
566
|
}
|
|
526
567
|
startNavigation() {
|
|
527
|
-
|
|
568
|
+
Q(this)
|
|
528
569
|
}
|
|
529
570
|
}
|
|
530
571
|
const Ue = /* @__PURE__ */ Object.freeze(
|
|
531
572
|
/* @__PURE__ */ Object.defineProperty(
|
|
532
573
|
{
|
|
533
574
|
__proto__: null,
|
|
534
|
-
App:
|
|
575
|
+
App: W,
|
|
535
576
|
},
|
|
536
577
|
Symbol.toStringTag,
|
|
537
578
|
{ value: 'Module' },
|
|
538
579
|
),
|
|
539
580
|
)
|
|
540
|
-
class
|
|
581
|
+
class X {
|
|
541
582
|
constructor() {
|
|
542
583
|
this.lookup = {}
|
|
543
584
|
}
|
|
@@ -564,7 +605,7 @@ class W {
|
|
|
564
605
|
this.lookup[t] || (this.lookup[t] = [])
|
|
565
606
|
}
|
|
566
607
|
}
|
|
567
|
-
class
|
|
608
|
+
class Y {
|
|
568
609
|
constructor() {
|
|
569
610
|
this.lookup = []
|
|
570
611
|
}
|
|
@@ -583,7 +624,7 @@ class X {
|
|
|
583
624
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
584
625
|
}
|
|
585
626
|
}
|
|
586
|
-
class
|
|
627
|
+
class zt {
|
|
587
628
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
588
629
|
;(this.setNewTimeout = () => {
|
|
589
630
|
this.stopped ||
|
|
@@ -620,7 +661,7 @@ class Ut {
|
|
|
620
661
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
621
662
|
}
|
|
622
663
|
}
|
|
623
|
-
const
|
|
664
|
+
const Kt = (e) => {
|
|
624
665
|
const { offset: t, period: s } = e,
|
|
625
666
|
r = ({ callCount: n }) => (t && n == 0 ? t : s)
|
|
626
667
|
return {
|
|
@@ -630,16 +671,16 @@ const Ct = (e) => {
|
|
|
630
671
|
timer: r,
|
|
631
672
|
}
|
|
632
673
|
},
|
|
633
|
-
|
|
674
|
+
Rt = (e) => {
|
|
634
675
|
let t
|
|
635
|
-
'timer' in e ? (t = e) : (t =
|
|
636
|
-
const s = new
|
|
676
|
+
'timer' in e ? (t = e) : (t = Kt(e))
|
|
677
|
+
const s = new zt(t)
|
|
637
678
|
return s.start(), s.stop
|
|
638
679
|
}
|
|
639
|
-
class
|
|
680
|
+
class Z {
|
|
640
681
|
constructor() {
|
|
641
|
-
;(this.exactSubscriptions = new
|
|
642
|
-
(this.fuzzySubscriptions = new
|
|
682
|
+
;(this.exactSubscriptions = new X()),
|
|
683
|
+
(this.fuzzySubscriptions = new Y()),
|
|
643
684
|
(this.currentIndex = 0)
|
|
644
685
|
}
|
|
645
686
|
subscribe(t, s) {
|
|
@@ -657,7 +698,7 @@ class Y {
|
|
|
657
698
|
...this.exactSubscriptions.matches(t),
|
|
658
699
|
...this.fuzzySubscriptions.matches(t),
|
|
659
700
|
]
|
|
660
|
-
.sort((n,
|
|
701
|
+
.sort((n, i) => n.index - i.index)
|
|
661
702
|
.forEach((n) => {
|
|
662
703
|
n.listener(this.listenerOptions(t, s))
|
|
663
704
|
})
|
|
@@ -674,49 +715,49 @@ class Y {
|
|
|
674
715
|
}
|
|
675
716
|
}
|
|
676
717
|
}
|
|
677
|
-
const
|
|
678
|
-
const e = new
|
|
718
|
+
const tt = () => {
|
|
719
|
+
const e = new Z()
|
|
679
720
|
return {
|
|
680
721
|
bus: e,
|
|
681
722
|
publish: (r, n) => e.publish(r, n),
|
|
682
723
|
subscribe: (r, n) => e.subscribe(r, n),
|
|
683
724
|
}
|
|
684
725
|
},
|
|
685
|
-
|
|
726
|
+
qe = /* @__PURE__ */ Object.freeze(
|
|
686
727
|
/* @__PURE__ */ Object.defineProperty(
|
|
687
728
|
{
|
|
688
729
|
__proto__: null,
|
|
689
|
-
ExactSubscriptions:
|
|
690
|
-
FuzzySubscriptions:
|
|
691
|
-
JaxsBus:
|
|
692
|
-
createBus:
|
|
693
|
-
publishPeriodically:
|
|
730
|
+
ExactSubscriptions: X,
|
|
731
|
+
FuzzySubscriptions: Y,
|
|
732
|
+
JaxsBus: Z,
|
|
733
|
+
createBus: tt,
|
|
734
|
+
publishPeriodically: Rt,
|
|
694
735
|
},
|
|
695
736
|
Symbol.toStringTag,
|
|
696
737
|
{ value: 'Module' },
|
|
697
738
|
),
|
|
698
739
|
),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
!(
|
|
740
|
+
Ut = (e, t) => e === t,
|
|
741
|
+
qt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
742
|
+
et = (e, t) =>
|
|
743
|
+
!(g(e) && g(t)) || !qt(e, t)
|
|
703
744
|
? !1
|
|
704
745
|
: Object.keys(e).every((s) => {
|
|
705
746
|
const r = e[s],
|
|
706
747
|
n = t[s]
|
|
707
748
|
return E(r, n)
|
|
708
749
|
}),
|
|
709
|
-
|
|
750
|
+
st = (e, t) =>
|
|
710
751
|
!(v(e) && v(t)) || e.length !== t.length
|
|
711
752
|
? !1
|
|
712
753
|
: e.every((s, r) => {
|
|
713
754
|
const n = t[r]
|
|
714
755
|
return E(s, n)
|
|
715
756
|
}),
|
|
716
|
-
E = (e, t) => (
|
|
717
|
-
|
|
718
|
-
objects:
|
|
719
|
-
arrays:
|
|
757
|
+
E = (e, t) => (g(e) ? et(e, t) : v(e) ? st(e, t) : Ut(e, t)),
|
|
758
|
+
Ie = {
|
|
759
|
+
objects: et,
|
|
760
|
+
arrays: st,
|
|
720
761
|
equal: E,
|
|
721
762
|
}
|
|
722
763
|
class x {
|
|
@@ -748,13 +789,8 @@ class x {
|
|
|
748
789
|
return t(this.value)
|
|
749
790
|
}
|
|
750
791
|
}
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
list: m,
|
|
754
|
-
boolean: f,
|
|
755
|
-
},
|
|
756
|
-
_ = 'state'
|
|
757
|
-
class st {
|
|
792
|
+
const _ = 'state'
|
|
793
|
+
class rt {
|
|
758
794
|
constructor(t) {
|
|
759
795
|
;(this.publisher = t),
|
|
760
796
|
(this.stores = {}),
|
|
@@ -814,22 +850,21 @@ class st {
|
|
|
814
850
|
return `${this.eventNamePrefix}:${t}`
|
|
815
851
|
}
|
|
816
852
|
}
|
|
817
|
-
const
|
|
818
|
-
|
|
853
|
+
const nt = (e) => new rt(e),
|
|
854
|
+
Je = /* @__PURE__ */ Object.freeze(
|
|
819
855
|
/* @__PURE__ */ Object.defineProperty(
|
|
820
856
|
{
|
|
821
857
|
__proto__: null,
|
|
822
|
-
State:
|
|
858
|
+
State: rt,
|
|
823
859
|
Store: x,
|
|
824
|
-
createState:
|
|
860
|
+
createState: nt,
|
|
825
861
|
eventName: _,
|
|
826
|
-
updaters: Gt,
|
|
827
862
|
},
|
|
828
863
|
Symbol.toStringTag,
|
|
829
864
|
{ value: 'Module' },
|
|
830
865
|
),
|
|
831
866
|
)
|
|
832
|
-
class
|
|
867
|
+
class It {
|
|
833
868
|
constructor(t) {
|
|
834
869
|
this.setupDomEnvironment(t)
|
|
835
870
|
}
|
|
@@ -839,7 +874,7 @@ class Ht {
|
|
|
839
874
|
this.setupState(),
|
|
840
875
|
this.addBusOptions(),
|
|
841
876
|
this.setRenderKit(),
|
|
842
|
-
new
|
|
877
|
+
new W({
|
|
843
878
|
window: this.window,
|
|
844
879
|
document: this.document,
|
|
845
880
|
publish: this.publish,
|
|
@@ -858,11 +893,11 @@ class Ht {
|
|
|
858
893
|
: ((this.window = window), (this.document = document))
|
|
859
894
|
}
|
|
860
895
|
setupBus() {
|
|
861
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
896
|
+
const { publish: t, subscribe: s, bus: r } = tt()
|
|
862
897
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
863
898
|
}
|
|
864
899
|
setupState() {
|
|
865
|
-
this.state =
|
|
900
|
+
this.state = nt(this.publish)
|
|
866
901
|
}
|
|
867
902
|
addBusOptions() {
|
|
868
903
|
this.bus.addListenerOptions({
|
|
@@ -881,11 +916,11 @@ class Ht {
|
|
|
881
916
|
}
|
|
882
917
|
}
|
|
883
918
|
}
|
|
884
|
-
const
|
|
885
|
-
const s = new
|
|
919
|
+
const Ge = (e = {}) => {
|
|
920
|
+
const s = new It(e).setup()
|
|
886
921
|
return s.startNavigation(), s
|
|
887
922
|
}
|
|
888
|
-
var
|
|
923
|
+
var o = /* @__PURE__ */ ((e) => (
|
|
889
924
|
(e[(e.removeNode = 0)] = 'removeNode'),
|
|
890
925
|
(e[(e.insertNode = 1)] = 'insertNode'),
|
|
891
926
|
(e[(e.replaceNode = 2)] = 'replaceNode'),
|
|
@@ -898,88 +933,88 @@ var i = /* @__PURE__ */ ((e) => (
|
|
|
898
933
|
(e[(e.changeValue = 9)] = 'changeValue'),
|
|
899
934
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
900
935
|
e
|
|
901
|
-
))(
|
|
902
|
-
const
|
|
936
|
+
))(o || {})
|
|
937
|
+
const He = /* @__PURE__ */ Object.freeze(
|
|
903
938
|
/* @__PURE__ */ Object.defineProperty(
|
|
904
939
|
{
|
|
905
940
|
__proto__: null,
|
|
906
|
-
ChangeInstructionTypes:
|
|
941
|
+
ChangeInstructionTypes: o,
|
|
907
942
|
},
|
|
908
943
|
Symbol.toStringTag,
|
|
909
944
|
{ value: 'Module' },
|
|
910
945
|
),
|
|
911
946
|
),
|
|
912
|
-
|
|
947
|
+
Jt = (e, t) => ({
|
|
913
948
|
source: e,
|
|
914
949
|
target: t,
|
|
915
|
-
type:
|
|
950
|
+
type: o.changeText,
|
|
916
951
|
data: {},
|
|
917
952
|
}),
|
|
918
|
-
|
|
953
|
+
Gt = (e, t) => ({
|
|
919
954
|
source: e,
|
|
920
955
|
target: t,
|
|
921
|
-
type:
|
|
956
|
+
type: o.replaceNode,
|
|
922
957
|
data: {},
|
|
923
958
|
}),
|
|
924
|
-
|
|
959
|
+
Ht = (e, t, s) => ({
|
|
925
960
|
source: e,
|
|
926
961
|
target: t,
|
|
927
962
|
data: s,
|
|
928
|
-
type:
|
|
963
|
+
type: o.removeAttribute,
|
|
929
964
|
}),
|
|
930
|
-
|
|
965
|
+
Ct = (e, t, s) => ({
|
|
931
966
|
source: e,
|
|
932
967
|
target: t,
|
|
933
968
|
data: s,
|
|
934
|
-
type:
|
|
969
|
+
type: o.addAttribute,
|
|
935
970
|
}),
|
|
936
|
-
|
|
971
|
+
Qt = (e, t, s) => ({
|
|
937
972
|
source: e,
|
|
938
973
|
target: t,
|
|
939
974
|
data: s,
|
|
940
|
-
type:
|
|
975
|
+
type: o.updateAttribute,
|
|
941
976
|
}),
|
|
942
|
-
|
|
977
|
+
Wt = (e, t, s) => ({
|
|
943
978
|
source: e,
|
|
944
979
|
target: t,
|
|
945
980
|
data: s,
|
|
946
|
-
type:
|
|
981
|
+
type: o.removeEvent,
|
|
947
982
|
}),
|
|
948
|
-
|
|
983
|
+
Xt = (e, t, s) => ({
|
|
949
984
|
source: e,
|
|
950
985
|
target: t,
|
|
951
986
|
data: s,
|
|
952
|
-
type:
|
|
987
|
+
type: o.addEvent,
|
|
953
988
|
}),
|
|
954
|
-
|
|
989
|
+
Yt = (e, t, s) => ({
|
|
955
990
|
source: e,
|
|
956
991
|
target: t,
|
|
957
992
|
data: s,
|
|
958
|
-
type:
|
|
993
|
+
type: o.updateEvent,
|
|
959
994
|
}),
|
|
960
995
|
S = (e) => ({
|
|
961
996
|
source: e,
|
|
962
997
|
target: e,
|
|
963
998
|
// for type crap only
|
|
964
|
-
type:
|
|
999
|
+
type: o.removeNode,
|
|
965
1000
|
data: {},
|
|
966
1001
|
}),
|
|
967
1002
|
A = (e, t) => ({
|
|
968
1003
|
target: e,
|
|
969
1004
|
source: e,
|
|
970
1005
|
// for type crap only
|
|
971
|
-
type:
|
|
1006
|
+
type: o.insertNode,
|
|
972
1007
|
data: t,
|
|
973
1008
|
}),
|
|
974
|
-
|
|
1009
|
+
Zt = (e, t, s) => ({
|
|
975
1010
|
source: e,
|
|
976
1011
|
target: t,
|
|
977
|
-
type:
|
|
1012
|
+
type: o.changeValue,
|
|
978
1013
|
data: s,
|
|
979
1014
|
}),
|
|
980
|
-
|
|
1015
|
+
te = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
981
1016
|
T = { index: -1 }
|
|
982
|
-
class
|
|
1017
|
+
class ee {
|
|
983
1018
|
constructor() {
|
|
984
1019
|
this.map = {}
|
|
985
1020
|
}
|
|
@@ -1002,7 +1037,7 @@ class oe {
|
|
|
1002
1037
|
const s = t && t.__jsx
|
|
1003
1038
|
if (!(s && this.map[s] && this.map[s].length)) return
|
|
1004
1039
|
const r = this.map[s]
|
|
1005
|
-
this.map[s] = r.reduce((n,
|
|
1040
|
+
this.map[s] = r.reduce((n, i) => (i.element !== t && n.push(i), n), [])
|
|
1006
1041
|
}
|
|
1007
1042
|
check(t) {
|
|
1008
1043
|
const s = t && t.__jsx
|
|
@@ -1013,55 +1048,55 @@ class oe {
|
|
|
1013
1048
|
}
|
|
1014
1049
|
}
|
|
1015
1050
|
const j = (e) => {
|
|
1016
|
-
const t = new
|
|
1051
|
+
const t = new ee()
|
|
1017
1052
|
return t.populate(e), t
|
|
1018
1053
|
},
|
|
1019
|
-
|
|
1054
|
+
it = (e, t, s = !1) => {
|
|
1020
1055
|
const r = [],
|
|
1021
1056
|
n = e.attributes,
|
|
1022
|
-
|
|
1057
|
+
i = n.length,
|
|
1023
1058
|
a = t.attributes,
|
|
1024
1059
|
c = a.length
|
|
1025
|
-
let u,
|
|
1026
|
-
for (u = 0; u <
|
|
1060
|
+
let u, l, d
|
|
1061
|
+
for (u = 0; u < i; u++) {
|
|
1027
1062
|
d = null
|
|
1028
|
-
const
|
|
1029
|
-
if (
|
|
1030
|
-
for (
|
|
1031
|
-
const p = a.item(
|
|
1032
|
-
if (p &&
|
|
1063
|
+
const h = n.item(u)
|
|
1064
|
+
if (h) {
|
|
1065
|
+
for (l = 0; l < c; l++) {
|
|
1066
|
+
const p = a.item(l)
|
|
1067
|
+
if (p && h.name == p.name) {
|
|
1033
1068
|
d = p
|
|
1034
1069
|
break
|
|
1035
1070
|
}
|
|
1036
1071
|
}
|
|
1037
1072
|
d
|
|
1038
|
-
?
|
|
1073
|
+
? h.value !== d.value &&
|
|
1039
1074
|
r.push(
|
|
1040
|
-
|
|
1041
|
-
name:
|
|
1075
|
+
Qt(e, t, {
|
|
1076
|
+
name: h.name,
|
|
1042
1077
|
value: d.value,
|
|
1043
1078
|
isSvg: s,
|
|
1044
1079
|
}),
|
|
1045
1080
|
)
|
|
1046
|
-
: r.push(
|
|
1081
|
+
: r.push(Ht(e, t, { name: h.name, isSvg: s }))
|
|
1047
1082
|
}
|
|
1048
1083
|
}
|
|
1049
1084
|
for (u = 0; u < c; u++) {
|
|
1050
1085
|
d = null
|
|
1051
|
-
const
|
|
1052
|
-
if (
|
|
1053
|
-
for (
|
|
1054
|
-
const p = n.item(
|
|
1055
|
-
if (p && p.name ==
|
|
1086
|
+
const h = a.item(u)
|
|
1087
|
+
if (h) {
|
|
1088
|
+
for (l = 0; l < i; l++) {
|
|
1089
|
+
const p = n.item(l)
|
|
1090
|
+
if (p && p.name == h.name) {
|
|
1056
1091
|
d = p
|
|
1057
1092
|
break
|
|
1058
1093
|
}
|
|
1059
1094
|
}
|
|
1060
1095
|
d ||
|
|
1061
1096
|
r.push(
|
|
1062
|
-
|
|
1063
|
-
name:
|
|
1064
|
-
value:
|
|
1097
|
+
Ct(e, t, {
|
|
1098
|
+
name: h.name,
|
|
1099
|
+
value: h.value,
|
|
1065
1100
|
isSvg: s,
|
|
1066
1101
|
}),
|
|
1067
1102
|
)
|
|
@@ -1069,27 +1104,27 @@ const j = (e) => {
|
|
|
1069
1104
|
}
|
|
1070
1105
|
return r
|
|
1071
1106
|
},
|
|
1072
|
-
|
|
1107
|
+
se = (e, t) => {
|
|
1073
1108
|
const s = [],
|
|
1074
1109
|
r = e.eventMaps,
|
|
1075
1110
|
n = t.eventMaps,
|
|
1076
|
-
|
|
1111
|
+
i = Object.keys(r),
|
|
1077
1112
|
a = Object.keys(n)
|
|
1078
1113
|
return (
|
|
1079
|
-
|
|
1114
|
+
i.forEach((c) => {
|
|
1080
1115
|
const u = r[c],
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
?
|
|
1116
|
+
l = n[c]
|
|
1117
|
+
l
|
|
1118
|
+
? l.busEvent !== u.busEvent &&
|
|
1084
1119
|
s.push(
|
|
1085
|
-
|
|
1120
|
+
Yt(e, t, {
|
|
1086
1121
|
name: c,
|
|
1087
|
-
targetValue:
|
|
1122
|
+
targetValue: l.listener,
|
|
1088
1123
|
sourceValue: u.listener,
|
|
1089
1124
|
}),
|
|
1090
1125
|
)
|
|
1091
1126
|
: s.push(
|
|
1092
|
-
|
|
1127
|
+
Wt(e, t, {
|
|
1093
1128
|
name: u.domEvent,
|
|
1094
1129
|
value: u.listener,
|
|
1095
1130
|
}),
|
|
@@ -1097,64 +1132,64 @@ const j = (e) => {
|
|
|
1097
1132
|
}),
|
|
1098
1133
|
a.forEach((c) => {
|
|
1099
1134
|
const u = r[c],
|
|
1100
|
-
|
|
1135
|
+
l = n[c]
|
|
1101
1136
|
u ||
|
|
1102
1137
|
s.push(
|
|
1103
|
-
|
|
1104
|
-
name:
|
|
1105
|
-
value:
|
|
1138
|
+
Xt(e, t, {
|
|
1139
|
+
name: l.domEvent,
|
|
1140
|
+
value: l.listener,
|
|
1106
1141
|
}),
|
|
1107
1142
|
)
|
|
1108
1143
|
}),
|
|
1109
1144
|
s
|
|
1110
1145
|
)
|
|
1111
1146
|
},
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
if (
|
|
1147
|
+
re = (e) => e.tagName !== 'INPUT',
|
|
1148
|
+
ne = (e, t) => e.value === t.value,
|
|
1149
|
+
ie = (e, t) => {
|
|
1150
|
+
if (re(e) || ne(e, t)) return []
|
|
1116
1151
|
const s = e,
|
|
1117
1152
|
r = t
|
|
1118
|
-
return [
|
|
1153
|
+
return [Zt(s, r, { name: 'value', value: r.value })]
|
|
1119
1154
|
},
|
|
1120
|
-
|
|
1121
|
-
const s =
|
|
1122
|
-
r =
|
|
1123
|
-
n =
|
|
1155
|
+
oe = (e, t) => {
|
|
1156
|
+
const s = it(e, t),
|
|
1157
|
+
r = se(e, t),
|
|
1158
|
+
n = ie(e, t)
|
|
1124
1159
|
return s.concat(r).concat(n)
|
|
1125
1160
|
},
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1161
|
+
ue = (e, t) => it(e, t, !0),
|
|
1162
|
+
ae = (e, t) => (e.textContent !== t.textContent ? [Jt(e, t)] : []),
|
|
1163
|
+
ce = (e, t, s) => {
|
|
1129
1164
|
let r = []
|
|
1130
|
-
if (e.nodeType === 1 &&
|
|
1165
|
+
if (e.nodeType === 1 && At(e)) {
|
|
1131
1166
|
const n = e,
|
|
1132
|
-
|
|
1133
|
-
a =
|
|
1134
|
-
c = s(n.childNodes,
|
|
1167
|
+
i = t,
|
|
1168
|
+
a = ue(n, i),
|
|
1169
|
+
c = s(n.childNodes, i.childNodes, n)
|
|
1135
1170
|
r = a.concat(c)
|
|
1136
1171
|
} else if (e.nodeType === 1) {
|
|
1137
1172
|
const n = e,
|
|
1138
|
-
|
|
1139
|
-
a =
|
|
1140
|
-
c = s(n.childNodes,
|
|
1173
|
+
i = t,
|
|
1174
|
+
a = oe(n, i),
|
|
1175
|
+
c = s(n.childNodes, i.childNodes, n)
|
|
1141
1176
|
r = a.concat(c)
|
|
1142
|
-
} else e.nodeType === 3 && (r =
|
|
1177
|
+
} else e.nodeType === 3 && (r = ae(e, t))
|
|
1143
1178
|
return r
|
|
1144
1179
|
},
|
|
1145
1180
|
ot = (e, t, s) => {
|
|
1146
1181
|
const r = [],
|
|
1147
|
-
n =
|
|
1148
|
-
|
|
1182
|
+
n = he(e, t),
|
|
1183
|
+
i = j(e),
|
|
1149
1184
|
a = j(t),
|
|
1150
1185
|
c = []
|
|
1151
1186
|
let u = 0
|
|
1152
1187
|
for (; u < n; u++) {
|
|
1153
1188
|
const d = e[u],
|
|
1154
|
-
|
|
1155
|
-
if (
|
|
1156
|
-
const p =
|
|
1157
|
-
a.clear(
|
|
1189
|
+
h = t[u]
|
|
1190
|
+
if (h && a.check(h)) {
|
|
1191
|
+
const p = i.pullMatch(h)
|
|
1192
|
+
a.clear(h),
|
|
1158
1193
|
p.element
|
|
1159
1194
|
? (p.index !== u &&
|
|
1160
1195
|
r.push(
|
|
@@ -1165,145 +1200,145 @@ const j = (e) => {
|
|
|
1165
1200
|
),
|
|
1166
1201
|
c.push({
|
|
1167
1202
|
source: p.element,
|
|
1168
|
-
target:
|
|
1203
|
+
target: h,
|
|
1169
1204
|
}))
|
|
1170
1205
|
: d
|
|
1171
1206
|
? a.check(d)
|
|
1172
|
-
? r.push(A(
|
|
1173
|
-
: (
|
|
1174
|
-
: r.push(A(
|
|
1175
|
-
} else d &&
|
|
1207
|
+
? r.push(A(h, { parent: s, index: u }))
|
|
1208
|
+
: (i.clear(d), r.push(Gt(d, h)))
|
|
1209
|
+
: r.push(A(h, { parent: s, index: u }))
|
|
1210
|
+
} else d && i.pullMatch(d).element && r.push(S(d))
|
|
1176
1211
|
}
|
|
1177
|
-
|
|
1212
|
+
i.remaining().forEach(({ element: d }) => {
|
|
1178
1213
|
r.push(S(d))
|
|
1179
1214
|
})
|
|
1180
|
-
const
|
|
1181
|
-
(d, { source:
|
|
1215
|
+
const l = c.reduce(
|
|
1216
|
+
(d, { source: h, target: p }) => d.concat(ce(h, p, ot)),
|
|
1182
1217
|
[],
|
|
1183
1218
|
)
|
|
1184
|
-
return r.concat(
|
|
1219
|
+
return r.concat(l).sort(te)
|
|
1185
1220
|
},
|
|
1186
|
-
|
|
1221
|
+
he = (e, t) => {
|
|
1187
1222
|
const s = e.length,
|
|
1188
1223
|
r = t.length
|
|
1189
1224
|
return s > r ? s : r
|
|
1190
1225
|
},
|
|
1191
|
-
|
|
1226
|
+
le = (e, t, s) => {
|
|
1192
1227
|
const r = ot(e, t, s)
|
|
1193
1228
|
return (
|
|
1194
1229
|
r.forEach((n) => {
|
|
1195
|
-
|
|
1230
|
+
de(n)
|
|
1196
1231
|
}),
|
|
1197
1232
|
r
|
|
1198
1233
|
)
|
|
1199
1234
|
},
|
|
1200
|
-
|
|
1201
|
-
;(
|
|
1235
|
+
de = (e) => {
|
|
1236
|
+
;(Ne[e.type] || pe)(e)
|
|
1202
1237
|
},
|
|
1203
|
-
|
|
1204
|
-
|
|
1238
|
+
pe = (e) => {},
|
|
1239
|
+
me = (e) => {
|
|
1205
1240
|
const { source: t, target: s } = e
|
|
1206
1241
|
t.nodeValue = s.textContent
|
|
1207
1242
|
},
|
|
1208
|
-
|
|
1243
|
+
fe = (e) => {
|
|
1209
1244
|
const { source: t } = e
|
|
1210
1245
|
t.remove()
|
|
1211
1246
|
},
|
|
1212
|
-
|
|
1247
|
+
be = (e) => {
|
|
1213
1248
|
const { target: t, data: s } = e,
|
|
1214
1249
|
{ parent: r, index: n } = s,
|
|
1215
|
-
|
|
1216
|
-
|
|
1250
|
+
i = r.childNodes[n]
|
|
1251
|
+
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1217
1252
|
},
|
|
1218
|
-
|
|
1253
|
+
ve = (e) => {
|
|
1219
1254
|
const { source: t, target: s } = e
|
|
1220
1255
|
t.replaceWith(s)
|
|
1221
1256
|
},
|
|
1222
|
-
|
|
1257
|
+
ye = (e) => {
|
|
1223
1258
|
const { source: t, data: s } = e,
|
|
1224
1259
|
{ name: r, isSvg: n } = s
|
|
1225
1260
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1226
1261
|
},
|
|
1227
|
-
|
|
1262
|
+
ut = (e) => {
|
|
1228
1263
|
const { source: t, data: s } = e,
|
|
1229
|
-
{ name: r, value: n, isSvg:
|
|
1230
|
-
|
|
1264
|
+
{ name: r, value: n, isSvg: i } = s
|
|
1265
|
+
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1231
1266
|
},
|
|
1232
|
-
|
|
1233
|
-
|
|
1267
|
+
ge = (e) => {
|
|
1268
|
+
ut(e)
|
|
1234
1269
|
},
|
|
1235
|
-
|
|
1270
|
+
Ee = (e) => {
|
|
1236
1271
|
const t = e.data,
|
|
1237
1272
|
s = e.source,
|
|
1238
1273
|
{ name: r, value: n } = t
|
|
1239
1274
|
s.removeEventListener(r, n)
|
|
1240
1275
|
},
|
|
1241
|
-
|
|
1276
|
+
Ae = (e) => {
|
|
1242
1277
|
const t = e.data,
|
|
1243
1278
|
s = e.source,
|
|
1244
1279
|
{ name: r, value: n } = t
|
|
1245
1280
|
s.addEventListener(r, n)
|
|
1246
1281
|
},
|
|
1247
|
-
|
|
1282
|
+
xe = (e) => {
|
|
1248
1283
|
const t = e.data,
|
|
1249
1284
|
s = e.source,
|
|
1250
|
-
{ name: r, sourceValue: n, targetValue:
|
|
1251
|
-
s.removeEventListener(r, n), s.addEventListener(r,
|
|
1285
|
+
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1286
|
+
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1252
1287
|
},
|
|
1253
|
-
|
|
1288
|
+
we = (e) => {
|
|
1254
1289
|
const t = e.data,
|
|
1255
1290
|
s = e.source,
|
|
1256
1291
|
{ value: r } = t
|
|
1257
1292
|
s.value = r
|
|
1258
1293
|
},
|
|
1259
|
-
|
|
1260
|
-
[
|
|
1261
|
-
[
|
|
1262
|
-
[
|
|
1263
|
-
[
|
|
1264
|
-
[
|
|
1265
|
-
[
|
|
1266
|
-
[
|
|
1267
|
-
[
|
|
1268
|
-
[
|
|
1269
|
-
[
|
|
1270
|
-
[
|
|
1294
|
+
Ne = {
|
|
1295
|
+
[o.changeText]: me,
|
|
1296
|
+
[o.removeNode]: fe,
|
|
1297
|
+
[o.insertNode]: be,
|
|
1298
|
+
[o.replaceNode]: ve,
|
|
1299
|
+
[o.removeAttribute]: ye,
|
|
1300
|
+
[o.addAttribute]: ut,
|
|
1301
|
+
[o.updateAttribute]: ge,
|
|
1302
|
+
[o.removeEvent]: Ee,
|
|
1303
|
+
[o.addEvent]: Ae,
|
|
1304
|
+
[o.updateEvent]: xe,
|
|
1305
|
+
[o.changeValue]: we,
|
|
1271
1306
|
},
|
|
1272
|
-
|
|
1307
|
+
_e = (e, t, s) => {
|
|
1273
1308
|
const r = [...t]
|
|
1274
1309
|
return (
|
|
1275
1310
|
e.forEach((n) => {
|
|
1276
|
-
|
|
1311
|
+
Se(n, r, s)
|
|
1277
1312
|
}),
|
|
1278
1313
|
r
|
|
1279
1314
|
)
|
|
1280
1315
|
},
|
|
1281
|
-
|
|
1282
|
-
const r =
|
|
1316
|
+
Se = (e, t, s) => {
|
|
1317
|
+
const r = Me[e.type]
|
|
1283
1318
|
r && r(e, t, s)
|
|
1284
1319
|
},
|
|
1285
|
-
|
|
1320
|
+
Te = (e, t) => {
|
|
1286
1321
|
const { source: s } = e,
|
|
1287
1322
|
r = t.indexOf(s)
|
|
1288
1323
|
r >= 0 && t.splice(r, 1)
|
|
1289
1324
|
},
|
|
1290
|
-
|
|
1325
|
+
je = (e, t, s) => {
|
|
1291
1326
|
const { target: r } = e,
|
|
1292
1327
|
n = e.data,
|
|
1293
|
-
{ index:
|
|
1294
|
-
s === a && t.splice(
|
|
1328
|
+
{ index: i, parent: a } = n
|
|
1329
|
+
s === a && t.splice(i, 0, r)
|
|
1295
1330
|
},
|
|
1296
|
-
|
|
1331
|
+
Oe = (e, t) => {
|
|
1297
1332
|
const { target: s, source: r } = e,
|
|
1298
1333
|
n = t.indexOf(r)
|
|
1299
1334
|
n >= 0 && (t[n] = s)
|
|
1300
1335
|
},
|
|
1301
|
-
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1304
|
-
[
|
|
1336
|
+
Me = {
|
|
1337
|
+
[o.removeNode]: Te,
|
|
1338
|
+
[o.insertNode]: je,
|
|
1339
|
+
[o.replaceNode]: Oe,
|
|
1305
1340
|
}
|
|
1306
|
-
class
|
|
1341
|
+
class ke {
|
|
1307
1342
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1308
1343
|
;(this.Template = t),
|
|
1309
1344
|
(this.viewModel = n),
|
|
@@ -1335,8 +1370,8 @@ class Be {
|
|
|
1335
1370
|
this.parentElement = r
|
|
1336
1371
|
}
|
|
1337
1372
|
const t = this.generateDom(this.renderKit),
|
|
1338
|
-
s =
|
|
1339
|
-
this.dom =
|
|
1373
|
+
s = le(this.dom, t, this.parentElement)
|
|
1374
|
+
this.dom = _e(s, this.dom, this.parentElement)
|
|
1340
1375
|
}
|
|
1341
1376
|
subscribeForRerender() {
|
|
1342
1377
|
const { subscribe: t } = this.renderKit
|
|
@@ -1348,43 +1383,43 @@ class Be {
|
|
|
1348
1383
|
return `${_}:${t}`
|
|
1349
1384
|
}
|
|
1350
1385
|
}
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1386
|
+
const $e = (e) => e,
|
|
1387
|
+
De = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1353
1388
|
(s = s || []),
|
|
1354
|
-
(t = t ||
|
|
1389
|
+
(t = t || $e),
|
|
1355
1390
|
(r) =>
|
|
1356
|
-
new
|
|
1391
|
+
new ke({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1357
1392
|
),
|
|
1358
|
-
|
|
1393
|
+
Pe =
|
|
1359
1394
|
(e) =>
|
|
1360
1395
|
({ path: t }) =>
|
|
1361
1396
|
t === e,
|
|
1362
|
-
|
|
1363
|
-
|
|
1397
|
+
Be = () => !0,
|
|
1398
|
+
at =
|
|
1364
1399
|
(e) =>
|
|
1365
1400
|
({ route: t }) => {
|
|
1366
1401
|
const s = e.find((r) => r.match(t))
|
|
1367
1402
|
return s && s.Partial
|
|
1368
1403
|
},
|
|
1369
|
-
|
|
1404
|
+
Ce = /* @__PURE__ */ Object.freeze(
|
|
1370
1405
|
/* @__PURE__ */ Object.defineProperty(
|
|
1371
1406
|
{
|
|
1372
1407
|
__proto__: null,
|
|
1373
|
-
buildRouter:
|
|
1374
|
-
catchAll:
|
|
1375
|
-
exactPathMatch:
|
|
1408
|
+
buildRouter: at,
|
|
1409
|
+
catchAll: Be,
|
|
1410
|
+
exactPathMatch: Pe,
|
|
1376
1411
|
},
|
|
1377
1412
|
Symbol.toStringTag,
|
|
1378
1413
|
{ value: 'Module' },
|
|
1379
1414
|
),
|
|
1380
1415
|
),
|
|
1381
|
-
|
|
1416
|
+
Fe = () => ({
|
|
1382
1417
|
render: (e, t) => [],
|
|
1383
1418
|
}),
|
|
1384
1419
|
Qe = (e) => {
|
|
1385
|
-
const t =
|
|
1386
|
-
return
|
|
1387
|
-
Template: ({ route: r }) => (t({ route: r }) ||
|
|
1420
|
+
const t = at(e)
|
|
1421
|
+
return De({
|
|
1422
|
+
Template: ({ route: r }) => (t({ route: r }) || Fe)(),
|
|
1388
1423
|
subscriptions: ['route'],
|
|
1389
1424
|
})
|
|
1390
1425
|
},
|
|
@@ -1392,37 +1427,34 @@ const Ve = (e) => e,
|
|
|
1392
1427
|
/* @__PURE__ */ Object.defineProperty(
|
|
1393
1428
|
{
|
|
1394
1429
|
__proto__: null,
|
|
1395
|
-
createRouteState:
|
|
1396
|
-
events:
|
|
1397
|
-
extractQueryParams:
|
|
1398
|
-
findHref:
|
|
1430
|
+
createRouteState: R,
|
|
1431
|
+
events: Vt,
|
|
1432
|
+
extractQueryParams: I,
|
|
1433
|
+
findHref: U,
|
|
1399
1434
|
navigate: N,
|
|
1400
|
-
onLinkClick:
|
|
1401
|
-
onLocationChange:
|
|
1402
|
-
start:
|
|
1435
|
+
onLinkClick: q,
|
|
1436
|
+
onLocationChange: J,
|
|
1437
|
+
start: Lt,
|
|
1403
1438
|
},
|
|
1404
1439
|
Symbol.toStringTag,
|
|
1405
1440
|
{ value: 'Module' },
|
|
1406
1441
|
),
|
|
1407
|
-
)
|
|
1408
|
-
Xe = {
|
|
1409
|
-
RecordStore: mt,
|
|
1410
|
-
BooleanStore: lt,
|
|
1411
|
-
ListStore: dt,
|
|
1412
|
-
ArrayModifiers: at,
|
|
1413
|
-
}
|
|
1442
|
+
)
|
|
1414
1443
|
export {
|
|
1415
|
-
|
|
1444
|
+
Ve as ArrayModifiers,
|
|
1445
|
+
Le as BooleanStore,
|
|
1446
|
+
Ie as Equality,
|
|
1416
1447
|
Re as Is,
|
|
1417
|
-
|
|
1418
|
-
|
|
1448
|
+
He as JaxsTypes,
|
|
1449
|
+
ze as ListStore,
|
|
1450
|
+
Ke as RecordStore,
|
|
1419
1451
|
Ue as appBuilding,
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1452
|
+
De as bind,
|
|
1453
|
+
Ge as createApp,
|
|
1454
|
+
Pt as jsx,
|
|
1455
|
+
qe as messageBus,
|
|
1424
1456
|
We as navigation,
|
|
1425
1457
|
Qe as routedView,
|
|
1426
|
-
|
|
1427
|
-
|
|
1458
|
+
Ce as routing,
|
|
1459
|
+
Je as state,
|
|
1428
1460
|
}
|