jaxs 0.9.3 → 0.9.5
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 +43 -34
- package/dist/jaxs.js +372 -351
- package/dist/jaxs.umd.cjs +307 -304
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const
|
|
1
|
+
const M = (e, t) => {
|
|
2
2
|
for (let s = e.length - 1; s >= 0; s--) e[s] === t && e.splice(s, 1)
|
|
3
3
|
return e
|
|
4
4
|
},
|
|
5
|
-
|
|
5
|
+
k = (e, t) => {
|
|
6
6
|
for (let s = e.length - 1; s >= 0; s--) t(e[s]) && e.splice(s, 1)
|
|
7
7
|
return e
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
remove:
|
|
13
|
-
removeBy:
|
|
14
|
-
insertAt:
|
|
15
|
-
appendIfUnique:
|
|
9
|
+
$ = (e, t, s) => (e.splice(t, 0, s), e),
|
|
10
|
+
B = (e, t) => (e.includes(t) || e.push(t), e),
|
|
11
|
+
Le = {
|
|
12
|
+
remove: M,
|
|
13
|
+
removeBy: k,
|
|
14
|
+
insertAt: $,
|
|
15
|
+
appendIfUnique: B,
|
|
16
16
|
push: (e, t) => e.push(t),
|
|
17
17
|
// mutates
|
|
18
18
|
pop: (e) => e.pop(),
|
|
@@ -26,7 +26,7 @@ const O = (e, t) => {
|
|
|
26
26
|
includes: (e, t) => e.includes(t),
|
|
27
27
|
// reader
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class lt {
|
|
30
30
|
constructor(t) {
|
|
31
31
|
this.store = t
|
|
32
32
|
}
|
|
@@ -56,8 +56,8 @@ class ct {
|
|
|
56
56
|
return this.value === !1
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const f = (e) => new
|
|
60
|
-
|
|
59
|
+
const f = (e) => new lt(e),
|
|
60
|
+
ze = {
|
|
61
61
|
toggle: (e) => f(e).toggle(),
|
|
62
62
|
setTrue: (e) => f(e).setTrue(),
|
|
63
63
|
setFalse: (e) => f(e).setFalse(),
|
|
@@ -65,7 +65,7 @@ const f = (e) => new ct(e),
|
|
|
65
65
|
isTrue: (e) => f(e).isTrue(),
|
|
66
66
|
isFalse: (e) => f(e).isFalse(),
|
|
67
67
|
}
|
|
68
|
-
class
|
|
68
|
+
class ht {
|
|
69
69
|
constructor(t) {
|
|
70
70
|
this.store = t
|
|
71
71
|
}
|
|
@@ -102,14 +102,14 @@ class lt {
|
|
|
102
102
|
}
|
|
103
103
|
insertAt(t, s) {
|
|
104
104
|
const r = this.value
|
|
105
|
-
|
|
105
|
+
$(r, t, s), this.update(r)
|
|
106
106
|
}
|
|
107
107
|
remove(t) {
|
|
108
|
-
const s =
|
|
108
|
+
const s = M(this.value, t)
|
|
109
109
|
this.update(s)
|
|
110
110
|
}
|
|
111
111
|
removeBy(t) {
|
|
112
|
-
const s =
|
|
112
|
+
const s = k(this.value, t)
|
|
113
113
|
this.update(s)
|
|
114
114
|
}
|
|
115
115
|
includes(t) {
|
|
@@ -117,7 +117,7 @@ class lt {
|
|
|
117
117
|
}
|
|
118
118
|
appendIfUnique(t) {
|
|
119
119
|
const s = this.value
|
|
120
|
-
|
|
120
|
+
B(s, t), this.update(s)
|
|
121
121
|
}
|
|
122
122
|
findBy(t) {
|
|
123
123
|
return this.value.find(t)
|
|
@@ -128,8 +128,8 @@ class lt {
|
|
|
128
128
|
n !== -1 && ((r[n] = s), this.update(r))
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
const m = (e) => new
|
|
132
|
-
|
|
131
|
+
const m = (e) => new ht(e),
|
|
132
|
+
Ke = {
|
|
133
133
|
push: (e, t) => m(e).push(t),
|
|
134
134
|
pop: (e) => m(e).pop(),
|
|
135
135
|
unshift: (e, t) => m(e).unshift(t),
|
|
@@ -144,7 +144,7 @@ const m = (e) => new lt(e),
|
|
|
144
144
|
findBy: (e, t) => m(e).findBy(t),
|
|
145
145
|
replace: (e, t, s) => m(e).replace(t, s),
|
|
146
146
|
}
|
|
147
|
-
class
|
|
147
|
+
class pt {
|
|
148
148
|
constructor(t) {
|
|
149
149
|
this.store = t
|
|
150
150
|
}
|
|
@@ -183,8 +183,8 @@ class ht {
|
|
|
183
183
|
return !!this.value[t]
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
const b = (e) => new
|
|
187
|
-
|
|
186
|
+
const b = (e) => new pt(e),
|
|
187
|
+
Re = {
|
|
188
188
|
reset: (e) => b(e).reset(),
|
|
189
189
|
resetAttribute: (e, t) => b(e).resetAttribute(t),
|
|
190
190
|
updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
|
|
@@ -192,19 +192,19 @@ const b = (e) => new ht(e),
|
|
|
192
192
|
attributeTruthy: (e, t) => b(e).attributeTruthy(t),
|
|
193
193
|
},
|
|
194
194
|
dt = (e) => typeof e == 'boolean',
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
mt = (e) => typeof e == 'number',
|
|
196
|
+
D = (e) => typeof e == 'string',
|
|
197
197
|
v = (e) => Array.isArray(e),
|
|
198
198
|
g = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
199
|
-
|
|
199
|
+
Ue = {
|
|
200
200
|
boolean: dt,
|
|
201
|
-
number:
|
|
202
|
-
string:
|
|
201
|
+
number: mt,
|
|
202
|
+
string: D,
|
|
203
203
|
array: v,
|
|
204
204
|
object: g,
|
|
205
205
|
},
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
ft = (e, t) => t.createElement(e),
|
|
207
|
+
bt = (e, t) => {
|
|
208
208
|
for (const s in t) {
|
|
209
209
|
if (s === '__self') continue
|
|
210
210
|
const r = t[s].toString()
|
|
@@ -212,29 +212,29 @@ const b = (e) => new ht(e),
|
|
|
212
212
|
const n = e
|
|
213
213
|
n.value !== r && (n.value = r)
|
|
214
214
|
} else
|
|
215
|
-
|
|
215
|
+
D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
|
-
|
|
218
|
+
vt = (e, t, s) => {
|
|
219
219
|
const r = {}
|
|
220
220
|
for (const n in t) {
|
|
221
221
|
const i = t[n],
|
|
222
|
-
|
|
223
|
-
e.addEventListener(n,
|
|
222
|
+
o = (a) => s(i, a)
|
|
223
|
+
e.addEventListener(n, o),
|
|
224
224
|
(r[n] = {
|
|
225
225
|
domEvent: n,
|
|
226
226
|
busEvent: i,
|
|
227
|
-
listener:
|
|
227
|
+
listener: o,
|
|
228
228
|
})
|
|
229
229
|
}
|
|
230
230
|
e.eventMaps = r
|
|
231
231
|
},
|
|
232
|
-
|
|
233
|
-
const n =
|
|
234
|
-
return
|
|
232
|
+
yt = (e, t, s, r) => {
|
|
233
|
+
const n = ft(e, r.document)
|
|
234
|
+
return bt(n, t), vt(n, s, r.publish), n
|
|
235
235
|
},
|
|
236
236
|
w = 'http://www.w3.org/2000/svg',
|
|
237
|
-
|
|
237
|
+
gt = {
|
|
238
238
|
animate: !0,
|
|
239
239
|
animateMotion: !0,
|
|
240
240
|
animateTransform: !0,
|
|
@@ -298,8 +298,8 @@ const b = (e) => new ht(e),
|
|
|
298
298
|
use: !0,
|
|
299
299
|
view: !0,
|
|
300
300
|
},
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
Et = (e, t) => !!(gt[e] || (e === 'a' && t === w)),
|
|
302
|
+
At = (e, t, s) => {
|
|
303
303
|
const r = s.createElementNS(w, e)
|
|
304
304
|
for (const n in t)
|
|
305
305
|
n === '__self' ||
|
|
@@ -307,34 +307,34 @@ const b = (e) => new ht(e),
|
|
|
307
307
|
r.setAttributeNS(null, n, t[n].toString())
|
|
308
308
|
return r
|
|
309
309
|
},
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
class
|
|
310
|
+
xt = (e) => e.namespaceURI === w,
|
|
311
|
+
wt = (e, t) => t.createTextNode(e)
|
|
312
|
+
class Nt {
|
|
313
313
|
constructor(t) {
|
|
314
314
|
this.value = t.toString()
|
|
315
315
|
}
|
|
316
316
|
render(t) {
|
|
317
|
-
const s =
|
|
317
|
+
const s = wt(this.value, t.document)
|
|
318
318
|
return (s.__jsx = 'TextNode'), [s]
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
321
|
+
const _t = (e) => typeof e == 'string' || typeof e == 'number',
|
|
322
|
+
St = (e) => new Nt(e),
|
|
323
|
+
Tt = (e) => (_t(e) ? St(e) : e),
|
|
324
|
+
P = (e) => jt(e).map(Tt).flat(),
|
|
325
|
+
jt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
326
|
+
F = (e, t = {}) => P(e || t.children || []),
|
|
327
|
+
Ot = (e, t = '') => {
|
|
328
328
|
const s = {},
|
|
329
329
|
r = {}
|
|
330
330
|
for (const n in e) {
|
|
331
331
|
const i = e[n]
|
|
332
332
|
if (n.match(/^on.+/i)) {
|
|
333
|
-
const
|
|
334
|
-
r[
|
|
333
|
+
const o = n.slice(2).toLowerCase()
|
|
334
|
+
r[o] = i ? i.toString() : ''
|
|
335
335
|
} else {
|
|
336
336
|
if (i === !1) continue
|
|
337
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
337
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Mt(n, i, t))
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
return {
|
|
@@ -342,22 +342,22 @@ const Nt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
342
342
|
events: r,
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
Mt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
346
|
+
kt = (e, t) => {
|
|
347
347
|
const s = e || {},
|
|
348
|
-
r =
|
|
348
|
+
r = F(t, s)
|
|
349
349
|
return (s.children = s.children || r), s
|
|
350
350
|
},
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
V = (e, t, s, r = []) => e.reduce($t(t, s), r).flat(),
|
|
352
|
+
$t = (e, t) => (s, r) =>
|
|
353
353
|
r
|
|
354
354
|
? Array.isArray(r)
|
|
355
|
-
?
|
|
355
|
+
? V(r, e, t, s)
|
|
356
356
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
357
357
|
: s
|
|
358
|
-
class
|
|
358
|
+
class L {
|
|
359
359
|
constructor(t) {
|
|
360
|
-
this.collection =
|
|
360
|
+
this.collection = P(t)
|
|
361
361
|
}
|
|
362
362
|
render(t, s) {
|
|
363
363
|
this.parentElement = s
|
|
@@ -365,7 +365,7 @@ class V {
|
|
|
365
365
|
return this.attachToParent(r), r
|
|
366
366
|
}
|
|
367
367
|
generateDom(t) {
|
|
368
|
-
return
|
|
368
|
+
return V(this.collection, t, this.parentElement)
|
|
369
369
|
}
|
|
370
370
|
attachToParent(t) {
|
|
371
371
|
if (this.parentElement === void 0) return
|
|
@@ -373,7 +373,7 @@ class V {
|
|
|
373
373
|
t.forEach((r) => s.appendChild(r))
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
class
|
|
376
|
+
class Bt {
|
|
377
377
|
constructor(t, s) {
|
|
378
378
|
;(this.type = t), (this.attributes = s)
|
|
379
379
|
}
|
|
@@ -399,14 +399,14 @@ class $t {
|
|
|
399
399
|
return `${this.type}${t}${s}${r}`
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Dt {
|
|
403
403
|
constructor(t, s, r = []) {
|
|
404
404
|
this.type = t
|
|
405
|
-
const { events: n, attributes: i } =
|
|
405
|
+
const { events: n, attributes: i } = Ot(s)
|
|
406
406
|
;(this.events = n),
|
|
407
407
|
(this.attributes = i),
|
|
408
|
-
(this.isSvg =
|
|
409
|
-
(this.children = new
|
|
408
|
+
(this.isSvg = Et(this.type, this.attributes.xmlns)),
|
|
409
|
+
(this.children = new L(r))
|
|
410
410
|
}
|
|
411
411
|
render(t) {
|
|
412
412
|
const s = this.generateDom(t)
|
|
@@ -416,24 +416,24 @@ class Bt {
|
|
|
416
416
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
417
417
|
}
|
|
418
418
|
generateHtmlDom(t) {
|
|
419
|
-
const s =
|
|
419
|
+
const s = yt(this.type, this.attributes, this.events, t)
|
|
420
420
|
return (s.__jsx = this.jsxKey()), s
|
|
421
421
|
}
|
|
422
422
|
generateSvgDom(t) {
|
|
423
|
-
const s =
|
|
423
|
+
const s = At(this.type, this.attributes, t.document)
|
|
424
424
|
return (s.__jsx = this.jsxKey()), s
|
|
425
425
|
}
|
|
426
426
|
jsxKey() {
|
|
427
|
-
return new
|
|
427
|
+
return new Bt(this.type, this.attributes).generate()
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
const
|
|
431
|
-
typeof e == 'string' ? new
|
|
432
|
-
|
|
433
|
-
const s =
|
|
434
|
-
return new
|
|
430
|
+
const Pt = (e, t, ...s) =>
|
|
431
|
+
typeof e == 'string' ? new Dt(e, t, s) : e(kt(t, s))
|
|
432
|
+
Pt.fragment = (e, t) => {
|
|
433
|
+
const s = F(t, e)
|
|
434
|
+
return new L(s)
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class Ft {
|
|
437
437
|
constructor(t, s, r) {
|
|
438
438
|
;(this.template = t),
|
|
439
439
|
(this.selector = s),
|
|
@@ -458,49 +458,49 @@ class Pt {
|
|
|
458
458
|
return this.renderKit.document.querySelector(this.selector)
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
const r = new
|
|
461
|
+
const Vt = (e, t, s) => {
|
|
462
|
+
const r = new Ft(e, t, s)
|
|
463
463
|
return r.renderAndAttach(s), r
|
|
464
464
|
},
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
z = 'go-to-href',
|
|
466
|
+
K = 'go-to',
|
|
467
467
|
y = 'navigation:location-change',
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
R = 'navigation:route-change',
|
|
469
|
+
Lt = /* @__PURE__ */ Object.freeze(
|
|
470
470
|
/* @__PURE__ */ Object.defineProperty(
|
|
471
471
|
{
|
|
472
472
|
__proto__: null,
|
|
473
|
-
linkNavigationEvent:
|
|
473
|
+
linkNavigationEvent: z,
|
|
474
474
|
locationChangeEvent: y,
|
|
475
|
-
navigationEvent:
|
|
476
|
-
routeChangeEvent:
|
|
475
|
+
navigationEvent: K,
|
|
476
|
+
routeChangeEvent: R,
|
|
477
477
|
},
|
|
478
478
|
Symbol.toStringTag,
|
|
479
479
|
{ value: 'Module' },
|
|
480
480
|
),
|
|
481
481
|
),
|
|
482
|
-
|
|
482
|
+
U = (e) => {
|
|
483
483
|
e.create('route', {
|
|
484
484
|
host: '',
|
|
485
485
|
path: '',
|
|
486
486
|
query: {},
|
|
487
487
|
})
|
|
488
488
|
},
|
|
489
|
-
|
|
489
|
+
q = (e) => {
|
|
490
490
|
const t = e.closest('[href]')
|
|
491
491
|
return (t && t.getAttribute('href')) || ''
|
|
492
492
|
},
|
|
493
493
|
N = ({ payload: e, publish: t, window: s }) => {
|
|
494
494
|
s.history.pushState(null, '', e), t(y, null)
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
I = (e) => {
|
|
497
497
|
const t = e.payload
|
|
498
498
|
if (!t || !t.target) return
|
|
499
499
|
t.preventDefault()
|
|
500
|
-
const s =
|
|
500
|
+
const s = q(t.target)
|
|
501
501
|
N({ ...e, payload: s })
|
|
502
502
|
},
|
|
503
|
-
|
|
503
|
+
J = (e) =>
|
|
504
504
|
e
|
|
505
505
|
.replace(/^\?/, '')
|
|
506
506
|
.split('&')
|
|
@@ -509,86 +509,86 @@ const Ft = (e, t, s) => {
|
|
|
509
509
|
const r = s.split('=')
|
|
510
510
|
return (t[r[0]] = r[1]), t
|
|
511
511
|
}, {}),
|
|
512
|
-
|
|
512
|
+
H = (e) => {
|
|
513
513
|
const { state: t, publish: s, window: r } = e,
|
|
514
|
-
{ host: n, pathname: i, search:
|
|
515
|
-
|
|
516
|
-
u =
|
|
514
|
+
{ host: n, pathname: i, search: o } = r.location,
|
|
515
|
+
a = i,
|
|
516
|
+
u = J(o),
|
|
517
517
|
h = {
|
|
518
518
|
host: n,
|
|
519
|
-
path:
|
|
519
|
+
path: a,
|
|
520
520
|
query: u,
|
|
521
521
|
}
|
|
522
|
-
t.store('route').update(h), s(
|
|
522
|
+
t.store('route').update(h), s(R, h)
|
|
523
523
|
},
|
|
524
524
|
G = (e) => {
|
|
525
525
|
const { subscribe: t } = e
|
|
526
|
-
t(
|
|
527
|
-
t(
|
|
526
|
+
t(z, I),
|
|
527
|
+
t(K, (s) => {
|
|
528
528
|
N(s)
|
|
529
529
|
})
|
|
530
530
|
},
|
|
531
|
-
|
|
531
|
+
W = (e) => {
|
|
532
532
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
533
|
-
|
|
533
|
+
U(r), n.addEventListener('popstate', () => t(y, null)), s(y, H)
|
|
534
534
|
},
|
|
535
535
|
C = (e) => {
|
|
536
536
|
setTimeout(() => e.publish(y, null), 0)
|
|
537
537
|
},
|
|
538
538
|
Q = (e) => {
|
|
539
|
-
|
|
539
|
+
W(e), G(e), C(e)
|
|
540
540
|
},
|
|
541
|
-
|
|
541
|
+
zt = /* @__PURE__ */ Object.freeze(
|
|
542
542
|
/* @__PURE__ */ Object.defineProperty(
|
|
543
543
|
{
|
|
544
544
|
__proto__: null,
|
|
545
545
|
publishLocation: C,
|
|
546
546
|
startNavigation: Q,
|
|
547
|
-
subscribeToHistoryChange:
|
|
547
|
+
subscribeToHistoryChange: W,
|
|
548
548
|
subscribeToNavigation: G,
|
|
549
549
|
},
|
|
550
550
|
Symbol.toStringTag,
|
|
551
551
|
{ value: 'Module' },
|
|
552
552
|
),
|
|
553
553
|
)
|
|
554
|
-
class
|
|
554
|
+
class X {
|
|
555
555
|
constructor({
|
|
556
556
|
window: t,
|
|
557
557
|
document: s,
|
|
558
558
|
publish: r,
|
|
559
559
|
subscribe: n,
|
|
560
560
|
bus: i,
|
|
561
|
-
state:
|
|
562
|
-
renderKit:
|
|
561
|
+
state: o,
|
|
562
|
+
renderKit: a,
|
|
563
563
|
}) {
|
|
564
564
|
;(this.window = t),
|
|
565
565
|
(this.document = s),
|
|
566
566
|
(this.publish = r),
|
|
567
567
|
(this.subscribe = n),
|
|
568
568
|
(this.bus = i),
|
|
569
|
-
(this.state =
|
|
570
|
-
(this.renderKit =
|
|
569
|
+
(this.state = o),
|
|
570
|
+
(this.renderKit = a),
|
|
571
571
|
(this.roots = [])
|
|
572
572
|
}
|
|
573
573
|
render(t, s) {
|
|
574
|
-
const r =
|
|
574
|
+
const r = Vt(t, s, this.renderKit)
|
|
575
575
|
return this.roots.push(r), r
|
|
576
576
|
}
|
|
577
577
|
startNavigation() {
|
|
578
578
|
Q(this)
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const qe = /* @__PURE__ */ Object.freeze(
|
|
582
582
|
/* @__PURE__ */ Object.defineProperty(
|
|
583
583
|
{
|
|
584
584
|
__proto__: null,
|
|
585
|
-
App:
|
|
585
|
+
App: X,
|
|
586
586
|
},
|
|
587
587
|
Symbol.toStringTag,
|
|
588
588
|
{ value: 'Module' },
|
|
589
589
|
),
|
|
590
590
|
)
|
|
591
|
-
class
|
|
591
|
+
class Y {
|
|
592
592
|
constructor() {
|
|
593
593
|
this.lookup = {}
|
|
594
594
|
}
|
|
@@ -615,7 +615,7 @@ class X {
|
|
|
615
615
|
this.lookup[t] || (this.lookup[t] = [])
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
class
|
|
618
|
+
class Z {
|
|
619
619
|
constructor() {
|
|
620
620
|
this.lookup = []
|
|
621
621
|
}
|
|
@@ -634,7 +634,7 @@ class Y {
|
|
|
634
634
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
637
|
+
class _ {
|
|
638
638
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
639
639
|
;(this.setNewTimeout = () => {
|
|
640
640
|
this.stopped ||
|
|
@@ -671,26 +671,42 @@ class zt {
|
|
|
671
671
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
const Kt = (e) => {
|
|
675
|
-
const { offset:
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
674
|
+
const Kt = (e) => (t, s) => {
|
|
675
|
+
const { offset: r, period: n, payload: i } = s,
|
|
676
|
+
o = ({ callCount: u }) => (r && u == 0 ? r : n),
|
|
677
|
+
a = new _({
|
|
678
|
+
payload: i,
|
|
679
|
+
event: t,
|
|
680
|
+
publish: e,
|
|
681
|
+
timer: o,
|
|
682
|
+
})
|
|
683
|
+
return a.start(), a.stop
|
|
683
684
|
},
|
|
684
|
-
Rt =
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
685
|
+
Rt =
|
|
686
|
+
(e) =>
|
|
687
|
+
(t, { timeout: s, payload: r }) => {
|
|
688
|
+
const n = ({ callCount: o, stop: a }) => (o > 1 && a(), s),
|
|
689
|
+
i = new _({
|
|
690
|
+
publish: e,
|
|
691
|
+
event: t,
|
|
692
|
+
payload: r,
|
|
693
|
+
timer: n,
|
|
694
|
+
})
|
|
695
|
+
return i.start(), i.stop
|
|
696
|
+
},
|
|
697
|
+
Ut = (e) => (t, s) => {
|
|
698
|
+
const r = {
|
|
699
|
+
...s,
|
|
700
|
+
event: t,
|
|
701
|
+
publish: e,
|
|
702
|
+
},
|
|
703
|
+
n = new _(r)
|
|
704
|
+
return n.start(), n.stop
|
|
689
705
|
}
|
|
690
|
-
class
|
|
706
|
+
class tt {
|
|
691
707
|
constructor() {
|
|
692
|
-
;(this.exactSubscriptions = new
|
|
693
|
-
(this.fuzzySubscriptions = new
|
|
708
|
+
;(this.exactSubscriptions = new Y()),
|
|
709
|
+
(this.fuzzySubscriptions = new Z()),
|
|
694
710
|
(this.currentIndex = 0)
|
|
695
711
|
}
|
|
696
712
|
subscribe(t, s) {
|
|
@@ -725,49 +741,54 @@ class Z {
|
|
|
725
741
|
}
|
|
726
742
|
}
|
|
727
743
|
}
|
|
728
|
-
const
|
|
729
|
-
const e = new
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
744
|
+
const et = () => {
|
|
745
|
+
const e = new tt(),
|
|
746
|
+
t = (r, n) => e.publish(r, n)
|
|
747
|
+
return (
|
|
748
|
+
(t.withTimeout = Rt(t)),
|
|
749
|
+
(t.periodically = Kt(t)),
|
|
750
|
+
(t.periodicallyWithCustomTimer = Ut(t)),
|
|
751
|
+
{
|
|
752
|
+
bus: e,
|
|
753
|
+
publish: t,
|
|
754
|
+
subscribe: (r, n) => e.subscribe(r, n),
|
|
755
|
+
}
|
|
756
|
+
)
|
|
735
757
|
},
|
|
736
|
-
|
|
758
|
+
Ie = /* @__PURE__ */ Object.freeze(
|
|
737
759
|
/* @__PURE__ */ Object.defineProperty(
|
|
738
760
|
{
|
|
739
761
|
__proto__: null,
|
|
740
|
-
ExactSubscriptions:
|
|
741
|
-
FuzzySubscriptions:
|
|
742
|
-
JaxsBus:
|
|
743
|
-
createBus:
|
|
744
|
-
publishPeriodically: Rt,
|
|
762
|
+
ExactSubscriptions: Y,
|
|
763
|
+
FuzzySubscriptions: Z,
|
|
764
|
+
JaxsBus: tt,
|
|
765
|
+
createBus: et,
|
|
745
766
|
},
|
|
746
767
|
Symbol.toStringTag,
|
|
747
768
|
{ value: 'Module' },
|
|
748
769
|
),
|
|
749
770
|
),
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
!(g(e) && g(t)) || !
|
|
771
|
+
qt = (e, t) => e === t,
|
|
772
|
+
It = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
773
|
+
st = (e, t) =>
|
|
774
|
+
!(g(e) && g(t)) || !It(e, t)
|
|
754
775
|
? !1
|
|
755
776
|
: Object.keys(e).every((s) => {
|
|
756
777
|
const r = e[s],
|
|
757
778
|
n = t[s]
|
|
758
779
|
return E(r, n)
|
|
759
780
|
}),
|
|
760
|
-
|
|
781
|
+
rt = (e, t) =>
|
|
761
782
|
!(v(e) && v(t)) || e.length !== t.length
|
|
762
783
|
? !1
|
|
763
784
|
: e.every((s, r) => {
|
|
764
785
|
const n = t[r]
|
|
765
786
|
return E(s, n)
|
|
766
787
|
}),
|
|
767
|
-
E = (e, t) => (g(e) ?
|
|
768
|
-
|
|
769
|
-
objects:
|
|
770
|
-
arrays:
|
|
788
|
+
E = (e, t) => (g(e) ? st(e, t) : v(e) ? rt(e, t) : qt(e, t)),
|
|
789
|
+
Je = {
|
|
790
|
+
objects: st,
|
|
791
|
+
arrays: rt,
|
|
771
792
|
equal: E,
|
|
772
793
|
}
|
|
773
794
|
class x {
|
|
@@ -799,12 +820,12 @@ class x {
|
|
|
799
820
|
return t(this.value)
|
|
800
821
|
}
|
|
801
822
|
}
|
|
802
|
-
const
|
|
803
|
-
class
|
|
823
|
+
const S = 'state'
|
|
824
|
+
class nt {
|
|
804
825
|
constructor(t) {
|
|
805
826
|
;(this.publisher = t),
|
|
806
827
|
(this.stores = {}),
|
|
807
|
-
(this.eventNamePrefix =
|
|
828
|
+
(this.eventNamePrefix = S),
|
|
808
829
|
(this.notifications = /* @__PURE__ */ new Set()),
|
|
809
830
|
(this.inTransaction = !1)
|
|
810
831
|
}
|
|
@@ -860,21 +881,21 @@ class rt {
|
|
|
860
881
|
return `${this.eventNamePrefix}:${t}`
|
|
861
882
|
}
|
|
862
883
|
}
|
|
863
|
-
const
|
|
864
|
-
|
|
884
|
+
const it = (e) => new nt(e),
|
|
885
|
+
He = /* @__PURE__ */ Object.freeze(
|
|
865
886
|
/* @__PURE__ */ Object.defineProperty(
|
|
866
887
|
{
|
|
867
888
|
__proto__: null,
|
|
868
|
-
State:
|
|
889
|
+
State: nt,
|
|
869
890
|
Store: x,
|
|
870
|
-
createState:
|
|
871
|
-
eventName:
|
|
891
|
+
createState: it,
|
|
892
|
+
eventName: S,
|
|
872
893
|
},
|
|
873
894
|
Symbol.toStringTag,
|
|
874
895
|
{ value: 'Module' },
|
|
875
896
|
),
|
|
876
897
|
)
|
|
877
|
-
class
|
|
898
|
+
class Jt {
|
|
878
899
|
constructor(t) {
|
|
879
900
|
this.setupDomEnvironment(t)
|
|
880
901
|
}
|
|
@@ -884,7 +905,7 @@ class It {
|
|
|
884
905
|
this.setupState(),
|
|
885
906
|
this.addBusOptions(),
|
|
886
907
|
this.setRenderKit(),
|
|
887
|
-
new
|
|
908
|
+
new X({
|
|
888
909
|
window: this.window,
|
|
889
910
|
document: this.document,
|
|
890
911
|
publish: this.publish,
|
|
@@ -903,11 +924,11 @@ class It {
|
|
|
903
924
|
: ((this.window = window), (this.document = document))
|
|
904
925
|
}
|
|
905
926
|
setupBus() {
|
|
906
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
927
|
+
const { publish: t, subscribe: s, bus: r } = et()
|
|
907
928
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
908
929
|
}
|
|
909
930
|
setupState() {
|
|
910
|
-
this.state =
|
|
931
|
+
this.state = it(this.publish)
|
|
911
932
|
}
|
|
912
933
|
addBusOptions() {
|
|
913
934
|
this.bus.addListenerOptions({
|
|
@@ -927,10 +948,10 @@ class It {
|
|
|
927
948
|
}
|
|
928
949
|
}
|
|
929
950
|
const Ge = (e = {}) => {
|
|
930
|
-
const s = new
|
|
951
|
+
const s = new Jt(e).setup()
|
|
931
952
|
return s.startNavigation(), s
|
|
932
953
|
}
|
|
933
|
-
var
|
|
954
|
+
var c = /* @__PURE__ */ ((e) => (
|
|
934
955
|
(e[(e.removeNode = 0)] = 'removeNode'),
|
|
935
956
|
(e[(e.insertNode = 1)] = 'insertNode'),
|
|
936
957
|
(e[(e.replaceNode = 2)] = 'replaceNode'),
|
|
@@ -943,88 +964,88 @@ var o = /* @__PURE__ */ ((e) => (
|
|
|
943
964
|
(e[(e.changeValue = 9)] = 'changeValue'),
|
|
944
965
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
945
966
|
e
|
|
946
|
-
))(
|
|
947
|
-
const
|
|
967
|
+
))(c || {})
|
|
968
|
+
const We = /* @__PURE__ */ Object.freeze(
|
|
948
969
|
/* @__PURE__ */ Object.defineProperty(
|
|
949
970
|
{
|
|
950
971
|
__proto__: null,
|
|
951
|
-
ChangeInstructionTypes:
|
|
972
|
+
ChangeInstructionTypes: c,
|
|
952
973
|
},
|
|
953
974
|
Symbol.toStringTag,
|
|
954
975
|
{ value: 'Module' },
|
|
955
976
|
),
|
|
956
977
|
),
|
|
957
|
-
|
|
978
|
+
Ht = (e, t) => ({
|
|
958
979
|
source: e,
|
|
959
980
|
target: t,
|
|
960
|
-
type:
|
|
981
|
+
type: c.changeText,
|
|
961
982
|
data: {},
|
|
962
983
|
}),
|
|
963
984
|
Gt = (e, t) => ({
|
|
964
985
|
source: e,
|
|
965
986
|
target: t,
|
|
966
|
-
type:
|
|
987
|
+
type: c.replaceNode,
|
|
967
988
|
data: {},
|
|
968
989
|
}),
|
|
969
|
-
|
|
990
|
+
Wt = (e, t, s) => ({
|
|
970
991
|
source: e,
|
|
971
992
|
target: t,
|
|
972
993
|
data: s,
|
|
973
|
-
type:
|
|
994
|
+
type: c.removeAttribute,
|
|
974
995
|
}),
|
|
975
996
|
Ct = (e, t, s) => ({
|
|
976
997
|
source: e,
|
|
977
998
|
target: t,
|
|
978
999
|
data: s,
|
|
979
|
-
type:
|
|
1000
|
+
type: c.addAttribute,
|
|
980
1001
|
}),
|
|
981
1002
|
Qt = (e, t, s) => ({
|
|
982
1003
|
source: e,
|
|
983
1004
|
target: t,
|
|
984
1005
|
data: s,
|
|
985
|
-
type:
|
|
1006
|
+
type: c.updateAttribute,
|
|
986
1007
|
}),
|
|
987
|
-
|
|
1008
|
+
Xt = (e, t, s) => ({
|
|
988
1009
|
source: e,
|
|
989
1010
|
target: t,
|
|
990
1011
|
data: s,
|
|
991
|
-
type:
|
|
1012
|
+
type: c.removeEvent,
|
|
992
1013
|
}),
|
|
993
|
-
|
|
1014
|
+
Yt = (e, t, s) => ({
|
|
994
1015
|
source: e,
|
|
995
1016
|
target: t,
|
|
996
1017
|
data: s,
|
|
997
|
-
type:
|
|
1018
|
+
type: c.addEvent,
|
|
998
1019
|
}),
|
|
999
|
-
|
|
1020
|
+
Zt = (e, t, s) => ({
|
|
1000
1021
|
source: e,
|
|
1001
1022
|
target: t,
|
|
1002
1023
|
data: s,
|
|
1003
|
-
type:
|
|
1024
|
+
type: c.updateEvent,
|
|
1004
1025
|
}),
|
|
1005
|
-
|
|
1026
|
+
T = (e) => ({
|
|
1006
1027
|
source: e,
|
|
1007
1028
|
target: e,
|
|
1008
1029
|
// for type crap only
|
|
1009
|
-
type:
|
|
1030
|
+
type: c.removeNode,
|
|
1010
1031
|
data: {},
|
|
1011
1032
|
}),
|
|
1012
1033
|
A = (e, t) => ({
|
|
1013
1034
|
target: e,
|
|
1014
1035
|
source: e,
|
|
1015
1036
|
// for type crap only
|
|
1016
|
-
type:
|
|
1037
|
+
type: c.insertNode,
|
|
1017
1038
|
data: t,
|
|
1018
1039
|
}),
|
|
1019
|
-
|
|
1040
|
+
te = (e, t, s) => ({
|
|
1020
1041
|
source: e,
|
|
1021
1042
|
target: t,
|
|
1022
|
-
type:
|
|
1043
|
+
type: c.changeValue,
|
|
1023
1044
|
data: s,
|
|
1024
1045
|
}),
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
class
|
|
1046
|
+
ee = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
1047
|
+
j = { index: -1 }
|
|
1048
|
+
class se {
|
|
1028
1049
|
constructor() {
|
|
1029
1050
|
this.map = {}
|
|
1030
1051
|
}
|
|
@@ -1041,7 +1062,7 @@ class ee {
|
|
|
1041
1062
|
}
|
|
1042
1063
|
pullMatch(t) {
|
|
1043
1064
|
const s = t && t.__jsx
|
|
1044
|
-
return !s || !(this.map[s] && this.map[s].length) ?
|
|
1065
|
+
return !s || !(this.map[s] && this.map[s].length) ? j : this.map[s].shift()
|
|
1045
1066
|
}
|
|
1046
1067
|
clear(t) {
|
|
1047
1068
|
const s = t && t.__jsx
|
|
@@ -1057,52 +1078,52 @@ class ee {
|
|
|
1057
1078
|
return Object.values(this.map).flat()
|
|
1058
1079
|
}
|
|
1059
1080
|
}
|
|
1060
|
-
const
|
|
1061
|
-
const t = new
|
|
1081
|
+
const O = (e) => {
|
|
1082
|
+
const t = new se()
|
|
1062
1083
|
return t.populate(e), t
|
|
1063
1084
|
},
|
|
1064
|
-
|
|
1085
|
+
ot = (e, t, s = !1) => {
|
|
1065
1086
|
const r = [],
|
|
1066
1087
|
n = e.attributes,
|
|
1067
1088
|
i = n.length,
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
let u, h,
|
|
1089
|
+
o = t.attributes,
|
|
1090
|
+
a = o.length
|
|
1091
|
+
let u, h, p
|
|
1071
1092
|
for (u = 0; u < i; u++) {
|
|
1072
|
-
|
|
1093
|
+
p = null
|
|
1073
1094
|
const l = n.item(u)
|
|
1074
1095
|
if (l) {
|
|
1075
|
-
for (h = 0; h <
|
|
1076
|
-
const
|
|
1077
|
-
if (
|
|
1078
|
-
|
|
1096
|
+
for (h = 0; h < a; h++) {
|
|
1097
|
+
const d = o.item(h)
|
|
1098
|
+
if (d && l.name == d.name) {
|
|
1099
|
+
p = d
|
|
1079
1100
|
break
|
|
1080
1101
|
}
|
|
1081
1102
|
}
|
|
1082
|
-
|
|
1083
|
-
? l.value !==
|
|
1103
|
+
p
|
|
1104
|
+
? l.value !== p.value &&
|
|
1084
1105
|
r.push(
|
|
1085
1106
|
Qt(e, t, {
|
|
1086
1107
|
name: l.name,
|
|
1087
|
-
value:
|
|
1108
|
+
value: p.value,
|
|
1088
1109
|
isSvg: s,
|
|
1089
1110
|
}),
|
|
1090
1111
|
)
|
|
1091
|
-
: r.push(
|
|
1112
|
+
: r.push(Wt(e, t, { name: l.name, isSvg: s }))
|
|
1092
1113
|
}
|
|
1093
1114
|
}
|
|
1094
|
-
for (u = 0; u <
|
|
1095
|
-
|
|
1096
|
-
const l =
|
|
1115
|
+
for (u = 0; u < a; u++) {
|
|
1116
|
+
p = null
|
|
1117
|
+
const l = o.item(u)
|
|
1097
1118
|
if (l) {
|
|
1098
1119
|
for (h = 0; h < i; h++) {
|
|
1099
|
-
const
|
|
1100
|
-
if (
|
|
1101
|
-
|
|
1120
|
+
const d = n.item(h)
|
|
1121
|
+
if (d && d.name == l.name) {
|
|
1122
|
+
p = d
|
|
1102
1123
|
break
|
|
1103
1124
|
}
|
|
1104
1125
|
}
|
|
1105
|
-
|
|
1126
|
+
p ||
|
|
1106
1127
|
r.push(
|
|
1107
1128
|
Ct(e, t, {
|
|
1108
1129
|
name: l.name,
|
|
@@ -1114,38 +1135,38 @@ const j = (e) => {
|
|
|
1114
1135
|
}
|
|
1115
1136
|
return r
|
|
1116
1137
|
},
|
|
1117
|
-
|
|
1138
|
+
re = (e, t) => {
|
|
1118
1139
|
const s = [],
|
|
1119
1140
|
r = e.eventMaps,
|
|
1120
1141
|
n = t.eventMaps,
|
|
1121
1142
|
i = Object.keys(r),
|
|
1122
|
-
|
|
1143
|
+
o = Object.keys(n)
|
|
1123
1144
|
return (
|
|
1124
|
-
i.forEach((
|
|
1125
|
-
const u = r[
|
|
1126
|
-
h = n[
|
|
1145
|
+
i.forEach((a) => {
|
|
1146
|
+
const u = r[a],
|
|
1147
|
+
h = n[a]
|
|
1127
1148
|
h
|
|
1128
1149
|
? h.busEvent !== u.busEvent &&
|
|
1129
1150
|
s.push(
|
|
1130
|
-
|
|
1131
|
-
name:
|
|
1151
|
+
Zt(e, t, {
|
|
1152
|
+
name: a,
|
|
1132
1153
|
targetValue: h.listener,
|
|
1133
1154
|
sourceValue: u.listener,
|
|
1134
1155
|
}),
|
|
1135
1156
|
)
|
|
1136
1157
|
: s.push(
|
|
1137
|
-
|
|
1158
|
+
Xt(e, t, {
|
|
1138
1159
|
name: u.domEvent,
|
|
1139
1160
|
value: u.listener,
|
|
1140
1161
|
}),
|
|
1141
1162
|
)
|
|
1142
1163
|
}),
|
|
1143
|
-
|
|
1144
|
-
const u = r[
|
|
1145
|
-
h = n[
|
|
1164
|
+
o.forEach((a) => {
|
|
1165
|
+
const u = r[a],
|
|
1166
|
+
h = n[a]
|
|
1146
1167
|
u ||
|
|
1147
1168
|
s.push(
|
|
1148
|
-
|
|
1169
|
+
Yt(e, t, {
|
|
1149
1170
|
name: h.domEvent,
|
|
1150
1171
|
value: h.listener,
|
|
1151
1172
|
}),
|
|
@@ -1154,87 +1175,87 @@ const j = (e) => {
|
|
|
1154
1175
|
s
|
|
1155
1176
|
)
|
|
1156
1177
|
},
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
if (
|
|
1178
|
+
ne = (e) => e.tagName !== 'INPUT',
|
|
1179
|
+
ie = (e, t) => e.value === t.value,
|
|
1180
|
+
oe = (e, t) => {
|
|
1181
|
+
if (ne(e) || ie(e, t)) return []
|
|
1161
1182
|
const s = e,
|
|
1162
1183
|
r = t
|
|
1163
|
-
return [
|
|
1184
|
+
return [te(s, r, { name: 'value', value: r.value })]
|
|
1164
1185
|
},
|
|
1165
|
-
|
|
1166
|
-
const s =
|
|
1167
|
-
r =
|
|
1168
|
-
n =
|
|
1186
|
+
ue = (e, t) => {
|
|
1187
|
+
const s = ot(e, t),
|
|
1188
|
+
r = re(e, t),
|
|
1189
|
+
n = oe(e, t)
|
|
1169
1190
|
return s.concat(r).concat(n)
|
|
1170
1191
|
},
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1192
|
+
ae = (e, t) => ot(e, t, !0),
|
|
1193
|
+
ce = (e, t) => (e.textContent !== t.textContent ? [Ht(e, t)] : []),
|
|
1194
|
+
le = (e, t, s) => {
|
|
1174
1195
|
let r = []
|
|
1175
|
-
if (e.nodeType === 1 &&
|
|
1196
|
+
if (e.nodeType === 1 && xt(e)) {
|
|
1176
1197
|
const n = e,
|
|
1177
1198
|
i = t,
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
r =
|
|
1199
|
+
o = ae(n, i),
|
|
1200
|
+
a = s(n.childNodes, i.childNodes, n)
|
|
1201
|
+
r = o.concat(a)
|
|
1181
1202
|
} else if (e.nodeType === 1) {
|
|
1182
1203
|
const n = e,
|
|
1183
1204
|
i = t,
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
r =
|
|
1187
|
-
} else e.nodeType === 3 && (r =
|
|
1205
|
+
o = ue(n, i),
|
|
1206
|
+
a = s(n.childNodes, i.childNodes, n)
|
|
1207
|
+
r = o.concat(a)
|
|
1208
|
+
} else e.nodeType === 3 && (r = ce(e, t))
|
|
1188
1209
|
return r
|
|
1189
1210
|
},
|
|
1190
|
-
|
|
1211
|
+
ut = (e, t, s) => {
|
|
1191
1212
|
const r = [],
|
|
1192
|
-
n =
|
|
1193
|
-
i =
|
|
1194
|
-
|
|
1195
|
-
|
|
1213
|
+
n = he(e, t),
|
|
1214
|
+
i = O(e),
|
|
1215
|
+
o = O(t),
|
|
1216
|
+
a = []
|
|
1196
1217
|
let u = 0
|
|
1197
1218
|
for (; u < n; u++) {
|
|
1198
|
-
const
|
|
1219
|
+
const p = e[u],
|
|
1199
1220
|
l = t[u]
|
|
1200
|
-
if (l &&
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
? (
|
|
1221
|
+
if (l && o.check(l)) {
|
|
1222
|
+
const d = i.pullMatch(l)
|
|
1223
|
+
o.clear(l),
|
|
1224
|
+
d.element
|
|
1225
|
+
? (d.index !== u &&
|
|
1205
1226
|
r.push(
|
|
1206
|
-
A(
|
|
1227
|
+
A(d.element, {
|
|
1207
1228
|
parent: s,
|
|
1208
1229
|
index: u,
|
|
1209
1230
|
}),
|
|
1210
1231
|
),
|
|
1211
|
-
|
|
1212
|
-
source:
|
|
1232
|
+
a.push({
|
|
1233
|
+
source: d.element,
|
|
1213
1234
|
target: l,
|
|
1214
1235
|
}))
|
|
1215
|
-
:
|
|
1216
|
-
?
|
|
1236
|
+
: p
|
|
1237
|
+
? o.check(p)
|
|
1217
1238
|
? r.push(A(l, { parent: s, index: u }))
|
|
1218
|
-
: (i.clear(
|
|
1239
|
+
: (i.clear(p), r.push(Gt(p, l)))
|
|
1219
1240
|
: r.push(A(l, { parent: s, index: u }))
|
|
1220
|
-
} else
|
|
1241
|
+
} else p && i.pullMatch(p).element && r.push(T(p))
|
|
1221
1242
|
}
|
|
1222
|
-
i.remaining().forEach(({ element:
|
|
1223
|
-
r.push(
|
|
1243
|
+
i.remaining().forEach(({ element: p }) => {
|
|
1244
|
+
r.push(T(p))
|
|
1224
1245
|
})
|
|
1225
|
-
const h =
|
|
1226
|
-
(
|
|
1246
|
+
const h = a.reduce(
|
|
1247
|
+
(p, { source: l, target: d }) => p.concat(le(l, d, ut)),
|
|
1227
1248
|
[],
|
|
1228
1249
|
)
|
|
1229
|
-
return r.concat(h).sort(
|
|
1250
|
+
return r.concat(h).sort(ee)
|
|
1230
1251
|
},
|
|
1231
|
-
|
|
1252
|
+
he = (e, t) => {
|
|
1232
1253
|
const s = e.length,
|
|
1233
1254
|
r = t.length
|
|
1234
1255
|
return s > r ? s : r
|
|
1235
1256
|
},
|
|
1236
|
-
|
|
1237
|
-
const r =
|
|
1257
|
+
pe = (e, t, s) => {
|
|
1258
|
+
const r = ut(e, t, s)
|
|
1238
1259
|
return (
|
|
1239
1260
|
r.forEach((n) => {
|
|
1240
1261
|
de(n)
|
|
@@ -1243,112 +1264,112 @@ const j = (e) => {
|
|
|
1243
1264
|
)
|
|
1244
1265
|
},
|
|
1245
1266
|
de = (e) => {
|
|
1246
|
-
;(
|
|
1267
|
+
;(_e[e.type] || me)(e)
|
|
1247
1268
|
},
|
|
1248
|
-
|
|
1249
|
-
|
|
1269
|
+
me = (e) => {},
|
|
1270
|
+
fe = (e) => {
|
|
1250
1271
|
const { source: t, target: s } = e
|
|
1251
1272
|
t.nodeValue = s.textContent
|
|
1252
1273
|
},
|
|
1253
|
-
|
|
1274
|
+
be = (e) => {
|
|
1254
1275
|
const { source: t } = e
|
|
1255
1276
|
t.remove()
|
|
1256
1277
|
},
|
|
1257
|
-
|
|
1278
|
+
ve = (e) => {
|
|
1258
1279
|
const { target: t, data: s } = e,
|
|
1259
1280
|
{ parent: r, index: n } = s,
|
|
1260
1281
|
i = r.childNodes[n]
|
|
1261
1282
|
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1262
1283
|
},
|
|
1263
|
-
|
|
1284
|
+
ye = (e) => {
|
|
1264
1285
|
const { source: t, target: s } = e
|
|
1265
1286
|
t.replaceWith(s)
|
|
1266
1287
|
},
|
|
1267
|
-
|
|
1288
|
+
ge = (e) => {
|
|
1268
1289
|
const { source: t, data: s } = e,
|
|
1269
1290
|
{ name: r, isSvg: n } = s
|
|
1270
1291
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1271
1292
|
},
|
|
1272
|
-
|
|
1293
|
+
at = (e) => {
|
|
1273
1294
|
const { source: t, data: s } = e,
|
|
1274
1295
|
{ name: r, value: n, isSvg: i } = s
|
|
1275
1296
|
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1276
1297
|
},
|
|
1277
|
-
ge = (e) => {
|
|
1278
|
-
ut(e)
|
|
1279
|
-
},
|
|
1280
1298
|
Ee = (e) => {
|
|
1299
|
+
at(e)
|
|
1300
|
+
},
|
|
1301
|
+
Ae = (e) => {
|
|
1281
1302
|
const t = e.data,
|
|
1282
1303
|
s = e.source,
|
|
1283
1304
|
{ name: r, value: n } = t
|
|
1284
1305
|
s.removeEventListener(r, n)
|
|
1285
1306
|
},
|
|
1286
|
-
|
|
1307
|
+
xe = (e) => {
|
|
1287
1308
|
const t = e.data,
|
|
1288
1309
|
s = e.source,
|
|
1289
1310
|
{ name: r, value: n } = t
|
|
1290
1311
|
s.addEventListener(r, n)
|
|
1291
1312
|
},
|
|
1292
|
-
|
|
1313
|
+
we = (e) => {
|
|
1293
1314
|
const t = e.data,
|
|
1294
1315
|
s = e.source,
|
|
1295
1316
|
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1296
1317
|
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1297
1318
|
},
|
|
1298
|
-
|
|
1319
|
+
Ne = (e) => {
|
|
1299
1320
|
const t = e.data,
|
|
1300
1321
|
s = e.source,
|
|
1301
1322
|
{ value: r } = t
|
|
1302
1323
|
s.value = r
|
|
1303
1324
|
},
|
|
1304
|
-
|
|
1305
|
-
[
|
|
1306
|
-
[
|
|
1307
|
-
[
|
|
1308
|
-
[
|
|
1309
|
-
[
|
|
1310
|
-
[
|
|
1311
|
-
[
|
|
1312
|
-
[
|
|
1313
|
-
[
|
|
1314
|
-
[
|
|
1315
|
-
[
|
|
1325
|
+
_e = {
|
|
1326
|
+
[c.changeText]: fe,
|
|
1327
|
+
[c.removeNode]: be,
|
|
1328
|
+
[c.insertNode]: ve,
|
|
1329
|
+
[c.replaceNode]: ye,
|
|
1330
|
+
[c.removeAttribute]: ge,
|
|
1331
|
+
[c.addAttribute]: at,
|
|
1332
|
+
[c.updateAttribute]: Ee,
|
|
1333
|
+
[c.removeEvent]: Ae,
|
|
1334
|
+
[c.addEvent]: xe,
|
|
1335
|
+
[c.updateEvent]: we,
|
|
1336
|
+
[c.changeValue]: Ne,
|
|
1316
1337
|
},
|
|
1317
|
-
|
|
1338
|
+
Se = (e, t, s) => {
|
|
1318
1339
|
const r = [...t]
|
|
1319
1340
|
return (
|
|
1320
1341
|
e.forEach((n) => {
|
|
1321
|
-
|
|
1342
|
+
Te(n, r, s)
|
|
1322
1343
|
}),
|
|
1323
1344
|
r
|
|
1324
1345
|
)
|
|
1325
1346
|
},
|
|
1326
|
-
|
|
1327
|
-
const r =
|
|
1347
|
+
Te = (e, t, s) => {
|
|
1348
|
+
const r = ke[e.type]
|
|
1328
1349
|
r && r(e, t, s)
|
|
1329
1350
|
},
|
|
1330
|
-
|
|
1351
|
+
je = (e, t) => {
|
|
1331
1352
|
const { source: s } = e,
|
|
1332
1353
|
r = t.indexOf(s)
|
|
1333
1354
|
r >= 0 && t.splice(r, 1)
|
|
1334
1355
|
},
|
|
1335
|
-
|
|
1356
|
+
Oe = (e, t, s) => {
|
|
1336
1357
|
const { target: r } = e,
|
|
1337
1358
|
n = e.data,
|
|
1338
|
-
{ index: i, parent:
|
|
1339
|
-
s ===
|
|
1359
|
+
{ index: i, parent: o } = n
|
|
1360
|
+
s === o && t.splice(i, 0, r)
|
|
1340
1361
|
},
|
|
1341
|
-
|
|
1362
|
+
Me = (e, t) => {
|
|
1342
1363
|
const { target: s, source: r } = e,
|
|
1343
1364
|
n = t.indexOf(r)
|
|
1344
1365
|
n >= 0 && (t[n] = s)
|
|
1345
1366
|
},
|
|
1346
|
-
|
|
1347
|
-
[
|
|
1348
|
-
[
|
|
1349
|
-
[
|
|
1367
|
+
ke = {
|
|
1368
|
+
[c.removeNode]: je,
|
|
1369
|
+
[c.insertNode]: Oe,
|
|
1370
|
+
[c.replaceNode]: Me,
|
|
1350
1371
|
}
|
|
1351
|
-
class
|
|
1372
|
+
class $e {
|
|
1352
1373
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1353
1374
|
;(this.Template = t),
|
|
1354
1375
|
(this.viewModel = n),
|
|
@@ -1380,8 +1401,8 @@ class ke {
|
|
|
1380
1401
|
this.parentElement = r
|
|
1381
1402
|
}
|
|
1382
1403
|
const t = this.generateDom(this.renderKit),
|
|
1383
|
-
s =
|
|
1384
|
-
this.dom =
|
|
1404
|
+
s = pe(this.dom, t, this.parentElement)
|
|
1405
|
+
this.dom = Se(s, this.dom, this.parentElement)
|
|
1385
1406
|
}
|
|
1386
1407
|
subscribeForRerender() {
|
|
1387
1408
|
const { subscribe: t } = this.renderKit
|
|
@@ -1390,22 +1411,22 @@ class ke {
|
|
|
1390
1411
|
})
|
|
1391
1412
|
}
|
|
1392
1413
|
eventName(t) {
|
|
1393
|
-
return `${
|
|
1414
|
+
return `${S}:${t}`
|
|
1394
1415
|
}
|
|
1395
1416
|
}
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1417
|
+
const Be = (e) => e,
|
|
1418
|
+
De = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1398
1419
|
(s = s || []),
|
|
1399
|
-
(t = t ||
|
|
1420
|
+
(t = t || Be),
|
|
1400
1421
|
(r) =>
|
|
1401
|
-
new
|
|
1422
|
+
new $e({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1402
1423
|
),
|
|
1403
|
-
|
|
1424
|
+
Pe =
|
|
1404
1425
|
(e) =>
|
|
1405
1426
|
({ path: t }) =>
|
|
1406
1427
|
t === e,
|
|
1407
|
-
|
|
1408
|
-
|
|
1428
|
+
Fe = () => !0,
|
|
1429
|
+
ct =
|
|
1409
1430
|
(e) =>
|
|
1410
1431
|
({ route: t }) => {
|
|
1411
1432
|
const s = e.find((r) => r.match(t))
|
|
@@ -1415,56 +1436,56 @@ const $e = (e) => e,
|
|
|
1415
1436
|
/* @__PURE__ */ Object.defineProperty(
|
|
1416
1437
|
{
|
|
1417
1438
|
__proto__: null,
|
|
1418
|
-
buildRouter:
|
|
1419
|
-
catchAll:
|
|
1420
|
-
exactPathMatch:
|
|
1439
|
+
buildRouter: ct,
|
|
1440
|
+
catchAll: Fe,
|
|
1441
|
+
exactPathMatch: Pe,
|
|
1421
1442
|
},
|
|
1422
1443
|
Symbol.toStringTag,
|
|
1423
1444
|
{ value: 'Module' },
|
|
1424
1445
|
),
|
|
1425
1446
|
),
|
|
1426
|
-
|
|
1447
|
+
Ve = () => ({
|
|
1427
1448
|
render: (e, t) => [],
|
|
1428
1449
|
}),
|
|
1429
1450
|
Qe = (e) => {
|
|
1430
|
-
const t =
|
|
1431
|
-
return
|
|
1432
|
-
Template: ({ route: r }) => (t({ route: r }) ||
|
|
1451
|
+
const t = ct(e)
|
|
1452
|
+
return De({
|
|
1453
|
+
Template: ({ route: r }) => (t({ route: r }) || Ve)(),
|
|
1433
1454
|
subscriptions: ['route'],
|
|
1434
1455
|
})
|
|
1435
1456
|
},
|
|
1436
|
-
|
|
1457
|
+
Xe = /* @__PURE__ */ Object.freeze(
|
|
1437
1458
|
/* @__PURE__ */ Object.defineProperty(
|
|
1438
1459
|
{
|
|
1439
1460
|
__proto__: null,
|
|
1440
|
-
createRouteState:
|
|
1441
|
-
events:
|
|
1442
|
-
extractQueryParams:
|
|
1443
|
-
findHref:
|
|
1461
|
+
createRouteState: U,
|
|
1462
|
+
events: Lt,
|
|
1463
|
+
extractQueryParams: J,
|
|
1464
|
+
findHref: q,
|
|
1444
1465
|
navigate: N,
|
|
1445
|
-
onLinkClick:
|
|
1446
|
-
onLocationChange:
|
|
1447
|
-
start:
|
|
1466
|
+
onLinkClick: I,
|
|
1467
|
+
onLocationChange: H,
|
|
1468
|
+
start: zt,
|
|
1448
1469
|
},
|
|
1449
1470
|
Symbol.toStringTag,
|
|
1450
1471
|
{ value: 'Module' },
|
|
1451
1472
|
),
|
|
1452
1473
|
)
|
|
1453
1474
|
export {
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1475
|
+
Le as ArrayModifiers,
|
|
1476
|
+
ze as BooleanStore,
|
|
1477
|
+
Je as Equality,
|
|
1478
|
+
Ue as Is,
|
|
1479
|
+
We as JaxsTypes,
|
|
1480
|
+
Ke as ListStore,
|
|
1481
|
+
Re as RecordStore,
|
|
1482
|
+
qe as appBuilding,
|
|
1483
|
+
De as bind,
|
|
1463
1484
|
Ge as createApp,
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1485
|
+
Pt as jsx,
|
|
1486
|
+
Ie as messageBus,
|
|
1487
|
+
Xe as navigation,
|
|
1467
1488
|
Qe as routedView,
|
|
1468
1489
|
Ce as routing,
|
|
1469
|
-
|
|
1490
|
+
He as state,
|
|
1470
1491
|
}
|