jaxs 0.7.2 → 0.7.3

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,15 +1,19 @@
1
- const Z = (e, t) => t.createElement(e),
2
- tt = (e, t) => {
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) => {
3
6
  for (const s in t) {
4
7
  if (s === '__self') continue
5
8
  const r = t[s].toString()
6
9
  if (s === 'value') {
7
10
  const n = e
8
11
  n.value !== r && (n.value = r)
9
- } else e.setAttribute(s, r)
12
+ } else
13
+ tt(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
10
14
  }
11
15
  },
12
- et = (e, t, s) => {
16
+ rt = (e, t, s) => {
13
17
  const r = {}
14
18
  for (const n in t) {
15
19
  const i = t[n],
@@ -23,12 +27,12 @@ const Z = (e, t) => t.createElement(e),
23
27
  }
24
28
  e.eventMaps = r
25
29
  },
26
- st = (e, t, s, r) => {
27
- const n = Z(e, r.document)
28
- return tt(n, t), et(n, s, r.publish), n
30
+ nt = (e, t, s, r) => {
31
+ const n = et(e, r.document)
32
+ return st(n, t), rt(n, s, r.publish), n
29
33
  },
30
34
  y = 'http://www.w3.org/2000/svg',
31
- rt = {
35
+ it = {
32
36
  animate: !0,
33
37
  animateMotion: !0,
34
38
  animateTransform: !0,
@@ -92,8 +96,8 @@ const Z = (e, t) => t.createElement(e),
92
96
  use: !0,
93
97
  view: !0,
94
98
  },
95
- nt = (e, t) => !!(rt[e] || (e === 'a' && t === y)),
96
- it = (e, t, s) => {
99
+ ot = (e, t) => !!(it[e] || (e === 'a' && t === y)),
100
+ ut = (e, t, s) => {
97
101
  const r = s.createElementNS(y, e)
98
102
  for (const n in t)
99
103
  n === '__self' ||
@@ -101,24 +105,24 @@ const Z = (e, t) => t.createElement(e),
101
105
  r.setAttributeNS(null, n, t[n].toString())
102
106
  return r
103
107
  },
104
- ot = (e) => e.namespaceURI === y,
105
- ut = (e, t) => t.createTextNode(e)
106
- class at {
108
+ at = (e) => e.namespaceURI === y,
109
+ ct = (e, t) => t.createTextNode(e)
110
+ class lt {
107
111
  constructor(t) {
108
112
  this.value = t.toString()
109
113
  }
110
114
  render(t) {
111
- const s = ut(this.value, t.document)
115
+ const s = ct(this.value, t.document)
112
116
  return (s.__jsx = 'TextNode'), [s]
113
117
  }
114
118
  }
115
- const ct = (e) => typeof e == 'string' || typeof e == 'number',
116
- lt = (e) => new at(e),
117
- ht = (e) => (ct(e) ? lt(e) : e),
118
- dt = (e) => pt(e).map(ht).flat(),
119
- pt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
120
- T = (e, t = {}) => e || t.children || [],
121
- mt = (e, t = '') => {
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 = '') => {
122
126
  const s = {},
123
127
  r = {}
124
128
  for (const n in e) {
@@ -128,7 +132,7 @@ const ct = (e) => typeof e == 'string' || typeof e == 'number',
128
132
  r[a] = i ? i.toString() : ''
129
133
  } else {
130
134
  if (i === !1) continue
131
- n === '__source' ? (s.__source = e.__source) : (s[n] = ft(n, i, t))
135
+ n === '__source' ? (s.__source = e.__source) : (s[n] = bt(n, i, t))
132
136
  }
133
137
  }
134
138
  return {
@@ -136,22 +140,22 @@ const ct = (e) => typeof e == 'string' || typeof e == 'number',
136
140
  events: r,
137
141
  }
138
142
  },
139
- ft = (e, t, s = '') => (t == null ? s : t.toString()),
140
- bt = (e, t) => {
143
+ bt = (e, t, s = '') => (t == null ? s : t.toString()),
144
+ vt = (e, t) => {
141
145
  const s = e || {},
142
- r = T(t, s)
146
+ r = j(t, s)
143
147
  return (s.children = s.children || r), s
144
148
  },
145
- j = (e, t, s, r = []) => e.reduce(vt(t, s), r).flat(),
146
- vt = (e, t) => (s, r) =>
149
+ O = (e, t, s, r = []) => e.reduce(gt(t, s), r).flat(),
150
+ gt = (e, t) => (s, r) =>
147
151
  r
148
152
  ? Array.isArray(r)
149
- ? j(r, e, t, s)
153
+ ? O(r, e, t, s)
150
154
  : (r.render(e, t).forEach((n) => s.push(n)), s)
151
155
  : s
152
- class O {
156
+ class M {
153
157
  constructor(t) {
154
- this.collection = dt(t)
158
+ this.collection = T(t)
155
159
  }
156
160
  render(t, s) {
157
161
  this.parentElement = s
@@ -159,7 +163,7 @@ class O {
159
163
  return this.attachToParent(r), r
160
164
  }
161
165
  generateDom(t) {
162
- return j(this.collection, t, this.parentElement)
166
+ return O(this.collection, t, this.parentElement)
163
167
  }
164
168
  attachToParent(t) {
165
169
  if (this.parentElement === void 0) return
@@ -167,7 +171,7 @@ class O {
167
171
  t.forEach((r) => s.appendChild(r))
168
172
  }
169
173
  }
170
- class gt {
174
+ class yt {
171
175
  constructor(t, s) {
172
176
  ;(this.type = t), (this.attributes = s)
173
177
  }
@@ -193,14 +197,14 @@ class gt {
193
197
  return `${this.type}${t}${s}${r}`
194
198
  }
195
199
  }
196
- class yt {
200
+ class Et {
197
201
  constructor(t, s, r = []) {
198
202
  this.type = t
199
- const { events: n, attributes: i } = mt(s)
203
+ const { events: n, attributes: i } = ft(s)
200
204
  ;(this.events = n),
201
205
  (this.attributes = i),
202
- (this.isSvg = nt(this.type, this.attributes.xmlns)),
203
- (this.children = new O(r))
206
+ (this.isSvg = ot(this.type, this.attributes.xmlns)),
207
+ (this.children = new M(r))
204
208
  }
205
209
  render(t) {
206
210
  const s = this.generateDom(t)
@@ -210,24 +214,24 @@ class yt {
210
214
  return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
211
215
  }
212
216
  generateHtmlDom(t) {
213
- const s = st(this.type, this.attributes, this.events, t)
217
+ const s = nt(this.type, this.attributes, this.events, t)
214
218
  return (s.__jsx = this.jsxKey()), s
215
219
  }
216
220
  generateSvgDom(t) {
217
- const s = it(this.type, this.attributes, t.document)
221
+ const s = ut(this.type, this.attributes, t.document)
218
222
  return (s.__jsx = this.jsxKey()), s
219
223
  }
220
224
  jsxKey() {
221
- return new gt(this.type, this.attributes).generate()
225
+ return new yt(this.type, this.attributes).generate()
222
226
  }
223
227
  }
224
- const Et = (e, t, ...s) =>
225
- typeof e == 'string' ? new yt(e, t, s) : e(bt(t, s))
226
- Et.fragment = (e, t) => {
227
- const s = T(t, e)
228
- return new O(s)
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)
229
233
  }
230
- class xt {
234
+ class At {
231
235
  constructor(t, s, r) {
232
236
  ;(this.template = t),
233
237
  (this.selector = s),
@@ -252,48 +256,48 @@ class xt {
252
256
  return this.renderKit.document.querySelector(this.selector)
253
257
  }
254
258
  }
255
- const At = (e, t, s) => {
256
- const r = new xt(e, t, s)
259
+ const wt = (e, t, s) => {
260
+ const r = new At(e, t, s)
257
261
  return r.renderAndAttach(s), r
258
262
  },
259
- M = 'go-to-href',
260
- k = 'go-to',
263
+ k = 'go-to-href',
264
+ $ = 'go-to',
261
265
  m = 'navigation:location-change',
262
- $ = 'navigation:route-change',
263
- wt = /* @__PURE__ */ Object.freeze(
266
+ D = 'navigation:route-change',
267
+ Nt = /* @__PURE__ */ Object.freeze(
264
268
  /* @__PURE__ */ Object.defineProperty(
265
269
  {
266
270
  __proto__: null,
267
- linkNavigationEvent: M,
271
+ linkNavigationEvent: k,
268
272
  locationChangeEvent: m,
269
- navigationEvent: k,
270
- routeChangeEvent: $,
273
+ navigationEvent: $,
274
+ routeChangeEvent: D,
271
275
  },
272
276
  Symbol.toStringTag,
273
277
  { value: 'Module' },
274
278
  ),
275
279
  ),
276
- D = (e) => {
280
+ P = (e) => {
277
281
  e.create('route', {
278
282
  host: '',
279
283
  path: '',
280
284
  query: {},
281
285
  })
282
286
  },
283
- P = (e) => {
287
+ V = (e) => {
284
288
  const t = e.closest('[href]')
285
289
  return (t && t.getAttribute('href')) || ''
286
290
  },
287
291
  E = (e, { publish: t, window: s }) => {
288
292
  s.history.pushState(null, '', e), t(m, null)
289
293
  },
290
- V = (e, t) => {
294
+ F = (e, t) => {
291
295
  if (!e || !e.target) return
292
296
  e.preventDefault()
293
- const s = P(e.target)
297
+ const s = V(e.target)
294
298
  E(s, t)
295
299
  },
296
- F = (e) =>
300
+ L = (e) =>
297
301
  e
298
302
  .replace(/^\?/, '')
299
303
  .split('&')
@@ -302,49 +306,49 @@ const At = (e, t, s) => {
302
306
  const r = s.split('=')
303
307
  return (t[r[0]] = r[1]), t
304
308
  }, {}),
305
- L = (e, t) => {
309
+ z = (e, t) => {
306
310
  const { state: s, publish: r, window: n } = t,
307
311
  { host: i, pathname: a, search: l } = n.location,
308
312
  u = a,
309
- d = F(l),
313
+ d = L(l),
310
314
  c = {
311
315
  host: i,
312
316
  path: u,
313
317
  query: d,
314
318
  }
315
- s.store('route').update(c), r($, c)
319
+ s.store('route').update(c), r(D, c)
316
320
  },
317
- z = (e) => {
321
+ B = (e) => {
318
322
  const { subscribe: t } = e
319
- t(M, V),
320
- t(k, (s, r) => {
323
+ t(k, F),
324
+ t($, (s, r) => {
321
325
  E(s, r)
322
326
  })
323
327
  },
324
- B = (e) => {
328
+ K = (e) => {
325
329
  const { publish: t, subscribe: s, state: r, window: n } = e
326
- D(r), n.addEventListener('popstate', () => t(m, null)), s(m, L)
330
+ P(r), n.addEventListener('popstate', () => t(m, null)), s(m, z)
327
331
  },
328
- K = (e) => {
332
+ R = (e) => {
329
333
  setTimeout(() => e.publish(m, null), 0)
330
334
  },
331
- R = (e) => {
332
- B(e), z(e), K(e)
335
+ U = (e) => {
336
+ K(e), B(e), R(e)
333
337
  },
334
- Nt = /* @__PURE__ */ Object.freeze(
338
+ _t = /* @__PURE__ */ Object.freeze(
335
339
  /* @__PURE__ */ Object.defineProperty(
336
340
  {
337
341
  __proto__: null,
338
- publishLocation: K,
339
- startNavigation: R,
340
- subscribeToHistoryChange: B,
341
- subscribeToNavigation: z,
342
+ publishLocation: R,
343
+ startNavigation: U,
344
+ subscribeToHistoryChange: K,
345
+ subscribeToNavigation: B,
342
346
  },
343
347
  Symbol.toStringTag,
344
348
  { value: 'Module' },
345
349
  ),
346
350
  )
347
- class U {
351
+ class C {
348
352
  constructor({
349
353
  window: t,
350
354
  document: s,
@@ -364,24 +368,24 @@ class U {
364
368
  (this.roots = [])
365
369
  }
366
370
  render(t, s) {
367
- const r = At(t, s, this.renderKit)
371
+ const r = wt(t, s, this.renderKit)
368
372
  return this.roots.push(r), r
369
373
  }
370
374
  startNavigation() {
371
- R(this)
375
+ U(this)
372
376
  }
373
377
  }
374
- const $e = /* @__PURE__ */ Object.freeze(
378
+ const De = /* @__PURE__ */ Object.freeze(
375
379
  /* @__PURE__ */ Object.defineProperty(
376
380
  {
377
381
  __proto__: null,
378
- App: U,
382
+ App: C,
379
383
  },
380
384
  Symbol.toStringTag,
381
385
  { value: 'Module' },
382
386
  ),
383
387
  )
384
- class C {
388
+ class I {
385
389
  constructor() {
386
390
  this.lookup = {}
387
391
  }
@@ -408,7 +412,7 @@ class C {
408
412
  this.lookup[t] || (this.lookup[t] = [])
409
413
  }
410
414
  }
411
- class I {
415
+ class q {
412
416
  constructor() {
413
417
  this.lookup = []
414
418
  }
@@ -427,7 +431,7 @@ class I {
427
431
  return this.lookup.filter((s) => s.matcher.test(t))
428
432
  }
429
433
  }
430
- class _t {
434
+ class St {
431
435
  constructor({ publish: t, event: s, payload: r, timer: n }) {
432
436
  ;(this.setNewTimeout = () => {
433
437
  this.stopped ||
@@ -464,7 +468,7 @@ class _t {
464
468
  ((this.callCount += 1), this.publish(this.event, this.payload))
465
469
  }
466
470
  }
467
- const St = (e) => {
471
+ const Tt = (e) => {
468
472
  const { offset: t, period: s } = e,
469
473
  r = ({ callCount: n }) => (t && n == 0 ? t : s)
470
474
  return {
@@ -474,16 +478,16 @@ const St = (e) => {
474
478
  timer: r,
475
479
  }
476
480
  },
477
- Tt = (e) => {
481
+ jt = (e) => {
478
482
  let t
479
- 'timer' in e ? (t = e) : (t = St(e))
480
- const s = new _t(t)
483
+ 'timer' in e ? (t = e) : (t = Tt(e))
484
+ const s = new St(t)
481
485
  return s.start(), s.stop
482
486
  }
483
- class q {
487
+ class J {
484
488
  constructor() {
485
- ;(this.exactSubscriptions = new C()),
486
- (this.fuzzySubscriptions = new I()),
489
+ ;(this.exactSubscriptions = new I()),
490
+ (this.fuzzySubscriptions = new q()),
487
491
  (this.currentIndex = 0)
488
492
  }
489
493
  subscribe(t, s) {
@@ -517,48 +521,46 @@ class q {
517
521
  }
518
522
  }
519
523
  }
520
- const J = () => {
521
- const e = new q()
524
+ const G = () => {
525
+ const e = new J()
522
526
  return {
523
527
  bus: e,
524
528
  publish: (r, n) => e.publish(r, n),
525
529
  subscribe: (r, n) => e.subscribe(r, n),
526
530
  }
527
531
  },
528
- De = /* @__PURE__ */ Object.freeze(
532
+ Pe = /* @__PURE__ */ Object.freeze(
529
533
  /* @__PURE__ */ Object.defineProperty(
530
534
  {
531
535
  __proto__: null,
532
- ExactSubscriptions: C,
533
- FuzzySubscriptions: I,
534
- JaxsBus: q,
535
- createBus: J,
536
- publishPeriodically: Tt,
536
+ ExactSubscriptions: I,
537
+ FuzzySubscriptions: q,
538
+ JaxsBus: J,
539
+ createBus: G,
540
+ publishPeriodically: jt,
537
541
  },
538
542
  Symbol.toStringTag,
539
543
  { value: 'Module' },
540
544
  ),
541
545
  ),
542
- f = (e) => Array.isArray(e),
543
- v = (e) => e !== null && !f(e) && typeof e == 'object',
544
- jt = (e, t) => e === t,
545
- Ot = (e, t) => Object.keys(e).length === Object.keys(t).length,
546
- Mt = (e, t) =>
547
- !(v(e) && v(t)) || !Ot(e, t)
546
+ Ot = (e, t) => e === t,
547
+ Mt = (e, t) => Object.keys(e).length === Object.keys(t).length,
548
+ kt = (e, t) =>
549
+ !(v(e) && v(t)) || !Mt(e, t)
548
550
  ? !1
549
551
  : Object.keys(e).every((s) => {
550
552
  const r = e[s],
551
553
  n = t[s]
552
554
  return x(r, n)
553
555
  }),
554
- kt = (e, t) =>
556
+ $t = (e, t) =>
555
557
  !(f(e) && f(t)) || e.length !== t.length
556
558
  ? !1
557
559
  : e.every((s, r) => {
558
560
  const n = t[r]
559
561
  return x(s, n)
560
562
  }),
561
- x = (e, t) => (v(e) ? Mt(e, t) : f(e) ? kt(e, t) : jt(e, t))
563
+ x = (e, t) => (v(e) ? kt(e, t) : f(e) ? $t(e, t) : Ot(e, t))
562
564
  class g {
563
565
  constructor(t) {
564
566
  ;(this.name = t.name),
@@ -602,7 +604,7 @@ class A {
602
604
  return this.store.value
603
605
  }
604
606
  }
605
- class $t extends A {
607
+ class Dt extends A {
606
608
  updateAttribute(t, s) {
607
609
  const r = { ...this.value }
608
610
  ;(r[t] = s), this.update(r)
@@ -622,8 +624,8 @@ class $t extends A {
622
624
  ;(s[t] = r), this.update(s)
623
625
  }
624
626
  }
625
- const Dt = (e) => new $t(e)
626
- class Pt extends A {
627
+ const Pt = (e) => new Dt(e)
628
+ class Vt extends A {
627
629
  push(t) {
628
630
  const s = [...this.value, t]
629
631
  this.update(s)
@@ -664,8 +666,8 @@ class Pt extends A {
664
666
  this.update(s)
665
667
  }
666
668
  }
667
- const Vt = (e) => new Pt(e)
668
- class Ft extends A {
669
+ const Ft = (e) => new Vt(e)
670
+ class Lt extends A {
669
671
  toggle() {
670
672
  const t = !this.value
671
673
  this.update(t)
@@ -677,14 +679,14 @@ class Ft extends A {
677
679
  this.update(!1)
678
680
  }
679
681
  }
680
- const Lt = (e) => new Ft(e),
681
- zt = {
682
- object: Dt,
683
- list: Vt,
684
- boolean: Lt,
682
+ const zt = (e) => new Lt(e),
683
+ Bt = {
684
+ object: Pt,
685
+ list: Ft,
686
+ boolean: zt,
685
687
  },
686
688
  w = 'state'
687
- class G {
689
+ class H {
688
690
  constructor(t) {
689
691
  ;(this.publisher = t),
690
692
  (this.stores = {}),
@@ -744,22 +746,22 @@ class G {
744
746
  return `${this.eventNamePrefix}:${t}`
745
747
  }
746
748
  }
747
- const H = (e) => new G(e),
748
- Pe = /* @__PURE__ */ Object.freeze(
749
+ const Q = (e) => new H(e),
750
+ Ve = /* @__PURE__ */ Object.freeze(
749
751
  /* @__PURE__ */ Object.defineProperty(
750
752
  {
751
753
  __proto__: null,
752
- State: G,
754
+ State: H,
753
755
  Store: g,
754
- createState: H,
756
+ createState: Q,
755
757
  eventName: w,
756
- updaters: zt,
758
+ updaters: Bt,
757
759
  },
758
760
  Symbol.toStringTag,
759
761
  { value: 'Module' },
760
762
  ),
761
763
  )
762
- class Bt {
764
+ class Kt {
763
765
  constructor(t) {
764
766
  this.setupDomEnvironment(t)
765
767
  }
@@ -769,7 +771,7 @@ class Bt {
769
771
  this.setupState(),
770
772
  this.addBusOptions(),
771
773
  this.setRenderKit(),
772
- new U({
774
+ new C({
773
775
  window: this.window,
774
776
  document: this.document,
775
777
  publish: this.publish,
@@ -788,11 +790,11 @@ class Bt {
788
790
  : ((this.window = window), (this.document = document))
789
791
  }
790
792
  setupBus() {
791
- const { publish: t, subscribe: s, bus: r } = J()
793
+ const { publish: t, subscribe: s, bus: r } = G()
792
794
  ;(this.publish = t), (this.subscribe = s), (this.bus = r)
793
795
  }
794
796
  setupState() {
795
- this.state = H(this.publish)
797
+ this.state = Q(this.publish)
796
798
  }
797
799
  addBusOptions() {
798
800
  this.bus.addListenerOptions({
@@ -811,8 +813,8 @@ class Bt {
811
813
  }
812
814
  }
813
815
  }
814
- const Ve = (e = {}) => {
815
- const s = new Bt(e).setup()
816
+ const Fe = (e = {}) => {
817
+ const s = new Kt(e).setup()
816
818
  return s.startNavigation(), s
817
819
  }
818
820
  var o = /* @__PURE__ */ ((e) => (
@@ -829,7 +831,7 @@ var o = /* @__PURE__ */ ((e) => (
829
831
  (e[(e.changeText = 10)] = 'changeText'),
830
832
  e
831
833
  ))(o || {})
832
- const Fe = /* @__PURE__ */ Object.freeze(
834
+ const Le = /* @__PURE__ */ Object.freeze(
833
835
  /* @__PURE__ */ Object.defineProperty(
834
836
  {
835
837
  __proto__: null,
@@ -839,49 +841,49 @@ const Fe = /* @__PURE__ */ Object.freeze(
839
841
  { value: 'Module' },
840
842
  ),
841
843
  ),
842
- Kt = (e, t) => ({
844
+ Rt = (e, t) => ({
843
845
  source: e,
844
846
  target: t,
845
847
  type: o.changeText,
846
848
  data: {},
847
849
  }),
848
- Rt = (e, t) => ({
850
+ Ut = (e, t) => ({
849
851
  source: e,
850
852
  target: t,
851
853
  type: o.replaceNode,
852
854
  data: {},
853
855
  }),
854
- Ut = (e, t, s) => ({
856
+ Ct = (e, t, s) => ({
855
857
  source: e,
856
858
  target: t,
857
859
  data: s,
858
860
  type: o.removeAttribute,
859
861
  }),
860
- Ct = (e, t, s) => ({
862
+ It = (e, t, s) => ({
861
863
  source: e,
862
864
  target: t,
863
865
  data: s,
864
866
  type: o.addAttribute,
865
867
  }),
866
- It = (e, t, s) => ({
868
+ qt = (e, t, s) => ({
867
869
  source: e,
868
870
  target: t,
869
871
  data: s,
870
872
  type: o.updateAttribute,
871
873
  }),
872
- qt = (e, t, s) => ({
874
+ Jt = (e, t, s) => ({
873
875
  source: e,
874
876
  target: t,
875
877
  data: s,
876
878
  type: o.removeEvent,
877
879
  }),
878
- Jt = (e, t, s) => ({
880
+ Gt = (e, t, s) => ({
879
881
  source: e,
880
882
  target: t,
881
883
  data: s,
882
884
  type: o.addEvent,
883
885
  }),
884
- Gt = (e, t, s) => ({
886
+ Ht = (e, t, s) => ({
885
887
  source: e,
886
888
  target: t,
887
889
  data: s,
@@ -901,15 +903,15 @@ const Fe = /* @__PURE__ */ Object.freeze(
901
903
  type: o.insertNode,
902
904
  data: t,
903
905
  }),
904
- Ht = (e, t, s) => ({
906
+ Qt = (e, t, s) => ({
905
907
  source: e,
906
908
  target: t,
907
909
  type: o.changeValue,
908
910
  data: s,
909
911
  }),
910
- Qt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
912
+ Wt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
911
913
  _ = { index: -1 }
912
- class Wt {
914
+ class Xt {
913
915
  constructor() {
914
916
  this.map = {}
915
917
  }
@@ -943,10 +945,10 @@ class Wt {
943
945
  }
944
946
  }
945
947
  const S = (e) => {
946
- const t = new Wt()
948
+ const t = new Xt()
947
949
  return t.populate(e), t
948
950
  },
949
- Q = (e, t, s = !1) => {
951
+ W = (e, t, s = !1) => {
950
952
  const r = [],
951
953
  n = e.attributes,
952
954
  i = n.length,
@@ -967,13 +969,13 @@ const S = (e) => {
967
969
  c
968
970
  ? h.value !== c.value &&
969
971
  r.push(
970
- It(e, t, {
972
+ qt(e, t, {
971
973
  name: h.name,
972
974
  value: c.value,
973
975
  isSvg: s,
974
976
  }),
975
977
  )
976
- : r.push(Ut(e, t, { name: h.name, isSvg: s }))
978
+ : r.push(Ct(e, t, { name: h.name, isSvg: s }))
977
979
  }
978
980
  }
979
981
  for (u = 0; u < l; u++) {
@@ -989,7 +991,7 @@ const S = (e) => {
989
991
  }
990
992
  c ||
991
993
  r.push(
992
- Ct(e, t, {
994
+ It(e, t, {
993
995
  name: h.name,
994
996
  value: h.value,
995
997
  isSvg: s,
@@ -999,7 +1001,7 @@ const S = (e) => {
999
1001
  }
1000
1002
  return r
1001
1003
  },
1002
- Xt = (e, t) => {
1004
+ Yt = (e, t) => {
1003
1005
  const s = [],
1004
1006
  r = e.eventMaps,
1005
1007
  n = t.eventMaps,
@@ -1012,14 +1014,14 @@ const S = (e) => {
1012
1014
  d
1013
1015
  ? d.busEvent !== u.busEvent &&
1014
1016
  s.push(
1015
- Gt(e, t, {
1017
+ Ht(e, t, {
1016
1018
  name: l,
1017
1019
  targetValue: d.listener,
1018
1020
  sourceValue: u.listener,
1019
1021
  }),
1020
1022
  )
1021
1023
  : s.push(
1022
- qt(e, t, {
1024
+ Jt(e, t, {
1023
1025
  name: u.domEvent,
1024
1026
  value: u.listener,
1025
1027
  }),
@@ -1030,7 +1032,7 @@ const S = (e) => {
1030
1032
  d = n[l]
1031
1033
  u ||
1032
1034
  s.push(
1033
- Jt(e, t, {
1035
+ Gt(e, t, {
1034
1036
  name: d.domEvent,
1035
1037
  value: d.listener,
1036
1038
  }),
@@ -1039,42 +1041,42 @@ const S = (e) => {
1039
1041
  s
1040
1042
  )
1041
1043
  },
1042
- Yt = (e) => e.tagName !== 'INPUT',
1043
- Zt = (e, t) => e.value === t.value,
1044
- te = (e, t) => {
1045
- if (Yt(e) || Zt(e, t)) return []
1044
+ Zt = (e) => e.tagName !== 'INPUT',
1045
+ te = (e, t) => e.value === t.value,
1046
+ ee = (e, t) => {
1047
+ if (Zt(e) || te(e, t)) return []
1046
1048
  const s = e,
1047
1049
  r = t
1048
- return [Ht(s, r, { name: 'value', value: r.value })]
1050
+ return [Qt(s, r, { name: 'value', value: r.value })]
1049
1051
  },
1050
- ee = (e, t) => {
1051
- const s = Q(e, t),
1052
- r = Xt(e, t),
1053
- n = te(e, t)
1052
+ se = (e, t) => {
1053
+ const s = W(e, t),
1054
+ r = Yt(e, t),
1055
+ n = ee(e, t)
1054
1056
  return s.concat(r).concat(n)
1055
1057
  },
1056
- se = (e, t) => Q(e, t, !0),
1057
- re = (e, t) => (e.textContent !== t.textContent ? [Kt(e, t)] : []),
1058
- ne = (e, t, s) => {
1058
+ re = (e, t) => W(e, t, !0),
1059
+ ne = (e, t) => (e.textContent !== t.textContent ? [Rt(e, t)] : []),
1060
+ ie = (e, t, s) => {
1059
1061
  let r = []
1060
- if (e.nodeType === 1 && ot(e)) {
1062
+ if (e.nodeType === 1 && at(e)) {
1061
1063
  const n = e,
1062
1064
  i = t,
1063
- a = se(n, i),
1065
+ a = re(n, i),
1064
1066
  l = s(n.childNodes, i.childNodes, n)
1065
1067
  r = a.concat(l)
1066
1068
  } else if (e.nodeType === 1) {
1067
1069
  const n = e,
1068
1070
  i = t,
1069
- a = ee(n, i),
1071
+ a = se(n, i),
1070
1072
  l = s(n.childNodes, i.childNodes, n)
1071
1073
  r = a.concat(l)
1072
- } else e.nodeType === 3 && (r = re(e, t))
1074
+ } else e.nodeType === 3 && (r = ne(e, t))
1073
1075
  return r
1074
1076
  },
1075
- W = (e, t, s) => {
1077
+ X = (e, t, s) => {
1076
1078
  const r = [],
1077
- n = ie(e, t),
1079
+ n = oe(e, t),
1078
1080
  i = S(e),
1079
1081
  a = S(t),
1080
1082
  l = []
@@ -1100,7 +1102,7 @@ const S = (e) => {
1100
1102
  : c
1101
1103
  ? a.check(c)
1102
1104
  ? r.push(b(h, { parent: s, index: u }))
1103
- : (i.clear(c), r.push(Rt(c, h)))
1105
+ : (i.clear(c), r.push(Ut(c, h)))
1104
1106
  : r.push(b(h, { parent: s, index: u }))
1105
1107
  } else c && i.pullMatch(c).element && r.push(N(c))
1106
1108
  }
@@ -1108,132 +1110,132 @@ const S = (e) => {
1108
1110
  r.push(N(c))
1109
1111
  })
1110
1112
  const d = l.reduce(
1111
- (c, { source: h, target: p }) => c.concat(ne(h, p, W)),
1113
+ (c, { source: h, target: p }) => c.concat(ie(h, p, X)),
1112
1114
  [],
1113
1115
  )
1114
- return r.concat(d).sort(Qt)
1116
+ return r.concat(d).sort(Wt)
1115
1117
  },
1116
- ie = (e, t) => {
1118
+ oe = (e, t) => {
1117
1119
  const s = e.length,
1118
1120
  r = t.length
1119
1121
  return s > r ? s : r
1120
1122
  },
1121
- oe = (e, t, s) => {
1122
- const r = W(e, t, s)
1123
+ ue = (e, t, s) => {
1124
+ const r = X(e, t, s)
1123
1125
  return (
1124
1126
  r.forEach((n) => {
1125
- ue(n)
1127
+ ae(n)
1126
1128
  }),
1127
1129
  r
1128
1130
  )
1129
1131
  },
1130
- ue = (e) => {
1131
- ;(ye[e.type] || ae)(e)
1132
+ ae = (e) => {
1133
+ ;(Ee[e.type] || ce)(e)
1132
1134
  },
1133
- ae = (e) => {},
1134
- ce = (e) => {
1135
+ ce = (e) => {},
1136
+ le = (e) => {
1135
1137
  const { source: t, target: s } = e
1136
1138
  t.nodeValue = s.textContent
1137
1139
  },
1138
- le = (e) => {
1140
+ he = (e) => {
1139
1141
  const { source: t } = e
1140
1142
  t.remove()
1141
1143
  },
1142
- he = (e) => {
1144
+ de = (e) => {
1143
1145
  const { target: t, data: s } = e,
1144
1146
  { parent: r, index: n } = s,
1145
1147
  i = r.childNodes[n]
1146
1148
  i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
1147
1149
  },
1148
- de = (e) => {
1150
+ pe = (e) => {
1149
1151
  const { source: t, target: s } = e
1150
1152
  t.replaceWith(s)
1151
1153
  },
1152
- pe = (e) => {
1154
+ me = (e) => {
1153
1155
  const { source: t, data: s } = e,
1154
1156
  { name: r, isSvg: n } = s
1155
1157
  n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
1156
1158
  },
1157
- X = (e) => {
1159
+ Y = (e) => {
1158
1160
  const { source: t, data: s } = e,
1159
1161
  { name: r, value: n, isSvg: i } = s
1160
1162
  i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
1161
1163
  },
1162
- me = (e) => {
1163
- X(e)
1164
- },
1165
1164
  fe = (e) => {
1165
+ Y(e)
1166
+ },
1167
+ be = (e) => {
1166
1168
  const t = e.data,
1167
1169
  s = e.source,
1168
1170
  { name: r, value: n } = t
1169
1171
  s.removeEventListener(r, n)
1170
1172
  },
1171
- be = (e) => {
1173
+ ve = (e) => {
1172
1174
  const t = e.data,
1173
1175
  s = e.source,
1174
1176
  { name: r, value: n } = t
1175
1177
  s.addEventListener(r, n)
1176
1178
  },
1177
- ve = (e) => {
1179
+ ge = (e) => {
1178
1180
  const t = e.data,
1179
1181
  s = e.source,
1180
1182
  { name: r, sourceValue: n, targetValue: i } = t
1181
1183
  s.removeEventListener(r, n), s.addEventListener(r, i)
1182
1184
  },
1183
- ge = (e) => {
1185
+ ye = (e) => {
1184
1186
  const t = e.data,
1185
1187
  s = e.source,
1186
1188
  { value: r } = t
1187
1189
  s.value = r
1188
1190
  },
1189
- ye = {
1190
- [o.changeText]: ce,
1191
- [o.removeNode]: le,
1192
- [o.insertNode]: he,
1193
- [o.replaceNode]: de,
1194
- [o.removeAttribute]: pe,
1195
- [o.addAttribute]: X,
1196
- [o.updateAttribute]: me,
1197
- [o.removeEvent]: fe,
1198
- [o.addEvent]: be,
1199
- [o.updateEvent]: ve,
1200
- [o.changeValue]: ge,
1191
+ Ee = {
1192
+ [o.changeText]: le,
1193
+ [o.removeNode]: he,
1194
+ [o.insertNode]: de,
1195
+ [o.replaceNode]: pe,
1196
+ [o.removeAttribute]: me,
1197
+ [o.addAttribute]: Y,
1198
+ [o.updateAttribute]: fe,
1199
+ [o.removeEvent]: be,
1200
+ [o.addEvent]: ve,
1201
+ [o.updateEvent]: ge,
1202
+ [o.changeValue]: ye,
1201
1203
  },
1202
- Ee = (e, t, s) => {
1204
+ xe = (e, t, s) => {
1203
1205
  const r = [...t]
1204
1206
  return (
1205
1207
  e.forEach((n) => {
1206
- xe(n, r, s)
1208
+ Ae(n, r, s)
1207
1209
  }),
1208
1210
  r
1209
1211
  )
1210
1212
  },
1211
- xe = (e, t, s) => {
1212
- const r = _e[e.type]
1213
+ Ae = (e, t, s) => {
1214
+ const r = Se[e.type]
1213
1215
  r && r(e, t, s)
1214
1216
  },
1215
- Ae = (e, t) => {
1217
+ we = (e, t) => {
1216
1218
  const { source: s } = e,
1217
1219
  r = t.indexOf(s)
1218
1220
  r >= 0 && t.splice(r, 1)
1219
1221
  },
1220
- we = (e, t, s) => {
1222
+ Ne = (e, t, s) => {
1221
1223
  const { target: r } = e,
1222
1224
  n = e.data,
1223
1225
  { index: i, parent: a } = n
1224
1226
  s === a && t.splice(i, 0, r)
1225
1227
  },
1226
- Ne = (e, t) => {
1228
+ _e = (e, t) => {
1227
1229
  const { target: s, source: r } = e,
1228
1230
  n = t.indexOf(r)
1229
1231
  n >= 0 && (t[n] = s)
1230
1232
  },
1231
- _e = {
1232
- [o.removeNode]: Ae,
1233
- [o.insertNode]: we,
1234
- [o.replaceNode]: Ne,
1233
+ Se = {
1234
+ [o.removeNode]: we,
1235
+ [o.insertNode]: Ne,
1236
+ [o.replaceNode]: _e,
1235
1237
  }
1236
- class Se {
1238
+ class Te {
1237
1239
  constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
1238
1240
  ;(this.Template = t),
1239
1241
  (this.viewModel = n),
@@ -1265,8 +1267,8 @@ class Se {
1265
1267
  this.parentElement = r
1266
1268
  }
1267
1269
  const t = this.generateDom(this.renderKit),
1268
- s = oe(this.dom, t, this.parentElement)
1269
- this.dom = Ee(s, this.dom, this.parentElement)
1270
+ s = ue(this.dom, t, this.parentElement)
1271
+ this.dom = xe(s, this.dom, this.parentElement)
1270
1272
  }
1271
1273
  subscribeForRerender() {
1272
1274
  const { subscribe: t } = this.renderKit
@@ -1278,36 +1280,19 @@ class Se {
1278
1280
  return `${w}:${t}`
1279
1281
  }
1280
1282
  }
1281
- const Te = (e) => e,
1282
- je = ({ Template: e, viewModel: t, subscriptions: s }) => (
1283
+ const je = (e) => e,
1284
+ Oe = ({ Template: e, viewModel: t, subscriptions: s }) => (
1283
1285
  (s = s || []),
1284
- (t = t || Te),
1286
+ (t = t || je),
1285
1287
  (r) =>
1286
- new Se({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1288
+ new Te({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1287
1289
  ),
1288
- Le = /* @__PURE__ */ Object.freeze(
1289
- /* @__PURE__ */ Object.defineProperty(
1290
- {
1291
- __proto__: null,
1292
- createRouteState: D,
1293
- events: wt,
1294
- extractQueryParams: F,
1295
- findHref: P,
1296
- navigate: E,
1297
- onLinkClick: V,
1298
- onLocationChange: L,
1299
- start: Nt,
1300
- },
1301
- Symbol.toStringTag,
1302
- { value: 'Module' },
1303
- ),
1304
- ),
1305
- Oe =
1290
+ Me =
1306
1291
  (e) =>
1307
1292
  ({ path: t }) =>
1308
1293
  t === e,
1309
- Me = () => !0,
1310
- Y =
1294
+ ke = () => !0,
1295
+ Z =
1311
1296
  (e) =>
1312
1297
  ({ route: t }) => {
1313
1298
  const s = e.find((r) => r.match(t))
@@ -1317,33 +1302,50 @@ const Te = (e) => e,
1317
1302
  /* @__PURE__ */ Object.defineProperty(
1318
1303
  {
1319
1304
  __proto__: null,
1320
- buildRouter: Y,
1321
- catchAll: Me,
1322
- exactPathMatch: Oe,
1305
+ buildRouter: Z,
1306
+ catchAll: ke,
1307
+ exactPathMatch: Me,
1323
1308
  },
1324
1309
  Symbol.toStringTag,
1325
1310
  { value: 'Module' },
1326
1311
  ),
1327
1312
  ),
1328
- ke = () => ({
1313
+ $e = () => ({
1329
1314
  render: (e, t) => [],
1330
1315
  }),
1331
1316
  Be = (e) => {
1332
- const t = Y(e)
1333
- return je({
1334
- Template: ({ route: r }) => (t({ route: r }) || ke)(),
1317
+ const t = Z(e)
1318
+ return Oe({
1319
+ Template: ({ route: r }) => (t({ route: r }) || $e)(),
1335
1320
  subscriptions: ['route'],
1336
1321
  })
1337
- }
1322
+ },
1323
+ Ke = /* @__PURE__ */ Object.freeze(
1324
+ /* @__PURE__ */ Object.defineProperty(
1325
+ {
1326
+ __proto__: null,
1327
+ createRouteState: P,
1328
+ events: Nt,
1329
+ extractQueryParams: L,
1330
+ findHref: V,
1331
+ navigate: E,
1332
+ onLinkClick: F,
1333
+ onLocationChange: z,
1334
+ start: _t,
1335
+ },
1336
+ Symbol.toStringTag,
1337
+ { value: 'Module' },
1338
+ ),
1339
+ )
1338
1340
  export {
1339
- Fe as JaxsTypes,
1340
- $e as appBuilding,
1341
- je as bind,
1342
- Ve as createApp,
1343
- Et as jsx,
1344
- De as messageBus,
1345
- Le as navigation,
1341
+ Le as JaxsTypes,
1342
+ De as appBuilding,
1343
+ Oe as bind,
1344
+ Fe as createApp,
1345
+ xt as jsx,
1346
+ Pe as messageBus,
1347
+ Ke as navigation,
1346
1348
  Be as routedView,
1347
1349
  ze as routing,
1348
- Pe as state,
1350
+ Ve as state,
1349
1351
  }