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