json-renderers 1.13.7 → 1.14.1

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.
@@ -1,702 +1,796 @@
1
- const x = {
2
- version: "v13.1.0",
3
- description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
4
- }, j = (t) => {
5
- var e;
6
- typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), (e = globalThis.ks).jsonRenderers ?? (e.jsonRenderers = {
7
- meta: x,
8
- renderToDom: t
9
- }));
10
- }, v = {
11
- version: "v3.0.0",
12
- description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
13
- }, N = (t) => {
14
- var e;
15
- typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), (e = globalThis.ks).jsonRenderersBuild ?? (e.jsonRenderersBuild = {
16
- meta: v,
17
- renderToDom: t
18
- }));
19
- }, $ = {
20
- version: "v32",
21
- description: "JSON-to-DOM engine with centralized traversal and responsibility-focused construction"
22
- }, k = ({ inFuncDefinition: t } = {}) => {
23
- if (typeof globalThis > "u" || !t) return;
24
- globalThis.ks ?? (globalThis.ks = {});
25
- const e = {
26
- meta: $,
27
- buildSpecElement: t
28
- };
29
- globalThis.ks.jsonToSpec = e;
30
- }, D = (t, e) => g(t, e), m = (t, e) => Array.isArray(t) ? t.map((l) => D(l, e)).flat(1 / 0).filter(Boolean) : [], O = (t, e) => {
31
- if ("source" in t && (t == null ? void 0 : t.source) in e) {
32
- const l = e[t == null ? void 0 : t.source];
33
- if (Array.isArray(l))
34
- return l.map((n) => {
35
- const r = t == null ? void 0 : t.template;
36
- if (r)
37
- return g(r, n);
38
- });
39
- }
40
- }, E = (t, e) => {
41
- let l = [];
42
- for (const [o, n] of Object.entries(e)) {
43
- const r = t == null ? void 0 : t.template;
44
- if (r) {
45
- const a = g(r, {
46
- key: o,
47
- value: n
48
- });
49
- l.push(a);
50
- }
51
- }
52
- return l;
53
- }, S = (t, e) => {
54
- if ("source" in t && (t == null ? void 0 : t.source) in e) {
55
- const l = e[t == null ? void 0 : t.source];
56
- if (Array.isArray(l))
57
- return l.map((n) => {
58
- const r = t == null ? void 0 : t.template;
59
- if (r)
60
- return g(r, n);
61
- });
62
- }
63
- }, L = (t, e) => {
64
- if ("operation" in t) {
65
- if (t.operation === "loopArray")
66
- return O(t, e);
67
- if (t.operation === "loopObject")
68
- return E(t, e);
69
- if (t.operation === "loopCollection")
70
- return S(t, e);
71
- }
72
- }, p = (t, e) => {
73
- if (typeof e == "string") return e;
74
- if (typeof t != "string") return t;
75
- if (t === "${value}")
76
- return e.value;
77
- const l = t.match(/^\$\{(.+?)\}$/);
78
- if (l) {
79
- const o = l[1];
80
- return (e == null ? void 0 : e[o]) ?? "";
81
- }
82
- return t;
83
- }, F = (t, e) => {
84
- let l = {};
85
- for (const [o, n] of Object.entries(t)) {
86
- const r = p(n, e);
87
- l[o] = r;
88
- }
89
- return l;
90
- }, G = (t, e) => {
91
- if ("tagName" in t) {
92
- if ("textContent" in t) {
93
- const l = p(t.textContent, e);
94
- t.textContent = l;
95
- }
96
- if ("attributes" in t) {
97
- const l = F(t.attributes, e);
98
- t.attributes = l;
99
- }
100
- }
101
- }, M = (t, e) => {
102
- if (!t || typeof t != "object" || Array.isArray(t)) return null;
103
- const l = structuredClone(t);
104
- if (!l) return null;
105
- if ("tagName" in l && G(l, e), "jsonToSpec" in l) {
106
- const o = l == null ? void 0 : l.jsonToSpec, n = L(o, e);
107
- Array.isArray(n) ? l.children = n : l.children = [n], delete l.jsonToSpec;
108
- }
109
- if (Array.isArray(l == null ? void 0 : l.children)) {
110
- const o = m(l == null ? void 0 : l.children, e);
111
- l.children = o;
112
- }
113
- return l;
114
- }, g = (t, e) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? m(t, e) : typeof t == "object" ? M(t, e) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : t, h = (t, e) => g(t, e);
115
- k({
116
- inFuncDefinition: h
117
- });
118
- const R = {
119
- default: {
120
- tagName: "table",
121
- attributes: {
122
- class: "table table-hover table-striped mb-0"
123
- },
124
- children: [
125
- {
126
- tagName: "thead",
127
- children: [
128
- {
129
- tagName: "tr",
130
- jsonToSpec: {
131
- operation: "loopCollection",
132
- source: "columns",
133
- template: {
134
- tagName: "th",
135
- textContent: "${title}"
136
- }
137
- },
138
- children: []
139
- }
140
- ]
141
- },
142
- {
143
- tagName: "tbody",
144
- jsonToSpec: {
145
- operation: "loopCollection",
146
- source: "data",
147
- template: {
148
- tagName: "tr",
149
- jsonToSpec: {
150
- operation: "loopObject",
151
- source: "data",
152
- template: {
153
- tagName: "td",
154
- textContent: "${value}"
155
- }
156
- },
157
- children: []
158
- }
159
- },
160
- children: []
161
- }
162
- ]
163
- }
164
- }, z = ({
165
- inColumns: t,
166
- inData: e
167
- } = {}) => {
168
- const l = e ?? [], o = t;
169
- return h(R.default, {
170
- columns: o,
171
- data: l
172
- });
173
- }, I = "select", V = {
174
- id: "LedgerName"
175
- }, q = {
176
- operation: "loopArray",
177
- source: "arrayOfStrings",
178
- template: {
179
- tagName: "option",
180
- attributes: {
181
- value: "${}"
182
- },
183
- textContent: "${}"
184
- }
185
- }, B = [], P = {
186
- tagName: I,
187
- attributes: V,
188
- jsonToSpec: q,
189
- children: B
190
- }, H = ({
191
- inData: t
192
- } = {}) => h(P, {
193
- arrayOfStrings: t ?? []
194
- }), _ = {
195
- operation: "loopArray",
196
- source: "arrayOfStrings",
197
- template: {
198
- tagName: "option",
199
- attributes: {
200
- value: "${}"
201
- },
202
- textContent: "${}"
203
- }
204
- }, U = [], K = {
205
- jsonToSpec: _,
206
- children: U
207
- }, X = ({
208
- inData: t
209
- } = {}) => h(K, {
210
- arrayOfStrings: t ?? []
211
- }), w = {
212
- table: z,
213
- select: H,
214
- selectOptionsOnly: X
215
- }, y = ({
216
- type: t = "table",
217
- data: e,
218
- columns: l
219
- } = {}) => {
220
- const o = t, n = w[o];
221
- return n ? n({
222
- inColumns: l,
223
- inData: e
224
- }) : (console.error(
225
- `[Renderer] Unknown renderer type "${o}". Available types: ${Object.keys(w).join(", ")}`
226
- ), null);
227
- };
228
- N(y);
229
- const Q = {
230
- version: "v9",
231
- description: "JSON-to-DOM engine with SVG namespace support, mixed text content, and centralized traversal"
232
- }, W = ({ inFuncDefinition: t, inReviewSpec: e } = {}) => {
233
- if (typeof globalThis > "u" || !t) return;
234
- globalThis.ks ?? (globalThis.ks = {});
235
- const l = {
236
- meta: Q,
237
- buildSpecElement: t,
238
- reviewSpec: e
239
- };
240
- globalThis.ks["json-to-tag"] = l, globalThis.ks.jsonToTag = l;
241
- }, Y = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : typeof t == "object" && (t.nodeType === 3 || t.tagName === "#text" || !t.tagName && (t.textContent !== void 0 || t.text !== void 0)) ? document.createTextNode(t.textContent ?? t.text ?? "") : C(t), T = (t) => Array.isArray(t) ? t.map(Y).flat(1 / 0).filter(Boolean) : [], Z = (t) => (t == null, t), J = "http://www.w3.org/2000/svg", tt = /* @__PURE__ */ new Set([
242
- "svg",
243
- "path",
244
- "symbol",
245
- "use",
246
- "g",
247
- "circle",
248
- "ellipse",
249
- "rect",
250
- "line",
251
- "polyline",
252
- "polygon",
253
- "text",
254
- "tspan",
255
- "defs",
256
- "clippath",
257
- "mask",
258
- "pattern",
259
- "marker",
260
- "lineargradient",
261
- "radialgradient",
262
- "stop",
263
- "image",
264
- "filter",
265
- "fegaussianblur",
266
- "femerge",
267
- "femergenode"
268
- ]), et = ({ inTagName: t }) => {
269
- const e = t == null ? void 0 : t.toLowerCase();
270
- if (!e) return null;
271
- if (e === "checkbox") {
272
- const l = document.createElement("input");
273
- return l.type = "checkbox", l;
274
- }
275
- return tt.has(e) ? document.createElementNS(J, e) : document.createElement(e);
276
- }, lt = ({ inElement: t, inTextContent: e }) => (!t || e === void 0 || e === null || (t.textContent = e), t), ot = ({ inElement: t, inProperties: e }) => (t && e && typeof e == "object" && Object.assign(t, e), t), rt = "http://www.w3.org/1999/xlink", nt = ({ inElement: t, inAttributes: e }) => {
277
- const l = t, o = e;
278
- if (!l || !o || typeof o != "object")
279
- return l;
280
- const n = typeof SVGElement < "u" ? l instanceof SVGElement : l.namespaceURI === "http://www.w3.org/2000/svg";
281
- return Object.entries(o).forEach(([r, a]) => {
282
- if (r === "class") {
283
- n ? l.setAttribute("class", String(a)) : l.className = a;
284
- return;
285
- }
286
- if (r === "xlink:href" || r === "href") {
287
- if (a != null) {
288
- const i = String(a);
289
- if (n)
290
- try {
291
- l.setAttributeNS(rt, "href", i);
292
- } catch {
293
- }
294
- l.setAttribute("href", i), l.setAttribute("xlink:href", i);
295
- }
296
- return;
297
- }
298
- if (typeof a == "boolean") {
299
- a ? l.setAttribute(r, "") : l.removeAttribute(r);
300
- return;
301
- }
302
- a != null && l.setAttribute(r, String(a));
303
- }), l;
304
- }, at = ({ inElement: t, inClassList: e }) => {
305
- if (!t || !e) return t;
306
- const l = typeof e == "string" ? e.split(/\s+/).filter(Boolean) : Array.isArray(e) ? e.filter((o) => typeof o == "string" && o.trim()) : [];
307
- return l.length && t.classList.add(...l), t;
308
- }, st = (t) => {
309
- if (!t || typeof t != "object" || Array.isArray(t) || !t.tagName) return null;
310
- const e = et({ inTagName: t.tagName });
311
- if (!e) return null;
312
- if (lt({
313
- inElement: e,
314
- inTextContent: Z(t.textContent),
315
- inTagName: t.tagName
316
- }), ot({
317
- inElement: e,
318
- inProperties: t.properties
319
- }), nt({
320
- inElement: e,
321
- inAttributes: t.attributes
322
- }), at({
323
- inElement: e,
324
- inClassList: t.classList
325
- }), Array.isArray(t.children)) {
326
- const l = T(t.children);
327
- l.length && e.append(...l);
328
- }
329
- return e;
330
- }, C = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? T(t) : typeof t == "object" ? st(t) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : null, it = "./tags.schema.json", ct = {
331
- allowsTextContent: !1,
332
- allowsChildren: !0,
333
- allowedAttributes: [
334
- "title",
335
- "role"
336
- ],
337
- childTags: []
338
- }, ut = {
339
- allowsTextContent: !1,
340
- allowsChildren: !1,
341
- allowedAttributes: [
342
- "type",
343
- "placeholder",
344
- "value",
345
- "name",
346
- "disabled",
347
- "readonly",
348
- "required",
349
- "list"
350
- ]
351
- }, dt = {
352
- allowsTextContent: !1,
353
- allowsChildren: !1,
354
- allowedAttributes: [
355
- "type",
356
- "checked",
357
- "name",
358
- "value",
359
- "disabled",
360
- "required"
361
- ]
362
- }, ft = {
363
- allowsTextContent: !1,
364
- allowsChildren: !0,
365
- allowedAttributes: [
366
- "span"
367
- ],
368
- childTags: [
369
- "col"
370
- ]
371
- }, gt = {
372
- allowsTextContent: !1,
373
- allowsChildren: !1,
374
- allowedAttributes: [
375
- "span",
376
- "style",
377
- "width"
378
- ]
379
- }, ht = {
380
- allowsTextContent: !0,
381
- allowsChildren: !0,
382
- allowedAttributes: [
383
- "for"
384
- ],
385
- childTags: []
386
- }, bt = {
387
- allowsTextContent: !1,
388
- allowsChildren: !0,
389
- allowedAttributes: [
390
- "action",
391
- "method",
392
- "autocomplete",
393
- "enctype",
394
- "name",
395
- "novalidate",
396
- "target"
397
- ],
398
- childTags: []
399
- }, wt = {
400
- allowsTextContent: !1,
401
- allowsChildren: !0,
402
- allowedAttributes: [
403
- "name",
404
- "disabled",
405
- "required",
406
- "multiple",
407
- "size"
408
- ],
409
- childTags: [
410
- "option"
411
- ]
412
- }, mt = {
413
- allowsTextContent: !0,
414
- allowsChildren: !0,
415
- allowedAttributes: [],
416
- childTags: []
417
- }, pt = {
418
- allowsTextContent: !0,
419
- allowsChildren: !0,
420
- allowedAttributes: [],
421
- childTags: []
422
- }, yt = {
423
- allowsTextContent: !0,
424
- allowsChildren: !0,
425
- allowedAttributes: [],
426
- childTags: []
427
- }, Tt = {
428
- allowsTextContent: !0,
429
- allowsChildren: !0,
430
- allowedAttributes: [],
431
- childTags: []
432
- }, Ct = {
433
- allowsTextContent: !1,
434
- allowsChildren: !1,
435
- allowedAttributes: [
436
- "src",
437
- "alt",
438
- "width",
439
- "height",
440
- "loading"
441
- ]
442
- }, At = {
443
- allowsTextContent: !0,
444
- allowsChildren: !0,
445
- allowedAttributes: [
446
- "type",
447
- "disabled",
448
- "name",
449
- "value"
450
- ],
451
- childTags: []
452
- }, xt = {
453
- allowsTextContent: !1,
454
- allowsChildren: !0,
455
- allowedAttributes: [
456
- "border",
457
- "cellpadding",
458
- "cellspacing"
459
- ],
460
- childTags: [
461
- "caption",
462
- "colgroup",
463
- "thead",
464
- "tbody",
465
- "tfoot",
466
- "tr"
467
- ]
468
- }, jt = {
469
- allowsTextContent: !1,
470
- allowsChildren: !0,
471
- allowedAttributes: [],
472
- childTags: [
473
- "tr"
474
- ]
475
- }, vt = {
476
- allowsTextContent: !1,
477
- allowsChildren: !0,
478
- allowedAttributes: [],
479
- childTags: [
480
- "tr"
481
- ]
482
- }, Nt = {
483
- allowsTextContent: !1,
484
- allowsChildren: !0,
485
- allowedAttributes: [],
486
- childTags: [
487
- "tr"
488
- ]
489
- }, $t = {
490
- allowsTextContent: !1,
491
- allowsChildren: !0,
492
- allowedAttributes: [],
493
- childTags: [
494
- "td",
495
- "th"
496
- ]
497
- }, kt = {
498
- allowsTextContent: !0,
499
- allowsChildren: !0,
500
- allowedAttributes: [
501
- "scope",
502
- "colspan",
503
- "rowspan"
504
- ],
505
- childTags: []
506
- }, Dt = {
507
- allowsTextContent: !0,
508
- allowsChildren: !0,
509
- allowedAttributes: [
510
- "colspan",
511
- "rowspan"
512
- ],
513
- childTags: []
514
- }, Ot = {
515
- allowsTextContent: !1,
516
- allowsChildren: !0,
517
- allowedAttributes: [],
518
- childTags: [
519
- "option"
520
- ]
521
- }, Et = {
522
- allowsTextContent: !0,
523
- allowsChildren: !1,
524
- allowedAttributes: [
525
- "value",
526
- "label",
527
- "selected",
528
- "disabled"
529
- ]
530
- }, St = {
531
- allowsTextContent: !1,
532
- allowsChildren: !0,
533
- allowedAttributes: [
534
- "role"
535
- ],
536
- childTags: []
537
- }, Lt = {
538
- allowsTextContent: !0,
539
- allowsChildren: !0,
540
- allowedAttributes: [
541
- "href",
542
- "target",
543
- "rel",
544
- "title",
545
- "download"
546
- ],
547
- childTags: []
548
- }, Ft = {
549
- allowsTextContent: !0,
550
- allowsChildren: !0,
551
- allowedAttributes: [
552
- "aria-hidden"
553
- ],
554
- childTags: []
555
- }, Gt = {
556
- allowsTextContent: !0,
557
- allowsChildren: !0,
558
- allowedAttributes: [],
559
- childTags: []
560
- }, Mt = {
561
- allowsTextContent: !1,
562
- allowsChildren: !0,
563
- allowedAttributes: [
564
- "type"
565
- ],
566
- childTags: [
567
- "li"
568
- ]
569
- }, Rt = {
570
- allowsTextContent: !0,
571
- allowsChildren: !0,
572
- allowedAttributes: [
573
- "value"
574
- ],
575
- childTags: []
576
- }, zt = {
577
- allowsTextContent: !1,
578
- allowsChildren: !1,
579
- allowedAttributes: []
580
- }, It = {
581
- $schema: it,
582
- div: ct,
583
- input: ut,
584
- checkbox: dt,
585
- colgroup: ft,
586
- col: gt,
587
- label: ht,
588
- form: bt,
589
- select: wt,
590
- p: mt,
591
- h1: pt,
592
- h2: yt,
593
- span: Tt,
594
- img: Ct,
595
- button: At,
596
- table: xt,
597
- thead: jt,
598
- tbody: vt,
599
- tfoot: Nt,
600
- tr: $t,
601
- th: kt,
602
- td: Dt,
603
- datalist: Ot,
604
- option: Et,
605
- header: St,
606
- a: Lt,
607
- i: Ft,
608
- small: Gt,
609
- ul: Mt,
610
- li: Rt,
611
- hr: zt
612
- }, b = ({ inSpec: t }) => {
613
- const e = t;
614
- if (!e) return [];
615
- if (Array.isArray(e))
616
- return e.flatMap((o) => b({ inSpec: o }));
617
- if (typeof e != "object") return [];
618
- const l = [];
619
- return typeof e.tagName == "string" && e.tagName.trim().length > 0 && l.push(e.tagName.toLowerCase()), Array.isArray(e.children) && e.children.length > 0 && e.children.forEach((o) => {
620
- const n = b({ inSpec: o });
621
- l.push(...n);
622
- }), l;
623
- }, Vt = ({ inTagsFound: t, inAllowedTags: e }) => {
624
- const l = t ?? [], o = e ?? {}, n = new Set(
625
- Object.keys(o).filter((s) => s !== "$schema").map((s) => s.toLowerCase())
626
- ), r = {}, a = [], i = [];
627
- l.forEach((s) => {
628
- r[s] = (r[s] || 0) + 1, n.has(s) ? a.includes(s) || a.push(s) : i.includes(s) || i.push(s);
629
- });
630
- const c = l.length, f = i.length === 0;
631
- return {
632
- totalTags: c,
633
- tagCounts: r,
634
- uniqueTags: Object.keys(r),
635
- recognizedTags: a,
636
- unrecognizedTags: i,
637
- areAllTagsPresent: f
638
- };
639
- }, qt = ({ inSpec: t, inTags: e = It } = {}) => {
640
- const l = t, o = e, n = b({ inSpec: l }), r = Vt({
641
- inTagsFound: n,
642
- inAllowedTags: o
643
- });
644
- return {
645
- areAllTagsPresent: r.areAllTagsPresent,
646
- totalTags: r.totalTags,
647
- tagCounts: r.tagCounts,
648
- uniqueTags: r.uniqueTags,
649
- recognizedTags: r.recognizedTags,
650
- unrecognizedTags: r.unrecognizedTags
651
- };
652
- }, A = (t = {}) => {
653
- const e = (t == null ? void 0 : t.spec) ?? (t == null ? void 0 : t.inSpec) ?? t;
654
- return C(e);
655
- };
656
- W({
657
- inFuncDefinition: A,
658
- inReviewSpec: qt
659
- });
660
- const Bt = ({
661
- inTargetHtmlId: t,
662
- inColumns: e,
663
- type: l,
664
- inData: o,
665
- showLog: n
666
- } = {}) => {
667
- const r = t, a = o ?? [], i = e;
668
- console.log("buildSpec 1 :", r, a.localColumns);
669
- let c = y({
670
- type: l,
671
- data: a,
672
- columns: i
673
- }), f = c;
674
- !("tagName" in c) && "children" in c && (f = c.children);
675
- const s = A(f);
676
- return console.log("buildSpec 3 :", s), s;
677
- }, Pt = ({
678
- type: t = "table",
679
- targetHtmlId: e,
680
- data: l,
681
- classToApply: o,
682
- columns: n,
683
- appendPosition: r,
684
- showLog: a = !1
685
- } = {}) => {
686
- const i = t, c = e, f = l, s = n;
687
- console.log("showLog 1 :", i, e, l, o, n, r);
688
- const u = Bt({
689
- inTargetHtmlId: c,
690
- inColumns: s,
691
- showLog: a,
692
- inData: f,
693
- type: i
694
- });
695
- console.log("showLog 2 :", u);
696
- const d = document.getElementById(c);
697
- return console.log("showLog 3 :", d), r === "prepend" ? d.prepend(u) : (d && (d.innerHTML = ""), console.log("showLog 4:1 :", u instanceof Node), console.log("showLog 4:2 :", u instanceof NodeList), console.log("showLog 4:3 :", u instanceof HTMLCollection), u != null && typeof u[Symbol.iterator] == "function" ? d.append(...u) : d.append(u)), console.log("showLog 5 :", d), d;
698
- };
699
- j(Pt);
700
- export {
701
- Pt as default
702
- };
1
+ const O = {
2
+ version: "v13.1.0",
3
+ description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
4
+ }, F = (t) => {
5
+ var e;
6
+ typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), (e = globalThis.ks).jsonRenderers ?? (e.jsonRenderers = {
7
+ meta: O,
8
+ renderToDom: t
9
+ }));
10
+ }, R = {
11
+ version: "v4.0.0",
12
+ description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
13
+ }, S = (t) => {
14
+ var e;
15
+ typeof globalThis > "u" || !t || (globalThis.ks ?? (globalThis.ks = {}), (e = globalThis.ks).jsonRenderersBuild ?? (e.jsonRenderersBuild = {
16
+ meta: R,
17
+ renderToDom: t
18
+ }));
19
+ }, D = {
20
+ version: "v32",
21
+ description: "JSON-to-DOM engine with centralized traversal and responsibility-focused construction"
22
+ }, V = ({ inFuncDefinition: t } = {}) => {
23
+ if (typeof globalThis > "u" || !t) return;
24
+ globalThis.ks ?? (globalThis.ks = {});
25
+ const e = {
26
+ meta: D,
27
+ buildSpecElement: t
28
+ };
29
+ globalThis.ks.jsonToSpec = e;
30
+ }, I = (t, e) => p(t, e), T = (t, e) => Array.isArray(t) ? t.map((r) => I(r, e)).flat(1 / 0).filter(Boolean) : [], G = (t, e) => {
31
+ if ("source" in t && (t == null ? void 0 : t.source) in e) {
32
+ const r = e[t == null ? void 0 : t.source];
33
+ if (Array.isArray(r))
34
+ return r.map((o) => {
35
+ const n = t == null ? void 0 : t.template;
36
+ if (n)
37
+ return p(n, o);
38
+ });
39
+ }
40
+ }, M = (t, e) => {
41
+ let r = [];
42
+ for (const [l, o] of Object.entries(e)) {
43
+ const n = t == null ? void 0 : t.template;
44
+ if (n) {
45
+ const a = p(n, {
46
+ key: l,
47
+ value: o
48
+ });
49
+ r.push(a);
50
+ }
51
+ }
52
+ return r;
53
+ }, z = (t, e) => {
54
+ if ("source" in t && (t == null ? void 0 : t.source) in e) {
55
+ const r = e[t == null ? void 0 : t.source];
56
+ if (Array.isArray(r))
57
+ return r.map((o) => {
58
+ const n = t == null ? void 0 : t.template;
59
+ if (n)
60
+ return p(n, o);
61
+ });
62
+ }
63
+ }, K = (t, e) => {
64
+ if ("operation" in t) {
65
+ if (t.operation === "loopArray")
66
+ return G(t, e);
67
+ if (t.operation === "loopObject")
68
+ return M(t, e);
69
+ if (t.operation === "loopCollection")
70
+ return z(t, e);
71
+ }
72
+ }, A = (t, e) => {
73
+ if (typeof e == "string") return e;
74
+ if (typeof t != "string") return t;
75
+ if (t === "${value}")
76
+ return e.value;
77
+ const r = t.match(/^\$\{(.+?)\}$/);
78
+ if (r) {
79
+ const l = r[1];
80
+ return (e == null ? void 0 : e[l]) ?? "";
81
+ }
82
+ return t;
83
+ }, L = (t, e) => {
84
+ let r = {};
85
+ for (const [l, o] of Object.entries(t)) {
86
+ const n = A(o, e);
87
+ r[l] = n;
88
+ }
89
+ return r;
90
+ }, q = (t, e) => {
91
+ if ("tagName" in t) {
92
+ if ("textContent" in t) {
93
+ const r = A(t.textContent, e);
94
+ t.textContent = r;
95
+ }
96
+ if ("attributes" in t) {
97
+ const r = L(t.attributes, e);
98
+ t.attributes = r;
99
+ }
100
+ }
101
+ }, B = (t, e) => {
102
+ if (!t || typeof t != "object" || Array.isArray(t)) return null;
103
+ const r = structuredClone(t);
104
+ if (!r) return null;
105
+ if ("tagName" in r && q(r, e), "jsonToSpec" in r) {
106
+ const l = r == null ? void 0 : r.jsonToSpec, o = K(l, e);
107
+ Array.isArray(o) ? r.children = o : r.children = [o], delete r.jsonToSpec;
108
+ }
109
+ if (Array.isArray(r == null ? void 0 : r.children)) {
110
+ const l = T(r == null ? void 0 : r.children, e);
111
+ r.children = l;
112
+ }
113
+ return r;
114
+ }, p = (t, e) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? T(t, e) : typeof t == "object" ? B(t, e) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : t, C = (t, e) => p(t, e);
115
+ V({
116
+ inFuncDefinition: C
117
+ });
118
+ const H = {
119
+ default: {
120
+ tagName: "table",
121
+ attributes: {
122
+ class: "table table-hover table-striped mb-0"
123
+ },
124
+ children: [
125
+ {
126
+ tagName: "thead",
127
+ children: [
128
+ {
129
+ tagName: "tr",
130
+ jsonToSpec: {
131
+ operation: "loopCollection",
132
+ source: "columns",
133
+ template: {
134
+ tagName: "th",
135
+ textContent: "${title}"
136
+ }
137
+ },
138
+ children: []
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ tagName: "tbody",
144
+ jsonToSpec: {
145
+ operation: "loopCollection",
146
+ source: "data",
147
+ template: {
148
+ tagName: "tr",
149
+ jsonToSpec: {
150
+ operation: "loopObject",
151
+ source: "data",
152
+ template: {
153
+ tagName: "td",
154
+ textContent: "${value}"
155
+ }
156
+ },
157
+ children: []
158
+ }
159
+ },
160
+ children: []
161
+ }
162
+ ]
163
+ }
164
+ }, P = ({
165
+ inColumns: t,
166
+ inData: e
167
+ } = {}) => {
168
+ const r = e ?? [], l = t;
169
+ return C(H.default, {
170
+ columns: l,
171
+ data: r
172
+ });
173
+ }, x = ({ inItems: t, inRecipe: e, inExecute: r }) => {
174
+ const l = t, o = e, n = r;
175
+ return l.map((a) => b({
176
+ inSource: a,
177
+ inRecipe: o,
178
+ inExecute: n
179
+ })).flat(1 / 0).filter(Boolean);
180
+ }, _ = ({ inSource: t, inRecipe: e, inExecute: r }) => {
181
+ const l = t, o = e, n = r;
182
+ let a = l;
183
+ typeof n == "function" && (a = n({
184
+ inSource: l,
185
+ inRecipe: o
186
+ }));
187
+ for (const [s, d] of Object.entries(a))
188
+ Array.isArray(d) && o && s in o && (a[s] = x({
189
+ inItems: d,
190
+ inRecipe: o[s],
191
+ inExecute: n
192
+ }));
193
+ return a;
194
+ }, b = ({ inSource: t, inRecipe: e, inExecute: r }) => {
195
+ const l = t, o = e, n = r;
196
+ return Array.isArray(l) ? x({
197
+ inItems: l,
198
+ inRecipe: o,
199
+ inExecute: n
200
+ }) : typeof l == "object" && l !== null ? _({
201
+ inSource: l,
202
+ inRecipe: o,
203
+ inExecute: n
204
+ }) : l;
205
+ }, U = ({ inKey: t, inDirective: e }) => {
206
+ const r = t, l = e;
207
+ return (l == null ? void 0 : l.alterKey) || r;
208
+ }, X = ({ inValue: t, inDirective: e, inExecute: r }) => {
209
+ const l = t, o = e, n = r;
210
+ return o && "transform" in o ? b({
211
+ inSource: l,
212
+ inRecipe: o,
213
+ inExecute: n
214
+ }) : l;
215
+ }, Q = ({ inValue: t, inDirective: e }) => {
216
+ const r = t, l = e;
217
+ return (l == null ? void 0 : l.valueType) === "array" && !Array.isArray(r) ? [r] : r;
218
+ }, W = ({ inValue: t, inDirective: e }) => {
219
+ const r = t, l = e;
220
+ return l != null && l.valueKey && r && typeof r == "object" ? r[l.valueKey] : r;
221
+ }, Y = ({ inSource: t, inTransform: e, inExecute: r }) => {
222
+ const l = t, o = e, n = r, a = {};
223
+ for (const [s, d] of Object.entries(l)) {
224
+ if (!(s in o))
225
+ continue;
226
+ const u = o[s], i = U({ inKey: s, inDirective: u });
227
+ let c = d;
228
+ c = X({
229
+ inValue: c,
230
+ inDirective: u,
231
+ inExecute: n
232
+ }), c = Q({ inValue: c, inDirective: u }), c = W({ inValue: c, inDirective: u }), a[i] = c;
233
+ }
234
+ return a;
235
+ };
236
+ function $(t, e) {
237
+ for (const r in t)
238
+ typeof t[r] == "object" && t[r] !== null ? $(t[r], e) : typeof t[r] == "string" && t[r] === "${}" && (t[r] = e);
239
+ return t;
240
+ }
241
+ const Z = ({ inSource: t, inOperation: e, inExecute: r }) => {
242
+ const l = t, o = e;
243
+ for (const [n, a] of Object.entries(o))
244
+ if ("operationType" in a && a.operationType === "loopArray" && n in l) {
245
+ const s = l[n].map((d) => {
246
+ const u = { ...a == null ? void 0 : a.template };
247
+ return $(u, d), u;
248
+ });
249
+ l[n] = s;
250
+ }
251
+ return l;
252
+ }, g = ({ inSource: t, inRecipe: e }) => {
253
+ let r = t;
254
+ const l = e;
255
+ return l && typeof l == "object" && "transform" in l && (r = Y({
256
+ inSource: r,
257
+ inTransform: l.transform,
258
+ inExecute: g
259
+ })), l && typeof l == "object" && "operation" in l && (r = Z({
260
+ inSource: r,
261
+ inOperation: l.operation,
262
+ inExecute: g
263
+ })), r;
264
+ }, J = (t, e) => b({
265
+ inSource: t,
266
+ inRecipe: e,
267
+ inExecute: g
268
+ }), tt = {
269
+ children: ""
270
+ }, et = {
271
+ children: {
272
+ operationType: "loopArray",
273
+ template: {
274
+ tagName: "option",
275
+ attributes: {
276
+ value: "${}"
277
+ },
278
+ textContent: "${}"
279
+ }
280
+ }
281
+ }, rt = {
282
+ transform: tt,
283
+ operation: et
284
+ }, v = ({
285
+ inData: t
286
+ } = {}) => {
287
+ let r = J({
288
+ children: t ?? []
289
+ }, rt);
290
+ return r == null ? void 0 : r.children;
291
+ }, lt = "select", nt = {
292
+ id: "LedgerName"
293
+ }, ot = [], h = {
294
+ tagName: lt,
295
+ attributes: nt,
296
+ children: ot
297
+ }, at = ({
298
+ inData: t
299
+ } = {}) => {
300
+ let r = v({
301
+ inData: t ?? []
302
+ });
303
+ return h.children = r, console.log("skeletonJson: ", r, h), h;
304
+ }, w = {
305
+ table: P,
306
+ select: at,
307
+ selectOptionsOnly: v
308
+ }, j = ({
309
+ type: t = "table",
310
+ data: e,
311
+ columns: r
312
+ } = {}) => {
313
+ const l = t, o = w[l];
314
+ return o ? o({
315
+ inColumns: r,
316
+ inData: e
317
+ }) : (console.error(
318
+ `[Renderer] Unknown renderer type "${l}". Available types: ${Object.keys(w).join(", ")}`
319
+ ), null);
320
+ };
321
+ S(j);
322
+ const st = {
323
+ version: "v9",
324
+ description: "JSON-to-DOM engine with SVG namespace support, mixed text content, and centralized traversal"
325
+ }, it = ({ inFuncDefinition: t, inReviewSpec: e } = {}) => {
326
+ if (typeof globalThis > "u" || !t) return;
327
+ globalThis.ks ?? (globalThis.ks = {});
328
+ const r = {
329
+ meta: st,
330
+ buildSpecElement: t,
331
+ reviewSpec: e
332
+ };
333
+ globalThis.ks["json-to-tag"] = r, globalThis.ks.jsonToTag = r;
334
+ }, ct = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : typeof t == "object" && (t.nodeType === 3 || t.tagName === "#text" || !t.tagName && (t.textContent !== void 0 || t.text !== void 0)) ? document.createTextNode(t.textContent ?? t.text ?? "") : E(t), N = (t) => Array.isArray(t) ? t.map(ct).flat(1 / 0).filter(Boolean) : [], ut = (t) => (t == null, t), dt = "http://www.w3.org/2000/svg", ft = /* @__PURE__ */ new Set([
335
+ "svg",
336
+ "path",
337
+ "symbol",
338
+ "use",
339
+ "g",
340
+ "circle",
341
+ "ellipse",
342
+ "rect",
343
+ "line",
344
+ "polyline",
345
+ "polygon",
346
+ "text",
347
+ "tspan",
348
+ "defs",
349
+ "clippath",
350
+ "mask",
351
+ "pattern",
352
+ "marker",
353
+ "lineargradient",
354
+ "radialgradient",
355
+ "stop",
356
+ "image",
357
+ "filter",
358
+ "fegaussianblur",
359
+ "femerge",
360
+ "femergenode"
361
+ ]), pt = ({ inTagName: t }) => {
362
+ const e = t == null ? void 0 : t.toLowerCase();
363
+ if (!e) return null;
364
+ if (e === "checkbox") {
365
+ const r = document.createElement("input");
366
+ return r.type = "checkbox", r;
367
+ }
368
+ return ft.has(e) ? document.createElementNS(dt, e) : document.createElement(e);
369
+ }, ht = ({ inElement: t, inTextContent: e }) => (!t || e === void 0 || e === null || (t.textContent = e), t), gt = ({ inElement: t, inProperties: e }) => (t && e && typeof e == "object" && Object.assign(t, e), t), mt = "http://www.w3.org/1999/xlink", bt = ({ inElement: t, inAttributes: e }) => {
370
+ const r = t, l = e;
371
+ if (!r || !l || typeof l != "object")
372
+ return r;
373
+ const o = typeof SVGElement < "u" ? r instanceof SVGElement : r.namespaceURI === "http://www.w3.org/2000/svg";
374
+ return Object.entries(l).forEach(([n, a]) => {
375
+ if (n === "class") {
376
+ o ? r.setAttribute("class", String(a)) : r.className = a;
377
+ return;
378
+ }
379
+ if (n === "xlink:href" || n === "href") {
380
+ if (a != null) {
381
+ const s = String(a);
382
+ if (o)
383
+ try {
384
+ r.setAttributeNS(mt, "href", s);
385
+ } catch {
386
+ }
387
+ r.setAttribute("href", s), r.setAttribute("xlink:href", s);
388
+ }
389
+ return;
390
+ }
391
+ if (typeof a == "boolean") {
392
+ a ? r.setAttribute(n, "") : r.removeAttribute(n);
393
+ return;
394
+ }
395
+ a != null && r.setAttribute(n, String(a));
396
+ }), r;
397
+ }, yt = ({ inElement: t, inClassList: e }) => {
398
+ if (!t || !e) return t;
399
+ const r = typeof e == "string" ? e.split(/\s+/).filter(Boolean) : Array.isArray(e) ? e.filter((l) => typeof l == "string" && l.trim()) : [];
400
+ return r.length && t.classList.add(...r), t;
401
+ }, wt = (t) => {
402
+ if (!t || typeof t != "object" || Array.isArray(t) || !t.tagName) return null;
403
+ const e = pt({ inTagName: t.tagName });
404
+ if (!e) return null;
405
+ if (ht({
406
+ inElement: e,
407
+ inTextContent: ut(t.textContent),
408
+ inTagName: t.tagName
409
+ }), gt({
410
+ inElement: e,
411
+ inProperties: t.properties
412
+ }), bt({
413
+ inElement: e,
414
+ inAttributes: t.attributes
415
+ }), yt({
416
+ inElement: e,
417
+ inClassList: t.classList
418
+ }), Array.isArray(t.children)) {
419
+ const r = N(t.children);
420
+ r.length && e.append(...r);
421
+ }
422
+ return e;
423
+ }, E = (t) => t == null ? null : typeof Node < "u" && t instanceof Node ? t : Array.isArray(t) ? N(t) : typeof t == "object" ? wt(t) : typeof t == "string" || typeof t == "number" ? document.createTextNode(String(t)) : null, Tt = "./tags.schema.json", At = {
424
+ allowsTextContent: !1,
425
+ allowsChildren: !0,
426
+ allowedAttributes: [
427
+ "title",
428
+ "role"
429
+ ],
430
+ childTags: []
431
+ }, Ct = {
432
+ allowsTextContent: !1,
433
+ allowsChildren: !1,
434
+ allowedAttributes: [
435
+ "type",
436
+ "placeholder",
437
+ "value",
438
+ "name",
439
+ "disabled",
440
+ "readonly",
441
+ "required",
442
+ "list"
443
+ ]
444
+ }, xt = {
445
+ allowsTextContent: !1,
446
+ allowsChildren: !1,
447
+ allowedAttributes: [
448
+ "type",
449
+ "checked",
450
+ "name",
451
+ "value",
452
+ "disabled",
453
+ "required"
454
+ ]
455
+ }, $t = {
456
+ allowsTextContent: !1,
457
+ allowsChildren: !0,
458
+ allowedAttributes: [
459
+ "span"
460
+ ],
461
+ childTags: [
462
+ "col"
463
+ ]
464
+ }, vt = {
465
+ allowsTextContent: !1,
466
+ allowsChildren: !1,
467
+ allowedAttributes: [
468
+ "span",
469
+ "style",
470
+ "width"
471
+ ]
472
+ }, jt = {
473
+ allowsTextContent: !0,
474
+ allowsChildren: !0,
475
+ allowedAttributes: [
476
+ "for"
477
+ ],
478
+ childTags: []
479
+ }, Nt = {
480
+ allowsTextContent: !1,
481
+ allowsChildren: !0,
482
+ allowedAttributes: [
483
+ "action",
484
+ "method",
485
+ "autocomplete",
486
+ "enctype",
487
+ "name",
488
+ "novalidate",
489
+ "target"
490
+ ],
491
+ childTags: []
492
+ }, Et = {
493
+ allowsTextContent: !1,
494
+ allowsChildren: !0,
495
+ allowedAttributes: [
496
+ "name",
497
+ "disabled",
498
+ "required",
499
+ "multiple",
500
+ "size"
501
+ ],
502
+ childTags: [
503
+ "option"
504
+ ]
505
+ }, kt = {
506
+ allowsTextContent: !0,
507
+ allowsChildren: !0,
508
+ allowedAttributes: [],
509
+ childTags: []
510
+ }, Ot = {
511
+ allowsTextContent: !0,
512
+ allowsChildren: !0,
513
+ allowedAttributes: [],
514
+ childTags: []
515
+ }, Ft = {
516
+ allowsTextContent: !0,
517
+ allowsChildren: !0,
518
+ allowedAttributes: [],
519
+ childTags: []
520
+ }, Rt = {
521
+ allowsTextContent: !0,
522
+ allowsChildren: !0,
523
+ allowedAttributes: [],
524
+ childTags: []
525
+ }, St = {
526
+ allowsTextContent: !1,
527
+ allowsChildren: !1,
528
+ allowedAttributes: [
529
+ "src",
530
+ "alt",
531
+ "width",
532
+ "height",
533
+ "loading"
534
+ ]
535
+ }, Dt = {
536
+ allowsTextContent: !0,
537
+ allowsChildren: !0,
538
+ allowedAttributes: [
539
+ "type",
540
+ "disabled",
541
+ "name",
542
+ "value"
543
+ ],
544
+ childTags: []
545
+ }, Vt = {
546
+ allowsTextContent: !1,
547
+ allowsChildren: !0,
548
+ allowedAttributes: [
549
+ "border",
550
+ "cellpadding",
551
+ "cellspacing"
552
+ ],
553
+ childTags: [
554
+ "caption",
555
+ "colgroup",
556
+ "thead",
557
+ "tbody",
558
+ "tfoot",
559
+ "tr"
560
+ ]
561
+ }, It = {
562
+ allowsTextContent: !1,
563
+ allowsChildren: !0,
564
+ allowedAttributes: [],
565
+ childTags: [
566
+ "tr"
567
+ ]
568
+ }, Gt = {
569
+ allowsTextContent: !1,
570
+ allowsChildren: !0,
571
+ allowedAttributes: [],
572
+ childTags: [
573
+ "tr"
574
+ ]
575
+ }, Mt = {
576
+ allowsTextContent: !1,
577
+ allowsChildren: !0,
578
+ allowedAttributes: [],
579
+ childTags: [
580
+ "tr"
581
+ ]
582
+ }, zt = {
583
+ allowsTextContent: !1,
584
+ allowsChildren: !0,
585
+ allowedAttributes: [],
586
+ childTags: [
587
+ "td",
588
+ "th"
589
+ ]
590
+ }, Kt = {
591
+ allowsTextContent: !0,
592
+ allowsChildren: !0,
593
+ allowedAttributes: [
594
+ "scope",
595
+ "colspan",
596
+ "rowspan"
597
+ ],
598
+ childTags: []
599
+ }, Lt = {
600
+ allowsTextContent: !0,
601
+ allowsChildren: !0,
602
+ allowedAttributes: [
603
+ "colspan",
604
+ "rowspan"
605
+ ],
606
+ childTags: []
607
+ }, qt = {
608
+ allowsTextContent: !1,
609
+ allowsChildren: !0,
610
+ allowedAttributes: [],
611
+ childTags: [
612
+ "option"
613
+ ]
614
+ }, Bt = {
615
+ allowsTextContent: !0,
616
+ allowsChildren: !1,
617
+ allowedAttributes: [
618
+ "value",
619
+ "label",
620
+ "selected",
621
+ "disabled"
622
+ ]
623
+ }, Ht = {
624
+ allowsTextContent: !1,
625
+ allowsChildren: !0,
626
+ allowedAttributes: [
627
+ "role"
628
+ ],
629
+ childTags: []
630
+ }, Pt = {
631
+ allowsTextContent: !0,
632
+ allowsChildren: !0,
633
+ allowedAttributes: [
634
+ "href",
635
+ "target",
636
+ "rel",
637
+ "title",
638
+ "download"
639
+ ],
640
+ childTags: []
641
+ }, _t = {
642
+ allowsTextContent: !0,
643
+ allowsChildren: !0,
644
+ allowedAttributes: [
645
+ "aria-hidden"
646
+ ],
647
+ childTags: []
648
+ }, Ut = {
649
+ allowsTextContent: !0,
650
+ allowsChildren: !0,
651
+ allowedAttributes: [],
652
+ childTags: []
653
+ }, Xt = {
654
+ allowsTextContent: !1,
655
+ allowsChildren: !0,
656
+ allowedAttributes: [
657
+ "type"
658
+ ],
659
+ childTags: [
660
+ "li"
661
+ ]
662
+ }, Qt = {
663
+ allowsTextContent: !0,
664
+ allowsChildren: !0,
665
+ allowedAttributes: [
666
+ "value"
667
+ ],
668
+ childTags: []
669
+ }, Wt = {
670
+ allowsTextContent: !1,
671
+ allowsChildren: !1,
672
+ allowedAttributes: []
673
+ }, Yt = {
674
+ $schema: Tt,
675
+ div: At,
676
+ input: Ct,
677
+ checkbox: xt,
678
+ colgroup: $t,
679
+ col: vt,
680
+ label: jt,
681
+ form: Nt,
682
+ select: Et,
683
+ p: kt,
684
+ h1: Ot,
685
+ h2: Ft,
686
+ span: Rt,
687
+ img: St,
688
+ button: Dt,
689
+ table: Vt,
690
+ thead: It,
691
+ tbody: Gt,
692
+ tfoot: Mt,
693
+ tr: zt,
694
+ th: Kt,
695
+ td: Lt,
696
+ datalist: qt,
697
+ option: Bt,
698
+ header: Ht,
699
+ a: Pt,
700
+ i: _t,
701
+ small: Ut,
702
+ ul: Xt,
703
+ li: Qt,
704
+ hr: Wt
705
+ }, m = ({ inSpec: t }) => {
706
+ const e = t;
707
+ if (!e) return [];
708
+ if (Array.isArray(e))
709
+ return e.flatMap((l) => m({ inSpec: l }));
710
+ if (typeof e != "object") return [];
711
+ const r = [];
712
+ return typeof e.tagName == "string" && e.tagName.trim().length > 0 && r.push(e.tagName.toLowerCase()), Array.isArray(e.children) && e.children.length > 0 && e.children.forEach((l) => {
713
+ const o = m({ inSpec: l });
714
+ r.push(...o);
715
+ }), r;
716
+ }, Zt = ({ inTagsFound: t, inAllowedTags: e }) => {
717
+ const r = t ?? [], l = e ?? {}, o = new Set(
718
+ Object.keys(l).filter((i) => i !== "$schema").map((i) => i.toLowerCase())
719
+ ), n = {}, a = [], s = [];
720
+ r.forEach((i) => {
721
+ n[i] = (n[i] || 0) + 1, o.has(i) ? a.includes(i) || a.push(i) : s.includes(i) || s.push(i);
722
+ });
723
+ const d = r.length, u = s.length === 0;
724
+ return {
725
+ totalTags: d,
726
+ tagCounts: n,
727
+ uniqueTags: Object.keys(n),
728
+ recognizedTags: a,
729
+ unrecognizedTags: s,
730
+ areAllTagsPresent: u
731
+ };
732
+ }, Jt = ({ inSpec: t, inTags: e = Yt } = {}) => {
733
+ const r = t, l = e, o = m({ inSpec: r }), n = Zt({
734
+ inTagsFound: o,
735
+ inAllowedTags: l
736
+ });
737
+ return {
738
+ areAllTagsPresent: n.areAllTagsPresent,
739
+ totalTags: n.totalTags,
740
+ tagCounts: n.tagCounts,
741
+ uniqueTags: n.uniqueTags,
742
+ recognizedTags: n.recognizedTags,
743
+ unrecognizedTags: n.unrecognizedTags
744
+ };
745
+ }, k = (t = {}) => {
746
+ const e = (t == null ? void 0 : t.spec) ?? (t == null ? void 0 : t.inSpec) ?? t;
747
+ return E(e);
748
+ };
749
+ it({
750
+ inFuncDefinition: k,
751
+ inReviewSpec: Jt
752
+ });
753
+ const te = ({
754
+ inTargetHtmlId: t,
755
+ inColumns: e,
756
+ type: r,
757
+ inData: l,
758
+ showLog: o
759
+ } = {}) => {
760
+ const n = t, a = l ?? [], s = e;
761
+ o && console.log("buildSpec 1 :", n, a.localColumns);
762
+ let u = j({
763
+ type: r,
764
+ data: a,
765
+ columns: s
766
+ });
767
+ const i = k(u);
768
+ return console.log("buildSpec 2 :", u, i), o && console.log("buildSpec 3 :", i), i;
769
+ }, ee = ({
770
+ type: t = "table",
771
+ targetHtmlId: e,
772
+ data: r,
773
+ classToApply: l,
774
+ columns: o,
775
+ appendPosition: n,
776
+ showLog: a = !1
777
+ } = {}) => {
778
+ const s = t, d = e, u = r, i = o;
779
+ a && console.log("showLog 1 :", s, e, r, l, o, n);
780
+ const c = te({
781
+ inTargetHtmlId: d,
782
+ inColumns: i,
783
+ showLog: a,
784
+ inData: u,
785
+ type: s
786
+ });
787
+ a && console.log("showLog 2 :", c);
788
+ const f = document.getElementById(d);
789
+ a && console.log("showLog 3 :", f);
790
+ const y = Array.isArray(c) || c instanceof NodeList || c instanceof HTMLCollection;
791
+ return console.log("prepend ---------:", s, y, f, c, u), y ? n === "prepend" ? f.prepend(...c) : f.append(...c) : n === "prepend" ? f.prepend(c) : (f && (f.innerHTML = ""), f.append(c)), a && console.log("showLog 5 :", f), f;
792
+ };
793
+ F(ee);
794
+ export {
795
+ ee as default
796
+ };